CombinedText
stringlengths 4
3.42M
|
|---|
-- Copyright 2008-2017 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package body Types is
function Ident (O : Object'Class) return Object'Class is
begin
return O;
end Ident;
procedure Do_Nothing (O : in out Object'Class) is
begin
null;
end Do_Nothing;
end Types;
|
separate (Numerics.Sparse_Matrices)
function Permute (Mat : in Sparse_Matrix;
P : in Int_Array;
By : in Permute_By_Type := Column) return Sparse_Matrix is
begin
pragma Assert (Mat.Format = CSC);
case By is
when Column =>
return Permute_By_Col (Mat, P);
when Row =>
return Transpose (Permute_By_Col (Transpose (Mat), P));
end case;
end Permute;
|
--
-- 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 body rings
with spark_mode => on
is
procedure init
(r : out ring)
is
begin
r.buf := (others => default_object);
r.top := ring_range'first;
r.bottom := ring_range'first;
r.state := EMPTY;
end init;
procedure write
(r : in out ring;
item : in object;
success : out boolean)
is
begin
if r.state = FULL then
success := false;
return;
end if;
-- Write
r.buf(r.top) := item;
-- Increment top
if r.top = r.buf'last then
r.top := r.buf'first;
else
r.top := r.top + 1;
end if;
-- Adjust state
if r.top = r.bottom then
r.state := FULL;
else
r.state := USED;
end if;
success := true;
end write;
procedure read
(r : in out ring;
item : out object;
success : out boolean)
is
begin
-- Read data only if buffer is not empty
if r.state = EMPTY then
success := false;
item := default_object;
return;
end if;
-- Read
item := r.buf(r.bottom);
-- Incrementing bottom
if r.bottom = r.buf'last then
r.bottom := r.buf'first;
else
r.bottom := r.bottom + 1;
end if;
-- Adjust state
if r.bottom = r.top then
r.state := EMPTY;
else
r.state := USED;
end if;
success := true;
end read;
procedure unwrite
(r : in out ring;
success : out boolean)
is
begin
if r.state = EMPTY then
success := false;
return;
end if;
-- Decrementing top counter
if r.top = r.buf'first then
r.top := r.buf'last;
else
r.top := r.top - 1;
end if;
-- Adjust state
if r.bottom = r.top then
r.state := EMPTY;
else
r.state := USED;
end if;
success := true;
end unwrite;
function state (r : ring) return ring_state
is
begin
return r.state;
end state;
end rings;
|
-- 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 json = require("json")
name = "ThreatBook"
type = "api"
function start()
setratelimit(5)
end
function check()
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end
if (c ~= nil and c.key ~= nil and c.key ~= "") then
return true
end
return false
end
function vertical(ctx, domain)
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end
if (c == nil or c.key == nil or c.key == "") then
return
end
local resp, err = request(ctx, {
url=verturl(domain, key),
headers={['Content-Type']="application/json"},
})
if (err ~= nil and err ~= "") then
return
end
local d = json.decode(resp)
if (d == nil or d.response_code ~= 0 or #(d.sub_domains.data) == 0) then
return
end
for i, sub in pairs(d.sub_domains.data) do
newname(ctx, sub)
end
end
function verturl(domain, key)
return "https://api.threatbook.cn/v3/domain/sub_domains?apikey=" .. key .. "&resource=" .. domain
end
function cacheurl(domain)
return "https://api.threatbook.cn/v3/domain/sub_domains?resource=" .. domain
end
|
-- { dg-do compile }
-- { dg-options "-O -gnatws" }
package body Opt1 is
function De_Linear_Index
(Index : Natural;
D : Natural;
Ind_Lengths : Dimention_Length)
return Dimension_Indexes
is
Len : Natural := 1;
Tmp_Ind : Natural := Index;
Tmp_Res : Natural;
Result : Dimension_Indexes (1 .. D);
begin
for J in 1 .. D loop
Len := Len * Ind_Lengths (J);
end loop;
for J in Result'Range loop
Result (J) := Tmp_Res;
Tmp_Ind := Tmp_Ind - Len * (Result (J) - 1);
end loop;
return Result;
end;
end Opt1;
|
pragma Ada_95;
with System;
package ada_main is
pragma Warnings (Off);
gnat_argc : Integer;
gnat_argv : System.Address;
gnat_envp : System.Address;
pragma Import (C, gnat_argc);
pragma Import (C, gnat_argv);
pragma Import (C, gnat_envp);
gnat_exit_status : Integer;
pragma Import (C, gnat_exit_status);
GNAT_Version : constant String :=
"GNAT Version: GPL 2015 (20150428-49)" & ASCII.NUL;
pragma Export (C, GNAT_Version, "__gnat_version");
Ada_Main_Program_Name : constant String := "_ada_factorial" & ASCII.NUL;
pragma Export (C, Ada_Main_Program_Name, "__gnat_ada_main_program_name");
procedure adainit;
pragma Export (C, adainit, "adainit");
procedure adafinal;
pragma Export (C, adafinal, "adafinal");
function main
(argc : Integer;
argv : System.Address;
envp : System.Address)
return Integer;
pragma Export (C, main, "main");
type Version_32 is mod 2 ** 32;
u00001 : constant Version_32 := 16#5fb8d32e#;
pragma Export (C, u00001, "factorialB");
u00002 : constant Version_32 := 16#fbff4c67#;
pragma Export (C, u00002, "system__standard_libraryB");
u00003 : constant Version_32 := 16#f72f352b#;
pragma Export (C, u00003, "system__standard_libraryS");
u00004 : constant Version_32 := 16#3ffc8e18#;
pragma Export (C, u00004, "adaS");
u00005 : constant Version_32 := 16#f64b89a4#;
pragma Export (C, u00005, "ada__integer_text_ioB");
u00006 : constant Version_32 := 16#f1daf268#;
pragma Export (C, u00006, "ada__integer_text_ioS");
u00007 : constant Version_32 := 16#b612ca65#;
pragma Export (C, u00007, "ada__exceptionsB");
u00008 : constant Version_32 := 16#1d190453#;
pragma Export (C, u00008, "ada__exceptionsS");
u00009 : constant Version_32 := 16#a46739c0#;
pragma Export (C, u00009, "ada__exceptions__last_chance_handlerB");
u00010 : constant Version_32 := 16#3aac8c92#;
pragma Export (C, u00010, "ada__exceptions__last_chance_handlerS");
u00011 : constant Version_32 := 16#f4ce8c3a#;
pragma Export (C, u00011, "systemS");
u00012 : constant Version_32 := 16#a207fefe#;
pragma Export (C, u00012, "system__soft_linksB");
u00013 : constant Version_32 := 16#af945ded#;
pragma Export (C, u00013, "system__soft_linksS");
u00014 : constant Version_32 := 16#b01dad17#;
pragma Export (C, u00014, "system__parametersB");
u00015 : constant Version_32 := 16#8ae48145#;
pragma Export (C, u00015, "system__parametersS");
u00016 : constant Version_32 := 16#b19b6653#;
pragma Export (C, u00016, "system__secondary_stackB");
u00017 : constant Version_32 := 16#5faf4353#;
pragma Export (C, u00017, "system__secondary_stackS");
u00018 : constant Version_32 := 16#39a03df9#;
pragma Export (C, u00018, "system__storage_elementsB");
u00019 : constant Version_32 := 16#d90dc63e#;
pragma Export (C, u00019, "system__storage_elementsS");
u00020 : constant Version_32 := 16#41837d1e#;
pragma Export (C, u00020, "system__stack_checkingB");
u00021 : constant Version_32 := 16#7a71e7d2#;
pragma Export (C, u00021, "system__stack_checkingS");
u00022 : constant Version_32 := 16#393398c1#;
pragma Export (C, u00022, "system__exception_tableB");
u00023 : constant Version_32 := 16#5ad7ea2f#;
pragma Export (C, u00023, "system__exception_tableS");
u00024 : constant Version_32 := 16#ce4af020#;
pragma Export (C, u00024, "system__exceptionsB");
u00025 : constant Version_32 := 16#9cade1cc#;
pragma Export (C, u00025, "system__exceptionsS");
u00026 : constant Version_32 := 16#37d758f1#;
pragma Export (C, u00026, "system__exceptions__machineS");
u00027 : constant Version_32 := 16#b895431d#;
pragma Export (C, u00027, "system__exceptions_debugB");
u00028 : constant Version_32 := 16#472c9584#;
pragma Export (C, u00028, "system__exceptions_debugS");
u00029 : constant Version_32 := 16#570325c8#;
pragma Export (C, u00029, "system__img_intB");
u00030 : constant Version_32 := 16#f6156cf8#;
pragma Export (C, u00030, "system__img_intS");
u00031 : constant Version_32 := 16#b98c3e16#;
pragma Export (C, u00031, "system__tracebackB");
u00032 : constant Version_32 := 16#6af355e1#;
pragma Export (C, u00032, "system__tracebackS");
u00033 : constant Version_32 := 16#9ed49525#;
pragma Export (C, u00033, "system__traceback_entriesB");
u00034 : constant Version_32 := 16#f4957a4a#;
pragma Export (C, u00034, "system__traceback_entriesS");
u00035 : constant Version_32 := 16#8c33a517#;
pragma Export (C, u00035, "system__wch_conB");
u00036 : constant Version_32 := 16#efb3aee8#;
pragma Export (C, u00036, "system__wch_conS");
u00037 : constant Version_32 := 16#9721e840#;
pragma Export (C, u00037, "system__wch_stwB");
u00038 : constant Version_32 := 16#c2a282e9#;
pragma Export (C, u00038, "system__wch_stwS");
u00039 : constant Version_32 := 16#92b797cb#;
pragma Export (C, u00039, "system__wch_cnvB");
u00040 : constant Version_32 := 16#e004141b#;
pragma Export (C, u00040, "system__wch_cnvS");
u00041 : constant Version_32 := 16#6033a23f#;
pragma Export (C, u00041, "interfacesS");
u00042 : constant Version_32 := 16#ece6fdb6#;
pragma Export (C, u00042, "system__wch_jisB");
u00043 : constant Version_32 := 16#60740d3a#;
pragma Export (C, u00043, "system__wch_jisS");
u00044 : constant Version_32 := 16#28f088c2#;
pragma Export (C, u00044, "ada__text_ioB");
u00045 : constant Version_32 := 16#1a9b0017#;
pragma Export (C, u00045, "ada__text_ioS");
u00046 : constant Version_32 := 16#10558b11#;
pragma Export (C, u00046, "ada__streamsB");
u00047 : constant Version_32 := 16#2e6701ab#;
pragma Export (C, u00047, "ada__streamsS");
u00048 : constant Version_32 := 16#db5c917c#;
pragma Export (C, u00048, "ada__io_exceptionsS");
u00049 : constant Version_32 := 16#12c8cd7d#;
pragma Export (C, u00049, "ada__tagsB");
u00050 : constant Version_32 := 16#ce72c228#;
pragma Export (C, u00050, "ada__tagsS");
u00051 : constant Version_32 := 16#c3335bfd#;
pragma Export (C, u00051, "system__htableB");
u00052 : constant Version_32 := 16#700c3fd0#;
pragma Export (C, u00052, "system__htableS");
u00053 : constant Version_32 := 16#089f5cd0#;
pragma Export (C, u00053, "system__string_hashB");
u00054 : constant Version_32 := 16#d25254ae#;
pragma Export (C, u00054, "system__string_hashS");
u00055 : constant Version_32 := 16#699628fa#;
pragma Export (C, u00055, "system__unsigned_typesS");
u00056 : constant Version_32 := 16#b44f9ae7#;
pragma Export (C, u00056, "system__val_unsB");
u00057 : constant Version_32 := 16#793ec5c1#;
pragma Export (C, u00057, "system__val_unsS");
u00058 : constant Version_32 := 16#27b600b2#;
pragma Export (C, u00058, "system__val_utilB");
u00059 : constant Version_32 := 16#586e3ac4#;
pragma Export (C, u00059, "system__val_utilS");
u00060 : constant Version_32 := 16#d1060688#;
pragma Export (C, u00060, "system__case_utilB");
u00061 : constant Version_32 := 16#d0c7e5ed#;
pragma Export (C, u00061, "system__case_utilS");
u00062 : constant Version_32 := 16#84a27f0d#;
pragma Export (C, u00062, "interfaces__c_streamsB");
u00063 : constant Version_32 := 16#8bb5f2c0#;
pragma Export (C, u00063, "interfaces__c_streamsS");
u00064 : constant Version_32 := 16#845f5a34#;
pragma Export (C, u00064, "system__crtlS");
u00065 : constant Version_32 := 16#431faf3c#;
pragma Export (C, u00065, "system__file_ioB");
u00066 : constant Version_32 := 16#53bf6d5f#;
pragma Export (C, u00066, "system__file_ioS");
u00067 : constant Version_32 := 16#b7ab275c#;
pragma Export (C, u00067, "ada__finalizationB");
u00068 : constant Version_32 := 16#19f764ca#;
pragma Export (C, u00068, "ada__finalizationS");
u00069 : constant Version_32 := 16#95817ed8#;
pragma Export (C, u00069, "system__finalization_rootB");
u00070 : constant Version_32 := 16#bb3cffaa#;
pragma Export (C, u00070, "system__finalization_rootS");
u00071 : constant Version_32 := 16#769e25e6#;
pragma Export (C, u00071, "interfaces__cB");
u00072 : constant Version_32 := 16#4a38bedb#;
pragma Export (C, u00072, "interfaces__cS");
u00073 : constant Version_32 := 16#ee0f26dd#;
pragma Export (C, u00073, "system__os_libB");
u00074 : constant Version_32 := 16#d7b69782#;
pragma Export (C, u00074, "system__os_libS");
u00075 : constant Version_32 := 16#1a817b8e#;
pragma Export (C, u00075, "system__stringsB");
u00076 : constant Version_32 := 16#8a719d5c#;
pragma Export (C, u00076, "system__stringsS");
u00077 : constant Version_32 := 16#09511692#;
pragma Export (C, u00077, "system__file_control_blockS");
u00078 : constant Version_32 := 16#f6fdca1c#;
pragma Export (C, u00078, "ada__text_io__integer_auxB");
u00079 : constant Version_32 := 16#b9793d30#;
pragma Export (C, u00079, "ada__text_io__integer_auxS");
u00080 : constant Version_32 := 16#181dc502#;
pragma Export (C, u00080, "ada__text_io__generic_auxB");
u00081 : constant Version_32 := 16#a6c327d3#;
pragma Export (C, u00081, "ada__text_io__generic_auxS");
u00082 : constant Version_32 := 16#18d57884#;
pragma Export (C, u00082, "system__img_biuB");
u00083 : constant Version_32 := 16#afb4a0b7#;
pragma Export (C, u00083, "system__img_biuS");
u00084 : constant Version_32 := 16#e7d8734f#;
pragma Export (C, u00084, "system__img_llbB");
u00085 : constant Version_32 := 16#ee73b049#;
pragma Export (C, u00085, "system__img_llbS");
u00086 : constant Version_32 := 16#9777733a#;
pragma Export (C, u00086, "system__img_lliB");
u00087 : constant Version_32 := 16#e581d9eb#;
pragma Export (C, u00087, "system__img_lliS");
u00088 : constant Version_32 := 16#0e8808d4#;
pragma Export (C, u00088, "system__img_llwB");
u00089 : constant Version_32 := 16#471f93df#;
pragma Export (C, u00089, "system__img_llwS");
u00090 : constant Version_32 := 16#428b07f8#;
pragma Export (C, u00090, "system__img_wiuB");
u00091 : constant Version_32 := 16#c1f52725#;
pragma Export (C, u00091, "system__img_wiuS");
u00092 : constant Version_32 := 16#7ebd8839#;
pragma Export (C, u00092, "system__val_intB");
u00093 : constant Version_32 := 16#bc6ba605#;
pragma Export (C, u00093, "system__val_intS");
u00094 : constant Version_32 := 16#b3aa7b17#;
pragma Export (C, u00094, "system__val_lliB");
u00095 : constant Version_32 := 16#6eea6a9a#;
pragma Export (C, u00095, "system__val_lliS");
u00096 : constant Version_32 := 16#06052bd0#;
pragma Export (C, u00096, "system__val_lluB");
u00097 : constant Version_32 := 16#13647f88#;
pragma Export (C, u00097, "system__val_lluS");
u00098 : constant Version_32 := 16#02d5bdf3#;
pragma Export (C, u00098, "matB");
u00099 : constant Version_32 := 16#d1a62465#;
pragma Export (C, u00099, "matS");
u00100 : constant Version_32 := 16#2bce1226#;
pragma Export (C, u00100, "system__memoryB");
u00101 : constant Version_32 := 16#adb3ea0e#;
pragma Export (C, u00101, "system__memoryS");
-- BEGIN ELABORATION ORDER
-- ada%s
-- interfaces%s
-- system%s
-- system.case_util%s
-- system.case_util%b
-- system.htable%s
-- system.img_int%s
-- system.img_int%b
-- system.img_lli%s
-- system.img_lli%b
-- system.parameters%s
-- system.parameters%b
-- system.crtl%s
-- interfaces.c_streams%s
-- interfaces.c_streams%b
-- system.standard_library%s
-- system.exceptions_debug%s
-- system.exceptions_debug%b
-- system.storage_elements%s
-- system.storage_elements%b
-- system.stack_checking%s
-- system.stack_checking%b
-- system.string_hash%s
-- system.string_hash%b
-- system.htable%b
-- system.strings%s
-- system.strings%b
-- system.os_lib%s
-- system.traceback_entries%s
-- system.traceback_entries%b
-- ada.exceptions%s
-- system.soft_links%s
-- system.unsigned_types%s
-- system.img_biu%s
-- system.img_biu%b
-- system.img_llb%s
-- system.img_llb%b
-- system.img_llw%s
-- system.img_llw%b
-- system.img_wiu%s
-- system.img_wiu%b
-- system.val_int%s
-- system.val_lli%s
-- system.val_llu%s
-- system.val_uns%s
-- system.val_util%s
-- system.val_util%b
-- system.val_uns%b
-- system.val_llu%b
-- system.val_lli%b
-- system.val_int%b
-- system.wch_con%s
-- system.wch_con%b
-- system.wch_cnv%s
-- system.wch_jis%s
-- system.wch_jis%b
-- system.wch_cnv%b
-- system.wch_stw%s
-- system.wch_stw%b
-- ada.exceptions.last_chance_handler%s
-- ada.exceptions.last_chance_handler%b
-- system.exception_table%s
-- system.exception_table%b
-- ada.io_exceptions%s
-- ada.tags%s
-- ada.streams%s
-- ada.streams%b
-- interfaces.c%s
-- system.exceptions%s
-- system.exceptions%b
-- system.exceptions.machine%s
-- system.file_control_block%s
-- system.file_io%s
-- system.finalization_root%s
-- system.finalization_root%b
-- ada.finalization%s
-- ada.finalization%b
-- system.memory%s
-- system.memory%b
-- system.standard_library%b
-- system.secondary_stack%s
-- system.file_io%b
-- interfaces.c%b
-- ada.tags%b
-- system.soft_links%b
-- system.os_lib%b
-- system.secondary_stack%b
-- system.traceback%s
-- ada.exceptions%b
-- system.traceback%b
-- ada.text_io%s
-- ada.text_io%b
-- ada.text_io.generic_aux%s
-- ada.text_io.generic_aux%b
-- ada.text_io.integer_aux%s
-- ada.text_io.integer_aux%b
-- ada.integer_text_io%s
-- ada.integer_text_io%b
-- mat%s
-- mat%b
-- factorial%b
-- END ELABORATION ORDER
end ada_main;
|
-------------------------------------------------------------------------------
-- 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_XOF;
pragma Elaborate_All (Keccak.Generic_XOF);
-- @summary
-- Instantations of RawSHAKE128 and RawSHAKE256.
--
-- @group SHAKE
package RawSHAKE
with SPARK_Mode => On
is
-- RawSHAKE has 2 suffix bits appended to each message: 2#11#.
--
-- See Section 6.3 of NIST FIPS-202.
package RawSHAKE128 is new Keccak.Generic_XOF
(XOF_Sponge => Keccak.Keccak_1600.Rounds_24.Sponge,
Capacity => 256,
Suffix => 2#11#,
Suffix_Size => 2);
package RawSHAKE256 is new Keccak.Generic_XOF
(XOF_Sponge => Keccak.Keccak_1600.Rounds_24.Sponge,
Capacity => 512,
Suffix => 2#11#,
Suffix_Size => 2);
end RawSHAKE;
|
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Command_Line; use Ada.Command_Line;
with Fakedsp.Card;
with Fakedsp.Data_Streams.Files;
with Notch_Example.Filters;
procedure Notch_Example.Main is
--
-- This example processes the input using a notch filter that remove
-- a specified frequency F0 placing the poles at distance R from
-- the origin. Both F0 and R are specified by the user on the
-- command line. By default R=0.9.
--
Parsing_Error : exception;
procedure Parse_Command_Line
(F0 : out Fakedsp.Frequency_Hz;
Pole_Radius : out Float;
Src : out Fakedsp.Data_Streams.Data_Source_Access;
Dst : out Fakedsp.Data_Streams.Data_Destination_Access)
is
begin
if not (Argument_Count in 3 .. 4) then
raise Parsing_Error;
end if;
F0 := Fakedsp.Frequency_Hz'Value (Argument (1));
Src := Fakedsp.Data_Streams.Files.Open (Argument (2));
Dst := Fakedsp.Data_Streams.Files.Open (Filename => Argument (3),
Sampling => Src.Sampling_Frequency,
Last_Channel => 1);
Pole_Radius := (if Argument_Count = 4 then
Float'Value (Argument (4))
else
0.9);
end Parse_Command_Line;
Src : Fakedsp.Data_Streams.Data_Source_Access;
Dst : Fakedsp.Data_Streams.Data_Destination_Access;
F0 : Fakedsp.Frequency_Hz;
Pole_Radius : Float;
begin
-- Read from the command line the filter parameters F0 and
-- the radius of the poles, togheter with the name of the files
-- used for I/O. Note that the special name "-" can be used to
-- denote standard input/output. Note that the sampling frequency
-- can be read from the source.
Parse_Command_Line (F0, Pole_Radius, Src, Dst);
declare
use Filters;
use Fakedsp;
-- Create the required notch filter. Note that the type Notch_Filter
-- (defined in the package Notch_Filters) implements the callback
-- interface defined in Faksdsp.Card. Therefore, we can use the
-- Notch_filter as handler of the virtual interrupts produced by
-- virtual card.
Filter : constant Filters.Filter_Access :=
New_Filter (F0 => Normalized_Frequency (F0 / Src.Sampling_Frequency),
R => Pole_Radius);
begin
-- That is, just turn the virtual card on
Card.Start (Callback => Card.Callback_Handler_Access (Filter),
Input => Src,
Output => Dst);
-- ...and wait for the end
Card.Wait_For (Card.End_Of_Data);
end;
Src.Close;
Dst.Close;
Set_Exit_Status (Success);
exception
when Parsing_Error =>
Put_Line (Standard_Error, "Usage: "& Command_Name & " f0 file_in file_out [pole_radius]");
Set_Exit_Status (Failure);
end Notch_Example.Main;
|
-- Copyright 2019 Michael Casadevall <michael@casadevall.pro>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to
-- deal in the Software without restriction, including without limitation the
-- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-- sell copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in
-- all copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-- DEALINGS IN THE SOFTWARE.
with Ada.Text_IO; use Ada.Text_IO;
with DNSCatcher.DNS.Server;
package body Signal_Handlers is
procedure SIGINT_Handler is
begin
Put_Line ("Beginning Clean Shutdown");
DNSCatcher.DNS.Server.Stop_Server;
end SIGINT_Handler;
end Signal_Handlers;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Internals.UML_Packageable_Elements;
with AMF.UML.Abstractions;
with AMF.UML.Dependencies.Collections;
with AMF.UML.Elements.Collections;
with AMF.UML.Named_Elements.Collections;
with AMF.UML.Namespaces;
with AMF.UML.Opaque_Expressions;
with AMF.UML.Packages.Collections;
with AMF.UML.Parameterable_Elements;
with AMF.UML.String_Expressions;
with AMF.UML.Template_Parameters;
with AMF.Visitors;
package AMF.Internals.UML_Abstractions is
type UML_Abstraction_Proxy is
limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy
and AMF.UML.Abstractions.UML_Abstraction with null record;
overriding function Get_Mapping
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access;
-- Getter of Abstraction::mapping.
--
-- An composition of an Expression that states the abstraction
-- relationship between the supplier and the client. In some cases, such
-- as Derivation, it is usually formal and unidirectional; in other cases,
-- such as Trace, it is usually informal and bidirectional. The mapping
-- expression is optional and may be omitted if the precise relationship
-- between the elements is not specified.
overriding procedure Set_Mapping
(Self : not null access UML_Abstraction_Proxy;
To : AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access);
-- Setter of Abstraction::mapping.
--
-- An composition of an Expression that states the abstraction
-- relationship between the supplier and the client. In some cases, such
-- as Derivation, it is usually formal and unidirectional; in other cases,
-- such as Trace, it is usually informal and bidirectional. The mapping
-- expression is optional and may be omitted if the precise relationship
-- between the elements is not specified.
overriding function Get_Client
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Dependency::client.
--
-- The element(s) dependent on the supplier element(s). In some cases
-- (such as a Trace Abstraction) the assignment of direction (that is, the
-- designation of the client element) is at the discretion of the modeler,
-- and is a stipulation.
overriding function Get_Supplier
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Dependency::supplier.
--
-- The element(s) independent of the client element(s), in the same
-- respect and the same dependency relationship. In some directed
-- dependency relationships (such as Refinement Abstractions), a common
-- convention in the domain of class-based OO software is to put the more
-- abstract element in this role. Despite this convention, users of UML
-- may stipulate a sense of dependency suitable for their domain, which
-- makes a more abstract element dependent on that which is more specific.
overriding function Get_Source
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Elements.Collections.Set_Of_UML_Element;
-- Getter of DirectedRelationship::source.
--
-- Specifies the sources of the DirectedRelationship.
overriding function Get_Target
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Elements.Collections.Set_Of_UML_Element;
-- Getter of DirectedRelationship::target.
--
-- Specifies the targets of the DirectedRelationship.
overriding function Get_Related_Element
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Elements.Collections.Set_Of_UML_Element;
-- Getter of Relationship::relatedElement.
--
-- Specifies the elements related by the Relationship.
overriding function Get_Client_Dependency
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
-- Getter of NamedElement::clientDependency.
--
-- Indicates the dependencies that reference the client.
overriding function Get_Name_Expression
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access;
-- Getter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding procedure Set_Name_Expression
(Self : not null access UML_Abstraction_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access);
-- Setter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding function Get_Namespace
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Getter of NamedElement::namespace.
--
-- Specifies the namespace that owns the NamedElement.
overriding function Get_Qualified_Name
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.Optional_String;
-- Getter of NamedElement::qualifiedName.
--
-- A name which allows the NamedElement to be identified within a
-- hierarchy of nested Namespaces. It is constructed from the names of the
-- containing namespaces starting at the root of the hierarchy and ending
-- with the name of the NamedElement itself.
overriding function Get_Owning_Template_Parameter
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
-- Getter of ParameterableElement::owningTemplateParameter.
--
-- The formal template parameter that owns this element.
overriding procedure Set_Owning_Template_Parameter
(Self : not null access UML_Abstraction_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
-- Setter of ParameterableElement::owningTemplateParameter.
--
-- The formal template parameter that owns this element.
overriding function Get_Template_Parameter
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
-- Getter of ParameterableElement::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding procedure Set_Template_Parameter
(Self : not null access UML_Abstraction_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
-- Setter of ParameterableElement::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding function All_Owning_Packages
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package;
-- Operation NamedElement::allOwningPackages.
--
-- The query allOwningPackages() returns all the directly or indirectly
-- owning packages.
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Abstraction_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean;
-- Operation NamedElement::isDistinguishableFrom.
--
-- The query isDistinguishableFrom() determines whether two NamedElements
-- may logically co-exist within a Namespace. By default, two named
-- elements are distinguishable if (a) they have unrelated types or (b)
-- they have related types but different names.
overriding function Namespace
(Self : not null access constant UML_Abstraction_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Operation NamedElement::namespace.
--
-- Missing derivation for NamedElement::/namespace : Namespace
overriding function Is_Compatible_With
(Self : not null access constant UML_Abstraction_Proxy;
P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
return Boolean;
-- Operation ParameterableElement::isCompatibleWith.
--
-- The query isCompatibleWith() determines if this parameterable element
-- is compatible with the specified parameterable element. By default
-- parameterable element P is compatible with parameterable element Q if
-- the kind of P is the same or a subtype as the kind of Q. Subclasses
-- should override this operation to specify different compatibility
-- constraints.
overriding function Is_Template_Parameter
(Self : not null access constant UML_Abstraction_Proxy)
return Boolean;
-- Operation ParameterableElement::isTemplateParameter.
--
-- The query isTemplateParameter() determines if this parameterable
-- element is exposed as a formal template parameter.
overriding procedure Enter_Element
(Self : not null access constant UML_Abstraction_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Leave_Element
(Self : not null access constant UML_Abstraction_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Visit_Element
(Self : not null access constant UML_Abstraction_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of iterator interface.
end AMF.Internals.UML_Abstractions;
|
------------------------------------------------------------------------------
-- Copyright (c) 2019, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Natools.Web.Simple_Pages.Multipages extends the Simple_Pages idea by --
-- gathering several related pages into a single file, with common elements --
-- and comment parameters. --
-- Each list in the input file describes a page or default values used for --
-- subsequent pages, and unlike the Simple_Pages the first atom is not --
-- ignored, but allows to override the path rendered in --
-- templates ("Web_Path") and/or the path under which the simple page is --
-- registered ("Key_Path"), according to the following syntax: --
-- * an empty atom is followed by the defaults, --
-- * an atom with a leading '+' has both Web_Path and Key_Path as the --
-- root multipage path followed by the suffix after '+', --
-- * an atom with a leading '-' has the Web_Path overridden by the suffix --
-- after '-' and is not registered as responding to any path in the site,--
-- * an atom with a leading '#' has the Web_Path of the root multipage --
-- followed by the suffix after '#' and is not registered in the site, --
-- * other atoms override both the Web_Path and the Key_Path. --
-- So for example, a bunch of pages can be simply merged using unprefixed --
-- atoms. A page made of several subcomponents that don't have any --
-- dedicated path but behave as self-contained entities in the rendering --
-- system can be made with the index page marked as "+" (with an empty --
-- suffix), and subcomponents as "#subanchor" so that they Web_Path still --
-- points to the relevant subcomponent. --
------------------------------------------------------------------------------
with Natools.S_Expressions;
with Natools.Web.Sites;
private with Natools.S_Expressions.Atom_Refs;
private with Natools.S_Expressions.Caches;
package Natools.Web.Simple_Pages.Multipages is
type Loader is new Sites.Page_Loader with private;
overriding procedure Load
(Object : in out Loader;
Builder : in out Sites.Site_Builder;
Path : in S_Expressions.Atom);
function Create (File : in S_Expressions.Atom)
return Sites.Page_Loader'Class;
private
type Loader is new Sites.Page_Loader with record
File_Path : S_Expressions.Atom_Refs.Immutable_Reference;
end record;
type Default_Data is record
File_Path : S_Expressions.Atom_Refs.Immutable_Reference;
Template : Page_Template;
end record;
end Natools.Web.Simple_Pages.Multipages;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . W I D E _ W I D E _ T E X T _ IO . C O M P L E X _ I O --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Wide_Wide_Text_IO.Complex_Aux;
with System.WCh_Con; use System.WCh_Con;
with System.WCh_WtS; use System.WCh_WtS;
with Ada.Unchecked_Conversion;
package body Ada.Wide_Wide_Text_IO.Complex_IO is
package Aux renames Ada.Wide_Wide_Text_IO.Complex_Aux;
subtype LLF is Long_Long_Float;
-- Type used for calls to routines in Aux
function TFT is new
Ada.Unchecked_Conversion (File_Type, Ada.Wide_Wide_Text_IO.File_Type);
-- This unchecked conversion is to get around a visibility bug in
-- GNAT version 2.04w. It should be possible to simply use the
-- subtype declared above and do normal checked conversions.
---------
-- Get --
---------
procedure Get
(File : File_Type;
Item : out Complex;
Width : Field := 0)
is
Real_Item : Real'Base;
Imag_Item : Real'Base;
begin
Aux.Get (TFT (File), LLF (Real_Item), LLF (Imag_Item), Width);
Item := (Real_Item, Imag_Item);
exception
when Constraint_Error => raise Data_Error;
end Get;
---------
-- Get --
---------
procedure Get
(Item : out Complex;
Width : Field := 0)
is
begin
Get (Current_Input, Item, Width);
end Get;
---------
-- Get --
---------
procedure Get
(From : Wide_Wide_String;
Item : out Complex;
Last : out Positive)
is
Real_Item : Real'Base;
Imag_Item : Real'Base;
S : constant String := Wide_Wide_String_To_String (From, WCEM_Upper);
-- String on which we do the actual conversion. Note that the method
-- used for wide character encoding is irrelevant, since if there is
-- a character outside the Standard.Character range then the call to
-- Aux.Gets will raise Data_Error in any case.
begin
Aux.Gets (S, LLF (Real_Item), LLF (Imag_Item), Last);
Item := (Real_Item, Imag_Item);
exception
when Data_Error => raise Constraint_Error;
end Get;
---------
-- Put --
---------
procedure Put
(File : File_Type;
Item : Complex;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
is
begin
Aux.Put (TFT (File), LLF (Re (Item)), LLF (Im (Item)), Fore, Aft, Exp);
end Put;
---------
-- Put --
---------
procedure Put
(Item : Complex;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
is
begin
Put (Current_Output, Item, Fore, Aft, Exp);
end Put;
---------
-- Put --
---------
procedure Put
(To : out Wide_Wide_String;
Item : Complex;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
is
S : String (To'First .. To'Last);
begin
Aux.Puts (S, LLF (Re (Item)), LLF (Im (Item)), Aft, Exp);
for J in S'Range loop
To (J) := Wide_Wide_Character'Val (Character'Pos (S (J)));
end loop;
end Put;
end Ada.Wide_Wide_Text_IO.Complex_IO;
|
------------------------------------------------------------------------------
-- Copyright (c) 2020,2021 Protean Code Limited
-- All rights reserved.
--
-- "Simplified" (2-Clause) BSD Licence
--
-- 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.
--
-- 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.
------------------------------------------------------------------------------
with Ada.Unchecked_Conversion;
with Interfaces; use Interfaces;
package SPARKNaCl
with Pure,
SPARK_Mode => On
is
--==============================================
-- Exported types and constants
--
-- These are needed by clients, or by the
-- specifications of child packages
--==============================================
subtype Byte is Unsigned_8;
subtype I32 is Integer_32;
subtype N32 is I32 range 0 .. I32'Last;
subtype I32_Bit is I32 range 0 .. 1;
subtype I64 is Integer_64;
subtype I64_Byte is I64 range 0 .. 255;
subtype I64_Bit is I64 range 0 .. 1;
-- Byte_Seq and constrained subtypes thereof
type Byte_Seq is array (N32 range <>) of Byte;
subtype Index_8 is I32 range 0 .. 7;
subtype Index_16 is I32 range 0 .. 15;
subtype Index_24 is I32 range 0 .. 23;
subtype Index_32 is I32 range 0 .. 31;
subtype Index_64 is I32 range 0 .. 63;
subtype Bytes_8 is Byte_Seq (Index_8);
subtype Bytes_16 is Byte_Seq (Index_16);
subtype Bytes_24 is Byte_Seq (Index_24);
subtype Bytes_32 is Byte_Seq (Index_32);
subtype Bytes_64 is Byte_Seq (Index_64);
Zero_Bytes_16 : constant Bytes_16 := (others => 0);
Zero_Bytes_32 : constant Bytes_32 := (others => 0);
-- A sequence of I64 values, but where each is limited to
-- values 0 .. 255;
type I64_Byte_Seq is array (N32 range <>) of I64_Byte;
-- Sequences of I64 values and subtypes thereof
type I64_Seq is array (N32 range <>) of I64;
subtype I64_Seq_64 is I64_Seq (Index_64);
--------------------------------------------------------
-- Constant time equality test
--------------------------------------------------------
-- Primitive operation of Byte_Seq, so inheritable
function Equal (X, Y : in Byte_Seq) return Boolean
with Pure_Function,
Global => null,
Pre => X'First = Y'First and
X'Last = Y'Last,
Post => Equal'Result =
(for all I in X'Range => X (I) = Y (I));
--------------------------------------------------------
-- Data sanitization
--------------------------------------------------------
-- Primitive operation of Byte_Seq, so inheritable.
-- In their "Volatiles are mis-compiled..." paper,
-- Regehr et al. recommend that calls to such subprograms
-- should never be in-lined as a way to prevent
-- the incorrect optimization (to nothing) of such a call,
-- so we apply No_Inline here.
pragma Warnings (GNATProve, Off, "No_Inline");
procedure Sanitize (R : out Byte_Seq)
with Global => null,
No_Inline;
private
--==============================================
-- Local types - visible below, in this package
-- body and in the bodies of child packages
--==============================================
subtype U16 is Unsigned_16;
subtype U32 is Unsigned_32;
subtype U64 is Unsigned_64;
subtype Index_4 is I32 range 0 .. 3;
subtype Index_15 is I32 range 0 .. 14;
subtype Index_20 is I32 range 0 .. 19;
subtype Index_31 is I32 range 0 .. 30;
subtype Index_256 is I32 range 0 .. 255;
subtype Bytes_4 is Byte_Seq (Index_4);
subtype Bytes_256 is Byte_Seq (Index_256);
type U32_Seq is array (N32 range <>) of U32;
type U64_Seq is array (N32 range <>) of U64;
subtype U32_Seq_4 is U32_Seq (Index_4);
subtype U32_Seq_16 is U32_Seq (Index_16);
subtype I64_Byte_Seq_32 is I64_Byte_Seq (Index_32);
subtype U64_Seq_16 is U64_Seq (Index_16);
subtype U64_Seq_8 is U64_Seq (Index_8);
-- Constant Sigma used for initialization of Core Salsa20
-- function in both Stream and Cryptobox packages
Sigma : constant Bytes_16 :=
(0 => Character'Pos ('e'),
1 => Character'Pos ('x'),
2 => Character'Pos ('p'),
3 => Character'Pos ('a'),
4 => Character'Pos ('n'),
5 => Character'Pos ('d'),
6 => Character'Pos (' '),
7 => Character'Pos ('3'),
8 => Character'Pos ('2'),
9 => Character'Pos ('-'),
10 => Character'Pos ('b'),
11 => Character'Pos ('y'),
12 => Character'Pos ('t'),
13 => Character'Pos ('e'),
14 => Character'Pos (' '),
15 => Character'Pos ('k'));
-------------------------------------------------------------------------
-- Constants common to the whole library
--
-- Some "Huffman-lite coding" is applied to names here - the most
-- frequently used constants having abbreviated names.
-------------------------------------------------------------------------
-- GF "Limbs" are stored modulo 65536
--
-- "LM" = "Limb Modulus"
-- "LMM1" = "Limb Modulus Minus 1"
LM : constant := 65536;
LMM1 : constant := 65535;
-- The modulus of curve 25519 is (2**255 - 19).
-- In the reduction of GF values, we sometime need to multiply a limb
-- value by 2**256 mod (2**255 - 19), which is actually equal to 38,
-- since 2**256 = (2 * (2**255 - 19)) + 38
--
-- "R2256" = "Remainder of 2**256 (modulo 2**255-19)"
R2256 : constant := 38;
-------------------------------------------------------------------------
-- Bounds on All GF Limbs
--
-- In the most general case, we define GF_Any_Limb so it can take
-- on the value of any GF limb at any point including intermediate
-- values inside the "*", "-" and "+" operations.
--
-- Lower bound on GF_Any_Limb
--
-- During a subtraction of a GF, a limb can also reach -65535,
-- but this can be rounded down to -65536 by addition of a -1 carry,
-- so the lower bound is -65536
--
-- Upper bound on GF_Any_Limb
--
-- During the "reduction modulo 2**255-19" phase of the "*"
-- operation, each limb GF (I) is added to R2256 * GF (I + 16)
-- The worst-case upper bound of this result is when I = 0,
-- where GF (0) has upper bound MGFLP and GF (16) has upper bound
-- 15 * MGFLP.
--
-- Therefore the upper bound of Any_GF_Limb is
-- (R2256 * 15 + 1) * MGFLP = 571 * MGFLP
-------------------------------------------------------------------------
-- "Maximum GF Limb Coefficient"
MGFLC : constant := (R2256 * 15) + 1;
-- In multiplying two normalized GFs, a simple product of
-- two limbs is bounded to 65535**2. This comes up in
-- predicates and subtypes below, so a named number here
-- is called for. The name "MGFLP" is short for
-- "Maximum GF Limb Product"
MGFLP : constant := LMM1 * LMM1;
-- The max value of a GF32_Any_Limb is the upper bound on digit 0
-- following ONE application of Product_To_Seminormal_GF to the
-- intermidiate result of a "*" operation. This value is actually
-- a bit less than 2**27 which justifies that subsequence normalization
-- steps can all be done in 32-bir arithmetic.
--
-- See the declaration of Seminormal_GF_LSL below for detail of
-- how this value is derived.
GF32_Any_Limb_Max : constant := (LMM1 + R2256 * ((53 * MGFLP) / LM));
subtype GF32_Any_Limb is I32
range -LM .. GF32_Any_Limb_Max;
type GF32 is array (Index_16) of GF32_Any_Limb;
-- In the "*" operator for GF, intermediate results require
-- 64 bit integers before being normalized, so...
subtype GF64_Any_Limb is I64 range -LM .. (MGFLC * MGFLP);
type GF64 is array (Index_16) of GF64_Any_Limb;
-- GF64 Product Accumulator - used in "*" to accumulate the
-- intermediate results of Left * Right
type GF64_PA is array (Index_31) of GF64_Any_Limb;
-------------------------------------------------------------------------
subtype GF64_Normal_Limb is GF64_Any_Limb range 0 .. LMM1;
subtype GF32_Normal_Limb is GF32_Any_Limb range 0 .. LMM1;
subtype GF16_Normal_Limb is U16;
subtype Normal_GF64 is GF64
with Dynamic_Predicate =>
(for all I in Index_16 => Normal_GF64 (I) in GF64_Normal_Limb);
subtype Normal_GF32 is GF32
with Dynamic_Predicate =>
(for all I in Index_16 => Normal_GF32 (I) in GF32_Normal_Limb);
type Normal_GF is array (Index_16) of GF16_Normal_Limb
with Alignment => 4;
-------------------------------------------------------------------------
-------------------------------------------------------------------------
-- Subtypes supporting "+" operation on GF
--
-- In a "+" operation, intermediate result limbs peak at +131070, so
subtype GF_Sum_Limb is I32 range 0 .. (LMM1 * 2);
subtype Sum_GF is GF32
with Dynamic_Predicate =>
(for all I in Index_16 => Sum_GF (I) in GF_Sum_Limb);
-------------------------------------------------------------------------
-------------------------------------------------------------------------
-- Subtypes supporting "-" operation on GF
--
-- In a "-" operation, each limb of the intermediate result is
-- increased by 65536 to make sure it's not negative, and one
-- is taken off the next limb up to balance the value.
--
-- This means that
-- Limb 0 is in range (0 - 65535) + 65536 .. (65535 - 0) + 65536
-- which is 1 .. 131071
-- Limbs 1 .. 15 are in range (0 - 65535) + 65535 .. (65535 - 0) + 65535
-- which is 0 .. 131070
--
-- Finally, to balance the -1 value carried into limb 16, limb 0
-- is reduced by R2256, so...
subtype Difference_GF is GF32
with Dynamic_Predicate =>
((Difference_GF (0) in (1 - R2256) .. (2 * LMM1) + 1) and
(for all K in Index_16 range 1 .. 15 =>
Difference_GF (K) in 0 .. 2 * LMM1));
-------------------------------------------------------------------------
-- Subtypes supporting "*" operation on GF
--
-- A GF which is the result of multiplying two other Normalized GFs,
-- but BEFORE normalization is applied has the following bounds on
-- its limbs. The upperbound on Limb 0 is MGFLC * MGFLP as in
-- GF_Any_Limb, but the upper bound reduces by 37 * MGFLP
-- for each limb onwards...
--
-- Lower-bound here is 0 since "*" always takes Normal_GF
-- parameters, so an intermediate limb can never be negative.
subtype Product_GF is GF64
with Dynamic_Predicate =>
(for all I in Index_16 =>
Product_GF (I) >= 0 and
Product_GF (I) <=
(MGFLC - 37 * GF64_Any_Limb (I)) * MGFLP);
----------------------------------------------------------------------
-- A "Seminormal GF" is the result of applying a single
-- normalization step to a Product_GF
--
-- Least Significant Limb ("LSL") of a Seminormal GF.
-- LSL is initially normalized to 0 .. 65535, but gets
-- R2256 * Carry added to it, where Carry is (Limb 15 / 65536)
-- The upper-bound on Limb 15 is given by substituting I = 14
-- into the Dynamic_Predicate above, so
-- (MGFLC - 37 * 14) * MGFLP = 53 * MGFLP
-- See the body of Product_To_Seminormal for the full
-- proof of this upper-bound
subtype Seminormal_GF_LSL is GF32_Any_Limb
range 0 .. GF32_Any_Limb_Max;
-- Limbs 1 though 15 are in 0 .. 65535, but the
-- Least Significant Limb 0 is in GF_Seminormal_Product_LSL
subtype Seminormal_GF is GF32
with Dynamic_Predicate =>
(Seminormal_GF (0) in Seminormal_GF_LSL and
(for all I in Index_16 range 1 .. 15 =>
Seminormal_GF (I) in GF32_Normal_Limb));
------------------------------------------------------------------------
-- A "Nearly-normal GF" is the result of applying either:
-- 1. TWO normalization steps to a Product_GF
-- OR
-- 2. ONE normalization step to the SUM of 2 normalized GFs
-- OR
-- 3. ONE normalization step to the DIFFERENCE of 2 normalized GFs
--
-- The least-significant-limb is normalized to 0 .. 65535, but then
-- has +R2256 or -R2256 added to it, so its range is...
subtype Nearlynormal_GF is GF32
with Dynamic_Predicate =>
((Nearlynormal_GF (0) in -R2256 .. LMM1 + R2256) and
(for all K in Index_16 range 1 .. 15 =>
(Nearlynormal_GF (K) in GF32_Normal_Limb)));
------------------------------------------------------------------------
--=================================================
-- Constants, used in more than one child package
--=================================================
GF_0 : constant Normal_GF := (others => 0);
GF32_0 : constant Normal_GF32 := (others => 0);
GF_1 : constant Normal_GF := (1, others => 0);
--==================
-- Local functions
--==================
function To_U64 is new Ada.Unchecked_Conversion (I64, U64);
function To_I64 is new Ada.Unchecked_Conversion (U64, I64);
function To_U32 is new Ada.Unchecked_Conversion (I32, U32);
function To_I32 is new Ada.Unchecked_Conversion (U32, I32);
-- returns equivalent of X >> 16 in C, doing an arithmetic
-- shift right when X is negative, assuming 2's complement
-- representation
function ASR64_16 (X : in I64) return I64
is (To_I64 (Shift_Right_Arithmetic (To_U64 (X), 16)))
with Post => (if X >= 0 then ASR64_16'Result = X / LM else
ASR64_16'Result = ((X + 1) / LM) - 1);
pragma Annotate (GNATprove,
False_Positive,
"postcondition might fail",
"From definition of arithmetic shift right");
-- returns equivalent of X >> 16 in C, doing an arithmetic
-- shift right when X is negative, assuming 2's complement
-- representation
function ASR32_16 (X : in I32) return I32
is (To_I32 (Shift_Right_Arithmetic (To_U32 (X), 16)))
with Post => (if X >= 0 then ASR32_16'Result = X / LM else
ASR32_16'Result = ((X + 1) / LM) - 1);
pragma Annotate (GNATprove,
False_Positive,
"postcondition might fail",
"From definition of arithmetic shift right");
-- returns equivalent of X >> 8 in C, doing an arithmetic
-- shift right when X is negative, assuming 2's complement
-- representation
function ASR_8 (X : in I64) return I64
is (To_I64 (Shift_Right_Arithmetic (To_U64 (X), 8)))
with Post => (if X >= 0 then ASR_8'Result = X / 256 else
ASR_8'Result = ((X + 1) / 256) - 1);
pragma Annotate (GNATprove,
False_Positive,
"postcondition might fail",
"From definition of arithmetic shift right");
-- returns equivalent of X >> 4 in C, doing an arithmetic
-- shift right when X is negative, assuming 2's complement
-- representation
function ASR_4 (X : in I64) return I64
is (To_I64 (Shift_Right_Arithmetic (To_U64 (X), 4)))
with Post => (if X >= 0 then ASR_4'Result = X / 16 else
ASR_4'Result = ((X + 1) / 16) - 1);
pragma Annotate (GNATprove,
False_Positive,
"postcondition might fail",
"From definition of arithmetic shift right");
--===============================
-- Local subprogram declarations
--===============================
function "+" (Left, Right : in Normal_GF) return Normal_GF
with Pure_Function,
Global => null;
function "-" (Left, Right : in Normal_GF) return Normal_GF
with Pure_Function,
Global => null;
function "*" (Left, Right : in Normal_GF) return Normal_GF
with Pure_Function,
Global => null;
function Square (A : in Normal_GF) return Normal_GF
is (A * A)
with Pure_Function,
Global => null;
-- Additional sanitization procedures for local types
procedure Sanitize_U32 (R : out U32)
with Global => null,
No_Inline;
procedure Sanitize_U16 (R : out U16)
with Global => null,
No_Inline;
procedure Sanitize_U64 (R : out U64)
with Global => null,
No_Inline;
procedure Sanitize_GF32 (R : out GF32)
with Global => null,
No_Inline,
Post => R in Normal_GF32;
procedure Sanitize_GF16 (R : out Normal_GF)
with Global => null,
No_Inline,
Post => R in Normal_GF;
procedure Sanitize_GF64_PA (R : out GF64_PA)
with Global => null,
No_Inline;
procedure Sanitize_I64_Seq (R : out I64_Seq)
with Global => null,
No_Inline;
procedure Sanitize_Boolean (R : out Boolean)
with Global => null,
No_Inline;
end SPARKNaCl;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . D I R E C T O R Y _ O P E R A T I O N S . I T E R A T I O N --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 2001 Ada Core Technologies, 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 is maintained by Ada Core Technologies Inc (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
with Ada.Characters.Handling;
with Ada.Strings.Fixed;
with Ada.Strings.Maps;
with GNAT.OS_Lib;
with GNAT.Regexp;
package body GNAT.Directory_Operations.Iteration is
use Ada;
----------
-- Find --
----------
procedure Find
(Root_Directory : Dir_Name_Str;
File_Pattern : String)
is
File_Regexp : constant Regexp.Regexp := Regexp.Compile (File_Pattern);
Index : Natural := 0;
procedure Read_Directory (Directory : Dir_Name_Str);
-- Open Directory and read all entries. This routine is called
-- recursively for each sub-directories.
function Make_Pathname (Dir, File : String) return String;
-- Returns the pathname for File by adding Dir as prefix.
-------------------
-- Make_Pathname --
-------------------
function Make_Pathname (Dir, File : String) return String is
begin
if Dir (Dir'Last) = '/' or else Dir (Dir'Last) = '\' then
return Dir & File;
else
return Dir & Dir_Separator & File;
end if;
end Make_Pathname;
--------------------
-- Read_Directory --
--------------------
procedure Read_Directory (Directory : Dir_Name_Str) is
Dir : Dir_Type;
Buffer : String (1 .. 2_048);
Last : Natural;
Quit : Boolean;
begin
Open (Dir, Directory);
loop
Read (Dir, Buffer, Last);
exit when Last = 0;
declare
Dir_Entry : constant String := Buffer (1 .. Last);
Pathname : constant String
:= Make_Pathname (Directory, Dir_Entry);
begin
if Regexp.Match (Dir_Entry, File_Regexp) then
Quit := False;
Index := Index + 1;
begin
Action (Pathname, Index, Quit);
exception
when others =>
Close (Dir);
raise;
end;
exit when Quit;
end if;
-- Recursively call for sub-directories, except for . and ..
if not (Dir_Entry = "." or else Dir_Entry = "..")
and then OS_Lib.Is_Directory (Pathname)
then
Read_Directory (Pathname);
end if;
end;
end loop;
Close (Dir);
end Read_Directory;
begin
Read_Directory (Root_Directory);
end Find;
-----------------------
-- Wildcard_Iterator --
-----------------------
procedure Wildcard_Iterator (Path : Path_Name) is
Index : Natural := 0;
procedure Read
(Directory : String;
File_Pattern : String;
Suffix_Pattern : String);
-- Read entries in Directory and call user's callback if the entry
-- match File_Pattern and Suffix_Pattern is empty otherwise it will go
-- down one more directory level by calling Next_Level routine above.
procedure Next_Level
(Current_Path : String;
Suffix_Path : String);
-- Extract next File_Pattern from Suffix_Path and call Read routine
-- above.
----------------
-- Next_Level --
----------------
procedure Next_Level
(Current_Path : String;
Suffix_Path : String)
is
DS : Natural;
SP : String renames Suffix_Path;
begin
if SP'Length > 2
and then SP (SP'First) = '.'
and then Strings.Maps.Is_In (SP (SP'First + 1), Dir_Seps)
then
-- Starting with "./"
DS := Strings.Fixed.Index
(SP (SP'First + 2 .. SP'Last),
Dir_Seps);
if DS = 0 then
-- We have "./"
Read (Current_Path & ".", "*", "");
else
-- We have "./dir"
Read (Current_Path & ".",
SP (SP'First + 2 .. DS - 1),
SP (DS .. SP'Last));
end if;
elsif SP'Length > 3
and then SP (SP'First .. SP'First + 1) = ".."
and then Strings.Maps.Is_In (SP (SP'First + 2), Dir_Seps)
then
-- Starting with "../"
DS := Strings.Fixed.Index
(SP (SP'First + 3 .. SP'Last),
Dir_Seps);
if DS = 0 then
-- We have "../"
Read (Current_Path & "..", "*", "");
else
-- We have "../dir"
Read (Current_Path & "..",
SP (SP'First + 4 .. DS - 1),
SP (DS .. SP'Last));
end if;
elsif Current_Path = ""
and then SP'Length > 1
and then Characters.Handling.Is_Letter (SP (SP'First))
and then SP (SP'First + 1) = ':'
then
-- Starting with "<drive>:"
if SP'Length > 2
and then Strings.Maps.Is_In (SP (SP'First + 2), Dir_Seps)
then
-- Starting with "<drive>:\"
DS := Strings.Fixed.Index
(SP (SP'First + 3 .. SP'Last), Dir_Seps);
if DS = 0 then
-- Se have "<drive>:\dir"
Read (SP (SP'First .. SP'First + 1),
SP (SP'First + 3 .. SP'Last),
"");
else
-- We have "<drive>:\dir\kkk"
Read (SP (SP'First .. SP'First + 1),
SP (SP'First + 3 .. DS - 1),
SP (DS .. SP'Last));
end if;
else
-- Starting with "<drive>:"
DS := Strings.Fixed.Index
(SP (SP'First + 2 .. SP'Last), Dir_Seps);
if DS = 0 then
-- We have "<drive>:dir"
Read (SP (SP'First .. SP'First + 1),
SP (SP'First + 2 .. SP'Last),
"");
else
-- We have "<drive>:dir/kkk"
Read (SP (SP'First .. SP'First + 1),
SP (SP'First + 2 .. DS - 1),
SP (DS .. SP'Last));
end if;
end if;
elsif Strings.Maps.Is_In (SP (SP'First), Dir_Seps) then
-- Starting with a /
DS := Strings.Fixed.Index
(SP (SP'First + 1 .. SP'Last),
Dir_Seps);
if DS = 0 then
-- We have "/dir"
Read (Current_Path,
SP (SP'First + 1 .. SP'Last),
"");
else
-- We have "/dir/kkk"
Read (Current_Path,
SP (SP'First + 1 .. DS - 1),
SP (DS .. SP'Last));
end if;
else
-- Starting with a name
DS := Strings.Fixed.Index (SP, Dir_Seps);
if DS = 0 then
-- We have "dir"
Read (Current_Path & '.',
SP,
"");
else
-- We have "dir/kkk"
Read (Current_Path & '.',
SP (SP'First .. DS - 1),
SP (DS .. SP'Last));
end if;
end if;
end Next_Level;
----------
-- Read --
----------
Quit : Boolean := False;
-- Global state to be able to exit all recursive calls.
procedure Read
(Directory : String;
File_Pattern : String;
Suffix_Pattern : String)
is
File_Regexp : constant Regexp.Regexp :=
Regexp.Compile (File_Pattern, Glob => True);
Dir : Dir_Type;
Buffer : String (1 .. 2_048);
Last : Natural;
begin
if OS_Lib.Is_Directory (Directory) then
Open (Dir, Directory);
Dir_Iterator : loop
Read (Dir, Buffer, Last);
exit Dir_Iterator when Last = 0;
declare
Dir_Entry : constant String := Buffer (1 .. Last);
Pathname : constant String :=
Directory & Dir_Separator & Dir_Entry;
begin
-- Handle "." and ".." only if explicit use in the
-- File_Pattern.
if not
((Dir_Entry = "." and then File_Pattern /= ".")
or else
(Dir_Entry = ".." and then File_Pattern /= ".."))
then
if Regexp.Match (Dir_Entry, File_Regexp) then
if Suffix_Pattern = "" then
-- No more matching needed, call user's callback
Index := Index + 1;
begin
Action (Pathname, Index, Quit);
exception
when others =>
Close (Dir);
raise;
end;
exit Dir_Iterator when Quit;
else
-- Down one level
Next_Level
(Directory & Dir_Separator & Dir_Entry,
Suffix_Pattern);
end if;
end if;
end if;
end;
exit Dir_Iterator when Quit;
end loop Dir_Iterator;
Close (Dir);
end if;
end Read;
begin
Next_Level ("", Path);
end Wildcard_Iterator;
end GNAT.Directory_Operations.Iteration;
|
-- { dg-do compile }
package body Enclosing_Record_Reference is
R: aliased T;
function F1 (x: integer) return T is begin return R; end;
function F2 (x: T) return integer is begin return 0; end;
function F3 (x: T) return T is begin return R; end;
function F4 (x: integer) return access T is begin return R'access; end;
function F5 (x: access T) return integer is begin return 0; end;
function F6 (x: access T) return access T is begin return R'access; end;
function F7 (x: T) return access T is begin return R'access; end;
function F8 (x: access T) return T is begin return R; end;
begin
R.F1 := F1'Access;
R.F2 := F2'Access;
R.F3 := F3'Access;
R.F4 := F4'Access;
R.F5 := F5'Access;
R.F6 := F6'Access;
R.F7 := F7'Access;
R.F8 := F8'Access;
end Enclosing_Record_Reference;
|
------------------------------------------------------------------------------
-- --
-- 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.Executable_Nodes.Collections is
pragma Preelaborate;
package UML_Executable_Node_Collections is
new AMF.Generic_Collections
(UML_Executable_Node,
UML_Executable_Node_Access);
type Set_Of_UML_Executable_Node is
new UML_Executable_Node_Collections.Set with null record;
Empty_Set_Of_UML_Executable_Node : constant Set_Of_UML_Executable_Node;
type Ordered_Set_Of_UML_Executable_Node is
new UML_Executable_Node_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UML_Executable_Node : constant Ordered_Set_Of_UML_Executable_Node;
type Bag_Of_UML_Executable_Node is
new UML_Executable_Node_Collections.Bag with null record;
Empty_Bag_Of_UML_Executable_Node : constant Bag_Of_UML_Executable_Node;
type Sequence_Of_UML_Executable_Node is
new UML_Executable_Node_Collections.Sequence with null record;
Empty_Sequence_Of_UML_Executable_Node : constant Sequence_Of_UML_Executable_Node;
private
Empty_Set_Of_UML_Executable_Node : constant Set_Of_UML_Executable_Node
:= (UML_Executable_Node_Collections.Set with null record);
Empty_Ordered_Set_Of_UML_Executable_Node : constant Ordered_Set_Of_UML_Executable_Node
:= (UML_Executable_Node_Collections.Ordered_Set with null record);
Empty_Bag_Of_UML_Executable_Node : constant Bag_Of_UML_Executable_Node
:= (UML_Executable_Node_Collections.Bag with null record);
Empty_Sequence_Of_UML_Executable_Node : constant Sequence_Of_UML_Executable_Node
:= (UML_Executable_Node_Collections.Sequence with null record);
end AMF.UML.Executable_Nodes.Collections;
|
-- Copyright 2008-2017 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package Pck is
type Parameter is record
One : Integer;
Two : Integer;
Three : Integer;
end record;
function Ident (P : Parameter) return Parameter;
procedure Do_Nothing (P : in out Parameter);
end Pck;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.OCL.Ocl_Expressions;
limited with AMF.UML.Classifiers;
package AMF.OCL.Type_Exps is
pragma Preelaborate;
type OCL_Type_Exp is limited interface
and AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression;
type OCL_Type_Exp_Access is
access all OCL_Type_Exp'Class;
for OCL_Type_Exp_Access'Storage_Size use 0;
not overriding function Get_Referred_Type
(Self : not null access constant OCL_Type_Exp)
return AMF.UML.Classifiers.UML_Classifier_Access is abstract;
-- Getter of TypeExp::referredType.
--
not overriding procedure Set_Referred_Type
(Self : not null access OCL_Type_Exp;
To : AMF.UML.Classifiers.UML_Classifier_Access) is abstract;
-- Setter of TypeExp::referredType.
--
end AMF.OCL.Type_Exps;
|
------------------------------------------------------------------------------
-- --
-- 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 packageable element indicates a named element that may be owned directly
-- by a package.
--
-- Packageable elements are able to serve as a template parameter.
------------------------------------------------------------------------------
with AMF.UML.Named_Elements;
with AMF.UML.Parameterable_Elements;
package AMF.UML.Packageable_Elements is
pragma Preelaborate;
type UML_Packageable_Element is limited interface
and AMF.UML.Named_Elements.UML_Named_Element
and AMF.UML.Parameterable_Elements.UML_Parameterable_Element;
type UML_Packageable_Element_Access is
access all UML_Packageable_Element'Class;
for UML_Packageable_Element_Access'Storage_Size use 0;
not overriding function Get_Visibility
(Self : not null access constant UML_Packageable_Element)
return AMF.UML.UML_Visibility_Kind is abstract;
-- Getter of PackageableElement::visibility.
--
-- Indicates that packageable elements must always have a visibility,
-- i.e., visibility is not optional.
not overriding procedure Set_Visibility
(Self : not null access UML_Packageable_Element;
To : AMF.UML.UML_Visibility_Kind) is abstract;
-- Setter of PackageableElement::visibility.
--
-- Indicates that packageable elements must always have a visibility,
-- i.e., visibility is not optional.
end AMF.UML.Packageable_Elements;
|
---------------------------------
-- GID - Generic Image Decoder --
---------------------------------
--
-- Copyright (c) Gautier de Montmollin 2010 .. 2019
--
-- 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.
--
-- NB: this is the MIT License, as found 2-May-2010 on the site
-- http://www.opensource.org/licenses/mit-license.php
with GID.Headers,
GID.Decoding_BMP,
GID.Decoding_GIF,
GID.Decoding_JPG,
GID.Decoding_PNG,
GID.Decoding_PNM,
GID.Decoding_TGA;
with Ada.Unchecked_Deallocation;
package body GID is
-- Internal: a few header items (palette, some large JPEG tables)
-- are heap allocated; we need to release them upon finalization
-- or descriptor reuse.
procedure Clear_heap_allocated_memory (Object : in out Image_descriptor) is
procedure Dispose is
new Ada.Unchecked_Deallocation(Color_table, p_Color_table);
procedure Dispose is
new Ada.Unchecked_Deallocation(
JPEG_defs.VLC_table,
JPEG_defs.p_VLC_table
);
begin
-- Deterministic garbage collection of heap allocated objects.
-- -> Palette
Dispose (Object.palette);
-- -> JPEG tables
for ad in JPEG_defs.VLC_defs_type'Range(1) loop
for idx in JPEG_defs.VLC_defs_type'Range(2) loop
Dispose (Object.JPEG_stuff.vlc_defs (ad, idx));
end loop;
end loop;
end Clear_heap_allocated_memory;
-----------------------
-- Load_image_header --
-----------------------
procedure Load_image_header (
image : out Image_descriptor;
from : in out Ada.Streams.Root_Stream_Type'Class;
try_tga : Boolean:= False
)
is
begin
Clear_heap_allocated_memory (image);
image.stream:= from'Unchecked_Access;
--
-- Load the very first symbols of the header,
-- this identifies the image format.
--
Headers.Load_signature(image, try_tga);
--
case image.format is
when BMP =>
Headers.Load_BMP_header(image);
when FITS =>
Headers.Load_FITS_header(image);
when GIF =>
Headers.Load_GIF_header(image);
when JPEG =>
Headers.Load_JPEG_header(image);
when PNG =>
Headers.Load_PNG_header(image);
when PNM =>
Headers.Load_PNM_header(image);
when TGA =>
Headers.Load_TGA_header(image);
when TIFF =>
Headers.Load_TIFF_header(image);
end case;
end Load_image_header;
-----------------
-- Pixel_width --
-----------------
function Pixel_width (image: Image_descriptor) return Positive is
begin
return Positive (image.width);
end Pixel_width;
------------------
-- Pixel_height --
------------------
function Pixel_height (image: Image_descriptor) return Positive is
begin
return Positive (image.height);
end Pixel_height;
function Display_orientation (image: Image_descriptor) return Orientation is
begin
return image.display_orientation;
end Display_orientation;
-------------------------
-- Load_image_contents --
-------------------------
procedure Load_image_contents (
image : in out Image_descriptor;
next_frame: out Ada.Calendar.Day_Duration
)
is
procedure BMP_Load is
new Decoding_BMP.Load( Primary_color_range, Set_X_Y, Put_Pixel, Feedback );
procedure GIF_Load is
new Decoding_GIF.Load( Primary_color_range, Set_X_Y, Put_Pixel, Feedback, mode );
procedure JPG_Load is
new Decoding_JPG.Load( Primary_color_range, Set_X_Y, Put_Pixel, Feedback );
procedure PNG_Load is
new Decoding_PNG.Load( Primary_color_range, Set_X_Y, Put_Pixel, Feedback );
procedure PNM_Load is
new Decoding_PNM.Load( Primary_color_range, Set_X_Y, Put_Pixel, Feedback );
procedure TGA_Load is
new Decoding_TGA.Load( Primary_color_range, Set_X_Y, Put_Pixel, Feedback );
begin
next_frame:= 0.0;
-- ^ value updated in case of animation and when
-- current frame is not the last frame
case image.format is
when BMP =>
BMP_Load(image);
when GIF =>
GIF_Load(image, next_frame);
when JPEG =>
JPG_Load(image, next_frame);
when PNG =>
PNG_Load(image);
when PNM =>
PNM_Load(image);
when TGA =>
TGA_Load(image);
when others =>
raise known_but_unsupported_image_format;
end case;
end Load_image_contents;
---------------------------------------
-- Some informations about the image --
---------------------------------------
function Format (image: Image_descriptor) return Image_format_type is
begin
return image.format;
end Format;
function Detailed_format (image: Image_descriptor) return String is
begin
return Bounded_255.To_String(image.detailed_format);
end Detailed_format;
function Subformat (image: Image_descriptor) return Integer is
begin
return image.subformat_id;
end Subformat;
function Bits_per_pixel (image: Image_descriptor) return Positive is
begin
return image.bits_per_pixel;
end Bits_per_pixel;
function RLE_encoded (image: Image_descriptor) return Boolean is
begin
return image.RLE_encoded;
end RLE_encoded;
function Is_Interlaced (image: Image_descriptor) return Boolean is
begin
return image.interlaced;
end Is_Interlaced;
function Greyscale (image: Image_descriptor) return Boolean is
begin
return image.greyscale;
end Greyscale;
function Has_palette (image: Image_descriptor) return Boolean is
begin
return image.palette /= null;
end Has_palette;
function Expect_transparency (image: Image_descriptor) return Boolean is
begin
return image.transparency;
end Expect_transparency;
overriding procedure Adjust (Object : in out Image_descriptor) is
use JPEG_defs;
begin
-- Clone heap allocated objects, if any.
-- -> Palette
if Object.palette /= null then
Object.palette := new Color_table'(Object.palette.all);
end if;
-- -> JPEG tables
for ad in JPEG_defs.VLC_defs_type'Range(1) loop
for idx in JPEG_defs.VLC_defs_type'Range(2) loop
if Object.JPEG_stuff.vlc_defs (ad, idx) /= null then
Object.JPEG_stuff.vlc_defs (ad, idx) :=
new VLC_table'(Object.JPEG_stuff.vlc_defs (ad, idx).all);
end if;
end loop;
end loop;
end Adjust;
overriding procedure Finalize (Object : in out Image_descriptor) is
begin
Clear_heap_allocated_memory (Object);
end Finalize;
end GID;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . S T O R A G E _ E L E M E N T 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;
with Ada.Unchecked_Conversion;
package body System.Storage_Elements is
pragma Suppress (All_Checks);
-- Conversion to/from address
-- Note qualification below of To_Address to avoid ambiguities systems
-- where Address is a visible integer type.
function To_Address is
new Ada.Unchecked_Conversion (Storage_Offset, Address);
function To_Offset is
new Ada.Unchecked_Conversion (Address, Storage_Offset);
-- Conversion to/from integers
-- These functions must be place first because they are inlined_always
-- and are used and inlined in other subprograms defined in this unit.
----------------
-- To_Address --
----------------
function To_Address (Value : Integer_Address) return Address is
begin
return Address (Value);
end To_Address;
----------------
-- To_Integer --
----------------
function To_Integer (Value : Address) return Integer_Address is
begin
return Integer_Address (Value);
end To_Integer;
-- Address arithmetic
---------
-- "+" --
---------
function "+" (Left : Address; Right : Storage_Offset) return Address is
begin
return Storage_Elements.To_Address
(To_Integer (Left) + To_Integer (To_Address (Right)));
end "+";
function "+" (Left : Storage_Offset; Right : Address) return Address is
begin
return Storage_Elements.To_Address
(To_Integer (To_Address (Left)) + To_Integer (Right));
end "+";
---------
-- "-" --
---------
function "-" (Left : Address; Right : Storage_Offset) return Address is
begin
return Storage_Elements.To_Address
(To_Integer (Left) - To_Integer (To_Address (Right)));
end "-";
function "-" (Left, Right : Address) return Storage_Offset is
begin
return To_Offset (Storage_Elements.To_Address
(To_Integer (Left) - To_Integer (Right)));
end "-";
-----------
-- "mod" --
-----------
function "mod"
(Left : Address;
Right : Storage_Offset) return Storage_Offset
is
begin
if Right > 0 then
return Storage_Offset
(To_Integer (Left) mod Integer_Address (Right));
-- The negative case makes no sense since it is a case of a mod where
-- the left argument is unsigned and the right argument is signed. In
-- accordance with the (spirit of the) permission of RM 13.7.1(16),
-- we raise CE, and also include the zero case here. Yes, the RM says
-- PE, but this really is so obviously more like a constraint error.
else
raise Constraint_Error;
end if;
end "mod";
end System.Storage_Elements;
|
package body Ada.Containers.Murmur_Hash_3 is
-- use MurmurHash3_x86_32
procedure Step (h1 : in out Hash_Type; Item : Hash_Type);
procedure Step (h1 : in out Hash_Type; Item : Hash_Type) is
c1 : constant := 16#cc9e2d51#;
c2 : constant := 16#1b873593#;
k1 : Hash_Type := Item;
begin
k1 := k1 * c1;
k1 := Rotate_Left (k1, 15);
k1 := k1 * c2;
h1 := h1 xor k1;
end Step;
-- implementation
function Initialize (Initiator : Hash_Type) return State is
begin
return (h1 => Initiator, len => 0);
end Initialize;
procedure Update (S : in out State; Item : Hash_Type) is
begin
Step (S.h1, Item);
S.h1 := Rotate_Left (S.h1, 13);
S.h1 := S.h1 * 5 + 16#e6546b64#;
S.len := S.len + 4;
end Update;
procedure Update (S : in out State; Item : Hash_8) is
begin
Step (S.h1, Hash_Type'Mod (Item));
S.len := S.len + 1;
end Update;
procedure Update (S : in out State; Item : Hash_16) is
begin
Step (S.h1, Hash_Type'Mod (Item));
S.len := S.len + 2;
end Update;
procedure Update (S : in out State; Item : Hash_24) is
begin
Step (S.h1, Hash_Type'Mod (Item));
S.len := S.len + 3;
end Update;
procedure Finalize (S : State; Digest : out Hash_Type) is
begin
Digest := S.h1 xor Hash_Type'Mod (S.len);
Digest := Digest xor Shift_Right (Digest, 16);
Digest := Digest * 16#85ebca6b#;
Digest := Digest xor Shift_Right (Digest, 13);
Digest := Digest * 16#c2b2ae35#;
Digest := Digest xor Shift_Right (Digest, 16);
end Finalize;
end Ada.Containers.Murmur_Hash_3;
|
-- MP: a Music Player
-- Copyright (C) 2021 by PragmAda Software Engineering. All rights reserved.
-- Released under the terms of the BSD 3-Clause license; see https://opensource.org/licenses
--
-- 2021-06-01 Use new Enpty_Options procedure from Gnoga 1.6a to clear Sel
-- 2021-04-01 Adapted to Ada-12 version of PragmARCs
-- 2020-09-15 Initial version
--
with Ada.Containers.Vectors;
with Ada.Directories;
with Ada.Exceptions;
with Ada.Numerics.Discrete_Random;
with Ada.Strings.Bounded;
with Ada.Strings.Unbounded;
with Gnoga.Application.Singleton;
with Gnoga.Gui.Base;
with Gnoga.Gui.Element.Common;
with Gnoga.Gui.Element.Form;
with Gnoga.Gui.Element.Multimedia;
with Gnoga.Gui.View;
with Gnoga.Gui.Window;
with Gnoga_File_Selection;
with PragmARC.Persistent_Skip_List_Unbounded;
package body MP.UI is
package B_Strings is new Ada.Strings.Bounded.Generic_Bounded_Length (Max => 400);
use B_Strings;
subtype Path_Name is Bounded_String;
function Less (Left : Path_Name; Right : Path_Name) return Boolean;
-- Files in the working directory are < files in subdirectories
package Path_Lists is new PragmARC.Persistent_Skip_List_Unbounded (Element => Path_Name, "<" => Less);
Window : Gnoga.Gui.Window.Window_Type;
View : Gnoga.Gui.View.View_Type;
Player : Gnoga.Gui.Element.Multimedia.Audio_Type;
Form : Gnoga.Gui.Element.Form.Form_Type;
Sel : Gnoga.Gui.Element.Form.Selection_Type;
Count : Gnoga.Gui.Element.Form.Number_Type;
Cnt_Lbl : Gnoga.Gui.Element.Form.Label_Type;
Delete : Gnoga.Gui.Element.Common.Button_Type;
Path : Gnoga.Gui.Element.Form.Text_Type;
Browse : Gnoga.Gui.Element.Common.Button_Type;
Add : Gnoga.Gui.Element.Common.Button_Type;
Play : Gnoga.Gui.Element.Common.Button_Type;
Skip : Gnoga.Gui.Element.Common.Button_Type;
Quit : Gnoga.Gui.Element.Common.Button_Type;
Quit_After : Gnoga.Gui.Element.Form.Check_Box_Type;
QA_LbL : Gnoga.Gui.Element.Form.Label_Type;
function Less (Left : Path_Name; Right : Path_Name) return Boolean is
function Slash_Count (Path : Path_Name) return Natural;
function Slash_Count (Path : Path_Name) return Natural is
Result : Natural := 0;
Path_S : constant String := To_String (Path);
begin -- Slash_Count
All_Chars : for I in Path_S'Range loop
if Path_S (I) = '/' then
Result := Result + 1;
end if;
end loop All_Chars;
return Result;
end Slash_Count;
Count_L : constant Natural := Slash_Count (Left);
Count_R : constant Natural := Slash_Count (Right);
begin -- Less
if Count_L = 0 and Count_R > 0 then
return True;
end if;
if Count_R = 0 and Count_L > 0 then
return False;
end if;
return Left < Right;
end Less;
task DJ is
entry Start;
entry Play;
entry Skip;
entry Quit;
end DJ;
procedure Play_Selected (Object : in out Gnoga.Gui.Base.Base_Type'Class) is
-- Empty;
begin -- Play_Selected
DJ.Play;
exception -- Play_Selected
when E : others =>
Gnoga.Log (Message => "Play_Selected: " & Ada.Exceptions.Exception_Information (E) );
end Play_Selected;
procedure Skip_To_Next (Object : in out Gnoga.Gui.Base.Base_Type'Class) is
-- Empty;
begin -- Skip_To_Next
DJ.Skip;
exception -- Skip_To_Next
when E : others =>
Gnoga.Log (Message => "Skip_To_Next: " & Ada.Exceptions.Exception_Information (E) );
end Skip_To_Next;
procedure Quit_Now (Object : in out Gnoga.Gui.Base.Base_Type'Class) is
-- Empty;
begin -- Quit_Now
DJ.Quit;
delay 0.1;
Gnoga.Application.Singleton.End_Application;
exception -- Quit_Now
when E : others =>
Gnoga.Log (Message => "Quit_Now: " & Ada.Exceptions.Exception_Information (E) );
end Quit_Now;
type Song_Info is record
Position : Positive;
Path : Path_Name;
end record;
package Song_Lists is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Song_Info);
List : Path_Lists.Persistent_Skip_List := Path_Lists.Open_List ("playlist.mpl");
Song : Song_Lists.Vector;
procedure Make_Song_List (List : in out Song_Lists.Vector) is
Position : Natural := 0;
procedure Add_One (Item : in Path_Name) is
-- Empty;
begin -- Add_One
Position := Position + 1;
List.Append (New_Item => (Position => Position, Path => Item) );
Sel.Add_Option (Value => To_String (Item), Text => To_String (Item) );
end Add_One;
procedure Add_All is new Path_Lists.Iterate (Action => Add_One);
begin -- Make_Song_List
List.Clear;
Add_All (List => UI.List);
end Make_Song_List;
procedure Shuffle (List : in out Song_Lists.Vector) is
subtype Index is Integer range 1 .. List.Last_Index;
package Index_Random is new Ada.Numerics.Discrete_Random (Result_Subtype => Index);
Gen : Index_Random.Generator;
J : Index;
T : Song_Info;
begin -- Shuffle
Index_Random.Reset (Gen => Gen);
Swap_All : for I in 1 .. List.Last_Index loop
J := Index_Random.Random (Gen);
T := List.Element (I);
List.Replace_Element (Index => I, New_Item => List.Element (J) );
List.Replace_Element (Index => J, New_Item => T);
end loop Swap_All;
end Shuffle;
procedure Refresh is
-- Empty;
begin -- Refresh
Sel.Empty_Options;
Make_Song_List (List => Song);
Count.Value (Value => Sel.Length);
Shuffle (List => Song);
end Refresh;
procedure Delete_Song (Object : in out Gnoga.Gui.Base.Base_Type'Class) is
Index : constant Natural := Sel.Selected_Index;
Path : Path_Name;
Paused : Boolean := False;
begin -- Delete_Song
if Index = 0 then
return;
end if;
if not Player.Playback_Ended then
Paused := True;
Player.Pause;
end if;
Path := To_Bounded_String (Sel.Text (Index) );
List.Delete (Item => Path);
Refresh;
if Paused then
Player.Play;
end if;
exception -- Delete_Song
when E : others =>
Gnoga.Log (Message => "Delete_Song: " & Ada.Exceptions.Exception_Information (E) );
end Delete_Song;
Current_Directory : constant String := Ada.Directories.Current_Directory;
procedure Browse_Songs (Object : in out Gnoga.Gui.Base.Base_Type'Class) is
Result : constant Gnoga_File_Selection.Result_Info :=
Gnoga_File_Selection.Select_File (Window, Current_Directory);
begin -- Browse_Songs
if Result.Picked then
Get_Name : declare
Name : constant String := Ada.Strings.Unbounded.To_String (Result.Value);
begin -- Get_Name
if Name'Length > Current_Directory'Length and then
Name (Name'First .. Name'First + Current_Directory'Length - 1) = Current_Directory
then
Path.Value (Value => Name (Name'First + Current_Directory'Length + 1 .. Name'Last) );
end if;
end Get_Name;
end if;
end Browse_Songs;
procedure Add_Song (Object : in out Gnoga.Gui.Base.Base_Type'Class) is
Name : constant String := Path.Value;
Path : Path_Name;
Paused : Boolean := False;
begin -- Add_Song
if Name'Length = 0 then
return;
end if;
if not Player.Playback_Ended then
Paused := True;
Player.Pause;
end if;
Path := To_Bounded_String (Name);
List.Insert (Item => Path);
Refresh;
UI.Path.Value (Value => "");
if Paused then
Player.Play;
end if;
exception -- Add_Song
when E : others =>
Gnoga.Log (Message => "Add_Song: " & Ada.Exceptions.Exception_Information (E) );
end Add_Song;
Title : constant String := "MP";
task body DJ is
function Start (Song : in String) return Boolean is -- Returns True if Song started; False otherwise
-- Empty;
begin -- Start
Player.Media_Source (Source => Song);
Window.Document.Title (Value => Title & ' ' & Song);
Wait_For_Ready : for I in 1 .. 10 loop
if Player.Ready_To_Play then
Player.Play;
return True;
end if;
delay 0.01;
end loop Wait_For_Ready;
return False;
end Start;
Current : Song_Info;
Index : Positive := 1;
Run : Boolean := True;
begin -- DJ
Wait_For_Song : loop
exit Wait_For_Song when Song.Last_Index > 0;
select
accept Quit;
Window.Document.Title (Value => Title);
Run := False;
or
delay 1.0;
end select;
end loop Wait_For_Song;
if Run then
accept Start;
Forever : loop
Current := Song.Element (Index);
Sel.Selected (Index => Current.Position);
if Start (To_String (Current.Path) ) then
Wait_For_End : loop
select
accept Play;
exit Wait_For_End when not Start (Sel.Text (Sel.Selected_Index) );
or
accept Skip;
Window.Document.Title (Value => Title);
exit Wait_For_End;
or
accept Quit;
Window.Document.Title (Value => Title);
exit Forever;
or
delay 1.0;
exit Wait_For_End when Player.Playback_Ended;
end select;
end loop Wait_For_End;
end if;
exit Forever when Quit_After.Checked;
Index := Index + 1;
if Index > Song.Last_Index then
Index := 1;
end if;
end loop Forever;
if Quit_After.Checked then
Window.Document.Title (Value => Title);
Gnoga.Application.Singleton.End_Application;
end if;
end if;
exception -- DJ
when E : others =>
Gnoga.Log (Message => "DJ: " & Ada.Exceptions.Exception_Information (E) );
end DJ;
begin -- MP.UI
Gnoga.Application.Title (Name => Title);
Gnoga.Application.HTML_On_Close (HTML => Title & " ended.");
Gnoga.Application.Open_URL (url => "http://localhost:8089/");
Gnoga.Application.Singleton.Initialize (Main_Window => Window, Port => 8089);
View.Create (Parent => Window);
View.Text_Alignment (Value => Gnoga.Gui.Element.Center);
Player.Create (Parent => View, Preload => True);
View.New_Line;
Form.Create (Parent => View);
Form.Text_Alignment (Value => Gnoga.Gui.Element.Center);
Sel.Create (Form => Form, Visible_Lines => 30);
Form.New_Line;
Count.Create (Form => Form);
Count.Editable (Value => False);
Count.Read_Only;
Cnt_Lbl.Create (Form => Form, Label_For => Count, Content => "Number of songs:");
Form.New_Line;
Delete.Create (Parent => Form, Content => "Delete");
Delete.On_Click_Handler (Handler => Delete_Song'Access);
Path.Create (Form => Form, Size => 100);
Browse.Create (Parent => Form, Content => "Browse");
Browse.On_Click_Handler (Handler => Browse_Songs'Access);
Add.Create (Parent => Form, Content => "Add");
Add.On_Click_Handler (Handler => Add_Song'Access);
Form.New_Line;
Play.Create (Parent => Form, Content => "Play");
Play.On_Click_Handler (Handler => Play_Selected'Access);
Skip.Create (Parent => Form, Content => "Skip");
Skip.On_Click_Handler (Handler => Skip_To_Next'Access);
Quit.Create (Parent => Form, Content => "Quit");
Quit.On_Click_Handler (Handler => Quit_Now'Access);
Quit_After.Create (Form => Form);
QA_LbL.Create (Form => Form, Label_For => Quit_After, Content => "Quit after this song", Auto_Place => False);
Refresh;
DJ.Start;
Gnoga.Application.Singleton.Message_Loop;
exception -- MP.UI
when E : others =>
Gnoga.Log (Message => Ada.Exceptions.Exception_Information (E) );
end MP.UI;
|
-----------------------------------------------------------------------
-- escape -- Text Transformations
-- Copyright (C) 2001, 2002, 2003, 2006, 2008, 2009, 2010, 2011 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Strings.Transforms;
with Ada.Text_IO;
with Ada.Command_Line;
with Util.Strings;
procedure Escape is
Count : constant Natural := Ada.Command_Line.Argument_Count;
begin
if Count = 0 then
Ada.Text_IO.Put_Line ("Usage: escape string...");
return;
end if;
for I in 1 .. Count loop
declare
S : constant String := Ada.Command_Line.Argument (I);
begin
Ada.Text_IO.Put_Line ("Escape javascript : "
& Util.Strings.Transforms.Escape_Javascript (S));
Ada.Text_IO.Put_Line ("Escape XML : "
& Util.Strings.Transforms.Escape_Xml (S));
end;
end loop;
end Escape;
|
with System.Storage_Elements;
package body System.Bit_Ops is
pragma Suppress (All_Checks);
use type Storage_Elements.Storage_Element;
use type Storage_Elements.Storage_Offset;
function Bit_Eq (
Left : Address;
Llen : Natural;
Right : Address;
Rlen : Natural)
return Boolean is
begin
if Llen /= Rlen then
return False;
else
declare
type Unsigned is mod 2 ** Integer'Size;
Quotient : constant Storage_Elements.Storage_Count :=
Storage_Elements.Storage_Offset (Llen) / Standard'Storage_Unit;
Remainder : constant Natural :=
Natural (Unsigned (Llen) rem Standard'Storage_Unit);
type Unit_Array is
array (1 .. Quotient) of Storage_Elements.Storage_Element;
L_Units : Unit_Array;
for L_Units'Address use Left;
R_Units : Unit_Array;
for R_Units'Address use Right;
begin
if L_Units /= R_Units then -- compiler will use memcmp
return False;
elsif Remainder /= 0 then
declare
L_Rem : Storage_Elements.Storage_Element;
for L_Rem'Address use Left + Quotient;
R_Rem : Storage_Elements.Storage_Element;
for R_Rem'Address use Right + Quotient;
begin
case Default_Bit_Order is
when High_Order_First =>
declare
Mask : constant Storage_Elements.Storage_Element :=
not (
Storage_Elements.Shift_Left (1, 8 - Remainder)
- 1);
begin
return (L_Rem and Mask) = (R_Rem and Mask);
end;
when Low_Order_First =>
declare
Mask : constant Storage_Elements.Storage_Element :=
Storage_Elements.Shift_Left (1, Remainder) - 1;
begin
return (L_Rem and Mask) = (R_Rem and Mask);
end;
end case;
end;
else
return True;
end if;
end;
end if;
end Bit_Eq;
end System.Bit_Ops;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Elements;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.Utp_Attributes;
with AMF.UML.Read_Structural_Feature_Actions;
with AMF.Visitors.Utp_Iterators;
with AMF.Visitors.Utp_Visitors;
package body AMF.Internals.Utp_Get_Timezone_Actions is
---------------------------------------------
-- Get_Base_Read_Structural_Feature_Action --
---------------------------------------------
overriding function Get_Base_Read_Structural_Feature_Action
(Self : not null access constant Utp_Get_Timezone_Action_Proxy)
return AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access is
begin
return
AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Attributes.Internal_Get_Base_Read_Structural_Feature_Action
(Self.Element)));
end Get_Base_Read_Structural_Feature_Action;
---------------------------------------------
-- Set_Base_Read_Structural_Feature_Action --
---------------------------------------------
overriding procedure Set_Base_Read_Structural_Feature_Action
(Self : not null access Utp_Get_Timezone_Action_Proxy;
To : AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access) is
begin
AMF.Internals.Tables.Utp_Attributes.Internal_Set_Base_Read_Structural_Feature_Action
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Base_Read_Structural_Feature_Action;
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant Utp_Get_Timezone_Action_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.Utp_Visitors.Utp_Visitor'Class then
AMF.Visitors.Utp_Visitors.Utp_Visitor'Class
(Visitor).Enter_Get_Timezone_Action
(AMF.Utp.Get_Timezone_Actions.Utp_Get_Timezone_Action_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant Utp_Get_Timezone_Action_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.Utp_Visitors.Utp_Visitor'Class then
AMF.Visitors.Utp_Visitors.Utp_Visitor'Class
(Visitor).Leave_Get_Timezone_Action
(AMF.Utp.Get_Timezone_Actions.Utp_Get_Timezone_Action_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant Utp_Get_Timezone_Action_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Iterator in AMF.Visitors.Utp_Iterators.Utp_Iterator'Class then
AMF.Visitors.Utp_Iterators.Utp_Iterator'Class
(Iterator).Visit_Get_Timezone_Action
(Visitor,
AMF.Utp.Get_Timezone_Actions.Utp_Get_Timezone_Action_Access (Self),
Control);
end if;
end Visit_Element;
end AMF.Internals.Utp_Get_Timezone_Actions;
|
-- Copyright 2008-2014 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package body Pck is
procedure Do_Nothing (A : System.Address) is
begin
null;
end Do_Nothing;
end Pck;
|
-----------------------------------------------------------------------
-- babel-commands -- Commands for Babel
-- Copyright (C) 2011, 2012 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Text_IO;
with Ada.Command_Line;
with GNAT.Command_Line;
with Util.Log.Loggers;
with Babel.Commands.Save;
package body Babel.Commands is
use Ada.Strings.Unbounded;
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Babel.Commands");
Commands : Command_Maps.Map;
-- ------------------------------
-- Write the command usage.
-- ------------------------------
procedure Usage (Cmd : in Command) is
begin
null;
end Usage;
-- ------------------------------
-- Print a message on the standard output.
-- ------------------------------
procedure Print (Cmd : in Command;
Message : in String) is
pragma Unreferenced (Cmd);
begin
Ada.Text_IO.Put_Line (Message);
end Print;
-- ------------------------------
-- Print dynamo usage
-- ------------------------------
procedure Usage is
use Ada.Text_IO;
begin
-- Put_Line (Gen.Configs.RELEASE);
New_Line;
Put ("Usage: ");
Put (Ada.Command_Line.Command_Name);
Put_Line (" [-v] [-o directory] [-t templates] {command} {arguments}");
Put_Line ("where:");
Put_Line (" -v Print the version, configuration and installation paths");
Put_Line (" -o directory Directory where the Ada mapping files are generated");
Put_Line (" -t templates Directory where the Ada templates are defined");
Put_Line (" -c dir Directory where the Ada templates "
& "and configurations are defined");
end Usage;
-- ------------------------------
-- Print dynamo short usage.
-- ------------------------------
procedure Short_Help_Usage is
use Ada.Text_IO;
begin
New_Line;
Put ("Type '");
Put (Ada.Command_Line.Command_Name);
Put_Line (" help' for the list of commands.");
end Short_Help_Usage;
-- ------------------------------
-- Execute the command with the arguments.
-- ------------------------------
procedure Execute (Cmd : in Help_Command) is
pragma Unreferenced (Cmd);
procedure Print (Position : in Command_Maps.Cursor);
use Ada.Text_IO;
use GNAT.Command_Line;
procedure Print (Position : in Command_Maps.Cursor) is
Name : constant Unbounded_String := Command_Maps.Key (Position);
begin
Put_Line (" " & To_String (Name));
end Print;
Name : constant String := Get_Argument;
begin
Log.Debug ("Execute command {0}", Name);
if Name'Length = 0 then
Usage;
New_Line;
Put ("Type '");
Put (Ada.Command_Line.Command_Name);
Put_Line (" help {command}' for help on a specific command.");
New_Line;
Put_Line ("Available subcommands:");
Commands.Iterate (Process => Print'Access);
else
declare
Target_Cmd : constant Command_Access := Find_Command (Name);
begin
if Target_Cmd = null then
Log.Error ("Unknown command {0}", Name);
else
Target_Cmd.Help;
end if;
end;
end if;
end Execute;
-- ------------------------------
-- Write the help associated with the command.
-- ------------------------------
procedure Help (Cmd : in Help_Command) is
begin
null;
end Help;
-- ------------------------------
-- Register the command under the given name.
-- ------------------------------
procedure Add_Command (Cmd : in Command_Access;
Name : in String) is
begin
Commands.Include (Key => To_Unbounded_String (Name), New_Item => Cmd);
end Add_Command;
-- ------------------------------
-- Find the command having the given name.
-- ------------------------------
function Find_Command (Name : in String) return Command_Access is
Pos : constant Command_Maps.Cursor := Commands.Find (To_Unbounded_String (Name));
begin
if Command_Maps.Has_Element (Pos) then
return Command_Maps.Element (Pos);
else
return null;
end if;
end Find_Command;
-- Save command.
Save_Cmd : aliased Babel.Commands.Save.Command;
-- Help command.
Help_Cmd : aliased Help_Command;
begin
Add_Command (Name => "help", Cmd => Help_Cmd'Access);
Add_Command (Name => "save", Cmd => Save_Cmd'Access);
end Babel.Commands;
|
<?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>zeropad2d_cl_array_array_ap_fixed_32u_config22_s</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>64</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>data_V_data_0_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>data.V.data[0].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>data_V_data_1_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[1].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>data_V_data_2_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[2].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>data_V_data_3_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[3].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_5">
<Value>
<Obj>
<type>1</type>
<id>5</id>
<name>data_V_data_4_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[4].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_6">
<Value>
<Obj>
<type>1</type>
<id>6</id>
<name>data_V_data_5_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[5].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_7">
<Value>
<Obj>
<type>1</type>
<id>7</id>
<name>data_V_data_6_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[6].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_8">
<Value>
<Obj>
<type>1</type>
<id>8</id>
<name>data_V_data_7_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[7].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_9">
<Value>
<Obj>
<type>1</type>
<id>9</id>
<name>data_V_data_8_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[8].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_10">
<Value>
<Obj>
<type>1</type>
<id>10</id>
<name>data_V_data_9_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[9].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_11">
<Value>
<Obj>
<type>1</type>
<id>11</id>
<name>data_V_data_10_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[10].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_12">
<Value>
<Obj>
<type>1</type>
<id>12</id>
<name>data_V_data_11_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[11].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_13">
<Value>
<Obj>
<type>1</type>
<id>13</id>
<name>data_V_data_12_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[12].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_14">
<Value>
<Obj>
<type>1</type>
<id>14</id>
<name>data_V_data_13_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[13].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_15">
<Value>
<Obj>
<type>1</type>
<id>15</id>
<name>data_V_data_14_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[14].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_16">
<Value>
<Obj>
<type>1</type>
<id>16</id>
<name>data_V_data_15_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[15].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_17">
<Value>
<Obj>
<type>1</type>
<id>17</id>
<name>data_V_data_16_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[16].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_18">
<Value>
<Obj>
<type>1</type>
<id>18</id>
<name>data_V_data_17_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[17].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_19">
<Value>
<Obj>
<type>1</type>
<id>19</id>
<name>data_V_data_18_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[18].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_20">
<Value>
<Obj>
<type>1</type>
<id>20</id>
<name>data_V_data_19_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[19].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_21">
<Value>
<Obj>
<type>1</type>
<id>21</id>
<name>data_V_data_20_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[20].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_22">
<Value>
<Obj>
<type>1</type>
<id>22</id>
<name>data_V_data_21_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[21].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_23">
<Value>
<Obj>
<type>1</type>
<id>23</id>
<name>data_V_data_22_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[22].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_24">
<Value>
<Obj>
<type>1</type>
<id>24</id>
<name>data_V_data_23_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[23].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_25">
<Value>
<Obj>
<type>1</type>
<id>25</id>
<name>data_V_data_24_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[24].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_26">
<Value>
<Obj>
<type>1</type>
<id>26</id>
<name>data_V_data_25_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[25].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_27">
<Value>
<Obj>
<type>1</type>
<id>27</id>
<name>data_V_data_26_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[26].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_28">
<Value>
<Obj>
<type>1</type>
<id>28</id>
<name>data_V_data_27_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[27].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_29">
<Value>
<Obj>
<type>1</type>
<id>29</id>
<name>data_V_data_28_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[28].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_30">
<Value>
<Obj>
<type>1</type>
<id>30</id>
<name>data_V_data_29_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[29].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_31">
<Value>
<Obj>
<type>1</type>
<id>31</id>
<name>data_V_data_30_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[30].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_32">
<Value>
<Obj>
<type>1</type>
<id>32</id>
<name>data_V_data_31_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V.data[31].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_33">
<Value>
<Obj>
<type>1</type>
<id>33</id>
<name>res_V_data_0_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[0].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_34">
<Value>
<Obj>
<type>1</type>
<id>34</id>
<name>res_V_data_1_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[1].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_35">
<Value>
<Obj>
<type>1</type>
<id>35</id>
<name>res_V_data_2_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[2].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_36">
<Value>
<Obj>
<type>1</type>
<id>36</id>
<name>res_V_data_3_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[3].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_37">
<Value>
<Obj>
<type>1</type>
<id>37</id>
<name>res_V_data_4_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[4].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_38">
<Value>
<Obj>
<type>1</type>
<id>38</id>
<name>res_V_data_5_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[5].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_39">
<Value>
<Obj>
<type>1</type>
<id>39</id>
<name>res_V_data_6_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[6].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_40">
<Value>
<Obj>
<type>1</type>
<id>40</id>
<name>res_V_data_7_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[7].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_41">
<Value>
<Obj>
<type>1</type>
<id>41</id>
<name>res_V_data_8_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[8].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_42">
<Value>
<Obj>
<type>1</type>
<id>42</id>
<name>res_V_data_9_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[9].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_43">
<Value>
<Obj>
<type>1</type>
<id>43</id>
<name>res_V_data_10_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[10].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_44">
<Value>
<Obj>
<type>1</type>
<id>44</id>
<name>res_V_data_11_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[11].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_45">
<Value>
<Obj>
<type>1</type>
<id>45</id>
<name>res_V_data_12_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[12].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_46">
<Value>
<Obj>
<type>1</type>
<id>46</id>
<name>res_V_data_13_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[13].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_47">
<Value>
<Obj>
<type>1</type>
<id>47</id>
<name>res_V_data_14_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[14].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_48">
<Value>
<Obj>
<type>1</type>
<id>48</id>
<name>res_V_data_15_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[15].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_49">
<Value>
<Obj>
<type>1</type>
<id>49</id>
<name>res_V_data_16_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[16].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_50">
<Value>
<Obj>
<type>1</type>
<id>50</id>
<name>res_V_data_17_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[17].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_51">
<Value>
<Obj>
<type>1</type>
<id>51</id>
<name>res_V_data_18_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[18].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_52">
<Value>
<Obj>
<type>1</type>
<id>52</id>
<name>res_V_data_19_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[19].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_53">
<Value>
<Obj>
<type>1</type>
<id>53</id>
<name>res_V_data_20_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[20].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_54">
<Value>
<Obj>
<type>1</type>
<id>54</id>
<name>res_V_data_21_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[21].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_55">
<Value>
<Obj>
<type>1</type>
<id>55</id>
<name>res_V_data_22_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[22].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_56">
<Value>
<Obj>
<type>1</type>
<id>56</id>
<name>res_V_data_23_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[23].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_57">
<Value>
<Obj>
<type>1</type>
<id>57</id>
<name>res_V_data_24_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[24].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_58">
<Value>
<Obj>
<type>1</type>
<id>58</id>
<name>res_V_data_25_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[25].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_59">
<Value>
<Obj>
<type>1</type>
<id>59</id>
<name>res_V_data_26_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[26].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_60">
<Value>
<Obj>
<type>1</type>
<id>60</id>
<name>res_V_data_27_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[27].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_61">
<Value>
<Obj>
<type>1</type>
<id>61</id>
<name>res_V_data_28_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[28].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_62">
<Value>
<Obj>
<type>1</type>
<id>62</id>
<name>res_V_data_29_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[29].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_63">
<Value>
<Obj>
<type>1</type>
<id>63</id>
<name>res_V_data_30_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[30].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_64">
<Value>
<Obj>
<type>1</type>
<id>64</id>
<name>res_V_data_31_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>res.V.data[31].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>47</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_65">
<Value>
<Obj>
<type>0</type>
<id>129</id>
<name>_ln61</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</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>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>189</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.76</m_delay>
<m_topoIndex>1</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_66">
<Value>
<Obj>
<type>0</type>
<id>131</id>
<name>i1_0</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>i</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>191</item>
<item>192</item>
<item>193</item>
<item>194</item>
</oprand_edges>
<opcode>phi</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="_67">
<Value>
<Obj>
<type>0</type>
<id>132</id>
<name>icmp_ln61</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>195</item>
<item>197</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.42</m_delay>
<m_topoIndex>3</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_68">
<Value>
<Obj>
<type>0</type>
<id>134</id>
<name>i</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>i</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>198</item>
<item>200</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.82</m_delay>
<m_topoIndex>4</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_69">
<Value>
<Obj>
<type>0</type>
<id>135</id>
<name>_ln61</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>201</item>
<item>202</item>
<item>203</item>
</oprand_edges>
<opcode>br</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="_70">
<Value>
<Obj>
<type>0</type>
<id>139</id>
<name>_ln65</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>65</lineNumber>
<contextFuncName>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>65</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>204</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.76</m_delay>
<m_topoIndex>6</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_71">
<Value>
<Obj>
<type>0</type>
<id>141</id>
<name>j3_0</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>j</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>205</item>
<item>206</item>
<item>207</item>
<item>208</item>
</oprand_edges>
<opcode>phi</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="_72">
<Value>
<Obj>
<type>0</type>
<id>142</id>
<name>icmp_ln65</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>65</lineNumber>
<contextFuncName>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>65</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>209</item>
<item>210</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.42</m_delay>
<m_topoIndex>9</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_73">
<Value>
<Obj>
<type>0</type>
<id>144</id>
<name>j</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>65</lineNumber>
<contextFuncName>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>65</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>j</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>211</item>
<item>212</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.82</m_delay>
<m_topoIndex>10</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_74">
<Value>
<Obj>
<type>0</type>
<id>145</id>
<name>_ln65</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>65</lineNumber>
<contextFuncName>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>65</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>213</item>
<item>214</item>
<item>215</item>
</oprand_edges>
<opcode>br</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>11</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_75">
<Value>
<Obj>
<type>0</type>
<id>148</id>
<name>empty_48</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>256</bitwidth>
</Value>
<oprand_edges>
<count>33</count>
<item_version>0</item_version>
<item>217</item>
<item>218</item>
<item>219</item>
<item>220</item>
<item>221</item>
<item>222</item>
<item>223</item>
<item>224</item>
<item>225</item>
<item>226</item>
<item>227</item>
<item>228</item>
<item>229</item>
<item>230</item>
<item>231</item>
<item>232</item>
<item>233</item>
<item>234</item>
<item>235</item>
<item>236</item>
<item>237</item>
<item>238</item>
<item>239</item>
<item>240</item>
<item>241</item>
<item>242</item>
<item>243</item>
<item>244</item>
<item>245</item>
<item>246</item>
<item>247</item>
<item>248</item>
<item>249</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>3.63</m_delay>
<m_topoIndex>12</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_76">
<Value>
<Obj>
<type>0</type>
<id>149</id>
<name>tmp_data_0_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[0].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>250</item>
</oprand_edges>
<opcode>extractvalue</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>13</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_77">
<Value>
<Obj>
<type>0</type>
<id>150</id>
<name>tmp_data_1_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[1].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>251</item>
</oprand_edges>
<opcode>extractvalue</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>14</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_78">
<Value>
<Obj>
<type>0</type>
<id>151</id>
<name>tmp_data_2_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[2].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>252</item>
</oprand_edges>
<opcode>extractvalue</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>15</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_79">
<Value>
<Obj>
<type>0</type>
<id>152</id>
<name>tmp_data_3_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[3].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>253</item>
</oprand_edges>
<opcode>extractvalue</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>16</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_80">
<Value>
<Obj>
<type>0</type>
<id>153</id>
<name>tmp_data_4_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[4].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>254</item>
</oprand_edges>
<opcode>extractvalue</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>17</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_81">
<Value>
<Obj>
<type>0</type>
<id>154</id>
<name>tmp_data_5_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[5].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>255</item>
</oprand_edges>
<opcode>extractvalue</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>18</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_82">
<Value>
<Obj>
<type>0</type>
<id>155</id>
<name>tmp_data_6_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[6].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>256</item>
</oprand_edges>
<opcode>extractvalue</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>19</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_83">
<Value>
<Obj>
<type>0</type>
<id>156</id>
<name>tmp_data_7_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[7].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>257</item>
</oprand_edges>
<opcode>extractvalue</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>20</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_84">
<Value>
<Obj>
<type>0</type>
<id>157</id>
<name>tmp_data_8_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[8].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>258</item>
</oprand_edges>
<opcode>extractvalue</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>21</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_85">
<Value>
<Obj>
<type>0</type>
<id>158</id>
<name>tmp_data_9_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[9].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>259</item>
</oprand_edges>
<opcode>extractvalue</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>22</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_86">
<Value>
<Obj>
<type>0</type>
<id>159</id>
<name>tmp_data_10_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[10].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>260</item>
</oprand_edges>
<opcode>extractvalue</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>23</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_87">
<Value>
<Obj>
<type>0</type>
<id>160</id>
<name>tmp_data_11_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[11].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>261</item>
</oprand_edges>
<opcode>extractvalue</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>24</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_88">
<Value>
<Obj>
<type>0</type>
<id>161</id>
<name>tmp_data_12_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[12].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>262</item>
</oprand_edges>
<opcode>extractvalue</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>25</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_89">
<Value>
<Obj>
<type>0</type>
<id>162</id>
<name>tmp_data_13_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[13].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>263</item>
</oprand_edges>
<opcode>extractvalue</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>26</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_90">
<Value>
<Obj>
<type>0</type>
<id>163</id>
<name>tmp_data_14_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[14].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>264</item>
</oprand_edges>
<opcode>extractvalue</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>27</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_91">
<Value>
<Obj>
<type>0</type>
<id>164</id>
<name>tmp_data_15_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[15].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>265</item>
</oprand_edges>
<opcode>extractvalue</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>28</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_92">
<Value>
<Obj>
<type>0</type>
<id>165</id>
<name>tmp_data_16_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[16].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>266</item>
</oprand_edges>
<opcode>extractvalue</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>29</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_93">
<Value>
<Obj>
<type>0</type>
<id>166</id>
<name>tmp_data_17_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[17].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>267</item>
</oprand_edges>
<opcode>extractvalue</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>30</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_94">
<Value>
<Obj>
<type>0</type>
<id>167</id>
<name>tmp_data_18_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[18].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>268</item>
</oprand_edges>
<opcode>extractvalue</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>31</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_95">
<Value>
<Obj>
<type>0</type>
<id>168</id>
<name>tmp_data_19_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[19].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>269</item>
</oprand_edges>
<opcode>extractvalue</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>32</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_96">
<Value>
<Obj>
<type>0</type>
<id>169</id>
<name>tmp_data_20_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[20].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>270</item>
</oprand_edges>
<opcode>extractvalue</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>33</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_97">
<Value>
<Obj>
<type>0</type>
<id>170</id>
<name>tmp_data_21_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[21].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>271</item>
</oprand_edges>
<opcode>extractvalue</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>34</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_98">
<Value>
<Obj>
<type>0</type>
<id>171</id>
<name>tmp_data_22_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[22].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>272</item>
</oprand_edges>
<opcode>extractvalue</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>35</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_99">
<Value>
<Obj>
<type>0</type>
<id>172</id>
<name>tmp_data_23_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[23].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>273</item>
</oprand_edges>
<opcode>extractvalue</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>36</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_100">
<Value>
<Obj>
<type>0</type>
<id>173</id>
<name>tmp_data_24_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[24].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>274</item>
</oprand_edges>
<opcode>extractvalue</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>37</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_101">
<Value>
<Obj>
<type>0</type>
<id>174</id>
<name>tmp_data_25_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[25].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>275</item>
</oprand_edges>
<opcode>extractvalue</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>38</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_102">
<Value>
<Obj>
<type>0</type>
<id>175</id>
<name>tmp_data_26_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[26].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>276</item>
</oprand_edges>
<opcode>extractvalue</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>39</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_103">
<Value>
<Obj>
<type>0</type>
<id>176</id>
<name>tmp_data_27_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[27].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>277</item>
</oprand_edges>
<opcode>extractvalue</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>40</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_104">
<Value>
<Obj>
<type>0</type>
<id>177</id>
<name>tmp_data_28_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[28].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>278</item>
</oprand_edges>
<opcode>extractvalue</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>41</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_105">
<Value>
<Obj>
<type>0</type>
<id>178</id>
<name>tmp_data_29_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[29].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>279</item>
</oprand_edges>
<opcode>extractvalue</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>42</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_106">
<Value>
<Obj>
<type>0</type>
<id>179</id>
<name>tmp_data_30_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[30].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>280</item>
</oprand_edges>
<opcode>extractvalue</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>43</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_107">
<Value>
<Obj>
<type>0</type>
<id>180</id>
<name>tmp_data_31_V</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>22</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>22</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.data[31].V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>281</item>
</oprand_edges>
<opcode>extractvalue</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>44</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_108">
<Value>
<Obj>
<type>0</type>
<id>181</id>
<name>res_V_data_0_V_write_ln28</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>28</lineNumber>
<contextFuncName>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>fill_data&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>28</second>
</item>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>66</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>65</count>
<item_version>0</item_version>
<item>283</item>
<item>284</item>
<item>285</item>
<item>286</item>
<item>287</item>
<item>288</item>
<item>289</item>
<item>290</item>
<item>291</item>
<item>292</item>
<item>293</item>
<item>294</item>
<item>295</item>
<item>296</item>
<item>297</item>
<item>298</item>
<item>299</item>
<item>300</item>
<item>301</item>
<item>302</item>
<item>303</item>
<item>304</item>
<item>305</item>
<item>306</item>
<item>307</item>
<item>308</item>
<item>309</item>
<item>310</item>
<item>311</item>
<item>312</item>
<item>313</item>
<item>314</item>
<item>315</item>
<item>316</item>
<item>317</item>
<item>318</item>
<item>319</item>
<item>320</item>
<item>321</item>
<item>322</item>
<item>323</item>
<item>324</item>
<item>325</item>
<item>326</item>
<item>327</item>
<item>328</item>
<item>329</item>
<item>330</item>
<item>331</item>
<item>332</item>
<item>333</item>
<item>334</item>
<item>335</item>
<item>336</item>
<item>337</item>
<item>338</item>
<item>339</item>
<item>340</item>
<item>341</item>
<item>342</item>
<item>343</item>
<item>344</item>
<item>345</item>
<item>346</item>
<item>347</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>3.63</m_delay>
<m_topoIndex>45</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_109">
<Value>
<Obj>
<type>0</type>
<id>182</id>
<name>_ln65</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>65</lineNumber>
<contextFuncName>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>65</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>348</item>
</oprand_edges>
<opcode>br</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>46</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_110">
<Value>
<Obj>
<type>0</type>
<id>185</id>
<name>_ln61</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>349</item>
</oprand_edges>
<opcode>br</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>47</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_111">
<Value>
<Obj>
<type>0</type>
<id>187</id>
<name>_ln78</name>
<fileName>firmware/nnet_utils/nnet_padding_stream.h</fileName>
<fileDirectory>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</fileDirectory>
<lineNumber>78</lineNumber>
<contextFuncName>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/data/armita/Andy/platform_ml_models/eembc/CIFAR10_ResNetv1/my-hls-test-quantized-tiny2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_padding_stream.h</first>
<second>zeropad2d_cl&lt;nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, nnet::array&lt;ap_fixed&lt;8, 3, 0, 0, 0&gt;, 32&gt;, config22&gt;</second>
</first>
<second>78</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>7</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="_112">
<Value>
<Obj>
<type>2</type>
<id>190</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_113">
<Value>
<Obj>
<type>2</type>
<id>196</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<const_type>0</const_type>
<content>32</content>
</item>
<item class_id_reference="16" object_id="_114">
<Value>
<Obj>
<type>2</type>
<id>199</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</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="_115">
<Obj>
<type>3</type>
<id>130</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>129</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_116">
<Obj>
<type>3</type>
<id>136</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>131</item>
<item>132</item>
<item>134</item>
<item>135</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_117">
<Obj>
<type>3</type>
<id>140</id>
<name>PadMain_begin</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>139</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_118">
<Obj>
<type>3</type>
<id>146</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>141</item>
<item>142</item>
<item>144</item>
<item>145</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_119">
<Obj>
<type>3</type>
<id>183</id>
<name>fill_data<array<ap_fixed<8, 3, 0, 0, 0>, 32u>, array<ap_fixed<8, 3, 0, 0, 0>, 32u>, config22>.exit</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>35</count>
<item_version>0</item_version>
<item>148</item>
<item>149</item>
<item>150</item>
<item>151</item>
<item>152</item>
<item>153</item>
<item>154</item>
<item>155</item>
<item>156</item>
<item>157</item>
<item>158</item>
<item>159</item>
<item>160</item>
<item>161</item>
<item>162</item>
<item>163</item>
<item>164</item>
<item>165</item>
<item>166</item>
<item>167</item>
<item>168</item>
<item>169</item>
<item>170</item>
<item>171</item>
<item>172</item>
<item>173</item>
<item>174</item>
<item>175</item>
<item>176</item>
<item>177</item>
<item>178</item>
<item>179</item>
<item>180</item>
<item>181</item>
<item>182</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_120">
<Obj>
<type>3</type>
<id>186</id>
<name>PadMain_end</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>185</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_121">
<Obj>
<type>3</type>
<id>188</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>187</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>162</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_122">
<id>189</id>
<edge_type>2</edge_type>
<source_obj>136</source_obj>
<sink_obj>129</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_123">
<id>191</id>
<edge_type>1</edge_type>
<source_obj>190</source_obj>
<sink_obj>131</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_124">
<id>192</id>
<edge_type>2</edge_type>
<source_obj>130</source_obj>
<sink_obj>131</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_125">
<id>193</id>
<edge_type>1</edge_type>
<source_obj>134</source_obj>
<sink_obj>131</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_126">
<id>194</id>
<edge_type>2</edge_type>
<source_obj>186</source_obj>
<sink_obj>131</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_127">
<id>195</id>
<edge_type>1</edge_type>
<source_obj>131</source_obj>
<sink_obj>132</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_128">
<id>197</id>
<edge_type>1</edge_type>
<source_obj>196</source_obj>
<sink_obj>132</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_129">
<id>198</id>
<edge_type>1</edge_type>
<source_obj>131</source_obj>
<sink_obj>134</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_130">
<id>200</id>
<edge_type>1</edge_type>
<source_obj>199</source_obj>
<sink_obj>134</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_131">
<id>201</id>
<edge_type>1</edge_type>
<source_obj>132</source_obj>
<sink_obj>135</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_132">
<id>202</id>
<edge_type>2</edge_type>
<source_obj>140</source_obj>
<sink_obj>135</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_133">
<id>203</id>
<edge_type>2</edge_type>
<source_obj>188</source_obj>
<sink_obj>135</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_134">
<id>204</id>
<edge_type>2</edge_type>
<source_obj>146</source_obj>
<sink_obj>139</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_135">
<id>205</id>
<edge_type>1</edge_type>
<source_obj>190</source_obj>
<sink_obj>141</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_136">
<id>206</id>
<edge_type>2</edge_type>
<source_obj>140</source_obj>
<sink_obj>141</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_137">
<id>207</id>
<edge_type>1</edge_type>
<source_obj>144</source_obj>
<sink_obj>141</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_138">
<id>208</id>
<edge_type>2</edge_type>
<source_obj>183</source_obj>
<sink_obj>141</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_139">
<id>209</id>
<edge_type>1</edge_type>
<source_obj>141</source_obj>
<sink_obj>142</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_140">
<id>210</id>
<edge_type>1</edge_type>
<source_obj>196</source_obj>
<sink_obj>142</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_141">
<id>211</id>
<edge_type>1</edge_type>
<source_obj>141</source_obj>
<sink_obj>144</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_142">
<id>212</id>
<edge_type>1</edge_type>
<source_obj>199</source_obj>
<sink_obj>144</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_143">
<id>213</id>
<edge_type>1</edge_type>
<source_obj>142</source_obj>
<sink_obj>145</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_144">
<id>214</id>
<edge_type>2</edge_type>
<source_obj>183</source_obj>
<sink_obj>145</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_145">
<id>215</id>
<edge_type>2</edge_type>
<source_obj>186</source_obj>
<sink_obj>145</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_146">
<id>218</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_147">
<id>219</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_148">
<id>220</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_149">
<id>221</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_150">
<id>222</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_151">
<id>223</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_152">
<id>224</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_153">
<id>225</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_154">
<id>226</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_155">
<id>227</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_156">
<id>228</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_157">
<id>229</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_158">
<id>230</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_159">
<id>231</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_160">
<id>232</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_161">
<id>233</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_162">
<id>234</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_163">
<id>235</id>
<edge_type>1</edge_type>
<source_obj>18</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_164">
<id>236</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_165">
<id>237</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_166">
<id>238</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_167">
<id>239</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_168">
<id>240</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_169">
<id>241</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_170">
<id>242</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_171">
<id>243</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_172">
<id>244</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_173">
<id>245</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_174">
<id>246</id>
<edge_type>1</edge_type>
<source_obj>29</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_175">
<id>247</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_176">
<id>248</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_177">
<id>249</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>148</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_178">
<id>250</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>149</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_179">
<id>251</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>150</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_180">
<id>252</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>151</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_181">
<id>253</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>152</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_182">
<id>254</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>153</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_183">
<id>255</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>154</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_184">
<id>256</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>155</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_185">
<id>257</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>156</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_186">
<id>258</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>157</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_187">
<id>259</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>158</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_188">
<id>260</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>159</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_189">
<id>261</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>160</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_190">
<id>262</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>161</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_191">
<id>263</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>162</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_192">
<id>264</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>163</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_193">
<id>265</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>164</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_194">
<id>266</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>165</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_195">
<id>267</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>166</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_196">
<id>268</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>167</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_197">
<id>269</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>168</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_198">
<id>270</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>169</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_199">
<id>271</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>170</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_200">
<id>272</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>171</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_201">
<id>273</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>172</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_202">
<id>274</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>173</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_203">
<id>275</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>174</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_204">
<id>276</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>175</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_205">
<id>277</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>176</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_206">
<id>278</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>177</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_207">
<id>279</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>178</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_208">
<id>280</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>179</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_209">
<id>281</id>
<edge_type>1</edge_type>
<source_obj>148</source_obj>
<sink_obj>180</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_210">
<id>284</id>
<edge_type>1</edge_type>
<source_obj>33</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_211">
<id>285</id>
<edge_type>1</edge_type>
<source_obj>34</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_212">
<id>286</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_213">
<id>287</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_214">
<id>288</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_215">
<id>289</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_216">
<id>290</id>
<edge_type>1</edge_type>
<source_obj>39</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_217">
<id>291</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_218">
<id>292</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_219">
<id>293</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_220">
<id>294</id>
<edge_type>1</edge_type>
<source_obj>43</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_221">
<id>295</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_222">
<id>296</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_223">
<id>297</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_224">
<id>298</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_225">
<id>299</id>
<edge_type>1</edge_type>
<source_obj>48</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_226">
<id>300</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_227">
<id>301</id>
<edge_type>1</edge_type>
<source_obj>50</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_228">
<id>302</id>
<edge_type>1</edge_type>
<source_obj>51</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_229">
<id>303</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_230">
<id>304</id>
<edge_type>1</edge_type>
<source_obj>53</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_231">
<id>305</id>
<edge_type>1</edge_type>
<source_obj>54</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_232">
<id>306</id>
<edge_type>1</edge_type>
<source_obj>55</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_233">
<id>307</id>
<edge_type>1</edge_type>
<source_obj>56</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_234">
<id>308</id>
<edge_type>1</edge_type>
<source_obj>57</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_235">
<id>309</id>
<edge_type>1</edge_type>
<source_obj>58</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_236">
<id>310</id>
<edge_type>1</edge_type>
<source_obj>59</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_237">
<id>311</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_238">
<id>312</id>
<edge_type>1</edge_type>
<source_obj>61</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_239">
<id>313</id>
<edge_type>1</edge_type>
<source_obj>62</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_240">
<id>314</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_241">
<id>315</id>
<edge_type>1</edge_type>
<source_obj>64</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_242">
<id>316</id>
<edge_type>1</edge_type>
<source_obj>149</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_243">
<id>317</id>
<edge_type>1</edge_type>
<source_obj>150</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_244">
<id>318</id>
<edge_type>1</edge_type>
<source_obj>151</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_245">
<id>319</id>
<edge_type>1</edge_type>
<source_obj>152</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_246">
<id>320</id>
<edge_type>1</edge_type>
<source_obj>153</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_247">
<id>321</id>
<edge_type>1</edge_type>
<source_obj>154</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_248">
<id>322</id>
<edge_type>1</edge_type>
<source_obj>155</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_249">
<id>323</id>
<edge_type>1</edge_type>
<source_obj>156</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_250">
<id>324</id>
<edge_type>1</edge_type>
<source_obj>157</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_251">
<id>325</id>
<edge_type>1</edge_type>
<source_obj>158</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_252">
<id>326</id>
<edge_type>1</edge_type>
<source_obj>159</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_253">
<id>327</id>
<edge_type>1</edge_type>
<source_obj>160</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_254">
<id>328</id>
<edge_type>1</edge_type>
<source_obj>161</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_255">
<id>329</id>
<edge_type>1</edge_type>
<source_obj>162</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_256">
<id>330</id>
<edge_type>1</edge_type>
<source_obj>163</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_257">
<id>331</id>
<edge_type>1</edge_type>
<source_obj>164</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_258">
<id>332</id>
<edge_type>1</edge_type>
<source_obj>165</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_259">
<id>333</id>
<edge_type>1</edge_type>
<source_obj>166</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_260">
<id>334</id>
<edge_type>1</edge_type>
<source_obj>167</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_261">
<id>335</id>
<edge_type>1</edge_type>
<source_obj>168</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_262">
<id>336</id>
<edge_type>1</edge_type>
<source_obj>169</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_263">
<id>337</id>
<edge_type>1</edge_type>
<source_obj>170</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_264">
<id>338</id>
<edge_type>1</edge_type>
<source_obj>171</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_265">
<id>339</id>
<edge_type>1</edge_type>
<source_obj>172</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_266">
<id>340</id>
<edge_type>1</edge_type>
<source_obj>173</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_267">
<id>341</id>
<edge_type>1</edge_type>
<source_obj>174</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_268">
<id>342</id>
<edge_type>1</edge_type>
<source_obj>175</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_269">
<id>343</id>
<edge_type>1</edge_type>
<source_obj>176</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_270">
<id>344</id>
<edge_type>1</edge_type>
<source_obj>177</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_271">
<id>345</id>
<edge_type>1</edge_type>
<source_obj>178</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_272">
<id>346</id>
<edge_type>1</edge_type>
<source_obj>179</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_273">
<id>347</id>
<edge_type>1</edge_type>
<source_obj>180</source_obj>
<sink_obj>181</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_274">
<id>348</id>
<edge_type>2</edge_type>
<source_obj>146</source_obj>
<sink_obj>182</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_275">
<id>349</id>
<edge_type>2</edge_type>
<source_obj>136</source_obj>
<sink_obj>185</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_276">
<id>1472</id>
<edge_type>2</edge_type>
<source_obj>130</source_obj>
<sink_obj>136</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_277">
<id>1473</id>
<edge_type>2</edge_type>
<source_obj>136</source_obj>
<sink_obj>188</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_278">
<id>1474</id>
<edge_type>2</edge_type>
<source_obj>136</source_obj>
<sink_obj>140</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_279">
<id>1475</id>
<edge_type>2</edge_type>
<source_obj>140</source_obj>
<sink_obj>146</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_280">
<id>1476</id>
<edge_type>2</edge_type>
<source_obj>146</source_obj>
<sink_obj>186</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_281">
<id>1477</id>
<edge_type>2</edge_type>
<source_obj>146</source_obj>
<sink_obj>183</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_282">
<id>1478</id>
<edge_type>2</edge_type>
<source_obj>183</source_obj>
<sink_obj>146</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_283">
<id>1479</id>
<edge_type>2</edge_type>
<source_obj>186</source_obj>
<sink_obj>136</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_284">
<mId>1</mId>
<mTag>zeropad2d_cl<array,array<ap_fixed,32u>,config22></mTag>
<mType>0</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>7</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>1089</mMinLatency>
<mMaxLatency>1089</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_285">
<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>130</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_286">
<mId>3</mId>
<mTag>PadMain</mTag>
<mType>1</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>4</item>
<item>5</item>
<item>6</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>32</mMinTripCount>
<mMaxTripCount>32</mMaxTripCount>
<mMinLatency>1088</mMinLatency>
<mMaxLatency>1088</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_287">
<mId>4</mId>
<mTag>Region 1</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>136</item>
<item>140</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_288">
<mId>5</mId>
<mTag>CopyMain</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>146</item>
<item>183</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>32</mMinTripCount>
<mMaxTripCount>32</mMaxTripCount>
<mMinLatency>32</mMinLatency>
<mMaxLatency>32</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_289">
<mId>6</mId>
<mTag>Region 2</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>186</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_290">
<mId>7</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>188</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</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>47</count>
<item_version>0</item_version>
<item class_id="27" tracking_level="0" version="0">
<first>129</first>
<second class_id="28" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>131</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>132</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>134</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>135</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>139</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>141</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>142</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>144</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>145</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>148</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>149</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>150</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>151</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>152</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>153</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>154</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>155</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>156</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>157</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>158</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>159</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>160</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>161</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>162</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>163</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>164</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>165</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>166</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>167</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>168</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>169</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>170</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>171</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>172</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>173</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>174</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>175</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>176</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>177</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>178</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>179</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>180</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>181</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>182</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>185</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>187</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>7</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="0" version="0">
<first>130</first>
<second class_id="31" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>136</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>140</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>146</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>183</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>186</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>188</first>
<second>
<first>1</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>
|
package body System.Assertions is
procedure Ewok_Debug_Alert (S : String)
with
Convention => Ada,
Import => True,
External_name => "ewok_debug_alert";
procedure Ewok_Debug_Newline
with
Convention => Ada,
Import => True,
External_name => "ewok_debug_newline";
--------------------------
-- Raise_Assert_Failure --
--------------------------
procedure Raise_Assert_Failure (Msg : String) is
begin
Ewok_Debug_Alert (Msg);
Ewok_Debug_Newline;
loop
null;
end loop;
end Raise_Assert_Failure;
end System.Assertions;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ADA.STRINGS.WIDE_WIDE_UNBOUNDED.WIDE_WIDE_TEXT_IO --
-- --
-- S p e c --
-- --
-- Copyright (C) 1997-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This child package of Ada.Strings.Wide_Wide_Unbounded provides specialized
-- Wide_Wide_Text_IO routines that work directly with unbounded wide wide
-- strings, avoiding the inefficiencies of access via the standard interface,
-- and also taking direct advantage of the variable length semantics of these
-- strings.
with Ada.Wide_Wide_Text_IO;
package Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO is
function Get_Line
return Unbounded_Wide_Wide_String;
function Get_Line
(File : Ada.Wide_Wide_Text_IO.File_Type)
return Unbounded_Wide_Wide_String;
-- Reads up to the end of the current line, returning the result
-- as an unbounded string of appropriate length. If no File parameter
-- is present, input is from Current_Input.
procedure Get_Line
(File : Ada.Wide_Wide_Text_IO.File_Type;
Item : out Unbounded_Wide_Wide_String);
procedure Get_Line (Item : out Unbounded_Wide_Wide_String);
-- Similar to the above, but in procedure form with an out parameter
procedure Put
(U : Unbounded_Wide_Wide_String);
procedure Put
(File : Ada.Wide_Wide_Text_IO.File_Type;
U : Unbounded_Wide_Wide_String);
procedure Put_Line
(U : Unbounded_Wide_Wide_String);
procedure Put_Line
(File : Ada.Wide_Wide_Text_IO.File_Type;
U : Unbounded_Wide_Wide_String);
-- These are equivalent to the standard Wide_Wide_Text_IO routines passed
-- the value To_Wide_Wide_String (U), but operate more efficiently,
-- because the extra copy of the argument is avoided.
end Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO;
|
-----------------------------------------------------------------------
-- awa-wikis-beans -- Beans for module wikis
-- Copyright (C) 2015, 2016 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Strings.Unbounded;
with Ada.Strings.Hash;
with Ada.Strings.Wide_Wide_Unbounded;
with Ada.Strings.Wide_Wide_Hash;
with Ada.Containers.Indefinite_Hashed_Maps;
with Util.Beans.Basic;
with Util.Beans.Objects;
with ADO;
with ADO.Objects;
with ASF.Helpers.Beans;
with Wiki.Strings;
with Wiki.Attributes;
with Wiki.Plugins.Templates;
with Wiki.Plugins.Conditions;
with AWA.Wikis.Modules;
with AWA.Wikis.Models;
with AWA.Tags.Beans;
with AWA.Counters.Beans;
with AWA.Components.Wikis;
-- == Ada Beans ==
-- Several bean types are provided to represent and manage the blogs and their posts.
-- The blog module registers the bean constructors when it is initialized.
-- To use them, one must declare a bean definition in the application XML configuration.
--
-- @include-bean wikis.xml
-- @include-bean wiki-page.xml
-- @include-bean wiki-pages.xml
-- @include-bean wiki-history.xml
-- @include-bean wiki-list.xml
package AWA.Wikis.Beans is
use Ada.Strings.Wide_Wide_Unbounded;
package Image_Info_Maps is
new Ada.Containers.Indefinite_Hashed_Maps (Key_Type => Wiki.Strings.WString,
Element_Type => Wikis.Models.Wiki_Image_Info,
Hash => Ada.Strings.Wide_Wide_Hash,
Equivalent_Keys => "=",
"=" => AWA.Wikis.Models."=");
package Template_Maps is
new Ada.Containers.Indefinite_Hashed_Maps (Key_Type => String,
Element_Type => Wiki.Strings.UString,
Hash => Ada.Strings.Hash,
Equivalent_Keys => "=",
"=" => "=");
type Wiki_Links_Bean is new AWA.Components.Wikis.Link_Renderer_Bean
and Util.Beans.Basic.List_Bean with record
-- The wiki space identifier.
Wiki_Space_Id : ADO.Identifier;
Images : Image_Info_Maps.Map;
-- The info bean used for the list iterator.
Info : aliased AWA.Wikis.Models.Wiki_Image_Info;
Info_Bean : Util.Beans.Basic.Readonly_Bean_Access;
-- Current index when iterating over the list.
Pos : Image_Info_Maps.Cursor;
end record;
procedure Make_Image_Link (Renderer : in out Wiki_Links_Bean;
Link : in Wiki.Strings.WString;
Info : in AWA.Wikis.Models.Wiki_Image_Info;
URI : out Unbounded_Wide_Wide_String;
Width : in out Natural;
Height : in out Natural);
procedure Find_Image_Link (Renderer : in out Wiki_Links_Bean;
Link : in Wiki.Strings.WString;
URI : out Unbounded_Wide_Wide_String;
Width : in out Natural;
Height : in out Natural);
-- Get the image link that must be rendered from the wiki image link.
overriding
procedure Make_Image_Link (Renderer : in out Wiki_Links_Bean;
Link : in Wiki.Strings.WString;
URI : out Unbounded_Wide_Wide_String;
Width : in out Natural;
Height : in out Natural);
-- Get the page link that must be rendered from the wiki page link.
overriding
procedure Make_Page_Link (Renderer : in out Wiki_Links_Bean;
Link : in Wiki.Strings.WString;
URI : out Unbounded_Wide_Wide_String;
Exists : out Boolean);
-- Get the value identified by the name.
overriding
function Get_Value (From : in Wiki_Links_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Get the number of elements in the list.
overriding
function Get_Count (From : Wiki_Links_Bean) return Natural;
-- Set the current row index. Valid row indexes start at 1.
overriding
procedure Set_Row_Index (From : in out Wiki_Links_Bean;
Index : in Natural);
-- Get the element at the current row index.
overriding
function Get_Row (From : in Wiki_Links_Bean) return Util.Beans.Objects.Object;
-- The Wiki template plugin that retrieves the template content from the Wiki space.
type Wiki_Template_Bean is new Wiki.Plugins.Templates.Template_Plugin
and Wiki.Plugins.Plugin_Factory
and Util.Beans.Basic.List_Bean with record
-- The wiki space identifier.
Wiki_Space_Id : ADO.Identifier;
-- The list of templates that have been loaded.
Templates : Template_Maps.Map;
-- Condition plugin.
Condition : aliased Wiki.Plugins.Conditions.Condition_Plugin;
-- The info bean used for the list iterator.
Info : aliased AWA.Wikis.Models.Wiki_Info;
Info_Bean : Util.Beans.Basic.Readonly_Bean_Access;
-- Current index when iterating over the list.
Pos : Template_Maps.Cursor;
end record;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Wiki_Template_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Get the number of elements in the list.
overriding
function Get_Count (From : Wiki_Template_Bean) return Natural;
-- Set the current row index. Valid row indexes start at 1.
overriding
procedure Set_Row_Index (From : in out Wiki_Template_Bean;
Index : in Natural);
-- Get the element at the current row index.
overriding
function Get_Row (From : in Wiki_Template_Bean) return Util.Beans.Objects.Object;
-- Get the template content for the plugin evaluation.
overriding
procedure Get_Template (Plugin : in out Wiki_Template_Bean;
Params : in out Wiki.Attributes.Attribute_List;
Template : out Wiki.Strings.UString);
-- Find a plugin knowing its name.
overriding
function Find (Factory : in Wiki_Template_Bean;
Name : in String) return Wiki.Plugins.Wiki_Plugin_Access;
type Wiki_Space_Bean is new AWA.Wikis.Models.Wiki_Space_Bean with record
Module : Modules.Wiki_Module_Access := null;
-- List of tags associated with the question.
Tags : aliased AWA.Tags.Beans.Tag_List_Bean;
Tags_Bean : Util.Beans.Basic.Readonly_Bean_Access;
end record;
type Wiki_Space_Bean_Access is access all Wiki_Space_Bean'Class;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Wiki_Space_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Wiki_Space_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
-- Create or save the wiki space.
overriding
procedure Save (Bean : in out Wiki_Space_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Load the wiki space information.
overriding
procedure Load (Bean : in out Wiki_Space_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Delete the wiki space.
procedure Delete (Bean : in out Wiki_Space_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the Wiki_Space_Bean bean instance.
function Create_Wiki_Space_Bean (Module : in AWA.Wikis.Modules.Wiki_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
function Get_Wiki_Space_Bean is
new ASF.Helpers.Beans.Get_Bean (Element_Type => Wiki_Space_Bean,
Element_Access => Wiki_Space_Bean_Access);
type Wiki_View_Bean is new AWA.Wikis.Models.Wiki_View_Info with record
-- The wiki module instance.
Module : Modules.Wiki_Module_Access := null;
-- The wiki space identifier.
Wiki_Space : Wiki_Space_Bean_Access;
-- List of tags associated with the wiki page.
Tags : aliased AWA.Tags.Beans.Tag_List_Bean;
Tags_Bean : Util.Beans.Basic.Readonly_Bean_Access;
-- The read page counter associated with the wiki page.
Counter : aliased AWA.Counters.Beans.Counter_Bean (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => Models.WIKI_PAGE_TABLE);
Counter_Bean : Util.Beans.Basic.Readonly_Bean_Access;
-- The wiki page links.
Links : aliased Wiki_Links_Bean;
Links_Bean : Util.Beans.Basic.Readonly_Bean_Access;
-- The wiki plugins.
Plugins : aliased Wiki_Template_Bean;
Plugins_Bean : Util.Beans.Basic.Readonly_Bean_Access;
end record;
type Wiki_View_Bean_Access is access all Wiki_View_Bean'Class;
-- Set the wiki identifier.
procedure Set_Wiki_Id (Into : in out Wiki_View_Bean;
Id : in ADO.Identifier);
-- Get the value identified by the name.
overriding
function Get_Value (From : in Wiki_View_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Wiki_View_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
-- Get the wiki syntax for the page.
function Get_Syntax (From : in Wiki_View_Bean) return Wiki.Wiki_Syntax;
-- Load the information about the wiki page to display it.
overriding
procedure Load (Bean : in out Wiki_View_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the Wiki_View_Bean bean instance.
function Create_Wiki_View_Bean (Module : in AWA.Wikis.Modules.Wiki_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
function Get_Wiki_View_Bean is
new ASF.Helpers.Beans.Get_Bean (Element_Type => Wiki_View_Bean,
Element_Access => Wiki_View_Bean_Access);
-- Get a select item list which contains a list of wiki formats.
function Create_Format_List_Bean (Module : in AWA.Wikis.Modules.Wiki_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
-- ------------------------------
-- Wiki Page Bean
-- ------------------------------
-- The <tt>Wiki_Page_Bean</tt> is used to edit a wiki page. The model type inherit from
-- the <tt>Wiki_Page</tt> and the wiki page text is hold in the <tt>Content</tt> member.
-- When a new content is updated, the <tt>Set_Value</tt> procedure sets it in the
-- <tt>New_Content</tt> member. It is compared to the current wiki text to decide whether
-- we have to create a new version or not.
type Wiki_Page_Bean is new AWA.Wikis.Models.Wiki_Page_Bean with record
Module : Modules.Wiki_Module_Access := null;
-- The page content.
Content : Models.Wiki_Content_Ref;
Has_Content : Boolean := False;
Format : AWA.Wikis.Models.Format_Type := AWA.Wikis.Models.FORMAT_CREOLE;
New_Content : Ada.Strings.Unbounded.Unbounded_String;
New_Comment : Ada.Strings.Unbounded.Unbounded_String;
Wiki_Space : Wiki_Space_Bean_Access;
-- List of tags associated with the wiki page.
Tags : aliased AWA.Tags.Beans.Tag_List_Bean;
Tags_Bean : Util.Beans.Basic.Readonly_Bean_Access;
end record;
type Wiki_Page_Bean_Access is access all Wiki_Page_Bean'Class;
-- Returns True if the wiki page has a new text content and requires
-- a new version to be created.
function Has_New_Content (Bean : in Wiki_Page_Bean) return Boolean;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Wiki_Page_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Wiki_Page_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
-- Create or save the wiki page.
overriding
procedure Save (Bean : in out Wiki_Page_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Load the wiki page.
overriding
procedure Load (Bean : in out Wiki_Page_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Setup the wiki page for the creation.
overriding
procedure Setup (Bean : in out Wiki_Page_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Delete the wiki page.
overriding
procedure Delete (Bean : in out Wiki_Page_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the Wiki_Page_Bean bean instance.
function Create_Wiki_Page_Bean (Module : in AWA.Wikis.Modules.Wiki_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
-- ------------------------------
-- Wiki List Bean
-- ------------------------------
-- The <b>Wiki_List_Bean</b> gives a list of visible wikis to be displayed to users.
-- The list can be filtered by a given tag. The list pagination is supported.
type Wiki_List_Bean is new AWA.Wikis.Models.Wiki_Page_List_Bean with record
Module : Modules.Wiki_Module_Access := null;
Pages : aliased AWA.Wikis.Models.Wiki_Page_Info_List_Bean;
Tags : AWA.Tags.Beans.Entity_Tag_Map;
Pages_Bean : AWA.Wikis.Models.Wiki_Page_Info_List_Bean_Access;
-- The wiki space identifier.
Wiki_Space : Wiki_Space_Bean_Access;
end record;
type Wiki_List_Bean_Access is access all Wiki_List_Bean'Class;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Wiki_List_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Wiki_List_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
overriding
procedure Load (From : in out Wiki_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Load the list of pages. If a tag was set, filter the list of pages with the tag.
procedure Load_List (Into : in out Wiki_List_Bean);
-- Create the Post_List_Bean bean instance.
function Create_Wiki_List_Bean (Module : in AWA.Wikis.Modules.Wiki_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
-- ------------------------------
-- Wiki Version List Bean
-- ------------------------------
type Wiki_Version_List_Bean is new AWA.Wikis.Models.Wiki_Version_List_Bean with record
Module : Modules.Wiki_Module_Access := null;
Versions : aliased AWA.Wikis.Models.Wiki_Version_Info_List_Bean;
Versions_Bean : AWA.Wikis.Models.Wiki_Version_Info_List_Bean_Access;
end record;
type Wiki_Version_List_Bean_Access is access all Wiki_Version_List_Bean'Class;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Wiki_Version_List_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Wiki_Version_List_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
overriding
procedure Load (Into : in out Wiki_Version_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the Post_List_Bean bean instance.
function Create_Wiki_Version_List_Bean (Module : in AWA.Wikis.Modules.Wiki_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
-- ------------------------------
-- Wiki page info Bean
-- ------------------------------
-- The <tt>Wiki_Page_Info_Bean</tt> is used to provide information about a wiki page.
-- It analyzes the page content and extract the list of links, images, words, templates
-- used in the page.
type Wiki_Page_Info_Bean is new AWA.Wikis.Models.Wiki_Page_Info_Bean with record
Module : Modules.Wiki_Module_Access := null;
Page : Wiki_View_Bean_Access;
-- List of words contained in the wiki page.
Words : aliased AWA.Tags.Beans.Tag_Info_List_Bean;
Words_Bean : AWA.Tags.Beans.Tag_Info_List_Bean_Access;
-- List of wiki page links used in the wiki page.
Links : aliased AWA.Tags.Beans.Tag_Info_List_Bean;
Links_Bean : AWA.Tags.Beans.Tag_Info_List_Bean_Access;
-- List of external links used in the wiki page.
Ext_Links : aliased AWA.Tags.Beans.Tag_Info_List_Bean;
Ext_Links_Bean : AWA.Tags.Beans.Tag_Info_List_Bean_Access;
end record;
type Wiki_Page_Info_Bean_Access is access all Wiki_Page_Info_Bean'Class;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Wiki_Page_Info_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Wiki_Page_Info_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
overriding
procedure Load (Into : in out Wiki_Page_Info_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the Wiki_Page_Info_Bean bean instance.
function Create_Wiki_Page_Info_Bean (Module : in AWA.Wikis.Modules.Wiki_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
-- ------------------------------
-- Wiki image info Bean
-- ------------------------------
-- The <tt>Wiki_Image_Info_Bean</tt> is used to provide information about a wiki image.
type Wiki_Image_Info_Bean is new AWA.Wikis.Models.Wiki_Image_Bean with record
Module : Modules.Wiki_Module_Access := null;
Page : Wiki_View_Bean_Access;
-- The folder name and image name.
Folder_Name : Ada.Strings.Unbounded.Unbounded_String;
Name : Ada.Strings.Unbounded.Unbounded_String;
-- The wiki space identifier and wiki page identifer that uses the image.
Wiki_Id : ADO.Identifier := ADO.NO_IDENTIFIER;
Page_Id : ADO.Identifier := ADO.NO_IDENTIFIER;
-- Information about images.
List : aliased AWA.Wikis.Models.Wiki_Image_Info_List_Bean;
List_Bean : AWA.Wikis.Models.Wiki_Image_Info_List_Bean_Access;
end record;
type Wiki_Image_Info_Bean_Access is access all Wiki_Image_Info_Bean'Class;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Wiki_Image_Info_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Wiki_Image_Info_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
-- Load the information about the image.
overriding
procedure Load (Into : in out Wiki_Image_Info_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the Wiki_Image_Info_BEan bean instance.
function Create_Wiki_Image_Info_Bean (Module : in AWA.Wikis.Modules.Wiki_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
type Init_Flag is (INIT_WIKI_LIST);
type Init_Map is array (Init_Flag) of Boolean;
-- ------------------------------
-- Admin List Bean
-- ------------------------------
-- The <b>Wiki_Admin_Bean</b> is used for the administration of a wiki. It gives the
-- list of wikis and pages that are created, published or not.
type Wiki_Admin_Bean is new Util.Beans.Basic.Bean with record
Module : AWA.Wikis.Modules.Wiki_Module_Access := null;
-- The wiki space identifier.
Wiki_Id : ADO.Identifier := ADO.NO_IDENTIFIER;
-- List of blogs.
Wiki_List : aliased AWA.Wikis.Models.Wiki_Info_List_Bean;
Wiki_List_Bean : AWA.Wikis.Models.Wiki_Info_List_Bean_Access;
-- Initialization flags.
Init_Flags : aliased Init_Map := (others => False);
Flags : access Init_Map;
end record;
type Wiki_Admin_Bean_Access is access all Wiki_Admin_Bean;
-- Get the wiki space identifier.
function Get_Wiki_Id (List : in Wiki_Admin_Bean) return ADO.Identifier;
overriding
function Get_Value (List : in Wiki_Admin_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Wiki_Admin_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
-- Load the list of wikis.
procedure Load_Wikis (List : in Wiki_Admin_Bean);
-- Create the Wiki_Admin_Bean bean instance.
function Create_Wiki_Admin_Bean (Module : in AWA.Wikis.Modules.Wiki_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
end AWA.Wikis.Beans;
|
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2020, Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
-- SDL.Log
--
-- Message logging.
--------------------------------------------------------------------------------------------------------------------
package SDL.Log is
pragma Preelaborate;
-- Messages longer than Max_Length will be truncated.
-- TODO: Import this from a C constant set from SDL_MAX_LOG_MESSAGE.
Max_Length : constant Integer := 4096;
-- Had to make this into a type with constants due to the abuse of
-- the C enumeration.
type Categories is range 0 .. 2 ** 32;
Application : constant Categories := 0;
Errors : constant Categories := 1;
Assert : constant Categories := 2;
System : constant Categories := 3;
Audio : constant Categories := 4;
Video : constant Categories := 5;
Render : constant Categories := 6;
Input : constant Categories := 7;
Test : constant Categories := 8;
-- Reserved categories.
Reserved_First : constant Categories := 9;
Reserved_Last : constant Categories := 18;
-- Custom categories.
subtype Custom_Categories is Categories range Reserved_Last .. Categories'Last;
type Priorities is (Verbose, Debug, Info, Warn, Error, Critical) with
Convention => C;
for Priorities use
(Verbose => 1,
Debug => 2,
Info => 3,
Warn => 4,
Error => 5,
Critical => 6);
-- Log a message with Category: Application and Priority: Info.
procedure Put (Message : in String) with
Inline => True;
procedure Put (Message : in String; Category : in Categories; Priority : in Priorities) with
Inline => True;
-- Log a message with Priority: Critical.
procedure Put_Critical (Message : in String; Category : in Categories := Application) with
Inline => True;
-- Log a message with Priority: Debug.
procedure Put_Debug (Message : in String; Category : in Categories := Application) with
Inline => True;
-- Log a message with Priority: Error.
procedure Put_Error (Message : in String; Category : in Categories := Application) with
Inline => True;
-- Log a message with Priority: Info.
procedure Put_Info (Message : in String; Category : in Categories := Application) with
Inline => True;
-- Log a message with Priority: Verbose.
procedure Put_Verbose (Message : in String; Category : in Categories := Application) with
Inline => True;
-- Log a message with Priority: Warn.
procedure Put_Warn (Message : in String; Category : in Categories := Application) with
Inline => True;
--
procedure Reset_Priorities with
Inline => True;
-- Set the priority of all the log categories to the given Priority.
procedure Set (Priority : in Priorities) with
Inline => True;
-- Set the the given log Category to the given Priority.
procedure Set (Category : in Categories; Priority : in Priorities) with
Inline => True;
-- Logging callbacks.
-- TODO: complete this.
-- I think this will require a bit more work. I think we will have to allocate a record
-- and store this in a container which gets destroyed on application shutdown before SDL quits.
type Root_User_Data is tagged null record;
type Output_Callback is access procedure
(User_Data : in Root_User_Data'Class;
Category : in Categories;
Priority : in Priorities;
Message : in String);
end SDL.Log;
|
package body Utilities is
function LeftPad (Str: String; Level : Natural) return String is
Padding: constant String (1 .. Width * Level) := (others => ' ');
begin
return Padding & Str;
end LeftPad;
end Utilities;
|
with AZ3_Suite;
with AUnit.Run;
with AUnit.Reporter.Text;
with Ada.Command_Line;
with Ada.Text_IO; use Ada.Text_IO;
procedure Tests is
function Run is new AUnit.Run.Test_Runner_With_Status (AZ3_Suite.Suite);
Reporter : AUnit.Reporter.Text.Text_Reporter;
use AUnit;
S : Status;
begin
Put_Line ("Running AZ3 tests...");
Reporter.Set_Use_ANSI_Colors (True);
S := Run (Reporter);
Ada.Command_Line.Set_Exit_Status (if S = Success then 0 else 1);
end Tests;
|
with Ada.Containers.Indefinite_Ordered_Maps;
with Ada.Containers.Vectors;
with Ada.Strings.Bounded;
with Line_Arrays;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
--
-- This package parses a file as a list of "nodes." Basically,
-- a "node" has the following properties
--
-- * A node "class"
-- * A list of (attribute, value) pairs
-- * A descriptive text
--
-- A node it is stored like
--
-- [wp]
-- name : zorro
-- label : foo
-- viva la pappa col pomodoro.
--
-- Attribute lines have the form "key : value" where the key must begin
-- in column 1. Attributes come after the header with the class name and
-- before the description. Empty lines before or after the description
-- and spaces before and after the attribute value can be trimmed.
--
-- Lines begining with # are comments and ignored
--
-- The syntax is something like
--
-- file := node+
-- node := header attribute* text-line*
-- header := ^S* '[' S* id S* ']' S*$
-- attribute := ^id S* ':' .*$
-- text-line := does not match neither header, nor attribute
--
--
generic
type Node_Class is (<>);
with package Bounded_Identifiers is
new Ada.Strings.Bounded.Generic_Bounded_Length (<>);
package Node_List_Parsers is
type Node_Type is tagged private
with Constant_Indexing => Value;
type Node_List is array (Positive range <>) of Node_Type;
function Is_Valid_Id (X : String) return Boolean
is (for all K of X =>
(K in 'a' .. 'z') or K = '-');
--
-- package Id_Strings is
-- new Ada.Strings.Bounded.Generic_Bounded_Length (Max_ID_Length);
--
-- use Id_Strings;
subtype Id is Bounded_Identifiers.Bounded_String;
use type Bounded_Identifiers.Bounded_String;
-- Id_Strings.Bounded_String
-- with Dynamic_Predicate => (Is_Valid_Id (To_String (Id)));
function "+" (X : String) return Id
is (Bounded_Identifiers.To_Bounded_String (X));
function To_ID (X : String) return Id
is (Bounded_Identifiers.To_Bounded_String (X));
function Class (Item : Node_Type) return Node_Class;
function Description (Item : Node_Type) return Line_Arrays.Line_Array;
function Description (Item : Node_Type) return String
is (Line_Arrays.Join (Item.Description));
function Contains (Item : Node_Type;
Key : Id)
return Boolean;
function Value (Item : Node_Type;
Key : Id)
return String;
function Value (Item : Node_Type;
Key : String)
return String
is (Item.Value (To_ID (Key)));
function Value (Item : Node_Type;
Key : Id;
Default : String) return String;
package Name_Maps is
new Ada.Containers.Indefinite_Ordered_Maps (Key_Type => Id,
Element_Type => Node_Class);
type Trimming_Action is (Head, Tail, Both, None);
function Parse (Input : Line_Arrays.Line_Array;
Names : Name_Maps.Map := Name_Maps.Empty_Map;
Trimming : Trimming_Action := Both;
Line_Trimming : Trimming_Action := Both)
return Node_List;
procedure Dump (Item : Node_List);
type Node_Scanner (<>) is private;
function To_Scanner (X : Node_List) return Node_Scanner;
function End_Of_List (X : Node_Scanner) return Boolean;
function Peek (X : Node_Scanner) return Node_Type
with Pre => not End_Of_List (X);
function Peek_Class (X : Node_Scanner) return Node_Class
is (Peek (X).Class)
with Pre => not End_Of_List (X);
-- Syntactic sugar, but very useful
function Class_Is (X : Node_Scanner; Cl : Node_Class) return Boolean
is ((not End_Of_List (X)) and then (Peek_Class (X) = Cl));
-- Syntactic sugar again, very convenient since it includes also the
-- end-of-data case
procedure Next (X : in out Node_Scanner);
procedure Prev (X : in out Node_Scanner);
type Attribute_Check is private;
function Mandatory (Name : String) return Attribute_Check;
function Default (Name : String; Default : String) return Attribute_Check;
function Alternative (Spec : String) return Attribute_Check;
function Enumerative (Spec : String;
Allowed_Values : String;
Default : String := "";
Case_Sensitive : Boolean := False)
return Attribute_Check;
generic
type Enumerative_Type is (<>);
function Generic_Enumerative (Spec : String;
Default : String := "")
return Attribute_Check;
type Attribute_Check_Array is array (Positive range <>) of Attribute_Check;
type Attribute_Checker (<>) is private;
function Create (Checks : Attribute_Check_Array) return Attribute_Checker;
function "+" (X, Y : Attribute_Checker) return Attribute_Checker;
function "+" (X : Attribute_Check;
Y : Attribute_Check)
return Attribute_Checker;
function "+" (X : Attribute_Checker;
Y : Attribute_Check)
return Attribute_Checker;
procedure Check (Checker : Attribute_Checker;
Node : in out Node_Type);
Missing_Mandatory : exception;
Missing_Alternative : exception;
Duplicate_Alternative : exception;
Bad_Enumerative : exception;
private
package Key_Value_Maps is
new Ada.Containers.Indefinite_Ordered_Maps (Key_Type => Id,
Element_Type => String);
type Node_Type is tagged
record
Class : Node_Class;
Attributes : Key_Value_Maps.Map;
Description : Line_Arrays.Line_Array;
end record;
function Class (Item : Node_Type) return Node_Class
is (Item.Class);
function Description (Item : Node_Type) return Line_Arrays.Line_Array
is (Item.Description);
function Contains (Item : Node_Type;
Key : Id)
return Boolean
is (Item.Attributes.Contains (Key));
function Value (Item : Node_Type;
Key : Id)
return String
is (Item.Attributes.Element (Key));
function Value (Item : Node_Type;
Key : Id;
Default : String) return String
is (if Item.Contains (Key) then Item.Value (Key) else Default);
type Node_Scanner (Length : Positive) is
record
Nodes : Node_List (1 .. Length);
Cursor : Positive;
end record;
function To_Scanner (X : Node_List) return Node_Scanner
is (Node_Scanner'(Length => X'Length,
Nodes => X,
Cursor => 1));
function End_Of_List (X : Node_Scanner) return Boolean
is (X.Cursor > X.Nodes'Last);
function Peek (X : Node_Scanner) return Node_Type
is (X.Nodes (X.Cursor));
package ID_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => Id);
type Check_Class is (Mandatory_Class,
Default_Class,
Alternative_Class,
Enumerative_Class);
type Attribute_Check (Class : Check_Class := Mandatory_Class) is
record
case Class is
when Mandatory_Class =>
Attribute : Id;
when Default_Class =>
Key : Id;
Value : Unbounded_String;
when Alternative_Class =>
Alternatives : Id_Vectors.Vector;
when Enumerative_Class =>
Attr : Id;
Allowed : ID_Vectors.Vector;
Default : Unbounded_String;
Case_Sensitive : Boolean;
end case;
end record;
function Mandatory (Name : String) return Attribute_Check
is (Attribute_Check'(Class => Mandatory_Class,
Attribute => To_ID (Name)));
function Default (Name : String; Default : String) return Attribute_Check
is (Attribute_Check'(Class => Default_Class,
Key => To_Id (Name),
Value => To_Unbounded_String (Default)));
type Attribute_Checker (Length : Positive) is
record
Checks : Attribute_Check_Array (1 .. Length);
end record;
function Create (Checks : Attribute_Check_Array) return Attribute_Checker
is (Attribute_Checker'(Length => Checks'Length,
Checks => Checks));
function "+" (X, Y : Attribute_Checker) return Attribute_Checker
is (Attribute_Checker'(Length => X.Length + Y.Length,
Checks => X.Checks & Y.Checks));
function "+" (X : Attribute_Check; Y : Attribute_Check)
return Attribute_Checker
is (Attribute_Checker'(Length => 2,
Checks => (1 => X, 2 => Y)));
function "+" (X : Attribute_Checker; Y : Attribute_Check) return Attribute_Checker
is (X + Create ((1 => Y)));
end Node_List_Parsers;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . E X P _ U N S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This function performs exponentiation of unsigned types (with binary
-- modulus values up to and including that of Unsigned_Types.Unsigned).
-- The result is always full width, the caller must do a masking operation
-- the modulus is less than 2 ** (Unsigned'Size).
with System.Unsigned_Types;
package System.Exp_Uns is
pragma Pure;
function Exp_Unsigned
(Left : System.Unsigned_Types.Unsigned;
Right : Natural)
return System.Unsigned_Types.Unsigned;
end System.Exp_Uns;
|
-- C74406A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT THE FULL DECLARATION OF A LIMITED PRIVATE TYPE CAN
-- DECLARE A TASK TYPE, A TYPE DERIVED FROM A LIMITED PRIVATE TYPE,
-- AND A COMPOSITE TYPE WITH A COMPONENT OF A LIMITED TYPE.
-- HISTORY:
-- BCB 03/10/88 CREATED ORIGINAL TEST.
WITH REPORT; USE REPORT;
PROCEDURE C74406A IS
PACKAGE TP IS
TYPE T IS LIMITED PRIVATE;
PROCEDURE INIT (Z1 : OUT T; Z2 : INTEGER);
FUNCTION EQUAL_T (ONE, TWO : T) RETURN BOOLEAN;
PRIVATE
TYPE T IS RANGE 1 .. 100;
END TP;
PACKAGE BODY TP IS
PROCEDURE INIT (Z1 : OUT T; Z2 : INTEGER) IS
BEGIN
Z1 := T (Z2);
END INIT;
FUNCTION EQUAL_T (ONE, TWO : T) RETURN BOOLEAN IS
BEGIN
IF EQUAL(3,3) THEN
RETURN ONE = TWO;
ELSE
RETURN ONE /= TWO;
END IF;
END EQUAL_T;
BEGIN
NULL;
END TP;
USE TP;
PACKAGE P IS
TYPE T1 IS LIMITED PRIVATE;
TYPE T2 IS LIMITED PRIVATE;
TYPE T3 IS LIMITED PRIVATE;
TYPE T4 IS LIMITED PRIVATE;
PRIVATE
TASK TYPE T1 IS
ENTRY HERE(VAL1 : IN OUT INTEGER);
END T1;
TYPE T2 IS NEW T;
TYPE T3 IS RECORD
INT : T;
END RECORD;
TYPE T4 IS ARRAY(1..5) OF T;
END P;
PACKAGE BODY P IS
X1 : T1;
X3 : T3;
X4 : T4;
VAR : INTEGER := 25;
TASK BODY T1 IS
BEGIN
ACCEPT HERE(VAL1 : IN OUT INTEGER) DO
VAL1 := VAL1 * 2;
END HERE;
END T1;
BEGIN
TEST ("C74406A", "CHECK THAT THE FULL DECLARATION OF A " &
"LIMITED PRIVATE TYPE CAN DECLARE A TASK " &
"TYPE, A TYPE DERIVED FROM A LIMITED " &
"PRIVATE TYPE, AND A COMPOSITE TYPE WITH " &
"A COMPONENT OF A LIMITED TYPE");
X1.HERE(VAR);
IF NOT EQUAL(VAR,IDENT_INT(50)) THEN
FAILED ("IMPROPER VALUE FOR VAL");
END IF;
INIT (X3.INT, 50);
IF X3.INT NOT IN T THEN
FAILED ("IMPROPER RESULT FROM MEMBERSHIP TEST");
END IF;
INIT (X4(3), 17);
IF NOT EQUAL_T(T'(X4(3)),T(X4(3))) THEN
FAILED ("IMPROPER RESULT FROM QUALIFICATION AND " &
"EXPLICIT CONVERSION");
END IF;
RESULT;
END P;
USE P;
BEGIN
NULL;
END C74406A;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- This version is for use with the ravenscar-sfp runtime.
with System;
package Last_Chance_Handler is
procedure Last_Chance_Handler (Msg : System.Address; Line : Integer);
pragma Export (C, Last_Chance_Handler, "__gnat_last_chance_handler");
pragma No_Return (Last_Chance_Handler);
end Last_Chance_Handler;
|
with Generator.Match_Pattern_Specific;
procedure Main_Generator is
begin
Generator.Match_Pattern_Specific.Main;
end Main_Generator;
|
generic
type elem is private;
package dcola is
type cola is limited private;
mal_uso: exception;
espacio_desbordado: exception;
procedure cvacia(qu: out cola);
procedure poner (qu: in out cola; x: in elem);
procedure borrar_primero (qu: in out cola);
function coger_primero(qu: in cola) return elem;
function esta_vacia(qu: in cola) return boolean;
function is_last_item (qu: in cola) return boolean;
private
type nodo;
type pnodo is access nodo;
type nodo is record
x: elem;
sig: pnodo;
end record;
type cola is record
p, q: pnodo; -- q inicio cola (consulta), p final cola (insercion)
end record;
end dcola;
|
-----------------------------------------------------------------------
-- AWA tests - AWA Tests Framework
-- Copyright (C) 2011, 2012, 2013, 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.
-----------------------------------------------------------------------
with Ada.Task_Termination;
with Ada.Task_Identification;
with Ada.Exceptions;
with Ada.Unchecked_Deallocation;
with ASF.Server.Tests;
with Util.Log.Loggers;
with ASF.Tests;
with AWA.Applications.Factory;
with AWA.Tests.Helpers.Users;
package body AWA.Tests is
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("AWA.Tests");
protected Shutdown is
procedure Termination (Cause : in Ada.Task_Termination.Cause_Of_Termination;
Id : in Ada.Task_Identification.Task_Id;
Ex : in Ada.Exceptions.Exception_Occurrence);
end Shutdown;
Application_Created : Boolean := False;
Application : AWA.Applications.Application_Access := null;
Factory : AWA.Applications.Factory.Application_Factory;
Service_Filter : aliased AWA.Services.Filters.Service_Filter;
protected body Shutdown is
procedure Termination (Cause : in Ada.Task_Termination.Cause_Of_Termination;
Id : in Ada.Task_Identification.Task_Id;
Ex : in Ada.Exceptions.Exception_Occurrence) is
pragma Unreferenced (Cause, Id, Ex);
procedure Free is
new Ada.Unchecked_Deallocation (Object => AWA.Applications.Application'Class,
Name => AWA.Applications.Application_Access);
begin
Free (Application);
end Termination;
end Shutdown;
-- ------------------------------
-- Setup the service context before executing the test.
-- ------------------------------
overriding
procedure Set_Up (T : in out Test) is
pragma Unreferenced (T);
begin
ASF.Server.Tests.Set_Context (Application.all'Access);
end Set_Up;
-- ------------------------------
-- Cleanup after the test execution.
-- ------------------------------
overriding
procedure Tear_Down (T : in out Test) is
begin
AWA.Tests.Helpers.Users.Tear_Down;
end Tear_Down;
procedure Initialize (Props : in Util.Properties.Manager) is
begin
Initialize (null, Props, True);
end Initialize;
-- ------------------------------
-- Called when the testsuite execution has finished.
-- ------------------------------
procedure Finish (Status : in Util.XUnit.Status) is
pragma Unreferenced (Status);
procedure Free is
new Ada.Unchecked_Deallocation (Object => AWA.Applications.Application'Class,
Name => AWA.Applications.Application_Access);
begin
if Application_Created then
Free (Application);
end if;
end Finish;
-- ------------------------------
-- Initialize the AWA test framework mockup.
-- ------------------------------
procedure Initialize (App : in AWA.Applications.Application_Access;
Props : in Util.Properties.Manager;
Add_Modules : in Boolean) is
pragma Unreferenced (Add_Modules);
use AWA.Applications;
begin
-- Create the application unless it is specified as argument.
-- Install a shutdown hook to delete the application when the primary task exits.
-- This allows to stop the event threads if any.
if App = null then
Application_Created := True;
Application := new Test_Application;
Ada.Task_Termination.Set_Specific_Handler (Ada.Task_Identification.Current_Task,
Shutdown.Termination'Access);
else
Application := App;
end if;
ASF.Tests.Initialize (Props, Application.all'Access, Factory);
Application.Add_Filter ("service", Service_Filter'Access);
Application.Add_Filter_Mapping (Name => "service", Pattern => "*.html");
end Initialize;
-- ------------------------------
-- Get the test application.
-- ------------------------------
function Get_Application return AWA.Applications.Application_Access is
begin
return Application;
end Get_Application;
-- ------------------------------
-- Set the application context to simulate a web request context.
-- ------------------------------
procedure Set_Application_Context is
begin
ASF.Server.Tests.Set_Context (Application.all'Access);
end Set_Application_Context;
-- ------------------------------
-- Initialize the servlets provided by the application.
-- This procedure is called by <b>Initialize</b>.
-- It should register the application servlets.
-- ------------------------------
overriding
procedure Initialize_Servlets (App : in out Test_Application) is
begin
Log.Info ("Initializing application servlets...");
AWA.Applications.Application (App).Initialize_Servlets;
App.Add_Servlet (Name => "faces", Server => App.Faces'Unchecked_Access);
App.Add_Servlet (Name => "files", Server => App.Files'Unchecked_Access);
App.Add_Servlet (Name => "ajax", Server => App.Ajax'Unchecked_Access);
App.Add_Servlet (Name => "measures", Server => App.Measures'Unchecked_Access);
-- App.Add_Servlet (Name => "auth", Server => App.Auth'Unchecked_Access);
-- App.Add_Servlet (Name => "verify-auth", Server => App.Self.Verify_Auth'Access);
end Initialize_Servlets;
-- ------------------------------
-- Initialize the filters provided by the application.
-- This procedure is called by <b>Initialize</b>.
-- It should register the application filters.
-- ------------------------------
overriding
procedure Initialize_Filters (App : in out Test_Application) is
begin
Log.Info ("Initializing application filters...");
AWA.Applications.Application (App).Initialize_Filters;
App.Add_Filter (Name => "dump", Filter => App.Dump'Access);
App.Add_Filter (Name => "measures", Filter => App.Measures'Access);
App.Add_Filter (Name => "service", Filter => App.Service_Filter'Access);
end Initialize_Filters;
end AWA.Tests;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.OCL.Any_Types;
with AMF.OCL.Association_Class_Call_Exps;
with AMF.OCL.Bag_Types;
with AMF.OCL.Boolean_Literal_Exps;
with AMF.OCL.Collection_Items;
with AMF.OCL.Collection_Literal_Exps;
with AMF.OCL.Collection_Ranges;
with AMF.OCL.Collection_Types;
with AMF.OCL.Enum_Literal_Exps;
with AMF.OCL.Expression_In_Ocls;
with AMF.OCL.If_Exps;
with AMF.OCL.Integer_Literal_Exps;
with AMF.OCL.Invalid_Literal_Exps;
with AMF.OCL.Invalid_Types;
with AMF.OCL.Iterate_Exps;
with AMF.OCL.Iterator_Exps;
with AMF.OCL.Let_Exps;
with AMF.OCL.Message_Exps;
with AMF.OCL.Message_Types;
with AMF.OCL.Null_Literal_Exps;
with AMF.OCL.Operation_Call_Exps;
with AMF.OCL.Ordered_Set_Types;
with AMF.OCL.Property_Call_Exps;
with AMF.OCL.Real_Literal_Exps;
with AMF.OCL.Sequence_Types;
with AMF.OCL.Set_Types;
with AMF.OCL.State_Exps;
with AMF.OCL.String_Literal_Exps;
with AMF.OCL.Template_Parameter_Types;
with AMF.OCL.Tuple_Literal_Exps;
with AMF.OCL.Tuple_Literal_Parts;
with AMF.OCL.Tuple_Types;
with AMF.OCL.Type_Exps;
with AMF.OCL.Unlimited_Natural_Literal_Exps;
with AMF.OCL.Unspecified_Value_Exps;
with AMF.OCL.Variable_Exps;
with AMF.OCL.Variables;
with AMF.OCL.Void_Types;
package AMF.Visitors.OCL_Visitors is
pragma Preelaborate;
type OCL_Visitor is limited interface and AMF.Visitors.Abstract_Visitor;
not overriding procedure Enter_Any_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Any_Types.OCL_Any_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Any_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Any_Types.OCL_Any_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Association_Class_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Association_Class_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Bag_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Bag_Types.OCL_Bag_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Bag_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Bag_Types.OCL_Bag_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Boolean_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Boolean_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Collection_Item
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Items.OCL_Collection_Item_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Collection_Item
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Items.OCL_Collection_Item_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Collection_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Collection_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Collection_Range
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Collection_Range
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Collection_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Types.OCL_Collection_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Collection_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Types.OCL_Collection_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Enum_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Enum_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Expression_In_Ocl
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Expression_In_Ocl
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_If_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.If_Exps.OCL_If_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_If_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.If_Exps.OCL_If_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Integer_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Integer_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Invalid_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Invalid_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Invalid_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Invalid_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Iterate_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Iterate_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Iterator_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Iterator_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Let_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Let_Exps.OCL_Let_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Let_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Let_Exps.OCL_Let_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Message_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Message_Exps.OCL_Message_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Message_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Message_Exps.OCL_Message_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Message_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Message_Types.OCL_Message_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Message_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Message_Types.OCL_Message_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Null_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Null_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Operation_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Operation_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Ordered_Set_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Ordered_Set_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Property_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Property_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Real_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Real_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Sequence_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Sequence_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Set_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Set_Types.OCL_Set_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Set_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Set_Types.OCL_Set_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_State_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.State_Exps.OCL_State_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_State_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.State_Exps.OCL_State_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_String_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_String_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Template_Parameter_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Template_Parameter_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Tuple_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Tuple_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Tuple_Literal_Part
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Tuple_Literal_Part
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Tuple_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Tuple_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Type_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Type_Exps.OCL_Type_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Type_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Type_Exps.OCL_Type_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Unlimited_Natural_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Unlimited_Natural_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Unspecified_Value_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Unspecified_Value_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Variable
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Variables.OCL_Variable_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Variable
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Variables.OCL_Variable_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Variable_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Variable_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Void_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Void_Types.OCL_Void_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Void_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Void_Types.OCL_Void_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
end AMF.Visitors.OCL_Visitors;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- 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$
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
package body Matreshka.Internals.String_Vectors is
pragma Assert
(Standard'Address_Size
= Matreshka.Internals.Strings.Shared_String_Access'Size);
-- Size of System.Address must be equal to size of Shared_String_Access to
-- compite constants correctly.
Growth_Factor : constant := 32;
-- The growth factor controls how much extra space is allocated when we
-- have to increase the size of an allocated shared vector. By allocating
-- extra space, we avoid the need to reallocate on every append,
-- particularly important when a string is built up by repeated append
-- operations of small pieces. This is expressed as a factor so 32 means
-- add 1/32 of the length of the string as growth space.
Min_Mul_Alloc : constant
:= Standard'Maximum_Alignment * Standard'Storage_Unit
/ Standard'Address_Size;
-- Allocation will be done by a multiple of Min_Mul_Alloc. This causes no
-- memory loss as most (all?) malloc implementations are obliged to align
-- the returned memory on the maximum alignment as malloc does not know the
-- target alignment.
function Aligned_Size
(Size : String_Vector_Index) return String_Vector_Index;
pragma Inline (Aligned_Size);
-- Returns recommended size of the shared vector which is greater or equal
-- to specified. Calculation take in sense alignment of the allocated
-- memory segments to use memory effectively by Append/Insert/etc
-- operations.
------------------
-- Aligned_Size --
------------------
function Aligned_Size
(Size : String_Vector_Index) return String_Vector_Index
is
use Matreshka.Internals.Strings;
Static_Size : constant String_Vector_Index
:= (Empty_Shared_String_Vector'Size
- Shared_String_Access'Size
* (Empty_Shared_String_Vector.Last + 1))
/ Shared_String_Access'Size;
-- Total size of all static components in Shared_String_Access'Size
-- units.
pragma Assert
((Empty_Shared_String_Vector'Size
- Shared_String_Access'Size * (Empty_Shared_String_Vector.Last + 1))
mod Shared_String_Access'Size = 0);
-- Reminder must be zero to compute value correctly.
begin
return
((Static_Size + Size + Size / Growth_Factor) / Min_Mul_Alloc + 1)
* Min_Mul_Alloc - Static_Size;
end Aligned_Size;
procedure Unsafe_Dereference (Item : in out Shared_String_Vector_Access);
-- Dereference specified object and release memory when necessary, but
-- doesn't dereference contained shared strings.
procedure Free is
new Ada.Unchecked_Deallocation
(Shared_String_Vector, Shared_String_Vector_Access);
-- Deallocate shared string vector. Should not be used anywhere except
-- Dereference and Unsafe_Dereference subprograms.
--------------
-- Allocate --
--------------
function Allocate
(Size : String_Vector_Index) return not null Shared_String_Vector_Access
is
pragma Assert (Size /= 0);
begin
return new Shared_String_Vector (Aligned_Size (Size));
end Allocate;
------------
-- Append --
------------
procedure Append
(Item : in out Shared_String_Vector_Access;
String : not null Matreshka.Internals.Strings.Shared_String_Access) is
begin
Detach (Item, Item.Unused + 1);
Item.Value (Item.Unused) := String;
Item.Unused := Item.Unused + 1;
end Append;
-----------------
-- Dereference --
-----------------
procedure Dereference (Item : in out Shared_String_Vector_Access) is
begin
if Item /= Empty_Shared_String_Vector'Access
and then Matreshka.Atomics.Counters.Decrement (Item.Counter)
then
for J in 0 .. Item.Unused - 1 loop
Matreshka.Internals.Strings.Dereference (Item.Value (J));
end loop;
Free (Item);
else
Item := null;
end if;
end Dereference;
------------
-- Detach --
------------
procedure Detach
(Item : in out Shared_String_Vector_Access;
Size : String_Vector_Index)
is
Source : Shared_String_Vector_Access := Item;
Destination : Shared_String_Vector_Access renames Item;
begin
-- Size of the requested vector is zero, return empty shared string
-- vector.
if Size = 0 then
if Source /= Empty_Shared_String_Vector'Access then
Dereference (Source);
Destination := Empty_Shared_String_Vector'Access;
end if;
-- Source shared string vector is empty, allocate new one.
elsif Source = Empty_Shared_String_Vector'Access then
Destination := Allocate (Size);
-- Source shared string vector is not enought to store specified number
-- of items, or used somewhere; allocate new one and copy existing data.
elsif Destination.Last < Size
or else not Matreshka.Atomics.Counters.Is_One (Source.Counter)
then
Destination := Allocate (Size);
Destination.Value (0 .. Source.Unused - 1) :=
Source.Value (0 .. Source.Unused - 1);
Destination.Unused := Source.Unused;
if not Matreshka.Atomics.Counters.Is_One (Source.Counter) then
-- Increment reference counter for all copied shared strings.
for J in 0 .. Destination.Unused - 1 loop
Matreshka.Internals.Strings.Reference (Destination.Value (J));
end loop;
Dereference (Source);
else
-- There is only one reference to source object, change of
-- reference counter of shared strings can be avoided.
Unsafe_Dereference (Source);
end if;
end if;
end Detach;
------------
-- Insert --
------------
procedure Insert
(Self : in out Shared_String_Vector_Access;
Index : String_Vector_Index;
Item : not null Matreshka.Internals.Strings.Shared_String_Access) is
begin
-- Reference shared string object.
Matreshka.Internals.Strings.Reference (Item);
if Self = Empty_Shared_String_Vector'Access then
-- Vector is empty, create new one and initialize it.
Self := Allocate (1);
Self.Value (0) := Item;
Self.Unused := 1;
else
Detach (Self, Self.Unused);
Self.Value (Index + 1 .. Self.Unused) :=
Self.Value (Index .. Self.Unused - 1);
Self.Value (Index) := Item;
Self.Unused := Self.Unused + 1;
end if;
end Insert;
-------------
-- Prepend --
-------------
procedure Prepend
(Self : in out Shared_String_Vector_Access;
Vector : not null Shared_String_Vector_Access)
is
New_Length : constant String_Vector_Index
:= Self.Unused + Vector.Unused;
begin
if Vector = Empty_Shared_String_Vector'Access then
-- Empty vector is prepended, nothing to do.
null;
elsif Self = Empty_Shared_String_Vector'Access then
-- Self is empty vector, replace it by prepended vector.
Self := Vector;
Reference (Self);
else
-- Prepare object for modification.
Detach (Self, New_Length);
-- Construct new value.
Self.Value (Vector.Unused .. New_Length - 1) :=
Self.Value (0 .. Self.Unused - 1);
Self.Value (0 .. Vector.Unused - 1) :=
Vector.Value (0 .. Vector.Unused - 1);
Self.Unused := New_Length;
-- Update string's reference counters.
for J in 0 .. Vector.Unused - 1 loop
Matreshka.Internals.Strings.Reference (Self.Value (J));
end loop;
end if;
end Prepend;
---------------
-- Reference --
---------------
procedure Reference (Item : Shared_String_Vector_Access) is
begin
if Item /= Empty_Shared_String_Vector'Access then
Matreshka.Atomics.Counters.Increment (Item.Counter);
end if;
end Reference;
-------------
-- Replace --
-------------
procedure Replace
(Self : in out Shared_String_Vector_Access;
Index : String_Vector_Index;
Item : not null Matreshka.Internals.Strings.Shared_String_Access)
is
use type Matreshka.Internals.Strings.Shared_String_Access;
begin
Detach (Self, Self.Unused);
if Self.Value (Index) /= Item then
Matreshka.Internals.Strings.Dereference (Self.Value (Index));
Self.Value (Index) := Item;
Matreshka.Internals.Strings.Reference (Self.Value (Index));
end if;
end Replace;
------------------------
-- Unsafe_Dereference --
------------------------
procedure Unsafe_Dereference (Item : in out Shared_String_Vector_Access) is
begin
if Item /= Empty_Shared_String_Vector'Access
and then Matreshka.Atomics.Counters.Decrement (Item.Counter)
then
Free (Item);
else
Item := null;
end if;
end Unsafe_Dereference;
end Matreshka.Internals.String_Vectors;
|
date Span1 Span2 Span3 Span4 Max_%_DIFF
------ ----------------------- ----------------------- ----------------------- ----------------------- -----------------------
200701 +0.406750291563971E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200702 +0.409107436600541E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200703 +0.412965939265145E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200704 +0.413289903653741E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200705 +0.409430249568289E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200706 +0.414706572345404E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200707 +0.415699557841678E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200708 +0.419032431100904E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200709 +0.420766966775169E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200710 +0.424002489820214E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200711 +0.424146982683886E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200712 +0.420647584248756E+01 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03
200801 +0.425985100894644E+01 +0.426206507091583E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.519751034659733E-01
200802 +0.426022046743404E+01 +0.426466926687380E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.104426507354978E+00
200803 +0.423161811180264E+01 +0.424424854306747E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.298477578342835E+00
200804 +0.425566696360438E+01 +0.426160274872554E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.139479549784514E+00
200805 +0.425393080497851E+01 +0.423587606200568E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.426233976361421E+00
200806 +0.420481983190168E+01 +0.420181200447424E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.715840552657740E-01
200807 +0.420525563477176E+01 +0.419971008442668E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.132046027787506E+00
200808 +0.422338533522418E+01 +0.422511833798347E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.410334985262221E-01
200809 +0.419033357752570E+01 +0.419333192495300E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.715539078652406E-01
200810 +0.416979157452561E+01 +0.417984293259249E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.241051810078059E+00
200811 +0.420004859996693E+01 +0.420479817222805E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.113083745296699E+00
200812 +0.425087560940476E+01 +0.423526394573637E+01 -0.999000000000000E+03 -0.999000000000000E+03 +0.368611351462529E+00
200901 +0.419759756574799E+01 +0.419969017629881E+01 +0.420241059434171E+01 -0.999000000000000E+03 +0.114661506214843E+00
200902 +0.421275047899822E+01 +0.421540718649499E+01 +0.422162590174274E+01 -0.999000000000000E+03 +0.210680000839344E+00
200903 +0.416583371982497E+01 +0.417290229640081E+01 +0.417315620605471E+01 -0.999000000000000E+03 +0.175774808170968E+00
200904 +0.419649613514265E+01 +0.419967964886103E+01 +0.420987831593714E+01 -0.999000000000000E+03 +0.318889386848833E+00
200905 +0.420390219873550E+01 +0.419383432179831E+01 +0.419496896330532E+01 -0.999000000000000E+03 +0.240063773737035E+00
200906 +0.424202411159723E+01 +0.424018043995733E+01 +0.422899945311302E+01 -0.999000000000000E+03 +0.307984397459039E+00
200907 +0.424099367412985E+01 +0.423795407398455E+01 +0.422801079934739E+01 -0.999000000000000E+03 +0.307068155655206E+00
200908 +0.421065112228508E+01 +0.421151800654101E+01 +0.421533944727804E+01 -0.999000000000000E+03 +0.111344418162524E+00
200909 +0.418791436399977E+01 +0.418977190978215E+01 +0.418186985043502E+01 -0.999000000000000E+03 +0.188959954033766E+00
200910 +0.422092805544928E+01 +0.422629618521187E+01 +0.421577615640610E+01 -0.999000000000000E+03 +0.249539548957927E+00
200911 +0.424620520037020E+01 +0.424867382065862E+01 +0.425046803977467E+01 -0.999000000000000E+03 +0.100391742822327E+00
200912 +0.421920584556219E+01 +0.421059677148962E+01 +0.422658652655659E+01 -0.999000000000000E+03 +0.379750328391540E+00
201001 +0.422188844521007E+01 +0.422343657487706E+01 +0.422428047812340E+01 +0.422355317783970E+01 +0.566578900503292E-01
201002 +0.422950638390151E+01 +0.423125209343200E+01 +0.423455021588486E+01 +0.424159078186718E+01 +0.285716508471569E+00
201003 +0.424641393611976E+01 +0.425026494327420E+01 +0.425031412921528E+01 +0.423598296388190E+01 +0.338319711282478E+00
201004 +0.421542851951732E+01 +0.421691557048534E+01 +0.422247028580502E+01 +0.422317825061482E+01 +0.183842071135016E+00
201005 +0.424769675121021E+01 +0.424227674053603E+01 +0.424240821598771E+01 +0.423534726743055E+01 +0.291581374557545E+00
201006 +0.419156838845022E+01 +0.419027742102521E+01 +0.418351726936159E+01 +0.419063603559271E+01 +0.192448568280049E+00
201007 +0.422275909285485E+01 +0.422121736302740E+01 +0.421511019497626E+01 +0.422125269419282E+01 +0.181463770216617E+00
201008 +0.421659183441020E+01 +0.421688010132628E+01 +0.421908029529720E+01 +0.421959903461415E+01 +0.713182665537598E-01
201009 +0.422418510036421E+01 +0.422551789741767E+01 +0.422114917232943E+01 +0.420651616334455E+01 +0.451721408768213E+00
201010 +0.427025794584369E+01 +0.427272318134546E+01 +0.426793911452801E+01 +0.426647333354643E+01 +0.146487445494689E+00
201011 +0.419899207390138E+01 +0.419999845728813E+01 +0.420203006003099E+01 +0.421484478222925E+01 +0.377536038384170E+00
201012 +0.422755101423289E+01 +0.422308934027078E+01 +0.423271079184003E+01 +0.423403738528588E+01 +0.259242562327497E+00
201101 +0.427444855771672E+01 +0.427596564191812E+01 +0.427604725021291E+01 +0.427546886123421E+01 +0.374011401613175E-01
201102 +0.425471766648035E+01 +0.425613134059661E+01 +0.425760268876158E+01 +0.426159635575813E+01 +0.161672050109741E+00
201103 +0.430167502401102E+01 +0.430358564382457E+01 +0.430344641851346E+01 +0.429555063321064E+01 +0.187054263819142E+00
201104 +0.428442660065748E+01 +0.428471036761333E+01 +0.428746334610481E+01 +0.428793050733605E+01 +0.817823948257445E-01
201105 +0.428734568041739E+01 +0.428477599571829E+01 +0.428394790879652E+01 +0.427954890793463E+01 +0.182186783011277E+00
201106 +0.429558388529775E+01 +0.429441747423030E+01 +0.428983616124615E+01 +0.429358770258306E+01 +0.133984698612081E+00
201107 +0.428385713255960E+01 +0.428330196013116E+01 +0.427900546342668E+01 +0.428235884106688E+01 +0.113383102087386E+00
201108 +0.429543220958055E+01 +0.429523746254696E+01 +0.429654610154425E+01 +0.429720672158337E+01 +0.458475009492035E-01
201109 +0.428778144641230E+01 +0.428903151534219E+01 +0.428674724187678E+01 +0.427894456465653E+01 +0.235734549332025E+00
201110 +0.424370703021232E+01 +0.424408696396371E+01 +0.424345222889313E+01 +0.424257172731416E+01 +0.357150508449539E-01
201111 +0.424821570228196E+01 +0.424809361465636E+01 +0.425103637973220E+01 +0.425831969078035E+01 +0.240721534212768E+00
201112 +0.425086365638660E+01 +0.424906967351210E+01 +0.425551376489794E+01 +0.425609160021622E+01 +0.165257979832539E+00
201201 +0.427220933703050E+01 +0.427419851499170E+01 +0.427354489363177E+01 +0.427304872510551E+01 +0.465608729413261E-01
201202 +0.429266000115266E+01 +0.429421048324464E+01 +0.429434302804340E+01 +0.429661429110676E+01 +0.921174738516043E-01
201203 +0.431524456655154E+01 +0.431584845388142E+01 +0.431547464340429E+01 +0.431139561004436E+01 +0.103280799068409E+00
201204 +0.430354115134930E+01 +0.430271574527655E+01 +0.430358000908090E+01 +0.430396130021703E+01 +0.289481112446707E-01
201205 +0.430888612646653E+01 +0.430831453477624E+01 +0.430625225140865E+01 +0.430305627468057E+01 +0.135481653360316E+00
201206 +0.433691852743266E+01 +0.433548983383773E+01 +0.433156797236656E+01 +0.433319648316612E+01 +0.123524670517406E+00
201207 +0.431509764216973E+01 +0.431534490484481E+01 +0.431143415131108E+01 +0.431311055120107E+01 +0.907065583395011E-01
201208 +0.433637110929484E+01 +0.433562876068255E+01 +0.433647985332010E+01 +0.433750144795533E+01 +0.431929802145282E-01
201209 +0.434201991903473E+01 +0.434360184375966E+01 +0.434264444525725E+01 +0.433908435090216E+01 +0.104111662557632E+00
201210 +0.427912962968120E+01 +0.427755026627259E+01 +0.428085435379492E+01 +0.428026711428558E+01 +0.772425177181832E-01
201211 +0.431669668736573E+01 +0.431540563850757E+01 +0.432023553055924E+01 +0.432440293216488E+01 +0.208492420203162E+00
201212 +0.433928341603747E+01 +0.433956215189967E+01 +0.434496605857676E+01 +0.434498677418424E+01 +0.131435483695067E+00
201301 +0.433878575176084E+01 +0.434190673205811E+01 +0.434030110827342E+01 +0.433972260648020E+01 +0.719321136333001E-01
201302 +0.435188705364651E+01 +0.435408855931148E+01 +0.435292625907366E+01 +0.435422837997882E+01 +0.538002550030272E-01
201303 +0.436030406608979E+01 +0.435980149947233E+01 +0.435906913001565E+01 +0.435745404189008E+01 +0.654057202282029E-01
201304 +0.437874082354193E+01 +0.437653249946868E+01 +0.437579468067966E+01 +0.437621655648615E+01 +0.673281787026339E-01
201305 +0.439773997330422E+01 +0.439897690689800E+01 +0.439499647318463E+01 +0.439194357859514E+01 +0.160141590550878E+00
201306 +0.439765810480846E+01 +0.439549330410335E+01 +0.439093021331220E+01 +0.439097578730257E+01 +0.153222464703774E+00
201307 +0.440151099542562E+01 +0.440264269758520E+01 +0.439782069032393E+01 +0.439837608855344E+01 +0.109645381219777E+00
201308 +0.438187013433918E+01 +0.438033398508724E+01 +0.438100979525653E+01 +0.438273117517020E+01 +0.547261941925303E-01
201309 +0.439011368307987E+01 +0.439255210711006E+01 +0.439260406346172E+01 +0.439210585078559E+01 +0.567270135040964E-01
201310 +0.442155792218005E+01 +0.441749546755882E+01 +0.442583417448948E+01 +0.442534543974388E+01 +0.188765489221039E+00
201311 +0.446226398468323E+01 +0.445937579972797E+01 +0.446769464688298E+01 +0.447012825298140E+01 +0.241120141838708E+00
201312 +0.446476043984065E+01 +0.446720433686671E+01 +0.447336025825094E+01 +0.447283072445495E+01 +0.192615449947730E+00
201401 +0.440891367145790E+01 +0.441420152360666E+01 +0.441111139412115E+01 +0.441025869960857E+01 +0.119935488485493E+00
201402 +0.442596163309417E+01 +0.442954428914642E+01 +0.442670166833888E+01 +0.442746649398200E+01 +0.809463874576712E-01
201403 +0.438561739854193E+01 +0.438384170233819E+01 +0.438250788441647E+01 +0.438282109941145E+01 +0.709528472617717E-01
201404 +0.440744913633878E+01 +0.440312550613350E+01 +0.440054090800083E+01 +0.440114328310225E+01 +0.156985890652368E+00
201405 +0.446355700689048E+01 +0.446701269336788E+01 +0.445979400305924E+01 +0.445587170163934E+01 +0.250029454942374E+00
201406 +0.449651010939692E+01 +0.449289124792492E+01 +0.448617358401659E+01 +0.448465133575909E+01 +0.264430225450668E+00
201407 +0.450124541866596E+01 +0.450363688802579E+01 +0.449630441389111E+01 +0.449592300764230E+01 +0.171575010745956E+00
201408 +0.452384208626695E+01 +0.452100267424794E+01 +0.452172733361207E+01 +0.452471939246687E+01 +0.822100424779329E-01
201409 +0.454493279547361E+01 +0.454903641932588E+01 +0.455011496179569E+01 +0.455251339913919E+01 +0.166792425910798E+00
201410 +0.457515973521054E+01 +0.456726688098771E+01 +0.458340572986130E+01 +0.458285341156484E+01 +0.353359006472055E+00
201411 +0.455192085529576E+01 +0.454647767103461E+01 +0.456104440935587E+01 +0.456255132260237E+01 +0.353540756840678E+00
201412 +0.455233968081340E+01 +0.455775925463290E+01 +0.456670879495032E+01 +0.456545339247824E+01 +0.315642398072318E+00
201501 +0.458371854223255E+01 +0.459292697629827E+01 +0.458732750323262E+01 +0.458591782084919E+01 +0.200894404420210E+00
201502 +0.455898085368272E+01 +0.456513284386929E+01 +0.455966715058025E+01 +0.456014833450363E+01 +0.134942224677110E+00
201503 +0.459452223211766E+01 +0.459088449872997E+01 +0.458850687316806E+01 +0.459085226867538E+01 +0.131096217481310E+00
201504 +0.460965605899889E+01 +0.460178319569144E+01 +0.459649463922583E+01 +0.459747729062972E+01 +0.286336019207819E+00
201505 +0.458064580064208E+01 +0.458746631443710E+01 +0.457461529721930E+01 +0.456852276222757E+01 +0.414653777500089E+00
201506 +0.457984700329074E+01 +0.457357388981915E+01 +0.456247374730744E+01 +0.455887882492344E+01 +0.459941559592776E+00
201507 +0.461855579859971E+01 +0.462300016321436E+01 +0.461072541561773E+01 +0.460928071194813E+01 +0.297648421166079E+00
201508 +0.462236454181029E+01 +0.461728017930347E+01 +0.461829402030461E+01 +0.462354907096832E+01 +0.135770224491847E+00
201509 +0.468073028186711E+01 +0.468751653106389E+01 +0.468997935701784E+01 +0.469606988335927E+01 +0.327718124489760E+00
201510 -0.999000000000000E+03 +0.470201955013485E+01 +0.473131097156365E+01 +0.473051189399044E+01 +0.622954054454381E+00
201511 -0.999000000000000E+03 +0.468185015176363E+01 +0.470749582321223E+01 +0.470857580964676E+01 +0.570835396623372E+00
201512 -0.999000000000000E+03 +0.463933450874913E+01 +0.465404577272244E+01 +0.465164814879256E+01 +0.317098582686202E+00
201601 -0.999000000000000E+03 +0.461661746180163E+01 +0.460665158637277E+01 +0.460421739658214E+01 +0.269319716065007E+00
201602 -0.999000000000000E+03 +0.460656667521487E+01 +0.459666521856987E+01 +0.459702234486664E+01 +0.215405216046754E+00
201603 -0.999000000000000E+03 +0.461143398210797E+01 +0.460722401213093E+01 +0.461237943586512E+01 +0.111898699099729E+00
201604 -0.999000000000000E+03 +0.460136986524921E+01 +0.459162340679935E+01 +0.459331222971028E+01 +0.212266067714193E+00
201605 -0.999000000000000E+03 +0.454533992186968E+01 +0.452259455270646E+01 +0.451231120194081E+01 +0.731969016557526E+00
201606 -0.999000000000000E+03 +0.455499097943246E+01 +0.453582700885772E+01 +0.452896716048541E+01 +0.574608250068614E+00
201607 -0.999000000000000E+03 +0.450738632245711E+01 +0.448609839551739E+01 +0.448311126012150E+01 +0.541478025574486E+00
201608 -0.999000000000000E+03 +0.450607757236544E+01 +0.450771683420214E+01 +0.451697770816552E+01 +0.241898538696617E+00
201609 -0.999000000000000E+03 +0.445341431321202E+01 +0.445950234169809E+01 +0.447130487307298E+01 +0.401726823571988E+00
201610 -0.999000000000000E+03 -0.999000000000000E+03 +0.439666571698231E+01 +0.439535486697693E+01 +0.298235306373854E-01
201611 -0.999000000000000E+03 -0.999000000000000E+03 +0.440554628671307E+01 +0.440655752259084E+01 +0.229536999944348E-01
201612 -0.999000000000000E+03 -0.999000000000000E+03 +0.443155278171310E+01 +0.442721776711479E+01 +0.979173563701534E-01
201701 -0.999000000000000E+03 -0.999000000000000E+03 +0.448586519818590E+01 +0.448159920475190E+01 +0.951890885171417E-01
201702 -0.999000000000000E+03 -0.999000000000000E+03 +0.448516362625917E+01 +0.448551513545370E+01 +0.783715431205967E-02
201703 -0.999000000000000E+03 -0.999000000000000E+03 +0.447083305459878E+01 +0.448050829689434E+01 +0.216408042469928E+00
201704 -0.999000000000000E+03 -0.999000000000000E+03 +0.448355419765185E+01 +0.448650928824013E+01 +0.659095542957345E-01
201705 -0.999000000000000E+03 -0.999000000000000E+03 +0.451227040488985E+01 +0.449438577693101E+01 +0.397932639664355E+00
201706 -0.999000000000000E+03 -0.999000000000000E+03 +0.450255178575317E+01 +0.449015195059291E+01 +0.276156248089176E+00
201707 -0.999000000000000E+03 -0.999000000000000E+03 +0.450697763920415E+01 +0.450145739207368E+01 +0.122632442110792E+00
201708 -0.999000000000000E+03 -0.999000000000000E+03 +0.445448429458658E+01 +0.447082235001691E+01 +0.366777708705294E+00
201709 -0.999000000000000E+03 -0.999000000000000E+03 +0.444483819682004E+01 +0.446549562928022E+01 +0.464751056066593E+00
201710 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.449790452963358E+01 -0.999000000000000E+03
201711 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.449482892279643E+01 -0.999000000000000E+03
201712 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.450642086028203E+01 -0.999000000000000E+03
201801 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.450667376098413E+01 -0.999000000000000E+03
201802 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.449721916256219E+01 -0.999000000000000E+03
201803 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.447494845512949E+01 -0.999000000000000E+03
201804 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.449220612187017E+01 -0.999000000000000E+03
201805 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.454053987831101E+01 -0.999000000000000E+03
201806 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.452962508904951E+01 -0.999000000000000E+03
201807 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.451449334069940E+01 -0.999000000000000E+03
201808 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.446450100288312E+01 -0.999000000000000E+03
201809 -0.999000000000000E+03 -0.999000000000000E+03 -0.999000000000000E+03 +0.445336770388805E+01 -0.999000000000000E+03
|
with Ada.Text_IO; use Ada.Text_IO;
package body NewLineExamples is
function Text_New_Lines (Text : String) return String
is
begin
return Text & ASCII.CR & ASCII.LF & ASCII.CR & ASCII.LF;
end Text_New_Lines;
function Twice_Text_New_Line (Text : String) return String
is
begin
return Text & ASCII.CR & ASCII.LF & Text & ASCII.CR & ASCII.LF;
end Twice_Text_New_Line;
Nl : constant String := (1 => ASCII.CR, 2 => ASCII.LF);
function Text_Duplicate (Text : String) return String
is
begin
return Text & Nl & Text & Nl;
end Text_Duplicate;
function Text_Dupl (Text : String) return String
is
begin
declare
EndOfLine : constant String := ASCII.CR & ASCII.LF;
begin
return Text & EndOfLine & Text & EndOfLine;
end;
end Text_Dupl;
function Text_Twice (Text : String) return String
is
CrLf : constant String := ASCII.CR & ASCII.LF;
begin
return Text & CrLf & Text & CrLf;
end Text_Twice;
function Text_Thrice (Text : String) return String
is
NewLine : constant String := (ASCII.CR & ASCII.LF);
begin
return Text & NewLine & Text & NewLine & Text & NewLine;
end Text_Thrice;
function Twice_Text (Text : String) return String
is
New_Line : constant String := "" & ASCII.CR & ASCII.LF;
begin
return New_Line & Text & New_Line & Text;
end Twice_Text;
end NewLineExamples;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of STMicroelectronics nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
-- This file is based on: --
-- @file stm32f769i_discovery_sd.h --
-- @author MCD Application Team --
------------------------------------------------------------------------------
with Ada.Interrupts.Names;
with HAL.SDMMC;
with STM32.SDMMC;
with HAL; use HAL;
with HAL.Block_Drivers; use HAL.Block_Drivers;
package SDCard is
SD_Rx_IRQ : Ada.Interrupts.Interrupt_ID renames
Ada.Interrupts.Names.DMA2_Stream0_Interrupt;
SD_Tx_IRQ : Ada.Interrupts.Interrupt_ID renames
Ada.Interrupts.Names.DMA2_Stream5_Interrupt;
SD_Interrupt : Ada.Interrupts.Interrupt_ID renames
Ada.Interrupts.Names.SDMMC2_Interrupt;
type SDCard_Controller
(Device : not null access STM32.SDMMC.SDMMC_Controller) is
limited new Block_Driver with private;
Device_Error : exception;
procedure Initialize
(This : in out SDCard_Controller);
-- Initilizes the Controller's pins
function Card_Present
(This : in out SDCard_Controller) return Boolean;
-- Whether a SD-Card is present in the sdcard reader
function Get_Card_Information
(This : in out SDCard_Controller)
return HAL.SDMMC.Card_Information
with Pre => This.Card_Present;
-- Retrieves the card informations
function Block_Size
(This : in out SDCard_Controller)
return UInt32;
-- The insterted card block size. 512 Bytes for sd-cards
overriding function Read
(This : in out SDCard_Controller;
Block_Number : UInt64;
Data : out Block) return Boolean
with Pre => Data'Length <= 16#10000#;
-- Reads Data.
-- Data size needs to be a multiple of the card's block size and maximum
-- length is 2**16
overriding function Write
(This : in out SDCard_Controller;
Block_Number : UInt64;
Data : Block) return Boolean
with Pre => Data'Length <= 16#10000#;
-- Writes Data.
-- Data size needs to be a multiple of the card's block size and maximum
-- length is 2**16
private
type SDCard_Controller
(Device : not null access STM32.SDMMC.SDMMC_Controller) is
limited new HAL.Block_Drivers.Block_Driver with record
Info : HAL.SDMMC.Card_Information;
Has_Info : Boolean := False;
Card_Detected : Boolean := False;
end record;
end SDCard;
|
with Ada.Text_IO;
use Ada.Text_IO;
with Ada.Float_Text_IO;
use Ada.Float_Text_IO;
with Alea;
-- Évaluer la qualité du générateur aléatoire dans plusieurs
-- configurations.
procedure Evaluer_Alea is
Capacity : Constant Integer := 10000;
Type T_List is array(1..Capacity) of Integer;
Type T_Generator is record
List : T_List;
Length : Integer; -- { 10 <= Length <= Capacity }
end record;
function Init_Generator ( Length : In Integer) return T_Generator is
package Mon_Alea is
new Alea (1, Length);
use Mon_Alea;
Generator : T_Generator;
begin
Generator.Length := Length;
for i in 1..Generator.Length loop
Get_Random_Number (Generator.List(i));
end loop;
return Generator;
end Init_Generator;
procedure Print_Generator( Generator : In T_Generator) is
begin
for i in 1 .. Generator.Length loop
Put(Integer'Image(Generator.List(i)));
end loop;
end Print_Generator;
function Occurrence ( Generator : In T_Generator; Item : In Integer) return Integer is
Count : Integer;
begin
Count := 0;
for i in 1..Generator.Length loop
if Generator.List(i) = Item then
Count := Count + 1;
end if;
end loop;
return Count;
end Occurrence;
function Max_Frequency (Generator : In T_Generator) return Integer is
Maxi_Frequency : Integer;
begin
Maxi_Frequency := Occurrence (Generator, Generator.List(1));
for i in 2..Generator.Length loop
if Occurrence (Generator, Generator.List(i)) > Maxi_Frequency then
Maxi_Frequency := Occurrence (Generator, Generator.List(i));
end if;
end loop;
return Maxi_Frequency;
end Max_Frequency;
function Min_Frequency (Generator : In T_Generator) return Integer is
Mini_Frequency : Integer;
begin
Mini_Frequency := Occurrence (Generator, Generator.List(1));
for i in 2..Generator.Length loop
if Occurrence (Generator, Generator.List(i)) < Mini_Frequency then
Mini_Frequency := Occurrence (Generator, Generator.List(i));
end if;
end loop;
return Mini_Frequency;
end Min_Frequency;
-- Évaluer la qualité du générateur de nombre aléatoire Alea sur un
-- intervalle donné en calculant les fréquences absolues minimales et
-- maximales des entiers obtenus lors de plusieurs tirages aléatoire
-- ainsi que la fréquence moyenne théorique.
--
-- Paramètres :
-- Borne: in Entier -- le nombre aléatoire est dans 1..Borne
-- Taille: in Entier -- nombre de tirages à faire (taille de l'échantillon)
-- Min, Max: out Entier -- fréquence minimale et maximale
-- Moyenne: out Float -- fréquence moyenne théorique
--
-- Nécessite :
-- Borne > 1
-- Taille > 1
--
-- Assure : -- poscondition peu intéressante !
-- 0 <= Min Et Min <= Taille
-- 0 <= Max Et Max <= Taille
-- Min + Max <= Taille
-- Moyenne = Réel(Taille) / Réel(Borne)
-- Min <= Moyenne Et Moyenne <= Max
--
-- Remarque : On ne peut ni formaliser les 'vraies' postconditions,
-- ni écrire de programme de test car on ne maîtrise par le générateur
-- aléatoire. Pour écrire un programme de test, on pourrait remplacer
-- le générateur par un générateur qui fournit une séquence connue
-- d'entiers et pour laquelle on pourrait déterminer les données
-- statistiques demandées.
-- Ici, pour tester on peut afficher les nombres aléatoires et refaire
-- les calculs par ailleurs pour vérifier que le résultat produit est
-- le bon.
procedure Calculer_Statistiques (
Generator : In T_Generator;
Borne : in Integer; -- Borne supérieur de l'intervalle de recherche
Taille : in Integer; -- Taille de l'échantillon
Min, Max : out Integer; -- min et max des fréquences de l'échantillon
Moyenne : out Float -- moyenne des fréquences
) with
Pre => Borne > 1 and Taille > 1,
Post => 0 <= Min and Min <= Taille
and 0 <= Max and Max <= Taille
and Min + Max <= Taille
and Moyenne = Float (Taille) / Float (Borne)
and Float (Min) <= Moyenne and Moyenne <= Float (Max)
is
begin
Moyenne := Float(Taille) / Float(Borne);
Min := Min_Frequency (Generator);
Max := Max_Frequency (Generator);
end Calculer_Statistiques;
-- Afficher les données statistiques
-- Paramètres:
-- Min, Max : in Entier -- le min et le max
-- Moyenne : in Réel -- la moyenne
procedure Afficher_Statistiques (Min, Max: Integer; Moyenne: in Float) is
begin
New_Line;
Put_Line ("Min =" & Integer'Image (Min));
Put_Line ("Max =" & Integer'Image (Max));
Put ("Moyenne = ");
Put (Moyenne, 1, 2, 0);
-- Put d'un réel accepte trois paramètres supplémentaires
-- le nombre de positions à utiliser avant le '.' (ici 1)
-- le nombre de positions pour la partie décimale (ici 2)
-- le nombre de positions pour l'exposant (ici 0)
New_Line;
end Afficher_Statistiques;
Generator : T_Generator;
Min, Max: Integer; -- fréquence minimale et maximale d'un échantillon
Moyenne: Float; -- fréquences moyenne de l'échantillon
begin
-- Calculer les statistiques pour un dé à 6 faces et un petit échantillon
Generator := Init_Generator (20);
Print_Generator (Generator);
Calculer_Statistiques (Generator, 6, 20, Min, Max, Moyenne);
Afficher_Statistiques (Min, Max, Moyenne);
New_Line;
-- -- Calculer les statistiques pour un dé à 6 faces et un échantillon grand
Generator := Init_Generator (10000);
Calculer_Statistiques (Generator, 6, 10000, Min, Max, Moyenne);
Afficher_Statistiques (Min, Max, Moyenne);
New_Line;
-- -- Calculer les statistiques pour un dé à 6 faces et un échantillon
-- très grand
Generator := Init_Generator (10e6);
Calculer_Statistiques (Generator,6, 10e6, Min, Max, Moyenne);
Afficher_Statistiques (Min, Max, Moyenne);
New_Line;
-- -- Calculer les statistiques pour un dé à 6 faces et un échantillon
-- très, très grand
Generator := Init_Generator (10e8);
Calculer_Statistiques (Generator, 6, 10e8, Min, Max, Moyenne);
Afficher_Statistiques (Min, Max, Moyenne);
New_Line;
end Evaluer_Alea;
|
-- SPDX-FileCopyrightText: 2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with WebIDL.Arguments;
with WebIDL.Interface_Members;
package WebIDL.Constructors is
pragma Preelaborate;
type Constructor is limited interface
and WebIDL.Interface_Members.Interface_Member;
type Constructor_Access is access all Constructor'Class
with Storage_Size => 0;
not overriding function Arguments (Self : Constructor)
return not null WebIDL.Arguments.Argument_Iterator_Access is abstract;
end WebIDL.Constructors;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- M L I B . T G T --
-- (VxWorks Version) --
-- --
-- B o d y --
-- --
-- Copyright (C) 2003-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package provides a set of target dependent routines to build
-- static libraries.
-- This is the VxWorks version of the body
with MLib.Fil;
with Namet; use Namet;
with Prj.Com;
with Sdefault;
package body MLib.Tgt is
-----------------------
-- Local Subprograms --
-----------------------
function Get_Target_Suffix return String;
-- Returns the required suffix for some utilities
-- (such as ar and ranlib) that depend on the real target.
---------------------
-- Archive_Builder --
---------------------
function Archive_Builder return String is
begin
return "ar" & Get_Target_Suffix;
end Archive_Builder;
-----------------------------
-- Archive_Builder_Options --
-----------------------------
function Archive_Builder_Options return String_List_Access is
begin
return new String_List'(1 => new String'("cr"));
end Archive_Builder_Options;
-----------------
-- Archive_Ext --
-----------------
function Archive_Ext return String is
begin
return "a";
end Archive_Ext;
---------------------
-- Archive_Indexer --
---------------------
function Archive_Indexer return String is
begin
return "ranlib" & Get_Target_Suffix;
end Archive_Indexer;
-----------------------------
-- Archive_Indexer_Options --
-----------------------------
function Archive_Indexer_Options return String_List_Access is
begin
return new String_List (1 .. 0);
end Archive_Indexer_Options;
---------------------------
-- Build_Dynamic_Library --
---------------------------
procedure Build_Dynamic_Library
(Ofiles : Argument_List;
Foreign : Argument_List;
Afiles : Argument_List;
Options : Argument_List;
Options_2 : Argument_List;
Interfaces : Argument_List;
Lib_Filename : String;
Lib_Dir : String;
Symbol_Data : Symbol_Record;
Driver_Name : Name_Id := No_Name;
Lib_Version : String := "";
Auto_Init : Boolean := False)
is
pragma Unreferenced (Ofiles);
pragma Unreferenced (Foreign);
pragma Unreferenced (Afiles);
pragma Unreferenced (Options);
pragma Unreferenced (Options_2);
pragma Unreferenced (Interfaces);
pragma Unreferenced (Lib_Filename);
pragma Unreferenced (Lib_Dir);
pragma Unreferenced (Symbol_Data);
pragma Unreferenced (Driver_Name);
pragma Unreferenced (Lib_Version);
pragma Unreferenced (Auto_Init);
begin
null;
end Build_Dynamic_Library;
-------------
-- DLL_Ext --
-------------
function DLL_Ext return String is
begin
return "";
end DLL_Ext;
----------------
-- DLL_Prefix --
----------------
function DLL_Prefix return String is
begin
return "lib";
end DLL_Prefix;
--------------------
-- Dynamic_Option --
--------------------
function Dynamic_Option return String is
begin
return "";
end Dynamic_Option;
-----------------------------
-- Get_Target_Suffix --
-----------------------------
function Get_Target_Suffix return String is
Target_Name : constant String_Ptr := Sdefault.Target_Name;
Index : Positive := Target_Name'First;
begin
while Index < Target_Name'Last
and then Target_Name (Index + 1) /= '-'
loop
Index := Index + 1;
end loop;
if Target_Name (Target_Name'First .. Index) = "m68k" then
return "68k";
elsif Target_Name (Target_Name'First .. Index) = "mips" then
return "mips";
elsif Target_Name (Target_Name'First .. Index) = "powerpc" then
return "ppc";
elsif Target_Name (Target_Name'First .. Index) = "sparc" then
return "sparc";
elsif Target_Name (Target_Name'First .. Index) = "sparc64" then
return "sparc64";
elsif Target_Name (Target_Name'First .. Index) = "xscale" then
return "arm";
else
return "";
end if;
end Get_Target_Suffix;
-------------------
-- Is_Object_Ext --
-------------------
function Is_Object_Ext (Ext : String) return Boolean is
begin
return Ext = ".o";
end Is_Object_Ext;
--------------
-- Is_C_Ext --
--------------
function Is_C_Ext (Ext : String) return Boolean is
begin
return Ext = ".c";
end Is_C_Ext;
--------------------
-- Is_Archive_Ext --
--------------------
function Is_Archive_Ext (Ext : String) return Boolean is
begin
return Ext = ".a";
end Is_Archive_Ext;
-------------
-- Libgnat --
-------------
function Libgnat return String is
begin
return "libgnat.a";
end Libgnat;
------------------------
-- Library_Exists_For --
------------------------
function Library_Exists_For
(Project : Project_Id; In_Tree : Project_Tree_Ref) return Boolean
is
begin
if not In_Tree.Projects.Table (Project).Library then
Prj.Com.Fail ("INTERNAL ERROR: Library_Exists_For called " &
"for non library project");
return False;
else
declare
Lib_Dir : constant String :=
Get_Name_String
(In_Tree.Projects.Table (Project).Library_Dir);
Lib_Name : constant String :=
Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin
if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, Archive_Ext));
else
return Is_Regular_File
(Lib_Dir & Directory_Separator & "lib" &
Fil.Ext_To (Lib_Name, DLL_Ext));
end if;
end;
end if;
end Library_Exists_For;
---------------------------
-- Library_File_Name_For --
---------------------------
function Library_File_Name_For
(Project : Project_Id;
In_Tree : Project_Tree_Ref) return Name_Id
is
begin
if not In_Tree.Projects.Table (Project).Library then
Prj.Com.Fail ("INTERNAL ERROR: Library_File_Name_For called " &
"for non library project");
return No_Name;
else
declare
Lib_Name : constant String :=
Get_Name_String
(In_Tree.Projects.Table (Project).Library_Name);
begin
Name_Len := 3;
Name_Buffer (1 .. Name_Len) := "lib";
if In_Tree.Projects.Table (Project).Library_Kind =
Static
then
Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, Archive_Ext));
else
Add_Str_To_Name_Buffer (Fil.Ext_To (Lib_Name, DLL_Ext));
end if;
return Name_Find;
end;
end if;
end Library_File_Name_For;
----------------
-- Object_Ext --
----------------
function Object_Ext return String is
begin
return "o";
end Object_Ext;
----------------
-- PIC_Option --
----------------
function PIC_Option return String is
begin
return "";
end PIC_Option;
-----------------------------------------------
-- Standalone_Library_Auto_Init_Is_Supported --
-----------------------------------------------
function Standalone_Library_Auto_Init_Is_Supported return Boolean is
begin
return False;
end Standalone_Library_Auto_Init_Is_Supported;
---------------------------
-- Support_For_Libraries --
---------------------------
function Support_For_Libraries return Library_Support is
begin
return Static_Only;
end Support_For_Libraries;
end MLib.Tgt;
|
--
-- Copyright (C) 2017, AdaCore
--
-- This spec has been automatically generated from STM32F429x.svd
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package Interfaces.STM32.GPIO is
pragma Preelaborate;
pragma No_Elaboration_Code_All;
---------------
-- Registers --
---------------
-- MODER array element
subtype MODER_Element is Interfaces.STM32.UInt2;
-- MODER array
type MODER_Field_Array is array (0 .. 15) of MODER_Element
with Component_Size => 2, Size => 32;
-- GPIO port mode register
type MODER_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MODER as a value
Val : Interfaces.STM32.UInt32;
when True =>
-- MODER as an array
Arr : MODER_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access,
Bit_Order => System.Low_Order_First;
for MODER_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- OTYPER_OT array element
subtype OTYPER_OT_Element is Interfaces.STM32.Bit;
-- OTYPER_OT array
type OTYPER_OT_Field_Array is array (0 .. 15) of OTYPER_OT_Element
with Component_Size => 1, Size => 16;
-- Type definition for OTYPER_OT
type OTYPER_OT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- OT as a value
Val : Interfaces.STM32.UInt16;
when True =>
-- OT as an array
Arr : OTYPER_OT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for OTYPER_OT_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- GPIO port output type register
type OTYPER_Register is record
-- Port x configuration bits (y = 0..15)
OT : OTYPER_OT_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : Interfaces.STM32.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTYPER_Register use record
OT at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- OSPEEDR array element
subtype OSPEEDR_Element is Interfaces.STM32.UInt2;
-- OSPEEDR array
type OSPEEDR_Field_Array is array (0 .. 15) of OSPEEDR_Element
with Component_Size => 2, Size => 32;
-- GPIO port output speed register
type OSPEEDR_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- OSPEEDR as a value
Val : Interfaces.STM32.UInt32;
when True =>
-- OSPEEDR as an array
Arr : OSPEEDR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access,
Bit_Order => System.Low_Order_First;
for OSPEEDR_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- PUPDR array element
subtype PUPDR_Element is Interfaces.STM32.UInt2;
-- PUPDR array
type PUPDR_Field_Array is array (0 .. 15) of PUPDR_Element
with Component_Size => 2, Size => 32;
-- GPIO port pull-up/pull-down register
type PUPDR_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PUPDR as a value
Val : Interfaces.STM32.UInt32;
when True =>
-- PUPDR as an array
Arr : PUPDR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access,
Bit_Order => System.Low_Order_First;
for PUPDR_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- IDR array element
subtype IDR_Element is Interfaces.STM32.Bit;
-- IDR array
type IDR_Field_Array is array (0 .. 15) of IDR_Element
with Component_Size => 1, Size => 16;
-- Type definition for IDR
type IDR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- IDR as a value
Val : Interfaces.STM32.UInt16;
when True =>
-- IDR as an array
Arr : IDR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for IDR_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- GPIO port input data register
type IDR_Register is record
-- Read-only. Port input data (y = 0..15)
IDR : IDR_Field;
-- unspecified
Reserved_16_31 : Interfaces.STM32.UInt16;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IDR_Register use record
IDR at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- ODR array element
subtype ODR_Element is Interfaces.STM32.Bit;
-- ODR array
type ODR_Field_Array is array (0 .. 15) of ODR_Element
with Component_Size => 1, Size => 16;
-- Type definition for ODR
type ODR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- ODR as a value
Val : Interfaces.STM32.UInt16;
when True =>
-- ODR as an array
Arr : ODR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for ODR_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- GPIO port output data register
type ODR_Register is record
-- Port output data (y = 0..15)
ODR : ODR_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : Interfaces.STM32.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ODR_Register use record
ODR at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- BSRR_BS array element
subtype BSRR_BS_Element is Interfaces.STM32.Bit;
-- BSRR_BS array
type BSRR_BS_Field_Array is array (0 .. 15) of BSRR_BS_Element
with Component_Size => 1, Size => 16;
-- Type definition for BSRR_BS
type BSRR_BS_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- BS as a value
Val : Interfaces.STM32.UInt16;
when True =>
-- BS as an array
Arr : BSRR_BS_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for BSRR_BS_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- BSRR_BR array element
subtype BSRR_BR_Element is Interfaces.STM32.Bit;
-- BSRR_BR array
type BSRR_BR_Field_Array is array (0 .. 15) of BSRR_BR_Element
with Component_Size => 1, Size => 16;
-- Type definition for BSRR_BR
type BSRR_BR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- BR as a value
Val : Interfaces.STM32.UInt16;
when True =>
-- BR as an array
Arr : BSRR_BR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for BSRR_BR_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- GPIO port bit set/reset register
type BSRR_Register is record
-- Write-only. Port x set bit y (y= 0..15)
BS : BSRR_BS_Field := (As_Array => False, Val => 16#0#);
-- Write-only. Port x set bit y (y= 0..15)
BR : BSRR_BR_Field := (As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BSRR_Register use record
BS at 0 range 0 .. 15;
BR at 0 range 16 .. 31;
end record;
-- LCKR_LCK array element
subtype LCKR_LCK_Element is Interfaces.STM32.Bit;
-- LCKR_LCK array
type LCKR_LCK_Field_Array is array (0 .. 15) of LCKR_LCK_Element
with Component_Size => 1, Size => 16;
-- Type definition for LCKR_LCK
type LCKR_LCK_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- LCK as a value
Val : Interfaces.STM32.UInt16;
when True =>
-- LCK as an array
Arr : LCKR_LCK_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for LCKR_LCK_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
subtype LCKR_LCKK_Field is Interfaces.STM32.Bit;
-- GPIO port configuration lock register
type LCKR_Register is record
-- Port x lock bit y (y= 0..15)
LCK : LCKR_LCK_Field := (As_Array => False, Val => 16#0#);
-- Port x lock bit y (y= 0..15)
LCKK : LCKR_LCKK_Field := 16#0#;
-- unspecified
Reserved_17_31 : Interfaces.STM32.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for LCKR_Register use record
LCK at 0 range 0 .. 15;
LCKK at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
-- AFRL array element
subtype AFRL_Element is Interfaces.STM32.UInt4;
-- AFRL array
type AFRL_Field_Array is array (0 .. 7) of AFRL_Element
with Component_Size => 4, Size => 32;
-- GPIO alternate function low register
type AFRL_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AFRL as a value
Val : Interfaces.STM32.UInt32;
when True =>
-- AFRL as an array
Arr : AFRL_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access,
Bit_Order => System.Low_Order_First;
for AFRL_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- AFRH array element
subtype AFRH_Element is Interfaces.STM32.UInt4;
-- AFRH array
type AFRH_Field_Array is array (8 .. 15) of AFRH_Element
with Component_Size => 4, Size => 32;
-- GPIO alternate function high register
type AFRH_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AFRH as a value
Val : Interfaces.STM32.UInt32;
when True =>
-- AFRH as an array
Arr : AFRH_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access,
Bit_Order => System.Low_Order_First;
for AFRH_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- General-purpose I/Os
type GPIO_Peripheral is record
-- GPIO port mode register
MODER : aliased MODER_Register;
-- GPIO port output type register
OTYPER : aliased OTYPER_Register;
-- GPIO port output speed register
OSPEEDR : aliased OSPEEDR_Register;
-- GPIO port pull-up/pull-down register
PUPDR : aliased PUPDR_Register;
-- GPIO port input data register
IDR : aliased IDR_Register;
-- GPIO port output data register
ODR : aliased ODR_Register;
-- GPIO port bit set/reset register
BSRR : aliased BSRR_Register;
-- GPIO port configuration lock register
LCKR : aliased LCKR_Register;
-- GPIO alternate function low register
AFRL : aliased AFRL_Register;
-- GPIO alternate function high register
AFRH : aliased AFRH_Register;
end record
with Volatile;
for GPIO_Peripheral use record
MODER at 16#0# range 0 .. 31;
OTYPER at 16#4# range 0 .. 31;
OSPEEDR at 16#8# range 0 .. 31;
PUPDR at 16#C# range 0 .. 31;
IDR at 16#10# range 0 .. 31;
ODR at 16#14# range 0 .. 31;
BSRR at 16#18# range 0 .. 31;
LCKR at 16#1C# range 0 .. 31;
AFRL at 16#20# range 0 .. 31;
AFRH at 16#24# range 0 .. 31;
end record;
-- General-purpose I/Os
GPIOA_Periph : aliased GPIO_Peripheral
with Import, Address => System'To_Address (16#40020000#);
-- General-purpose I/Os
GPIOB_Periph : aliased GPIO_Peripheral
with Import, Address => System'To_Address (16#40020400#);
-- General-purpose I/Os
GPIOC_Periph : aliased GPIO_Peripheral
with Import, Address => System'To_Address (16#40020800#);
-- General-purpose I/Os
GPIOD_Periph : aliased GPIO_Peripheral
with Import, Address => System'To_Address (16#40020C00#);
-- General-purpose I/Os
GPIOE_Periph : aliased GPIO_Peripheral
with Import, Address => System'To_Address (16#40021000#);
-- General-purpose I/Os
GPIOF_Periph : aliased GPIO_Peripheral
with Import, Address => System'To_Address (16#40021400#);
-- General-purpose I/Os
GPIOG_Periph : aliased GPIO_Peripheral
with Import, Address => System'To_Address (16#40021800#);
-- General-purpose I/Os
GPIOH_Periph : aliased GPIO_Peripheral
with Import, Address => System'To_Address (16#40021C00#);
-- General-purpose I/Os
GPIOI_Periph : aliased GPIO_Peripheral
with Import, Address => System'To_Address (16#40022000#);
-- General-purpose I/Os
GPIOJ_Periph : aliased GPIO_Peripheral
with Import, Address => System'To_Address (16#40022400#);
-- General-purpose I/Os
GPIOK_Periph : aliased GPIO_Peripheral
with Import, Address => System'To_Address (16#40022800#);
end Interfaces.STM32.GPIO;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . T A G S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2010, 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 HI-E version of this file. Some functionality has been
-- removed in order to simplify this run-time unit.
with Ada.Unchecked_Conversion;
with System.Storage_Elements; use System.Storage_Elements;
package body Ada.Tags is
-----------------------
-- Local Subprograms --
-----------------------
function Length (Str : Cstring_Ptr) return Natural;
-- Length of string represented by the given pointer (treating the string
-- as a C-style string, which is Nul terminated).
-- Unchecked Conversions
function To_Addr_Ptr is
new Ada.Unchecked_Conversion (System.Address, Addr_Ptr);
function To_Address is
new Ada.Unchecked_Conversion (Tag, System.Address);
function To_Type_Specific_Data_Ptr is
new Ada.Unchecked_Conversion (System.Address, Type_Specific_Data_Ptr);
-------------------
-- Expanded_Name --
-------------------
function Expanded_Name (T : Tag) return String is
Result : Cstring_Ptr;
TSD_Ptr : Addr_Ptr;
TSD : Type_Specific_Data_Ptr;
begin
if T = No_Tag then
raise Tag_Error;
end if;
TSD_Ptr := To_Addr_Ptr (To_Address (T) - DT_Typeinfo_Ptr_Size);
TSD := To_Type_Specific_Data_Ptr (TSD_Ptr.all);
Result := TSD.Expanded_Name;
return Result (1 .. Length (Result));
end Expanded_Name;
------------------
-- External_Tag --
------------------
function External_Tag (T : Tag) return String is
Result : Cstring_Ptr;
TSD_Ptr : Addr_Ptr;
TSD : Type_Specific_Data_Ptr;
begin
if T = No_Tag then
raise Tag_Error;
end if;
TSD_Ptr := To_Addr_Ptr (To_Address (T) - DT_Typeinfo_Ptr_Size);
TSD := To_Type_Specific_Data_Ptr (TSD_Ptr.all);
Result := TSD.External_Tag;
return Result (1 .. Length (Result));
end External_Tag;
------------
-- Length --
------------
function Length (Str : Cstring_Ptr) return Natural is
Len : Integer;
begin
Len := 1;
while Str (Len) /= ASCII.NUL loop
Len := Len + 1;
end loop;
return Len - 1;
end Length;
----------------
-- Parent_Tag --
----------------
function Parent_Tag (T : Tag) return Tag is
TSD_Ptr : Addr_Ptr;
TSD : Type_Specific_Data_Ptr;
begin
if T = No_Tag then
raise Tag_Error;
end if;
TSD_Ptr := To_Addr_Ptr (To_Address (T) - DT_Typeinfo_Ptr_Size);
TSD := To_Type_Specific_Data_Ptr (TSD_Ptr.all);
-- The Parent_Tag of a root-level tagged type is defined to be No_Tag.
-- The first entry in the Ancestors_Tags array will be null for such
-- a type, but it's better to be explicit about returning No_Tag in
-- this case.
if TSD.Idepth = 0 then
return No_Tag;
else
return TSD.Tags_Table (1);
end if;
end Parent_Tag;
end Ada.Tags;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 6 3 --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-1999 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-6307, 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 = 63
package System.Pack_63 is
pragma Preelaborate (Pack_63);
Bits : constant := 63;
type Bits_63 is mod 2 ** Bits;
for Bits_63'Size use Bits;
function Get_63 (Arr : System.Address; N : Natural) return Bits_63;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is extracted and returned.
procedure Set_63 (Arr : System.Address; N : Natural; E : Bits_63);
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is set to the given value.
end System.Pack_63;
|
with Ada.Text_IO;
use Ada.Text_IO;
procedure Main is
begin
-- Say hello!
Put_Line("Hello, World!");
end Main;
|
-- part of OpenGLAda, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "COPYING"
package GL.Objects.Vertex_Arrays is
type Vertex_Array_Object is new GL_Object with private;
procedure Bind (Object : Vertex_Array_Object);
procedure Draw_Arrays (Mode : Connection_Mode; First, Count : Size);
procedure Draw_Arrays_Instanced (Mode : Connection_Mode;
First, Count, Instances : Size);
function Current_Array_Object return Vertex_Array_Object;
-- bind this object to unbind the current array object.
Null_Array_Object : constant Vertex_Array_Object;
-- Specifies the vertex array element index used to indicate that a new
-- primitive should be started during rendering. When processing of
-- vertex-array element indices encounters a value that matches index, no
-- vertex data is processed, the current graphics primitive is terminated,
-- and a new one of the identical type is started from the next vertex.
procedure Set_Primitive_Restart_Index (Index : UInt);
private
type Vertex_Array_Object is new GL_Object with null record;
overriding
procedure Internal_Create_Id (Object : Vertex_Array_Object; Id : out UInt);
overriding
procedure Internal_Release_Id (Object : Vertex_Array_Object; Id : UInt);
Null_Array_Object : constant Vertex_Array_Object
:= Vertex_Array_Object'(Ada.Finalization.Controlled with
Reference => Reference_To_Null_Object'Access);
end GL.Objects.Vertex_Arrays;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S I N F O --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package defines the structure of the abstract syntax tree. The Tree
-- package provides a basic tree structure. Sinfo describes how this structure
-- is used to represent the syntax of an Ada program.
-- The grammar in the RM is followed very closely in the tree design, and is
-- repeated as part of this source file.
-- The tree contains not only the full syntactic representation of the
-- program, but also the results of semantic analysis. In particular, the
-- nodes for defining identifiers, defining character literals and defining
-- operator symbols, collectively referred to as entities, represent what
-- would normally be regarded as the symbol table information. In addition a
-- number of the tree nodes contain semantic information.
-- WARNING: Several files are automatically generated from this package.
-- See below for details.
with Namet; use Namet;
with Types; use Types;
with Uintp; use Uintp;
with Urealp; use Urealp;
package Sinfo is
---------------------------------
-- Making Changes to This File --
---------------------------------
-- If changes are made to this file, a number of related steps must be
-- carried out to ensure consistency. First, if a field access function is
-- added, it appears in these places:
-- In sinfo.ads:
-- The documentation associated with the field (if semantic)
-- The documentation associated with the node
-- The spec of the access function
-- The spec of the set procedure
-- The entries in Is_Syntactic_Field
-- The pragma Inline for the access function
-- The pragma Inline for the set procedure
-- In sinfo.adb:
-- The body of the access function
-- The body of the set procedure
-- The field chosen must be consistent in all places, and, for a node that
-- is a subexpression, must not overlap any of the standard expression
-- fields.
-- In addition, if any of the standard expression fields is changed, then
-- the utility program which creates the Treeprs spec (in file treeprs.ads)
-- must be updated appropriately, since it special cases expression fields.
-- If a new tree node is added, then the following changes are made:
-- Add it to the documentation in the appropriate place
-- Add its fields to this documentation section
-- Define it in the appropriate classification in Node_Kind
-- Add an entry in Is_Syntactic_Field
-- In the body (sinfo), add entries to the access functions for all
-- its fields (except standard expression fields) to include the new
-- node in the checks.
-- Add an appropriate section to the case statement in sprint.adb
-- Add an appropriate section to the case statement in sem.adb
-- Add an appropriate section to the case statement in exp_util.adb
-- (Insert_Actions procedure)
-- For a subexpression, add an appropriate section to the case
-- statement in sem_eval.adb
-- For a subexpression, add an appropriate section to the case
-- statement in sem_res.adb
-- All back ends must be made aware of the new node kind.
-- Finally, four utility programs must be run:
-- (Optional.) Run CSinfo to check that you have made the changes
-- consistently. It checks most of the rules given above. This utility
-- reads sinfo.ads and sinfo.adb and generates a report to standard
-- output. This step is optional because XSinfo runs CSinfo.
-- Run XSinfo to create sinfo.h, the corresponding C header. This
-- utility reads sinfo.ads and generates sinfo.h. Note that it does
-- not need to read sinfo.adb, since the contents of the body are
-- algorithmically determinable from the spec.
-- Run XTreeprs to create treeprs.ads, an updated version of the module
-- that is used to drive the tree print routine. This utility reads (but
-- does not modify) treeprs.adt, the template that provides the basic
-- structure of the file, and then fills in the data from the comments
-- in sinfo.ads.
-- Run XNmake to create nmake.ads and nmake.adb, the package body and
-- spec of the Nmake package which contains functions for constructing
-- nodes.
-- The above steps are done automatically by the build scripts when you do
-- a full bootstrap.
-- Note: sometime we could write a utility that actually generated the body
-- of sinfo from the spec instead of simply checking it, since, as noted
-- above, the contents of the body can be determined from the spec.
--------------------------------
-- Implicit Nodes in the Tree --
--------------------------------
-- Generally the structure of the tree very closely follows the grammar as
-- defined in the RM. However, certain nodes are omitted to save space and
-- simplify semantic processing. Two general classes of such omitted nodes
-- are as follows:
-- If the only possibilities for a non-terminal are one or more other
-- non-terminals (i.e. the rule is a "skinny" rule), then usually the
-- corresponding node is omitted from the tree, and the target construct
-- appears directly. For example, a real type definition is either
-- floating point definition or a fixed point definition. No explicit node
-- appears for real type definition. Instead either the floating point
-- definition or fixed point definition appears directly.
-- If a non-terminal corresponds to a list of some other non-terminal
-- (possibly with separating punctuation), then usually it is omitted from
-- the tree, and a list of components appears instead. For example,
-- sequence of statements does not appear explicitly in the tree. Instead
-- a list of statements appears directly.
-- Some additional cases of omitted nodes occur and are documented
-- individually. In particular, many nodes are omitted in the tree
-- generated for an expression.
-------------------------------------------
-- Handling of Defining Identifier Lists --
-------------------------------------------
-- In several declarative forms in the syntax, lists of defining
-- identifiers appear (object declarations, component declarations, number
-- declarations etc.)
-- The semantics of such statements are equivalent to a series of identical
-- declarations of single defining identifiers (except that conformance
-- checks require the same grouping of identifiers in the parameter case).
-- To simplify semantic processing, the parser breaks down such multiple
-- declaration cases into sequences of single declarations, duplicating
-- type and initialization information as required. The flags More_Ids and
-- Prev_Ids are used to record the original form of the source in the case
-- where the original source used a list of names, More_Ids being set on
-- all but the last name and Prev_Ids being set on all but the first name.
-- These flags are used to reconstruct the original source (e.g. in the
-- Sprint package), and also are included in the conformance checks, but
-- otherwise have no semantic significance.
-- Note: the reason that we use More_Ids and Prev_Ids rather than
-- First_Name and Last_Name flags is so that the flags are off in the
-- normal one identifier case, which minimizes tree print output.
-----------------------
-- Use of Node Lists --
-----------------------
-- With a few exceptions, if a construction of the form {non-terminal}
-- appears in the tree, lists are used in the corresponding tree node (see
-- package Nlists for handling of node lists). In this case a field of the
-- parent node points to a list of nodes for the non-terminal. The field
-- name for such fields has a plural name which always ends in "s". For
-- example, a case statement has a field Alternatives pointing to list of
-- case statement alternative nodes.
-- Only fields pointing to lists have names ending in "s", so generally the
-- structure is strongly typed, fields not ending in s point to single
-- nodes, and fields ending in s point to lists.
-- The following example shows how a traversal of a list is written. We
-- suppose here that Stmt points to a N_Case_Statement node which has a
-- list field called Alternatives:
-- Alt := First (Alternatives (Stmt));
-- while Present (Alt) loop
-- ..
-- -- processing for case statement alternative Alt
-- ..
-- Alt := Next (Alt);
-- end loop;
-- The Present function tests for Empty, which in this case signals the end
-- of the list. First returns Empty immediately if the list is empty.
-- Present is defined in Atree, First and Next are defined in Nlists.
-- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all
-- contexts, which is handled as described in the previous section, and
-- with {,library_unit_NAME} in the N_With_Clause mode, which is handled
-- using the First_Name and Last_Name flags, as further detailed in the
-- description of the N_With_Clause node.
-------------
-- Pragmas --
-------------
-- Pragmas can appear in many different context, but are not included in
-- the grammar. Still they must appear in the tree, so they can be properly
-- processed.
-- Two approaches are used. In some cases, an extra field is defined in an
-- appropriate node that contains a list of pragmas appearing in the
-- expected context. For example pragmas can appear before an
-- Accept_Alternative in a Selective_Accept_Statement, and these pragmas
-- appear in the Pragmas_Before field of the N_Accept_Alternative node.
-- The other approach is to simply allow pragmas to appear in syntactic
-- lists where the grammar (of course) does not include the possibility.
-- For example, the Variants field of an N_Variant_Part node points to a
-- list that can contain both N_Pragma and N_Variant nodes.
-- To make processing easier in the latter case, the Nlists package
-- provides a set of routines (First_Non_Pragma, Last_Non_Pragma,
-- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled
-- ignoring all pragmas.
-- In the case of the variants list, we can either write:
-- Variant := First (Variants (N));
-- while Present (Variant) loop
-- ...
-- Variant := Next (Variant);
-- end loop;
-- or
-- Variant := First_Non_Pragma (Variants (N));
-- while Present (Variant) loop
-- ...
-- Variant := Next_Non_Pragma (Variant);
-- end loop;
-- In the first form of the loop, Variant can either be an N_Pragma or an
-- N_Variant node. In the second form, Variant can only be N_Variant since
-- all pragmas are skipped.
---------------------
-- Optional Fields --
---------------------
-- Fields which correspond to a section of the syntax enclosed in square
-- brackets are generally omitted (and the corresponding field set to Empty
-- for a node, or No_List for a list). The documentation of such fields
-- notes these cases. One exception to this rule occurs in the case of
-- possibly empty statement sequences (such as the sequence of statements
-- in an entry call alternative). Such cases appear in the syntax rules as
-- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional
-- statement sequences always contain an empty list (not No_List) if no
-- statements are present.
-- Note: the utility program that constructs the body and spec of the Nmake
-- package relies on the format of the comments to determine if a field
-- should have a default value in the corresponding make routine. The rule
-- is that if the first line of the description of the field contains the
-- string "(set to xxx if", then a default value of xxx is provided for
-- this field in the corresponding Make_yyy routine.
-----------------------------------
-- Note on Body/Spec Terminology --
-----------------------------------
-- In informal discussions about Ada, it is customary to refer to package
-- and subprogram specs and bodies. However, this is not technically
-- correct, what is normally referred to as a spec or specification is in
-- fact a package declaration or subprogram declaration. We are careful in
-- GNAT to use the correct terminology and in particular, the full word
-- specification is never used as an incorrect substitute for declaration.
-- The structure and terminology used in the tree also reflects the grammar
-- and thus uses declaration and specification in the technically correct
-- manner.
-- However, there are contexts in which the informal terminology is useful.
-- We have the word "body" to refer to the Interp_Etype declared by the
-- declaration of a unit body, and in some contexts we need similar term to
-- refer to the entity declared by the package or subprogram declaration,
-- and simply using declaration can be confusing since the body also has a
-- declaration.
-- An example of such a context is the link between the package body and
-- its declaration. With_Declaration is confusing, since the package body
-- itself is a declaration.
-- To deal with this problem, we reserve the informal term Spec, i.e. the
-- popular abbreviation used in this context, to refer to the entity
-- declared by the package or subprogram declaration. So in the above
-- example case, the field in the body is called With_Spec.
-- Another important context for the use of the word Spec is in error
-- messages, where a hyper-correct use of declaration would be confusing to
-- a typical Ada programmer, and even for an expert programmer can cause
-- confusion since the body has a declaration as well.
-- So, to summarize:
-- Declaration always refers to the syntactic entity that is called
-- a declaration. In particular, subprogram declaration
-- and package declaration are used to describe the
-- syntactic entity that includes the semicolon.
-- Specification always refers to the syntactic entity that is called
-- a specification. In particular, the terms procedure
-- specification, function specification, package
-- specification, subprogram specification always refer
-- to the syntactic entity that has no semicolon.
-- Spec is an informal term, used to refer to the entity
-- that is declared by a task declaration, protected
-- declaration, generic declaration, subprogram
-- declaration or package declaration.
-- This convention is followed throughout the GNAT documentation
-- both internal and external, and in all error message text.
------------------------
-- Internal Use Nodes --
------------------------
-- These are Node_Kind settings used in the internal implementation which
-- are not logically part of the specification.
-- N_Unused_At_Start
-- Completely unused entry at the start of the enumeration type. This
-- is inserted so that no legitimate value is zero, which helps to get
-- better debugging behavior, since zero is a likely uninitialized value).
-- N_Unused_At_End
-- Completely unused entry at the end of the enumeration type. This is
-- handy so that arrays with Node_Kind as the index type have an extra
-- entry at the end (see for example the use of the Pchar_Pos_Array in
-- Treepr, where the extra entry provides the limit value when dealing with
-- the last used entry in the array).
-----------------------------------------
-- Note on the settings of Sloc fields --
-----------------------------------------
-- The Sloc field of nodes that come from the source is set by the parser.
-- For internal nodes, and nodes generated during expansion the Sloc is
-- usually set in the call to the constructor for the node. In general the
-- Sloc value chosen for an internal node is the Sloc of the source node
-- whose processing is responsible for the expansion. For example, the Sloc
-- of an inherited primitive operation is the Sloc of the corresponding
-- derived type declaration.
-- For the nodes of a generic instantiation, the Sloc value is encoded to
-- represent both the original Sloc in the generic unit, and the Sloc of
-- the instantiation itself. See Sinput.ads for details.
-- Subprogram instances create two callable entities: one is the visible
-- subprogram instance, and the other is an anonymous subprogram nested
-- within a wrapper package that contains the renamings for the actuals.
-- Both of these entities have the Sloc of the defining entity in the
-- instantiation node. This simplifies some ASIS queries.
-----------------------
-- Field Definitions --
-----------------------
-- In the following node definitions, all fields, both syntactic and
-- semantic, are documented. The one exception is in the case of entities
-- (defining identifiers, character literals and operator symbols), where
-- the usage of the fields depends on the entity kind. Entity fields are
-- fully documented in the separate package Einfo.
-- In the node definitions, three common sets of fields are abbreviated to
-- save both space in the documentation, and also space in the string
-- (defined in Tree_Print_Strings) used to print trees. The following
-- abbreviations are used:
-- Note: the utility program that creates the Treeprs spec (in the file
-- xtreeprs.adb) knows about the special fields here, so it must be
-- modified if any change is made to these fields.
-- "plus fields for binary operator"
-- Chars (Name1) Name_Id for the operator
-- Left_Opnd (Node2) left operand expression
-- Right_Opnd (Node3) right operand expression
-- Entity (Node4-Sem) defining entity for operator
-- Associated_Node (Node4-Sem) for generic processing
-- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
-- Has_Private_View (Flag11-Sem) set in generic units.
-- "plus fields for unary operator"
-- Chars (Name1) Name_Id for the operator
-- Right_Opnd (Node3) right operand expression
-- Entity (Node4-Sem) defining entity for operator
-- Associated_Node (Node4-Sem) for generic processing
-- Do_Overflow_Check (Flag17-Sem) set if overflow check needed
-- Has_Private_View (Flag11-Sem) set in generic units.
-- "plus fields for expression"
-- Paren_Count number of parentheses levels
-- Etype (Node5-Sem) type of the expression
-- Is_Overloaded (Flag5-Sem) >1 type interpretation exists
-- Is_Static_Expression (Flag6-Sem) set for static expression
-- Raises_Constraint_Error (Flag7-Sem) evaluation raises CE
-- Must_Not_Freeze (Flag8-Sem) set if must not freeze
-- Do_Range_Check (Flag9-Sem) set if a range check needed
-- Has_Dynamic_Length_Check (Flag10-Sem) set if length check inserted
-- Has_Dynamic_Range_Check (Flag12-Sem) set if range check inserted
-- Assignment_OK (Flag15-Sem) set if modification is OK
-- Is_Controlling_Actual (Flag16-Sem) set for controlling argument
-- Note: see under (EXPRESSION) for further details on the use of
-- the Paren_Count field to record the number of parentheses levels.
-- Node_Kind is the type used in the Nkind field to indicate the node kind.
-- The actual definition of this type is given later (the reason for this
-- is that we want the descriptions ordered by logical chapter in the RM,
-- but the type definition is reordered to facilitate the definition of
-- some subtype ranges. The individual descriptions of the nodes show how
-- the various fields are used in each node kind, as well as providing
-- logical names for the fields. Functions and procedures are provided for
-- accessing and setting these fields using these logical names.
-----------------------
-- Gigi Restrictions --
-----------------------
-- The tree passed to Gigi is more restricted than the general tree form.
-- For example, as a result of expansion, most of the tasking nodes can
-- never appear. For each node to which either a complete or partial
-- restriction applies, a note entitled "Gigi restriction" appears which
-- documents the restriction.
-- Note that most of these restrictions apply only to trees generated when
-- code is being generated, since they involved expander actions that
-- destroy the tree.
---------------
-- ASIS Mode --
---------------
-- When a file is compiled in ASIS mode (-gnatct), expansion is skipped,
-- and the analysis must generate a tree in a form that meets all ASIS
-- requirements.
-- ASIS must be able to recover the original tree that corresponds to the
-- source. It relies heavily on Original_Node for this purpose, which as
-- described in Atree, records the history when a node is rewritten. ASIS
-- uses Original_Node to recover the original node before the Rewrite.
-- At least in ASIS mode (not really important in non-ASIS mode), when
-- N1 is rewritten as N2:
-- The subtree rooted by the original node N1 should be fully decorated,
-- i.e. all semantic fields noted in sinfo.ads should be set properly
-- and any referenced entities should be complete (with exceptions for
-- representation information, noted below).
-- For all the direct descendants of N1 (original node) their Parent
-- links should point not to N1, but to N2 (rewriting node).
-- The Parent links of rewritten nodes (N1 in this example) are set in
-- some cases (to point to the rewritten parent), but in other cases
-- they are set to Empty. This needs sorting out ??? It would be much
-- cleaner if they could always be set in the original node ???
-- There are a few cases when ASIS has to use not the original, but the
-- rewritten tree structures. This happens when because of some important
-- technical reasons it is impossible or very hard to have the original
-- structure properly decorated by semantic information, and the rewritten
-- structure fully reproduces the original source. Below is the (incomplete
-- for the moment???) list of such exceptions:
--
-- Generic specifications and generic bodies
-- Function calls that use prefixed notation (Operand.Operation [(...)])
-- Representation Information
-- For the purposes of the data description annex, the representation
-- information for source declared entities must be complete in the
-- ASIS tree.
-- This requires that the front end call the back end (gigi/gcc) in
-- a special "back annotate only" mode to obtain information on layout
-- from the back end.
-- For the purposes of this special "back annotate only" mode, the
-- requirements that would normally need to be met to generate code
-- are relaxed as follows:
-- Anonymous types need not have full representation information (e.g.
-- sizes need not be set for types where the front end would normally
-- set the sizes), since anonymous types can be ignored in this mode.
-- In this mode, gigi will see at least fragments of a fully annotated
-- unexpanded tree. This means that it will encounter nodes it does
-- not normally handle (such as stubs, task bodies etc). It should
-- simply ignore these nodes, since they are not relevant to the task
-- of back annotating representation information.
-- Some other ASIS-specific issues are covered in specific comments in
-- sections for particular nodes or flags.
----------------
-- Ghost Mode --
----------------
-- The SPARK RM 6.9 defines two classes of constructs - Ghost entities and
-- Ghost statements. The intent of the feature is to treat Ghost constructs
-- as non-existent when Ghost assertion policy Ignore is in effect.
-- The corresponding nodes which map to Ghost constructs are:
-- Ghost entities
-- Declaration nodes
-- N_Package_Body
-- N_Subprogram_Body
-- Ghost statements
-- N_Assignment_Statement
-- N_Procedure_Call_Statement
-- N_Pragma
-- In addition, the compiler treats instantiations as Ghost entities
-- To achieve the removal of ignored Ghost constructs, the compiler relies
-- on global variable Ghost_Mode and a mechanism called "Ghost regions".
-- The values of the global variable are as follows:
-- 1. Check - All static semantics as defined in SPARK RM 6.9 are in
-- effect. The Ghost region has mode Check.
-- 2. Ignore - Same as Check, ignored Ghost code is not present in ALI
-- files, object files, and the final executable. The Ghost region
-- has mode Ignore.
-- 3. None - No Ghost region is in effect
-- A Ghost region is a compiler operating mode, similar to Check_Syntax,
-- however a region is much more finely grained and depends on the policy
-- in effect. The region starts prior to the analysis of a Ghost construct
-- and ends immediately after its expansion. The region is established as
-- follows:
-- 1. Declarations - Prior to analysis, if the declaration is subject to
-- pragma Ghost.
-- 2. Renaming declarations - Same as 1) or when the renamed entity is
-- Ghost.
-- 3. Completing declarations - Same as 1) or when the declaration is
-- partially analyzed and the declaration completes a Ghost entity.
-- 4. N_Package_Body, N_Subprogram_Body - Same as 1) or when the body is
-- partially analyzed and completes a Ghost entity.
-- 5. N_Assignment_Statement - After the left hand side is analyzed and
-- references a Ghost entity.
-- 6. N_Procedure_Call_Statement - After the name is analyzed and denotes
-- a Ghost procedure.
-- 7. N_Pragma - During analysis, when the related entity is Ghost or the
-- pragma encloses a Ghost entity.
-- 8. Instantiations - Save as 1) or when the instantiation is partially
-- analyzed and the generic template is Ghost.
-- Routines Mark_And_Set_Ghost_xxx install a new Ghost region and routine
-- Restore_Ghost_Mode ends a Ghost region. A region may be reinstalled
-- similar to scopes for decoupled expansion such as the generation of
-- dispatch tables or the creation of a predicate function.
-- If the mode of a Ghost region is Ignore, any newly created nodes as well
-- as source entities are marked as ignored Ghost. In additon, the marking
-- process signals all enclosing scopes that an ignored Ghost node resides
-- within. The compilation unit where the node resides is also added to an
-- auxiliary table for post processing.
-- After the analysis and expansion of all compilation units takes place
-- as well as the instantiation of all inlined [generic] bodies, the GNAT
-- driver initiates a separate pass which removes all ignored Ghost nodes
-- from all units stored in the auxiliary table.
--------------------
-- GNATprove Mode --
--------------------
-- When a file is compiled in GNATprove mode (-gnatd.F), a very light
-- expansion is performed and the analysis must generate a tree in a
-- form that meets additional requirements.
-- This light expansion does two transformations of the tree that cannot
-- be postponed till after semantic analysis:
-- 1. Replace object renamings by renamed object. This requires the
-- introduction of temporaries at the point of the renaming, which
-- must be properly analyzed.
-- 2. Fully qualify entity names. This is needed to generate suitable
-- local effects and call-graphs in ALI files, with the completely
-- qualified names (in particular the suffix to distinguish homonyms).
-- The tree after this light expansion should be fully analyzed
-- semantically, which sometimes requires the insertion of semantic
-- pre-analysis, for example for subprogram contracts and pragma
-- check/assert. In particular, all expression must have their proper type,
-- and semantic links should be set between tree nodes (partial to full
-- view, etc.) Some kinds of nodes should be either absent, or can be
-- ignored by the formal verification backend:
-- N_Object_Renaming_Declaration: can be ignored safely
-- N_Expression_Function: absent (rewritten)
-- N_Expression_With_Actions: absent (not generated)
-- SPARK cross-references are generated from the regular cross-references
-- (used for browsing and code understanding) and additional references
-- collected during semantic analysis, in particular on all dereferences.
-- These SPARK cross-references are output in a separate section of ALI
-- files, as described in spark_xrefs.adb. They are the basis for the
-- computation of data dependences in GNATprove. This implies that all
-- cross-references should be generated in this mode, even those that would
-- not make sense from a user point-of-view, and that cross-references that
-- do not lead to data dependences for subprograms can be safely ignored.
-- GNATprove relies on the following front end behaviors:
-- 1. The first declarations in the list of visible declarations of
-- a package declaration for a generic instance, up to the first
-- declaration which comes from source, should correspond to
-- the "mappings nodes" between formal and actual generic parameters.
-- 2. In addition pragma Debug statements are removed from the tree
-- (rewritten to NULL stmt), since they should be ignored in formal
-- verification.
-- 3. An error is also issued for missing subunits, similar to the
-- warning issued when generating code, to avoid formal verification
-- of a partial unit.
-- 4. Unconstrained types are not replaced by constrained types whose
-- bounds are generated from an expression: Expand_Subtype_From_Expr
-- should be a no-op.
-- 5. Errors (instead of warnings) are issued on compile-time-known
-- constraint errors even though such cases do not correspond to
-- illegalities in the Ada RM (this is simply another case where
-- GNATprove implements a subset of the full language).
--
-- However, there are a few exceptions to this rule for cases where
-- we want to allow the GNATprove analysis to proceed (e.g. range
-- checks on empty ranges, which typically appear in deactivated
-- code in a particular configuration).
-- 6. Subtypes should match in the AST, even after a generic is
-- instantiated. In particular, GNATprove relies on the fact that,
-- on a selected component, the type of the selected component is
-- the type of the corresponding component in the prefix of the
-- selected component.
--
-- Note that, in some cases, we know that this rule is broken by the
-- frontend. In particular, if the selected component is a packed
-- array depending on a discriminant of a unconstrained formal object
-- parameter of a generic.
-----------------------
-- Check Flag Fields --
-----------------------
-- The following flag fields appear in expression nodes:
-- Do_Division_Check
-- Do_Overflow_Check
-- Do_Range_Check
-- These three flags are always set by the front end during semantic
-- analysis, on expression nodes that may trigger the corresponding
-- check. The front end then inserts or not the check during expansion. In
-- particular, these flags should also be correctly set in ASIS mode and
-- GNATprove mode. As a special case, the front end does not insert a
-- Do_Division_Check flag on float exponentiation expressions, for the case
-- where the value is 0.0 and the exponent is negative, although this case
-- does lead to a division check failure.
-- Note: the expander always takes care of the Do_Range check case,
-- so this flag will never be set in the expanded tree passed to the
-- back end code generator.
-- Note that this accounts for all nodes that trigger the corresponding
-- checks, except for range checks on subtype_indications, which may be
-- required to check that a range_constraint is compatible with the given
-- subtype (RM 3.2.2(11)).
-- The following flag fields appear in various nodes:
-- Do_Accessibility_Check
-- Do_Discriminant_Check
-- Do_Length_Check
-- Do_Storage_Check
-- Do_Tag_Check
-- These flags are used in some specific cases by the front end, either
-- during semantic analysis or during expansion, and cannot be expected
-- to be set on all nodes that trigger the corresponding check.
------------------------
-- Common Flag Fields --
------------------------
-- The following flag fields appear in all nodes:
-- Analyzed
-- This flag is used to indicate that a node (and all its children have
-- been analyzed. It is used to avoid reanalysis of a node that has
-- already been analyzed, both for efficiency and functional correctness
-- reasons.
-- Comes_From_Source
-- This flag is set if the node comes directly from an explicit construct
-- in the source. It is normally on for any nodes built by the scanner or
-- parser from the source program, with the exception that in a few cases
-- the parser adds nodes to normalize the representation (in particular
-- a null statement is added to a package body if there is no begin/end
-- initialization section.
--
-- Most nodes inserted by the analyzer or expander are not considered
-- as coming from source, so the flag is off for such nodes. In a few
-- cases, the expander constructs nodes closely equivalent to nodes
-- from the source program (e.g. the allocator built for build-in-place
-- case), and the Comes_From_Source flag is deliberately set.
-- Error_Posted
-- This flag is used to avoid multiple error messages being posted on or
-- referring to the same node. This flag is set if an error message
-- refers to a node or is posted on its source location, and has the
-- effect of inhibiting further messages involving this same node.
-----------------------
-- Modify_Tree_For_C --
-----------------------
-- If the flag Opt.Modify_Tree_For_C is set True, then the tree is modified
-- in ways that help match the semantics better with C, easing the task of
-- interfacing to C code generators (other than GCC, where the work is done
-- in gigi, and there is no point in changing that), and also making life
-- easier for Cprint in generating C source code.
-- The current modifications implemented are as follows:
-- N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic nodes
-- are eliminated from the tree (since these operations do not exist in
-- C), and the operations are rewritten in terms of logical shifts and
-- other logical operations that do exist in C. See Exp_Ch4 expansion
-- routines for these operators for details of the transformations made.
-- The right operand of N_Op_Shift_Right and N_Op_Shift_Left is always
-- less than the word size (since other values are not well-defined in
-- C). This is done using an explicit test if necessary.
-- Min and Max attributes are expanded into equivalent if expressions,
-- dealing properly with side effect issues.
-- Mod for signed integer types is expanded into equivalent expressions
-- using Rem (which is % in C) and other C-available operators.
-- Functions returning bounded arrays are transformed into procedures
-- with an extra out parameter, and the calls updated accordingly.
-- Aggregates are only kept unexpanded for object declarations, otherwise
-- they are systematically expanded into loops (for arrays) and
-- individual assignments (for records).
-- Unconstrained array types are handled by means of fat pointers.
-- Postconditions are inlined by the frontend since their body may have
-- references to itypes defined in the enclosing subprogram.
------------------------------------
-- Description of Semantic Fields --
------------------------------------
-- The meaning of the syntactic fields is generally clear from their names
-- without any further description, since the names are chosen to
-- correspond very closely to the syntax in the reference manual. This
-- section describes the usage of the semantic fields, which are used to
-- contain additional information determined during semantic analysis.
-- ABE_Is_Certain (Flag18-Sem)
-- This flag is set in an instantiation node or a call node is determined
-- to be sure to raise an ABE. This is used to trigger special handling
-- of such cases, particularly in the instantiation case where we avoid
-- instantiating the body if this flag is set. This flag is also present
-- in an N_Formal_Package_Declaration node since formal package
-- declarations are treated like instantiations, but it is always set to
-- False in this context.
-- Accept_Handler_Records (List5-Sem)
-- This field is present only in an N_Accept_Alternative node. It is used
-- to temporarily hold the exception handler records from an accept
-- statement in a selective accept. These exception handlers will
-- eventually be placed in the Handler_Records list of the procedure
-- built for this accept (see Expand_N_Selective_Accept procedure in
-- Exp_Ch9 for further details).
-- Access_Types_To_Process (Elist2-Sem)
-- Present in N_Freeze_Entity nodes for Incomplete or private types.
-- Contains the list of access types which may require specific treatment
-- when the nature of the type completion is completely known. An example
-- of such treatment is the generation of the associated_final_chain.
-- Actions (List1-Sem)
-- This field contains a sequence of actions that are associated with the
-- node holding the field. See the individual node types for details of
-- how this field is used, as well as the description of the specific use
-- for a particular node type.
-- Activation_Chain_Entity (Node3-Sem)
-- This is used in tree nodes representing task activators (blocks,
-- subprogram bodies, package declarations, and task bodies). It is
-- initially Empty, and then gets set to point to the entity for the
-- declared Activation_Chain variable when the first task is declared.
-- When tasks are declared in the corresponding declarative region this
-- entity is located by name (its name is always _Chain) and the declared
-- tasks are added to the chain. Note that N_Extended_Return_Statement
-- does not have this attribute, although it does have an activation
-- chain. This chain is used to store the tasks temporarily, and is not
-- used for activating them. On successful completion of the return
-- statement, the tasks are moved to the caller's chain, and the caller
-- activates them.
-- Acts_As_Spec (Flag4-Sem)
-- A flag set in the N_Subprogram_Body node for a subprogram body which
-- is acting as its own spec. In the case of a library-level subprogram
-- the flag is set as well on the parent compilation unit node.
-- Actual_Designated_Subtype (Node4-Sem)
-- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi
-- needs to known the dynamic constrained subtype of the designated
-- object, this attribute is set to that type. This is done for
-- N_Free_Statements for access-to-classwide types and access to
-- unconstrained packed array types, and for N_Explicit_Dereference when
-- the designated type is an unconstrained packed array and the
-- dereference is the prefix of a 'Size attribute reference.
-- Address_Warning_Posted (Flag18-Sem)
-- Present in N_Attribute_Definition nodes. Set to indicate that we have
-- posted a warning for the address clause regarding size or alignment
-- issues. Used to inhibit multiple redundant messages.
-- Aggregate_Bounds (Node3-Sem)
-- Present in array N_Aggregate nodes. If the bounds of the aggregate are
-- known at compile time, this field points to an N_Range node with those
-- bounds. Otherwise Empty.
-- All_Others (Flag11-Sem)
-- Present in an N_Others_Choice node. This flag is set for an others
-- exception where all exceptions are to be caught, even those that are
-- not normally handled (in particular the tasking abort signal). This
-- is used for translation of the at end handler into a normal exception
-- handler.
-- Aspect_Rep_Item (Node2-Sem)
-- Present in N_Aspect_Specification nodes. Points to the corresponding
-- pragma/attribute definition node used to process the aspect.
-- Assignment_OK (Flag15-Sem)
-- This flag is set in a subexpression node for an object, indicating
-- that the associated object can be modified, even if this would not
-- normally be permissible (either by direct assignment, or by being
-- passed as an out or in-out parameter). This is used by the expander
-- for a number of purposes, including initialization of constants and
-- limited type objects (such as tasks), setting discriminant fields,
-- setting tag values, etc. N_Object_Declaration nodes also have this
-- flag defined. Here it is used to indicate that an initialization
-- expression is valid, even where it would normally not be allowed
-- (e.g. where the type involved is limited). It is also used to stop
-- a Force_Evaluation call for an unchecked conversion, but this usage
-- is unclear and not documented ???
-- Associated_Node (Node4-Sem)
-- Present in nodes that can denote an entity: identifiers, character
-- literals, operator symbols, expanded names, operator nodes, and
-- attribute reference nodes (all these nodes have an Entity field).
-- This field is also present in N_Aggregate, N_Selected_Component, and
-- N_Extension_Aggregate nodes. This field is used in generic processing
-- to create links between the generic template and the generic copy.
-- See Sem_Ch12.Get_Associated_Node for full details. Note that this
-- field overlaps Entity, which is fine, since, as explained in Sem_Ch12,
-- the normal function of Entity is not required at the point where the
-- Associated_Node is set. Note also, that in generic templates, this
-- means that the Entity field does not necessarily point to an Entity.
-- Since the back end is expected to ignore generic templates, this is
-- harmless.
-- Atomic_Sync_Required (Flag14-Sem)
-- This flag is set on a node for which atomic synchronization is
-- required for the corresponding reference or modification.
-- At_End_Proc (Node1)
-- This field is present in an N_Handled_Sequence_Of_Statements node.
-- It contains an identifier reference for the cleanup procedure to be
-- called. See description of this node for further details.
-- Backwards_OK (Flag6-Sem)
-- A flag present in the N_Assignment_Statement node. It is used only
-- if the type being assigned is an array type, and is set if analysis
-- determines that it is definitely safe to do the copy backwards, i.e.
-- starting at the highest addressed element. This is the case if either
-- the operands do not overlap, or they may overlap, but if they do,
-- then the left operand is at a higher address than the right operand.
--
-- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
-- means that the front end could not determine that either direction is
-- definitely safe, and a runtime check may be required if the backend
-- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
-- set, it means that the front end can assure no overlap of operands.
-- Body_To_Inline (Node3-Sem)
-- Present in subprogram declarations. Denotes analyzed but unexpanded
-- body of subprogram, to be used when inlining calls. Present when the
-- subprogram has an Inline pragma and inlining is enabled. If the
-- declaration is completed by a renaming_as_body, and the renamed entity
-- is a subprogram, the Body_To_Inline is the name of that entity, which
-- is used directly in later calls to the original subprogram.
-- Body_Required (Flag13-Sem)
-- A flag that appears in the N_Compilation_Unit node indicating that
-- the corresponding unit requires a body. For the package case, this
-- indicates that a completion is required. In Ada 95, if the flag is not
-- set for the package case, then a body may not be present. In Ada 83,
-- if the flag is not set for the package case, then body is optional.
-- For a subprogram declaration, the flag is set except in the case where
-- a pragma Import or Interface applies, in which case no body is
-- permitted (in Ada 83 or Ada 95).
-- By_Ref (Flag5-Sem)
-- Present in N_Simple_Return_Statement and N_Extended_Return_Statement,
-- this flag is set when the returned expression is already allocated on
-- the secondary stack and thus the result is passed by reference rather
-- than copied another time.
-- Cleanup_Actions (List5-Sem)
-- Present in block statements created for transient blocks, contains
-- additional cleanup actions carried over from the transient scope.
-- Check_Address_Alignment (Flag11-Sem)
-- A flag present in N_Attribute_Definition clause for a 'Address
-- attribute definition. This flag is set if a dynamic check should be
-- generated at the freeze point for the entity to which this address
-- clause applies. The reason that we need this flag is that we want to
-- check for range checks being suppressed at the point where the
-- attribute definition clause is given, rather than testing this at the
-- freeze point.
-- Comes_From_Extended_Return_Statement (Flag18-Sem)
-- Present in N_Simple_Return_Statement nodes. True if this node was
-- constructed as part of the N_Extended_Return_Statement expansion.
-- Compile_Time_Known_Aggregate (Flag18-Sem)
-- Present in N_Aggregate nodes. Set for aggregates which can be fully
-- evaluated at compile time without raising constraint error. Such
-- aggregates can be passed as is the back end without any expansion.
-- See Exp_Aggr for specific conditions under which this flag gets set.
-- Componentwise_Assignment (Flag14-Sem)
-- Present in N_Assignment_Statement nodes. Set for a record assignment
-- where all that needs doing is to expand it into component-by-component
-- assignments. This is used internally for the case of tagged types with
-- rep clauses, where we need to avoid recursion (we don't want to try to
-- generate a call to the primitive operation, because this is the case
-- where we are compiling the primitive operation). Note that when we are
-- expanding component assignments in this case, we never assign the _tag
-- field, but we recursively assign components of the parent type.
-- Condition_Actions (List3-Sem)
-- This field appears in else-if nodes and in the iteration scheme node
-- for while loops. This field is only used during semantic processing to
-- temporarily hold actions inserted into the tree. In the tree passed
-- to gigi, the condition actions field is always set to No_List. For
-- details on how this field is used, see the routine Insert_Actions in
-- package Exp_Util, and also the expansion routines for the relevant
-- nodes.
-- Context_Pending (Flag16-Sem)
-- This field appears in Compilation_Unit nodes, to indicate that the
-- context of the unit is being compiled. Used to detect circularities
-- that are not otherwise detected by the loading mechanism. Such
-- circularities can occur in the presence of limited and non-limited
-- with_clauses that mention the same units.
-- Controlling_Argument (Node1-Sem)
-- This field is set in procedure and function call nodes if the call
-- is a dispatching call (it is Empty for a non-dispatching call). It
-- indicates the source of the call's controlling tag. For procedure
-- calls, the Controlling_Argument is one of the actuals. For function
-- that has a dispatching result, it is an entity in the context of the
-- call that can provide a tag, or else it is the tag of the root type
-- of the class. It can also specify a tag directly rather than being a
-- tagged object. The latter is needed by the implementations of AI-239
-- and AI-260.
-- Conversion_OK (Flag14-Sem)
-- A flag set on type conversion nodes to indicate that the conversion
-- is to be considered as being valid, even though it is the case that
-- the conversion is not valid Ada. This is used for attributes Enum_Rep,
-- Fixed_Value and Integer_Value, for internal conversions done for
-- fixed-point operations, and for certain conversions for calls to
-- initialization procedures. If Conversion_OK is set, then Etype must be
-- set (the analyzer assumes that Etype has been set). For the case of
-- fixed-point operands, it also indicates that the conversion is to be
-- direct conversion of the underlying integer result, with no regard to
-- the small operand.
-- Convert_To_Return_False (Flag13-Sem)
-- Present in N_Raise_Expression nodes that appear in the body of the
-- special predicateM function used to test a predicate in the context
-- of a membership test, where raise expression results in returning a
-- value of False rather than raising an exception.
-- Corresponding_Aspect (Node3-Sem)
-- Present in N_Pragma node. Used to point back to the source aspect from
-- the corresponding pragma. This field is Empty for source pragmas.
-- Corresponding_Body (Node5-Sem)
-- This field is set in subprogram declarations, package declarations,
-- entry declarations of protected types, and in generic units. It points
-- to the defining entity for the corresponding body (NOT the node for
-- the body itself).
-- Corresponding_Formal_Spec (Node3-Sem)
-- This field is set in subprogram renaming declarations, where it points
-- to the defining entity for a formal subprogram in the case where the
-- renaming corresponds to a generic formal subprogram association in an
-- instantiation. The field is Empty if the renaming does not correspond
-- to such a formal association.
-- Corresponding_Generic_Association (Node5-Sem)
-- This field is defined for object declarations and object renaming
-- declarations. It is set for the declarations within an instance that
-- map generic formals to their actuals. If set, the field points to
-- a generic_association which is the original parent of the expression
-- or name appearing in the declaration. This simplifies ASIS queries.
-- Corresponding_Integer_Value (Uint4-Sem)
-- This field is set in real literals of fixed-point types (it is not
-- used for floating-point types). It contains the integer value used
-- to represent the fixed-point value. It is also set on the universal
-- real literals used to represent bounds of fixed-point base types
-- and their first named subtypes.
-- Corresponding_Spec (Node5-Sem)
-- This field is set in subprogram, package, task, and protected body
-- nodes, where it points to the defining entity in the corresponding
-- spec. The attribute is also set in N_With_Clause nodes where it points
-- to the defining entity for the with'ed spec, and in a subprogram
-- renaming declaration when it is a Renaming_As_Body. The field is Empty
-- if there is no corresponding spec, as in the case of a subprogram body
-- that serves as its own spec.
--
-- In Ada 2012, Corresponding_Spec is set on expression functions that
-- complete a subprogram declaration.
-- Corresponding_Spec_Of_Stub (Node2-Sem)
-- This field is present in subprogram, package, task and protected body
-- stubs where it points to the corresponding spec of the stub. Due to
-- clashes in the structure of nodes, we cannot use Corresponding_Spec.
-- Corresponding_Stub (Node3-Sem)
-- This field is present in an N_Subunit node. It holds the node in
-- the parent unit that is the stub declaration for the subunit. It is
-- set when analysis of the stub forces loading of the proper body. If
-- expansion of the proper body creates new declarative nodes, they are
-- inserted at the point of the corresponding_stub.
-- Dcheck_Function (Node5-Sem)
-- This field is present in an N_Variant node, It references the entity
-- for the discriminant checking function for the variant.
-- Default_Expression (Node5-Sem)
-- This field is Empty if there is no default expression. If there is a
-- simple default expression (one with no side effects), then this field
-- simply contains a copy of the Expression field (both point to the tree
-- for the default expression). Default_Expression is used for
-- conformance checking.
-- Default_Storage_Pool (Node3-Sem)
-- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
-- copy of Opt.Default_Pool at the end of the compilation unit. See
-- package Opt for details. This is used for inheriting the
-- Default_Storage_Pool in child units.
-- Discr_Check_Funcs_Built (Flag11-Sem)
-- This flag is present in N_Full_Type_Declaration nodes. It is set when
-- discriminant checking functions are constructed. The purpose is to
-- avoid attempting to set these functions more than once.
-- Do_Accessibility_Check (Flag13-Sem)
-- This flag is set on N_Parameter_Specification nodes to indicate
-- that an accessibility check is required for the parameter. It is
-- not yet decided who takes care of this check (TBD ???).
-- Do_Discriminant_Check (Flag1-Sem)
-- This flag is set on N_Selected_Component nodes to indicate that a
-- discriminant check is required using the discriminant check routine
-- associated with the selector. The actual check is generated by the
-- expander when processing selected components. In the case of
-- Unchecked_Union, the flag is also set, but no discriminant check
-- routine is associated with the selector, and the expander does not
-- generate a check. This flag is also present in assignment statements
-- (and set if the assignment requires a discriminant check), and in type
-- conversion nodes (and set if the conversion requires a check).
-- Do_Division_Check (Flag13-Sem)
-- This flag is set on a division operator (/ mod rem) to indicate
-- that a zero divide check is required. The actual check is dealt
-- with by the backend (all the front end does is to set the flag).
-- Do_Length_Check (Flag4-Sem)
-- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
-- N_Op_Xor, or N_Type_Conversion node to indicate that a length check
-- is required. It is not determined who deals with this flag (???).
-- Do_Overflow_Check (Flag17-Sem)
-- This flag is set on an operator where an overflow check is required on
-- the operation. The actual check is dealt with by the backend (all the
-- front end does is to set the flag). The other cases where this flag is
-- used is on a Type_Conversion node and for attribute reference nodes.
-- For a type conversion, it means that the conversion is from one base
-- type to another, and the value may not fit in the target base type.
-- See also the description of Do_Range_Check for this case. The only
-- attribute references which use this flag are Pred and Succ, where it
-- means that the result should be checked for going outside the base
-- range. Note that this flag is not set for modular types. This flag is
-- also set on if and case expression nodes if we are operating in either
-- MINIMIZED or ELIMINATED overflow checking mode (to make sure that we
-- properly process overflow checking for dependent expressions).
-- Do_Range_Check (Flag9-Sem)
-- This flag is set on an expression which appears in a context where a
-- range check is required. The target type is clear from the context.
-- The contexts in which this flag can appear are the following:
-- Right side of an assignment. In this case the target type is
-- taken from the left side of the assignment, which is referenced
-- by the Name of the N_Assignment_Statement node.
-- Subscript expressions in an indexed component. In this case the
-- target type is determined from the type of the array, which is
-- referenced by the Prefix of the N_Indexed_Component node.
-- Argument expression for a parameter, appearing either directly in
-- the Parameter_Associations list of a call or as the Expression of an
-- N_Parameter_Association node that appears in this list. In either
-- case, the check is against the type of the formal. Note that the
-- flag is relevant only in IN and IN OUT parameters, and will be
-- ignored for OUT parameters, where no check is required in the call,
-- and if a check is required on the return, it is generated explicitly
-- with a type conversion.
-- Initialization expression for the initial value in an object
-- declaration. In this case the Do_Range_Check flag is set on
-- the initialization expression, and the check is against the
-- range of the type of the object being declared. This includes the
-- cases of expressions providing default discriminant values, and
-- expressions used to initialize record components.
-- The expression of a type conversion. In this case the range check is
-- against the target type of the conversion. See also the use of
-- Do_Overflow_Check on a type conversion. The distinction is that the
-- overflow check protects against a value that is outside the range of
-- the target base type, whereas a range check checks that the
-- resulting value (which is a value of the base type of the target
-- type), satisfies the range constraint of the target type.
-- Note: when a range check is required in contexts other than those
-- listed above (e.g. in a return statement), an additional type
-- conversion node is introduced to represent the required check.
-- A special case arises for the arguments of the Pred/Succ attributes.
-- Here the range check needed is against First + 1 .. Last (Pred) or
-- First .. Last - 1 (Succ) of the corresponding base type. Essentially
-- these checks are what would be performed within the implicit body of
-- the functions that correspond to these attributes. In these cases,
-- the Do_Range check flag is set on the argument to the attribute
-- function, and the back end must special case the appropriate range
-- to check against.
-- Do_Storage_Check (Flag17-Sem)
-- This flag is set in an N_Allocator node to indicate that a storage
-- check is required for the allocation, or in an N_Subprogram_Body node
-- to indicate that a stack check is required in the subprogram prologue.
-- The N_Allocator case is handled by the routine that expands the call
-- to the runtime routine. The N_Subprogram_Body case is handled by the
-- backend, and all the semantics does is set the flag.
-- Do_Tag_Check (Flag13-Sem)
-- This flag is set on an N_Assignment_Statement, N_Function_Call,
-- N_Procedure_Call_Statement, N_Type_Conversion,
-- N_Simple_Return_Statement, or N_Extended_Return_Statement
-- node to indicate that the tag check can be suppressed. It is not
-- yet decided how this flag is used (TBD ???).
-- Elaborate_Present (Flag4-Sem)
-- This flag is set in the N_With_Clause node to indicate that pragma
-- Elaborate pragma appears for the with'ed units.
-- Elaborate_All_Desirable (Flag9-Sem)
-- This flag is set in the N_With_Clause mode to indicate that the static
-- elaboration processing has determined that an Elaborate_All pragma is
-- desirable for correct elaboration for this unit.
-- Elaborate_All_Present (Flag14-Sem)
-- This flag is set in the N_With_Clause node to indicate that a
-- pragma Elaborate_All pragma appears for the with'ed units.
-- Elaborate_Desirable (Flag11-Sem)
-- This flag is set in the N_With_Clause mode to indicate that the static
-- elaboration processing has determined that an Elaborate pragma is
-- desirable for correct elaboration for this unit.
-- Else_Actions (List3-Sem)
-- This field is present in if expression nodes. During code
-- expansion we use the Insert_Actions procedure (in Exp_Util) to insert
-- actions at an appropriate place in the tree to get elaborated at the
-- right time. For if expressions, we have to be sure that the actions
-- for the Else branch are only elaborated if the condition is False.
-- The Else_Actions field is used as a temporary parking place for
-- these actions. The final tree is always rewritten to eliminate the
-- need for this field, so in the tree passed to Gigi, this field is
-- always set to No_List.
-- Enclosing_Variant (Node2-Sem)
-- This field is present in the N_Variant node and identifies the Node_Id
-- corresponding to the immediately enclosing variant when the variant is
-- nested, and N_Empty otherwise. Set during semantic processing of the
-- variant part of a record type.
-- Entity (Node4-Sem)
-- Appears in all direct names (identifiers, character literals, and
-- operator symbols), as well as expanded names, and attributes that
-- denote entities, such as 'Class. Points to entity for corresponding
-- defining occurrence. Set after name resolution. For identifiers in a
-- WITH list, the corresponding defining occurrence is in a separately
-- compiled file, and Entity must be set by the library Load procedure.
--
-- Note: During name resolution, the value in Entity may be temporarily
-- incorrect (e.g. during overload resolution, Entity is initially set to
-- the first possible correct interpretation, and then later modified if
-- necessary to contain the correct value after resolution).
--
-- Note: This field overlaps Associated_Node, which is used during
-- generic processing (see Sem_Ch12 for details). Note also that in
-- generic templates, this means that the Entity field does not always
-- point to an Entity. Since the back end is expected to ignore generic
-- templates, this is harmless.
--
-- Note: This field also appears in N_Attribute_Definition_Clause nodes.
-- It is used only for stream attributes definition clauses. In this
-- case, it denotes a (possibly dummy) subprogram entity that is declared
-- conceptually at the point of the clause. Thus the visibility of the
-- attribute definition clause (in the sense of 8.3(23) as amended by
-- AI-195) can be checked by testing the visibility of that subprogram.
--
-- Note: Normally the Entity field of an identifier points to the entity
-- for the corresponding defining identifier, and hence the Chars field
-- of an identifier will match the Chars field of the entity. However,
-- there is no requirement that these match, and there are obscure cases
-- of generated code where they do not match.
-- Note: Ada 2012 aspect specifications require additional links between
-- identifiers and various attributes. These attributes can be of
-- arbitrary types, and the entity field of identifiers that denote
-- aspects must be used to store arbitrary expressions for later semantic
-- checks. See section on aspect specifications for details.
-- Entity_Or_Associated_Node (Node4-Sem)
-- A synonym for both Entity and Associated_Node. Used by convention in
-- the code when referencing this field in cases where it is not known
-- whether the field contains an Entity or an Associated_Node.
-- Etype (Node5-Sem)
-- Appears in all expression nodes, all direct names, and all entities.
-- Points to the entity for the related type. Set after type resolution.
-- Normally this is the actual subtype of the expression. However, in
-- certain contexts such as the right side of an assignment, subscripts,
-- arguments to calls, returned value in a function, initial value etc.
-- it is the desired target type. In the event that this is different
-- from the actual type, the Do_Range_Check flag will be set if a range
-- check is required. Note: if the Is_Overloaded flag is set, then Etype
-- points to an essentially arbitrary choice from the possible set of
-- types.
-- Exception_Junk (Flag8-Sem)
-- This flag is set in a various nodes appearing in a statement sequence
-- to indicate that the corresponding node is an artifact of the
-- generated code for exception handling, and should be ignored when
-- analyzing the control flow of the relevant sequence of statements
-- (e.g. to check that it does not end with a bad return statement).
-- Exception_Label (Node5-Sem)
-- Appears in N_Push_xxx_Label nodes. Points to the entity of the label
-- to be used for transforming the corresponding exception into a goto,
-- or contains Empty, if this exception is not to be transformed. Also
-- appears in N_Exception_Handler nodes, where, if set, it indicates
-- that there may be a local raise for the handler, so that expansion
-- to allow a goto is required (and this field contains the label for
-- this goto). See Exp_Ch11.Expand_Local_Exception_Handlers for details.
-- Expansion_Delayed (Flag11-Sem)
-- Set on aggregates and extension aggregates that need a top-down rather
-- than bottom-up expansion. Typically aggregate expansion happens bottom
-- up. For nested aggregates the expansion is delayed until the enclosing
-- aggregate itself is expanded, e.g. in the context of a declaration. To
-- delay it we set this flag. This is done to avoid creating a temporary
-- for each level of a nested aggregates, and also to prevent the
-- premature generation of constraint checks. This is also a requirement
-- if we want to generate the proper attachment to the internal
-- finalization lists (for record with controlled components). Top down
-- expansion of aggregates is also used for in-place array aggregate
-- assignment or initialization. When the full context is known, the
-- target of the assignment or initialization is used to generate the
-- left-hand side of individual assignment to each sub-component.
-- Expression_Copy (Node2-Sem)
-- Present in N_Pragma_Argument_Association nodes. Contains a copy of the
-- original expression. This field is best used to store pragma-dependent
-- modifications performed on the original expression such as replacement
-- of the current type instance or substitutions of primitives.
-- First_Inlined_Subprogram (Node3-Sem)
-- Present in the N_Compilation_Unit node for the main program. Points
-- to a chain of entities for subprograms that are to be inlined. The
-- Next_Inlined_Subprogram field of these entities is used as a link
-- pointer with Empty marking the end of the list. This field is Empty
-- if there are no inlined subprograms or inlining is not active.
-- First_Named_Actual (Node4-Sem)
-- Present in procedure call statement and function call nodes, and also
-- in Intrinsic nodes. Set during semantic analysis to point to the first
-- named parameter where parameters are ordered by declaration order (as
-- opposed to the actual order in the call which may be different due to
-- named associations). Note: this field points to the explicit actual
-- parameter itself, not the N_Parameter_Association node (its parent).
-- First_Real_Statement (Node2-Sem)
-- Present in N_Handled_Sequence_Of_Statements node. Normally set to
-- Empty. Used only when declarations are moved into the statement part
-- of a construct as a result of wrapping an AT END handler that is
-- required to cover the declarations. In this case, this field is used
-- to remember the location in the statements list of the first real
-- statement, i.e. the statement that used to be first in the statement
-- list before the declarations were prepended.
-- First_Subtype_Link (Node5-Sem)
-- Present in N_Freeze_Entity node for an anonymous base type that is
-- implicitly created by the declaration of a first subtype. It points
-- to the entity for the first subtype.
-- Float_Truncate (Flag11-Sem)
-- A flag present in type conversion nodes. This is used for float to
-- integer conversions where truncation is required rather than rounding.
-- Forwards_OK (Flag5-Sem)
-- A flag present in the N_Assignment_Statement node. It is used only
-- if the type being assigned is an array type, and is set if analysis
-- determines that it is definitely safe to do the copy forwards, i.e.
-- starting at the lowest addressed element. This is the case if either
-- the operands do not overlap, or they may overlap, but if they do,
-- then the left operand is at a lower address than the right operand.
--
-- Note: If neither of the flags Forwards_OK or Backwards_OK is set, it
-- means that the front end could not determine that either direction is
-- definitely safe, and a runtime check may be required if the backend
-- cannot figure it out. If both flags Forwards_OK and Backwards_OK are
-- set, it means that the front end can assure no overlap of operands.
-- From_Aspect_Specification (Flag13-Sem)
-- Processing of aspect specifications typically results in insertion in
-- the tree of corresponding pragma or attribute definition clause nodes.
-- These generated nodes have the From_Aspect_Specification flag set to
-- indicate that they came from aspect specifications originally.
-- From_At_End (Flag4-Sem)
-- This flag is set on an N_Raise_Statement node if it corresponds to
-- the reraise statement generated as the last statement of an AT END
-- handler when SJLJ exception handling is active. It is used to stop
-- a bogus violation of restriction (No_Exception_Propagation), bogus
-- because if the restriction is set, the reraise is not generated.
-- From_At_Mod (Flag4-Sem)
-- This flag is set on the attribute definition clause node that is
-- generated by a transformation of an at mod phrase in a record
-- representation clause. This is used to give slightly different (Ada 83
-- compatible) semantics to such a clause, namely it is used to specify a
-- minimum acceptable alignment for the base type and all subtypes. In
-- Ada 95 terms, the actual alignment of the base type and all subtypes
-- must be a multiple of the given value, and the representation clause
-- is considered to be type specific instead of subtype specific.
-- From_Conditional_Expression (Flag1-Sem)
-- This flag is set on if and case statements generated by the expansion
-- of if and case expressions respectively. The flag is used to suppress
-- any finalization of controlled objects found within these statements.
-- From_Default (Flag6-Sem)
-- This flag is set on the subprogram renaming declaration created in an
-- instance for a formal subprogram, when the formal is declared with a
-- box, and there is no explicit actual. If the flag is present, the
-- declaration is treated as an implicit reference to the formal in the
-- ali file.
-- Generalized_Indexing (Node4-Sem)
-- Present in N_Indexed_Component nodes. Set for Indexed_Component nodes
-- that are Ada 2012 container indexing operations. The value of the
-- attribute is a function call (possibly dereferenced) that corresponds
-- to the proper expansion of the source indexing operation. Before
-- expansion, the source node is rewritten as the resolved generalized
-- indexing. In ASIS mode, the expansion does not take place, so that
-- the source is preserved and properly annotated with types.
-- Generic_Parent (Node5-Sem)
-- Generic_Parent is defined on declaration nodes that are instances. The
-- value of Generic_Parent is the generic entity from which the instance
-- is obtained. Generic_Parent is also defined for the renaming
-- declarations and object declarations created for the actuals in an
-- instantiation. The generic parent of such a declaration is the
-- corresponding generic association in the Instantiation node.
-- Generic_Parent_Type (Node4-Sem)
-- Generic_Parent_Type is defined on Subtype_Declaration nodes for the
-- actuals of formal private and derived types. Within the instance, the
-- operations on the actual are those inherited from the parent. For a
-- formal private type, the parent type is the generic type itself. The
-- Generic_Parent_Type is also used in an instance to determine whether a
-- private operation overrides an inherited one.
-- Handler_List_Entry (Node2-Sem)
-- This field is present in N_Object_Declaration nodes. It is set only
-- for the Handler_Record entry generated for an exception in zero cost
-- exception handling mode. It references the corresponding item in the
-- handler list, and is used to delete this entry if the corresponding
-- handler is deleted during optimization. For further details on why
-- this is required, see Exp_Ch11.Remove_Handler_Entries.
-- Has_Dereference_Action (Flag13-Sem)
-- This flag is present in N_Explicit_Dereference nodes. It is set to
-- indicate that the expansion has aready produced a call to primitive
-- Dereference of a System.Checked_Pools.Checked_Pool implementation.
-- Such dereference actions are produced for debugging purposes.
-- Has_Dynamic_Length_Check (Flag10-Sem)
-- This flag is present in all expression nodes. It is set to indicate
-- that one of the routines in unit Checks has generated a length check
-- action which has been inserted at the flagged node. This is used to
-- avoid the generation of duplicate checks.
-- Has_Dynamic_Range_Check (Flag12-Sem)
-- This flag is present in N_Subtype_Declaration nodes and on all
-- expression nodes. It is set to indicate that one of the routines in
-- unit Checks has generated a range check action which has been inserted
-- at the flagged node. This is used to avoid the generation of duplicate
-- checks. Why does this occur on N_Subtype_Declaration nodes, what does
-- it mean in that context???
-- Has_Local_Raise (Flag8-Sem)
-- Present in exception handler nodes. Set if the handler can be entered
-- via a local raise that gets transformed to a goto statement. This will
-- always be set if Local_Raise_Statements is non-empty, but can also be
-- set as a result of generation of N_Raise_xxx nodes, or flags set in
-- nodes requiring generation of back end checks.
-- Has_No_Elaboration_Code (Flag17-Sem)
-- A flag that appears in the N_Compilation_Unit node to indicate whether
-- or not elaboration code is present for this unit. It is initially set
-- true for subprogram specs and bodies and for all generic units and
-- false for non-generic package specs and bodies. Gigi may set the flag
-- in the non-generic package case if it determines that no elaboration
-- code is generated. Note that this flag is not related to the
-- Is_Preelaborated status, there can be preelaborated packages that
-- generate elaboration code, and non-preelaborated packages which do
-- not generate elaboration code.
-- Has_Pragma_Suppress_All (Flag14-Sem)
-- This flag is set in an N_Compilation_Unit node if the Suppress_All
-- pragma appears anywhere in the unit. This accommodates the rather
-- strange placement rules of other compilers (DEC permits it at the
-- end of a unit, and Rational allows it as a program unit pragma). We
-- allow it anywhere at all, and consider it equivalent to a pragma
-- Suppress (All_Checks) appearing at the start of the configuration
-- pragmas for the unit.
-- Has_Private_View (Flag11-Sem)
-- A flag present in generic nodes that have an entity, to indicate that
-- the node has a private type. Used to exchange private and full
-- declarations if the visibility at instantiation is different from the
-- visibility at generic definition.
-- Has_Relative_Deadline_Pragma (Flag9-Sem)
-- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
-- flag the presence of a pragma Relative_Deadline.
-- Has_Self_Reference (Flag13-Sem)
-- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one
-- of the expressions contains an access attribute reference to the
-- enclosing type. Such a self-reference can only appear in default-
-- initialized aggregate for a record type.
-- Has_SP_Choice (Flag15-Sem)
-- Present in all nodes containing a Discrete_Choices field (N_Variant,
-- N_Case_Expression_Alternative, N_Case_Statement_Alternative). Set to
-- True if the Discrete_Choices list has at least one occurrence of a
-- statically predicated subtype.
-- Has_Storage_Size_Pragma (Flag5-Sem)
-- A flag present in an N_Task_Definition node to flag the presence of a
-- Storage_Size pragma.
-- Has_Target_Names (Flag8-Sem)
-- Present in assignment statements. Indicates that the RHS contains
-- target names (see AI12-0125-3) and must be expanded accordingly.
-- Has_Wide_Character (Flag11-Sem)
-- Present in string literals, set if any wide character (i.e. character
-- code outside the Character range but within Wide_Character range)
-- appears in the string. Used to implement pragma preference rules.
-- Has_Wide_Wide_Character (Flag13-Sem)
-- Present in string literals, set if any wide character (i.e. character
-- code outside the Wide_Character range) appears in the string. Used to
-- implement pragma preference rules.
-- Header_Size_Added (Flag11-Sem)
-- Present in N_Attribute_Reference nodes, set only for attribute
-- Max_Size_In_Storage_Elements. The flag indicates that the size of the
-- hidden list header used by the runtime finalization support has been
-- added to the size of the prefix. The flag also prevents the infinite
-- expansion of the same attribute in the said context.
-- Hidden_By_Use_Clause (Elist4-Sem)
-- An entity list present in use clauses that appear within
-- instantiations. For the resolution of local entities, entities
-- introduced by these use clauses have priority over global ones, and
-- outer entities must be explicitly hidden/restored on exit.
-- Implicit_With (Flag16-Sem)
-- This flag is set in the N_With_Clause node that is implicitly
-- generated for runtime units that are loaded by the expander or in
-- GNATprove mode, and also for package System, if it is loaded
-- implicitly by a use of the 'Address or 'Tag attribute.
-- ??? There are other implicit with clauses as well.
-- Implicit_With_From_Instantiation (Flag12-Sem)
-- Set in N_With_Clause nodes from generic instantiations.
-- Import_Interface_Present (Flag16-Sem)
-- This flag is set in an Interface or Import pragma if a matching
-- pragma of the other kind is also present. This is used to avoid
-- generating some unwanted error messages.
-- Includes_Infinities (Flag11-Sem)
-- This flag is present in N_Range nodes. It is set for the range of
-- unconstrained float types defined in Standard, which include not only
-- the given range of values, but also legitimately can include infinite
-- values. This flag is false for any float type for which an explicit
-- range is given by the programmer, even if that range is identical to
-- the range for Float.
-- Incomplete_View (Node2-Sem)
-- Present in full type declarations that are completions of incomplete
-- type declarations. Denotes the corresponding incomplete type
-- declaration. Used to simplify the retrieval of primitive operations
-- that may be declared between the partial and the full view of an
-- untagged type.
-- Inherited_Discriminant (Flag13-Sem)
-- This flag is present in N_Component_Association nodes. It indicates
-- that a given component association in an extension aggregate is the
-- value obtained from a constraint on an ancestor. Used to prevent
-- double expansion when the aggregate has expansion delayed.
-- Instance_Spec (Node5-Sem)
-- This field is present in generic instantiation nodes, and also in
-- formal package declaration nodes (formal package declarations are
-- treated in a manner very similar to package instantiations). It points
-- to the node for the spec of the instance, inserted as part of the
-- semantic processing for instantiations in Sem_Ch12.
-- Is_Abort_Block (Flag4-Sem)
-- Present in N_Block_Statement nodes. True if the block protects a list
-- of statements with an Abort_Defer / Abort_Undefer_Direct pair.
-- Is_Accessibility_Actual (Flag13-Sem)
-- Present in N_Parameter_Association nodes. True if the parameter is
-- an extra actual that carries the accessibility level of the actual
-- for an access parameter, in a function that dispatches on result and
-- is called in a dispatching context. Used to prevent a formal/actual
-- mismatch when the call is rewritten as a dispatching call.
-- Is_Analyzed_Pragma (Flag5-Sem)
-- Present in N_Pragma nodes. Set for delayed pragmas that require a two
-- step analysis. The initial step is peformed by routine Analyze_Pragma
-- and verifies the overall legality of the pragma. The second step takes
-- place in the various Analyze_xxx_In_Decl_Part routines which perform
-- full analysis. The flag prevents the reanalysis of a delayed pragma.
-- Is_Expanded_Contract (Flag1-Sem)
-- Present in N_Contract nodes. Set if the contract has already undergone
-- expansion activities.
-- Is_Asynchronous_Call_Block (Flag7-Sem)
-- A flag set in a Block_Statement node to indicate that it is the
-- expansion of an asynchronous entry call. Such a block needs cleanup
-- handler to assure that the call is cancelled.
-- Is_Boolean_Aspect (Flag16-Sem)
-- Present in N_Aspect_Specification node. Set if the aspect is for a
-- boolean aspect (i.e. Aspect_Id is in Boolean_Aspect subtype).
-- Is_Checked (Flag11-Sem)
-- Present in N_Aspect_Specification and N_Pragma nodes. Set for an
-- assertion aspect or pragma, or check pragma for an assertion, that
-- is to be checked at run time. If either Is_Checked or Is_Ignored
-- is set (they cannot both be set), then this means that the status of
-- the pragma has been checked at the appropriate point and should not
-- be further modified (in some cases these flags are copied when a
-- pragma is rewritten).
-- Is_Checked_Ghost_Pragma (Flag3-Sem)
-- This flag is present in N_Pragma nodes. It is set when the pragma is
-- related to a checked Ghost entity or encloses a checked Ghost entity.
-- This flag has no relation to Is_Checked.
-- Is_Component_Left_Opnd (Flag13-Sem)
-- Is_Component_Right_Opnd (Flag14-Sem)
-- Present in concatenation nodes, to indicate that the corresponding
-- operand is of the component type of the result. Used in resolving
-- concatenation nodes in instances.
-- Is_Controlling_Actual (Flag16-Sem)
-- This flag is set on an expression that is a controlling argument in
-- a dispatching call. It is off in all other cases. See Sem_Disp for
-- details of its use.
-- Is_Delayed_Aspect (Flag14-Sem)
-- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
-- come from aspect specifications, where the evaluation of the aspect
-- must be delayed to the freeze point. This flag is also set True in
-- the corresponding N_Aspect_Specification node.
-- Is_Disabled (Flag15-Sem)
-- A flag set in an N_Aspect_Specification or N_Pragma node if there was
-- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
-- a Debug_Policy pragma that resulted in totally disabling the flagged
-- aspect or policy as a result of using the GNAT-defined policy DISABLE.
-- If this flag is set, the aspect or policy is not analyzed for semantic
-- correctness, so any expressions etc will not be marked as analyzed.
-- Is_Dynamic_Coextension (Flag18-Sem)
-- Present in allocator nodes, to indicate that this is an allocator
-- for an access discriminant of a dynamically allocated object. The
-- coextension must be deallocated and finalized at the same time as
-- the enclosing object.
-- Is_Entry_Barrier_Function (Flag8-Sem)
-- This flag is set on N_Subprogram_Declaration and N_Subprogram_Body
-- nodes which emulate the barrier function of a protected entry body.
-- The flag is used when checking for incorrect use of Current_Task.
-- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
-- This flag is set in an N_Function_Call node to indicate that the extra
-- actuals to support a build-in-place style of call have been added to
-- the call.
-- Is_Finalization_Wrapper (Flag9-Sem)
-- This flag is present in N_Block_Statement nodes. It is set when the
-- block acts as a wrapper of a handled construct which has controlled
-- objects. The wrapper prevents interference between exception handlers
-- and At_End handlers.
-- Is_Generic_Contract_Pragma (Flag2-Sem)
-- This flag is present in N_Pragma nodes. It is set when the pragma is
-- a source construct, applies to a generic unit or its body and denotes
-- one of the following contract-related annotations:
-- Abstract_State
-- Contract_Cases
-- Depends
-- Extensions_Visible
-- Global
-- Initial_Condition
-- Initializes
-- Post
-- Post_Class
-- Postcondition
-- Pre
-- Pre_Class
-- Precondition
-- Refined_Depends
-- Refined_Global
-- Refined_Post
-- Refined_State
-- Test_Case
-- Is_Ignored (Flag9-Sem)
-- A flag set in an N_Aspect_Specification or N_Pragma node if there was
-- a Check_Policy or Assertion_Policy (or in the case of a Debug_Pragma)
-- a Debug_Policy pragma that specified a policy of IGNORE, DISABLE, or
-- OFF, for the pragma/aspect. If there was a Policy pragma specifying
-- a Policy of ON or CHECK, then this flag is reset. If no Policy pragma
-- gives a policy for the aspect or pragma, then there are two cases. For
-- an assertion aspect or pragma (one of the assertion kinds allowed in
-- an Assertion_Policy pragma), then Is_Ignored is set if assertions are
-- ignored because of the absence of a -gnata switch. For any other
-- aspects or pragmas, the flag is off. If this flag is set, the
-- aspect/pragma is fully analyzed and checked for other syntactic
-- and semantic errors, but it does not have any semantic effect.
-- Is_Ignored_Ghost_Pragma (Flag8-Sem)
-- This flag is present in N_Pragma nodes. It is set when the pragma is
-- related to an ignored Ghost entity or encloses ignored Ghost entity.
-- This flag has no relation to Is_Ignored.
-- Is_In_Discriminant_Check (Flag11-Sem)
-- This flag is present in a selected component, and is used to indicate
-- that the reference occurs within a discriminant check. The
-- significance is that optimizations based on assuming that the
-- discriminant check has a correct value cannot be performed in this
-- case (or the discriminant check may be optimized away).
-- Is_Inherited_Pragma (Flag4-Sem)
-- This flag is set in an N_Pragma node that appears in a N_Contract node
-- to indicate that the pragma has been inherited from a parent context.
-- Is_Machine_Number (Flag11-Sem)
-- This flag is set in an N_Real_Literal node to indicate that the value
-- is a machine number. This avoids some unnecessary cases of converting
-- real literals to machine numbers.
-- Is_Null_Loop (Flag16-Sem)
-- This flag is set in an N_Loop_Statement node if the corresponding loop
-- can be determined to be null at compile time. This is used to remove
-- the loop entirely at expansion time.
-- Is_Overloaded (Flag5-Sem)
-- A flag present in all expression nodes. Used temporarily during
-- overloading determination. The setting of this flag is not relevant
-- once overloading analysis is complete.
-- Is_Power_Of_2_For_Shift (Flag13-Sem)
-- A flag present only in N_Op_Expon nodes. It is set when the
-- exponentiation is of the form 2 ** N, where the type of N is an
-- unsigned integral subtype whose size does not exceed the size of
-- Standard_Integer (i.e. a type that can be safely converted to
-- Natural), and the exponentiation appears as the right operand of an
-- integer multiplication or an integer division where the dividend is
-- unsigned. It is also required that overflow checking is off for both
-- the exponentiation and the multiply/divide node. If this set of
-- conditions holds, and the flag is set, then the division or
-- multiplication can be (and is) converted to a shift.
-- Is_Prefixed_Call (Flag17-Sem)
-- This flag is set in a selected component within a generic unit, if
-- it resolves to a prefixed call to a primitive operation. The flag
-- is used to prevent accidental overloadings in an instance, when a
-- primitive operation and a private record component may be homographs.
-- Is_Protected_Subprogram_Body (Flag7-Sem)
-- A flag set in a Subprogram_Body block to indicate that it is the
-- implementation of a protected subprogram. Such a body needs cleanup
-- handler to make sure that the associated protected object is unlocked
-- when the subprogram completes.
-- Is_Qualified_Universal_Literal (Flag4-Sem)
-- Present in N_Qualified_Expression nodes. Set when the qualification is
-- converting a universal literal to a specific type. Such qualifiers aid
-- the resolution of accidental overloading of binary or unary operators
-- which may occur in instances.
-- Is_Static_Coextension (Flag14-Sem)
-- Present in N_Allocator nodes. Set if the allocator is a coextension
-- of an object allocated on the stack rather than the heap.
-- Is_Static_Expression (Flag6-Sem)
-- Indicates that an expression is a static expression according to the
-- rules in (RM 4.9). Note that it is possible for this flag to be set
-- when Raises_Constraint_Error is also set. In practice almost all cases
-- where a static expression is required do not allow an expression which
-- raises Constraint_Error, so almost always, callers should call the
-- Is_Ok_Static_Expression routine instead of testing this flag. See
-- spec of package Sem_Eval for full details on the use of this flag.
-- Is_Subprogram_Descriptor (Flag16-Sem)
-- Present in N_Object_Declaration, and set only for the object
-- declaration generated for a subprogram descriptor in fast exception
-- mode. See Exp_Ch11 for details of use.
-- Is_Task_Allocation_Block (Flag6-Sem)
-- A flag set in a Block_Statement node to indicate that it is the
-- expansion of a task allocator, or the allocator of an object
-- containing tasks. Such a block requires a cleanup handler to call
-- Expunge_Unactivated_Tasks to complete any tasks that have been
-- allocated but not activated when the allocator completes abnormally.
-- Is_Task_Body_Procedure (Flag1-Sem)
-- This flag is set on N_Subprogram_Declaration and N_Subprogram_Body
-- nodes which emulate the body of a task unit.
-- Is_Task_Master (Flag5-Sem)
-- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to
-- indicate that the construct is a task master (i.e. has declared tasks
-- or declares an access to a task type).
-- Itype (Node1-Sem)
-- Used in N_Itype_Reference node to reference an itype for which it is
-- important to ensure that it is defined. See description of this node
-- for further details.
-- Kill_Range_Check (Flag11-Sem)
-- Used in an N_Unchecked_Type_Conversion node to indicate that the
-- result should not be subjected to range checks. This is used for the
-- implementation of Normalize_Scalars.
-- Label_Construct (Node2-Sem)
-- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label,
-- N_Block_Statement or N_Loop_Statement node to which the label
-- declaration applies. This attribute is used both in the compiler and
-- in the implementation of ASIS queries. The field is left empty for the
-- special labels generated as part of expanding raise statements with a
-- local exception handler.
-- Library_Unit (Node4-Sem)
-- In a stub node, Library_Unit points to the compilation unit node of
-- the corresponding subunit.
--
-- In a with clause node, Library_Unit points to the spec of the with'ed
-- unit.
--
-- In a compilation unit node, the usage depends on the unit type:
--
-- For a library unit body, Library_Unit points to the compilation unit
-- node of the corresponding spec, unless it's a subprogram body with
-- Acts_As_Spec set, in which case it points to itself.
--
-- For a spec, Library_Unit points to the compilation unit node of the
-- corresponding body, if present. The body will be present if the spec
-- is or contains generics that we needed to instantiate. Similarly, the
-- body will be present if we needed it for inlining purposes. Thus, if
-- we have a spec/body pair, both of which are present, they point to
-- each other via Library_Unit.
--
-- For a subunit, Library_Unit points to the compilation unit node of
-- the parent body.
-- ??? not (always) true, in (at least some, maybe all?) cases it points
-- to the corresponding spec for the parent body.
--
-- Note that this field is not used to hold the parent pointer for child
-- unit (which might in any case need to use it for some other purpose as
-- described above). Instead for a child unit, implicit with's are
-- generated for all parents.
-- Local_Raise_Statements (Elist1)
-- This field is present in exception handler nodes. It is set to
-- No_Elist in the normal case. If there is at least one raise statement
-- which can potentially be handled as a local raise, then this field
-- points to a list of raise nodes, which are calls to a routine to raise
-- an exception. These are raise nodes which can be optimized into gotos
-- if the handler turns out to meet the conditions which permit this
-- transformation. Note that this does NOT include instances of the
-- N_Raise_xxx_Error nodes since the transformation of these nodes is
-- handled by the back end (using the N_Push/N_Pop mechanism).
-- Loop_Actions (List2-Sem)
-- A list present in Component_Association nodes in array aggregates.
-- Used to collect actions that must be executed within the loop because
-- they may need to be evaluated anew each time through.
-- Limited_View_Installed (Flag18-Sem)
-- Present in With_Clauses and in package specifications. If set on
-- with_clause, it indicates that this clause has created the current
-- limited view of the designated package. On a package specification, it
-- indicates that the limited view has already been created because the
-- package is mentioned in a limited_with_clause in the closure of the
-- unit being compiled.
-- Local_Raise_Not_OK (Flag7-Sem)
-- Present in N_Exception_Handler nodes. Set if the handler contains
-- a construct (reraise statement, or call to subprogram in package
-- GNAT.Current_Exception) that makes the handler unsuitable as a target
-- for a local raise (one that could otherwise be converted to a goto).
-- Must_Be_Byte_Aligned (Flag14-Sem)
-- This flag is present in N_Attribute_Reference nodes. It can be set
-- only for the Address and Unrestricted_Access attributes. If set it
-- means that the object for which the address/access is given must be on
-- a byte (more accurately a storage unit) boundary. If necessary, a copy
-- of the object is to be made before taking the address (this copy is in
-- the current scope on the stack frame). This is used for certain cases
-- of code generated by the expander that passes parameters by address.
--
-- The reason the copy is not made by the front end is that the back end
-- has more information about type layout and may be able to (but is not
-- guaranteed to) prevent making unnecessary copies.
-- Must_Not_Freeze (Flag8-Sem)
-- A flag present in all expression nodes. Normally expressions cause
-- freezing as described in the RM. If this flag is set, then this is
-- inhibited. This is used by the analyzer and expander to label nodes
-- that are created by semantic analysis or expansion and which must not
-- cause freezing even though they normally would. This flag is also
-- present in an N_Subtype_Indication node, since we also use these in
-- calls to Freeze_Expression.
-- Next_Entity (Node2-Sem)
-- Present in defining identifiers, defining character literals and
-- defining operator symbols (i.e. in all entities). The entities of a
-- scope are chained, and this field is used as the forward pointer for
-- this list. See Einfo for further details.
-- Next_Exit_Statement (Node3-Sem)
-- Present in N_Exit_Statement nodes. The exit statements for a loop are
-- chained (in reverse order of appearance) from the First_Exit_Statement
-- field of the E_Loop entity for the loop. Next_Exit_Statement points to
-- the next entry on this chain (Empty = end of list).
-- Next_Implicit_With (Node3-Sem)
-- Present in N_With_Clause. Part of a chain of with_clauses generated
-- in rtsfind to indicate implicit dependencies on predefined units. Used
-- to prevent multiple with_clauses for the same unit in a given context.
-- A postorder traversal of the tree whose nodes are units and whose
-- links are with_clauses defines the order in which CodePeer must
-- examine a compiled unit and its full context. This ordering ensures
-- that any subprogram call is examined after the subprogram declaration
-- has been seen.
-- Next_Named_Actual (Node4-Sem)
-- Present in parameter association nodes. Set during semantic analysis
-- to point to the next named parameter, where parameters are ordered by
-- declaration order (as opposed to the actual order in the call, which
-- may be different due to named associations). Not that this field
-- points to the explicit actual parameter itself, not to the
-- N_Parameter_Association node (its parent).
-- Next_Pragma (Node1-Sem)
-- Present in N_Pragma nodes. Used to create a linked list of pragma
-- nodes. Currently used for two purposes:
--
-- Create a list of linked Check_Policy pragmas. The head of this list
-- is stored in Opt.Check_Policy_List (which has further details).
--
-- Used by processing for Pre/Postcondition pragmas to store a list of
-- pragmas associated with the spec of a subprogram (see Sem_Prag for
-- details).
--
-- Used by processing for pragma SPARK_Mode to store multiple pragmas
-- the apply to the same construct. These are visible/private mode for
-- a package spec and declarative/statement mode for package body.
-- Next_Rep_Item (Node5-Sem)
-- Present in pragma nodes, attribute definition nodes, enumeration rep
-- clauses, record rep clauses, aspect specification nodes. Used to link
-- representation items that apply to an entity. See full description of
-- First_Rep_Item field in Einfo for further details.
-- Next_Use_Clause (Node3-Sem)
-- While use clauses are active during semantic processing, they are
-- chained from the scope stack entry, using Next_Use_Clause as a link
-- pointer, with Empty marking the end of the list. The head pointer is
-- in the scope stack entry (First_Use_Clause). At the end of semantic
-- processing (i.e. when Gigi sees the tree, the contents of this field
-- is undefined and should not be read).
-- No_Ctrl_Actions (Flag7-Sem)
-- Present in N_Assignment_Statement to indicate that no Finalize nor
-- Adjust should take place on this assignment even though the RHS is
-- controlled. Also indicates that the primitive _assign should not be
-- used for a tagged assignment. This is used in init procs and aggregate
-- expansions where the generated assignments are initializations, not
-- real assignments.
-- No_Elaboration_Check (Flag14-Sem)
-- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates
-- that no elaboration check is needed on the call, because it appears in
-- the context of a local Suppress pragma. This is used on calls within
-- task bodies, where the actual elaboration checks are applied after
-- analysis, when the local scope stack is not present.
-- No_Entities_Ref_In_Spec (Flag8-Sem)
-- Present in N_With_Clause nodes. Set if the with clause is on the
-- package or subprogram spec where the main unit is the corresponding
-- body, and no entities of the with'ed unit are referenced by the spec
-- (an entity may still be referenced in the body, so this flag is used
-- to generate the proper message (see Sem_Util.Check_Unused_Withs for
-- full details).
-- No_Initialization (Flag13-Sem)
-- Present in N_Object_Declaration and N_Allocator to indicate that the
-- object must not be initialized (by Initialize or call to an init
-- proc). This is needed for controlled aggregates. When the Object
-- declaration has an expression, this flag means that this expression
-- should not be taken into account (needed for in place initialization
-- with aggregates, and for object with an address clause, which are
-- initialized with an assignment at freeze time).
-- No_Minimize_Eliminate (Flag17-Sem)
-- This flag is present in membership operator nodes (N_In/N_Not_In).
-- It is used to indicate that processing for extended overflow checking
-- modes is not required (this is used to prevent infinite recursion).
-- No_Side_Effect_Removal (Flag1-Sem)
-- Present in N_Function_Call nodes. Set when a function call does not
-- require side effect removal. This attribute suppresses the generation
-- of a temporary to capture the result of the function which eventually
-- replaces the function call.
-- No_Truncation (Flag17-Sem)
-- Present in N_Unchecked_Type_Conversion node. This flag has an effect
-- only if the RM_Size of the source is greater than the RM_Size of the
-- target for scalar operands. Normally in such a case we truncate some
-- higher order bits of the source, and then sign/zero extend the result
-- to form the output value. But if this flag is set, then we do not do
-- any truncation, so for example, if an 8 bit input is converted to 5
-- bit result which is in fact stored in 8 bits, then the high order
-- three bits of the target result will be copied from the source. This
-- is used for properly setting out of range values for use by pragmas
-- Initialize_Scalars and Normalize_Scalars.
-- Non_Aliased_Prefix (Flag18-Sem)
-- Present in N_Attribute_Reference nodes. Set only for the case of an
-- Unrestricted_Access reference whose prefix is non-aliased, which is
-- the case that is permitted for Unrestricted_Access except when the
-- expected type is a thin pointer to unconstrained array. This flag is
-- to assist in detecting this illegal use of Unrestricted_Access.
-- Null_Excluding_Subtype (Flag16)
-- Present in N_Access_To_Object_Definition. Indicates that the subtype
-- indication carries a null-exclusion indicator, which is distinct from
-- the null-exclusion indicator that may precede the access keyword.
-- Original_Discriminant (Node2-Sem)
-- Present in identifiers. Used in references to discriminants that
-- appear in generic units. Because the names of the discriminants may be
-- different in an instance, we use this field to recover the position of
-- the discriminant in the original type, and replace it with the
-- discriminant at the same position in the instantiated type.
-- Original_Entity (Node2-Sem)
-- Present in numeric literals. Used to denote the named number that has
-- been constant-folded into the given literal. If literal is from
-- source, or the result of some other constant-folding operation, then
-- Original_Entity is empty. This field is needed to handle properly
-- named numbers in generic units, where the Associated_Node field
-- interferes with the Entity field, making it impossible to preserve the
-- original entity at the point of instantiation (ASIS problem).
-- Others_Discrete_Choices (List1-Sem)
-- When a case statement or variant is analyzed, the semantic checks
-- determine the actual list of choices that correspond to an others
-- choice. This list is materialized for later use by the expander and
-- the Others_Discrete_Choices field of an N_Others_Choice node points to
-- this materialized list of choices, which is in standard format for a
-- list of discrete choices, except that of course it cannot contain an
-- N_Others_Choice entry.
-- Parent_Spec (Node4-Sem)
-- For a library unit that is a child unit spec (package or subprogram
-- declaration, generic declaration or instantiation, or library level
-- rename) this field points to the compilation unit node for the parent
-- package specification. This field is Empty for library bodies (the
-- parent spec in this case can be found from the corresponding spec).
-- Premature_Use (Node5-Sem)
-- Present in N_Incomplete_Type_Declaration node. Used for improved
-- error diagnostics: if there is a premature usage of an incomplete
-- type, a subsequently generated error message indicates the position
-- of its full declaration.
-- Present_Expr (Uint3-Sem)
-- Present in an N_Variant node. This has a meaningful value only after
-- Gigi has back annotated the tree with representation information. At
-- this point, it contains a reference to a gcc expression that depends
-- on the values of one or more discriminants. Give a set of discriminant
-- values, this expression evaluates to False (zero) if variant is not
-- present, and True (non-zero) if it is present. See unit Repinfo for
-- further details on gigi back annotation. This field is used during
-- ASIS processing (data decomposition annex) to determine if a field is
-- present or not.
-- Print_In_Hex (Flag13-Sem)
-- Set on an N_Integer_Literal node to indicate that the value should be
-- printed in hexadecimal in the sprint listing. Has no effect on
-- legality or semantics of program, only on the displayed output. This
-- is used to clarify output from the packed array cases.
-- Procedure_To_Call (Node2-Sem)
-- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
-- and N_Extended_Return_Statement nodes. References the entity for the
-- declaration of the procedure to be called to accomplish the required
-- operation (i.e. for the Allocate procedure in the case of N_Allocator
-- and N_Simple_Return_Statement and N_Extended_Return_Statement (for
-- allocating the return value), and for the Deallocate procedure in the
-- case of N_Free_Statement.
-- Raises_Constraint_Error (Flag7-Sem)
-- Set on an expression whose evaluation will definitely fail constraint
-- error check. In the case of static expressions, this flag must be set
-- accurately (and if it is set, the expression is typically illegal
-- unless it appears as a non-elaborated branch of a short-circuit form).
-- For a non-static expression, this flag may be set whenever an
-- expression (e.g. an aggregate) is known to raise constraint error. If
-- set, the expression definitely will raise CE if elaborated at runtime.
-- If not set, the expression may or may not raise CE. In other words, on
-- static expressions, the flag is set accurately, on non-static
-- expressions it is set conservatively.
-- Redundant_Use (Flag13-Sem)
-- Present in nodes that can appear as an operand in a use clause or use
-- type clause (identifiers, expanded names, attribute references). Set
-- to indicate that a use is redundant (and therefore need not be undone
-- on scope exit).
-- Renaming_Exception (Node2-Sem)
-- Present in N_Exception_Declaration node. Used to point back to the
-- exception renaming for an exception declared within a subprogram.
-- What happens is that an exception declared in a subprogram is moved
-- to the library level with a unique name, and the original exception
-- becomes a renaming. This link from the library level exception to the
-- renaming declaration allows registering of the proper exception name.
-- Return_Statement_Entity (Node5-Sem)
-- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
-- Points to an E_Return_Statement representing the return statement.
-- Return_Object_Declarations (List3)
-- Present in N_Extended_Return_Statement. Points to a list initially
-- containing a single N_Object_Declaration representing the return
-- object. We use a list (instead of just a pointer to the object decl)
-- because Analyze wants to insert extra actions on this list.
-- Rounded_Result (Flag18-Sem)
-- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes.
-- Used in the fixed-point cases to indicate that the result must be
-- rounded as a result of the use of the 'Round attribute. Also used for
-- integer N_Op_Divide nodes to indicate that the result should be
-- rounded to the nearest integer (breaking ties away from zero), rather
-- than truncated towards zero as usual. These rounded integer operations
-- are the result of expansion of rounded fixed-point divide, conversion
-- and multiplication operations.
-- SCIL_Entity (Node4-Sem)
-- Present in SCIL nodes. References the specific tagged type associated
-- with the SCIL node (for an N_SCIL_Dispatching_Call node, this is
-- the controlling type of the call; for an N_SCIL_Membership_Test node
-- generated as part of testing membership in T'Class, this is T; for an
-- N_SCIL_Dispatch_Table_Tag_Init node, this is the type being declared).
-- SCIL_Controlling_Tag (Node5-Sem)
-- Present in N_SCIL_Dispatching_Call nodes. References the controlling
-- tag of a dispatching call. This is usually an N_Selected_Component
-- node (for a _tag component), but may be an N_Object_Declaration or
-- N_Parameter_Specification node in some cases (e.g., for a call to
-- a classwide streaming operation or a call to an instance of
-- Ada.Tags.Generic_Dispatching_Constructor).
-- SCIL_Tag_Value (Node5-Sem)
-- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
-- of the value that is being tested.
-- SCIL_Target_Prim (Node2-Sem)
-- Present in N_SCIL_Dispatching_Call nodes. References the primitive
-- operation named (statically) in a dispatching call.
-- Scope (Node3-Sem)
-- Present in defining identifiers, defining character literals and
-- defining operator symbols (i.e. in all entities). The entities of a
-- scope all use this field to reference the corresponding scope entity.
-- See Einfo for further details.
-- Shift_Count_OK (Flag4-Sem)
-- A flag present in shift nodes to indicate that the shift count is
-- known to be in range, i.e. is in the range from zero to word length
-- minus one. If this flag is not set, then the shift count may be
-- outside this range, i.e. larger than the word length, and the code
-- must ensure that such shift counts give the appropriate result.
-- Source_Type (Node1-Sem)
-- Used in an N_Validate_Unchecked_Conversion node to point to the
-- source type entity for the unchecked conversion instantiation
-- which gigi must do size validation for.
-- Split_PPC (Flag17)
-- When a Pre or Post aspect specification is processed, it is broken
-- into AND THEN sections. The left most section has Split_PPC set to
-- False, indicating that it is the original specification (e.g. for
-- posting errors). For other sections, Split_PPC is set to True.
-- This flag is set in both the N_Aspect_Specification node itself,
-- and in the pragma which is generated from this node.
-- Storage_Pool (Node1-Sem)
-- Present in N_Allocator, N_Free_Statement, N_Simple_Return_Statement,
-- and N_Extended_Return_Statement nodes. References the entity for the
-- storage pool to be used for the allocate or free call or for the
-- allocation of the returned value from function. Empty indicates that
-- the global default pool is to be used. Note that in the case
-- of a return statement, this field is set only if the function returns
-- value of a type whose size is not known at compile time on the
-- secondary stack.
-- Suppress_Assignment_Checks (Flag18-Sem)
-- Used in generated N_Assignment_Statement nodes to suppress predicate
-- and range checks in cases where the generated code knows that the
-- value being assigned is in range and satisfies any predicate. Also
-- can be set in N_Object_Declaration nodes, to similarly suppress any
-- checks on the initializing value. In assignment statements it also
-- suppresses access checks in the generated code for out- and in-out
-- parameters in entry calls.
-- Suppress_Loop_Warnings (Flag17-Sem)
-- Used in N_Loop_Statement node to indicate that warnings within the
-- body of the loop should be suppressed. This is set when the range
-- of a FOR loop is known to be null, or is probably null (loop would
-- only execute if invalid values are present).
-- Target_Type (Node2-Sem)
-- Used in an N_Validate_Unchecked_Conversion node to point to the target
-- type entity for the unchecked conversion instantiation which gigi must
-- do size validation for.
-- Then_Actions (List3-Sem)
-- This field is present in if expression nodes. During code expansion
-- we use the Insert_Actions procedure (in Exp_Util) to insert actions
-- at an appropriate place in the tree to get elaborated at the right
-- time. For if expressions, we have to be sure that the actions for
-- for the Then branch are only elaborated if the condition is True.
-- The Then_Actions field is used as a temporary parking place for
-- these actions. The final tree is always rewritten to eliminate the
-- need for this field, so in the tree passed to Gigi, this field is
-- always set to No_List.
-- Treat_Fixed_As_Integer (Flag14-Sem)
-- This flag appears in operator nodes for divide, multiply, mod and rem
-- on fixed-point operands. It indicates that the operands are to be
-- treated as integer values, ignoring small values. This flag is only
-- set as a result of expansion of fixed-point operations. Typically a
-- fixed-point multiplication in the source generates subsidiary
-- multiplication and division operations that work with the underlying
-- integer values and have this flag set. Note that this flag is not
-- needed on other arithmetic operations (add, neg, subtract etc.) since
-- in these cases it is always the case that fixed is treated as integer.
-- The Etype field MUST be set if this flag is set. The analyzer knows to
-- leave such nodes alone, and whoever makes them must set the correct
-- Etype value.
-- TSS_Elist (Elist3-Sem)
-- Present in N_Freeze_Entity nodes. Holds an element list containing
-- entries for each TSS (type support subprogram) associated with the
-- frozen type. The elements of the list are the entities for the
-- subprograms (see package Exp_TSS for further details). Set to No_Elist
-- if there are no type support subprograms for the type or if the freeze
-- node is not for a type.
-- Uneval_Old_Accept (Flag7-Sem)
-- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'A'
-- (accept) at the point where the pragma is encountered (including the
-- case of a pragma generated from an aspect specification). It is this
-- setting that is relevant, rather than the setting at the point where
-- a contract is finally analyzed after the delay till the freeze point.
-- Uneval_Old_Warn (Flag18-Sem)
-- Present in N_Pragma nodes. Set True if Opt.Uneval_Old is set to 'W'
-- (warn) at the point where the pragma is encountered (including the
-- case of a pragma generated from an aspect specification). It is this
-- setting that is relevant, rather than the setting at the point where
-- a contract is finally analyzed after the delay till the freeze point.
-- Unreferenced_In_Spec (Flag7-Sem)
-- Present in N_With_Clause nodes. Set if the with clause is on the
-- package or subprogram spec where the main unit is the corresponding
-- body, and is not referenced by the spec (it may still be referenced by
-- the body, so this flag is used to generate the proper message (see
-- Sem_Util.Check_Unused_Withs for details)
-- Uninitialized_Variable (Node3-Sem)
-- Present in N_Formal_Private_Type_Definition and in N_Private_
-- Extension_Declarations. Indicates that a variable in a generic unit
-- whose type is a formal private or derived type is read without being
-- initialized. Used to warn if the corresponding actual type is not
-- a fully initialized type.
-- Used_Operations (Elist5-Sem)
-- Present in N_Use_Type_Clause nodes. Holds the list of operations that
-- are made potentially use-visible by the clause. Simplifies processing
-- on exit from the scope of the use_type_clause, in particular in the
-- case of Use_All_Type, when those operations several scopes.
-- Was_Expression_Function (Flag18-Sem)
-- Present in N_Subprogram_Body. True if the original source had an
-- N_Expression_Function, which was converted to the N_Subprogram_Body
-- by Analyze_Expression_Function. This is needed by ASIS to correctly
-- recreate the expression function (for the instance body) when the
-- completion of a generic function declaration is an expression
-- function.
-- Was_Originally_Stub (Flag13-Sem)
-- This flag is set in the node for a proper body that replaces stub.
-- During the analysis procedure, stubs in some situations get rewritten
-- by the corresponding bodies, and we set this flag to remember that
-- this happened. Note that it is not good enough to rely on the use of
-- Original_Node here because of the case of nested instantiations where
-- the substituted node can be copied.
-- Withed_Body (Node1-Sem)
-- Present in N_With_Clause nodes. Set if the unit in whose context
-- the with_clause appears instantiates a generic contained in the
-- library unit of the with_clause and as a result loads its body.
-- Used for a more precise unit traversal for CodePeer.
--------------------------------------------------
-- Note on Use of End_Label and End_Span Fields --
--------------------------------------------------
-- Several constructs have end lines:
-- Loop Statement end loop [loop_IDENTIFIER];
-- Package Specification end [[PARENT_UNIT_NAME .] IDENTIFIER]
-- Task Definition end [task_IDENTIFIER]
-- Protected Definition end [protected_IDENTIFIER]
-- Protected Body end [protected_IDENTIFIER]
-- Block Statement end [block_IDENTIFIER];
-- Subprogram Body end [DESIGNATOR];
-- Package Body end [[PARENT_UNIT_NAME .] IDENTIFIER];
-- Task Body end [task_IDENTIFIER];
-- Accept Statement end [entry_IDENTIFIER]];
-- Entry Body end [entry_IDENTIFIER];
-- If Statement end if;
-- Case Statement end case;
-- Record Definition end record;
-- Enumeration Definition );
-- The End_Label and End_Span fields are used to mark the locations of
-- these lines, and also keep track of the label in the case where a label
-- is present.
-- For the first group above, the End_Label field of the corresponding node
-- is used to point to the label identifier. In the case where there is no
-- label in the source, the parser supplies a dummy identifier (with
-- Comes_From_Source set to False), and the Sloc of this dummy identifier
-- marks the location of the token following the END token.
-- For the second group, the use of End_Label is similar, but the End_Label
-- is found in the N_Handled_Sequence_Of_Statements node. This is done
-- simply because in some cases there is no room in the parent node.
-- For the third group, there is never any label, and instead of using
-- End_Label, we use the End_Span field which gives the location of the
-- token following END, relative to the starting Sloc of the construct,
-- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE
-- following the End_Label.
-- The record definition case is handled specially, we treat it as though
-- it required an optional label which is never present, and so the parser
-- always builds a dummy identifier with Comes From Source set False. The
-- reason we do this, rather than using End_Span in this case, is that we
-- want to generate a cross-ref entry for the end of a record, since it
-- represents a scope for name declaration purposes.
-- The enumeration definition case is handled in an exactly similar manner,
-- building a dummy identifier to get a cross-reference.
-- Note: the reason we store the difference as a Uint, instead of storing
-- the Source_Ptr value directly, is that Source_Ptr values cannot be
-- distinguished from other types of values, and we count on all general
-- use fields being self describing. To make things easier for clients,
-- note that we provide function End_Location, and procedure
-- Set_End_Location to allow access to the logical value (which is the
-- Source_Ptr value for the end token).
---------------------
-- Syntactic Nodes --
---------------------
---------------------
-- 2.3 Identifier --
---------------------
-- IDENTIFIER ::= IDENTIFIER_LETTER {[UNDERLINE] LETTER_OR_DIGIT}
-- LETTER_OR_DIGIT ::= IDENTIFIER_LETTER | DIGIT
-- An IDENTIFIER shall not be a reserved word
-- In the Ada grammar identifiers are the bottom level tokens which have
-- very few semantics. Actual program identifiers are direct names. If
-- we were being 100% honest with the grammar, then we would have a node
-- called N_Direct_Name which would point to an identifier. However,
-- that's too many extra nodes, so we just use the N_Identifier node
-- directly as a direct name, and it contains the expression fields and
-- Entity field that correspond to its use as a direct name. In those
-- few cases where identifiers appear in contexts where they are not
-- direct names (pragmas, pragma argument associations, attribute
-- references and attribute definition clauses), the Chars field of the
-- node contains the Name_Id for the identifier name.
-- Note: in GNAT, a reserved word can be treated as an identifier in two
-- cases. First, an incorrect use of a reserved word as an identifier is
-- diagnosed and then treated as a normal identifier. Second, an
-- attribute designator of the form of a reserved word (access, delta,
-- digits, range) is treated as an identifier.
-- Note: The set of letters that is permitted in an identifier depends
-- on the character set in use. See package Csets for full details.
-- N_Identifier
-- Sloc points to identifier
-- Chars (Name1) contains the Name_Id for the identifier
-- Entity (Node4-Sem)
-- Associated_Node (Node4-Sem)
-- Original_Discriminant (Node2-Sem)
-- Redundant_Use (Flag13-Sem)
-- Atomic_Sync_Required (Flag14-Sem)
-- Has_Private_View (Flag11-Sem) (set in generic units)
-- plus fields for expression
--------------------------
-- 2.4 Numeric Literal --
--------------------------
-- NUMERIC_LITERAL ::= DECIMAL_LITERAL | BASED_LITERAL
----------------------------
-- 2.4.1 Decimal Literal --
----------------------------
-- DECIMAL_LITERAL ::= NUMERAL [.NUMERAL] [EXPONENT]
-- NUMERAL ::= DIGIT {[UNDERLINE] DIGIT}
-- EXPONENT ::= E [+] NUMERAL | E - NUMERAL
-- Decimal literals appear in the tree as either integer literal nodes
-- or real literal nodes, depending on whether a period is present.
-- Note: literal nodes appear as a result of direct use of literals
-- in the source program, and also as the result of evaluating
-- expressions at compile time. In the latter case, it is possible
-- to construct real literals that have no syntactic representation
-- using the standard literal format. Such literals are listed by
-- Sprint using the notation [numerator / denominator].
-- Note: the value of an integer literal node created by the front end
-- is never outside the range of values of the base type. However, it
-- can be the case that the created value is outside the range of the
-- particular subtype. This happens in the case of integer overflows
-- with checks suppressed.
-- N_Integer_Literal
-- Sloc points to literal
-- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
-- has been constant-folded into its literal value.
-- Intval (Uint3) contains integer value of literal
-- Print_In_Hex (Flag13-Sem)
-- plus fields for expression
-- N_Real_Literal
-- Sloc points to literal
-- Original_Entity (Node2-Sem) If not Empty, holds Named_Number that
-- has been constant-folded into its literal value.
-- Realval (Ureal3) contains real value of literal
-- Corresponding_Integer_Value (Uint4-Sem)
-- Is_Machine_Number (Flag11-Sem)
-- plus fields for expression
--------------------------
-- 2.4.2 Based Literal --
--------------------------
-- BASED_LITERAL ::=
-- BASE # BASED_NUMERAL [.BASED_NUMERAL] # [EXPONENT]
-- BASE ::= NUMERAL
-- BASED_NUMERAL ::=
-- EXTENDED_DIGIT {[UNDERLINE] EXTENDED_DIGIT}
-- EXTENDED_DIGIT ::= DIGIT | A | B | C | D | E | F
-- Based literals appear in the tree as either integer literal nodes
-- or real literal nodes, depending on whether a period is present.
----------------------------
-- 2.5 Character Literal --
----------------------------
-- CHARACTER_LITERAL ::= ' GRAPHIC_CHARACTER '
-- N_Character_Literal
-- Sloc points to literal
-- Chars (Name1) contains the Name_Id for the identifier
-- Char_Literal_Value (Uint2) contains the literal value
-- Entity (Node4-Sem)
-- Associated_Node (Node4-Sem)
-- Has_Private_View (Flag11-Sem) set in generic units.
-- plus fields for expression
-- Note: the Entity field will be missing (set to Empty) for character
-- literals whose type is Standard.Wide_Character or Standard.Character
-- or a type derived from one of these two. In this case the character
-- literal stands for its own coding. The reason we take this irregular
-- short cut is to avoid the need to build lots of junk defining
-- character literal nodes.
-------------------------
-- 2.6 String Literal --
-------------------------
-- STRING LITERAL ::= "{STRING_ELEMENT}"
-- A STRING_ELEMENT is either a pair of quotation marks ("), or a
-- single GRAPHIC_CHARACTER other than a quotation mark.
--
-- Is_Folded_In_Parser is True if the parser created this literal by
-- folding a sequence of "&" operators. For example, if the source code
-- says "aaa" & "bbb" & "ccc", and this produces "aaabbbccc", the flag
-- is set. This flag is needed because the parser doesn't know about
-- visibility, so the folded result might be wrong, and semantic
-- analysis needs to check for that.
-- N_String_Literal
-- Sloc points to literal
-- Strval (Str3) contains Id of string value
-- Has_Wide_Character (Flag11-Sem)
-- Has_Wide_Wide_Character (Flag13-Sem)
-- Is_Folded_In_Parser (Flag4)
-- plus fields for expression
------------------
-- 2.7 Comment --
------------------
-- A COMMENT starts with two adjacent hyphens and extends up to the
-- end of the line. A COMMENT may appear on any line of a program.
-- Comments are skipped by the scanner and do not appear in the tree.
-- It is possible to reconstruct the position of comments with respect
-- to the elements of the tree by using the source position (Sloc)
-- pointers that appear in every tree node.
-----------------
-- 2.8 Pragma --
-----------------
-- PRAGMA ::= pragma IDENTIFIER
-- [(PRAGMA_ARGUMENT_ASSOCIATION {, PRAGMA_ARGUMENT_ASSOCIATION})];
-- Note that a pragma may appear in the tree anywhere a declaration
-- or a statement may appear, as well as in some other situations
-- which are explicitly documented.
-- N_Pragma
-- Sloc points to PRAGMA
-- Next_Pragma (Node1-Sem)
-- Pragma_Argument_Associations (List2) (set to No_List if none)
-- Corresponding_Aspect (Node3-Sem) (set to Empty if not present)
-- Pragma_Identifier (Node4)
-- Next_Rep_Item (Node5-Sem)
-- Class_Present (Flag6) set if from Aspect with 'Class
-- From_Aspect_Specification (Flag13-Sem)
-- Import_Interface_Present (Flag16-Sem)
-- Is_Analyzed_Pragma (Flag5-Sem)
-- Is_Checked (Flag11-Sem)
-- Is_Checked_Ghost_Pragma (Flag3-Sem)
-- Is_Delayed_Aspect (Flag14-Sem)
-- Is_Disabled (Flag15-Sem)
-- Is_Generic_Contract_Pragma (Flag2-Sem)
-- Is_Ignored (Flag9-Sem)
-- Is_Ignored_Ghost_Pragma (Flag8-Sem)
-- Is_Inherited_Pragma (Flag4-Sem)
-- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
-- Uneval_Old_Accept (Flag7-Sem)
-- Uneval_Old_Warn (Flag18-Sem)
-- Note: we should have a section on what pragmas are passed on to
-- the back end to be processed. This section should note that pragma
-- Psect_Object is always converted to Common_Object, but there are
-- undoubtedly many other similar notes required ???
-- Note: utility functions Pragma_Name_Unmapped and Pragma_Name may be
-- applied to pragma nodes to obtain the Chars or its mapped version.
-- Note: if From_Aspect_Specification is set, then Sloc points to the
-- aspect name, as does the Pragma_Identifier. In this case if the
-- pragma has a local name argument (such as pragma Inline), it is
-- resolved to point to the specific entity affected by the pragma.
--------------------------------------
-- 2.8 Pragma Argument Association --
--------------------------------------
-- PRAGMA_ARGUMENT_ASSOCIATION ::=
-- [pragma_argument_IDENTIFIER =>] NAME
-- | [pragma_argument_IDENTIFIER =>] EXPRESSION
-- In Ada 2012, there are two more possibilities:
-- PRAGMA_ARGUMENT_ASSOCIATION ::=
-- [pragma_argument_ASPECT_MARK =>] NAME
-- | [pragma_argument_ASPECT_MARK =>] EXPRESSION
-- where the interesting allowed cases (which do not fit the syntax of
-- the first alternative above) are
-- ASPECT_MARK => Pre'Class |
-- Post'Class |
-- Type_Invariant'Class |
-- Invariant'Class
-- We allow this special usage in all Ada modes, but it would be a
-- pain to allow these aspects to pervade the pragma syntax, and the
-- representation of pragma nodes internally. So what we do is to
-- replace these ASPECT_MARK forms with identifiers whose name is one
-- of the special internal names _Pre, _Post or _Type_Invariant.
-- We do a similar replacement of these Aspect_Mark forms in the
-- Expression of a pragma argument association for the cases of
-- the first arguments of any Check pragmas and Check_Policy pragmas
-- N_Pragma_Argument_Association
-- Sloc points to first token in association
-- Chars (Name1) (set to No_Name if no pragma argument identifier)
-- Expression_Copy (Node2-Sem)
-- Expression (Node3)
------------------------
-- 2.9 Reserved Word --
------------------------
-- Reserved words are parsed by the scanner, and returned as the
-- corresponding token types (e.g. PACKAGE is returned as Tok_Package)
----------------------------
-- 3.1 Basic Declaration --
----------------------------
-- BASIC_DECLARATION ::=
-- TYPE_DECLARATION | SUBTYPE_DECLARATION
-- | OBJECT_DECLARATION | NUMBER_DECLARATION
-- | SUBPROGRAM_DECLARATION | ABSTRACT_SUBPROGRAM_DECLARATION
-- | PACKAGE_DECLARATION | RENAMING_DECLARATION
-- | EXCEPTION_DECLARATION | GENERIC_DECLARATION
-- | GENERIC_INSTANTIATION
-- Basic declaration also includes IMPLICIT_LABEL_DECLARATION
-- see further description in section on semantic nodes.
-- Also, in the tree that is constructed, a pragma may appear
-- anywhere that a declaration may appear.
------------------------------
-- 3.1 Defining Identifier --
------------------------------
-- DEFINING_IDENTIFIER ::= IDENTIFIER
-- A defining identifier is an entity, which has additional fields
-- depending on the setting of the Ekind field. These additional
-- fields are defined (and access subprograms declared) in package
-- Einfo.
-- Note: N_Defining_Identifier is an extended node whose fields are
-- deliberate layed out to match the layout of fields in an ordinary
-- N_Identifier node allowing for easy alteration of an identifier
-- node into a defining identifier node. For details, see procedure
-- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
-- N_Defining_Identifier
-- Sloc points to identifier
-- Chars (Name1) contains the Name_Id for the identifier
-- Next_Entity (Node2-Sem)
-- Scope (Node3-Sem)
-- Etype (Node5-Sem)
-----------------------------
-- 3.2.1 Type Declaration --
-----------------------------
-- TYPE_DECLARATION ::=
-- FULL_TYPE_DECLARATION
-- | INCOMPLETE_TYPE_DECLARATION
-- | PRIVATE_TYPE_DECLARATION
-- | PRIVATE_EXTENSION_DECLARATION
----------------------------------
-- 3.2.1 Full Type Declaration --
----------------------------------
-- FULL_TYPE_DECLARATION ::=
-- type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
-- is TYPE_DEFINITION
-- [ASPECT_SPECIFICATIONS];
-- | TASK_TYPE_DECLARATION
-- | PROTECTED_TYPE_DECLARATION
-- The full type declaration node is used only for the first case. The
-- second case (concurrent type declaration), is represented directly
-- by a task type declaration or a protected type declaration.
-- N_Full_Type_Declaration
-- Sloc points to TYPE
-- Defining_Identifier (Node1)
-- Incomplete_View (Node2-Sem)
-- Discriminant_Specifications (List4) (set to No_List if none)
-- Type_Definition (Node3)
-- Discr_Check_Funcs_Built (Flag11-Sem)
----------------------------
-- 3.2.1 Type Definition --
----------------------------
-- TYPE_DEFINITION ::=
-- ENUMERATION_TYPE_DEFINITION | INTEGER_TYPE_DEFINITION
-- | REAL_TYPE_DEFINITION | ARRAY_TYPE_DEFINITION
-- | RECORD_TYPE_DEFINITION | ACCESS_TYPE_DEFINITION
-- | DERIVED_TYPE_DEFINITION | INTERFACE_TYPE_DEFINITION
--------------------------------
-- 3.2.2 Subtype Declaration --
--------------------------------
-- SUBTYPE_DECLARATION ::=
-- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
-- [ASPECT_SPECIFICATIONS];
-- The subtype indication field is set to Empty for subtypes
-- declared in package Standard (Positive, Natural).
-- N_Subtype_Declaration
-- Sloc points to SUBTYPE
-- Defining_Identifier (Node1)
-- Null_Exclusion_Present (Flag11)
-- Subtype_Indication (Node5)
-- Generic_Parent_Type (Node4-Sem) (set for an actual derived type).
-- Exception_Junk (Flag8-Sem)
-- Has_Dynamic_Range_Check (Flag12-Sem)
-------------------------------
-- 3.2.2 Subtype Indication --
-------------------------------
-- SUBTYPE_INDICATION ::= SUBTYPE_MARK [CONSTRAINT]
-- Note: if no constraint is present, the subtype indication appears
-- directly in the tree as a subtype mark. The N_Subtype_Indication
-- node is used only if a constraint is present.
-- Note: [For Ada 2005 (AI-231)]: Because Ada 2005 extends this rule
-- with the null-exclusion part (see AI-231), we had to introduce a new
-- attribute in all the parents of subtype_indication nodes to indicate
-- if the null-exclusion is present.
-- Note: the reason that this node has expression fields is that a
-- subtype indication can appear as an operand of a membership test.
-- N_Subtype_Indication
-- Sloc points to first token of subtype mark
-- Subtype_Mark (Node4)
-- Constraint (Node3)
-- Etype (Node5-Sem)
-- Must_Not_Freeze (Flag8-Sem)
-- Note: Depending on context, the Etype is either the entity of the
-- Subtype_Mark field, or it is an itype constructed to reify the
-- subtype indication. In particular, such itypes are created for a
-- subtype indication that appears in an array type declaration. This
-- simplifies constraint checking in indexed components.
-- For subtype indications that appear in scalar type and subtype
-- declarations, the Etype is the entity of the subtype mark.
-------------------------
-- 3.2.2 Subtype Mark --
-------------------------
-- SUBTYPE_MARK ::= subtype_NAME
-----------------------
-- 3.2.2 Constraint --
-----------------------
-- CONSTRAINT ::= SCALAR_CONSTRAINT | COMPOSITE_CONSTRAINT
------------------------------
-- 3.2.2 Scalar Constraint --
------------------------------
-- SCALAR_CONSTRAINT ::=
-- RANGE_CONSTRAINT | DIGITS_CONSTRAINT | DELTA_CONSTRAINT
---------------------------------
-- 3.2.2 Composite Constraint --
---------------------------------
-- COMPOSITE_CONSTRAINT ::=
-- INDEX_CONSTRAINT | DISCRIMINANT_CONSTRAINT
-------------------------------
-- 3.3.1 Object Declaration --
-------------------------------
-- OBJECT_DECLARATION ::=
-- DEFINING_IDENTIFIER_LIST : [aliased] [constant]
-- [NULL_EXCLUSION] SUBTYPE_INDICATION [:= EXPRESSION]
-- [ASPECT_SPECIFICATIONS];
-- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
-- ACCESS_DEFINITION [:= EXPRESSION]
-- [ASPECT_SPECIFICATIONS];
-- | DEFINING_IDENTIFIER_LIST : [aliased] [constant]
-- ARRAY_TYPE_DEFINITION [:= EXPRESSION]
-- [ASPECT_SPECIFICATIONS];
-- | SINGLE_TASK_DECLARATION
-- | SINGLE_PROTECTED_DECLARATION
-- Note: aliased is not permitted in Ada 83 mode
-- The N_Object_Declaration node is only for the first three cases.
-- Single task declaration is handled by P_Task (9.1)
-- Single protected declaration is handled by P_protected (9.5)
-- Although the syntax allows multiple identifiers in the list, the
-- semantics is as though successive declarations were given with
-- identical type definition and expression components. To simplify
-- semantic processing, the parser represents a multiple declaration
-- case as a sequence of single declarations, using the More_Ids and
-- Prev_Ids flags to preserve the original source form as described
-- in the section on "Handling of Defining Identifier Lists".
-- The flag Has_Init_Expression is set if an initializing expression
-- is present. Normally it is set if and only if Expression contains
-- a non-empty value, but there is an exception to this. When the
-- initializing expression is an aggregate which requires explicit
-- assignments, the Expression field gets set to Empty, but this flag
-- is still set, so we don't forget we had an initializing expression.
-- Note: if a range check is required for the initialization
-- expression then the Do_Range_Check flag is set in the Expression,
-- with the check being done against the type given by the object
-- definition, which is also the Etype of the defining identifier.
-- Note: the contents of the Expression field must be ignored (i.e.
-- treated as though it were Empty) if No_Initialization is set True.
-- Note: the back end places some restrictions on the form of the
-- Expression field. If the object being declared is Atomic, then
-- the Expression may not have the form of an aggregate (since this
-- might cause the back end to generate separate assignments). In this
-- case the front end must generate an extra temporary and initialize
-- this temporary as required (the temporary itself is not atomic).
-- Note: there is not node kind for object definition. Instead, the
-- corresponding field holds a subtype indication, an array type
-- definition, or (Ada 2005, AI-406) an access definition.
-- N_Object_Declaration
-- Sloc points to first identifier
-- Defining_Identifier (Node1)
-- Aliased_Present (Flag4)
-- Constant_Present (Flag17) set if CONSTANT appears
-- Null_Exclusion_Present (Flag11)
-- Object_Definition (Node4) subtype indic./array type def./access def.
-- Expression (Node3) (set to Empty if not present)
-- Handler_List_Entry (Node2-Sem)
-- Corresponding_Generic_Association (Node5-Sem)
-- More_Ids (Flag5) (set to False if no more identifiers in list)
-- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
-- No_Initialization (Flag13-Sem)
-- Assignment_OK (Flag15-Sem)
-- Exception_Junk (Flag8-Sem)
-- Is_Subprogram_Descriptor (Flag16-Sem)
-- Has_Init_Expression (Flag14)
-- Suppress_Assignment_Checks (Flag18-Sem)
-------------------------------------
-- 3.3.1 Defining Identifier List --
-------------------------------------
-- DEFINING_IDENTIFIER_LIST ::=
-- DEFINING_IDENTIFIER {, DEFINING_IDENTIFIER}
-------------------------------
-- 3.3.2 Number Declaration --
-------------------------------
-- NUMBER_DECLARATION ::=
-- DEFINING_IDENTIFIER_LIST : constant := static_EXPRESSION;
-- Although the syntax allows multiple identifiers in the list, the
-- semantics is as though successive declarations were given with
-- identical expressions. To simplify semantic processing, the parser
-- represents a multiple declaration case as a sequence of single
-- declarations, using the More_Ids and Prev_Ids flags to preserve
-- the original source form as described in the section on "Handling
-- of Defining Identifier Lists".
-- N_Number_Declaration
-- Sloc points to first identifier
-- Defining_Identifier (Node1)
-- Expression (Node3)
-- More_Ids (Flag5) (set to False if no more identifiers in list)
-- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
----------------------------------
-- 3.4 Derived Type Definition --
----------------------------------
-- DERIVED_TYPE_DEFINITION ::=
-- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION
-- [[and INTERFACE_LIST] RECORD_EXTENSION_PART]
-- Note: ABSTRACT, LIMITED and record extension part are not permitted
-- in Ada 83 mode
-- Note: a record extension part is required if ABSTRACT is present
-- N_Derived_Type_Definition
-- Sloc points to NEW
-- Abstract_Present (Flag4)
-- Null_Exclusion_Present (Flag11) (set to False if not present)
-- Subtype_Indication (Node5)
-- Record_Extension_Part (Node3) (set to Empty if not present)
-- Limited_Present (Flag17)
-- Task_Present (Flag5) set in task interfaces
-- Protected_Present (Flag6) set in protected interfaces
-- Synchronized_Present (Flag7) set in interfaces
-- Interface_List (List2) (set to No_List if none)
-- Interface_Present (Flag16) set in abstract interfaces
-- Note: Task_Present, Protected_Present, Synchronized_Present,
-- Interface_List, and Interface_Present are used for abstract
-- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
---------------------------
-- 3.5 Range Constraint --
---------------------------
-- RANGE_CONSTRAINT ::= range RANGE
-- N_Range_Constraint
-- Sloc points to RANGE
-- Range_Expression (Node4)
----------------
-- 3.5 Range --
----------------
-- RANGE ::=
-- RANGE_ATTRIBUTE_REFERENCE
-- | SIMPLE_EXPRESSION .. SIMPLE_EXPRESSION
-- Note: the case of a range given as a range attribute reference
-- appears directly in the tree as an attribute reference.
-- Note: the field name for a reference to a range is Range_Expression
-- rather than Range, because range is a reserved keyword in Ada.
-- Note: the reason that this node has expression fields is that a
-- range can appear as an operand of a membership test. The Etype
-- field is the type of the range (we do NOT construct an implicit
-- subtype to represent the range exactly).
-- N_Range
-- Sloc points to ..
-- Low_Bound (Node1)
-- High_Bound (Node2)
-- Includes_Infinities (Flag11)
-- plus fields for expression
-- Note: if the range appears in a context, such as a subtype
-- declaration, where range checks are required on one or both of
-- the expression fields, then type conversion nodes are inserted
-- to represent the required checks.
----------------------------------------
-- 3.5.1 Enumeration Type Definition --
----------------------------------------
-- ENUMERATION_TYPE_DEFINITION ::=
-- (ENUMERATION_LITERAL_SPECIFICATION
-- {, ENUMERATION_LITERAL_SPECIFICATION})
-- Note: the Literals field in the node described below is null for
-- the case of the standard types CHARACTER and WIDE_CHARACTER, for
-- which special processing handles these types as special cases.
-- N_Enumeration_Type_Definition
-- Sloc points to left parenthesis
-- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
-- End_Label (Node4) (set to Empty if internally generated record)
----------------------------------------------
-- 3.5.1 Enumeration Literal Specification --
----------------------------------------------
-- ENUMERATION_LITERAL_SPECIFICATION ::=
-- DEFINING_IDENTIFIER | DEFINING_CHARACTER_LITERAL
---------------------------------------
-- 3.5.1 Defining Character Literal --
---------------------------------------
-- DEFINING_CHARACTER_LITERAL ::= CHARACTER_LITERAL
-- A defining character literal is an entity, which has additional
-- fields depending on the setting of the Ekind field. These
-- additional fields are defined (and access subprograms declared)
-- in package Einfo.
-- Note: N_Defining_Character_Literal is an extended node whose fields
-- are deliberate layed out to match the layout of fields in an ordinary
-- N_Character_Literal node allowing for easy alteration of a character
-- literal node into a defining character literal node. For details, see
-- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
-- N_Defining_Character_Literal
-- Sloc points to literal
-- Chars (Name1) contains the Name_Id for the identifier
-- Next_Entity (Node2-Sem)
-- Scope (Node3-Sem)
-- Etype (Node5-Sem)
------------------------------------
-- 3.5.4 Integer Type Definition --
------------------------------------
-- Note: there is an error in this rule in the latest version of the
-- grammar, so we have retained the old rule pending clarification.
-- INTEGER_TYPE_DEFINITION ::=
-- SIGNED_INTEGER_TYPE_DEFINITION
-- | MODULAR_TYPE_DEFINITION
-------------------------------------------
-- 3.5.4 Signed Integer Type Definition --
-------------------------------------------
-- SIGNED_INTEGER_TYPE_DEFINITION ::=
-- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
-- Note: the Low_Bound and High_Bound fields are set to Empty
-- for integer types defined in package Standard.
-- N_Signed_Integer_Type_Definition
-- Sloc points to RANGE
-- Low_Bound (Node1)
-- High_Bound (Node2)
------------------------------------
-- 3.5.4 Modular Type Definition --
------------------------------------
-- MODULAR_TYPE_DEFINITION ::= mod static_EXPRESSION
-- N_Modular_Type_Definition
-- Sloc points to MOD
-- Expression (Node3)
---------------------------------
-- 3.5.6 Real Type Definition --
---------------------------------
-- REAL_TYPE_DEFINITION ::=
-- FLOATING_POINT_DEFINITION | FIXED_POINT_DEFINITION
--------------------------------------
-- 3.5.7 Floating Point Definition --
--------------------------------------
-- FLOATING_POINT_DEFINITION ::=
-- digits static_SIMPLE_EXPRESSION [REAL_RANGE_SPECIFICATION]
-- Note: The Digits_Expression and Real_Range_Specifications fields
-- are set to Empty for floating-point types declared in Standard.
-- N_Floating_Point_Definition
-- Sloc points to DIGITS
-- Digits_Expression (Node2)
-- Real_Range_Specification (Node4) (set to Empty if not present)
-------------------------------------
-- 3.5.7 Real Range Specification --
-------------------------------------
-- REAL_RANGE_SPECIFICATION ::=
-- range static_SIMPLE_EXPRESSION .. static_SIMPLE_EXPRESSION
-- N_Real_Range_Specification
-- Sloc points to RANGE
-- Low_Bound (Node1)
-- High_Bound (Node2)
-----------------------------------
-- 3.5.9 Fixed Point Definition --
-----------------------------------
-- FIXED_POINT_DEFINITION ::=
-- ORDINARY_FIXED_POINT_DEFINITION | DECIMAL_FIXED_POINT_DEFINITION
--------------------------------------------
-- 3.5.9 Ordinary Fixed Point Definition --
--------------------------------------------
-- ORDINARY_FIXED_POINT_DEFINITION ::=
-- delta static_EXPRESSION REAL_RANGE_SPECIFICATION
-- Note: In Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
-- N_Ordinary_Fixed_Point_Definition
-- Sloc points to DELTA
-- Delta_Expression (Node3)
-- Real_Range_Specification (Node4)
-------------------------------------------
-- 3.5.9 Decimal Fixed Point Definition --
-------------------------------------------
-- DECIMAL_FIXED_POINT_DEFINITION ::=
-- delta static_EXPRESSION
-- digits static_EXPRESSION [REAL_RANGE_SPECIFICATION]
-- Note: decimal types are not permitted in Ada 83 mode
-- N_Decimal_Fixed_Point_Definition
-- Sloc points to DELTA
-- Delta_Expression (Node3)
-- Digits_Expression (Node2)
-- Real_Range_Specification (Node4) (set to Empty if not present)
------------------------------
-- 3.5.9 Digits Constraint --
------------------------------
-- DIGITS_CONSTRAINT ::=
-- digits static_EXPRESSION [RANGE_CONSTRAINT]
-- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION
-- Note: in Ada 95, reduced accuracy subtypes are obsolescent
-- N_Digits_Constraint
-- Sloc points to DIGITS
-- Digits_Expression (Node2)
-- Range_Constraint (Node4) (set to Empty if not present)
--------------------------------
-- 3.6 Array Type Definition --
--------------------------------
-- ARRAY_TYPE_DEFINITION ::=
-- UNCONSTRAINED_ARRAY_DEFINITION | CONSTRAINED_ARRAY_DEFINITION
-----------------------------------------
-- 3.6 Unconstrained Array Definition --
-----------------------------------------
-- UNCONSTRAINED_ARRAY_DEFINITION ::=
-- array (INDEX_SUBTYPE_DEFINITION {, INDEX_SUBTYPE_DEFINITION}) of
-- COMPONENT_DEFINITION
-- Note: dimensionality of array is indicated by number of entries in
-- the Subtype_Marks list, which has one entry for each dimension.
-- N_Unconstrained_Array_Definition
-- Sloc points to ARRAY
-- Subtype_Marks (List2)
-- Component_Definition (Node4)
-----------------------------------
-- 3.6 Index Subtype Definition --
-----------------------------------
-- INDEX_SUBTYPE_DEFINITION ::= SUBTYPE_MARK range <>
-- There is no explicit node in the tree for an index subtype
-- definition since the N_Unconstrained_Array_Definition node
-- incorporates the type marks which appear in this context.
---------------------------------------
-- 3.6 Constrained Array Definition --
---------------------------------------
-- CONSTRAINED_ARRAY_DEFINITION ::=
-- array (DISCRETE_SUBTYPE_DEFINITION
-- {, DISCRETE_SUBTYPE_DEFINITION})
-- of COMPONENT_DEFINITION
-- Note: dimensionality of array is indicated by number of entries
-- in the Discrete_Subtype_Definitions list, which has one entry
-- for each dimension.
-- N_Constrained_Array_Definition
-- Sloc points to ARRAY
-- Discrete_Subtype_Definitions (List2)
-- Component_Definition (Node4)
-- Note: although the language allows the full syntax for discrete
-- subtype definitions (i.e. a discrete subtype indication or a range),
-- in the generated tree, we always rewrite these as N_Range nodes.
--------------------------------------
-- 3.6 Discrete Subtype Definition --
--------------------------------------
-- DISCRETE_SUBTYPE_DEFINITION ::=
-- discrete_SUBTYPE_INDICATION | RANGE
-------------------------------
-- 3.6 Component Definition --
-------------------------------
-- COMPONENT_DEFINITION ::=
-- [aliased] [NULL_EXCLUSION] SUBTYPE_INDICATION | ACCESS_DEFINITION
-- Note: although the syntax does not permit a component definition to
-- be an anonymous array (and the parser will diagnose such an attempt
-- with an appropriate message), it is possible for anonymous arrays
-- to appear as component definitions. The semantics and back end handle
-- this case properly, and the expander in fact generates such cases.
-- Access_Definition is an optional field that gives support to
-- Ada 2005 (AI-230). The parser generates nodes that have either the
-- Subtype_Indication field or else the Access_Definition field.
-- N_Component_Definition
-- Sloc points to ALIASED, ACCESS or to first token of subtype mark
-- Aliased_Present (Flag4)
-- Null_Exclusion_Present (Flag11)
-- Subtype_Indication (Node5) (set to Empty if not present)
-- Access_Definition (Node3) (set to Empty if not present)
-----------------------------
-- 3.6.1 Index Constraint --
-----------------------------
-- INDEX_CONSTRAINT ::= (DISCRETE_RANGE {, DISCRETE_RANGE})
-- It is not in general possible to distinguish between discriminant
-- constraints and index constraints at parse time, since a simple
-- name could be either the subtype mark of a discrete range, or an
-- expression in a discriminant association with no name. Either
-- entry appears simply as the name, and the semantic parse must
-- distinguish between the two cases. Thus we use a common tree
-- node format for both of these constraint types.
-- See Discriminant_Constraint for format of node
---------------------------
-- 3.6.1 Discrete Range --
---------------------------
-- DISCRETE_RANGE ::= discrete_SUBTYPE_INDICATION | RANGE
----------------------------
-- 3.7 Discriminant Part --
----------------------------
-- DISCRIMINANT_PART ::=
-- UNKNOWN_DISCRIMINANT_PART | KNOWN_DISCRIMINANT_PART
------------------------------------
-- 3.7 Unknown Discriminant Part --
------------------------------------
-- UNKNOWN_DISCRIMINANT_PART ::= (<>)
-- Note: unknown discriminant parts are not permitted in Ada 83 mode
-- There is no explicit node in the tree for an unknown discriminant
-- part. Instead the Unknown_Discriminants_Present flag is set in the
-- parent node.
----------------------------------
-- 3.7 Known Discriminant Part --
----------------------------------
-- KNOWN_DISCRIMINANT_PART ::=
-- (DISCRIMINANT_SPECIFICATION {; DISCRIMINANT_SPECIFICATION})
-------------------------------------
-- 3.7 Discriminant Specification --
-------------------------------------
-- DISCRIMINANT_SPECIFICATION ::=
-- DEFINING_IDENTIFIER_LIST : [NULL_EXCLUSION] SUBTYPE_MARK
-- [:= DEFAULT_EXPRESSION]
-- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
-- [:= DEFAULT_EXPRESSION]
-- Although the syntax allows multiple identifiers in the list, the
-- semantics is as though successive specifications were given with
-- identical type definition and expression components. To simplify
-- semantic processing, the parser represents a multiple declaration
-- case as a sequence of single specifications, using the More_Ids and
-- Prev_Ids flags to preserve the original source form as described
-- in the section on "Handling of Defining Identifier Lists".
-- N_Discriminant_Specification
-- Sloc points to first identifier
-- Defining_Identifier (Node1)
-- Null_Exclusion_Present (Flag11)
-- Discriminant_Type (Node5) subtype mark or access parameter definition
-- Expression (Node3) (set to Empty if no default expression)
-- More_Ids (Flag5) (set to False if no more identifiers in list)
-- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
-----------------------------
-- 3.7 Default Expression --
-----------------------------
-- DEFAULT_EXPRESSION ::= EXPRESSION
------------------------------------
-- 3.7.1 Discriminant Constraint --
------------------------------------
-- DISCRIMINANT_CONSTRAINT ::=
-- (DISCRIMINANT_ASSOCIATION {, DISCRIMINANT_ASSOCIATION})
-- It is not in general possible to distinguish between discriminant
-- constraints and index constraints at parse time, since a simple
-- name could be either the subtype mark of a discrete range, or an
-- expression in a discriminant association with no name. Either
-- entry appears simply as the name, and the semantic parse must
-- distinguish between the two cases. Thus we use a common tree
-- node format for both of these constraint types.
-- N_Index_Or_Discriminant_Constraint
-- Sloc points to left paren
-- Constraints (List1) points to list of discrete ranges or
-- discriminant associations
-------------------------------------
-- 3.7.1 Discriminant Association --
-------------------------------------
-- DISCRIMINANT_ASSOCIATION ::=
-- [discriminant_SELECTOR_NAME
-- {| discriminant_SELECTOR_NAME} =>] EXPRESSION
-- Note: a discriminant association that has no selector name list
-- appears directly as an expression in the tree.
-- N_Discriminant_Association
-- Sloc points to first token of discriminant association
-- Selector_Names (List1) (always non-empty, since if no selector
-- names are present, this node is not used, see comment above)
-- Expression (Node3)
---------------------------------
-- 3.8 Record Type Definition --
---------------------------------
-- RECORD_TYPE_DEFINITION ::=
-- [[abstract] tagged] [limited] RECORD_DEFINITION
-- Note: ABSTRACT, TAGGED, LIMITED are not permitted in Ada 83 mode
-- There is no explicit node in the tree for a record type definition.
-- Instead the flags for Tagged_Present and Limited_Present appear in
-- the N_Record_Definition node for a record definition appearing in
-- the context of a record type definition.
----------------------------
-- 3.8 Record Definition --
----------------------------
-- RECORD_DEFINITION ::=
-- record
-- COMPONENT_LIST
-- end record
-- | null record
-- Note: the Abstract_Present, Tagged_Present and Limited_Present
-- flags appear only for a record definition appearing in a record
-- type definition.
-- Note: the NULL RECORD case is not permitted in Ada 83
-- N_Record_Definition
-- Sloc points to RECORD or NULL
-- End_Label (Node4) (set to Empty if internally generated record)
-- Abstract_Present (Flag4)
-- Tagged_Present (Flag15)
-- Limited_Present (Flag17)
-- Component_List (Node1) empty in null record case
-- Null_Present (Flag13) set in null record case
-- Task_Present (Flag5) set in task interfaces
-- Protected_Present (Flag6) set in protected interfaces
-- Synchronized_Present (Flag7) set in interfaces
-- Interface_Present (Flag16) set in abstract interfaces
-- Interface_List (List2) (set to No_List if none)
-- Note: Task_Present, Protected_Present, Synchronized _Present,
-- Interface_List and Interface_Present are used for abstract
-- interfaces (see comments for INTERFACE_TYPE_DEFINITION).
-------------------------
-- 3.8 Component List --
-------------------------
-- COMPONENT_LIST ::=
-- COMPONENT_ITEM {COMPONENT_ITEM}
-- | {COMPONENT_ITEM} VARIANT_PART
-- | null;
-- N_Component_List
-- Sloc points to first token of component list
-- Component_Items (List3)
-- Variant_Part (Node4) (set to Empty if no variant part)
-- Null_Present (Flag13)
-------------------------
-- 3.8 Component Item --
-------------------------
-- COMPONENT_ITEM ::= COMPONENT_DECLARATION | REPRESENTATION_CLAUSE
-- Note: A component item can also be a pragma, and in the tree
-- that is obtained after semantic processing, a component item
-- can be an N_Null node resulting from a non-recognized pragma.
--------------------------------
-- 3.8 Component Declaration --
--------------------------------
-- COMPONENT_DECLARATION ::=
-- DEFINING_IDENTIFIER_LIST : COMPONENT_DEFINITION
-- [:= DEFAULT_EXPRESSION]
-- [ASPECT_SPECIFICATIONS];
-- Note: although the syntax does not permit a component definition to
-- be an anonymous array (and the parser will diagnose such an attempt
-- with an appropriate message), it is possible for anonymous arrays
-- to appear as component definitions. The semantics and back end handle
-- this case properly, and the expander in fact generates such cases.
-- Although the syntax allows multiple identifiers in the list, the
-- semantics is as though successive declarations were given with the
-- same component definition and expression components. To simplify
-- semantic processing, the parser represents a multiple declaration
-- case as a sequence of single declarations, using the More_Ids and
-- Prev_Ids flags to preserve the original source form as described
-- in the section on "Handling of Defining Identifier Lists".
-- N_Component_Declaration
-- Sloc points to first identifier
-- Defining_Identifier (Node1)
-- Component_Definition (Node4)
-- Expression (Node3) (set to Empty if no default expression)
-- More_Ids (Flag5) (set to False if no more identifiers in list)
-- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
-------------------------
-- 3.8.1 Variant Part --
-------------------------
-- VARIANT_PART ::=
-- case discriminant_DIRECT_NAME is
-- VARIANT {VARIANT}
-- end case;
-- Note: the variants list can contain pragmas as well as variants.
-- In a properly formed program there is at least one variant.
-- N_Variant_Part
-- Sloc points to CASE
-- Name (Node2)
-- Variants (List1)
--------------------
-- 3.8.1 Variant --
--------------------
-- VARIANT ::=
-- when DISCRETE_CHOICE_LIST =>
-- COMPONENT_LIST
-- N_Variant
-- Sloc points to WHEN
-- Discrete_Choices (List4)
-- Component_List (Node1)
-- Enclosing_Variant (Node2-Sem)
-- Present_Expr (Uint3-Sem)
-- Dcheck_Function (Node5-Sem)
-- Has_SP_Choice (Flag15-Sem)
-- Note: in the list of Discrete_Choices, the tree passed to the back
-- end does not have choice entries corresponding to names of statically
-- predicated subtypes. Such entries are always expanded out to the list
-- of equivalent values or ranges. The ASIS tree generated in -gnatct
-- mode also has this expansion, but done with a proper Rewrite call on
-- the N_Variant node so that ASIS can properly retrieve the original.
---------------------------------
-- 3.8.1 Discrete Choice List --
---------------------------------
-- DISCRETE_CHOICE_LIST ::= DISCRETE_CHOICE {| DISCRETE_CHOICE}
----------------------------
-- 3.8.1 Discrete Choice --
----------------------------
-- DISCRETE_CHOICE ::= EXPRESSION | DISCRETE_RANGE | others
-- Note: in Ada 83 mode, the expression must be a simple expression
-- The only choice that appears explicitly is the OTHERS choice, as
-- defined here. Other cases of discrete choice (expression and
-- discrete range) appear directly. This production is also used
-- for the OTHERS possibility of an exception choice.
-- Note: in accordance with the syntax, the parser does not check that
-- OTHERS appears at the end on its own in a choice list context. This
-- is a semantic check.
-- N_Others_Choice
-- Sloc points to OTHERS
-- Others_Discrete_Choices (List1-Sem)
-- All_Others (Flag11-Sem)
----------------------------------
-- 3.9.1 Record Extension Part --
----------------------------------
-- RECORD_EXTENSION_PART ::= with RECORD_DEFINITION
-- Note: record extension parts are not permitted in Ada 83 mode
--------------------------------------
-- 3.9.4 Interface Type Definition --
--------------------------------------
-- INTERFACE_TYPE_DEFINITION ::=
-- [limited | task | protected | synchronized]
-- interface [interface_list]
-- Note: Interfaces are implemented with N_Record_Definition and
-- N_Derived_Type_Definition nodes because most of the support
-- for the analysis of abstract types has been reused to
-- analyze abstract interfaces.
----------------------------------
-- 3.10 Access Type Definition --
----------------------------------
-- ACCESS_TYPE_DEFINITION ::=
-- ACCESS_TO_OBJECT_DEFINITION
-- | ACCESS_TO_SUBPROGRAM_DEFINITION
--------------------------
-- 3.10 Null Exclusion --
--------------------------
-- NULL_EXCLUSION ::= not null
---------------------------------------
-- 3.10 Access To Object Definition --
---------------------------------------
-- ACCESS_TO_OBJECT_DEFINITION ::=
-- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER]
-- SUBTYPE_INDICATION
-- N_Access_To_Object_Definition
-- Sloc points to ACCESS
-- All_Present (Flag15)
-- Null_Exclusion_Present (Flag11)
-- Null_Excluding_Subtype (Flag16)
-- Subtype_Indication (Node5)
-- Constant_Present (Flag17)
-----------------------------------
-- 3.10 General Access Modifier --
-----------------------------------
-- GENERAL_ACCESS_MODIFIER ::= all | constant
-- Note: general access modifiers are not permitted in Ada 83 mode
-- There is no explicit node in the tree for general access modifier.
-- Instead the All_Present or Constant_Present flags are set in the
-- parent node.
-------------------------------------------
-- 3.10 Access To Subprogram Definition --
-------------------------------------------
-- ACCESS_TO_SUBPROGRAM_DEFINITION
-- [NULL_EXCLUSION] access [protected] procedure PARAMETER_PROFILE
-- | [NULL_EXCLUSION] access [protected] function
-- PARAMETER_AND_RESULT_PROFILE
-- Note: access to subprograms are not permitted in Ada 83 mode
-- N_Access_Function_Definition
-- Sloc points to ACCESS
-- Null_Exclusion_Present (Flag11)
-- Null_Exclusion_In_Return_Present (Flag14)
-- Protected_Present (Flag6)
-- Parameter_Specifications (List3) (set to No_List if no formal part)
-- Result_Definition (Node4) result subtype (subtype mark or access def)
-- N_Access_Procedure_Definition
-- Sloc points to ACCESS
-- Null_Exclusion_Present (Flag11)
-- Protected_Present (Flag6)
-- Parameter_Specifications (List3) (set to No_List if no formal part)
-----------------------------
-- 3.10 Access Definition --
-----------------------------
-- ACCESS_DEFINITION ::=
-- [NULL_EXCLUSION] access [GENERAL_ACCESS_MODIFIER] SUBTYPE_MARK
-- | ACCESS_TO_SUBPROGRAM_DEFINITION
-- Note: access to subprograms are an Ada 2005 (AI-254) extension
-- N_Access_Definition
-- Sloc points to ACCESS
-- Null_Exclusion_Present (Flag11)
-- All_Present (Flag15)
-- Constant_Present (Flag17)
-- Subtype_Mark (Node4)
-- Access_To_Subprogram_Definition (Node3) (set to Empty if not present)
-----------------------------------------
-- 3.10.1 Incomplete Type Declaration --
-----------------------------------------
-- INCOMPLETE_TYPE_DECLARATION ::=
-- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [IS TAGGED];
-- N_Incomplete_Type_Declaration
-- Sloc points to TYPE
-- Defining_Identifier (Node1)
-- Discriminant_Specifications (List4) (set to No_List if no
-- discriminant part, or if the discriminant part is an
-- unknown discriminant part)
-- Premature_Use (Node5-Sem) used for improved diagnostics.
-- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
-- Tagged_Present (Flag15)
----------------------------
-- 3.11 Declarative Part --
----------------------------
-- DECLARATIVE_PART ::= {DECLARATIVE_ITEM}
-- Note: although the parser enforces the syntactic requirement that
-- a declarative part can contain only declarations, the semantic
-- processing may add statements to the list of actions in a
-- declarative part, so the code generator should be prepared
-- to accept a statement in this position.
----------------------------
-- 3.11 Declarative Item --
----------------------------
-- DECLARATIVE_ITEM ::= BASIC_DECLARATIVE_ITEM | BODY
----------------------------------
-- 3.11 Basic Declarative Item --
----------------------------------
-- BASIC_DECLARATIVE_ITEM ::=
-- BASIC_DECLARATION | REPRESENTATION_CLAUSE | USE_CLAUSE
----------------
-- 3.11 Body --
----------------
-- BODY ::= PROPER_BODY | BODY_STUB
-----------------------
-- 3.11 Proper Body --
-----------------------
-- PROPER_BODY ::=
-- SUBPROGRAM_BODY | PACKAGE_BODY | TASK_BODY | PROTECTED_BODY
---------------
-- 4.1 Name --
---------------
-- NAME ::=
-- DIRECT_NAME | EXPLICIT_DEREFERENCE
-- | INDEXED_COMPONENT | SLICE
-- | SELECTED_COMPONENT | ATTRIBUTE_REFERENCE
-- | TYPE_CONVERSION | FUNCTION_CALL
-- | CHARACTER_LITERAL
----------------------
-- 4.1 Direct Name --
----------------------
-- DIRECT_NAME ::= IDENTIFIER | OPERATOR_SYMBOL
-----------------
-- 4.1 Prefix --
-----------------
-- PREFIX ::= NAME | IMPLICIT_DEREFERENCE
-------------------------------
-- 4.1 Explicit Dereference --
-------------------------------
-- EXPLICIT_DEREFERENCE ::= NAME . all
-- N_Explicit_Dereference
-- Sloc points to ALL
-- Prefix (Node3)
-- Actual_Designated_Subtype (Node4-Sem)
-- Atomic_Sync_Required (Flag14-Sem)
-- Has_Dereference_Action (Flag13-Sem)
-- plus fields for expression
-------------------------------
-- 4.1 Implicit Dereference --
-------------------------------
-- IMPLICIT_DEREFERENCE ::= NAME
------------------------------
-- 4.1.1 Indexed Component --
------------------------------
-- INDEXED_COMPONENT ::= PREFIX (EXPRESSION {, EXPRESSION})
-- Note: the parser may generate this node in some situations where it
-- should be a function call. The semantic pass must correct this
-- misidentification (which is inevitable at the parser level).
-- N_Indexed_Component
-- Sloc contains a copy of the Sloc value of the Prefix
-- Prefix (Node3)
-- Expressions (List1)
-- Generalized_Indexing (Node4-Sem)
-- Atomic_Sync_Required (Flag14-Sem)
-- plus fields for expression
-- Note: if any of the subscripts requires a range check, then the
-- Do_Range_Check flag is set on the corresponding expression, with
-- the index type being determined from the type of the Prefix, which
-- references the array being indexed.
-- Note: in a fully analyzed and expanded indexed component node, and
-- hence in any such node that gigi sees, if the prefix is an access
-- type, then an explicit dereference operation has been inserted.
------------------
-- 4.1.2 Slice --
------------------
-- SLICE ::= PREFIX (DISCRETE_RANGE)
-- Note: an implicit subtype is created to describe the resulting
-- type, so that the bounds of this type are the bounds of the slice.
-- N_Slice
-- Sloc points to first token of prefix
-- Prefix (Node3)
-- Discrete_Range (Node4)
-- plus fields for expression
-------------------------------
-- 4.1.3 Selected Component --
-------------------------------
-- SELECTED_COMPONENT ::= PREFIX . SELECTOR_NAME
-- Note: selected components that are semantically expanded names get
-- changed during semantic processing into the separate N_Expanded_Name
-- node. See description of this node in the section on semantic nodes.
-- N_Selected_Component
-- Sloc points to the period
-- Prefix (Node3)
-- Selector_Name (Node2)
-- Associated_Node (Node4-Sem)
-- Do_Discriminant_Check (Flag1-Sem)
-- Is_In_Discriminant_Check (Flag11-Sem)
-- Is_Prefixed_Call (Flag17-Sem)
-- Atomic_Sync_Required (Flag14-Sem)
-- plus fields for expression
--------------------------
-- 4.1.3 Selector Name --
--------------------------
-- SELECTOR_NAME ::= IDENTIFIER | CHARACTER_LITERAL | OPERATOR_SYMBOL
--------------------------------
-- 4.1.4 Attribute Reference --
--------------------------------
-- ATTRIBUTE_REFERENCE ::= PREFIX ' ATTRIBUTE_DESIGNATOR
-- Note: the syntax is quite ambiguous at this point. Consider:
-- A'Length (X) X is part of the attribute designator
-- A'Pos (X) X is an explicit actual parameter of function A'Pos
-- A'Class (X) X is the expression of a type conversion
-- It would be possible for the parser to distinguish these cases
-- by looking at the attribute identifier. However, that would mean
-- more work in introducing new implementation defined attributes,
-- and also it would mean that special processing for attributes
-- would be scattered around, instead of being centralized in the
-- semantic routine that handles an N_Attribute_Reference node.
-- Consequently, the parser in all the above cases stores the
-- expression (X in these examples) as a single element list in
-- in the Expressions field of the N_Attribute_Reference node.
-- Similarly, for attributes like Max which take two arguments,
-- we store the two arguments as a two element list in the
-- Expressions field. Of course it is clear at parse time that
-- this case is really a function call with an attribute as the
-- prefix, but it turns out to be convenient to handle the two
-- argument case in a similar manner to the one argument case,
-- and indeed in general the parser will accept any number of
-- expressions in this position and store them as a list in the
-- attribute reference node. This allows for future addition of
-- attributes that take more than two arguments.
-- Note: named associates are not permitted in function calls where
-- the function is an attribute (see RM 6.4(3)) so it is legitimate
-- to skip the normal subprogram argument processing.
-- Note: for the attributes whose designators are technically keywords,
-- i.e. digits, access, delta, range, the Attribute_Name field contains
-- the corresponding name, even though no identifier is involved.
-- Note: the generated code may contain stream attributes applied to
-- limited types for which no stream routines exist officially. In such
-- case, the result is to use the stream attribute for the underlying
-- full type, or in the case of a protected type, the components
-- (including any discriminants) are merely streamed in order.
-- See Exp_Attr for a complete description of which attributes are
-- passed onto Gigi, and which are handled entirely by the front end.
-- Gigi restriction: For the Pos attribute, the prefix cannot be
-- a non-standard enumeration type or a nonzero/zero semantics
-- boolean type, so the value is simply the stored representation.
-- Gigi requirement: For the Mechanism_Code attribute, if the prefix
-- references a subprogram that is a renaming, then the front end must
-- rewrite the attribute to refer directly to the renamed entity.
-- Note: syntactically the prefix of an attribute reference must be a
-- name, and this (somewhat artificial) requirement is enforced by the
-- parser. However, for many attributes, such as 'Valid, it is quite
-- reasonable to apply the attribute to any value, and hence to any
-- expression. Internally in the tree, the prefix is an expression which
-- does not have to be a name, and this is handled fine by the semantic
-- analysis and expansion, and back ends. This arises for the case of
-- attribute references built by the expander (e.g. 'Valid for the case
-- of an implicit validity check).
-- Note: In generated code, the Address and Unrestricted_Access
-- attributes can be applied to any expression, and the meaning is
-- to create an object containing the value (the object is in the
-- current stack frame), and pass the address of this value. If the
-- Must_Be_Byte_Aligned flag is set, then the object whose address
-- is taken must be on a byte (storage unit) boundary, and if it is
-- not (or may not be), then the generated code must create a copy
-- that is byte aligned, and pass the address of this copy.
-- N_Attribute_Reference
-- Sloc points to apostrophe
-- Prefix (Node3) (general expression, see note above)
-- Attribute_Name (Name2) identifier name from attribute designator
-- Expressions (List1) (set to No_List if no associated expressions)
-- Entity (Node4-Sem) used if the attribute yields a type
-- Associated_Node (Node4-Sem)
-- Do_Overflow_Check (Flag17-Sem)
-- Header_Size_Added (Flag11-Sem)
-- Must_Be_Byte_Aligned (Flag14-Sem)
-- Non_Aliased_Prefix (Flag18-Sem)
-- Redundant_Use (Flag13-Sem)
-- plus fields for expression
-- Note: in Modify_Tree_For_C mode, Max and Min attributes are expanded
-- into equivalent if expressions, properly taking care of side effects.
---------------------------------
-- 4.1.4 Attribute Designator --
---------------------------------
-- ATTRIBUTE_DESIGNATOR ::=
-- IDENTIFIER [(static_EXPRESSION)]
-- | access | delta | digits
-- There is no explicit node in the tree for an attribute designator.
-- Instead the Attribute_Name and Expressions fields of the parent
-- node (N_Attribute_Reference node) hold the information.
-- Note: if ACCESS, DELTA or DIGITS appears in an attribute
-- designator, then they are treated as identifiers internally
-- rather than the keywords of the same name.
--------------------------------------
-- 4.1.4 Range Attribute Reference --
--------------------------------------
-- RANGE_ATTRIBUTE_REFERENCE ::= PREFIX ' RANGE_ATTRIBUTE_DESIGNATOR
-- A range attribute reference is represented in the tree using the
-- normal N_Attribute_Reference node.
---------------------------------------
-- 4.1.4 Range Attribute Designator --
---------------------------------------
-- RANGE_ATTRIBUTE_DESIGNATOR ::= Range [(static_EXPRESSION)]
-- A range attribute designator is represented in the tree using the
-- normal N_Attribute_Reference node.
--------------------
-- 4.3 Aggregate --
--------------------
-- AGGREGATE ::=
-- RECORD_AGGREGATE | EXTENSION_AGGREGATE | ARRAY_AGGREGATE
-----------------------------
-- 4.3.1 Record Aggregate --
-----------------------------
-- RECORD_AGGREGATE ::= (RECORD_COMPONENT_ASSOCIATION_LIST)
-- N_Aggregate
-- Sloc points to left parenthesis
-- Expressions (List1) (set to No_List if none or null record case)
-- Component_Associations (List2) (set to No_List if none)
-- Null_Record_Present (Flag17)
-- Aggregate_Bounds (Node3-Sem)
-- Associated_Node (Node4-Sem)
-- Compile_Time_Known_Aggregate (Flag18-Sem)
-- Expansion_Delayed (Flag11-Sem)
-- Has_Self_Reference (Flag13-Sem)
-- plus fields for expression
-- Note: this structure is used for both record and array aggregates
-- since the two cases are not separable by the parser. The parser
-- makes no attempt to enforce consistency here, so it is up to the
-- semantic phase to make sure that the aggregate is consistent (i.e.
-- that it is not a "half-and-half" case that mixes record and array
-- syntax. In particular, for a record aggregate, the expressions
-- field will be set if there are positional associations.
-- Note: N_Aggregate is not used for all aggregates; in particular,
-- there is a separate node kind for extension aggregates.
-- Note: gigi/gcc can handle array aggregates correctly providing that
-- they are entirely positional, and the array subtype involved has a
-- known at compile time length and is not bit packed, or a convention
-- Fortran array with more than one dimension. If these conditions
-- are not met, then the front end must translate the aggregate into
-- an appropriate set of assignments into a temporary.
-- Note: for the record aggregate case, gigi/gcc can handle most cases
-- of record aggregates, including those for packed, and rep-claused
-- records, and also variant records, providing that there are no
-- variable length fields whose size is not known at compile time,
-- and providing that the aggregate is presented in fully named form.
-- The other situation in which array aggregates and record aggregates
-- cannot be passed to the back end is if assignment to one or more
-- components itself needs expansion, e.g. in the case of an assignment
-- of an object of a controlled type. In such cases, the front end
-- must expand the aggregate to a series of assignments, and apply
-- the required expansion to the individual assignment statements.
----------------------------------------------
-- 4.3.1 Record Component Association List --
----------------------------------------------
-- RECORD_COMPONENT_ASSOCIATION_LIST ::=
-- RECORD_COMPONENT_ASSOCIATION {, RECORD_COMPONENT_ASSOCIATION}
-- | null record
-- There is no explicit node in the tree for a record component
-- association list. Instead the Null_Record_Present flag is set in
-- the parent node for the NULL RECORD case.
------------------------------------------------------
-- 4.3.1 Record Component Association (also 4.3.3) --
------------------------------------------------------
-- RECORD_COMPONENT_ASSOCIATION ::=
-- [COMPONENT_CHOICE_LIST =>] EXPRESSION
-- N_Component_Association
-- Sloc points to first selector name
-- Choices (List1)
-- Loop_Actions (List2-Sem)
-- Expression (Node3) (empty if Box_Present)
-- Box_Present (Flag15)
-- Inherited_Discriminant (Flag13)
-- Note: this structure is used for both record component associations
-- and array component associations, since the two cases aren't always
-- separable by the parser. The choices list may represent either a
-- list of selector names in the record aggregate case, or a list of
-- discrete choices in the array aggregate case or an N_Others_Choice
-- node (which appears as a singleton list). Box_Present gives support
-- to Ada 2005 (AI-287).
----------------------------------
-- 4.3.1 Component Choice List --
----------------------------------
-- COMPONENT_CHOICE_LIST ::=
-- component_SELECTOR_NAME {| component_SELECTOR_NAME}
-- | others
-- The entries of a component choice list appear in the Choices list of
-- the associated N_Component_Association, as either selector names, or
-- as an N_Others_Choice node.
--------------------------------
-- 4.3.2 Extension Aggregate --
--------------------------------
-- EXTENSION_AGGREGATE ::=
-- (ANCESTOR_PART with RECORD_COMPONENT_ASSOCIATION_LIST)
-- Note: extension aggregates are not permitted in Ada 83 mode
-- N_Extension_Aggregate
-- Sloc points to left parenthesis
-- Ancestor_Part (Node3)
-- Associated_Node (Node4-Sem)
-- Expressions (List1) (set to No_List if none or null record case)
-- Component_Associations (List2) (set to No_List if none)
-- Null_Record_Present (Flag17)
-- Expansion_Delayed (Flag11-Sem)
-- Has_Self_Reference (Flag13-Sem)
-- plus fields for expression
--------------------------
-- 4.3.2 Ancestor Part --
--------------------------
-- ANCESTOR_PART ::= EXPRESSION | SUBTYPE_MARK
----------------------------
-- 4.3.3 Array Aggregate --
----------------------------
-- ARRAY_AGGREGATE ::=
-- POSITIONAL_ARRAY_AGGREGATE | NAMED_ARRAY_AGGREGATE
---------------------------------------
-- 4.3.3 Positional Array Aggregate --
---------------------------------------
-- POSITIONAL_ARRAY_AGGREGATE ::=
-- (EXPRESSION, EXPRESSION {, EXPRESSION})
-- | (EXPRESSION {, EXPRESSION}, others => EXPRESSION)
-- See Record_Aggregate (4.3.1) for node structure
----------------------------------
-- 4.3.3 Named Array Aggregate --
----------------------------------
-- NAMED_ARRAY_AGGREGATE ::=
-- | (ARRAY_COMPONENT_ASSOCIATION {, ARRAY_COMPONENT_ASSOCIATION})
-- See Record_Aggregate (4.3.1) for node structure
----------------------------------------
-- 4.3.3 Array Component Association --
----------------------------------------
-- ARRAY_COMPONENT_ASSOCIATION ::=
-- DISCRETE_CHOICE_LIST => EXPRESSION
-- | ITERATED_COMPONENT_ASSOCIATION
-- See Record_Component_Association (4.3.1) for node structure
-- The iterated_component_association is introduced into the
-- Corrigendum of Ada_2012 by AI12-061.
------------------------------------------
-- 4.3.3 Iterated component Association --
------------------------------------------
-- ITERATED_COMPONENT_ASSOCIATION ::=
-- for DEFINING_IDENTIFIER in DISCRETE_CHOICE_LIST => EXPRESSION
-- N_Iterated_Component_Association
-- Sloc points to FOR
-- Defining_Identifier (Node1)
-- Loop_Actions (List2-Sem)
-- Expression (Node3)
-- Discrete_Choices (List4)
-- Box_Present (Flag15)
-- Note that Box_Present is always False, but it is intentionally added
-- for completeness.
----------------------------
-- 4.3.4 Delta Aggregate --
----------------------------
-- N_Delta_Aggregate
-- Sloc points to left parenthesis
-- Expression (Node3)
-- Component_Associations (List2)
--------------------------------------------------
-- 4.4 Expression/Relation/Term/Factor/Primary --
--------------------------------------------------
-- EXPRESSION ::=
-- RELATION {LOGICAL_OPERATOR RELATION}
-- CHOICE_EXPRESSION ::=
-- CHOICE_RELATION {LOGICAL_OPERATOR CHOICE_RELATION}
-- CHOICE_RELATION ::=
-- SIMPLE_EXPRESSION [RELATIONAL_OPERATOR SIMPLE_EXPRESSION]
-- RELATION ::=
-- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
-- | RAISE_EXPRESSION
-- MEMBERSHIP_CHOICE_LIST ::=
-- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
-- MEMBERSHIP_CHOICE ::=
-- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
-- LOGICAL_OPERATOR ::= and | and then | or | or else | xor
-- SIMPLE_EXPRESSION ::=
-- [UNARY_ADDING_OPERATOR] TERM {BINARY_ADDING_OPERATOR TERM}
-- TERM ::= FACTOR {MULTIPLYING_OPERATOR FACTOR}
-- FACTOR ::= PRIMARY [** PRIMARY] | abs PRIMARY | not PRIMARY
-- No nodes are generated for any of these constructs. Instead, the
-- node for the operator appears directly. When we refer to an
-- expression in this description, we mean any of the possible
-- constituent components of an expression (e.g. identifier is
-- an example of an expression).
-- Note: the above syntax is that Ada 2012 syntax which restricts
-- choice relations to simple expressions to avoid ambiguities in
-- some contexts with set membership notation. It has been decided
-- that in retrospect, the Ada 95 change allowing general expressions
-- in this context was a mistake, so we have reverted to the above
-- syntax in Ada 95 and Ada 2005 modes (the restriction to simple
-- expressions was there in Ada 83 from the start).
------------------
-- 4.4 Primary --
------------------
-- PRIMARY ::=
-- NUMERIC_LITERAL | null
-- | STRING_LITERAL | AGGREGATE
-- | NAME | QUALIFIED_EXPRESSION
-- | ALLOCATOR | (EXPRESSION)
-- Usually there is no explicit node in the tree for primary. Instead
-- the constituent (e.g. AGGREGATE) appears directly. There are two
-- exceptions. First, there is an explicit node for a null primary.
-- N_Null
-- Sloc points to NULL
-- plus fields for expression
-- Second, the case of (EXPRESSION) is handled specially. Ada requires
-- that the parser keep track of which subexpressions are enclosed
-- in parentheses, and how many levels of parentheses are used. This
-- information is required for optimization purposes, and also for
-- some semantic checks (e.g. (((1))) in a procedure spec does not
-- conform with ((((1)))) in the body).
-- The parentheses are recorded by keeping a Paren_Count field in every
-- subexpression node (it is actually present in all nodes, but only
-- used in subexpression nodes). This count records the number of
-- levels of parentheses. If the number of levels in the source exceeds
-- the maximum accommodated by this count, then the count is simply left
-- at the maximum value. This means that there are some pathological
-- cases of failure to detect conformance failures (e.g. an expression
-- with 500 levels of parens will conform with one with 501 levels),
-- but we do not need to lose sleep over this.
-- Historical note: in versions of GNAT prior to 1.75, there was a node
-- type N_Parenthesized_Expression used to accurately record unlimited
-- numbers of levels of parentheses. However, it turned out to be a
-- real nuisance to have to take into account the possible presence of
-- this node during semantic analysis, since basically parentheses have
-- zero relevance to semantic analysis.
-- Note: the level of parentheses always present in things like
-- aggregates does not count, only the parentheses in the primary
-- (EXPRESSION) affect the setting of the Paren_Count field.
-- 2nd Note: the contents of the Expression field must be ignored (i.e.
-- treated as though it were Empty) if No_Initialization is set True.
--------------------------------------
-- 4.5 Short-Circuit Control Forms --
--------------------------------------
-- EXPRESSION ::=
-- RELATION {and then RELATION} | RELATION {or else RELATION}
-- Gigi restriction: For both these control forms, the operand and
-- result types are always Standard.Boolean. The expander inserts the
-- required conversion operations where needed to ensure this is the
-- case.
-- N_And_Then
-- Sloc points to AND of AND THEN
-- Left_Opnd (Node2)
-- Right_Opnd (Node3)
-- Actions (List1-Sem)
-- plus fields for expression
-- N_Or_Else
-- Sloc points to OR of OR ELSE
-- Left_Opnd (Node2)
-- Right_Opnd (Node3)
-- Actions (List1-Sem)
-- plus fields for expression
-- Note: The Actions field is used to hold actions associated with
-- the right hand operand. These have to be treated specially since
-- they are not unconditionally executed. See Insert_Actions for a
-- more detailed description of how these actions are handled.
---------------------------
-- 4.5 Membership Tests --
---------------------------
-- RELATION ::=
-- SIMPLE_EXPRESSION [not] in MEMBERSHIP_CHOICE_LIST
-- MEMBERSHIP_CHOICE_LIST ::=
-- MEMBERSHIP_CHOICE {'|' MEMBERSHIP CHOICE}
-- MEMBERSHIP_CHOICE ::=
-- CHOICE_EXPRESSION | RANGE | SUBTYPE_MARK
-- Note: although the grammar above allows only a range or a subtype
-- mark, the parser in fact will accept any simple expression in place
-- of a subtype mark. This means that the semantic analyzer must be able
-- to deal with, and diagnose a simple expression other than a name for
-- the right operand. This simplifies error recovery in the parser.
-- The Alternatives field below is present only if there is more than
-- one Membership_Choice present (which is legitimate only in Ada 2012
-- mode) in which case Right_Opnd is Empty, and Alternatives contains
-- the list of choices. In the tree passed to the back end, Alternatives
-- is always No_List, and Right_Opnd is set (i.e. the expansion circuit
-- expands out the complex set membership case using simple membership
-- and equality operations).
-- Should we rename Alternatives here to Membership_Choices ???
-- N_In
-- Sloc points to IN
-- Left_Opnd (Node2)
-- Right_Opnd (Node3)
-- Alternatives (List4) (set to No_List if only one set alternative)
-- No_Minimize_Eliminate (Flag17)
-- plus fields for expression
-- N_Not_In
-- Sloc points to NOT of NOT IN
-- Left_Opnd (Node2)
-- Right_Opnd (Node3)
-- Alternatives (List4) (set to No_List if only one set alternative)
-- No_Minimize_Eliminate (Flag17)
-- plus fields for expression
--------------------
-- 4.5 Operators --
--------------------
-- LOGICAL_OPERATOR ::= and | or | xor
-- RELATIONAL_OPERATOR ::= = | /= | < | <= | > | >=
-- BINARY_ADDING_OPERATOR ::= + | - | &
-- UNARY_ADDING_OPERATOR ::= + | -
-- MULTIPLYING_OPERATOR ::= * | / | mod | rem
-- HIGHEST_PRECEDENCE_OPERATOR ::= ** | abs | not
-- Sprint syntax if Treat_Fixed_As_Integer is set:
-- x #* y
-- x #/ y
-- x #mod y
-- x #rem y
-- Gigi restriction: For * / mod rem with fixed-point operands, Gigi
-- will only be given nodes with the Treat_Fixed_As_Integer flag set.
-- All handling of smalls for multiplication and division is handled
-- by the front end (mod and rem result only from expansion). Gigi
-- thus never needs to worry about small values (for other operators
-- operating on fixed-point, e.g. addition, the small value does not
-- have any semantic effect anyway, these are always integer operations.
-- Gigi restriction: For all operators taking Boolean operands, the
-- type is always Standard.Boolean. The expander inserts the required
-- conversion operations where needed to ensure this is the case.
-- N_Op_And
-- Sloc points to AND
-- Do_Length_Check (Flag4-Sem)
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Or
-- Sloc points to OR
-- Do_Length_Check (Flag4-Sem)
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Xor
-- Sloc points to XOR
-- Do_Length_Check (Flag4-Sem)
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Eq
-- Sloc points to =
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Ne
-- Sloc points to /=
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Lt
-- Sloc points to <
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Le
-- Sloc points to <=
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Gt
-- Sloc points to >
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Ge
-- Sloc points to >=
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Add
-- Sloc points to + (binary)
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Subtract
-- Sloc points to - (binary)
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Concat
-- Sloc points to &
-- Is_Component_Left_Opnd (Flag13-Sem)
-- Is_Component_Right_Opnd (Flag14-Sem)
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Multiply
-- Sloc points to *
-- Treat_Fixed_As_Integer (Flag14-Sem)
-- Rounded_Result (Flag18-Sem)
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Divide
-- Sloc points to /
-- Treat_Fixed_As_Integer (Flag14-Sem)
-- Do_Division_Check (Flag13-Sem)
-- Rounded_Result (Flag18-Sem)
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Mod
-- Sloc points to MOD
-- Treat_Fixed_As_Integer (Flag14-Sem)
-- Do_Division_Check (Flag13-Sem)
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Rem
-- Sloc points to REM
-- Treat_Fixed_As_Integer (Flag14-Sem)
-- Do_Division_Check (Flag13-Sem)
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Expon
-- Sloc points to **
-- Is_Power_Of_2_For_Shift (Flag13-Sem)
-- plus fields for binary operator
-- plus fields for expression
-- N_Op_Plus
-- Sloc points to + (unary)
-- plus fields for unary operator
-- plus fields for expression
-- N_Op_Minus
-- Sloc points to - (unary)
-- plus fields for unary operator
-- plus fields for expression
-- N_Op_Abs
-- Sloc points to ABS
-- plus fields for unary operator
-- plus fields for expression
-- N_Op_Not
-- Sloc points to NOT
-- plus fields for unary operator
-- plus fields for expression
-- See also shift operators in section B.2
-- Note on fixed-point operations passed to Gigi: For adding operators,
-- the semantics is to treat these simply as integer operations, with
-- the small values being ignored (the bounds are already stored in
-- units of small, so that constraint checking works as usual). For the
-- case of multiply/divide/rem/mod operations, Gigi will only see fixed
-- point operands if the Treat_Fixed_As_Integer flag is set and will
-- thus treat these nodes in identical manner, ignoring small values.
-- Note on equality/inequality tests for records. In the expanded tree,
-- record comparisons are always expanded to be a series of component
-- comparisons, so the back end will never see an equality or inequality
-- operation with operands of a record type.
-- Note on overflow handling: When the overflow checking mode is set to
-- MINIMIZED or ELIMINATED, nodes for signed arithmetic operations may
-- be modified to use a larger type for the operands and result. In
-- the case where the computed range exceeds that of Long_Long_Integer,
-- and we are running in ELIMINATED mode, the operator node will be
-- changed to be a call to the appropriate routine in System.Bignums.
-- Note: In Modify_Tree_For_C mode, we do not generate an N_Op_Mod node
-- for signed integer types (since there is no equivalent operator in
-- C). Instead we rewrite such an operation in terms of REM (which is
-- % in C) and other C-available operators.
------------------------------------
-- 4.5.7 Conditional Expressions --
------------------------------------
-- CONDITIONAL_EXPRESSION ::= IF_EXPRESSION | CASE_EXPRESSION
--------------------------
-- 4.5.7 If Expression --
----------------------------
-- IF_EXPRESSION ::=
-- if CONDITION then DEPENDENT_EXPRESSION
-- {elsif CONDITION then DEPENDENT_EXPRESSION}
-- [else DEPENDENT_EXPRESSION]
-- DEPENDENT_EXPRESSION ::= EXPRESSION
-- Note: if we have (IF x1 THEN x2 ELSIF x3 THEN x4 ELSE x5) then it
-- is represented as (IF x1 THEN x2 ELSE (IF x3 THEN x4 ELSE x5)) and
-- the Is_Elsif flag is set on the inner if expression.
-- N_If_Expression
-- Sloc points to IF or ELSIF keyword
-- Expressions (List1)
-- Then_Actions (List2-Sem)
-- Else_Actions (List3-Sem)
-- Is_Elsif (Flag13) (set if comes from ELSIF)
-- Do_Overflow_Check (Flag17-Sem)
-- plus fields for expression
-- Expressions here is a three-element list, whose first element is the
-- condition, the second element is the dependent expression after THEN
-- and the third element is the dependent expression after the ELSE
-- (explicitly set to True if missing).
-- Note: the Then_Actions and Else_Actions fields are always set to
-- No_List in the tree passed to the back end. These are used only
-- for temporary processing purposes in the expander. Even though they
-- are semantic fields, their parent pointers are set because analysis
-- of actions nodes in those lists may generate additional actions that
-- need to know their insertion point (for example for the creation of
-- transient scopes).
-- Note: in the tree passed to the back end, if the result type is
-- an unconstrained array, the if expression can only appears in the
-- initializing expression of an object declaration (this avoids the
-- back end having to create a variable length temporary on the fly).
----------------------------
-- 4.5.7 Case Expression --
----------------------------
-- CASE_EXPRESSION ::=
-- case SELECTING_EXPRESSION is
-- CASE_EXPRESSION_ALTERNATIVE
-- {,CASE_EXPRESSION_ALTERNATIVE}
-- Note that the Alternatives cannot include pragmas (this contrasts
-- with the situation of case statements where pragmas are allowed).
-- N_Case_Expression
-- Sloc points to CASE
-- Expression (Node3) (the selecting expression)
-- Alternatives (List4) (the case expression alternatives)
-- Do_Overflow_Check (Flag17-Sem)
----------------------------------------
-- 4.5.7 Case Expression Alternative --
----------------------------------------
-- CASE_EXPRESSION_ALTERNATIVE ::=
-- when DISCRETE_CHOICE_LIST =>
-- DEPENDENT_EXPRESSION
-- N_Case_Expression_Alternative
-- Sloc points to WHEN
-- Actions (List1)
-- Discrete_Choices (List4)
-- Expression (Node3)
-- Has_SP_Choice (Flag15-Sem)
-- Note: The Actions field temporarily holds any actions associated with
-- evaluation of the Expression. During expansion of the case expression
-- these actions are wrapped into an N_Expressions_With_Actions node
-- replacing the original expression.
-- Note: this node never appears in the tree passed to the back end,
-- since the expander converts case expressions into case statements.
---------------------------------
-- 4.5.9 Quantified Expression --
---------------------------------
-- QUANTIFIED_EXPRESSION ::=
-- for QUANTIFIER LOOP_PARAMETER_SPECIFICATION => PREDICATE
-- | for QUANTIFIER ITERATOR_SPECIFICATION => PREDICATE
--
-- QUANTIFIER ::= all | some
-- At most one of (Iterator_Specification, Loop_Parameter_Specification)
-- is present at a time, in which case the other one is empty.
-- N_Quantified_Expression
-- Sloc points to FOR
-- Iterator_Specification (Node2)
-- Loop_Parameter_Specification (Node4)
-- Condition (Node1)
-- All_Present (Flag15)
--------------------------
-- 4.6 Type Conversion --
--------------------------
-- TYPE_CONVERSION ::=
-- SUBTYPE_MARK (EXPRESSION) | SUBTYPE_MARK (NAME)
-- In the (NAME) case, the name is stored as the expression
-- Note: the parser never generates a type conversion node, since it
-- looks like an indexed component which is generated by preference.
-- The semantic pass must correct this misidentification.
-- Gigi handles conversions that involve no change in the root type,
-- and also all conversions from integer to floating-point types.
-- Conversions from floating-point to integer are only handled in
-- the case where Float_Truncate flag set. Other conversions from
-- floating-point to integer (involving rounding) and all conversions
-- involving fixed-point types are handled by the expander.
-- Sprint syntax if Float_Truncate set: X^(Y)
-- Sprint syntax if Conversion_OK set X?(Y)
-- Sprint syntax if both flags set X?^(Y)
-- Note: If either the operand or result type is fixed-point, Gigi will
-- only see a type conversion node with Conversion_OK set. The front end
-- takes care of all handling of small's for fixed-point conversions.
-- N_Type_Conversion
-- Sloc points to first token of subtype mark
-- Subtype_Mark (Node4)
-- Expression (Node3)
-- Do_Discriminant_Check (Flag1-Sem)
-- Do_Length_Check (Flag4-Sem)
-- Float_Truncate (Flag11-Sem)
-- Do_Tag_Check (Flag13-Sem)
-- Conversion_OK (Flag14-Sem)
-- Do_Overflow_Check (Flag17-Sem)
-- Rounded_Result (Flag18-Sem)
-- plus fields for expression
-- Note: if a range check is required, then the Do_Range_Check flag
-- is set in the Expression with the check being done against the
-- target type range (after the base type conversion, if any).
-------------------------------
-- 4.7 Qualified Expression --
-------------------------------
-- QUALIFIED_EXPRESSION ::=
-- SUBTYPE_MARK ' (EXPRESSION) | SUBTYPE_MARK ' AGGREGATE
-- Note: the parentheses in the (EXPRESSION) case are deemed to enclose
-- the expression, so the Expression field of this node always points
-- to a parenthesized expression in this case (i.e. Paren_Count will
-- always be non-zero for the referenced expression if it is not an
-- aggregate).
-- N_Qualified_Expression
-- Sloc points to apostrophe
-- Subtype_Mark (Node4)
-- Expression (Node3) expression or aggregate
-- Is_Qualified_Universal_Literal (Flag4-Sem)
-- plus fields for expression
--------------------
-- 4.8 Allocator --
--------------------
-- ALLOCATOR ::=
-- new [SUBPOOL_SPECIFICATION] SUBTYPE_INDICATION
-- | new [SUBPOOL_SPECIFICATION] QUALIFIED_EXPRESSION
--
-- SUBPOOL_SPECIFICATION ::= (subpool_handle_NAME)
-- Sprint syntax (when storage pool present)
-- new xxx (storage_pool = pool)
-- or
-- new (subpool) xxx (storage_pool = pool)
-- N_Allocator
-- Sloc points to NEW
-- Expression (Node3) subtype indication or qualified expression
-- Subpool_Handle_Name (Node4) (set to Empty if not present)
-- Storage_Pool (Node1-Sem)
-- Procedure_To_Call (Node2-Sem)
-- Null_Exclusion_Present (Flag11)
-- No_Initialization (Flag13-Sem)
-- Is_Static_Coextension (Flag14-Sem)
-- Do_Storage_Check (Flag17-Sem)
-- Is_Dynamic_Coextension (Flag18-Sem)
-- plus fields for expression
-- Note: like all nodes, the N_Allocator has the Comes_From_Source flag.
-- This flag has a special function in conjunction with the restriction
-- No_Implicit_Heap_Allocations, which will be triggered if this flag
-- is not set. This means that if a source allocator is replaced with
-- a constructed allocator, the Comes_From_Source flag should be copied
-- to the newly created allocator.
---------------------------------
-- 5.1 Sequence Of Statements --
---------------------------------
-- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT}
-- Note: Although the parser will not accept a declaration as a
-- statement, the semantic analyzer may insert declarations (e.g.
-- declarations of implicit types needed for execution of other
-- statements) into a sequence of statements, so the code generator
-- should be prepared to accept a declaration where a statement is
-- expected. Note also that pragmas can appear as statements.
--------------------
-- 5.1 Statement --
--------------------
-- STATEMENT ::=
-- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT
-- There is no explicit node in the tree for a statement. Instead, the
-- individual statement appears directly. Labels are treated as a
-- kind of statement, i.e. they are linked into a statement list at
-- the point they appear, so the labeled statement appears following
-- the label or labels in the statement list.
---------------------------
-- 5.1 Simple Statement --
---------------------------
-- SIMPLE_STATEMENT ::= NULL_STATEMENT
-- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT
-- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT
-- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT
-- | REQUEUE_STATEMENT | DELAY_STATEMENT
-- | ABORT_STATEMENT | RAISE_STATEMENT
-- | CODE_STATEMENT
-----------------------------
-- 5.1 Compound Statement --
-----------------------------
-- COMPOUND_STATEMENT ::=
-- IF_STATEMENT | CASE_STATEMENT
-- | LOOP_STATEMENT | BLOCK_STATEMENT
-- | EXTENDED_RETURN_STATEMENT
-- | ACCEPT_STATEMENT | SELECT_STATEMENT
-------------------------
-- 5.1 Null Statement --
-------------------------
-- NULL_STATEMENT ::= null;
-- N_Null_Statement
-- Sloc points to NULL
----------------
-- 5.1 Label --
----------------
-- LABEL ::= <<label_STATEMENT_IDENTIFIER>>
-- Note that the occurrence of a label is not a defining identifier,
-- but rather a referencing occurrence. The defining occurrence is
-- in the implicit label declaration which occurs in the innermost
-- enclosing block.
-- N_Label
-- Sloc points to <<
-- Identifier (Node1) direct name of statement identifier
-- Exception_Junk (Flag8-Sem)
-- Note: Before Ada 2012, a label is always followed by a statement,
-- and this is true in the tree even in Ada 2012 mode (the parser
-- inserts a null statement marked with Comes_From_Source False).
-------------------------------
-- 5.1 Statement Identifier --
-------------------------------
-- STATEMENT_IDENTIFIER ::= DIRECT_NAME
-- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
-- (not an OPERATOR_SYMBOL)
-------------------------------
-- 5.2 Assignment Statement --
-------------------------------
-- ASSIGNMENT_STATEMENT ::=
-- variable_NAME := EXPRESSION;
-- N_Assignment_Statement
-- Sloc points to :=
-- Name (Node2)
-- Expression (Node3)
-- Do_Discriminant_Check (Flag1-Sem)
-- Do_Tag_Check (Flag13-Sem)
-- Do_Length_Check (Flag4-Sem)
-- Forwards_OK (Flag5-Sem)
-- Backwards_OK (Flag6-Sem)
-- No_Ctrl_Actions (Flag7-Sem)
-- Has_Target_Names (Flag8-Sem)
-- Componentwise_Assignment (Flag14-Sem)
-- Suppress_Assignment_Checks (Flag18-Sem)
-- Note: if a range check is required, then the Do_Range_Check flag
-- is set in the Expression (right hand side), with the check being
-- done against the type of the Name (left hand side).
-- Note: the back end places some restrictions on the form of the
-- Expression field. If the object being assigned to is Atomic, then
-- the Expression may not have the form of an aggregate (since this
-- might cause the back end to generate separate assignments). In this
-- case the front end must generate an extra temporary and initialize
-- this temporary as required (the temporary itself is not atomic).
------------------
-- Target_Name --
------------------
-- N_Target_Name
-- Sloc points to @
-- Etype (Node5-Sem)
-- Note (Ada 2020): node is used during analysis as a placeholder for
-- the value of the LHS of the enclosing assignment statement. Node is
-- eventually rewritten together with enclosing assignment, and backends
-- are not aware of it.
-----------------------
-- 5.3 If Statement --
-----------------------
-- IF_STATEMENT ::=
-- if CONDITION then
-- SEQUENCE_OF_STATEMENTS
-- {elsif CONDITION then
-- SEQUENCE_OF_STATEMENTS}
-- [else
-- SEQUENCE_OF_STATEMENTS]
-- end if;
-- Gigi restriction: This expander ensures that the type of the
-- Condition fields is always Standard.Boolean, even if the type
-- in the source is some non-standard boolean type.
-- N_If_Statement
-- Sloc points to IF
-- Condition (Node1)
-- Then_Statements (List2)
-- Elsif_Parts (List3) (set to No_List if none present)
-- Else_Statements (List4) (set to No_List if no else part present)
-- End_Span (Uint5) (set to Uint_0 if expander generated)
-- From_Conditional_Expression (Flag1-Sem)
-- N_Elsif_Part
-- Sloc points to ELSIF
-- Condition (Node1)
-- Then_Statements (List2)
-- Condition_Actions (List3-Sem)
--------------------
-- 5.3 Condition --
--------------------
-- CONDITION ::= boolean_EXPRESSION
-------------------------
-- 5.4 Case Statement --
-------------------------
-- CASE_STATEMENT ::=
-- case EXPRESSION is
-- CASE_STATEMENT_ALTERNATIVE
-- {CASE_STATEMENT_ALTERNATIVE}
-- end case;
-- Note: the Alternatives can contain pragmas. These only occur at
-- the start of the list, since any pragmas occurring after the first
-- alternative are absorbed into the corresponding statement sequence.
-- N_Case_Statement
-- Sloc points to CASE
-- Expression (Node3)
-- Alternatives (List4)
-- End_Span (Uint5) (set to Uint_0 if expander generated)
-- From_Conditional_Expression (Flag1-Sem)
-- Note: Before Ada 2012, a pragma in a statement sequence is always
-- followed by a statement, and this is true in the tree even in Ada
-- 2012 mode (the parser inserts a null statement marked with the flag
-- Comes_From_Source False).
-------------------------------------
-- 5.4 Case Statement Alternative --
-------------------------------------
-- CASE_STATEMENT_ALTERNATIVE ::=
-- when DISCRETE_CHOICE_LIST =>
-- SEQUENCE_OF_STATEMENTS
-- N_Case_Statement_Alternative
-- Sloc points to WHEN
-- Discrete_Choices (List4)
-- Statements (List3)
-- Has_SP_Choice (Flag15-Sem)
-- Note: in the list of Discrete_Choices, the tree passed to the back
-- end does not have choice entries corresponding to names of statically
-- predicated subtypes. Such entries are always expanded out to the list
-- of equivalent values or ranges. The ASIS tree generated in -gnatct
-- mode does not have this expansion, and has the original choices.
-------------------------
-- 5.5 Loop Statement --
-------------------------
-- LOOP_STATEMENT ::=
-- [loop_STATEMENT_IDENTIFIER :]
-- [ITERATION_SCHEME] loop
-- SEQUENCE_OF_STATEMENTS
-- end loop [loop_IDENTIFIER];
-- Note: The occurrence of a loop label is not a defining identifier
-- but rather a referencing occurrence. The defining occurrence is in
-- the implicit label declaration which occurs in the innermost
-- enclosing block.
-- Note: there is always a loop statement identifier present in the
-- tree, even if none was given in the source. In the case where no loop
-- identifier is given in the source, the parser creates a name of the
-- form _Loop_n, where n is a decimal integer (the two underlines ensure
-- that the loop names created in this manner do not conflict with any
-- user defined identifiers), and the flag Has_Created_Identifier is set
-- to True. The only exception to the rule that all loop statement nodes
-- have identifiers occurs for loops constructed by the expander, and
-- the semantic analyzer will create and supply dummy loop identifiers
-- in these cases.
-- N_Loop_Statement
-- Sloc points to LOOP
-- Identifier (Node1) loop identifier (set to Empty if no identifier)
-- Iteration_Scheme (Node2) (set to Empty if no iteration scheme)
-- Statements (List3)
-- End_Label (Node4)
-- Has_Created_Identifier (Flag15)
-- Is_Null_Loop (Flag16)
-- Suppress_Loop_Warnings (Flag17)
-- Note: the parser fills in the Identifier field if there is an
-- explicit loop identifier. Otherwise the parser leaves this field
-- set to Empty, and then the semantic processing for a loop statement
-- creates an identifier, setting the Has_Created_Identifier flag to
-- True. So after semantic analysis, the Identifier is always set,
-- referencing an identifier whose entity has an Ekind of E_Loop.
---------------------------
-- 5.5 Iteration Scheme --
---------------------------
-- ITERATION_SCHEME ::=
-- while CONDITION
-- | for LOOP_PARAMETER_SPECIFICATION
-- | for ITERATOR_SPECIFICATION
-- At most one of (Iterator_Specification, Loop_Parameter_Specification)
-- is present at a time, in which case the other one is empty. Both are
-- empty in the case of a WHILE loop.
-- Gigi restriction: The expander ensures that the type of the Condition
-- field is always Standard.Boolean, even if the type in the source is
-- some non-standard boolean type.
-- N_Iteration_Scheme
-- Sloc points to WHILE or FOR
-- Condition (Node1) (set to Empty if FOR case)
-- Condition_Actions (List3-Sem)
-- Iterator_Specification (Node2) (set to Empty if WHILE case)
-- Loop_Parameter_Specification (Node4) (set to Empty if WHILE case)
---------------------------------------
-- 5.5 Loop Parameter Specification --
---------------------------------------
-- LOOP_PARAMETER_SPECIFICATION ::=
-- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION
-- N_Loop_Parameter_Specification
-- Sloc points to first identifier
-- Defining_Identifier (Node1)
-- Reverse_Present (Flag15)
-- Discrete_Subtype_Definition (Node4)
-----------------------------------
-- 5.5.1 Iterator Specification --
-----------------------------------
-- ITERATOR_SPECIFICATION ::=
-- DEFINING_IDENTIFIER in [reverse] NAME
-- | DEFINING_IDENTIFIER [: SUBTYPE_INDICATION] of [reverse] NAME
-- N_Iterator_Specification
-- Sloc points to defining identifier
-- Defining_Identifier (Node1)
-- Name (Node2)
-- Reverse_Present (Flag15)
-- Of_Present (Flag16)
-- Subtype_Indication (Node5)
-- Note: The Of_Present flag distinguishes the two forms
--------------------------
-- 5.6 Block Statement --
--------------------------
-- BLOCK_STATEMENT ::=
-- [block_STATEMENT_IDENTIFIER:]
-- [declare
-- DECLARATIVE_PART]
-- begin
-- HANDLED_SEQUENCE_OF_STATEMENTS
-- end [block_IDENTIFIER];
-- Note that the occurrence of a block identifier is not a defining
-- identifier, but rather a referencing occurrence. The defining
-- occurrence is an E_Block entity declared by the implicit label
-- declaration which occurs in the innermost enclosing block statement
-- or body; the block identifier denotes that E_Block.
-- For block statements that come from source code, there is always a
-- block statement identifier present in the tree, denoting an E_Block.
-- In the case where no block identifier is given in the source,
-- the parser creates a name of the form B_n, where n is a decimal
-- integer, and the flag Has_Created_Identifier is set to True. Blocks
-- constructed by the expander usually have no identifier, and no
-- corresponding entity.
-- Note: the block statement created for an extended return statement
-- has an entity, and this entity is an E_Return_Statement, rather than
-- the usual E_Block.
-- Note: Exception_Junk is set for the wrapping blocks created during
-- local raise optimization (Exp_Ch11.Expand_Local_Exception_Handlers).
-- Note: from a control flow viewpoint, a block statement defines an
-- extended basic block, i.e. the entry of the block dominates every
-- statement in the sequence. When generating new statements with
-- exception handlers in the expander at the end of a sequence that
-- comes from source code, it can be necessary to wrap them all in a
-- block statement in order to expose the implicit control flow to
-- gigi and thus prevent it from issuing bogus control flow warnings.
-- N_Block_Statement
-- Sloc points to DECLARE or BEGIN
-- Identifier (Node1) block direct name (set to Empty if not present)
-- Declarations (List2) (set to No_List if no DECLARE part)
-- Handled_Statement_Sequence (Node4)
-- Cleanup_Actions (List5-Sem)
-- Is_Abort_Block (Flag4-Sem)
-- Is_Task_Master (Flag5-Sem)
-- Activation_Chain_Entity (Node3-Sem)
-- Has_Created_Identifier (Flag15)
-- Is_Task_Allocation_Block (Flag6)
-- Is_Asynchronous_Call_Block (Flag7)
-- Exception_Junk (Flag8-Sem)
-- Is_Finalization_Wrapper (Flag9-Sem)
-------------------------
-- 5.7 Exit Statement --
-------------------------
-- EXIT_STATEMENT ::= exit [loop_NAME] [when CONDITION];
-- Gigi restriction: The expander ensures that the type of the Condition
-- field is always Standard.Boolean, even if the type in the source is
-- some non-standard boolean type.
-- N_Exit_Statement
-- Sloc points to EXIT
-- Name (Node2) (set to Empty if no loop name present)
-- Condition (Node1) (set to Empty if no WHEN part present)
-- Next_Exit_Statement (Node3-Sem): Next exit on chain
-------------------------
-- 5.9 Goto Statement --
-------------------------
-- GOTO_STATEMENT ::= goto label_NAME;
-- N_Goto_Statement
-- Sloc points to GOTO
-- Name (Node2)
-- Exception_Junk (Flag8-Sem)
---------------------------------
-- 6.1 Subprogram Declaration --
---------------------------------
-- SUBPROGRAM_DECLARATION ::=
-- SUBPROGRAM_SPECIFICATION
-- [ASPECT_SPECIFICATIONS];
-- N_Subprogram_Declaration
-- Sloc points to FUNCTION or PROCEDURE
-- Specification (Node1)
-- Body_To_Inline (Node3-Sem)
-- Corresponding_Body (Node5-Sem)
-- Parent_Spec (Node4-Sem)
-- Is_Entry_Barrier_Function (Flag8-Sem)
-- Is_Task_Body_Procedure (Flag1-Sem)
------------------------------------------
-- 6.1 Abstract Subprogram Declaration --
------------------------------------------
-- ABSTRACT_SUBPROGRAM_DECLARATION ::=
-- SUBPROGRAM_SPECIFICATION is abstract
-- [ASPECT_SPECIFICATIONS];
-- N_Abstract_Subprogram_Declaration
-- Sloc points to ABSTRACT
-- Specification (Node1)
-----------------------------------
-- 6.1 Subprogram Specification --
-----------------------------------
-- SUBPROGRAM_SPECIFICATION ::=
-- [[not] overriding]
-- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
-- | [[not] overriding]
-- function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
-- Note: there are no separate nodes for the profiles, instead the
-- information appears directly in the following nodes.
-- N_Function_Specification
-- Sloc points to FUNCTION
-- Defining_Unit_Name (Node1) (the designator)
-- Parameter_Specifications (List3) (set to No_List if no formal part)
-- Null_Exclusion_Present (Flag11)
-- Result_Definition (Node4) for result subtype
-- Generic_Parent (Node5-Sem)
-- Must_Override (Flag14) set if overriding indicator present
-- Must_Not_Override (Flag15) set if not_overriding indicator present
-- N_Procedure_Specification
-- Sloc points to PROCEDURE
-- Defining_Unit_Name (Node1)
-- Parameter_Specifications (List3) (set to No_List if no formal part)
-- Generic_Parent (Node5-Sem)
-- Null_Present (Flag13) set for null procedure case (Ada 2005 feature)
-- Must_Override (Flag14) set if overriding indicator present
-- Must_Not_Override (Flag15) set if not_overriding indicator present
-- Note: overriding indicator is an Ada 2005 feature
---------------------
-- 6.1 Designator --
---------------------
-- DESIGNATOR ::=
-- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
-- Designators that are simply identifiers or operator symbols appear
-- directly in the tree in this form. The following node is used only
-- in the case where the designator has a parent unit name component.
-- N_Designator
-- Sloc points to period
-- Name (Node2) holds the parent unit name
-- Identifier (Node1)
-- Note: Name is always non-Empty, since this node is only used for the
-- case where a parent library unit package name is present.
-- Note that the identifier can also be an operator symbol here
------------------------------
-- 6.1 Defining Designator --
------------------------------
-- DEFINING_DESIGNATOR ::=
-- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
-------------------------------------
-- 6.1 Defining Program Unit Name --
-------------------------------------
-- DEFINING_PROGRAM_UNIT_NAME ::=
-- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
-- The parent unit name is present only in the case of a child unit name
-- (permissible only for Ada 95 for a library level unit, i.e. a unit
-- at scope level one). If no such name is present, the defining program
-- unit name is represented simply as the defining identifier. In the
-- child unit case, the following node is used to represent the child
-- unit name.
-- N_Defining_Program_Unit_Name
-- Sloc points to period
-- Name (Node2) holds the parent unit name
-- Defining_Identifier (Node1)
-- Note: Name is always non-Empty, since this node is only used for the
-- case where a parent unit name is present.
--------------------------
-- 6.1 Operator Symbol --
--------------------------
-- OPERATOR_SYMBOL ::= STRING_LITERAL
-- Note: the fields of the N_Operator_Symbol node are laid out to match
-- the corresponding fields of an N_Character_Literal node. This allows
-- easy conversion of the operator symbol node into a character literal
-- node in the case where a string constant of the form of an operator
-- symbol is scanned out as such, but turns out semantically to be a
-- string literal that is not an operator. For details see Sinfo.CN.
-- Change_Operator_Symbol_To_String_Literal.
-- N_Operator_Symbol
-- Sloc points to literal
-- Chars (Name1) contains the Name_Id for the operator symbol
-- Strval (Str3) Id of string value. This is used if the operator
-- symbol turns out to be a normal string after all.
-- Entity (Node4-Sem)
-- Associated_Node (Node4-Sem)
-- Has_Private_View (Flag11-Sem) set in generic units.
-- Etype (Node5-Sem)
-- Note: the Strval field may be set to No_String for generated
-- operator symbols that are known not to be string literals
-- semantically.
-----------------------------------
-- 6.1 Defining Operator Symbol --
-----------------------------------
-- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
-- A defining operator symbol is an entity, which has additional
-- fields depending on the setting of the Ekind field. These
-- additional fields are defined (and access subprograms declared)
-- in package Einfo.
-- Note: N_Defining_Operator_Symbol is an extended node whose fields
-- are deliberately layed out to match the layout of fields in an
-- ordinary N_Operator_Symbol node allowing for easy alteration of
-- an operator symbol node into a defining operator symbol node.
-- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
-- for further details.
-- N_Defining_Operator_Symbol
-- Sloc points to literal
-- Chars (Name1) contains the Name_Id for the operator symbol
-- Next_Entity (Node2-Sem)
-- Scope (Node3-Sem)
-- Etype (Node5-Sem)
----------------------------
-- 6.1 Parameter Profile --
----------------------------
-- PARAMETER_PROFILE ::= [FORMAL_PART]
---------------------------------------
-- 6.1 Parameter and Result Profile --
---------------------------------------
-- PARAMETER_AND_RESULT_PROFILE ::=
-- [FORMAL_PART] return [NULL_EXCLUSION] SUBTYPE_MARK
-- | [FORMAL_PART] return ACCESS_DEFINITION
-- There is no explicit node in the tree for a parameter and result
-- profile. Instead the information appears directly in the parent.
----------------------
-- 6.1 Formal Part --
----------------------
-- FORMAL_PART ::=
-- (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
----------------------------------
-- 6.1 Parameter Specification --
----------------------------------
-- PARAMETER_SPECIFICATION ::=
-- DEFINING_IDENTIFIER_LIST : [ALIASED] MODE [NULL_EXCLUSION]
-- SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
-- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
-- [:= DEFAULT_EXPRESSION]
-- Although the syntax allows multiple identifiers in the list, the
-- semantics is as though successive specifications were given with
-- identical type definition and expression components. To simplify
-- semantic processing, the parser represents a multiple declaration
-- case as a sequence of single Specifications, using the More_Ids and
-- Prev_Ids flags to preserve the original source form as described
-- in the section on "Handling of Defining Identifier Lists".
-- ALIASED can only be present in Ada 2012 mode
-- N_Parameter_Specification
-- Sloc points to first identifier
-- Defining_Identifier (Node1)
-- Aliased_Present (Flag4)
-- In_Present (Flag15)
-- Out_Present (Flag17)
-- Null_Exclusion_Present (Flag11)
-- Parameter_Type (Node2) subtype mark or access definition
-- Expression (Node3) (set to Empty if no default expression present)
-- Do_Accessibility_Check (Flag13-Sem)
-- More_Ids (Flag5) (set to False if no more identifiers in list)
-- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
-- Default_Expression (Node5-Sem)
---------------
-- 6.1 Mode --
---------------
-- MODE ::= [in] | in out | out
-- There is no explicit node in the tree for the Mode. Instead the
-- In_Present and Out_Present flags are set in the parent node to
-- record the presence of keywords specifying the mode.
--------------------------
-- 6.3 Subprogram Body --
--------------------------
-- SUBPROGRAM_BODY ::=
-- SUBPROGRAM_SPECIFICATION [ASPECT_SPECIFICATIONS] is
-- DECLARATIVE_PART
-- begin
-- HANDLED_SEQUENCE_OF_STATEMENTS
-- end [DESIGNATOR];
-- N_Subprogram_Body
-- Sloc points to FUNCTION or PROCEDURE
-- Specification (Node1)
-- Declarations (List2)
-- Handled_Statement_Sequence (Node4)
-- Activation_Chain_Entity (Node3-Sem)
-- Corresponding_Spec (Node5-Sem)
-- Acts_As_Spec (Flag4-Sem)
-- Bad_Is_Detected (Flag15) used only by parser
-- Do_Storage_Check (Flag17-Sem)
-- Has_Relative_Deadline_Pragma (Flag9-Sem)
-- Is_Entry_Barrier_Function (Flag8-Sem)
-- Is_Protected_Subprogram_Body (Flag7-Sem)
-- Is_Task_Body_Procedure (Flag1-Sem)
-- Is_Task_Master (Flag5-Sem)
-- Was_Expression_Function (Flag18-Sem)
-- Was_Originally_Stub (Flag13-Sem)
-------------------------
-- Expression Function --
-------------------------
-- This is an Ada 2012 extension, we put it here for now, to be labeled
-- and put in its proper section when we know exactly where that is.
-- EXPRESSION_FUNCTION ::=
-- FUNCTION SPECIFICATION IS (EXPRESSION)
-- [ASPECT_SPECIFICATIONS];
-- N_Expression_Function
-- Sloc points to FUNCTION
-- Specification (Node1)
-- Expression (Node3)
-- Corresponding_Spec (Node5-Sem)
-----------------------------------
-- 6.4 Procedure Call Statement --
-----------------------------------
-- PROCEDURE_CALL_STATEMENT ::=
-- procedure_NAME; | procedure_PREFIX ACTUAL_PARAMETER_PART;
-- Note: the reason that a procedure call has expression fields is that
-- it semantically resembles an expression, e.g. overloading is allowed
-- and a type is concocted for semantic processing purposes. Certain of
-- these fields, such as Parens are not relevant, but it is easier to
-- just supply all of them together.
-- N_Procedure_Call_Statement
-- Sloc points to first token of name or prefix
-- Name (Node2) stores name or prefix
-- Parameter_Associations (List3) (set to No_List if no
-- actual parameter part)
-- First_Named_Actual (Node4-Sem)
-- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
-- Do_Tag_Check (Flag13-Sem)
-- No_Elaboration_Check (Flag14-Sem)
-- ABE_Is_Certain (Flag18-Sem)
-- plus fields for expression
-- If any IN parameter requires a range check, then the corresponding
-- argument expression has the Do_Range_Check flag set, and the range
-- check is done against the formal type. Note that this argument
-- expression may appear directly in the Parameter_Associations list,
-- or may be a descendant of an N_Parameter_Association node that
-- appears in this list.
------------------------
-- 6.4 Function Call --
------------------------
-- FUNCTION_CALL ::=
-- function_NAME | function_PREFIX ACTUAL_PARAMETER_PART
-- Note: the parser may generate an indexed component node or simply
-- a name node instead of a function call node. The semantic pass must
-- correct this misidentification.
-- N_Function_Call
-- Sloc points to first token of name or prefix
-- Name (Node2) stores name or prefix
-- Parameter_Associations (List3) (set to No_List if no
-- actual parameter part)
-- First_Named_Actual (Node4-Sem)
-- Controlling_Argument (Node1-Sem) (set to Empty if not dispatching)
-- No_Side_Effect_Removal (Flag1-Sem)
-- Is_Expanded_Build_In_Place_Call (Flag11-Sem)
-- Do_Tag_Check (Flag13-Sem)
-- No_Elaboration_Check (Flag14-Sem)
-- ABE_Is_Certain (Flag18-Sem)
-- plus fields for expression
--------------------------------
-- 6.4 Actual Parameter Part --
--------------------------------
-- ACTUAL_PARAMETER_PART ::=
-- (PARAMETER_ASSOCIATION {,PARAMETER_ASSOCIATION})
--------------------------------
-- 6.4 Parameter Association --
--------------------------------
-- PARAMETER_ASSOCIATION ::=
-- [formal_parameter_SELECTOR_NAME =>] EXPLICIT_ACTUAL_PARAMETER
-- Note: the N_Parameter_Association node is built only if a formal
-- parameter selector name is present, otherwise the parameter
-- association appears in the tree simply as the node for the
-- explicit actual parameter.
-- N_Parameter_Association
-- Sloc points to formal parameter
-- Selector_Name (Node2) (always non-Empty)
-- Explicit_Actual_Parameter (Node3)
-- Next_Named_Actual (Node4-Sem)
-- Is_Accessibility_Actual (Flag13-Sem)
---------------------------
-- 6.4 Actual Parameter --
---------------------------
-- EXPLICIT_ACTUAL_PARAMETER ::= EXPRESSION | variable_NAME
---------------------------
-- 6.5 Return Statement --
---------------------------
-- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION];
-- EXTENDED_RETURN_STATEMENT ::=
-- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
-- [:= EXPRESSION] [do
-- HANDLED_SEQUENCE_OF_STATEMENTS
-- end return];
-- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION
-- The term "return statement" is defined in 6.5 to mean either a
-- SIMPLE_RETURN_STATEMENT or an EXTENDED_RETURN_STATEMENT. We avoid
-- the use of this term, since it used to mean someting else in earlier
-- versions of Ada.
-- N_Simple_Return_Statement
-- Sloc points to RETURN
-- Return_Statement_Entity (Node5-Sem)
-- Expression (Node3) (set to Empty if no expression present)
-- Storage_Pool (Node1-Sem)
-- Procedure_To_Call (Node2-Sem)
-- Do_Tag_Check (Flag13-Sem)
-- By_Ref (Flag5-Sem)
-- Comes_From_Extended_Return_Statement (Flag18-Sem)
-- Note: Return_Statement_Entity points to an E_Return_Statement
-- If a range check is required, then Do_Range_Check is set on the
-- Expression. The check is against the return subtype of the function.
-- N_Extended_Return_Statement
-- Sloc points to RETURN
-- Return_Statement_Entity (Node5-Sem)
-- Return_Object_Declarations (List3)
-- Handled_Statement_Sequence (Node4) (set to Empty if not present)
-- Storage_Pool (Node1-Sem)
-- Procedure_To_Call (Node2-Sem)
-- Do_Tag_Check (Flag13-Sem)
-- By_Ref (Flag5-Sem)
-- Note: Return_Statement_Entity points to an E_Return_Statement.
-- Note that Return_Object_Declarations is a list containing the
-- N_Object_Declaration -- see comment on this field above.
-- The declared object will have Is_Return_Object = True.
-- There is no such syntactic category as return_object_declaration
-- in the RM. Return_Object_Declarations represents this portion of
-- the syntax for EXTENDED_RETURN_STATEMENT:
-- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION
-- [:= EXPRESSION]
-- There are two entities associated with an extended_return_statement:
-- the Return_Statement_Entity represents the statement itself,
-- and the Defining_Identifier of the Object_Declaration in
-- Return_Object_Declarations represents the object being
-- returned. N_Simple_Return_Statement has only the former.
------------------------------
-- 7.1 Package Declaration --
------------------------------
-- PACKAGE_DECLARATION ::=
-- PACKAGE_SPECIFICATION;
-- Note: the activation chain entity for a package spec is used for
-- all tasks declared in the package spec, or in the package body.
-- N_Package_Declaration
-- Sloc points to PACKAGE
-- Specification (Node1)
-- Corresponding_Body (Node5-Sem)
-- Parent_Spec (Node4-Sem)
-- Activation_Chain_Entity (Node3-Sem)
--------------------------------
-- 7.1 Package Specification --
--------------------------------
-- PACKAGE_SPECIFICATION ::=
-- package DEFINING_PROGRAM_UNIT_NAME
-- [ASPECT_SPECIFICATIONS]
-- is
-- {BASIC_DECLARATIVE_ITEM}
-- [private
-- {BASIC_DECLARATIVE_ITEM}]
-- end [[PARENT_UNIT_NAME .] IDENTIFIER]
-- N_Package_Specification
-- Sloc points to PACKAGE
-- Defining_Unit_Name (Node1)
-- Visible_Declarations (List2)
-- Private_Declarations (List3) (set to No_List if no private
-- part present)
-- End_Label (Node4)
-- Generic_Parent (Node5-Sem)
-- Limited_View_Installed (Flag18-Sem)
-----------------------
-- 7.1 Package Body --
-----------------------
-- PACKAGE_BODY ::=
-- package body DEFINING_PROGRAM_UNIT_NAME
-- [ASPECT_SPECIFICATIONS]
-- is
-- DECLARATIVE_PART
-- [begin
-- HANDLED_SEQUENCE_OF_STATEMENTS]
-- end [[PARENT_UNIT_NAME .] IDENTIFIER];
-- N_Package_Body
-- Sloc points to PACKAGE
-- Defining_Unit_Name (Node1)
-- Declarations (List2)
-- Handled_Statement_Sequence (Node4) (set to Empty if no HSS present)
-- Corresponding_Spec (Node5-Sem)
-- Was_Originally_Stub (Flag13-Sem)
-- Note: if a source level package does not contain a handled sequence
-- of statements, then the parser supplies a dummy one with a null
-- sequence of statements. Comes_From_Source will be False in this
-- constructed sequence. The reason we need this is for the End_Label
-- field in the HSS.
-----------------------------------
-- 7.4 Private Type Declaration --
-----------------------------------
-- PRIVATE_TYPE_DECLARATION ::=
-- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
-- is [[abstract] tagged] [limited] private
-- [ASPECT_SPECIFICATIONS];
-- Note: TAGGED is not permitted in Ada 83 mode
-- N_Private_Type_Declaration
-- Sloc points to TYPE
-- Defining_Identifier (Node1)
-- Discriminant_Specifications (List4) (set to No_List if no
-- discriminant part)
-- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
-- Abstract_Present (Flag4)
-- Tagged_Present (Flag15)
-- Limited_Present (Flag17)
----------------------------------------
-- 7.4 Private Extension Declaration --
----------------------------------------
-- PRIVATE_EXTENSION_DECLARATION ::=
-- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is
-- [abstract] [limited | synchronized]
-- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST]
-- with private [ASPECT_SPECIFICATIONS];
-- Note: LIMITED, and private extension declarations are not allowed
-- in Ada 83 mode.
-- N_Private_Extension_Declaration
-- Sloc points to TYPE
-- Defining_Identifier (Node1)
-- Uninitialized_Variable (Node3-Sem)
-- Discriminant_Specifications (List4) (set to No_List if no
-- discriminant part)
-- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
-- Abstract_Present (Flag4)
-- Limited_Present (Flag17)
-- Synchronized_Present (Flag7)
-- Subtype_Indication (Node5)
-- Interface_List (List2) (set to No_List if none)
---------------------
-- 8.4 Use Clause --
---------------------
-- USE_CLAUSE ::= USE_PACKAGE_CLAUSE | USE_TYPE_CLAUSE
-----------------------------
-- 8.4 Use Package Clause --
-----------------------------
-- USE_PACKAGE_CLAUSE ::= use package_NAME {, package_NAME};
-- N_Use_Package_Clause
-- Sloc points to USE
-- Names (List2)
-- Next_Use_Clause (Node3-Sem)
-- Hidden_By_Use_Clause (Elist4-Sem)
--------------------------
-- 8.4 Use Type Clause --
--------------------------
-- USE_TYPE_CLAUSE ::= use [ALL] type SUBTYPE_MARK {, SUBTYPE_MARK};
-- Note: use type clause is not permitted in Ada 83 mode
-- Note: the ALL keyword can appear only in Ada 2012 mode
-- N_Use_Type_Clause
-- Sloc points to USE
-- Subtype_Marks (List2)
-- Next_Use_Clause (Node3-Sem)
-- Hidden_By_Use_Clause (Elist4-Sem)
-- Used_Operations (Elist5-Sem)
-- All_Present (Flag15)
-------------------------------
-- 8.5 Renaming Declaration --
-------------------------------
-- RENAMING_DECLARATION ::=
-- OBJECT_RENAMING_DECLARATION
-- | EXCEPTION_RENAMING_DECLARATION
-- | PACKAGE_RENAMING_DECLARATION
-- | SUBPROGRAM_RENAMING_DECLARATION
-- | GENERIC_RENAMING_DECLARATION
--------------------------------------
-- 8.5 Object Renaming Declaration --
--------------------------------------
-- OBJECT_RENAMING_DECLARATION ::=
-- DEFINING_IDENTIFIER :
-- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME
-- [ASPECT_SPECIFICATIONS];
-- | DEFINING_IDENTIFIER :
-- ACCESS_DEFINITION renames object_NAME
-- [ASPECT_SPECIFICATIONS];
-- Note: Access_Definition is an optional field that gives support to
-- Ada 2005 (AI-230). The parser generates nodes that have either the
-- Subtype_Indication field or else the Access_Definition field.
-- N_Object_Renaming_Declaration
-- Sloc points to first identifier
-- Defining_Identifier (Node1)
-- Null_Exclusion_Present (Flag11) (set to False if not present)
-- Subtype_Mark (Node4) (set to Empty if not present)
-- Access_Definition (Node3) (set to Empty if not present)
-- Name (Node2)
-- Corresponding_Generic_Association (Node5-Sem)
-----------------------------------------
-- 8.5 Exception Renaming Declaration --
-----------------------------------------
-- EXCEPTION_RENAMING_DECLARATION ::=
-- DEFINING_IDENTIFIER : exception renames exception_NAME
-- [ASPECT_SPECIFICATIONS];
-- N_Exception_Renaming_Declaration
-- Sloc points to first identifier
-- Defining_Identifier (Node1)
-- Name (Node2)
---------------------------------------
-- 8.5 Package Renaming Declaration --
---------------------------------------
-- PACKAGE_RENAMING_DECLARATION ::=
-- package DEFINING_PROGRAM_UNIT_NAME renames package_NAME
-- [ASPECT_SPECIFICATIONS];
-- N_Package_Renaming_Declaration
-- Sloc points to PACKAGE
-- Defining_Unit_Name (Node1)
-- Name (Node2)
-- Parent_Spec (Node4-Sem)
------------------------------------------
-- 8.5 Subprogram Renaming Declaration --
------------------------------------------
-- SUBPROGRAM_RENAMING_DECLARATION ::=
-- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME
-- [ASPECT_SPECIFICATIONS];
-- N_Subprogram_Renaming_Declaration
-- Sloc points to RENAMES
-- Specification (Node1)
-- Name (Node2)
-- Parent_Spec (Node4-Sem)
-- Corresponding_Spec (Node5-Sem)
-- Corresponding_Formal_Spec (Node3-Sem)
-- From_Default (Flag6-Sem)
-----------------------------------------
-- 8.5.5 Generic Renaming Declaration --
-----------------------------------------
-- GENERIC_RENAMING_DECLARATION ::=
-- generic package DEFINING_PROGRAM_UNIT_NAME
-- renames generic_package_NAME
-- [ASPECT_SPECIFICATIONS];
-- | generic procedure DEFINING_PROGRAM_UNIT_NAME
-- renames generic_procedure_NAME
-- [ASPECT_SPECIFICATIONS];
-- | generic function DEFINING_PROGRAM_UNIT_NAME
-- renames generic_function_NAME
-- [ASPECT_SPECIFICATIONS];
-- N_Generic_Package_Renaming_Declaration
-- Sloc points to GENERIC
-- Defining_Unit_Name (Node1)
-- Name (Node2)
-- Parent_Spec (Node4-Sem)
-- N_Generic_Procedure_Renaming_Declaration
-- Sloc points to GENERIC
-- Defining_Unit_Name (Node1)
-- Name (Node2)
-- Parent_Spec (Node4-Sem)
-- N_Generic_Function_Renaming_Declaration
-- Sloc points to GENERIC
-- Defining_Unit_Name (Node1)
-- Name (Node2)
-- Parent_Spec (Node4-Sem)
--------------------------------
-- 9.1 Task Type Declaration --
--------------------------------
-- TASK_TYPE_DECLARATION ::=
-- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
-- [ASPECT_SPECIFICATIONS]
-- [is [new INTERFACE_LIST with] TASK_DEFINITION];
-- N_Task_Type_Declaration
-- Sloc points to TASK
-- Defining_Identifier (Node1)
-- Discriminant_Specifications (List4) (set to No_List if no
-- discriminant part)
-- Interface_List (List2) (set to No_List if none)
-- Task_Definition (Node3) (set to Empty if not present)
-- Corresponding_Body (Node5-Sem)
----------------------------------
-- 9.1 Single Task Declaration --
----------------------------------
-- SINGLE_TASK_DECLARATION ::=
-- task DEFINING_IDENTIFIER
-- [ASPECT_SPECIFICATIONS]
-- [is [new INTERFACE_LIST with] TASK_DEFINITION];
-- N_Single_Task_Declaration
-- Sloc points to TASK
-- Defining_Identifier (Node1)
-- Interface_List (List2) (set to No_List if none)
-- Task_Definition (Node3) (set to Empty if not present)
--------------------------
-- 9.1 Task Definition --
--------------------------
-- TASK_DEFINITION ::=
-- {TASK_ITEM}
-- [private
-- {TASK_ITEM}]
-- end [task_IDENTIFIER]
-- Note: as a result of semantic analysis, the list of task items can
-- include implicit type declarations resulting from entry families.
-- N_Task_Definition
-- Sloc points to first token of task definition
-- Visible_Declarations (List2)
-- Private_Declarations (List3) (set to No_List if no private part)
-- End_Label (Node4)
-- Has_Storage_Size_Pragma (Flag5-Sem)
-- Has_Relative_Deadline_Pragma (Flag9-Sem)
--------------------
-- 9.1 Task Item --
--------------------
-- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
--------------------
-- 9.1 Task Body --
--------------------
-- TASK_BODY ::=
-- task body task_DEFINING_IDENTIFIER
-- [ASPECT_SPECIFICATIONS]
-- is
-- DECLARATIVE_PART
-- begin
-- HANDLED_SEQUENCE_OF_STATEMENTS
-- end [task_IDENTIFIER];
-- Gigi restriction: This node never appears
-- N_Task_Body
-- Sloc points to TASK
-- Defining_Identifier (Node1)
-- Declarations (List2)
-- Handled_Statement_Sequence (Node4)
-- Is_Task_Master (Flag5-Sem)
-- Activation_Chain_Entity (Node3-Sem)
-- Corresponding_Spec (Node5-Sem)
-- Was_Originally_Stub (Flag13-Sem)
-------------------------------------
-- 9.4 Protected Type Declaration --
-------------------------------------
-- PROTECTED_TYPE_DECLARATION ::=
-- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
-- [ASPECT_SPECIFICATIONS]
-- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
-- Note: protected type declarations are not permitted in Ada 83 mode
-- N_Protected_Type_Declaration
-- Sloc points to PROTECTED
-- Defining_Identifier (Node1)
-- Discriminant_Specifications (List4) (set to No_List if no
-- discriminant part)
-- Interface_List (List2) (set to No_List if none)
-- Protected_Definition (Node3)
-- Corresponding_Body (Node5-Sem)
---------------------------------------
-- 9.4 Single Protected Declaration --
---------------------------------------
-- SINGLE_PROTECTED_DECLARATION ::=
-- protected DEFINING_IDENTIFIER
-- [ASPECT_SPECIFICATIONS]
-- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
-- Note: single protected declarations are not allowed in Ada 83 mode
-- N_Single_Protected_Declaration
-- Sloc points to PROTECTED
-- Defining_Identifier (Node1)
-- Interface_List (List2) (set to No_List if none)
-- Protected_Definition (Node3)
-------------------------------
-- 9.4 Protected Definition --
-------------------------------
-- PROTECTED_DEFINITION ::=
-- {PROTECTED_OPERATION_DECLARATION}
-- [private
-- {PROTECTED_ELEMENT_DECLARATION}]
-- end [protected_IDENTIFIER]
-- N_Protected_Definition
-- Sloc points to first token of protected definition
-- Visible_Declarations (List2)
-- Private_Declarations (List3) (set to No_List if no private part)
-- End_Label (Node4)
------------------------------------------
-- 9.4 Protected Operation Declaration --
------------------------------------------
-- PROTECTED_OPERATION_DECLARATION ::=
-- SUBPROGRAM_DECLARATION
-- | ENTRY_DECLARATION
-- | REPRESENTATION_CLAUSE
----------------------------------------
-- 9.4 Protected Element Declaration --
----------------------------------------
-- PROTECTED_ELEMENT_DECLARATION ::=
-- PROTECTED_OPERATION_DECLARATION | COMPONENT_DECLARATION
-------------------------
-- 9.4 Protected Body --
-------------------------
-- PROTECTED_BODY ::=
-- protected body DEFINING_IDENTIFIER
-- [ASPECT_SPECIFICATIONS];
-- is
-- {PROTECTED_OPERATION_ITEM}
-- end [protected_IDENTIFIER];
-- Note: protected bodies are not allowed in Ada 83 mode
-- Gigi restriction: This node never appears
-- N_Protected_Body
-- Sloc points to PROTECTED
-- Defining_Identifier (Node1)
-- Declarations (List2) protected operation items (and pragmas)
-- End_Label (Node4)
-- Corresponding_Spec (Node5-Sem)
-- Was_Originally_Stub (Flag13-Sem)
-----------------------------------
-- 9.4 Protected Operation Item --
-----------------------------------
-- PROTECTED_OPERATION_ITEM ::=
-- SUBPROGRAM_DECLARATION
-- | SUBPROGRAM_BODY
-- | ENTRY_BODY
-- | REPRESENTATION_CLAUSE
------------------------------
-- 9.5.2 Entry Declaration --
------------------------------
-- ENTRY_DECLARATION ::=
-- [[not] overriding]
-- entry DEFINING_IDENTIFIER
-- [(DISCRETE_SUBTYPE_DEFINITION)] PARAMETER_PROFILE
-- [ASPECT_SPECIFICATIONS];
-- N_Entry_Declaration
-- Sloc points to ENTRY
-- Defining_Identifier (Node1)
-- Discrete_Subtype_Definition (Node4) (set to Empty if not present)
-- Parameter_Specifications (List3) (set to No_List if no formal part)
-- Corresponding_Body (Node5-Sem)
-- Must_Override (Flag14) set if overriding indicator present
-- Must_Not_Override (Flag15) set if not_overriding indicator present
-- Note: overriding indicator is an Ada 2005 feature
-----------------------------
-- 9.5.2 Accept statement --
-----------------------------
-- ACCEPT_STATEMENT ::=
-- accept entry_DIRECT_NAME
-- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
-- HANDLED_SEQUENCE_OF_STATEMENTS
-- end [entry_IDENTIFIER]];
-- Gigi restriction: This node never appears
-- Note: there are no explicit declarations allowed in an accept
-- statement. However, the implicit declarations for any statement
-- identifiers (labels and block/loop identifiers) are declarations
-- that belong logically to the accept statement, and that is why
-- there is a Declarations field in this node.
-- N_Accept_Statement
-- Sloc points to ACCEPT
-- Entry_Direct_Name (Node1)
-- Entry_Index (Node5) (set to Empty if not present)
-- Parameter_Specifications (List3) (set to No_List if no formal part)
-- Handled_Statement_Sequence (Node4)
-- Declarations (List2) (set to No_List if no declarations)
------------------------
-- 9.5.2 Entry Index --
------------------------
-- ENTRY_INDEX ::= EXPRESSION
-----------------------
-- 9.5.2 Entry Body --
-----------------------
-- ENTRY_BODY ::=
-- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
-- DECLARATIVE_PART
-- begin
-- HANDLED_SEQUENCE_OF_STATEMENTS
-- end [entry_IDENTIFIER];
-- ENTRY_BARRIER ::= when CONDITION
-- Note: we store the CONDITION of the ENTRY_BARRIER in the node for
-- the ENTRY_BODY_FORMAL_PART to avoid the N_Entry_Body node getting
-- too full (it would otherwise have too many fields)
-- Gigi restriction: This node never appears
-- N_Entry_Body
-- Sloc points to ENTRY
-- Defining_Identifier (Node1)
-- Entry_Body_Formal_Part (Node5)
-- Declarations (List2)
-- Handled_Statement_Sequence (Node4)
-- Activation_Chain_Entity (Node3-Sem)
-----------------------------------
-- 9.5.2 Entry Body Formal Part --
-----------------------------------
-- ENTRY_BODY_FORMAL_PART ::=
-- [(ENTRY_INDEX_SPECIFICATION)] PARAMETER_PROFILE
-- Note that an entry body formal part node is present even if it is
-- empty. This reflects the grammar, in which it is the components of
-- the entry body formal part that are optional, not the entry body
-- formal part itself. Also this means that the barrier condition
-- always has somewhere to be stored.
-- Gigi restriction: This node never appears
-- N_Entry_Body_Formal_Part
-- Sloc points to first token
-- Entry_Index_Specification (Node4) (set to Empty if not present)
-- Parameter_Specifications (List3) (set to No_List if no formal part)
-- Condition (Node1) from entry barrier of entry body
--------------------------
-- 9.5.2 Entry Barrier --
--------------------------
-- ENTRY_BARRIER ::= when CONDITION
--------------------------------------
-- 9.5.2 Entry Index Specification --
--------------------------------------
-- ENTRY_INDEX_SPECIFICATION ::=
-- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
-- Gigi restriction: This node never appears
-- N_Entry_Index_Specification
-- Sloc points to FOR
-- Defining_Identifier (Node1)
-- Discrete_Subtype_Definition (Node4)
---------------------------------
-- 9.5.3 Entry Call Statement --
---------------------------------
-- ENTRY_CALL_STATEMENT ::= entry_NAME [ACTUAL_PARAMETER_PART];
-- The parser may generate a procedure call for this construct. The
-- semantic pass must correct this misidentification where needed.
-- Gigi restriction: This node never appears
-- N_Entry_Call_Statement
-- Sloc points to first token of name
-- Name (Node2)
-- Parameter_Associations (List3) (set to No_List if no
-- actual parameter part)
-- First_Named_Actual (Node4-Sem)
------------------------------
-- 9.5.4 Requeue Statement --
------------------------------
-- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
-- Note: requeue statements are not permitted in Ada 83 mode
-- Gigi restriction: This node never appears
-- N_Requeue_Statement
-- Sloc points to REQUEUE
-- Name (Node2)
-- Abort_Present (Flag15)
--------------------------
-- 9.6 Delay Statement --
--------------------------
-- DELAY_STATEMENT ::=
-- DELAY_UNTIL_STATEMENT
-- | DELAY_RELATIVE_STATEMENT
--------------------------------
-- 9.6 Delay Until Statement --
--------------------------------
-- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
-- Note: delay until statements are not permitted in Ada 83 mode
-- Gigi restriction: This node never appears
-- N_Delay_Until_Statement
-- Sloc points to DELAY
-- Expression (Node3)
-----------------------------------
-- 9.6 Delay Relative Statement --
-----------------------------------
-- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
-- Gigi restriction: This node never appears
-- N_Delay_Relative_Statement
-- Sloc points to DELAY
-- Expression (Node3)
---------------------------
-- 9.7 Select Statement --
---------------------------
-- SELECT_STATEMENT ::=
-- SELECTIVE_ACCEPT
-- | TIMED_ENTRY_CALL
-- | CONDITIONAL_ENTRY_CALL
-- | ASYNCHRONOUS_SELECT
-----------------------------
-- 9.7.1 Selective Accept --
-----------------------------
-- SELECTIVE_ACCEPT ::=
-- select
-- [GUARD]
-- SELECT_ALTERNATIVE
-- {or
-- [GUARD]
-- SELECT_ALTERNATIVE}
-- [else
-- SEQUENCE_OF_STATEMENTS]
-- end select;
-- Gigi restriction: This node never appears
-- Note: the guard expression, if present, appears in the node for
-- the select alternative.
-- N_Selective_Accept
-- Sloc points to SELECT
-- Select_Alternatives (List1)
-- Else_Statements (List4) (set to No_List if no else part)
------------------
-- 9.7.1 Guard --
------------------
-- GUARD ::= when CONDITION =>
-- As noted above, the CONDITION that is part of a GUARD is included
-- in the node for the select alternative for convenience.
-------------------------------
-- 9.7.1 Select Alternative --
-------------------------------
-- SELECT_ALTERNATIVE ::=
-- ACCEPT_ALTERNATIVE
-- | DELAY_ALTERNATIVE
-- | TERMINATE_ALTERNATIVE
-------------------------------
-- 9.7.1 Accept Alternative --
-------------------------------
-- ACCEPT_ALTERNATIVE ::=
-- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
-- Gigi restriction: This node never appears
-- N_Accept_Alternative
-- Sloc points to ACCEPT
-- Accept_Statement (Node2)
-- Condition (Node1) from the guard (set to Empty if no guard present)
-- Statements (List3) (set to Empty_List if no statements)
-- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
-- Accept_Handler_Records (List5-Sem)
------------------------------
-- 9.7.1 Delay Alternative --
------------------------------
-- DELAY_ALTERNATIVE ::=
-- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
-- Gigi restriction: This node never appears
-- N_Delay_Alternative
-- Sloc points to DELAY
-- Delay_Statement (Node2)
-- Condition (Node1) from the guard (set to Empty if no guard present)
-- Statements (List3) (set to Empty_List if no statements)
-- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
----------------------------------
-- 9.7.1 Terminate Alternative --
----------------------------------
-- TERMINATE_ALTERNATIVE ::= terminate;
-- Gigi restriction: This node never appears
-- N_Terminate_Alternative
-- Sloc points to TERMINATE
-- Condition (Node1) from the guard (set to Empty if no guard present)
-- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
-- Pragmas_After (List5) pragmas after alt (set to No_List if none)
-----------------------------
-- 9.7.2 Timed Entry Call --
-----------------------------
-- TIMED_ENTRY_CALL ::=
-- select
-- ENTRY_CALL_ALTERNATIVE
-- or
-- DELAY_ALTERNATIVE
-- end select;
-- Gigi restriction: This node never appears
-- N_Timed_Entry_Call
-- Sloc points to SELECT
-- Entry_Call_Alternative (Node1)
-- Delay_Alternative (Node4)
-----------------------------------
-- 9.7.2 Entry Call Alternative --
-----------------------------------
-- ENTRY_CALL_ALTERNATIVE ::=
-- PROCEDURE_OR_ENTRY_CALL [SEQUENCE_OF_STATEMENTS]
-- PROCEDURE_OR_ENTRY_CALL ::=
-- PROCEDURE_CALL_STATEMENT | ENTRY_CALL_STATEMENT
-- Gigi restriction: This node never appears
-- N_Entry_Call_Alternative
-- Sloc points to first token of entry call statement
-- Entry_Call_Statement (Node1)
-- Statements (List3) (set to Empty_List if no statements)
-- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
-----------------------------------
-- 9.7.3 Conditional Entry Call --
-----------------------------------
-- CONDITIONAL_ENTRY_CALL ::=
-- select
-- ENTRY_CALL_ALTERNATIVE
-- else
-- SEQUENCE_OF_STATEMENTS
-- end select;
-- Gigi restriction: This node never appears
-- N_Conditional_Entry_Call
-- Sloc points to SELECT
-- Entry_Call_Alternative (Node1)
-- Else_Statements (List4)
--------------------------------
-- 9.7.4 Asynchronous Select --
--------------------------------
-- ASYNCHRONOUS_SELECT ::=
-- select
-- TRIGGERING_ALTERNATIVE
-- then abort
-- ABORTABLE_PART
-- end select;
-- Note: asynchronous select is not permitted in Ada 83 mode
-- Gigi restriction: This node never appears
-- N_Asynchronous_Select
-- Sloc points to SELECT
-- Triggering_Alternative (Node1)
-- Abortable_Part (Node2)
-----------------------------------
-- 9.7.4 Triggering Alternative --
-----------------------------------
-- TRIGGERING_ALTERNATIVE ::=
-- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
-- Gigi restriction: This node never appears
-- N_Triggering_Alternative
-- Sloc points to first token of triggering statement
-- Triggering_Statement (Node1)
-- Statements (List3) (set to Empty_List if no statements)
-- Pragmas_Before (List4) pragmas before alt (set to No_List if none)
---------------------------------
-- 9.7.4 Triggering Statement --
---------------------------------
-- TRIGGERING_STATEMENT ::= PROCEDURE_OR_ENTRY_CALL | DELAY_STATEMENT
---------------------------
-- 9.7.4 Abortable Part --
---------------------------
-- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
-- Gigi restriction: This node never appears
-- N_Abortable_Part
-- Sloc points to ABORT
-- Statements (List3)
--------------------------
-- 9.8 Abort Statement --
--------------------------
-- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
-- Gigi restriction: This node never appears
-- N_Abort_Statement
-- Sloc points to ABORT
-- Names (List2)
-------------------------
-- 10.1.1 Compilation --
-------------------------
-- COMPILATION ::= {COMPILATION_UNIT}
-- There is no explicit node in the tree for a compilation, since in
-- general the compiler is processing only a single compilation unit
-- at a time. It is possible to parse multiple units in syntax check
-- only mode, but the trees are discarded in that case.
------------------------------
-- 10.1.1 Compilation Unit --
------------------------------
-- COMPILATION_UNIT ::=
-- CONTEXT_CLAUSE LIBRARY_ITEM
-- | CONTEXT_CLAUSE SUBUNIT
-- The N_Compilation_Unit node itself represents the above syntax.
-- However, there are two additional items not reflected in the above
-- syntax. First we have the global declarations that are added by the
-- code generator. These are outer level declarations (so they cannot
-- be represented as being inside the units). An example is the wrapper
-- subprograms that are created to do ABE checking. As always a list of
-- declarations can contain actions as well (i.e. statements), and such
-- statements are executed as part of the elaboration of the unit. Note
-- that all such declarations are elaborated before the library unit.
-- Similarly, certain actions need to be elaborated at the completion
-- of elaboration of the library unit (notably the statement that sets
-- the Boolean flag indicating that elaboration is complete).
-- The third item not reflected in the syntax is pragmas that appear
-- after the compilation unit. As always pragmas are a problem since
-- they are not part of the formal syntax, but can be stuck into the
-- source following a set of ad hoc rules, and we have to find an ad
-- hoc way of sticking them into the tree. For pragmas that appear
-- before the library unit, we just consider them to be part of the
-- context clause, and pragmas can appear in the Context_Items list
-- of the compilation unit. However, pragmas can also appear after
-- the library item.
-- To deal with all these problems, we create an auxiliary node for
-- a compilation unit, referenced from the N_Compilation_Unit node,
-- that contains these items.
-- N_Compilation_Unit
-- Sloc points to first token of defining unit name
-- Library_Unit (Node4-Sem) corresponding/parent spec/body
-- Context_Items (List1) context items and pragmas preceding unit
-- Private_Present (Flag15) set if library unit has private keyword
-- Unit (Node2) library item or subunit
-- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
-- Has_No_Elaboration_Code (Flag17-Sem)
-- Body_Required (Flag13-Sem) set for spec if body is required
-- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
-- Context_Pending (Flag16-Sem)
-- First_Inlined_Subprogram (Node3-Sem)
-- Has_Pragma_Suppress_All (Flag14-Sem)
-- N_Compilation_Unit_Aux
-- Sloc is a copy of the Sloc from the N_Compilation_Unit node
-- Declarations (List2) (set to No_List if no global declarations)
-- Actions (List1) (set to No_List if no actions)
-- Pragmas_After (List5) pragmas after unit (set to No_List if none)
-- Config_Pragmas (List4) config pragmas (set to Empty_List if none)
-- Default_Storage_Pool (Node3-Sem)
--------------------------
-- 10.1.1 Library Item --
--------------------------
-- LIBRARY_ITEM ::=
-- [private] LIBRARY_UNIT_DECLARATION
-- | LIBRARY_UNIT_BODY
-- | [private] LIBRARY_UNIT_RENAMING_DECLARATION
-- Note: PRIVATE is not allowed in Ada 83 mode
-- There is no explicit node in the tree for library item, instead
-- the declaration or body, and the flag for private if present,
-- appear in the N_Compilation_Unit node.
--------------------------------------
-- 10.1.1 Library Unit Declaration --
--------------------------------------
-- LIBRARY_UNIT_DECLARATION ::=
-- SUBPROGRAM_DECLARATION | PACKAGE_DECLARATION
-- | GENERIC_DECLARATION | GENERIC_INSTANTIATION
-----------------------------------------------
-- 10.1.1 Library Unit Renaming Declaration --
-----------------------------------------------
-- LIBRARY_UNIT_RENAMING_DECLARATION ::=
-- PACKAGE_RENAMING_DECLARATION
-- | GENERIC_RENAMING_DECLARATION
-- | SUBPROGRAM_RENAMING_DECLARATION
-------------------------------
-- 10.1.1 Library unit body --
-------------------------------
-- LIBRARY_UNIT_BODY ::= SUBPROGRAM_BODY | PACKAGE_BODY
------------------------------
-- 10.1.1 Parent Unit Name --
------------------------------
-- PARENT_UNIT_NAME ::= NAME
----------------------------
-- 10.1.2 Context clause --
----------------------------
-- CONTEXT_CLAUSE ::= {CONTEXT_ITEM}
-- The context clause can include pragmas, and any pragmas that appear
-- before the context clause proper (i.e. all configuration pragmas,
-- also appear at the front of this list).
--------------------------
-- 10.1.2 Context_Item --
--------------------------
-- CONTEXT_ITEM ::= WITH_CLAUSE | USE_CLAUSE | WITH_TYPE_CLAUSE
-------------------------
-- 10.1.2 With clause --
-------------------------
-- WITH_CLAUSE ::=
-- with library_unit_NAME {,library_unit_NAME};
-- A separate With clause is built for each name, so that we have
-- a Corresponding_Spec field for each with'ed spec. The flags
-- First_Name and Last_Name are used to reconstruct the exact
-- source form. When a list of names appears in one with clause,
-- the first name in the list has First_Name set, and the last
-- has Last_Name set. If the with clause has only one name, then
-- both of the flags First_Name and Last_Name are set in this name.
-- Note: in the case of implicit with's that are installed by the
-- Rtsfind routine, Implicit_With is set, and the Sloc is typically
-- set to Standard_Location, but it is incorrect to test the Sloc
-- to find out if a with clause is implicit, test the flag instead.
-- N_With_Clause
-- Sloc points to first token of library unit name
-- Withed_Body (Node1-Sem)
-- Name (Node2)
-- Next_Implicit_With (Node3-Sem)
-- Library_Unit (Node4-Sem)
-- Corresponding_Spec (Node5-Sem)
-- First_Name (Flag5) (set to True if first name or only one name)
-- Last_Name (Flag6) (set to True if last name or only one name)
-- Context_Installed (Flag13-Sem)
-- Elaborate_Present (Flag4-Sem)
-- Elaborate_All_Present (Flag14-Sem)
-- Elaborate_All_Desirable (Flag9-Sem)
-- Elaborate_Desirable (Flag11-Sem)
-- Private_Present (Flag15) set if with_clause has private keyword
-- Implicit_With (Flag16-Sem)
-- Implicit_With_From_Instantiation (Flag12-Sem)
-- Limited_Present (Flag17) set if LIMITED is present
-- Limited_View_Installed (Flag18-Sem)
-- Unreferenced_In_Spec (Flag7-Sem)
-- No_Entities_Ref_In_Spec (Flag8-Sem)
-- Note: Limited_Present and Limited_View_Installed are used to support
-- the implementation of Ada 2005 (AI-50217).
-- Similarly, Private_Present is used to support the implementation of
-- Ada 2005 (AI-50262).
-- Note: if the WITH clause refers to a standard library unit, then a
-- limited with clause is changed into a normal with clause, because we
-- are not prepared to deal with limited with in the context of Rtsfind.
-- So in this case, the Limited_Present flag will be False in the final
-- tree. However, we do NOT do this transformation in ASIS mode, so for
-- ASIS the flag will remain set in this situation.
----------------------
-- With_Type clause --
----------------------
-- This is a GNAT extension, used to implement mutually recursive
-- types declared in different packages.
-- Note: this is now obsolete. The functionality of this construct
-- is now implemented by the Ada 2005 limited_with_clause.
---------------------
-- 10.2 Body stub --
---------------------
-- BODY_STUB ::=
-- SUBPROGRAM_BODY_STUB
-- | PACKAGE_BODY_STUB
-- | TASK_BODY_STUB
-- | PROTECTED_BODY_STUB
----------------------------------
-- 10.1.3 Subprogram Body Stub --
----------------------------------
-- SUBPROGRAM_BODY_STUB ::=
-- SUBPROGRAM_SPECIFICATION is separate
-- [ASPECT_SPECIFICATION];
-- N_Subprogram_Body_Stub
-- Sloc points to FUNCTION or PROCEDURE
-- Specification (Node1)
-- Corresponding_Spec_Of_Stub (Node2-Sem)
-- Library_Unit (Node4-Sem) points to the subunit
-- Corresponding_Body (Node5-Sem)
-------------------------------
-- 10.1.3 Package Body Stub --
-------------------------------
-- PACKAGE_BODY_STUB ::=
-- package body DEFINING_IDENTIFIER is separate
-- [ASPECT_SPECIFICATION];
-- N_Package_Body_Stub
-- Sloc points to PACKAGE
-- Defining_Identifier (Node1)
-- Corresponding_Spec_Of_Stub (Node2-Sem)
-- Library_Unit (Node4-Sem) points to the subunit
-- Corresponding_Body (Node5-Sem)
----------------------------
-- 10.1.3 Task Body Stub --
----------------------------
-- TASK_BODY_STUB ::=
-- task body DEFINING_IDENTIFIER is separate
-- [ASPECT_SPECIFICATION];
-- N_Task_Body_Stub
-- Sloc points to TASK
-- Defining_Identifier (Node1)
-- Corresponding_Spec_Of_Stub (Node2-Sem)
-- Library_Unit (Node4-Sem) points to the subunit
-- Corresponding_Body (Node5-Sem)
---------------------------------
-- 10.1.3 Protected Body Stub --
---------------------------------
-- PROTECTED_BODY_STUB ::=
-- protected body DEFINING_IDENTIFIER is separate
-- [ASPECT_SPECIFICATION];
-- Note: protected body stubs are not allowed in Ada 83 mode
-- N_Protected_Body_Stub
-- Sloc points to PROTECTED
-- Defining_Identifier (Node1)
-- Corresponding_Spec_Of_Stub (Node2-Sem)
-- Library_Unit (Node4-Sem) points to the subunit
-- Corresponding_Body (Node5-Sem)
---------------------
-- 10.1.3 Subunit --
---------------------
-- SUBUNIT ::= separate (PARENT_UNIT_NAME) PROPER_BODY
-- N_Subunit
-- Sloc points to SEPARATE
-- Name (Node2) is the name of the parent unit
-- Proper_Body (Node1) is the subunit body
-- Corresponding_Stub (Node3-Sem) is the stub declaration for the unit.
---------------------------------
-- 11.1 Exception Declaration --
---------------------------------
-- EXCEPTION_DECLARATION ::= DEFINING_IDENTIFIER_LIST : exception
-- [ASPECT_SPECIFICATIONS];
-- For consistency with object declarations etc., the parser converts
-- the case of multiple identifiers being declared to a series of
-- declarations in which the expression is copied, using the More_Ids
-- and Prev_Ids flags to remember the source form as described in the
-- section on "Handling of Defining Identifier Lists".
-- N_Exception_Declaration
-- Sloc points to EXCEPTION
-- Defining_Identifier (Node1)
-- Expression (Node3-Sem)
-- Renaming_Exception (Node2-Sem)
-- More_Ids (Flag5) (set to False if no more identifiers in list)
-- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
------------------------------------------
-- 11.2 Handled Sequence Of Statements --
------------------------------------------
-- HANDLED_SEQUENCE_OF_STATEMENTS ::=
-- SEQUENCE_OF_STATEMENTS
-- [exception
-- EXCEPTION_HANDLER
-- {EXCEPTION_HANDLER}]
-- [at end
-- cleanup_procedure_call (param, param, param, ...);]
-- The AT END phrase is a GNAT extension to provide for cleanups. It is
-- used only internally currently, but is considered to be syntactic.
-- At the moment, the only cleanup action allowed is a single call to
-- a parameterless procedure, and the Identifier field of the node is
-- the procedure to be called. The cleanup action occurs whenever the
-- sequence of statements is left for any reason. The possible reasons
-- are:
-- 1. reaching the end of the sequence
-- 2. exit, return, or goto
-- 3. exception or abort
-- For some back ends, such as gcc with ZCX, "at end" is implemented
-- entirely in the back end. In this case, a handled sequence of
-- statements with an "at end" cannot also have exception handlers.
-- For other back ends, such as gcc with front-end SJLJ, the
-- implementation is split between the front end and back end; the front
-- end implements 3, and the back end implements 1 and 2. In this case,
-- if there is an "at end", the front end inserts the appropriate
-- exception handler, and this handler takes precedence over "at end"
-- in case of exception.
-- The inserted exception handler is of the form:
-- when all others =>
-- cleanup;
-- raise;
-- where cleanup is the procedure to be called. The reason we do this is
-- so that the front end can handle the necessary entries in the
-- exception tables, and other exception handler actions required as
-- part of the normal handling for exception handlers.
-- The AT END cleanup handler protects only the sequence of statements
-- (not the associated declarations of the parent), just like exception
-- handlers. The big difference is that the cleanup procedure is called
-- on either a normal or an abnormal exit from the statement sequence.
-- Note: the list of Exception_Handlers can contain pragmas as well
-- as actual handlers. In practice these pragmas can only occur at
-- the start of the list, since any pragmas occurring later on will
-- be included in the statement list of the corresponding handler.
-- Note: although in the Ada syntax, the sequence of statements in
-- a handled sequence of statements can only contain statements, we
-- allow free mixing of declarations and statements in the resulting
-- expanded tree. This is for example used to deal with the case of
-- a cleanup procedure that must handle declarations as well as the
-- statements of a block.
-- Note: the cleanup_procedure_call does not go through the common
-- processing for calls, which in particular means that it will not be
-- automatically inlined in all cases, even though the procedure to be
-- called is marked inline. More specifically, if the procedure comes
-- from another unit than the main source unit, for example a run-time
-- unit, then it needs to be manually added to the list of bodies to be
-- inlined by invoking Add_Inlined_Body on it.
-- N_Handled_Sequence_Of_Statements
-- Sloc points to first token of first statement
-- Statements (List3)
-- End_Label (Node4) (set to Empty if expander generated)
-- Exception_Handlers (List5) (set to No_List if none present)
-- At_End_Proc (Node1) (set to Empty if no clean up procedure)
-- First_Real_Statement (Node2-Sem)
-- Note: the parent always contains a Declarations field which contains
-- declarations associated with the handled sequence of statements. This
-- is true even in the case of an accept statement (see description of
-- the N_Accept_Statement node).
-- End_Label refers to the containing construct
-----------------------------
-- 11.2 Exception Handler --
-----------------------------
-- EXCEPTION_HANDLER ::=
-- when [CHOICE_PARAMETER_SPECIFICATION :]
-- EXCEPTION_CHOICE {| EXCEPTION_CHOICE} =>
-- SEQUENCE_OF_STATEMENTS
-- Note: choice parameter specification is not allowed in Ada 83 mode
-- N_Exception_Handler
-- Sloc points to WHEN
-- Choice_Parameter (Node2) (set to Empty if not present)
-- Exception_Choices (List4)
-- Statements (List3)
-- Exception_Label (Node5-Sem) (set to Empty of not present)
-- Local_Raise_Statements (Elist1-Sem) (set to No_Elist if not present)
-- Local_Raise_Not_OK (Flag7-Sem)
-- Has_Local_Raise (Flag8-Sem)
------------------------------------------
-- 11.2 Choice parameter specification --
------------------------------------------
-- CHOICE_PARAMETER_SPECIFICATION ::= DEFINING_IDENTIFIER
----------------------------
-- 11.2 Exception Choice --
----------------------------
-- EXCEPTION_CHOICE ::= exception_NAME | others
-- Except in the case of OTHERS, no explicit node appears in the tree
-- for exception choice. Instead the exception name appears directly.
-- An OTHERS choice is represented by a N_Others_Choice node (see
-- section 3.8.1.
-- Note: for the exception choice created for an at end handler, the
-- exception choice is an N_Others_Choice node with All_Others set.
---------------------------
-- 11.3 Raise Statement --
---------------------------
-- RAISE_STATEMENT ::= raise [exception_NAME];
-- In Ada 2005, we have
-- RAISE_STATEMENT ::=
-- raise; | raise exception_NAME [with string_EXPRESSION];
-- N_Raise_Statement
-- Sloc points to RAISE
-- Name (Node2) (set to Empty if no exception name present)
-- Expression (Node3) (set to Empty if no expression present)
-- From_At_End (Flag4-Sem)
----------------------------
-- 11.3 Raise Expression --
----------------------------
-- RAISE_EXPRESSION ::= raise exception_NAME [with string_EXPRESSION]
-- N_Raise_Expression
-- Sloc points to RAISE
-- Name (Node2) (always present)
-- Expression (Node3) (set to Empty if no expression present)
-- Convert_To_Return_False (Flag13-Sem)
-- plus fields for expression
-------------------------------
-- 12.1 Generic Declaration --
-------------------------------
-- GENERIC_DECLARATION ::=
-- GENERIC_SUBPROGRAM_DECLARATION | GENERIC_PACKAGE_DECLARATION
------------------------------------------
-- 12.1 Generic Subprogram Declaration --
------------------------------------------
-- GENERIC_SUBPROGRAM_DECLARATION ::=
-- GENERIC_FORMAL_PART SUBPROGRAM_SPECIFICATION
-- [ASPECT_SPECIFICATIONS];
-- Note: Generic_Formal_Declarations can include pragmas
-- N_Generic_Subprogram_Declaration
-- Sloc points to GENERIC
-- Specification (Node1) subprogram specification
-- Corresponding_Body (Node5-Sem)
-- Generic_Formal_Declarations (List2) from generic formal part
-- Parent_Spec (Node4-Sem)
---------------------------------------
-- 12.1 Generic Package Declaration --
---------------------------------------
-- GENERIC_PACKAGE_DECLARATION ::=
-- GENERIC_FORMAL_PART PACKAGE_SPECIFICATION
-- [ASPECT_SPECIFICATIONS];
-- Note: when we do generics right, the Activation_Chain_Entity entry
-- for this node can be removed (since the expander won't see generic
-- units any more)???.
-- Note: Generic_Formal_Declarations can include pragmas
-- N_Generic_Package_Declaration
-- Sloc points to GENERIC
-- Specification (Node1) package specification
-- Corresponding_Body (Node5-Sem)
-- Generic_Formal_Declarations (List2) from generic formal part
-- Parent_Spec (Node4-Sem)
-- Activation_Chain_Entity (Node3-Sem)
-------------------------------
-- 12.1 Generic Formal Part --
-------------------------------
-- GENERIC_FORMAL_PART ::=
-- generic {GENERIC_FORMAL_PARAMETER_DECLARATION | USE_CLAUSE}
------------------------------------------------
-- 12.1 Generic Formal Parameter Declaration --
------------------------------------------------
-- GENERIC_FORMAL_PARAMETER_DECLARATION ::=
-- FORMAL_OBJECT_DECLARATION
-- | FORMAL_TYPE_DECLARATION
-- | FORMAL_SUBPROGRAM_DECLARATION
-- | FORMAL_PACKAGE_DECLARATION
---------------------------------
-- 12.3 Generic Instantiation --
---------------------------------
-- GENERIC_INSTANTIATION ::=
-- package DEFINING_PROGRAM_UNIT_NAME is
-- new generic_package_NAME [GENERIC_ACTUAL_PART]
-- [ASPECT_SPECIFICATIONS];
-- | [[not] overriding]
-- procedure DEFINING_PROGRAM_UNIT_NAME is
-- new generic_procedure_NAME [GENERIC_ACTUAL_PART]
-- [ASPECT_SPECIFICATIONS];
-- | [[not] overriding]
-- function DEFINING_DESIGNATOR is
-- new generic_function_NAME [GENERIC_ACTUAL_PART]
-- [ASPECT_SPECIFICATIONS];
-- N_Package_Instantiation
-- Sloc points to PACKAGE
-- Defining_Unit_Name (Node1)
-- Name (Node2)
-- Generic_Associations (List3) (set to No_List if no
-- generic actual part)
-- Parent_Spec (Node4-Sem)
-- Instance_Spec (Node5-Sem)
-- ABE_Is_Certain (Flag18-Sem)
-- N_Procedure_Instantiation
-- Sloc points to PROCEDURE
-- Defining_Unit_Name (Node1)
-- Name (Node2)
-- Parent_Spec (Node4-Sem)
-- Generic_Associations (List3) (set to No_List if no
-- generic actual part)
-- Instance_Spec (Node5-Sem)
-- Must_Override (Flag14) set if overriding indicator present
-- Must_Not_Override (Flag15) set if not_overriding indicator present
-- ABE_Is_Certain (Flag18-Sem)
-- N_Function_Instantiation
-- Sloc points to FUNCTION
-- Defining_Unit_Name (Node1)
-- Name (Node2)
-- Generic_Associations (List3) (set to No_List if no
-- generic actual part)
-- Parent_Spec (Node4-Sem)
-- Instance_Spec (Node5-Sem)
-- Must_Override (Flag14) set if overriding indicator present
-- Must_Not_Override (Flag15) set if not_overriding indicator present
-- ABE_Is_Certain (Flag18-Sem)
-- Note: overriding indicator is an Ada 2005 feature
-------------------------------
-- 12.3 Generic Actual Part --
-------------------------------
-- GENERIC_ACTUAL_PART ::=
-- (GENERIC_ASSOCIATION {, GENERIC_ASSOCIATION})
-------------------------------
-- 12.3 Generic Association --
-------------------------------
-- GENERIC_ASSOCIATION ::=
-- [generic_formal_parameter_SELECTOR_NAME =>]
-- Note: unlike the procedure call case, a generic association node
-- is generated for every association, even if no formal parameter
-- selector name is present. In this case the parser will leave the
-- Selector_Name field set to Empty, to be filled in later by the
-- semantic pass.
-- In Ada 2005, a formal may be associated with a box, if the
-- association is part of the list of actuals for a formal package.
-- If the association is given by OTHERS => <>, the association is
-- an N_Others_Choice.
-- N_Generic_Association
-- Sloc points to first token of generic association
-- Selector_Name (Node2) (set to Empty if no formal
-- parameter selector name)
-- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present)
-- Box_Present (Flag15) (for formal_package associations with a box)
---------------------------------------------
-- 12.3 Explicit Generic Actual Parameter --
---------------------------------------------
-- EXPLICIT_GENERIC_ACTUAL_PARAMETER ::=
-- EXPRESSION | variable_NAME | subprogram_NAME
-- | entry_NAME | SUBTYPE_MARK | package_instance_NAME
-------------------------------------
-- 12.4 Formal Object Declaration --
-------------------------------------
-- FORMAL_OBJECT_DECLARATION ::=
-- DEFINING_IDENTIFIER_LIST :
-- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]
-- [ASPECT_SPECIFICATIONS];
-- | DEFINING_IDENTIFIER_LIST :
-- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]
-- [ASPECT_SPECIFICATIONS];
-- Although the syntax allows multiple identifiers in the list, the
-- semantics is as though successive declarations were given with
-- identical type definition and expression components. To simplify
-- semantic processing, the parser represents a multiple declaration
-- case as a sequence of single declarations, using the More_Ids and
-- Prev_Ids flags to preserve the original source form as described
-- in the section on "Handling of Defining Identifier Lists".
-- N_Formal_Object_Declaration
-- Sloc points to first identifier
-- Defining_Identifier (Node1)
-- In_Present (Flag15)
-- Out_Present (Flag17)
-- Null_Exclusion_Present (Flag11) (set to False if not present)
-- Subtype_Mark (Node4) (set to Empty if not present)
-- Access_Definition (Node3) (set to Empty if not present)
-- Default_Expression (Node5) (set to Empty if no default expression)
-- More_Ids (Flag5) (set to False if no more identifiers in list)
-- Prev_Ids (Flag6) (set to False if no previous identifiers in list)
-----------------------------------
-- 12.5 Formal Type Declaration --
-----------------------------------
-- FORMAL_TYPE_DECLARATION ::=
-- type DEFINING_IDENTIFIER [DISCRIMINANT_PART]
-- is FORMAL_TYPE_DEFINITION
-- [ASPECT_SPECIFICATIONS];
-- | type DEFINING_IDENTIFIER [DISCRIMINANT_PART] [is tagged]
-- N_Formal_Type_Declaration
-- Sloc points to TYPE
-- Defining_Identifier (Node1)
-- Formal_Type_Definition (Node3)
-- Discriminant_Specifications (List4) (set to No_List if no
-- discriminant part)
-- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant
----------------------------------
-- 12.5 Formal type definition --
----------------------------------
-- FORMAL_TYPE_DEFINITION ::=
-- FORMAL_PRIVATE_TYPE_DEFINITION
-- | FORMAL_DERIVED_TYPE_DEFINITION
-- | FORMAL_DISCRETE_TYPE_DEFINITION
-- | FORMAL_SIGNED_INTEGER_TYPE_DEFINITION
-- | FORMAL_MODULAR_TYPE_DEFINITION
-- | FORMAL_FLOATING_POINT_DEFINITION
-- | FORMAL_ORDINARY_FIXED_POINT_DEFINITION
-- | FORMAL_DECIMAL_FIXED_POINT_DEFINITION
-- | FORMAL_ARRAY_TYPE_DEFINITION
-- | FORMAL_ACCESS_TYPE_DEFINITION
-- | FORMAL_INTERFACE_TYPE_DEFINITION
-- | FORMAL_INCOMPLETE_TYPE_DEFINITION
-- The Ada 2012 syntax introduces two new non-terminals:
-- Formal_{Complete,Incomplete}_Type_Declaration just to introduce
-- the latter category. Here we introduce an incomplete type definition
-- in order to preserve as much as possible the existing structure.
---------------------------------------------
-- 12.5.1 Formal Private Type Definition --
---------------------------------------------
-- FORMAL_PRIVATE_TYPE_DEFINITION ::=
-- [[abstract] tagged] [limited] private
-- Note: TAGGED is not allowed in Ada 83 mode
-- N_Formal_Private_Type_Definition
-- Sloc points to PRIVATE
-- Uninitialized_Variable (Node3-Sem)
-- Abstract_Present (Flag4)
-- Tagged_Present (Flag15)
-- Limited_Present (Flag17)
--------------------------------------------
-- 12.5.1 Formal Derived Type Definition --
--------------------------------------------
-- FORMAL_DERIVED_TYPE_DEFINITION ::=
-- [abstract] [limited | synchronized]
-- new SUBTYPE_MARK [[and INTERFACE_LIST] with private]
-- Note: this construct is not allowed in Ada 83 mode
-- N_Formal_Derived_Type_Definition
-- Sloc points to NEW
-- Subtype_Mark (Node4)
-- Private_Present (Flag15)
-- Abstract_Present (Flag4)
-- Limited_Present (Flag17)
-- Synchronized_Present (Flag7)
-- Interface_List (List2) (set to No_List if none)
-----------------------------------------------
-- 12.5.1 Formal Incomplete Type Definition --
-----------------------------------------------
-- FORMAL_INCOMPLETE_TYPE_DEFINITION ::= [tagged]
-- N_Formal_Incomplete_Type_Definition
-- Sloc points to identifier of parent
-- Tagged_Present (Flag15)
---------------------------------------------
-- 12.5.2 Formal Discrete Type Definition --
---------------------------------------------
-- FORMAL_DISCRETE_TYPE_DEFINITION ::= (<>)
-- N_Formal_Discrete_Type_Definition
-- Sloc points to (
---------------------------------------------------
-- 12.5.2 Formal Signed Integer Type Definition --
---------------------------------------------------
-- FORMAL_SIGNED_INTEGER_TYPE_DEFINITION ::= range <>
-- N_Formal_Signed_Integer_Type_Definition
-- Sloc points to RANGE
--------------------------------------------
-- 12.5.2 Formal Modular Type Definition --
--------------------------------------------
-- FORMAL_MODULAR_TYPE_DEFINITION ::= mod <>
-- N_Formal_Modular_Type_Definition
-- Sloc points to MOD
----------------------------------------------
-- 12.5.2 Formal Floating Point Definition --
----------------------------------------------
-- FORMAL_FLOATING_POINT_DEFINITION ::= digits <>
-- N_Formal_Floating_Point_Definition
-- Sloc points to DIGITS
----------------------------------------------------
-- 12.5.2 Formal Ordinary Fixed Point Definition --
----------------------------------------------------
-- FORMAL_ORDINARY_FIXED_POINT_DEFINITION ::= delta <>
-- N_Formal_Ordinary_Fixed_Point_Definition
-- Sloc points to DELTA
---------------------------------------------------
-- 12.5.2 Formal Decimal Fixed Point Definition --
---------------------------------------------------
-- FORMAL_DECIMAL_FIXED_POINT_DEFINITION ::= delta <> digits <>
-- Note: formal decimal fixed point definition not allowed in Ada 83
-- N_Formal_Decimal_Fixed_Point_Definition
-- Sloc points to DELTA
------------------------------------------
-- 12.5.3 Formal Array Type Definition --
------------------------------------------
-- FORMAL_ARRAY_TYPE_DEFINITION ::= ARRAY_TYPE_DEFINITION
-------------------------------------------
-- 12.5.4 Formal Access Type Definition --
-------------------------------------------
-- FORMAL_ACCESS_TYPE_DEFINITION ::= ACCESS_TYPE_DEFINITION
----------------------------------------------
-- 12.5.5 Formal Interface Type Definition --
----------------------------------------------
-- FORMAL_INTERFACE_TYPE_DEFINITION ::= INTERFACE_TYPE_DEFINITION
-----------------------------------------
-- 12.6 Formal Subprogram Declaration --
-----------------------------------------
-- FORMAL_SUBPROGRAM_DECLARATION ::=
-- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION
-- | FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION
--------------------------------------------------
-- 12.6 Formal Concrete Subprogram Declaration --
--------------------------------------------------
-- FORMAL_CONCRETE_SUBPROGRAM_DECLARATION ::=
-- with SUBPROGRAM_SPECIFICATION [is SUBPROGRAM_DEFAULT]
-- [ASPECT_SPECIFICATIONS];
-- N_Formal_Concrete_Subprogram_Declaration
-- Sloc points to WITH
-- Specification (Node1)
-- Default_Name (Node2) (set to Empty if no subprogram default)
-- Box_Present (Flag15)
-- Note: if no subprogram default is present, then Name is set
-- to Empty, and Box_Present is False.
--------------------------------------------------
-- 12.6 Formal Abstract Subprogram Declaration --
--------------------------------------------------
-- FORMAL_ABSTRACT_SUBPROGRAM_DECLARATION ::=
-- with SUBPROGRAM_SPECIFICATION is abstract [SUBPROGRAM_DEFAULT]
-- [ASPECT_SPECIFICATIONS];
-- N_Formal_Abstract_Subprogram_Declaration
-- Sloc points to WITH
-- Specification (Node1)
-- Default_Name (Node2) (set to Empty if no subprogram default)
-- Box_Present (Flag15)
-- Note: if no subprogram default is present, then Name is set
-- to Empty, and Box_Present is False.
------------------------------
-- 12.6 Subprogram Default --
------------------------------
-- SUBPROGRAM_DEFAULT ::= DEFAULT_NAME | <>
-- There is no separate node in the tree for a subprogram default.
-- Instead the parent (N_Formal_Concrete_Subprogram_Declaration
-- or N_Formal_Abstract_Subprogram_Declaration) node contains the
-- default name or box indication, as needed.
------------------------
-- 12.6 Default Name --
------------------------
-- DEFAULT_NAME ::= NAME
--------------------------------------
-- 12.7 Formal Package Declaration --
--------------------------------------
-- FORMAL_PACKAGE_DECLARATION ::=
-- with package DEFINING_IDENTIFIER
-- is new generic_package_NAME FORMAL_PACKAGE_ACTUAL_PART
-- [ASPECT_SPECIFICATIONS];
-- Note: formal package declarations not allowed in Ada 83 mode
-- N_Formal_Package_Declaration
-- Sloc points to WITH
-- Defining_Identifier (Node1)
-- Name (Node2)
-- Generic_Associations (List3) (set to No_List if (<>) case or
-- empty generic actual part)
-- Box_Present (Flag15)
-- Instance_Spec (Node5-Sem)
-- ABE_Is_Certain (Flag18-Sem)
--------------------------------------
-- 12.7 Formal Package Actual Part --
--------------------------------------
-- FORMAL_PACKAGE_ACTUAL_PART ::=
-- ([OTHERS] => <>)
-- | [GENERIC_ACTUAL_PART]
-- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION}
-- FORMAL_PACKAGE_ASSOCIATION ::=
-- GENERIC_ASSOCIATION
-- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <>
-- There is no explicit node in the tree for a formal package actual
-- part. Instead the information appears in the parent node (i.e. the
-- formal package declaration node itself).
-- There is no explicit node for a formal package association. All of
-- them are represented either by a generic association, possibly with
-- Box_Present, or by an N_Others_Choice.
---------------------------------
-- 13.1 Representation clause --
---------------------------------
-- REPRESENTATION_CLAUSE ::=
-- ATTRIBUTE_DEFINITION_CLAUSE
-- | ENUMERATION_REPRESENTATION_CLAUSE
-- | RECORD_REPRESENTATION_CLAUSE
-- | AT_CLAUSE
----------------------
-- 13.1 Local Name --
----------------------
-- LOCAL_NAME :=
-- DIRECT_NAME
-- | DIRECT_NAME'ATTRIBUTE_DESIGNATOR
-- | library_unit_NAME
-- The construct DIRECT_NAME'ATTRIBUTE_DESIGNATOR appears in the tree
-- as an attribute reference, which has essentially the same form.
---------------------------------------
-- 13.3 Attribute definition clause --
---------------------------------------
-- ATTRIBUTE_DEFINITION_CLAUSE ::=
-- for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use EXPRESSION;
-- | for LOCAL_NAME'ATTRIBUTE_DESIGNATOR use NAME;
-- In Ada 83, the expression must be a simple expression and the
-- local name must be a direct name.
-- Note: the only attribute definition clause that is processed by
-- gigi is an address clause. For all other cases, the information
-- is extracted by the front end and either results in setting entity
-- information, e.g. Esize for the Size clause, or in appropriate
-- expansion actions (e.g. in the case of Storage_Size).
-- For an address clause, Gigi constructs the appropriate addressing
-- code. It also ensures that no aliasing optimizations are made
-- for the object for which the address clause appears.
-- Note: for an address clause used to achieve an overlay:
-- A : Integer;
-- B : Integer;
-- for B'Address use A'Address;
-- the above rule means that Gigi will ensure that no optimizations
-- will be made for B that would violate the implementation advice
-- of RM 13.3(19). However, this advice applies only to B and not
-- to A, which seems unfortunate. The GNAT front end will mark the
-- object A as volatile to also prevent unwanted optimization
-- assumptions based on no aliasing being made for B.
-- N_Attribute_Definition_Clause
-- Sloc points to FOR
-- Name (Node2) the local name
-- Chars (Name1) the identifier name from the attribute designator
-- Expression (Node3) the expression or name
-- Entity (Node4-Sem)
-- Next_Rep_Item (Node5-Sem)
-- From_At_Mod (Flag4-Sem)
-- Check_Address_Alignment (Flag11-Sem)
-- From_Aspect_Specification (Flag13-Sem)
-- Is_Delayed_Aspect (Flag14-Sem)
-- Address_Warning_Posted (Flag18-Sem)
-- Note: if From_Aspect_Specification is set, then Sloc points to the
-- aspect name, and Entity is resolved already to reference the entity
-- to which the aspect applies.
-----------------------------------
-- 13.3.1 Aspect Specifications --
-----------------------------------
-- We modify the RM grammar here, the RM grammar is:
-- ASPECT_SPECIFICATION ::=
-- with ASPECT_MARK [=> ASPECT_DEFINITION] {,
-- ASPECT_MARK [=> ASPECT_DEFINITION] }
-- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
-- ASPECT_DEFINITION ::= NAME | EXPRESSION
-- That's inconvenient, since there is no non-terminal name for a single
-- entry in the list of aspects. So we use this grammar instead:
-- ASPECT_SPECIFICATIONS ::=
-- with ASPECT_SPECIFICATION {, ASPECT_SPECIFICATION}
-- ASPECT_SPECIFICATION =>
-- ASPECT_MARK [=> ASPECT_DEFINITION]
-- ASPECT_MARK ::= aspect_IDENTIFIER['Class]
-- ASPECT_DEFINITION ::= NAME | EXPRESSION
-- Note that for Annotate, the ASPECT_DEFINITION is a pure positional
-- aggregate with the elements of the aggregate corresponding to the
-- successive arguments of the corresponding pragma.
-- See separate package Aspects for details on the incorporation of
-- these nodes into the tree, and how aspect specifications for a given
-- declaration node are associated with that node.
-- N_Aspect_Specification
-- Sloc points to aspect identifier
-- Identifier (Node1) aspect identifier
-- Aspect_Rep_Item (Node2-Sem)
-- Expression (Node3) Aspect_Definition (set to Empty if none)
-- Entity (Node4-Sem) entity to which the aspect applies
-- Next_Rep_Item (Node5-Sem)
-- Class_Present (Flag6) Set if 'Class present
-- Is_Ignored (Flag9-Sem)
-- Is_Checked (Flag11-Sem)
-- Is_Delayed_Aspect (Flag14-Sem)
-- Is_Disabled (Flag15-Sem)
-- Is_Boolean_Aspect (Flag16-Sem)
-- Split_PPC (Flag17) Set if split pre/post attribute
-- Note: Aspect_Specification is an Ada 2012 feature
-- Note: The Identifier serves to identify the aspect involved (it
-- is the aspect whose name corresponds to the Chars field). This
-- means that the other fields of this identifier are unused, and
-- in particular we use the Entity field of this identifier to save
-- a copy of the expression for visibility analysis, see spec of
-- Sem_Ch13 for full details of this usage.
-- In the case of aspects of the form xxx'Class, the aspect identifier
-- is for xxx, and Class_Present is set to True.
-- Note: When a Pre or Post aspect specification is processed, it is
-- broken into AND THEN sections. The left most section has Split_PPC
-- set to False, indicating that it is the original specification (e.g.
-- for posting errors). For the other sections, Split_PPC is set True.
---------------------------------------------
-- 13.4 Enumeration representation clause --
---------------------------------------------
-- ENUMERATION_REPRESENTATION_CLAUSE ::=
-- for first_subtype_LOCAL_NAME use ENUMERATION_AGGREGATE;
-- In Ada 83, the name must be a direct name
-- N_Enumeration_Representation_Clause
-- Sloc points to FOR
-- Identifier (Node1) direct name
-- Array_Aggregate (Node3)
-- Next_Rep_Item (Node5-Sem)
---------------------------------
-- 13.4 Enumeration aggregate --
---------------------------------
-- ENUMERATION_AGGREGATE ::= ARRAY_AGGREGATE
------------------------------------------
-- 13.5.1 Record representation clause --
------------------------------------------
-- RECORD_REPRESENTATION_CLAUSE ::=
-- for first_subtype_LOCAL_NAME use
-- record [MOD_CLAUSE]
-- {COMPONENT_CLAUSE}
-- end record;
-- Gigi restriction: Mod_Clause is always Empty (if present it is
-- replaced by a corresponding Alignment attribute definition clause).
-- Note: Component_Clauses can include pragmas
-- N_Record_Representation_Clause
-- Sloc points to FOR
-- Identifier (Node1) direct name
-- Mod_Clause (Node2) (set to Empty if no mod clause present)
-- Component_Clauses (List3)
-- Next_Rep_Item (Node5-Sem)
------------------------------
-- 13.5.1 Component clause --
------------------------------
-- COMPONENT_CLAUSE ::=
-- component_LOCAL_NAME at POSITION
-- range FIRST_BIT .. LAST_BIT;
-- N_Component_Clause
-- Sloc points to AT
-- Component_Name (Node1) points to Name or Attribute_Reference
-- Position (Node2)
-- First_Bit (Node3)
-- Last_Bit (Node4)
----------------------
-- 13.5.1 Position --
----------------------
-- POSITION ::= static_EXPRESSION
-----------------------
-- 13.5.1 First_Bit --
-----------------------
-- FIRST_BIT ::= static_SIMPLE_EXPRESSION
----------------------
-- 13.5.1 Last_Bit --
----------------------
-- LAST_BIT ::= static_SIMPLE_EXPRESSION
--------------------------
-- 13.8 Code statement --
--------------------------
-- CODE_STATEMENT ::= QUALIFIED_EXPRESSION;
-- Note: in GNAT, the qualified expression has the form
-- Asm_Insn'(Asm (...));
-- See package System.Machine_Code in file s-maccod.ads for details on
-- the allowed parameters to Asm. There are two ways this node can
-- arise, as a code statement, in which case the expression is the
-- qualified expression, or as a result of the expansion of an intrinsic
-- call to the Asm or Asm_Input procedure.
-- N_Code_Statement
-- Sloc points to first token of the expression
-- Expression (Node3)
-- Note: package Exp_Code contains an abstract functional interface
-- for use by Gigi in accessing the data from N_Code_Statement nodes.
------------------------
-- 13.12 Restriction --
------------------------
-- RESTRICTION ::=
-- restriction_IDENTIFIER
-- | restriction_parameter_IDENTIFIER => EXPRESSION
-- There is no explicit node for restrictions. Instead the restriction
-- appears in normal pragma syntax as a pragma argument association,
-- which has the same syntactic form.
--------------------------
-- B.2 Shift Operators --
--------------------------
-- Calls to the intrinsic shift functions are converted to one of
-- the following shift nodes, which have the form of normal binary
-- operator names. Note that for a given shift operation, one node
-- covers all possible types, as for normal operators.
-- Note: it is perfectly permissible for the expander to generate
-- shift operation nodes directly, in which case they will be analyzed
-- and parsed in the usual manner.
-- Sprint syntax: shift-function-name!(expr, count)
-- Note: the Left_Opnd field holds the first argument (the value to
-- be shifted). The Right_Opnd field holds the second argument (the
-- shift count). The Chars field is the name of the intrinsic function.
-- N_Op_Rotate_Left
-- Sloc points to the function name
-- plus fields for binary operator
-- plus fields for expression
-- Shift_Count_OK (Flag4-Sem)
-- N_Op_Rotate_Right
-- Sloc points to the function name
-- plus fields for binary operator
-- plus fields for expression
-- Shift_Count_OK (Flag4-Sem)
-- N_Op_Shift_Left
-- Sloc points to the function name
-- plus fields for binary operator
-- plus fields for expression
-- Shift_Count_OK (Flag4-Sem)
-- N_Op_Shift_Right_Arithmetic
-- Sloc points to the function name
-- plus fields for binary operator
-- plus fields for expression
-- Shift_Count_OK (Flag4-Sem)
-- N_Op_Shift_Right
-- Sloc points to the function name
-- plus fields for binary operator
-- plus fields for expression
-- Shift_Count_OK (Flag4-Sem)
-- Note: N_Op_Rotate_Left, N_Op_Rotate_Right, N_Shift_Right_Arithmetic
-- never appear in the expanded tree if Modify_Tree_For_C mode is set.
-- Note: For N_Op_Shift_Left and N_Op_Shift_Right, the right operand is
-- always less than the word size if Modify_Tree_For_C mode is set.
--------------------------
-- Obsolescent Features --
--------------------------
-- The syntax descriptions and tree nodes for obsolescent features are
-- grouped together, corresponding to their location in appendix I in
-- the RM. However, parsing and semantic analysis for these constructs
-- is located in an appropriate chapter (see individual notes).
---------------------------
-- J.3 Delta Constraint --
---------------------------
-- Note: the parse routine for this construct is located in section
-- 3.5.9 of Par-Ch3, and semantic analysis is in Sem_Ch3, which is
-- where delta constraint logically belongs.
-- DELTA_CONSTRAINT ::= DELTA static_EXPRESSION [RANGE_CONSTRAINT]
-- N_Delta_Constraint
-- Sloc points to DELTA
-- Delta_Expression (Node3)
-- Range_Constraint (Node4) (set to Empty if not present)
--------------------
-- J.7 At Clause --
--------------------
-- AT_CLAUSE ::= for DIRECT_NAME use at EXPRESSION;
-- Note: the parse routine for this construct is located in Par-Ch13,
-- and the semantic analysis is in Sem_Ch13, where at clause logically
-- belongs if it were not obsolescent.
-- Note: in Ada 83 the expression must be a simple expression
-- Gigi restriction: This node never appears, it is rewritten as an
-- address attribute definition clause.
-- N_At_Clause
-- Sloc points to FOR
-- Identifier (Node1)
-- Expression (Node3)
---------------------
-- J.8 Mod clause --
---------------------
-- MOD_CLAUSE ::= at mod static_EXPRESSION;
-- Note: the parse routine for this construct is located in Par-Ch13,
-- and the semantic analysis is in Sem_Ch13, where mod clause logically
-- belongs if it were not obsolescent.
-- Note: in Ada 83, the expression must be a simple expression
-- Gigi restriction: this node never appears. It is replaced
-- by a corresponding Alignment attribute definition clause.
-- Note: pragmas can appear before and after the MOD_CLAUSE since
-- its name has "clause" in it. This is rather strange, but is quite
-- definitely specified. The pragmas before are collected in the
-- Pragmas_Before field of the mod clause node itself, and pragmas
-- after are simply swallowed up in the list of component clauses.
-- N_Mod_Clause
-- Sloc points to AT
-- Expression (Node3)
-- Pragmas_Before (List4) Pragmas before mod clause (No_List if none)
--------------------
-- Semantic Nodes --
--------------------
-- These semantic nodes are used to hold additional semantic information.
-- They are inserted into the tree as a result of semantic processing.
-- Although there are no legitimate source syntax constructions that
-- correspond directly to these nodes, we need a source syntax for the
-- reconstructed tree printed by Sprint, and the node descriptions here
-- show this syntax.
------------------------
-- Compound Statement --
------------------------
-- This node is created by the analyzer/expander to handle some
-- expansion cases where a sequence of actions needs to be captured
-- within a single node (which acts as a container and allows the
-- entire list of actions to be moved around as a whole) appearing
-- in a sequence of statements.
-- This is the statement counterpart to the expression node
-- N_Expression_With_Actions.
-- The required semantics is that the set of actions is executed in
-- the order in which it appears, as though they appeared by themselves
-- in the enclosing list of declarations of statements. Unlike what
-- happens when using an N_Block_Statement, no new scope is introduced.
-- Note: for the time being, this is used only as a transient
-- representation during expansion, and all compound statement nodes
-- must be exploded back to their constituent statements before handing
-- the tree to the back end.
-- Sprint syntax: do
-- action;
-- action;
-- ...
-- action;
-- end;
-- N_Compound_Statement
-- Actions (List1)
--------------
-- Contract --
--------------
-- This node is used to hold the various parts of an entry, subprogram
-- [body] or package [body] contract, in particular:
-- Abstract states declared by a package declaration
-- Contract cases that apply to a subprogram
-- Dependency relations of inputs and output of a subprogram
-- Global annotations classifying data as input or output
-- Initialization sequences for a package declaration
-- Pre- and postconditions that apply to a subprogram
-- The node appears in an entry and [generic] subprogram [body] entity.
-- Sprint syntax: <none> as the node should not appear in the tree, but
-- only attached to an entry or [generic] subprogram
-- entity.
-- N_Contract
-- Sloc points to the subprogram's name
-- Pre_Post_Conditions (Node1-Sem) (set to Empty if none)
-- Contract_Test_Cases (Node2-Sem) (set to Empty if none)
-- Classifications (Node3-Sem) (set to Empty if none)
-- Is_Expanded_Contract (Flag1-Sem)
-- Pre_Post_Conditions contains a collection of pragmas that correspond
-- to pre- and postconditions associated with an entry or a subprogram
-- [body or stub]. The pragmas can either come from source or be the
-- byproduct of aspect expansion. Currently the following pragmas appear
-- in this list:
-- Post
-- Postcondition
-- Pre
-- Precondition
-- Refined_Post
-- The ordering in the list is in LIFO fashion.
-- Note that there might be multiple preconditions or postconditions
-- in this list, either because they come from separate pragmas in the
-- source, or because a Pre (resp. Post) aspect specification has been
-- broken into AND THEN sections. See Split_PPC for details.
-- In GNATprove mode, the inherited classwide pre- and postconditions
-- (suitably specialized for the specific type of the overriding
-- operation) are also in this list.
-- Contract_Test_Cases contains a collection of pragmas that correspond
-- to aspects/pragmas Contract_Cases and Test_Case. The ordering in the
-- list is in LIFO fashion.
-- Classifications contains pragmas that either declare, categorize or
-- establish dependencies between subprogram or package inputs and
-- outputs. Currently the following pragmas appear in this list:
-- Abstract_States
-- Async_Readers
-- Async_Writers
-- Constant_After_Elaboration
-- Depends
-- Effective_Reads
-- Effective_Writes
-- Extensions_Visible
-- Global
-- Initial_Condition
-- Initializes
-- Part_Of
-- Refined_Depends
-- Refined_Global
-- Refined_States
-- Volatile_Function
-- The ordering is in LIFO fashion.
-------------------
-- Expanded Name --
-------------------
-- The N_Expanded_Name node is used to represent a selected component
-- name that has been resolved to an expanded name. The semantic phase
-- replaces N_Selected_Component nodes that represent names by the use
-- of this node, leaving the N_Selected_Component node used only when
-- the prefix is a record or protected type.
-- The fields of the N_Expanded_Name node are layed out identically
-- to those of the N_Selected_Component node, allowing conversion of
-- an expanded name node to a selected component node to be done
-- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
-- There is no special sprint syntax for an expanded name
-- N_Expanded_Name
-- Sloc points to the period
-- Chars (Name1) copy of Chars field of selector name
-- Prefix (Node3)
-- Selector_Name (Node2)
-- Entity (Node4-Sem)
-- Associated_Node (Node4-Sem)
-- Has_Private_View (Flag11-Sem) set in generic units.
-- Redundant_Use (Flag13-Sem)
-- Atomic_Sync_Required (Flag14-Sem)
-- plus fields for expression
-----------------------------
-- Expression With Actions --
-----------------------------
-- This node is created by the analyzer/expander to handle some
-- expansion cases, notably short-circuit forms where there are
-- actions associated with the right-hand side operand.
-- The N_Expression_With_Actions node represents an expression with
-- an associated set of actions (which are executable statements and
-- declarations, as might occur in a handled statement sequence).
-- The required semantics is that the set of actions is executed in
-- the order in which it appears just before the expression is
-- evaluated (and these actions must only be executed if the value
-- of the expression is evaluated). The node is considered to be
-- a subexpression, whose value is the value of the Expression after
-- executing all the actions.
-- If the actions contain declarations, then these declarations may
-- be referenced within the expression. However note that there is
-- no proper scope associated with the expression-with-action, so the
-- back-end will elaborate them in the context of the enclosing scope.
-- Sprint syntax: do
-- action;
-- action;
-- ...
-- action;
-- in expression end
-- N_Expression_With_Actions
-- Actions (List1)
-- Expression (Node3)
-- plus fields for expression
-- Note: In the final generated tree presented to the code generator,
-- the actions list is always non-null, since there is no point in this
-- node if the actions are Empty. During semantic analysis there are
-- cases where it is convenient to temporarily generate an empty actions
-- list. This arises in cases where we create such an empty actions
-- list, and it may or may not end up being a place where additional
-- actions are inserted. The expander removes such empty cases after
-- the expression of the node is fully analyzed and expanded, at which
-- point it is safe to remove it, since no more actions can be inserted.
-- Note: In Modify_Tree_For_C, we never generate any declarations in
-- the action list, which can contain only non-declarative statements.
--------------------
-- Free Statement --
--------------------
-- The N_Free_Statement node is generated as a result of a call to an
-- instantiation of Unchecked_Deallocation. The instantiation of this
-- generic is handled specially and generates this node directly.
-- Sprint syntax: free expression
-- N_Free_Statement
-- Sloc is copied from the unchecked deallocation call
-- Expression (Node3) argument to unchecked deallocation call
-- Storage_Pool (Node1-Sem)
-- Procedure_To_Call (Node2-Sem)
-- Actual_Designated_Subtype (Node4-Sem)
-- Note: in the case where a debug source file is generated, the Sloc
-- for this node points to the FREE keyword in the Sprint file output.
-------------------
-- Freeze Entity --
-------------------
-- This node marks the point in a declarative part at which an entity
-- declared therein becomes frozen. The expander places initialization
-- procedures for types at those points. Gigi uses the freezing point
-- to elaborate entities that may depend on previous private types.
-- See the section in Einfo "Delayed Freezing and Elaboration" for
-- a full description of the use of this node.
-- The Entity field points back to the entity for the type (whose
-- Freeze_Node field points back to this freeze node).
-- The Actions field contains a list of declarations and statements
-- generated by the expander which are associated with the freeze
-- node, and are elaborated as though the freeze node were replaced
-- by this sequence of actions.
-- Note: the Sloc field in the freeze node references a construct
-- associated with the freezing point. This is used for posting
-- messages in some error/warning situations, e.g. the case where
-- a primitive operation of a tagged type is declared too late.
-- Sprint syntax: freeze entity-name [
-- freeze actions
-- ]
-- N_Freeze_Entity
-- Sloc points near freeze point (see above special note)
-- Entity (Node4-Sem)
-- Access_Types_To_Process (Elist2-Sem) (set to No_Elist if none)
-- TSS_Elist (Elist3-Sem) (set to No_Elist if no associated TSS's)
-- Actions (List1) (set to No_List if no freeze actions)
-- First_Subtype_Link (Node5-Sem) (set to Empty if no link)
-- The Actions field holds actions associated with the freeze. These
-- actions are elaborated at the point where the type is frozen.
-- Note: in the case where a debug source file is generated, the Sloc
-- for this node points to the FREEZE keyword in the Sprint file output.
---------------------------
-- Freeze Generic Entity --
---------------------------
-- The freeze point of an entity indicates the point at which the
-- information needed to generate code for the entity is complete.
-- The freeze node for an entity triggers expander activities, such as
-- build initialization procedures, and backend activities, such as
-- completing the elaboration of packages.
-- For entities declared within a generic unit, for which no code is
-- generated, the freeze point is not equally meaningful. However, in
-- Ada 2012 several semantic checks on declarations must be delayed to
-- the freeze point, and we need to include such a mark in the tree to
-- trigger these checks. The Freeze_Generic_Entity node plays no other
-- role, and is ignored by the expander and the back-end.
-- Sprint syntax: freeze_generic entity-name
-- N_Freeze_Generic_Entity
-- Sloc points near freeze point
-- Entity (Node4-Sem)
--------------------------------
-- Implicit Label Declaration --
--------------------------------
-- An implicit label declaration is created for every occurrence of a
-- label on a statement or a label on a block or loop. It is chained
-- in the declarations of the innermost enclosing block as specified
-- in RM section 5.1 (3).
-- The Defining_Identifier is the actual identifier for the statement
-- identifier. Note that the occurrence of the label is a reference, NOT
-- the defining occurrence. The defining occurrence occurs at the head
-- of the innermost enclosing block, and is represented by this node.
-- Note: from the grammar, this might better be called an implicit
-- statement identifier declaration, but the term we choose seems
-- friendlier, since at least informally statement identifiers are
-- called labels in both cases (i.e. when used in labels, and when
-- used as the identifiers of blocks and loops).
-- Note: although this is logically a semantic node, since it does not
-- correspond directly to a source syntax construction, these nodes are
-- actually created by the parser in a post pass done just after parsing
-- is complete, before semantic analysis is started (see Par.Labl).
-- Sprint syntax: labelname : label;
-- N_Implicit_Label_Declaration
-- Sloc points to the << token for a statement identifier, or to the
-- LOOP, DECLARE, or BEGIN token for a loop or block identifier
-- Defining_Identifier (Node1)
-- Label_Construct (Node2-Sem)
-- Note: in the case where a debug source file is generated, the Sloc
-- for this node points to the label name in the generated declaration.
---------------------
-- Itype Reference --
---------------------
-- This node is used to create a reference to an Itype. The only purpose
-- is to make sure the Itype is defined if this is the first reference.
-- A typical use of this node is when an Itype is to be referenced in
-- two branches of an IF statement. In this case it is important that
-- the first use of the Itype not be inside the conditional, since then
-- it might not be defined if the other branch of the IF is taken, in
-- the case where the definition generates elaboration code.
-- The Itype field points to the referenced Itype
-- Sprint syntax: reference itype-name
-- N_Itype_Reference
-- Sloc points to the node generating the reference
-- Itype (Node1-Sem)
-- Note: in the case where a debug source file is generated, the Sloc
-- for this node points to the REFERENCE keyword in the file output.
---------------------
-- Raise xxx Error --
---------------------
-- One of these nodes is created during semantic analysis to replace
-- a node for an expression that is determined to definitely raise
-- the corresponding exception.
-- The N_Raise_xxx_Error node may also stand alone in place
-- of a declaration or statement, in which case it simply causes
-- the exception to be raised (i.e. it is equivalent to a raise
-- statement that raises the corresponding exception). This use
-- is distinguished by the fact that the Etype in this case is
-- Standard_Void_Type; in the subexpression case, the Etype is the
-- same as the type of the subexpression which it replaces.
-- If Condition is empty, then the raise is unconditional. If the
-- Condition field is non-empty, it is a boolean expression which is
-- first evaluated, and the exception is raised only if the value of the
-- expression is True. In the unconditional case, the creation of this
-- node is usually accompanied by a warning message (unless it appears
-- within the right operand of a short-circuit form whose left argument
-- is static and decisively eliminates elaboration of the raise
-- operation). The condition field can ONLY be present when the node is
-- used as a statement form; it must NOT be present in the case where
-- the node appears within an expression.
-- The exception is generated with a message that contains the
-- file name and line number, and then appended text. The Reason
-- code shows the text to be added. The Reason code is an element
-- of the type Types.RT_Exception_Code, and indicates both the
-- message to be added, and the exception to be raised (which must
-- match the node type). The value is stored by storing a Uint which
-- is the Pos value of the enumeration element in this type.
-- Gigi restriction: This expander ensures that the type of the
-- Condition field is always Standard.Boolean, even if the type
-- in the source is some non-standard boolean type.
-- Sprint syntax: [xxx_error "msg"]
-- or: [xxx_error when condition "msg"]
-- N_Raise_Constraint_Error
-- Sloc references related construct
-- Condition (Node1) (set to Empty if no condition)
-- Reason (Uint3)
-- plus fields for expression
-- N_Raise_Program_Error
-- Sloc references related construct
-- Condition (Node1) (set to Empty if no condition)
-- Reason (Uint3)
-- plus fields for expression
-- N_Raise_Storage_Error
-- Sloc references related construct
-- Condition (Node1) (set to Empty if no condition)
-- Reason (Uint3)
-- plus fields for expression
-- Note: Sloc is copied from the expression generating the exception.
-- In the case where a debug source file is generated, the Sloc for
-- this node points to the left bracket in the Sprint file output.
-- Note: the back end may be required to translate these nodes into
-- appropriate goto statements. See description of N_Push/Pop_xxx_Label.
---------------------------------------------
-- Optimization of Exception Raise to Goto --
---------------------------------------------
-- In some cases, the front end will determine that any exception raised
-- by the back end for a certain exception should be transformed into a
-- goto statement.
-- There are three kinds of exceptions raised by the back end (note that
-- for this purpose we consider gigi to be part of the back end in the
-- gcc case):
-- 1. Exceptions resulting from N_Raise_xxx_Error nodes
-- 2. Exceptions from checks triggered by Do_xxx_Check flags
-- 3. Other cases not specifically marked by the front end
-- Normally all such exceptions are translated into calls to the proper
-- Rcheck_xx procedure, where xx encodes both the exception to be raised
-- and the exception message.
-- The front end may determine that for a particular sequence of code,
-- exceptions in any of these three categories for a particular builtin
-- exception should result in a goto, rather than a call to Rcheck_xx.
-- The exact sequence to be generated is:
-- Local_Raise (exception'Identity);
-- goto Label
-- The front end marks such a sequence of code by bracketing it with
-- push and pop nodes:
-- N_Push_xxx_Label (referencing the label)
-- ...
-- (code where transformation is expected for exception xxx)
-- ...
-- N_Pop_xxx_Label
-- The use of push/pop reflects the fact that such regions can properly
-- nest, and one special case is a subregion in which no transformation
-- is allowed. Such a region is marked by a N_Push_xxx_Label node whose
-- Exception_Label field is Empty.
-- N_Push_Constraint_Error_Label
-- Sloc references first statement in region covered
-- Exception_Label (Node5-Sem)
-- N_Push_Program_Error_Label
-- Sloc references first statement in region covered
-- Exception_Label (Node5-Sem)
-- N_Push_Storage_Error_Label
-- Sloc references first statement in region covered
-- Exception_Label (Node5-Sem)
-- N_Pop_Constraint_Error_Label
-- Sloc references last statement in region covered
-- N_Pop_Program_Error_Label
-- Sloc references last statement in region covered
-- N_Pop_Storage_Error_Label
-- Sloc references last statement in region covered
---------------
-- Reference --
---------------
-- For a number of purposes, we need to construct references to objects.
-- These references are subsequently treated as normal access values.
-- An example is the construction of the parameter block passed to a
-- task entry. The N_Reference node is provided for this purpose. It is
-- similar in effect to the use of the Unrestricted_Access attribute,
-- and like Unrestricted_Access can be applied to objects which would
-- not be valid prefixes for the Unchecked_Access attribute (e.g.
-- objects which are not aliased, and slices). In addition it can be
-- applied to composite type values as well as objects, including string
-- values and aggregates.
-- Note: we use the Prefix field for this expression so that the
-- resulting node can be treated using common code with the attribute
-- nodes for the 'Access and related attributes. Logically it would make
-- more sense to call it an Expression field, but then we would have to
-- special case the treatment of the N_Reference node.
-- Note: evaluating a N_Reference node is guaranteed to yield a non-null
-- value at run time. Therefore, it is valid to set Is_Known_Non_Null on
-- a temporary initialized to a N_Reference node in order to eliminate
-- superfluous access checks.
-- Sprint syntax: prefix'reference
-- N_Reference
-- Sloc is copied from the expression
-- Prefix (Node3)
-- plus fields for expression
-- Note: in the case where a debug source file is generated, the Sloc
-- for this node points to the quote in the Sprint file output.
----------------
-- SCIL Nodes --
----------------
-- SCIL nodes are special nodes added to the tree when the CodePeer mode
-- is active. They are only generated if SCIL generation is enabled.
-- A standard tree-walk will not encounter these nodes even if they
-- are present; these nodes are only accessible via the function
-- SCIL_LL.Get_SCIL_Node. These nodes have no associated dynamic
-- semantics.
-- Sprint syntax: [ <node kind> ]
-- No semantic field values are displayed.
-- N_SCIL_Dispatch_Table_Tag_Init
-- Sloc references a node for a tag initialization
-- SCIL_Entity (Node4-Sem)
--
-- An N_SCIL_Dispatch_Table_Tag_Init node may be associated (via
-- Get_SCIL_Node) with the N_Object_Declaration node corresponding to
-- the declaration of the dispatch table for a tagged type.
-- N_SCIL_Dispatching_Call
-- Sloc references the node of a dispatching call
-- SCIL_Target_Prim (Node2-Sem)
-- SCIL_Entity (Node4-Sem)
-- SCIL_Controlling_Tag (Node5-Sem)
--
-- An N_Scil_Dispatching call node may be associated (via Get_SCIL_Node)
-- with the N_Procedure_Call_Statement or N_Function_Call node (or a
-- rewriting thereof) corresponding to a dispatching call.
-- N_SCIL_Membership_Test
-- Sloc references the node of a membership test
-- SCIL_Tag_Value (Node5-Sem)
-- SCIL_Entity (Node4-Sem)
--
-- An N_Scil_Membership_Test node may be associated (via Get_SCIL_Node)
-- with the N_In node (or a rewriting thereof) corresponding to a
-- classwide membership test.
--------------------------
-- Unchecked Expression --
--------------------------
-- An unchecked expression is one that must be analyzed and resolved
-- with all checks off, regardless of the current setting of scope
-- suppress flags.
-- Sprint syntax: `(expression)
-- Note: this node is always removed from the tree (and replaced by
-- its constituent expression) on completion of analysis, so it only
-- appears in intermediate trees, and will never be seen by Gigi.
-- N_Unchecked_Expression
-- Sloc is a copy of the Sloc of the expression
-- Expression (Node3)
-- plus fields for expression
-- Note: in the case where a debug source file is generated, the Sloc
-- for this node points to the back quote in the Sprint file output.
-------------------------------
-- Unchecked Type Conversion --
-------------------------------
-- An unchecked type conversion node represents the semantic action
-- corresponding to a call to an instantiation of Unchecked_Conversion.
-- It is generated as a result of actual use of Unchecked_Conversion
-- and also the expander generates unchecked type conversion nodes
-- directly for expansion of complex semantic actions.
-- Note: an unchecked type conversion is a variable as far as the
-- semantics are concerned, which is convenient for the expander.
-- This does not change what Ada source programs are legal, since
-- clearly a function call to an instantiation of Unchecked_Conversion
-- is not a variable in any case.
-- Sprint syntax: subtype-mark!(expression)
-- N_Unchecked_Type_Conversion
-- Sloc points to related node in source
-- Subtype_Mark (Node4)
-- Expression (Node3)
-- Kill_Range_Check (Flag11-Sem)
-- No_Truncation (Flag17-Sem)
-- plus fields for expression
-- Note: in the case where a debug source file is generated, the Sloc
-- for this node points to the exclamation in the Sprint file output.
-----------------------------------
-- Validate_Unchecked_Conversion --
-----------------------------------
-- The front end does most of the validation of unchecked conversion,
-- including checking sizes (this is done after the back end is called
-- to take advantage of back-annotation of calculated sizes).
-- The front end also deals with specific cases that are not allowed
-- e.g. involving unconstrained array types.
-- For the case of the standard gigi backend, this means that all
-- checks are done in the front end.
-- However, in the case of specialized back-ends, in particular the JVM
-- backend in the past, additional requirements and restrictions may
-- apply to unchecked conversion, and these are most conveniently
-- performed in the specialized back-end.
-- To accommodate this requirement, for such back ends, the following
-- special node is generated recording an unchecked conversion that
-- needs to be validated. The back end should post an appropriate
-- error message if the unchecked conversion is invalid or warrants
-- a special warning message.
-- Source_Type and Target_Type point to the entities for the two
-- types involved in the unchecked conversion instantiation that
-- is to be validated.
-- Sprint syntax: validate Unchecked_Conversion (source, target);
-- N_Validate_Unchecked_Conversion
-- Sloc points to instantiation (location for warning message)
-- Source_Type (Node1-Sem)
-- Target_Type (Node2-Sem)
-- Note: in the case where a debug source file is generated, the Sloc
-- for this node points to the VALIDATE keyword in the file output.
-----------
-- Empty --
-----------
-- Used as the contents of the Nkind field of the dummy Empty node
-- and in some other situations to indicate an uninitialized value.
-- N_Empty
-- Chars (Name1) is set to No_Name
-----------
-- Error --
-----------
-- Used as the contents of the Nkind field of the dummy Error node.
-- Has an Etype field, which gets set to Any_Type later on, to help
-- error recovery (Error_Posted is also set in the Error node).
-- N_Error
-- Chars (Name1) is set to Error_Name
-- Etype (Node5-Sem)
--------------------------
-- Node Type Definition --
--------------------------
-- The following is the definition of the Node_Kind type. As previously
-- discussed, this is separated off to allow rearrangement of the order to
-- facilitate definition of subtype ranges. The comments show the subtype
-- classes which apply to each set of node kinds. The first entry in the
-- comment characterizes the following list of nodes.
type Node_Kind is (
N_Unused_At_Start,
-- N_Representation_Clause
N_At_Clause,
N_Component_Clause,
N_Enumeration_Representation_Clause,
N_Mod_Clause,
N_Record_Representation_Clause,
-- N_Representation_Clause, N_Has_Chars
N_Attribute_Definition_Clause,
-- N_Has_Chars
N_Empty,
N_Pragma_Argument_Association,
-- N_Has_Etype, N_Has_Chars
-- Note: of course N_Error does not really have Etype or Chars fields,
-- and any attempt to access these fields in N_Error will cause an
-- error, but historically this always has been positioned so that an
-- "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
-- Most likely this makes coding easier somewhere but still seems
-- undesirable. To be investigated some time ???
N_Error,
-- N_Entity, N_Has_Etype, N_Has_Chars
N_Defining_Character_Literal,
N_Defining_Identifier,
N_Defining_Operator_Symbol,
-- N_Subexpr, N_Has_Etype, N_Has_Chars, N_Has_Entity
N_Expanded_Name,
-- N_Direct_Name, N_Subexpr, N_Has_Etype,
-- N_Has_Chars, N_Has_Entity
N_Identifier,
N_Operator_Symbol,
-- N_Direct_Name, N_Subexpr, N_Has_Etype,
-- N_Has_Chars, N_Has_Entity
N_Character_Literal,
-- N_Binary_Op, N_Op, N_Subexpr,
-- N_Has_Etype, N_Has_Chars, N_Has_Entity
N_Op_Add,
N_Op_Concat,
N_Op_Expon,
N_Op_Subtract,
-- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer
-- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator
N_Op_Divide,
N_Op_Mod,
N_Op_Multiply,
N_Op_Rem,
-- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
-- N_Has_Entity, N_Has_Chars, N_Op_Boolean
N_Op_And,
-- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
-- N_Has_Entity, N_Has_Chars, N_Op_Boolean, N_Op_Compare
N_Op_Eq,
N_Op_Ge,
N_Op_Gt,
N_Op_Le,
N_Op_Lt,
N_Op_Ne,
-- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype
-- N_Has_Entity, N_Has_Chars, N_Op_Boolean
N_Op_Or,
N_Op_Xor,
-- N_Binary_Op, N_Op, N_Subexpr, N_Has_Etype,
-- N_Op_Shift, N_Has_Chars, N_Has_Entity
N_Op_Rotate_Left,
N_Op_Rotate_Right,
N_Op_Shift_Left,
N_Op_Shift_Right,
N_Op_Shift_Right_Arithmetic,
-- N_Unary_Op, N_Op, N_Subexpr, N_Has_Etype,
-- N_Has_Chars, N_Has_Entity
N_Op_Abs,
N_Op_Minus,
N_Op_Not,
N_Op_Plus,
-- N_Subexpr, N_Has_Etype, N_Has_Entity
N_Attribute_Reference,
-- N_Subexpr, N_Has_Etype, N_Membership_Test
N_In,
N_Not_In,
-- N_Subexpr, N_Has_Etype, N_Short_Circuit
N_And_Then,
N_Or_Else,
-- N_Subexpr, N_Has_Etype, N_Subprogram_Call
N_Function_Call,
N_Procedure_Call_Statement,
-- N_Subexpr, N_Has_Etype, N_Raise_xxx_Error
N_Raise_Constraint_Error,
N_Raise_Program_Error,
N_Raise_Storage_Error,
-- N_Subexpr, N_Has_Etype, N_Numeric_Or_String_Literal
N_Integer_Literal,
N_Real_Literal,
N_String_Literal,
-- N_Subexpr, N_Has_Etype
N_Explicit_Dereference,
N_Expression_With_Actions,
N_If_Expression,
N_Indexed_Component,
N_Null,
N_Qualified_Expression,
N_Quantified_Expression,
N_Aggregate,
N_Allocator,
N_Case_Expression,
N_Delta_Aggregate,
N_Extension_Aggregate,
N_Raise_Expression,
N_Range,
N_Reference,
N_Selected_Component,
N_Slice,
N_Target_Name,
N_Type_Conversion,
N_Unchecked_Expression,
N_Unchecked_Type_Conversion,
-- N_Has_Etype
N_Subtype_Indication,
-- N_Declaration
N_Component_Declaration,
N_Entry_Declaration,
N_Expression_Function,
N_Formal_Object_Declaration,
N_Formal_Type_Declaration,
N_Full_Type_Declaration,
N_Incomplete_Type_Declaration,
N_Iterator_Specification,
N_Loop_Parameter_Specification,
N_Object_Declaration,
N_Protected_Type_Declaration,
N_Private_Extension_Declaration,
N_Private_Type_Declaration,
N_Subtype_Declaration,
-- N_Subprogram_Specification, N_Declaration
N_Function_Specification,
N_Procedure_Specification,
-- N_Access_To_Subprogram_Definition
N_Access_Function_Definition,
N_Access_Procedure_Definition,
-- N_Later_Decl_Item
N_Task_Type_Declaration,
-- N_Body_Stub, N_Later_Decl_Item
N_Package_Body_Stub,
N_Protected_Body_Stub,
N_Subprogram_Body_Stub,
N_Task_Body_Stub,
-- N_Generic_Instantiation, N_Later_Decl_Item
-- N_Subprogram_Instantiation
N_Function_Instantiation,
N_Procedure_Instantiation,
-- N_Generic_Instantiation, N_Later_Decl_Item
N_Package_Instantiation,
-- N_Unit_Body, N_Later_Decl_Item, N_Proper_Body
N_Package_Body,
N_Subprogram_Body,
-- N_Later_Decl_Item, N_Proper_Body
N_Protected_Body,
N_Task_Body,
-- N_Later_Decl_Item
N_Implicit_Label_Declaration,
N_Package_Declaration,
N_Single_Task_Declaration,
N_Subprogram_Declaration,
N_Use_Package_Clause,
-- N_Generic_Declaration, N_Later_Decl_Item
N_Generic_Package_Declaration,
N_Generic_Subprogram_Declaration,
-- N_Array_Type_Definition
N_Constrained_Array_Definition,
N_Unconstrained_Array_Definition,
-- N_Renaming_Declaration
N_Exception_Renaming_Declaration,
N_Object_Renaming_Declaration,
N_Package_Renaming_Declaration,
N_Subprogram_Renaming_Declaration,
-- N_Generic_Renaming_Declaration, N_Renaming_Declaration
N_Generic_Function_Renaming_Declaration,
N_Generic_Package_Renaming_Declaration,
N_Generic_Procedure_Renaming_Declaration,
-- N_Statement_Other_Than_Procedure_Call
N_Abort_Statement,
N_Accept_Statement,
N_Assignment_Statement,
N_Asynchronous_Select,
N_Block_Statement,
N_Case_Statement,
N_Code_Statement,
N_Compound_Statement,
N_Conditional_Entry_Call,
-- N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
N_Delay_Relative_Statement,
N_Delay_Until_Statement,
-- N_Statement_Other_Than_Procedure_Call
N_Entry_Call_Statement,
N_Free_Statement,
N_Goto_Statement,
N_Loop_Statement,
N_Null_Statement,
N_Raise_Statement,
N_Requeue_Statement,
N_Simple_Return_Statement,
N_Extended_Return_Statement,
N_Selective_Accept,
N_Timed_Entry_Call,
-- N_Statement_Other_Than_Procedure_Call, N_Has_Condition
N_Exit_Statement,
N_If_Statement,
-- N_Has_Condition
N_Accept_Alternative,
N_Delay_Alternative,
N_Elsif_Part,
N_Entry_Body_Formal_Part,
N_Iteration_Scheme,
N_Terminate_Alternative,
-- N_Formal_Subprogram_Declaration
N_Formal_Abstract_Subprogram_Declaration,
N_Formal_Concrete_Subprogram_Declaration,
-- N_Push_xxx_Label, N_Push_Pop_xxx_Label
N_Push_Constraint_Error_Label,
N_Push_Program_Error_Label,
N_Push_Storage_Error_Label,
-- N_Pop_xxx_Label, N_Push_Pop_xxx_Label
N_Pop_Constraint_Error_Label,
N_Pop_Program_Error_Label,
N_Pop_Storage_Error_Label,
-- SCIL nodes
N_SCIL_Dispatch_Table_Tag_Init,
N_SCIL_Dispatching_Call,
N_SCIL_Membership_Test,
-- Other nodes (not part of any subtype class)
N_Abortable_Part,
N_Abstract_Subprogram_Declaration,
N_Access_Definition,
N_Access_To_Object_Definition,
N_Aspect_Specification,
N_Case_Expression_Alternative,
N_Case_Statement_Alternative,
N_Compilation_Unit,
N_Compilation_Unit_Aux,
N_Component_Association,
N_Component_Definition,
N_Component_List,
N_Contract,
N_Derived_Type_Definition,
N_Decimal_Fixed_Point_Definition,
N_Defining_Program_Unit_Name,
N_Delta_Constraint,
N_Designator,
N_Digits_Constraint,
N_Discriminant_Association,
N_Discriminant_Specification,
N_Enumeration_Type_Definition,
N_Entry_Body,
N_Entry_Call_Alternative,
N_Entry_Index_Specification,
N_Exception_Declaration,
N_Exception_Handler,
N_Floating_Point_Definition,
N_Formal_Decimal_Fixed_Point_Definition,
N_Formal_Derived_Type_Definition,
N_Formal_Discrete_Type_Definition,
N_Formal_Floating_Point_Definition,
N_Formal_Modular_Type_Definition,
N_Formal_Ordinary_Fixed_Point_Definition,
N_Formal_Package_Declaration,
N_Formal_Private_Type_Definition,
N_Formal_Incomplete_Type_Definition,
N_Formal_Signed_Integer_Type_Definition,
N_Freeze_Entity,
N_Freeze_Generic_Entity,
N_Generic_Association,
N_Handled_Sequence_Of_Statements,
N_Index_Or_Discriminant_Constraint,
N_Iterated_Component_Association,
N_Itype_Reference,
N_Label,
N_Modular_Type_Definition,
N_Number_Declaration,
N_Ordinary_Fixed_Point_Definition,
N_Others_Choice,
N_Package_Specification,
N_Parameter_Association,
N_Parameter_Specification,
N_Pragma,
N_Protected_Definition,
N_Range_Constraint,
N_Real_Range_Specification,
N_Record_Definition,
N_Signed_Integer_Type_Definition,
N_Single_Protected_Declaration,
N_Subunit,
N_Task_Definition,
N_Triggering_Alternative,
N_Use_Type_Clause,
N_Validate_Unchecked_Conversion,
N_Variant,
N_Variant_Part,
N_With_Clause,
N_Unused_At_End);
for Node_Kind'Size use 8;
-- The data structures in Atree assume this
----------------------------
-- Node Class Definitions --
----------------------------
subtype N_Access_To_Subprogram_Definition is Node_Kind range
N_Access_Function_Definition ..
N_Access_Procedure_Definition;
subtype N_Array_Type_Definition is Node_Kind range
N_Constrained_Array_Definition ..
N_Unconstrained_Array_Definition;
subtype N_Binary_Op is Node_Kind range
N_Op_Add ..
N_Op_Shift_Right_Arithmetic;
subtype N_Body_Stub is Node_Kind range
N_Package_Body_Stub ..
N_Task_Body_Stub;
subtype N_Declaration is Node_Kind range
N_Component_Declaration ..
N_Procedure_Specification;
-- Note: this includes all constructs normally thought of as declarations
-- except those which are separately grouped as later declarations.
subtype N_Delay_Statement is Node_Kind range
N_Delay_Relative_Statement ..
N_Delay_Until_Statement;
subtype N_Direct_Name is Node_Kind range
N_Identifier ..
N_Character_Literal;
subtype N_Entity is Node_Kind range
N_Defining_Character_Literal ..
N_Defining_Operator_Symbol;
subtype N_Formal_Subprogram_Declaration is Node_Kind range
N_Formal_Abstract_Subprogram_Declaration ..
N_Formal_Concrete_Subprogram_Declaration;
subtype N_Generic_Declaration is Node_Kind range
N_Generic_Package_Declaration ..
N_Generic_Subprogram_Declaration;
subtype N_Generic_Instantiation is Node_Kind range
N_Function_Instantiation ..
N_Package_Instantiation;
subtype N_Generic_Renaming_Declaration is Node_Kind range
N_Generic_Function_Renaming_Declaration ..
N_Generic_Procedure_Renaming_Declaration;
subtype N_Has_Chars is Node_Kind range
N_Attribute_Definition_Clause ..
N_Op_Plus;
subtype N_Has_Entity is Node_Kind range
N_Expanded_Name ..
N_Attribute_Reference;
-- Nodes that have Entity fields
-- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Freeze_Generic_Entity,
-- N_Aspect_Specification, or N_Attribute_Definition_Clause.
subtype N_Has_Etype is Node_Kind range
N_Error ..
N_Subtype_Indication;
subtype N_Has_Treat_Fixed_As_Integer is Node_Kind range
N_Op_Divide ..
N_Op_Rem;
subtype N_Multiplying_Operator is Node_Kind range
N_Op_Divide ..
N_Op_Rem;
subtype N_Later_Decl_Item is Node_Kind range
N_Task_Type_Declaration ..
N_Generic_Subprogram_Declaration;
-- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
-- only those items which can appear as later declarative items. This also
-- includes N_Implicit_Label_Declaration which is not specifically in the
-- grammar but may appear as a valid later declarative items. It does NOT
-- include N_Pragma which can also appear among later declarative items.
-- It does however include N_Protected_Body, which is a bit peculiar, but
-- harmless since this cannot appear in Ada 83 mode anyway.
subtype N_Membership_Test is Node_Kind range
N_In ..
N_Not_In;
subtype N_Numeric_Or_String_Literal is Node_Kind range
N_Integer_Literal ..
N_String_Literal;
subtype N_Op is Node_Kind range
N_Op_Add ..
N_Op_Plus;
subtype N_Op_Boolean is Node_Kind range
N_Op_And ..
N_Op_Xor;
-- Binary operators which take operands of a boolean type, and yield
-- a result of a boolean type.
subtype N_Op_Compare is Node_Kind range
N_Op_Eq ..
N_Op_Ne;
subtype N_Op_Shift is Node_Kind range
N_Op_Rotate_Left ..
N_Op_Shift_Right_Arithmetic;
subtype N_Proper_Body is Node_Kind range
N_Package_Body ..
N_Task_Body;
subtype N_Push_xxx_Label is Node_Kind range
N_Push_Constraint_Error_Label ..
N_Push_Storage_Error_Label;
subtype N_Pop_xxx_Label is Node_Kind range
N_Pop_Constraint_Error_Label ..
N_Pop_Storage_Error_Label;
subtype N_Push_Pop_xxx_Label is Node_Kind range
N_Push_Constraint_Error_Label ..
N_Pop_Storage_Error_Label;
subtype N_Raise_xxx_Error is Node_Kind range
N_Raise_Constraint_Error ..
N_Raise_Storage_Error;
subtype N_Renaming_Declaration is Node_Kind range
N_Exception_Renaming_Declaration ..
N_Generic_Procedure_Renaming_Declaration;
subtype N_Representation_Clause is Node_Kind range
N_At_Clause ..
N_Attribute_Definition_Clause;
subtype N_Short_Circuit is Node_Kind range
N_And_Then ..
N_Or_Else;
subtype N_SCIL_Node is Node_Kind range
N_SCIL_Dispatch_Table_Tag_Init ..
N_SCIL_Membership_Test;
subtype N_Statement_Other_Than_Procedure_Call is Node_Kind range
N_Abort_Statement ..
N_If_Statement;
-- Note that this includes all statement types except for the cases of the
-- N_Procedure_Call_Statement which is considered to be a subexpression
-- (since overloading is possible, so it needs to go through the normal
-- overloading resolution for expressions).
subtype N_Subprogram_Call is Node_Kind range
N_Function_Call ..
N_Procedure_Call_Statement;
subtype N_Subprogram_Instantiation is Node_Kind range
N_Function_Instantiation ..
N_Procedure_Instantiation;
subtype N_Has_Condition is Node_Kind range
N_Exit_Statement ..
N_Terminate_Alternative;
-- Nodes with condition fields (does not include N_Raise_xxx_Error)
subtype N_Subexpr is Node_Kind range
N_Expanded_Name ..
N_Unchecked_Type_Conversion;
-- Nodes with expression fields
subtype N_Subprogram_Specification is Node_Kind range
N_Function_Specification ..
N_Procedure_Specification;
subtype N_Unary_Op is Node_Kind range
N_Op_Abs ..
N_Op_Plus;
subtype N_Unit_Body is Node_Kind range
N_Package_Body ..
N_Subprogram_Body;
---------------------------
-- Node Access Functions --
---------------------------
-- The following functions return the contents of the indicated field of
-- the node referenced by the argument, which is a Node_Id. They provide
-- logical access to fields in the node which could be accessed using the
-- Atree.Unchecked_Access package, but the idea is always to use these
-- higher level routines which preserve strong typing. In debug mode,
-- these routines check that they are being applied to an appropriate
-- node, as well as checking that the node is in range.
function ABE_Is_Certain
(N : Node_Id) return Boolean; -- Flag18
function Abort_Present
(N : Node_Id) return Boolean; -- Flag15
function Abortable_Part
(N : Node_Id) return Node_Id; -- Node2
function Abstract_Present
(N : Node_Id) return Boolean; -- Flag4
function Accept_Handler_Records
(N : Node_Id) return List_Id; -- List5
function Accept_Statement
(N : Node_Id) return Node_Id; -- Node2
function Access_Definition
(N : Node_Id) return Node_Id; -- Node3
function Access_To_Subprogram_Definition
(N : Node_Id) return Node_Id; -- Node3
function Access_Types_To_Process
(N : Node_Id) return Elist_Id; -- Elist2
function Actions
(N : Node_Id) return List_Id; -- List1
function Activation_Chain_Entity
(N : Node_Id) return Node_Id; -- Node3
function Acts_As_Spec
(N : Node_Id) return Boolean; -- Flag4
function Actual_Designated_Subtype
(N : Node_Id) return Node_Id; -- Node4
function Address_Warning_Posted
(N : Node_Id) return Boolean; -- Flag18
function Aggregate_Bounds
(N : Node_Id) return Node_Id; -- Node3
function Aliased_Present
(N : Node_Id) return Boolean; -- Flag4
function All_Others
(N : Node_Id) return Boolean; -- Flag11
function All_Present
(N : Node_Id) return Boolean; -- Flag15
function Alternatives
(N : Node_Id) return List_Id; -- List4
function Ancestor_Part
(N : Node_Id) return Node_Id; -- Node3
function Atomic_Sync_Required
(N : Node_Id) return Boolean; -- Flag14
function Array_Aggregate
(N : Node_Id) return Node_Id; -- Node3
function Aspect_Rep_Item
(N : Node_Id) return Node_Id; -- Node2
function Assignment_OK
(N : Node_Id) return Boolean; -- Flag15
function Associated_Node
(N : Node_Id) return Node_Id; -- Node4
function At_End_Proc
(N : Node_Id) return Node_Id; -- Node1
function Attribute_Name
(N : Node_Id) return Name_Id; -- Name2
function Aux_Decls_Node
(N : Node_Id) return Node_Id; -- Node5
function Backwards_OK
(N : Node_Id) return Boolean; -- Flag6
function Bad_Is_Detected
(N : Node_Id) return Boolean; -- Flag15
function By_Ref
(N : Node_Id) return Boolean; -- Flag5
function Body_Required
(N : Node_Id) return Boolean; -- Flag13
function Body_To_Inline
(N : Node_Id) return Node_Id; -- Node3
function Box_Present
(N : Node_Id) return Boolean; -- Flag15
function Char_Literal_Value
(N : Node_Id) return Uint; -- Uint2
function Chars
(N : Node_Id) return Name_Id; -- Name1
function Check_Address_Alignment
(N : Node_Id) return Boolean; -- Flag11
function Choice_Parameter
(N : Node_Id) return Node_Id; -- Node2
function Choices
(N : Node_Id) return List_Id; -- List1
function Class_Present
(N : Node_Id) return Boolean; -- Flag6
function Classifications
(N : Node_Id) return Node_Id; -- Node3
function Cleanup_Actions
(N : Node_Id) return List_Id; -- List5
function Comes_From_Extended_Return_Statement
(N : Node_Id) return Boolean; -- Flag18
function Compile_Time_Known_Aggregate
(N : Node_Id) return Boolean; -- Flag18
function Component_Associations
(N : Node_Id) return List_Id; -- List2
function Component_Clauses
(N : Node_Id) return List_Id; -- List3
function Component_Definition
(N : Node_Id) return Node_Id; -- Node4
function Component_Items
(N : Node_Id) return List_Id; -- List3
function Component_List
(N : Node_Id) return Node_Id; -- Node1
function Component_Name
(N : Node_Id) return Node_Id; -- Node1
function Componentwise_Assignment
(N : Node_Id) return Boolean; -- Flag14
function Condition
(N : Node_Id) return Node_Id; -- Node1
function Condition_Actions
(N : Node_Id) return List_Id; -- List3
function Config_Pragmas
(N : Node_Id) return List_Id; -- List4
function Constant_Present
(N : Node_Id) return Boolean; -- Flag17
function Constraint
(N : Node_Id) return Node_Id; -- Node3
function Constraints
(N : Node_Id) return List_Id; -- List1
function Context_Installed
(N : Node_Id) return Boolean; -- Flag13
function Context_Pending
(N : Node_Id) return Boolean; -- Flag16
function Context_Items
(N : Node_Id) return List_Id; -- List1
function Contract_Test_Cases
(N : Node_Id) return Node_Id; -- Node2
function Controlling_Argument
(N : Node_Id) return Node_Id; -- Node1
function Conversion_OK
(N : Node_Id) return Boolean; -- Flag14
function Convert_To_Return_False
(N : Node_Id) return Boolean; -- Flag13
function Corresponding_Aspect
(N : Node_Id) return Node_Id; -- Node3
function Corresponding_Body
(N : Node_Id) return Node_Id; -- Node5
function Corresponding_Formal_Spec
(N : Node_Id) return Node_Id; -- Node3
function Corresponding_Generic_Association
(N : Node_Id) return Node_Id; -- Node5
function Corresponding_Integer_Value
(N : Node_Id) return Uint; -- Uint4
function Corresponding_Spec
(N : Node_Id) return Entity_Id; -- Node5
function Corresponding_Spec_Of_Stub
(N : Node_Id) return Node_Id; -- Node2
function Corresponding_Stub
(N : Node_Id) return Node_Id; -- Node3
function Dcheck_Function
(N : Node_Id) return Entity_Id; -- Node5
function Declarations
(N : Node_Id) return List_Id; -- List2
function Default_Expression
(N : Node_Id) return Node_Id; -- Node5
function Default_Storage_Pool
(N : Node_Id) return Node_Id; -- Node3
function Default_Name
(N : Node_Id) return Node_Id; -- Node2
function Defining_Identifier
(N : Node_Id) return Entity_Id; -- Node1
function Defining_Unit_Name
(N : Node_Id) return Node_Id; -- Node1
function Delay_Alternative
(N : Node_Id) return Node_Id; -- Node4
function Delay_Statement
(N : Node_Id) return Node_Id; -- Node2
function Delta_Expression
(N : Node_Id) return Node_Id; -- Node3
function Digits_Expression
(N : Node_Id) return Node_Id; -- Node2
function Discr_Check_Funcs_Built
(N : Node_Id) return Boolean; -- Flag11
function Discrete_Choices
(N : Node_Id) return List_Id; -- List4
function Discrete_Range
(N : Node_Id) return Node_Id; -- Node4
function Discrete_Subtype_Definition
(N : Node_Id) return Node_Id; -- Node4
function Discrete_Subtype_Definitions
(N : Node_Id) return List_Id; -- List2
function Discriminant_Specifications
(N : Node_Id) return List_Id; -- List4
function Discriminant_Type
(N : Node_Id) return Node_Id; -- Node5
function Do_Accessibility_Check
(N : Node_Id) return Boolean; -- Flag13
function Do_Discriminant_Check
(N : Node_Id) return Boolean; -- Flag1
function Do_Division_Check
(N : Node_Id) return Boolean; -- Flag13
function Do_Length_Check
(N : Node_Id) return Boolean; -- Flag4
function Do_Overflow_Check
(N : Node_Id) return Boolean; -- Flag17
function Do_Range_Check
(N : Node_Id) return Boolean; -- Flag9
function Do_Storage_Check
(N : Node_Id) return Boolean; -- Flag17
function Do_Tag_Check
(N : Node_Id) return Boolean; -- Flag13
function Elaborate_All_Desirable
(N : Node_Id) return Boolean; -- Flag9
function Elaborate_All_Present
(N : Node_Id) return Boolean; -- Flag14
function Elaborate_Desirable
(N : Node_Id) return Boolean; -- Flag11
function Elaborate_Present
(N : Node_Id) return Boolean; -- Flag4
function Else_Actions
(N : Node_Id) return List_Id; -- List3
function Else_Statements
(N : Node_Id) return List_Id; -- List4
function Elsif_Parts
(N : Node_Id) return List_Id; -- List3
function Enclosing_Variant
(N : Node_Id) return Node_Id; -- Node2
function End_Label
(N : Node_Id) return Node_Id; -- Node4
function End_Span
(N : Node_Id) return Uint; -- Uint5
function Entity
(N : Node_Id) return Node_Id; -- Node4
function Entity_Or_Associated_Node
(N : Node_Id) return Node_Id; -- Node4
function Entry_Body_Formal_Part
(N : Node_Id) return Node_Id; -- Node5
function Entry_Call_Alternative
(N : Node_Id) return Node_Id; -- Node1
function Entry_Call_Statement
(N : Node_Id) return Node_Id; -- Node1
function Entry_Direct_Name
(N : Node_Id) return Node_Id; -- Node1
function Entry_Index
(N : Node_Id) return Node_Id; -- Node5
function Entry_Index_Specification
(N : Node_Id) return Node_Id; -- Node4
function Etype
(N : Node_Id) return Node_Id; -- Node5
function Exception_Choices
(N : Node_Id) return List_Id; -- List4
function Exception_Handlers
(N : Node_Id) return List_Id; -- List5
function Exception_Junk
(N : Node_Id) return Boolean; -- Flag8
function Exception_Label
(N : Node_Id) return Node_Id; -- Node5
function Explicit_Actual_Parameter
(N : Node_Id) return Node_Id; -- Node3
function Expansion_Delayed
(N : Node_Id) return Boolean; -- Flag11
function Explicit_Generic_Actual_Parameter
(N : Node_Id) return Node_Id; -- Node1
function Expression
(N : Node_Id) return Node_Id; -- Node3
function Expression_Copy
(N : Node_Id) return Node_Id; -- Node2
function Expressions
(N : Node_Id) return List_Id; -- List1
function First_Bit
(N : Node_Id) return Node_Id; -- Node3
function First_Inlined_Subprogram
(N : Node_Id) return Entity_Id; -- Node3
function First_Name
(N : Node_Id) return Boolean; -- Flag5
function First_Named_Actual
(N : Node_Id) return Node_Id; -- Node4
function First_Real_Statement
(N : Node_Id) return Node_Id; -- Node2
function First_Subtype_Link
(N : Node_Id) return Entity_Id; -- Node5
function Float_Truncate
(N : Node_Id) return Boolean; -- Flag11
function Formal_Type_Definition
(N : Node_Id) return Node_Id; -- Node3
function Forwards_OK
(N : Node_Id) return Boolean; -- Flag5
function From_Aspect_Specification
(N : Node_Id) return Boolean; -- Flag13
function From_At_End
(N : Node_Id) return Boolean; -- Flag4
function From_At_Mod
(N : Node_Id) return Boolean; -- Flag4
function From_Conditional_Expression
(N : Node_Id) return Boolean; -- Flag1
function From_Default
(N : Node_Id) return Boolean; -- Flag6
function Generalized_Indexing
(N : Node_Id) return Node_Id; -- Node4
function Generic_Associations
(N : Node_Id) return List_Id; -- List3
function Generic_Formal_Declarations
(N : Node_Id) return List_Id; -- List2
function Generic_Parent
(N : Node_Id) return Node_Id; -- Node5
function Generic_Parent_Type
(N : Node_Id) return Node_Id; -- Node4
function Handled_Statement_Sequence
(N : Node_Id) return Node_Id; -- Node4
function Handler_List_Entry
(N : Node_Id) return Node_Id; -- Node2
function Has_Created_Identifier
(N : Node_Id) return Boolean; -- Flag15
function Has_Dereference_Action
(N : Node_Id) return Boolean; -- Flag13
function Has_Dynamic_Length_Check
(N : Node_Id) return Boolean; -- Flag10
function Has_Dynamic_Range_Check
(N : Node_Id) return Boolean; -- Flag12
function Has_Init_Expression
(N : Node_Id) return Boolean; -- Flag14
function Has_Local_Raise
(N : Node_Id) return Boolean; -- Flag8
function Has_No_Elaboration_Code
(N : Node_Id) return Boolean; -- Flag17
function Has_Pragma_Suppress_All
(N : Node_Id) return Boolean; -- Flag14
function Has_Private_View
(N : Node_Id) return Boolean; -- Flag11
function Has_Relative_Deadline_Pragma
(N : Node_Id) return Boolean; -- Flag9
function Has_Self_Reference
(N : Node_Id) return Boolean; -- Flag13
function Has_SP_Choice
(N : Node_Id) return Boolean; -- Flag15
function Has_Storage_Size_Pragma
(N : Node_Id) return Boolean; -- Flag5
function Has_Target_Names
(N : Node_Id) return Boolean; -- Flag8
function Has_Wide_Character
(N : Node_Id) return Boolean; -- Flag11
function Has_Wide_Wide_Character
(N : Node_Id) return Boolean; -- Flag13
function Header_Size_Added
(N : Node_Id) return Boolean; -- Flag11
function Hidden_By_Use_Clause
(N : Node_Id) return Elist_Id; -- Elist4
function High_Bound
(N : Node_Id) return Node_Id; -- Node2
function Identifier
(N : Node_Id) return Node_Id; -- Node1
function Interface_List
(N : Node_Id) return List_Id; -- List2
function Interface_Present
(N : Node_Id) return Boolean; -- Flag16
function Implicit_With
(N : Node_Id) return Boolean; -- Flag16
function Implicit_With_From_Instantiation
(N : Node_Id) return Boolean; -- Flag12
function Import_Interface_Present
(N : Node_Id) return Boolean; -- Flag16
function In_Present
(N : Node_Id) return Boolean; -- Flag15
function Includes_Infinities
(N : Node_Id) return Boolean; -- Flag11
function Incomplete_View
(N : Node_Id) return Node_Id; -- Node2
function Inherited_Discriminant
(N : Node_Id) return Boolean; -- Flag13
function Instance_Spec
(N : Node_Id) return Node_Id; -- Node5
function Intval
(N : Node_Id) return Uint; -- Uint3
function Is_Abort_Block
(N : Node_Id) return Boolean; -- Flag4
function Is_Accessibility_Actual
(N : Node_Id) return Boolean; -- Flag13
function Is_Analyzed_Pragma
(N : Node_Id) return Boolean; -- Flag5
function Is_Asynchronous_Call_Block
(N : Node_Id) return Boolean; -- Flag7
function Is_Boolean_Aspect
(N : Node_Id) return Boolean; -- Flag16
function Is_Checked
(N : Node_Id) return Boolean; -- Flag11
function Is_Checked_Ghost_Pragma
(N : Node_Id) return Boolean; -- Flag3
function Is_Component_Left_Opnd
(N : Node_Id) return Boolean; -- Flag13
function Is_Component_Right_Opnd
(N : Node_Id) return Boolean; -- Flag14
function Is_Controlling_Actual
(N : Node_Id) return Boolean; -- Flag16
function Is_Delayed_Aspect
(N : Node_Id) return Boolean; -- Flag14
function Is_Disabled
(N : Node_Id) return Boolean; -- Flag15
function Is_Dynamic_Coextension
(N : Node_Id) return Boolean; -- Flag18
function Is_Elsif
(N : Node_Id) return Boolean; -- Flag13
function Is_Entry_Barrier_Function
(N : Node_Id) return Boolean; -- Flag8
function Is_Expanded_Build_In_Place_Call
(N : Node_Id) return Boolean; -- Flag11
function Is_Expanded_Contract
(N : Node_Id) return Boolean; -- Flag1
function Is_Finalization_Wrapper
(N : Node_Id) return Boolean; -- Flag9
function Is_Folded_In_Parser
(N : Node_Id) return Boolean; -- Flag4
function Is_Generic_Contract_Pragma
(N : Node_Id) return Boolean; -- Flag2
function Is_Ignored
(N : Node_Id) return Boolean; -- Flag9
function Is_Ignored_Ghost_Pragma
(N : Node_Id) return Boolean; -- Flag8
function Is_In_Discriminant_Check
(N : Node_Id) return Boolean; -- Flag11
function Is_Inherited_Pragma
(N : Node_Id) return Boolean; -- Flag4
function Is_Machine_Number
(N : Node_Id) return Boolean; -- Flag11
function Is_Null_Loop
(N : Node_Id) return Boolean; -- Flag16
function Is_Overloaded
(N : Node_Id) return Boolean; -- Flag5
function Is_Power_Of_2_For_Shift
(N : Node_Id) return Boolean; -- Flag13
function Is_Prefixed_Call
(N : Node_Id) return Boolean; -- Flag17
function Is_Protected_Subprogram_Body
(N : Node_Id) return Boolean; -- Flag7
function Is_Qualified_Universal_Literal
(N : Node_Id) return Boolean; -- Flag4
function Is_Static_Coextension
(N : Node_Id) return Boolean; -- Flag14
function Is_Static_Expression
(N : Node_Id) return Boolean; -- Flag6
function Is_Subprogram_Descriptor
(N : Node_Id) return Boolean; -- Flag16
function Is_Task_Allocation_Block
(N : Node_Id) return Boolean; -- Flag6
function Is_Task_Body_Procedure
(N : Node_Id) return Boolean; -- Flag1
function Is_Task_Master
(N : Node_Id) return Boolean; -- Flag5
function Iteration_Scheme
(N : Node_Id) return Node_Id; -- Node2
function Iterator_Specification
(N : Node_Id) return Node_Id; -- Node2
function Itype
(N : Node_Id) return Entity_Id; -- Node1
function Kill_Range_Check
(N : Node_Id) return Boolean; -- Flag11
function Label_Construct
(N : Node_Id) return Node_Id; -- Node2
function Left_Opnd
(N : Node_Id) return Node_Id; -- Node2
function Last_Bit
(N : Node_Id) return Node_Id; -- Node4
function Last_Name
(N : Node_Id) return Boolean; -- Flag6
function Library_Unit
(N : Node_Id) return Node_Id; -- Node4
function Limited_View_Installed
(N : Node_Id) return Boolean; -- Flag18
function Limited_Present
(N : Node_Id) return Boolean; -- Flag17
function Literals
(N : Node_Id) return List_Id; -- List1
function Local_Raise_Not_OK
(N : Node_Id) return Boolean; -- Flag7
function Local_Raise_Statements
(N : Node_Id) return Elist_Id; -- Elist1
function Loop_Actions
(N : Node_Id) return List_Id; -- List2
function Loop_Parameter_Specification
(N : Node_Id) return Node_Id; -- Node4
function Low_Bound
(N : Node_Id) return Node_Id; -- Node1
function Mod_Clause
(N : Node_Id) return Node_Id; -- Node2
function More_Ids
(N : Node_Id) return Boolean; -- Flag5
function Must_Be_Byte_Aligned
(N : Node_Id) return Boolean; -- Flag14
function Must_Not_Freeze
(N : Node_Id) return Boolean; -- Flag8
function Must_Not_Override
(N : Node_Id) return Boolean; -- Flag15
function Must_Override
(N : Node_Id) return Boolean; -- Flag14
function Name
(N : Node_Id) return Node_Id; -- Node2
function Names
(N : Node_Id) return List_Id; -- List2
function Next_Entity
(N : Node_Id) return Node_Id; -- Node2
function Next_Exit_Statement
(N : Node_Id) return Node_Id; -- Node3
function Next_Implicit_With
(N : Node_Id) return Node_Id; -- Node3
function Next_Named_Actual
(N : Node_Id) return Node_Id; -- Node4
function Next_Pragma
(N : Node_Id) return Node_Id; -- Node1
function Next_Rep_Item
(N : Node_Id) return Node_Id; -- Node5
function Next_Use_Clause
(N : Node_Id) return Node_Id; -- Node3
function No_Ctrl_Actions
(N : Node_Id) return Boolean; -- Flag7
function No_Elaboration_Check
(N : Node_Id) return Boolean; -- Flag14
function No_Entities_Ref_In_Spec
(N : Node_Id) return Boolean; -- Flag8
function No_Initialization
(N : Node_Id) return Boolean; -- Flag13
function No_Minimize_Eliminate
(N : Node_Id) return Boolean; -- Flag17
function No_Side_Effect_Removal
(N : Node_Id) return Boolean; -- Flag1
function No_Truncation
(N : Node_Id) return Boolean; -- Flag17
function Non_Aliased_Prefix
(N : Node_Id) return Boolean; -- Flag18
function Null_Present
(N : Node_Id) return Boolean; -- Flag13
function Null_Excluding_Subtype
(N : Node_Id) return Boolean; -- Flag16
function Null_Exclusion_Present
(N : Node_Id) return Boolean; -- Flag11
function Null_Exclusion_In_Return_Present
(N : Node_Id) return Boolean; -- Flag14
function Null_Record_Present
(N : Node_Id) return Boolean; -- Flag17
function Object_Definition
(N : Node_Id) return Node_Id; -- Node4
function Of_Present
(N : Node_Id) return Boolean; -- Flag16
function Original_Discriminant
(N : Node_Id) return Node_Id; -- Node2
function Original_Entity
(N : Node_Id) return Entity_Id; -- Node2
function Others_Discrete_Choices
(N : Node_Id) return List_Id; -- List1
function Out_Present
(N : Node_Id) return Boolean; -- Flag17
function Parameter_Associations
(N : Node_Id) return List_Id; -- List3
function Parameter_Specifications
(N : Node_Id) return List_Id; -- List3
function Parameter_Type
(N : Node_Id) return Node_Id; -- Node2
function Parent_Spec
(N : Node_Id) return Node_Id; -- Node4
function Position
(N : Node_Id) return Node_Id; -- Node2
function Pragma_Argument_Associations
(N : Node_Id) return List_Id; -- List2
function Pragma_Identifier
(N : Node_Id) return Node_Id; -- Node4
function Pragmas_After
(N : Node_Id) return List_Id; -- List5
function Pragmas_Before
(N : Node_Id) return List_Id; -- List4
function Pre_Post_Conditions
(N : Node_Id) return Node_Id; -- Node1
function Prefix
(N : Node_Id) return Node_Id; -- Node3
function Premature_Use
(N : Node_Id) return Node_Id; -- Node5
function Present_Expr
(N : Node_Id) return Uint; -- Uint3
function Prev_Ids
(N : Node_Id) return Boolean; -- Flag6
function Print_In_Hex
(N : Node_Id) return Boolean; -- Flag13
function Private_Declarations
(N : Node_Id) return List_Id; -- List3
function Private_Present
(N : Node_Id) return Boolean; -- Flag15
function Procedure_To_Call
(N : Node_Id) return Node_Id; -- Node2
function Proper_Body
(N : Node_Id) return Node_Id; -- Node1
function Protected_Definition
(N : Node_Id) return Node_Id; -- Node3
function Protected_Present
(N : Node_Id) return Boolean; -- Flag6
function Raises_Constraint_Error
(N : Node_Id) return Boolean; -- Flag7
function Range_Constraint
(N : Node_Id) return Node_Id; -- Node4
function Range_Expression
(N : Node_Id) return Node_Id; -- Node4
function Real_Range_Specification
(N : Node_Id) return Node_Id; -- Node4
function Realval
(N : Node_Id) return Ureal; -- Ureal3
function Reason
(N : Node_Id) return Uint; -- Uint3
function Record_Extension_Part
(N : Node_Id) return Node_Id; -- Node3
function Redundant_Use
(N : Node_Id) return Boolean; -- Flag13
function Renaming_Exception
(N : Node_Id) return Node_Id; -- Node2
function Result_Definition
(N : Node_Id) return Node_Id; -- Node4
function Return_Object_Declarations
(N : Node_Id) return List_Id; -- List3
function Return_Statement_Entity
(N : Node_Id) return Node_Id; -- Node5
function Reverse_Present
(N : Node_Id) return Boolean; -- Flag15
function Right_Opnd
(N : Node_Id) return Node_Id; -- Node3
function Rounded_Result
(N : Node_Id) return Boolean; -- Flag18
function SCIL_Controlling_Tag
(N : Node_Id) return Node_Id; -- Node5
function SCIL_Entity
(N : Node_Id) return Node_Id; -- Node4
function SCIL_Tag_Value
(N : Node_Id) return Node_Id; -- Node5
function SCIL_Target_Prim
(N : Node_Id) return Node_Id; -- Node2
function Scope
(N : Node_Id) return Node_Id; -- Node3
function Select_Alternatives
(N : Node_Id) return List_Id; -- List1
function Selector_Name
(N : Node_Id) return Node_Id; -- Node2
function Selector_Names
(N : Node_Id) return List_Id; -- List1
function Shift_Count_OK
(N : Node_Id) return Boolean; -- Flag4
function Source_Type
(N : Node_Id) return Entity_Id; -- Node1
function Specification
(N : Node_Id) return Node_Id; -- Node1
function Split_PPC
(N : Node_Id) return Boolean; -- Flag17
function Statements
(N : Node_Id) return List_Id; -- List3
function Storage_Pool
(N : Node_Id) return Node_Id; -- Node1
function Subpool_Handle_Name
(N : Node_Id) return Node_Id; -- Node4
function Strval
(N : Node_Id) return String_Id; -- Str3
function Subtype_Indication
(N : Node_Id) return Node_Id; -- Node5
function Subtype_Mark
(N : Node_Id) return Node_Id; -- Node4
function Subtype_Marks
(N : Node_Id) return List_Id; -- List2
function Suppress_Assignment_Checks
(N : Node_Id) return Boolean; -- Flag18
function Suppress_Loop_Warnings
(N : Node_Id) return Boolean; -- Flag17
function Synchronized_Present
(N : Node_Id) return Boolean; -- Flag7
function Tagged_Present
(N : Node_Id) return Boolean; -- Flag15
function Target_Type
(N : Node_Id) return Entity_Id; -- Node2
function Task_Definition
(N : Node_Id) return Node_Id; -- Node3
function Task_Present
(N : Node_Id) return Boolean; -- Flag5
function Then_Actions
(N : Node_Id) return List_Id; -- List2
function Then_Statements
(N : Node_Id) return List_Id; -- List2
function Treat_Fixed_As_Integer
(N : Node_Id) return Boolean; -- Flag14
function Triggering_Alternative
(N : Node_Id) return Node_Id; -- Node1
function Triggering_Statement
(N : Node_Id) return Node_Id; -- Node1
function TSS_Elist
(N : Node_Id) return Elist_Id; -- Elist3
function Type_Definition
(N : Node_Id) return Node_Id; -- Node3
function Uneval_Old_Accept
(N : Node_Id) return Boolean; -- Flag7
function Uneval_Old_Warn
(N : Node_Id) return Boolean; -- Flag18
function Unit
(N : Node_Id) return Node_Id; -- Node2
function Unknown_Discriminants_Present
(N : Node_Id) return Boolean; -- Flag13
function Unreferenced_In_Spec
(N : Node_Id) return Boolean; -- Flag7
function Variant_Part
(N : Node_Id) return Node_Id; -- Node4
function Variants
(N : Node_Id) return List_Id; -- List1
function Visible_Declarations
(N : Node_Id) return List_Id; -- List2
function Uninitialized_Variable
(N : Node_Id) return Node_Id; -- Node3
function Used_Operations
(N : Node_Id) return Elist_Id; -- Elist5
function Was_Expression_Function
(N : Node_Id) return Boolean; -- Flag18
function Was_Originally_Stub
(N : Node_Id) return Boolean; -- Flag13
function Withed_Body
(N : Node_Id) return Node_Id; -- Node1
-- End functions (note used by xsinfo utility program to end processing)
----------------------------
-- Node Update Procedures --
----------------------------
-- These are the corresponding node update routines, which again provide
-- a high level logical access with type checking. In addition to setting
-- the indicated field of the node N to the given Val, in the case of
-- tree pointers (List1-4), the parent pointer of the Val node is set to
-- point back to node N. This automates the setting of the parent pointer.
procedure Set_ABE_Is_Certain
(N : Node_Id; Val : Boolean := True); -- Flag18
procedure Set_Abort_Present
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Abortable_Part
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Abstract_Present
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_Accept_Handler_Records
(N : Node_Id; Val : List_Id); -- List5
procedure Set_Accept_Statement
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Access_Definition
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Access_To_Subprogram_Definition
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Access_Types_To_Process
(N : Node_Id; Val : Elist_Id); -- Elist2
procedure Set_Actions
(N : Node_Id; Val : List_Id); -- List1
procedure Set_Activation_Chain_Entity
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Acts_As_Spec
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_Actual_Designated_Subtype
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Address_Warning_Posted
(N : Node_Id; Val : Boolean := True); -- Flag18
procedure Set_Aggregate_Bounds
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Aliased_Present
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_All_Others
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_All_Present
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Alternatives
(N : Node_Id; Val : List_Id); -- List4
procedure Set_Ancestor_Part
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Atomic_Sync_Required
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Array_Aggregate
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Aspect_Rep_Item
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Assignment_OK
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Associated_Node
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Attribute_Name
(N : Node_Id; Val : Name_Id); -- Name2
procedure Set_At_End_Proc
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Aux_Decls_Node
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Backwards_OK
(N : Node_Id; Val : Boolean := True); -- Flag6
procedure Set_Bad_Is_Detected
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Body_Required
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Body_To_Inline
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Box_Present
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_By_Ref
(N : Node_Id; Val : Boolean := True); -- Flag5
procedure Set_Char_Literal_Value
(N : Node_Id; Val : Uint); -- Uint2
procedure Set_Chars
(N : Node_Id; Val : Name_Id); -- Name1
procedure Set_Check_Address_Alignment
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Choice_Parameter
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Choices
(N : Node_Id; Val : List_Id); -- List1
procedure Set_Class_Present
(N : Node_Id; Val : Boolean := True); -- Flag6
procedure Set_Classifications
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Cleanup_Actions
(N : Node_Id; Val : List_Id); -- List5
procedure Set_Comes_From_Extended_Return_Statement
(N : Node_Id; Val : Boolean := True); -- Flag18
procedure Set_Compile_Time_Known_Aggregate
(N : Node_Id; Val : Boolean := True); -- Flag18
procedure Set_Component_Associations
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Component_Clauses
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Component_Definition
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Component_Items
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Component_List
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Component_Name
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Componentwise_Assignment
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Condition
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Condition_Actions
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Config_Pragmas
(N : Node_Id; Val : List_Id); -- List4
procedure Set_Constant_Present
(N : Node_Id; Val : Boolean := True); -- Flag17
procedure Set_Constraint
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Constraints
(N : Node_Id; Val : List_Id); -- List1
procedure Set_Context_Installed
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Context_Items
(N : Node_Id; Val : List_Id); -- List1
procedure Set_Context_Pending
(N : Node_Id; Val : Boolean := True); -- Flag16
procedure Set_Contract_Test_Cases
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Controlling_Argument
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Conversion_OK
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Convert_To_Return_False
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Corresponding_Aspect
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Corresponding_Body
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Corresponding_Formal_Spec
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Corresponding_Generic_Association
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Corresponding_Integer_Value
(N : Node_Id; Val : Uint); -- Uint4
procedure Set_Corresponding_Spec
(N : Node_Id; Val : Entity_Id); -- Node5
procedure Set_Corresponding_Spec_Of_Stub
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Corresponding_Stub
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Dcheck_Function
(N : Node_Id; Val : Entity_Id); -- Node5
procedure Set_Declarations
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Default_Expression
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Default_Storage_Pool
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Default_Name
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Defining_Identifier
(N : Node_Id; Val : Entity_Id); -- Node1
procedure Set_Defining_Unit_Name
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Delay_Alternative
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Delay_Statement
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Delta_Expression
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Digits_Expression
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Discr_Check_Funcs_Built
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Discrete_Choices
(N : Node_Id; Val : List_Id); -- List4
procedure Set_Discrete_Range
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Discrete_Subtype_Definition
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Discrete_Subtype_Definitions
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Discriminant_Specifications
(N : Node_Id; Val : List_Id); -- List4
procedure Set_Discriminant_Type
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Do_Accessibility_Check
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Do_Discriminant_Check
(N : Node_Id; Val : Boolean := True); -- Flag1
procedure Set_Do_Division_Check
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Do_Length_Check
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_Do_Overflow_Check
(N : Node_Id; Val : Boolean := True); -- Flag17
procedure Set_Do_Range_Check
(N : Node_Id; Val : Boolean := True); -- Flag9
procedure Set_Do_Storage_Check
(N : Node_Id; Val : Boolean := True); -- Flag17
procedure Set_Do_Tag_Check
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Elaborate_All_Desirable
(N : Node_Id; Val : Boolean := True); -- Flag9
procedure Set_Elaborate_All_Present
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Elaborate_Desirable
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Elaborate_Present
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_Else_Actions
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Else_Statements
(N : Node_Id; Val : List_Id); -- List4
procedure Set_Elsif_Parts
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Enclosing_Variant
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_End_Label
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_End_Span
(N : Node_Id; Val : Uint); -- Uint5
procedure Set_Entity
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Entry_Body_Formal_Part
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Entry_Call_Alternative
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Entry_Call_Statement
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Entry_Direct_Name
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Entry_Index
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Entry_Index_Specification
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Etype
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Exception_Choices
(N : Node_Id; Val : List_Id); -- List4
procedure Set_Exception_Handlers
(N : Node_Id; Val : List_Id); -- List5
procedure Set_Exception_Junk
(N : Node_Id; Val : Boolean := True); -- Flag8
procedure Set_Exception_Label
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Expansion_Delayed
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Explicit_Actual_Parameter
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Explicit_Generic_Actual_Parameter
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Expression
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Expression_Copy
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Expressions
(N : Node_Id; Val : List_Id); -- List1
procedure Set_First_Bit
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_First_Inlined_Subprogram
(N : Node_Id; Val : Entity_Id); -- Node3
procedure Set_First_Name
(N : Node_Id; Val : Boolean := True); -- Flag5
procedure Set_First_Named_Actual
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_First_Real_Statement
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_First_Subtype_Link
(N : Node_Id; Val : Entity_Id); -- Node5
procedure Set_Float_Truncate
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Formal_Type_Definition
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Forwards_OK
(N : Node_Id; Val : Boolean := True); -- Flag5
procedure Set_From_Aspect_Specification
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_From_At_End
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_From_At_Mod
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_From_Conditional_Expression
(N : Node_Id; Val : Boolean := True); -- Flag1
procedure Set_From_Default
(N : Node_Id; Val : Boolean := True); -- Flag6
procedure Set_Generalized_Indexing
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Generic_Associations
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Generic_Formal_Declarations
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Generic_Parent
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Generic_Parent_Type
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Handled_Statement_Sequence
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Handler_List_Entry
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Has_Created_Identifier
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Has_Dereference_Action
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Has_Dynamic_Length_Check
(N : Node_Id; Val : Boolean := True); -- Flag10
procedure Set_Has_Dynamic_Range_Check
(N : Node_Id; Val : Boolean := True); -- Flag12
procedure Set_Has_Init_Expression
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Has_Local_Raise
(N : Node_Id; Val : Boolean := True); -- Flag8
procedure Set_Has_No_Elaboration_Code
(N : Node_Id; Val : Boolean := True); -- Flag17
procedure Set_Has_Pragma_Suppress_All
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Has_Private_View
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Has_Relative_Deadline_Pragma
(N : Node_Id; Val : Boolean := True); -- Flag9
procedure Set_Has_Self_Reference
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Has_SP_Choice
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Has_Storage_Size_Pragma
(N : Node_Id; Val : Boolean := True); -- Flag5
procedure Set_Has_Target_Names
(N : Node_Id; Val : Boolean := True); -- Flag8
procedure Set_Has_Wide_Character
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Has_Wide_Wide_Character
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Header_Size_Added
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Hidden_By_Use_Clause
(N : Node_Id; Val : Elist_Id); -- Elist4
procedure Set_High_Bound
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Identifier
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Interface_List
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Interface_Present
(N : Node_Id; Val : Boolean := True); -- Flag16
procedure Set_Implicit_With
(N : Node_Id; Val : Boolean := True); -- Flag16
procedure Set_Implicit_With_From_Instantiation
(N : Node_Id; Val : Boolean := True); -- Flag12
procedure Set_Import_Interface_Present
(N : Node_Id; Val : Boolean := True); -- Flag16
procedure Set_In_Present
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Includes_Infinities
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Incomplete_View
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Inherited_Discriminant
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Instance_Spec
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Intval
(N : Node_Id; Val : Uint); -- Uint3
procedure Set_Is_Abort_Block
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_Is_Accessibility_Actual
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Is_Analyzed_Pragma
(N : Node_Id; Val : Boolean := True); -- Flag5
procedure Set_Is_Asynchronous_Call_Block
(N : Node_Id; Val : Boolean := True); -- Flag7
procedure Set_Is_Boolean_Aspect
(N : Node_Id; Val : Boolean := True); -- Flag16
procedure Set_Is_Checked
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Is_Checked_Ghost_Pragma
(N : Node_Id; Val : Boolean := True); -- Flag3
procedure Set_Is_Component_Left_Opnd
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Is_Component_Right_Opnd
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Is_Controlling_Actual
(N : Node_Id; Val : Boolean := True); -- Flag16
procedure Set_Is_Delayed_Aspect
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Is_Disabled
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Is_Dynamic_Coextension
(N : Node_Id; Val : Boolean := True); -- Flag18
procedure Set_Is_Elsif
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Is_Entry_Barrier_Function
(N : Node_Id; Val : Boolean := True); -- Flag8
procedure Set_Is_Expanded_Build_In_Place_Call
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Is_Expanded_Contract
(N : Node_Id; Val : Boolean := True); -- Flag1
procedure Set_Is_Finalization_Wrapper
(N : Node_Id; Val : Boolean := True); -- Flag9
procedure Set_Is_Folded_In_Parser
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_Is_Generic_Contract_Pragma
(N : Node_Id; Val : Boolean := True); -- Flag2
procedure Set_Is_Ignored
(N : Node_Id; Val : Boolean := True); -- Flag9
procedure Set_Is_Ignored_Ghost_Pragma
(N : Node_Id; Val : Boolean := True); -- Flag8
procedure Set_Is_In_Discriminant_Check
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Is_Inherited_Pragma
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_Is_Machine_Number
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Is_Null_Loop
(N : Node_Id; Val : Boolean := True); -- Flag16
procedure Set_Is_Overloaded
(N : Node_Id; Val : Boolean := True); -- Flag5
procedure Set_Is_Power_Of_2_For_Shift
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Is_Prefixed_Call
(N : Node_Id; Val : Boolean := True); -- Flag17
procedure Set_Is_Protected_Subprogram_Body
(N : Node_Id; Val : Boolean := True); -- Flag7
procedure Set_Is_Qualified_Universal_Literal
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_Is_Static_Coextension
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Is_Static_Expression
(N : Node_Id; Val : Boolean := True); -- Flag6
procedure Set_Is_Subprogram_Descriptor
(N : Node_Id; Val : Boolean := True); -- Flag16
procedure Set_Is_Task_Allocation_Block
(N : Node_Id; Val : Boolean := True); -- Flag6
procedure Set_Is_Task_Body_Procedure
(N : Node_Id; Val : Boolean := True); -- Flag1
procedure Set_Is_Task_Master
(N : Node_Id; Val : Boolean := True); -- Flag5
procedure Set_Iteration_Scheme
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Iterator_Specification
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Itype
(N : Node_Id; Val : Entity_Id); -- Node1
procedure Set_Kill_Range_Check
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Last_Bit
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Last_Name
(N : Node_Id; Val : Boolean := True); -- Flag6
procedure Set_Library_Unit
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Label_Construct
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Left_Opnd
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Limited_View_Installed
(N : Node_Id; Val : Boolean := True); -- Flag18
procedure Set_Limited_Present
(N : Node_Id; Val : Boolean := True); -- Flag17
procedure Set_Literals
(N : Node_Id; Val : List_Id); -- List1
procedure Set_Local_Raise_Not_OK
(N : Node_Id; Val : Boolean := True); -- Flag7
procedure Set_Local_Raise_Statements
(N : Node_Id; Val : Elist_Id); -- Elist1
procedure Set_Loop_Actions
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Loop_Parameter_Specification
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Low_Bound
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Mod_Clause
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_More_Ids
(N : Node_Id; Val : Boolean := True); -- Flag5
procedure Set_Must_Be_Byte_Aligned
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Must_Not_Freeze
(N : Node_Id; Val : Boolean := True); -- Flag8
procedure Set_Must_Not_Override
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Must_Override
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Name
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Names
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Next_Entity
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Next_Exit_Statement
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Next_Implicit_With
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Next_Named_Actual
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Next_Pragma
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Next_Rep_Item
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Next_Use_Clause
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_No_Ctrl_Actions
(N : Node_Id; Val : Boolean := True); -- Flag7
procedure Set_No_Elaboration_Check
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_No_Entities_Ref_In_Spec
(N : Node_Id; Val : Boolean := True); -- Flag8
procedure Set_No_Initialization
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_No_Minimize_Eliminate
(N : Node_Id; Val : Boolean := True); -- Flag17
procedure Set_No_Side_Effect_Removal
(N : Node_Id; Val : Boolean := True); -- Flag1
procedure Set_No_Truncation
(N : Node_Id; Val : Boolean := True); -- Flag17
procedure Set_Non_Aliased_Prefix
(N : Node_Id; Val : Boolean := True); -- Flag18
procedure Set_Null_Present
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Null_Excluding_Subtype
(N : Node_Id; Val : Boolean := True); -- Flag16
procedure Set_Null_Exclusion_Present
(N : Node_Id; Val : Boolean := True); -- Flag11
procedure Set_Null_Exclusion_In_Return_Present
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Null_Record_Present
(N : Node_Id; Val : Boolean := True); -- Flag17
procedure Set_Object_Definition
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Of_Present
(N : Node_Id; Val : Boolean := True); -- Flag16
procedure Set_Original_Discriminant
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Original_Entity
(N : Node_Id; Val : Entity_Id); -- Node2
procedure Set_Others_Discrete_Choices
(N : Node_Id; Val : List_Id); -- List1
procedure Set_Out_Present
(N : Node_Id; Val : Boolean := True); -- Flag17
procedure Set_Parameter_Associations
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Parameter_Specifications
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Parameter_Type
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Parent_Spec
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Position
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Pragma_Argument_Associations
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Pragma_Identifier
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Pragmas_After
(N : Node_Id; Val : List_Id); -- List5
procedure Set_Pragmas_Before
(N : Node_Id; Val : List_Id); -- List4
procedure Set_Pre_Post_Conditions
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Prefix
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Premature_Use
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Present_Expr
(N : Node_Id; Val : Uint); -- Uint3
procedure Set_Prev_Ids
(N : Node_Id; Val : Boolean := True); -- Flag6
procedure Set_Print_In_Hex
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Private_Declarations
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Private_Present
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Procedure_To_Call
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Proper_Body
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Protected_Definition
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Protected_Present
(N : Node_Id; Val : Boolean := True); -- Flag6
procedure Set_Raises_Constraint_Error
(N : Node_Id; Val : Boolean := True); -- Flag7
procedure Set_Range_Constraint
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Range_Expression
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Real_Range_Specification
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Realval
(N : Node_Id; Val : Ureal); -- Ureal3
procedure Set_Reason
(N : Node_Id; Val : Uint); -- Uint3
procedure Set_Record_Extension_Part
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Redundant_Use
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Renaming_Exception
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Result_Definition
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Return_Object_Declarations
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Return_Statement_Entity
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Reverse_Present
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Right_Opnd
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Rounded_Result
(N : Node_Id; Val : Boolean := True); -- Flag18
procedure Set_SCIL_Controlling_Tag
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_SCIL_Entity
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_SCIL_Tag_Value
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_SCIL_Target_Prim
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Scope
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Select_Alternatives
(N : Node_Id; Val : List_Id); -- List1
procedure Set_Selector_Name
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Selector_Names
(N : Node_Id; Val : List_Id); -- List1
procedure Set_Shift_Count_OK
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_Source_Type
(N : Node_Id; Val : Entity_Id); -- Node1
procedure Set_Specification
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Split_PPC
(N : Node_Id; Val : Boolean); -- Flag17
procedure Set_Statements
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Storage_Pool
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Subpool_Handle_Name
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Strval
(N : Node_Id; Val : String_Id); -- Str3
procedure Set_Subtype_Indication
(N : Node_Id; Val : Node_Id); -- Node5
procedure Set_Subtype_Mark
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Subtype_Marks
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Suppress_Assignment_Checks
(N : Node_Id; Val : Boolean := True); -- Flag18
procedure Set_Suppress_Loop_Warnings
(N : Node_Id; Val : Boolean := True); -- Flag17
procedure Set_Synchronized_Present
(N : Node_Id; Val : Boolean := True); -- Flag7
procedure Set_Tagged_Present
(N : Node_Id; Val : Boolean := True); -- Flag15
procedure Set_Target_Type
(N : Node_Id; Val : Entity_Id); -- Node2
procedure Set_Task_Definition
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Task_Present
(N : Node_Id; Val : Boolean := True); -- Flag5
procedure Set_Then_Actions
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Then_Statements
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Treat_Fixed_As_Integer
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Triggering_Alternative
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_Triggering_Statement
(N : Node_Id; Val : Node_Id); -- Node1
procedure Set_TSS_Elist
(N : Node_Id; Val : Elist_Id); -- Elist3
procedure Set_Type_Definition
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Uneval_Old_Accept
(N : Node_Id; Val : Boolean := True); -- Flag7
procedure Set_Uneval_Old_Warn
(N : Node_Id; Val : Boolean := True); -- Flag18
procedure Set_Unit
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Unknown_Discriminants_Present
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Unreferenced_In_Spec
(N : Node_Id; Val : Boolean := True); -- Flag7
procedure Set_Variant_Part
(N : Node_Id; Val : Node_Id); -- Node4
procedure Set_Variants
(N : Node_Id; Val : List_Id); -- List1
procedure Set_Visible_Declarations
(N : Node_Id; Val : List_Id); -- List2
procedure Set_Uninitialized_Variable
(N : Node_Id; Val : Node_Id); -- Node3
procedure Set_Used_Operations
(N : Node_Id; Val : Elist_Id); -- Elist5
procedure Set_Was_Expression_Function
(N : Node_Id; Val : Boolean := True); -- Flag18
procedure Set_Was_Originally_Stub
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Withed_Body
(N : Node_Id; Val : Node_Id); -- Node1
-------------------------
-- Iterator Procedures --
-------------------------
-- The call to Next_xxx (N) is equivalent to N := Next_xxx (N)
procedure Next_Entity (N : in out Node_Id);
procedure Next_Named_Actual (N : in out Node_Id);
procedure Next_Rep_Item (N : in out Node_Id);
procedure Next_Use_Clause (N : in out Node_Id);
-------------------------------------------
-- Miscellaneous Tree Access Subprograms --
-------------------------------------------
function End_Location (N : Node_Id) return Source_Ptr;
-- N is an N_If_Statement or N_Case_Statement node, and this function
-- returns the location of the IF token in the END IF sequence by
-- translating the value of the End_Span field.
procedure Set_End_Location (N : Node_Id; S : Source_Ptr);
-- N is an N_If_Statement or N_Case_Statement node. This procedure sets
-- the End_Span field to correspond to the given value S. In other words,
-- End_Span is set to the difference between S and Sloc (N), the starting
-- location.
function Get_Pragma_Arg (Arg : Node_Id) return Node_Id;
-- Given an argument to a pragma Arg, this function returns the expression
-- for the argument. This is Arg itself, or, in the case where Arg is a
-- pragma argument association node, the expression from this node.
--------------------------------
-- Node_Kind Membership Tests --
--------------------------------
-- The following functions allow a convenient notation for testing whether
-- a Node_Kind value matches any one of a list of possible values. In each
-- case True is returned if the given T argument is equal to any of the V
-- arguments. Note that there is a similar set of functions defined in
-- Atree where the first argument is a Node_Id whose Nkind field is tested.
function Nkind_In
(T : Node_Kind;
V1 : Node_Kind;
V2 : Node_Kind) return Boolean;
function Nkind_In
(T : Node_Kind;
V1 : Node_Kind;
V2 : Node_Kind;
V3 : Node_Kind) return Boolean;
function Nkind_In
(T : Node_Kind;
V1 : Node_Kind;
V2 : Node_Kind;
V3 : Node_Kind;
V4 : Node_Kind) return Boolean;
function Nkind_In
(T : Node_Kind;
V1 : Node_Kind;
V2 : Node_Kind;
V3 : Node_Kind;
V4 : Node_Kind;
V5 : Node_Kind) return Boolean;
function Nkind_In
(T : Node_Kind;
V1 : Node_Kind;
V2 : Node_Kind;
V3 : Node_Kind;
V4 : Node_Kind;
V5 : Node_Kind;
V6 : Node_Kind) return Boolean;
function Nkind_In
(T : Node_Kind;
V1 : Node_Kind;
V2 : Node_Kind;
V3 : Node_Kind;
V4 : Node_Kind;
V5 : Node_Kind;
V6 : Node_Kind;
V7 : Node_Kind) return Boolean;
function Nkind_In
(T : Node_Kind;
V1 : Node_Kind;
V2 : Node_Kind;
V3 : Node_Kind;
V4 : Node_Kind;
V5 : Node_Kind;
V6 : Node_Kind;
V7 : Node_Kind;
V8 : Node_Kind) return Boolean;
function Nkind_In
(T : Node_Kind;
V1 : Node_Kind;
V2 : Node_Kind;
V3 : Node_Kind;
V4 : Node_Kind;
V5 : Node_Kind;
V6 : Node_Kind;
V7 : Node_Kind;
V8 : Node_Kind;
V9 : Node_Kind) return Boolean;
pragma Inline (Nkind_In);
-- Inline all above functions
-----------------------
-- Utility Functions --
-----------------------
procedure Map_Pragma_Name (From, To : Name_Id);
-- Used in the implementation of pragma Rename_Pragma. Maps pragma name
-- From to pragma name To, so From can be used as a synonym for To.
Too_Many_Pragma_Mappings : exception;
-- Raised if Map_Pragma_Name is called too many times. We expect that few
-- programs will use it at all, and those that do will use it approximately
-- once or twice.
function Pragma_Name (N : Node_Id) return Name_Id;
-- Obtain the name of pragma N from the Chars field of its identifier. If
-- the pragma has been renamed using Rename_Pragma, this routine returns
-- the name of the renaming.
function Pragma_Name_Unmapped (N : Node_Id) return Name_Id;
-- Obtain the name of pragma N from the Chars field of its identifier. This
-- form of name extraction does not take into account renamings performed
-- by Rename_Pragma.
-----------------------------
-- Syntactic Parent Tables --
-----------------------------
-- These tables show for each node, and for each of the five fields,
-- whether the corresponding field is syntactic (True) or semantic (False).
-- Unused entries are also set to False.
subtype Field_Num is Natural range 1 .. 5;
Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := (
-- Following entries can be built automatically from the sinfo sources
-- using the makeisf utility (currently this program is in spitbol).
N_Identifier =>
(1 => True, -- Chars (Name1)
2 => False, -- Original_Discriminant (Node2-Sem)
3 => False, -- unused
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Integer_Literal =>
(1 => False, -- unused
2 => False, -- Original_Entity (Node2-Sem)
3 => True, -- Intval (Uint3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Real_Literal =>
(1 => False, -- unused
2 => False, -- Original_Entity (Node2-Sem)
3 => True, -- Realval (Ureal3)
4 => False, -- Corresponding_Integer_Value (Uint4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Character_Literal =>
(1 => True, -- Chars (Name1)
2 => True, -- Char_Literal_Value (Uint2)
3 => False, -- unused
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_String_Literal =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Strval (Str3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Pragma =>
(1 => False, -- Next_Pragma (Node1-Sem)
2 => True, -- Pragma_Argument_Associations (List2)
3 => False, -- Corresponding_Aspect (Node3-Sem)
4 => True, -- Pragma_Identifier (Node4)
5 => False), -- Next_Rep_Item (Node5-Sem)
N_Pragma_Argument_Association =>
(1 => True, -- Chars (Name1)
2 => False, -- Expression_Copy (Node2-Sem)
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Defining_Identifier =>
(1 => True, -- Chars (Name1)
2 => False, -- Next_Entity (Node2-Sem)
3 => False, -- Scope (Node3-Sem)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Full_Type_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- Incomplete_View (Node2-Sem)
3 => True, -- Type_Definition (Node3)
4 => True, -- Discriminant_Specifications (List4)
5 => False), -- unused
N_Subtype_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => False, -- unused
4 => False, -- Generic_Parent_Type (Node4-Sem)
5 => True), -- Subtype_Indication (Node5)
N_Subtype_Indication =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Constraint (Node3)
4 => True, -- Subtype_Mark (Node4)
5 => False), -- Etype (Node5-Sem)
N_Object_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- Handler_List_Entry (Node2-Sem)
3 => True, -- Expression (Node3)
4 => True, -- Object_Definition (Node4)
5 => False), -- Corresponding_Generic_Association (Node5-Sem)
N_Number_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Derived_Type_Definition =>
(1 => False, -- unused
2 => True, -- Interface_List (List2)
3 => True, -- Record_Extension_Part (Node3)
4 => False, -- unused
5 => True), -- Subtype_Indication (Node5)
N_Range_Constraint =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => True, -- Range_Expression (Node4)
5 => False), -- unused
N_Range =>
(1 => True, -- Low_Bound (Node1)
2 => True, -- High_Bound (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Enumeration_Type_Definition =>
(1 => True, -- Literals (List1)
2 => False, -- unused
3 => False, -- unused
4 => True, -- End_Label (Node4)
5 => False), -- unused
N_Defining_Character_Literal =>
(1 => True, -- Chars (Name1)
2 => False, -- Next_Entity (Node2-Sem)
3 => False, -- Scope (Node3-Sem)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Signed_Integer_Type_Definition =>
(1 => True, -- Low_Bound (Node1)
2 => True, -- High_Bound (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Modular_Type_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Floating_Point_Definition =>
(1 => False, -- unused
2 => True, -- Digits_Expression (Node2)
3 => False, -- unused
4 => True, -- Real_Range_Specification (Node4)
5 => False), -- unused
N_Real_Range_Specification =>
(1 => True, -- Low_Bound (Node1)
2 => True, -- High_Bound (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Ordinary_Fixed_Point_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Delta_Expression (Node3)
4 => True, -- Real_Range_Specification (Node4)
5 => False), -- unused
N_Decimal_Fixed_Point_Definition =>
(1 => False, -- unused
2 => True, -- Digits_Expression (Node2)
3 => True, -- Delta_Expression (Node3)
4 => True, -- Real_Range_Specification (Node4)
5 => False), -- unused
N_Digits_Constraint =>
(1 => False, -- unused
2 => True, -- Digits_Expression (Node2)
3 => False, -- unused
4 => True, -- Range_Constraint (Node4)
5 => False), -- unused
N_Unconstrained_Array_Definition =>
(1 => False, -- unused
2 => True, -- Subtype_Marks (List2)
3 => False, -- unused
4 => True, -- Component_Definition (Node4)
5 => False), -- unused
N_Constrained_Array_Definition =>
(1 => False, -- unused
2 => True, -- Discrete_Subtype_Definitions (List2)
3 => False, -- unused
4 => True, -- Component_Definition (Node4)
5 => False), -- unused
N_Component_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Access_Definition (Node3)
4 => False, -- unused
5 => True), -- Subtype_Indication (Node5)
N_Discriminant_Specification =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => True), -- Discriminant_Type (Node5)
N_Index_Or_Discriminant_Constraint =>
(1 => True, -- Constraints (List1)
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Discriminant_Association =>
(1 => True, -- Selector_Names (List1)
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Record_Definition =>
(1 => True, -- Component_List (Node1)
2 => True, -- Interface_List (List2)
3 => False, -- unused
4 => True, -- End_Label (Node4)
5 => False), -- unused
N_Component_List =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Component_Items (List3)
4 => True, -- Variant_Part (Node4)
5 => False), -- unused
N_Component_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => True, -- Component_Definition (Node4)
5 => False), -- unused
N_Variant_Part =>
(1 => True, -- Variants (List1)
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Variant =>
(1 => True, -- Component_List (Node1)
2 => False, -- Enclosing_Variant (Node2-Sem)
3 => False, -- Present_Expr (Uint3-Sem)
4 => True, -- Discrete_Choices (List4)
5 => False), -- Dcheck_Function (Node5-Sem)
N_Others_Choice =>
(1 => False, -- Others_Discrete_Choices (List1-Sem)
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Access_To_Object_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => True), -- Subtype_Indication (Node5)
N_Access_Function_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Parameter_Specifications (List3)
4 => True, -- Result_Definition (Node4)
5 => False), -- unused
N_Access_Procedure_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Parameter_Specifications (List3)
4 => False, -- unused
5 => False), -- unused
N_Access_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Access_To_Subprogram_Definition (Node3)
4 => True, -- Subtype_Mark (Node4)
5 => False), -- unused
N_Incomplete_Type_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => False, -- unused
4 => True, -- Discriminant_Specifications (List4)
5 => False), -- Premature_Use
N_Explicit_Dereference =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Prefix (Node3)
4 => False, -- Actual_Designated_Subtype (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Indexed_Component =>
(1 => True, -- Expressions (List1)
2 => False, -- unused
3 => True, -- Prefix (Node3)
4 => False, -- Generalized_Indexing (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Slice =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Prefix (Node3)
4 => True, -- Discrete_Range (Node4)
5 => False), -- Etype (Node5-Sem)
N_Selected_Component =>
(1 => False, -- unused
2 => True, -- Selector_Name (Node2)
3 => True, -- Prefix (Node3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Attribute_Reference =>
(1 => True, -- Expressions (List1)
2 => True, -- Attribute_Name (Name2)
3 => True, -- Prefix (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Aggregate =>
(1 => True, -- Expressions (List1)
2 => True, -- Component_Associations (List2)
3 => False, -- Aggregate_Bounds (Node3-Sem)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Component_Association =>
(1 => True, -- Choices (List1)
2 => False, -- Loop_Actions (List2-Sem)
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Iterated_Component_Association =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => True, -- Discrete_Choices (List4)
5 => False), -- unused
N_Delta_Aggregate =>
(1 => False, -- Expressions (List1)
2 => True, -- Component_Associations (List2)
3 => True, -- Expression (Node3)
4 => False, -- Unused
5 => False), -- Etype (Node5-Sem)
N_Extension_Aggregate =>
(1 => True, -- Expressions (List1)
2 => True, -- Component_Associations (List2)
3 => True, -- Ancestor_Part (Node3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Null =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_And_Then =>
(1 => False, -- Actions (List1-Sem)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Or_Else =>
(1 => False, -- Actions (List1-Sem)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_In =>
(1 => False, -- unused
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => True, -- Alternatives (List4)
5 => False), -- Etype (Node5-Sem)
N_Not_In =>
(1 => False, -- unused
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => True, -- Alternatives (List4)
5 => False), -- Etype (Node5-Sem)
N_Op_And =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Or =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Xor =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Eq =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Ne =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Lt =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Le =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Gt =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Ge =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Add =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Subtract =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Concat =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Multiply =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Divide =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Mod =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Rem =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Expon =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Plus =>
(1 => True, -- Chars (Name1)
2 => False, -- unused
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Minus =>
(1 => True, -- Chars (Name1)
2 => False, -- unused
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Abs =>
(1 => True, -- Chars (Name1)
2 => False, -- unused
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Not =>
(1 => True, -- Chars (Name1)
2 => False, -- unused
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Type_Conversion =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => True, -- Subtype_Mark (Node4)
5 => False), -- Etype (Node5-Sem)
N_Qualified_Expression =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => True, -- Subtype_Mark (Node4)
5 => False), -- Etype (Node5-Sem)
N_Quantified_Expression =>
(1 => True, -- Condition (Node1)
2 => True, -- Iterator_Specification
3 => False, -- unused
4 => True, -- Loop_Parameter_Specification (Node4)
5 => False), -- Etype (Node5-Sem)
N_Allocator =>
(1 => False, -- Storage_Pool (Node1-Sem)
2 => False, -- Procedure_To_Call (Node2-Sem)
3 => True, -- Expression (Node3)
4 => True, -- Subpool_Handle_Name (Node4)
5 => False), -- Etype (Node5-Sem)
N_Null_Statement =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Label =>
(1 => True, -- Identifier (Node1)
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Assignment_Statement =>
(1 => False, -- unused
2 => True, -- Name (Node2)
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Target_Name =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_If_Statement =>
(1 => True, -- Condition (Node1)
2 => True, -- Then_Statements (List2)
3 => True, -- Elsif_Parts (List3)
4 => True, -- Else_Statements (List4)
5 => True), -- End_Span (Uint5)
N_Elsif_Part =>
(1 => True, -- Condition (Node1)
2 => True, -- Then_Statements (List2)
3 => False, -- Condition_Actions (List3-Sem)
4 => False, -- unused
5 => False), -- unused
N_Case_Expression =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => True, -- Alternatives (List4)
5 => False), -- unused
N_Case_Expression_Alternative =>
(1 => False, -- Actions (List1-Sem)
2 => False, -- unused
3 => True, -- Statements (List3)
4 => True, -- Expression (Node4)
5 => False), -- unused
N_Case_Statement =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => True, -- Alternatives (List4)
5 => True), -- End_Span (Uint5)
N_Case_Statement_Alternative =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Statements (List3)
4 => True, -- Discrete_Choices (List4)
5 => False), -- unused
N_Loop_Statement =>
(1 => True, -- Identifier (Node1)
2 => True, -- Iteration_Scheme (Node2)
3 => True, -- Statements (List3)
4 => True, -- End_Label (Node4)
5 => False), -- unused
N_Iteration_Scheme =>
(1 => True, -- Condition (Node1)
2 => True, -- Iterator_Specification (Node2)
3 => False, -- Condition_Actions (List3-Sem)
4 => True, -- Loop_Parameter_Specification (Node4)
5 => False), -- unused
N_Loop_Parameter_Specification =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => False, -- unused
4 => True, -- Discrete_Subtype_Definition (Node4)
5 => False), -- unused
N_Iterator_Specification =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Name (Node2)
3 => False, -- Unused
4 => False, -- Unused
5 => True), -- Subtype_Indication (Node5)
N_Block_Statement =>
(1 => True, -- Identifier (Node1)
2 => True, -- Declarations (List2)
3 => False, -- Activation_Chain_Entity (Node3-Sem)
4 => True, -- Handled_Statement_Sequence (Node4)
5 => False), -- unused
N_Exit_Statement =>
(1 => True, -- Condition (Node1)
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Goto_Statement =>
(1 => False, -- unused
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Subprogram_Declaration =>
(1 => True, -- Specification (Node1)
2 => False, -- unused
3 => False, -- Body_To_Inline (Node3-Sem)
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- Corresponding_Body (Node5-Sem)
N_Abstract_Subprogram_Declaration =>
(1 => True, -- Specification (Node1)
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Function_Specification =>
(1 => True, -- Defining_Unit_Name (Node1)
2 => False, -- unused
3 => True, -- Parameter_Specifications (List3)
4 => True, -- Result_Definition (Node4)
5 => False), -- Generic_Parent (Node5-Sem)
N_Procedure_Specification =>
(1 => True, -- Defining_Unit_Name (Node1)
2 => False, -- unused
3 => True, -- Parameter_Specifications (List3)
4 => False, -- unused
5 => False), -- Generic_Parent (Node5-Sem)
N_Designator =>
(1 => True, -- Identifier (Node1)
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Defining_Program_Unit_Name =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Operator_Symbol =>
(1 => True, -- Chars (Name1)
2 => False, -- unused
3 => True, -- Strval (Str3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Defining_Operator_Symbol =>
(1 => True, -- Chars (Name1)
2 => False, -- Next_Entity (Node2-Sem)
3 => False, -- Scope (Node3-Sem)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Parameter_Specification =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Parameter_Type (Node2)
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- Default_Expression (Node5-Sem)
N_Subprogram_Body =>
(1 => True, -- Specification (Node1)
2 => True, -- Declarations (List2)
3 => False, -- Activation_Chain_Entity (Node3-Sem)
4 => True, -- Handled_Statement_Sequence (Node4)
5 => False), -- Corresponding_Spec (Node5-Sem)
N_Expression_Function =>
(1 => True, -- Specification (Node1)
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Procedure_Call_Statement =>
(1 => False, -- Controlling_Argument (Node1-Sem)
2 => True, -- Name (Node2)
3 => True, -- Parameter_Associations (List3)
4 => False, -- First_Named_Actual (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Function_Call =>
(1 => False, -- Controlling_Argument (Node1-Sem)
2 => True, -- Name (Node2)
3 => True, -- Parameter_Associations (List3)
4 => False, -- First_Named_Actual (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Parameter_Association =>
(1 => False, -- unused
2 => True, -- Selector_Name (Node2)
3 => True, -- Explicit_Actual_Parameter (Node3)
4 => False, -- Next_Named_Actual (Node4-Sem)
5 => False), -- unused
N_Simple_Return_Statement =>
(1 => False, -- Storage_Pool (Node1-Sem)
2 => False, -- Procedure_To_Call (Node2-Sem)
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- Return_Statement_Entity (Node5-Sem)
N_Extended_Return_Statement =>
(1 => False, -- Storage_Pool (Node1-Sem)
2 => False, -- Procedure_To_Call (Node2-Sem)
3 => True, -- Return_Object_Declarations (List3)
4 => True, -- Handled_Statement_Sequence (Node4)
5 => False), -- Return_Statement_Entity (Node5-Sem)
N_Package_Declaration =>
(1 => True, -- Specification (Node1)
2 => False, -- unused
3 => False, -- Activation_Chain_Entity (Node3-Sem)
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- Corresponding_Body (Node5-Sem)
N_Package_Specification =>
(1 => True, -- Defining_Unit_Name (Node1)
2 => True, -- Visible_Declarations (List2)
3 => True, -- Private_Declarations (List3)
4 => True, -- End_Label (Node4)
5 => False), -- Generic_Parent (Node5-Sem)
N_Package_Body =>
(1 => True, -- Defining_Unit_Name (Node1)
2 => True, -- Declarations (List2)
3 => False, -- unused
4 => True, -- Handled_Statement_Sequence (Node4)
5 => False), -- Corresponding_Spec (Node5-Sem)
N_Private_Type_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => False, -- unused
4 => True, -- Discriminant_Specifications (List4)
5 => False), -- unused
N_Private_Extension_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Interface_List (List2)
3 => False, -- unused
4 => True, -- Discriminant_Specifications (List4)
5 => True), -- Subtype_Indication (Node5)
N_Use_Package_Clause =>
(1 => False, -- unused
2 => True, -- Names (List2)
3 => False, -- Next_Use_Clause (Node3-Sem)
4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
5 => False), -- unused
N_Use_Type_Clause =>
(1 => False, -- unused
2 => True, -- Subtype_Marks (List2)
3 => False, -- Next_Use_Clause (Node3-Sem)
4 => False, -- Hidden_By_Use_Clause (Elist4-Sem)
5 => False), -- unused
N_Object_Renaming_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Name (Node2)
3 => True, -- Access_Definition (Node3)
4 => True, -- Subtype_Mark (Node4)
5 => False), -- Corresponding_Generic_Association (Node5-Sem)
N_Exception_Renaming_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Package_Renaming_Declaration =>
(1 => True, -- Defining_Unit_Name (Node1)
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- unused
N_Subprogram_Renaming_Declaration =>
(1 => True, -- Specification (Node1)
2 => True, -- Name (Node2)
3 => False, -- Corresponding_Formal_Spec (Node3-Sem)
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- Corresponding_Spec (Node5-Sem)
N_Generic_Package_Renaming_Declaration =>
(1 => True, -- Defining_Unit_Name (Node1)
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- unused
N_Generic_Procedure_Renaming_Declaration =>
(1 => True, -- Defining_Unit_Name (Node1)
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- unused
N_Generic_Function_Renaming_Declaration =>
(1 => True, -- Defining_Unit_Name (Node1)
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- unused
N_Task_Type_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Interface_List (List2)
3 => True, -- Task_Definition (Node3)
4 => True, -- Discriminant_Specifications (List4)
5 => False), -- Corresponding_Body (Node5-Sem)
N_Single_Task_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Interface_List (List2)
3 => True, -- Task_Definition (Node3)
4 => False, -- unused
5 => False), -- unused
N_Task_Definition =>
(1 => False, -- unused
2 => True, -- Visible_Declarations (List2)
3 => True, -- Private_Declarations (List3)
4 => True, -- End_Label (Node4)
5 => False), -- unused
N_Task_Body =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Declarations (List2)
3 => False, -- Activation_Chain_Entity (Node3-Sem)
4 => True, -- Handled_Statement_Sequence (Node4)
5 => False), -- Corresponding_Spec (Node5-Sem)
N_Protected_Type_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Interface_List (List2)
3 => True, -- Protected_Definition (Node3)
4 => True, -- Discriminant_Specifications (List4)
5 => False), -- Corresponding_Body (Node5-Sem)
N_Single_Protected_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Interface_List (List2)
3 => True, -- Protected_Definition (Node3)
4 => False, -- unused
5 => False), -- unused
N_Protected_Definition =>
(1 => False, -- unused
2 => True, -- Visible_Declarations (List2)
3 => True, -- Private_Declarations (List3)
4 => True, -- End_Label (Node4)
5 => False), -- unused
N_Protected_Body =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Declarations (List2)
3 => False, -- unused
4 => True, -- End_Label (Node4)
5 => False), -- Corresponding_Spec (Node5-Sem)
N_Entry_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => True, -- Parameter_Specifications (List3)
4 => True, -- Discrete_Subtype_Definition (Node4)
5 => False), -- Corresponding_Body (Node5-Sem)
N_Accept_Statement =>
(1 => True, -- Entry_Direct_Name (Node1)
2 => True, -- Declarations (List2)
3 => True, -- Parameter_Specifications (List3)
4 => True, -- Handled_Statement_Sequence (Node4)
5 => True), -- Entry_Index (Node5)
N_Entry_Body =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Declarations (List2)
3 => False, -- Activation_Chain_Entity (Node3-Sem)
4 => True, -- Handled_Statement_Sequence (Node4)
5 => True), -- Entry_Body_Formal_Part (Node5)
N_Entry_Body_Formal_Part =>
(1 => True, -- Condition (Node1)
2 => False, -- unused
3 => True, -- Parameter_Specifications (List3)
4 => True, -- Entry_Index_Specification (Node4)
5 => False), -- unused
N_Entry_Index_Specification =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => False, -- unused
4 => True, -- Discrete_Subtype_Definition (Node4)
5 => False), -- unused
N_Entry_Call_Statement =>
(1 => False, -- unused
2 => True, -- Name (Node2)
3 => True, -- Parameter_Associations (List3)
4 => False, -- First_Named_Actual (Node4-Sem)
5 => False), -- unused
N_Requeue_Statement =>
(1 => False, -- unused
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Delay_Until_Statement =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Delay_Relative_Statement =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Selective_Accept =>
(1 => True, -- Select_Alternatives (List1)
2 => False, -- unused
3 => False, -- unused
4 => True, -- Else_Statements (List4)
5 => False), -- unused
N_Accept_Alternative =>
(1 => True, -- Condition (Node1)
2 => True, -- Accept_Statement (Node2)
3 => True, -- Statements (List3)
4 => True, -- Pragmas_Before (List4)
5 => False), -- Accept_Handler_Records (List5-Sem)
N_Delay_Alternative =>
(1 => True, -- Condition (Node1)
2 => True, -- Delay_Statement (Node2)
3 => True, -- Statements (List3)
4 => True, -- Pragmas_Before (List4)
5 => False), -- unused
N_Terminate_Alternative =>
(1 => True, -- Condition (Node1)
2 => False, -- unused
3 => False, -- unused
4 => True, -- Pragmas_Before (List4)
5 => True), -- Pragmas_After (List5)
N_Timed_Entry_Call =>
(1 => True, -- Entry_Call_Alternative (Node1)
2 => False, -- unused
3 => False, -- unused
4 => True, -- Delay_Alternative (Node4)
5 => False), -- unused
N_Entry_Call_Alternative =>
(1 => True, -- Entry_Call_Statement (Node1)
2 => False, -- unused
3 => True, -- Statements (List3)
4 => True, -- Pragmas_Before (List4)
5 => False), -- unused
N_Conditional_Entry_Call =>
(1 => True, -- Entry_Call_Alternative (Node1)
2 => False, -- unused
3 => False, -- unused
4 => True, -- Else_Statements (List4)
5 => False), -- unused
N_Asynchronous_Select =>
(1 => True, -- Triggering_Alternative (Node1)
2 => True, -- Abortable_Part (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Triggering_Alternative =>
(1 => True, -- Triggering_Statement (Node1)
2 => False, -- unused
3 => True, -- Statements (List3)
4 => True, -- Pragmas_Before (List4)
5 => False), -- unused
N_Abortable_Part =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Statements (List3)
4 => False, -- unused
5 => False), -- unused
N_Abort_Statement =>
(1 => False, -- unused
2 => True, -- Names (List2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Compilation_Unit =>
(1 => True, -- Context_Items (List1)
2 => True, -- Unit (Node2)
3 => False, -- First_Inlined_Subprogram (Node3-Sem)
4 => False, -- Library_Unit (Node4-Sem)
5 => True), -- Aux_Decls_Node (Node5)
N_Compilation_Unit_Aux =>
(1 => True, -- Actions (List1)
2 => True, -- Declarations (List2)
3 => False, -- Default_Storage_Pool (Node3)
4 => True, -- Config_Pragmas (List4)
5 => True), -- Pragmas_After (List5)
N_With_Clause =>
(1 => False, -- unused
2 => True, -- Name (Node2)
3 => False, -- unused
4 => False, -- Library_Unit (Node4-Sem)
5 => False), -- Corresponding_Spec (Node5-Sem)
N_Subprogram_Body_Stub =>
(1 => True, -- Specification (Node1)
2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
3 => False, -- unused
4 => False, -- Library_Unit (Node4-Sem)
5 => False), -- Corresponding_Body (Node5-Sem)
N_Package_Body_Stub =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
3 => False, -- unused
4 => False, -- Library_Unit (Node4-Sem)
5 => False), -- Corresponding_Body (Node5-Sem)
N_Task_Body_Stub =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
3 => False, -- unused
4 => False, -- Library_Unit (Node4-Sem)
5 => False), -- Corresponding_Body (Node5-Sem)
N_Protected_Body_Stub =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- Corresponding_Spec_Of_Stub (Node2-Sem)
3 => False, -- unused
4 => False, -- Library_Unit (Node4-Sem)
5 => False), -- Corresponding_Body (Node5-Sem)
N_Subunit =>
(1 => True, -- Proper_Body (Node1)
2 => True, -- Name (Node2)
3 => False, -- Corresponding_Stub (Node3-Sem)
4 => False, -- unused
5 => False), -- unused
N_Exception_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => False, -- Expression (Node3-Sem)
4 => False, -- unused
5 => False), -- unused
N_Handled_Sequence_Of_Statements =>
(1 => True, -- At_End_Proc (Node1)
2 => False, -- First_Real_Statement (Node2-Sem)
3 => True, -- Statements (List3)
4 => True, -- End_Label (Node4)
5 => True), -- Exception_Handlers (List5)
N_Exception_Handler =>
(1 => False, -- Local_Raise_Statements (Elist1)
2 => True, -- Choice_Parameter (Node2)
3 => True, -- Statements (List3)
4 => True, -- Exception_Choices (List4)
5 => False), -- Exception_Label (Node5)
N_Raise_Statement =>
(1 => False, -- unused
2 => True, -- Name (Node2)
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Raise_Expression =>
(1 => False, -- unused
2 => True, -- Name (Node2)
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Generic_Subprogram_Declaration =>
(1 => True, -- Specification (Node1)
2 => True, -- Generic_Formal_Declarations (List2)
3 => False, -- unused
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- Corresponding_Body (Node5-Sem)
N_Generic_Package_Declaration =>
(1 => True, -- Specification (Node1)
2 => True, -- Generic_Formal_Declarations (List2)
3 => False, -- Activation_Chain_Entity (Node3-Sem)
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- Corresponding_Body (Node5-Sem)
N_Package_Instantiation =>
(1 => True, -- Defining_Unit_Name (Node1)
2 => True, -- Name (Node2)
3 => True, -- Generic_Associations (List3)
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- Instance_Spec (Node5-Sem)
N_Procedure_Instantiation =>
(1 => True, -- Defining_Unit_Name (Node1)
2 => True, -- Name (Node2)
3 => True, -- Generic_Associations (List3)
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- Instance_Spec (Node5-Sem)
N_Function_Instantiation =>
(1 => True, -- Defining_Unit_Name (Node1)
2 => True, -- Name (Node2)
3 => True, -- Generic_Associations (List3)
4 => False, -- Parent_Spec (Node4-Sem)
5 => False), -- Instance_Spec (Node5-Sem)
N_Generic_Association =>
(1 => True, -- Explicit_Generic_Actual_Parameter (Node1)
2 => True, -- Selector_Name (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Formal_Object_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => True, -- Access_Definition (Node3)
4 => True, -- Subtype_Mark (Node4)
5 => True), -- Default_Expression (Node5)
N_Formal_Type_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- unused
3 => True, -- Formal_Type_Definition (Node3)
4 => True, -- Discriminant_Specifications (List4)
5 => False), -- unused
N_Formal_Private_Type_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Formal_Incomplete_Type_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Formal_Derived_Type_Definition =>
(1 => False, -- unused
2 => True, -- Interface_List (List2)
3 => False, -- unused
4 => True, -- Subtype_Mark (Node4)
5 => False), -- unused
N_Formal_Discrete_Type_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Formal_Signed_Integer_Type_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Formal_Modular_Type_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Formal_Floating_Point_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Formal_Ordinary_Fixed_Point_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Formal_Decimal_Fixed_Point_Definition =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Formal_Concrete_Subprogram_Declaration =>
(1 => True, -- Specification (Node1)
2 => True, -- Default_Name (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Formal_Abstract_Subprogram_Declaration =>
(1 => True, -- Specification (Node1)
2 => True, -- Default_Name (Node2)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Formal_Package_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => True, -- Name (Node2)
3 => True, -- Generic_Associations (List3)
4 => False, -- unused
5 => False), -- Instance_Spec (Node5-Sem)
N_Attribute_Definition_Clause =>
(1 => True, -- Chars (Name1)
2 => True, -- Name (Node2)
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- Next_Rep_Item (Node5-Sem)
N_Aspect_Specification =>
(1 => True, -- Identifier (Node1)
2 => False, -- Aspect_Rep_Item (Node2-Sem)
3 => True, -- Expression (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Next_Rep_Item (Node5-Sem)
N_Enumeration_Representation_Clause =>
(1 => True, -- Identifier (Node1)
2 => False, -- unused
3 => True, -- Array_Aggregate (Node3)
4 => False, -- unused
5 => False), -- Next_Rep_Item (Node5-Sem)
N_Record_Representation_Clause =>
(1 => True, -- Identifier (Node1)
2 => True, -- Mod_Clause (Node2)
3 => True, -- Component_Clauses (List3)
4 => False, -- unused
5 => False), -- Next_Rep_Item (Node5-Sem)
N_Component_Clause =>
(1 => True, -- Component_Name (Node1)
2 => True, -- Position (Node2)
3 => True, -- First_Bit (Node3)
4 => True, -- Last_Bit (Node4)
5 => False), -- unused
N_Code_Statement =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Op_Rotate_Left =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Rotate_Right =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Shift_Left =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Shift_Right_Arithmetic =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Op_Shift_Right =>
(1 => True, -- Chars (Name1)
2 => True, -- Left_Opnd (Node2)
3 => True, -- Right_Opnd (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Delta_Constraint =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Delta_Expression (Node3)
4 => True, -- Range_Constraint (Node4)
5 => False), -- unused
N_At_Clause =>
(1 => True, -- Identifier (Node1)
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Mod_Clause =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => True, -- Pragmas_Before (List4)
5 => False), -- unused
N_If_Expression =>
(1 => True, -- Expressions (List1)
2 => False, -- Then_Actions (List2-Sem)
3 => False, -- Else_Actions (List3-Sem)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Compound_Statement =>
(1 => True, -- Actions (List1)
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Contract =>
(1 => False, -- Pre_Post_Conditions (Node1-Sem)
2 => False, -- Contract_Test_Cases (Node2-Sem)
3 => False, -- Classifications (Node3-Sem)
4 => False, -- unused
5 => False), -- unused
N_Expanded_Name =>
(1 => True, -- Chars (Name1)
2 => True, -- Selector_Name (Node2)
3 => True, -- Prefix (Node3)
4 => False, -- Entity (Node4-Sem)
5 => False), -- Etype (Node5-Sem)
N_Expression_With_Actions =>
(1 => True, -- Actions (List1)
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- unused
N_Free_Statement =>
(1 => False, -- Storage_Pool (Node1-Sem)
2 => False, -- Procedure_To_Call (Node2-Sem)
3 => True, -- Expression (Node3)
4 => False, -- Actual_Designated_Subtype (Node4-Sem)
5 => False), -- unused
N_Freeze_Entity =>
(1 => True, -- Actions (List1)
2 => False, -- Access_Types_To_Process (Elist2-Sem)
3 => False, -- TSS_Elist (Elist3-Sem)
4 => False, -- Entity (Node4-Sem)
5 => False), -- First_Subtype_Link (Node5-Sem)
N_Freeze_Generic_Entity =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- Entity (Node4-Sem)
5 => False), -- unused
N_Implicit_Label_Declaration =>
(1 => True, -- Defining_Identifier (Node1)
2 => False, -- Label_Construct (Node2-Sem)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Itype_Reference =>
(1 => False, -- Itype (Node1-Sem)
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Raise_Constraint_Error =>
(1 => True, -- Condition (Node1)
2 => False, -- unused
3 => True, -- Reason (Uint3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Raise_Program_Error =>
(1 => True, -- Condition (Node1)
2 => False, -- unused
3 => True, -- Reason (Uint3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Raise_Storage_Error =>
(1 => True, -- Condition (Node1)
2 => False, -- unused
3 => True, -- Reason (Uint3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Push_Constraint_Error_Label =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Push_Program_Error_Label =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- Exception_Label
N_Push_Storage_Error_Label =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- Exception_Label
N_Pop_Constraint_Error_Label =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Pop_Program_Error_Label =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Pop_Storage_Error_Label =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Reference =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Prefix (Node3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Unchecked_Expression =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => False, -- unused
5 => False), -- Etype (Node5-Sem)
N_Unchecked_Type_Conversion =>
(1 => False, -- unused
2 => False, -- unused
3 => True, -- Expression (Node3)
4 => True, -- Subtype_Mark (Node4)
5 => False), -- Etype (Node5-Sem)
N_Validate_Unchecked_Conversion =>
(1 => False, -- Source_Type (Node1-Sem)
2 => False, -- Target_Type (Node2-Sem)
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
-- Entries for SCIL nodes
N_SCIL_Dispatch_Table_Tag_Init =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- SCIL_Entity (Node4-Sem)
5 => False), -- unused
N_SCIL_Dispatching_Call =>
(1 => False, -- unused
2 => False, -- SCIL_Target_Prim (Node2-Sem)
3 => False, -- unused
4 => False, -- SCIL_Entity (Node4-Sem)
5 => False), -- SCIL_Controlling_Tag (Node5-Sem)
N_SCIL_Membership_Test =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- SCIL_Entity (Node4-Sem)
5 => False), -- SCIL_Tag_Value (Node5-Sem)
-- Entries for Empty, Error and Unused. Even thought these have a Chars
-- field for debugging purposes, they are not really syntactic fields, so
-- we mark all fields as unused.
N_Empty =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Error =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Unused_At_Start =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False), -- unused
N_Unused_At_End =>
(1 => False, -- unused
2 => False, -- unused
3 => False, -- unused
4 => False, -- unused
5 => False)); -- unused
--------------------
-- Inline Pragmas --
--------------------
pragma Inline (ABE_Is_Certain);
pragma Inline (Abort_Present);
pragma Inline (Abortable_Part);
pragma Inline (Abstract_Present);
pragma Inline (Accept_Handler_Records);
pragma Inline (Accept_Statement);
pragma Inline (Access_Definition);
pragma Inline (Access_To_Subprogram_Definition);
pragma Inline (Access_Types_To_Process);
pragma Inline (Actions);
pragma Inline (Activation_Chain_Entity);
pragma Inline (Acts_As_Spec);
pragma Inline (Actual_Designated_Subtype);
pragma Inline (Address_Warning_Posted);
pragma Inline (Aggregate_Bounds);
pragma Inline (Aliased_Present);
pragma Inline (All_Others);
pragma Inline (All_Present);
pragma Inline (Alternatives);
pragma Inline (Ancestor_Part);
pragma Inline (Atomic_Sync_Required);
pragma Inline (Array_Aggregate);
pragma Inline (Aspect_Rep_Item);
pragma Inline (Assignment_OK);
pragma Inline (Associated_Node);
pragma Inline (At_End_Proc);
pragma Inline (Attribute_Name);
pragma Inline (Aux_Decls_Node);
pragma Inline (Backwards_OK);
pragma Inline (Bad_Is_Detected);
pragma Inline (Body_To_Inline);
pragma Inline (Body_Required);
pragma Inline (By_Ref);
pragma Inline (Box_Present);
pragma Inline (Char_Literal_Value);
pragma Inline (Chars);
pragma Inline (Check_Address_Alignment);
pragma Inline (Choice_Parameter);
pragma Inline (Choices);
pragma Inline (Class_Present);
pragma Inline (Classifications);
pragma Inline (Cleanup_Actions);
pragma Inline (Comes_From_Extended_Return_Statement);
pragma Inline (Compile_Time_Known_Aggregate);
pragma Inline (Component_Associations);
pragma Inline (Component_Clauses);
pragma Inline (Component_Definition);
pragma Inline (Component_Items);
pragma Inline (Component_List);
pragma Inline (Component_Name);
pragma Inline (Componentwise_Assignment);
pragma Inline (Condition);
pragma Inline (Condition_Actions);
pragma Inline (Config_Pragmas);
pragma Inline (Constant_Present);
pragma Inline (Constraint);
pragma Inline (Constraints);
pragma Inline (Context_Installed);
pragma Inline (Context_Items);
pragma Inline (Context_Pending);
pragma Inline (Contract_Test_Cases);
pragma Inline (Controlling_Argument);
pragma Inline (Convert_To_Return_False);
pragma Inline (Conversion_OK);
pragma Inline (Corresponding_Aspect);
pragma Inline (Corresponding_Body);
pragma Inline (Corresponding_Formal_Spec);
pragma Inline (Corresponding_Generic_Association);
pragma Inline (Corresponding_Integer_Value);
pragma Inline (Corresponding_Spec);
pragma Inline (Corresponding_Spec_Of_Stub);
pragma Inline (Corresponding_Stub);
pragma Inline (Dcheck_Function);
pragma Inline (Declarations);
pragma Inline (Default_Expression);
pragma Inline (Default_Storage_Pool);
pragma Inline (Default_Name);
pragma Inline (Defining_Identifier);
pragma Inline (Defining_Unit_Name);
pragma Inline (Delay_Alternative);
pragma Inline (Delay_Statement);
pragma Inline (Delta_Expression);
pragma Inline (Digits_Expression);
pragma Inline (Discr_Check_Funcs_Built);
pragma Inline (Discrete_Choices);
pragma Inline (Discrete_Range);
pragma Inline (Discrete_Subtype_Definition);
pragma Inline (Discrete_Subtype_Definitions);
pragma Inline (Discriminant_Specifications);
pragma Inline (Discriminant_Type);
pragma Inline (Do_Accessibility_Check);
pragma Inline (Do_Discriminant_Check);
pragma Inline (Do_Length_Check);
pragma Inline (Do_Division_Check);
pragma Inline (Do_Overflow_Check);
pragma Inline (Do_Range_Check);
pragma Inline (Do_Storage_Check);
pragma Inline (Do_Tag_Check);
pragma Inline (Elaborate_Present);
pragma Inline (Elaborate_All_Desirable);
pragma Inline (Elaborate_All_Present);
pragma Inline (Elaborate_Desirable);
pragma Inline (Else_Actions);
pragma Inline (Else_Statements);
pragma Inline (Elsif_Parts);
pragma Inline (Enclosing_Variant);
pragma Inline (End_Label);
pragma Inline (End_Span);
pragma Inline (Entity);
pragma Inline (Entity_Or_Associated_Node);
pragma Inline (Entry_Body_Formal_Part);
pragma Inline (Entry_Call_Alternative);
pragma Inline (Entry_Call_Statement);
pragma Inline (Entry_Direct_Name);
pragma Inline (Entry_Index);
pragma Inline (Entry_Index_Specification);
pragma Inline (Etype);
pragma Inline (Exception_Choices);
pragma Inline (Exception_Handlers);
pragma Inline (Exception_Junk);
pragma Inline (Exception_Label);
pragma Inline (Expansion_Delayed);
pragma Inline (Explicit_Actual_Parameter);
pragma Inline (Explicit_Generic_Actual_Parameter);
pragma Inline (Expression);
pragma Inline (Expression_Copy);
pragma Inline (Expressions);
pragma Inline (First_Bit);
pragma Inline (First_Inlined_Subprogram);
pragma Inline (First_Name);
pragma Inline (First_Named_Actual);
pragma Inline (First_Real_Statement);
pragma Inline (First_Subtype_Link);
pragma Inline (Float_Truncate);
pragma Inline (Formal_Type_Definition);
pragma Inline (Forwards_OK);
pragma Inline (From_Aspect_Specification);
pragma Inline (From_At_End);
pragma Inline (From_At_Mod);
pragma Inline (From_Conditional_Expression);
pragma Inline (From_Default);
pragma Inline (Generalized_Indexing);
pragma Inline (Generic_Associations);
pragma Inline (Generic_Formal_Declarations);
pragma Inline (Generic_Parent);
pragma Inline (Generic_Parent_Type);
pragma Inline (Handled_Statement_Sequence);
pragma Inline (Handler_List_Entry);
pragma Inline (Has_Created_Identifier);
pragma Inline (Has_Dereference_Action);
pragma Inline (Has_Dynamic_Length_Check);
pragma Inline (Has_Dynamic_Range_Check);
pragma Inline (Has_Init_Expression);
pragma Inline (Has_Local_Raise);
pragma Inline (Has_Self_Reference);
pragma Inline (Has_SP_Choice);
pragma Inline (Has_No_Elaboration_Code);
pragma Inline (Has_Pragma_Suppress_All);
pragma Inline (Has_Private_View);
pragma Inline (Has_Relative_Deadline_Pragma);
pragma Inline (Has_Storage_Size_Pragma);
pragma Inline (Has_Target_Names);
pragma Inline (Has_Wide_Character);
pragma Inline (Has_Wide_Wide_Character);
pragma Inline (Header_Size_Added);
pragma Inline (Hidden_By_Use_Clause);
pragma Inline (High_Bound);
pragma Inline (Identifier);
pragma Inline (Implicit_With);
pragma Inline (Implicit_With_From_Instantiation);
pragma Inline (Interface_List);
pragma Inline (Interface_Present);
pragma Inline (Includes_Infinities);
pragma Inline (Import_Interface_Present);
pragma Inline (In_Present);
pragma Inline (Incomplete_View);
pragma Inline (Inherited_Discriminant);
pragma Inline (Instance_Spec);
pragma Inline (Intval);
pragma Inline (Iterator_Specification);
pragma Inline (Is_Abort_Block);
pragma Inline (Is_Accessibility_Actual);
pragma Inline (Is_Analyzed_Pragma);
pragma Inline (Is_Asynchronous_Call_Block);
pragma Inline (Is_Boolean_Aspect);
pragma Inline (Is_Checked);
pragma Inline (Is_Checked_Ghost_Pragma);
pragma Inline (Is_Component_Left_Opnd);
pragma Inline (Is_Component_Right_Opnd);
pragma Inline (Is_Controlling_Actual);
pragma Inline (Is_Delayed_Aspect);
pragma Inline (Is_Disabled);
pragma Inline (Is_Dynamic_Coextension);
pragma Inline (Is_Elsif);
pragma Inline (Is_Entry_Barrier_Function);
pragma Inline (Is_Expanded_Build_In_Place_Call);
pragma Inline (Is_Expanded_Contract);
pragma Inline (Is_Finalization_Wrapper);
pragma Inline (Is_Folded_In_Parser);
pragma Inline (Is_Generic_Contract_Pragma);
pragma Inline (Is_Ignored);
pragma Inline (Is_Ignored_Ghost_Pragma);
pragma Inline (Is_In_Discriminant_Check);
pragma Inline (Is_Inherited_Pragma);
pragma Inline (Is_Machine_Number);
pragma Inline (Is_Null_Loop);
pragma Inline (Is_Overloaded);
pragma Inline (Is_Power_Of_2_For_Shift);
pragma Inline (Is_Prefixed_Call);
pragma Inline (Is_Protected_Subprogram_Body);
pragma Inline (Is_Qualified_Universal_Literal);
pragma Inline (Is_Static_Coextension);
pragma Inline (Is_Static_Expression);
pragma Inline (Is_Subprogram_Descriptor);
pragma Inline (Is_Task_Allocation_Block);
pragma Inline (Is_Task_Body_Procedure);
pragma Inline (Is_Task_Master);
pragma Inline (Iteration_Scheme);
pragma Inline (Itype);
pragma Inline (Kill_Range_Check);
pragma Inline (Last_Bit);
pragma Inline (Last_Name);
pragma Inline (Library_Unit);
pragma Inline (Label_Construct);
pragma Inline (Left_Opnd);
pragma Inline (Limited_View_Installed);
pragma Inline (Limited_Present);
pragma Inline (Literals);
pragma Inline (Local_Raise_Not_OK);
pragma Inline (Local_Raise_Statements);
pragma Inline (Loop_Actions);
pragma Inline (Loop_Parameter_Specification);
pragma Inline (Low_Bound);
pragma Inline (Mod_Clause);
pragma Inline (More_Ids);
pragma Inline (Must_Be_Byte_Aligned);
pragma Inline (Must_Not_Freeze);
pragma Inline (Must_Not_Override);
pragma Inline (Must_Override);
pragma Inline (Name);
pragma Inline (Names);
pragma Inline (Next_Entity);
pragma Inline (Next_Exit_Statement);
pragma Inline (Next_Implicit_With);
pragma Inline (Next_Named_Actual);
pragma Inline (Next_Pragma);
pragma Inline (Next_Rep_Item);
pragma Inline (Next_Use_Clause);
pragma Inline (No_Ctrl_Actions);
pragma Inline (No_Elaboration_Check);
pragma Inline (No_Entities_Ref_In_Spec);
pragma Inline (No_Initialization);
pragma Inline (No_Minimize_Eliminate);
pragma Inline (No_Side_Effect_Removal);
pragma Inline (No_Truncation);
pragma Inline (Non_Aliased_Prefix);
pragma Inline (Null_Present);
pragma Inline (Null_Excluding_Subtype);
pragma Inline (Null_Exclusion_Present);
pragma Inline (Null_Exclusion_In_Return_Present);
pragma Inline (Null_Record_Present);
pragma Inline (Object_Definition);
pragma Inline (Of_Present);
pragma Inline (Original_Discriminant);
pragma Inline (Original_Entity);
pragma Inline (Others_Discrete_Choices);
pragma Inline (Out_Present);
pragma Inline (Parameter_Associations);
pragma Inline (Parameter_Specifications);
pragma Inline (Parameter_Type);
pragma Inline (Parent_Spec);
pragma Inline (Position);
pragma Inline (Pragma_Argument_Associations);
pragma Inline (Pragma_Identifier);
pragma Inline (Pragmas_After);
pragma Inline (Pragmas_Before);
pragma Inline (Pre_Post_Conditions);
pragma Inline (Prefix);
pragma Inline (Premature_Use);
pragma Inline (Present_Expr);
pragma Inline (Prev_Ids);
pragma Inline (Print_In_Hex);
pragma Inline (Private_Declarations);
pragma Inline (Private_Present);
pragma Inline (Procedure_To_Call);
pragma Inline (Proper_Body);
pragma Inline (Protected_Definition);
pragma Inline (Protected_Present);
pragma Inline (Raises_Constraint_Error);
pragma Inline (Range_Constraint);
pragma Inline (Range_Expression);
pragma Inline (Real_Range_Specification);
pragma Inline (Realval);
pragma Inline (Reason);
pragma Inline (Record_Extension_Part);
pragma Inline (Redundant_Use);
pragma Inline (Renaming_Exception);
pragma Inline (Result_Definition);
pragma Inline (Return_Object_Declarations);
pragma Inline (Return_Statement_Entity);
pragma Inline (Reverse_Present);
pragma Inline (Right_Opnd);
pragma Inline (Rounded_Result);
pragma Inline (SCIL_Controlling_Tag);
pragma Inline (SCIL_Entity);
pragma Inline (SCIL_Tag_Value);
pragma Inline (SCIL_Target_Prim);
pragma Inline (Scope);
pragma Inline (Select_Alternatives);
pragma Inline (Selector_Name);
pragma Inline (Selector_Names);
pragma Inline (Shift_Count_OK);
pragma Inline (Source_Type);
pragma Inline (Specification);
pragma Inline (Split_PPC);
pragma Inline (Statements);
pragma Inline (Storage_Pool);
pragma Inline (Subpool_Handle_Name);
pragma Inline (Strval);
pragma Inline (Subtype_Indication);
pragma Inline (Subtype_Mark);
pragma Inline (Subtype_Marks);
pragma Inline (Suppress_Assignment_Checks);
pragma Inline (Suppress_Loop_Warnings);
pragma Inline (Synchronized_Present);
pragma Inline (Tagged_Present);
pragma Inline (Target_Type);
pragma Inline (Task_Definition);
pragma Inline (Task_Present);
pragma Inline (Then_Actions);
pragma Inline (Then_Statements);
pragma Inline (Triggering_Alternative);
pragma Inline (Triggering_Statement);
pragma Inline (Treat_Fixed_As_Integer);
pragma Inline (TSS_Elist);
pragma Inline (Type_Definition);
pragma Inline (Uneval_Old_Accept);
pragma Inline (Uneval_Old_Warn);
pragma Inline (Unit);
pragma Inline (Uninitialized_Variable);
pragma Inline (Unknown_Discriminants_Present);
pragma Inline (Unreferenced_In_Spec);
pragma Inline (Variant_Part);
pragma Inline (Variants);
pragma Inline (Visible_Declarations);
pragma Inline (Used_Operations);
pragma Inline (Was_Expression_Function);
pragma Inline (Was_Originally_Stub);
pragma Inline (Withed_Body);
pragma Inline (Set_ABE_Is_Certain);
pragma Inline (Set_Abort_Present);
pragma Inline (Set_Abortable_Part);
pragma Inline (Set_Abstract_Present);
pragma Inline (Set_Accept_Handler_Records);
pragma Inline (Set_Accept_Statement);
pragma Inline (Set_Access_Definition);
pragma Inline (Set_Access_To_Subprogram_Definition);
pragma Inline (Set_Access_Types_To_Process);
pragma Inline (Set_Actions);
pragma Inline (Set_Activation_Chain_Entity);
pragma Inline (Set_Acts_As_Spec);
pragma Inline (Set_Actual_Designated_Subtype);
pragma Inline (Set_Address_Warning_Posted);
pragma Inline (Set_Aggregate_Bounds);
pragma Inline (Set_Aliased_Present);
pragma Inline (Set_All_Others);
pragma Inline (Set_All_Present);
pragma Inline (Set_Alternatives);
pragma Inline (Set_Ancestor_Part);
pragma Inline (Set_Array_Aggregate);
pragma Inline (Set_Aspect_Rep_Item);
pragma Inline (Set_Assignment_OK);
pragma Inline (Set_Associated_Node);
pragma Inline (Set_At_End_Proc);
pragma Inline (Set_Atomic_Sync_Required);
pragma Inline (Set_Attribute_Name);
pragma Inline (Set_Aux_Decls_Node);
pragma Inline (Set_Backwards_OK);
pragma Inline (Set_Bad_Is_Detected);
pragma Inline (Set_Body_Required);
pragma Inline (Set_Body_To_Inline);
pragma Inline (Set_Box_Present);
pragma Inline (Set_By_Ref);
pragma Inline (Set_Char_Literal_Value);
pragma Inline (Set_Chars);
pragma Inline (Set_Check_Address_Alignment);
pragma Inline (Set_Choice_Parameter);
pragma Inline (Set_Choices);
pragma Inline (Set_Class_Present);
pragma Inline (Set_Classifications);
pragma Inline (Set_Cleanup_Actions);
pragma Inline (Set_Comes_From_Extended_Return_Statement);
pragma Inline (Set_Compile_Time_Known_Aggregate);
pragma Inline (Set_Component_Associations);
pragma Inline (Set_Component_Clauses);
pragma Inline (Set_Component_Definition);
pragma Inline (Set_Component_Items);
pragma Inline (Set_Component_List);
pragma Inline (Set_Component_Name);
pragma Inline (Set_Componentwise_Assignment);
pragma Inline (Set_Condition);
pragma Inline (Set_Condition_Actions);
pragma Inline (Set_Config_Pragmas);
pragma Inline (Set_Constant_Present);
pragma Inline (Set_Constraint);
pragma Inline (Set_Constraints);
pragma Inline (Set_Context_Installed);
pragma Inline (Set_Context_Items);
pragma Inline (Set_Context_Pending);
pragma Inline (Set_Contract_Test_Cases);
pragma Inline (Set_Controlling_Argument);
pragma Inline (Set_Conversion_OK);
pragma Inline (Set_Convert_To_Return_False);
pragma Inline (Set_Corresponding_Aspect);
pragma Inline (Set_Corresponding_Body);
pragma Inline (Set_Corresponding_Formal_Spec);
pragma Inline (Set_Corresponding_Generic_Association);
pragma Inline (Set_Corresponding_Integer_Value);
pragma Inline (Set_Corresponding_Spec);
pragma Inline (Set_Corresponding_Spec_Of_Stub);
pragma Inline (Set_Corresponding_Stub);
pragma Inline (Set_Dcheck_Function);
pragma Inline (Set_Declarations);
pragma Inline (Set_Default_Expression);
pragma Inline (Set_Default_Name);
pragma Inline (Set_Default_Storage_Pool);
pragma Inline (Set_Defining_Identifier);
pragma Inline (Set_Defining_Unit_Name);
pragma Inline (Set_Delay_Alternative);
pragma Inline (Set_Delay_Statement);
pragma Inline (Set_Delta_Expression);
pragma Inline (Set_Digits_Expression);
pragma Inline (Set_Discr_Check_Funcs_Built);
pragma Inline (Set_Discrete_Choices);
pragma Inline (Set_Discrete_Range);
pragma Inline (Set_Discrete_Subtype_Definition);
pragma Inline (Set_Discrete_Subtype_Definitions);
pragma Inline (Set_Discriminant_Specifications);
pragma Inline (Set_Discriminant_Type);
pragma Inline (Set_Do_Accessibility_Check);
pragma Inline (Set_Do_Discriminant_Check);
pragma Inline (Set_Do_Division_Check);
pragma Inline (Set_Do_Length_Check);
pragma Inline (Set_Do_Overflow_Check);
pragma Inline (Set_Do_Range_Check);
pragma Inline (Set_Do_Storage_Check);
pragma Inline (Set_Do_Tag_Check);
pragma Inline (Set_Elaborate_All_Desirable);
pragma Inline (Set_Elaborate_All_Present);
pragma Inline (Set_Elaborate_Desirable);
pragma Inline (Set_Elaborate_Present);
pragma Inline (Set_Else_Actions);
pragma Inline (Set_Else_Statements);
pragma Inline (Set_Elsif_Parts);
pragma Inline (Set_Enclosing_Variant);
pragma Inline (Set_End_Label);
pragma Inline (Set_End_Span);
pragma Inline (Set_Entity);
pragma Inline (Set_Entry_Body_Formal_Part);
pragma Inline (Set_Entry_Call_Alternative);
pragma Inline (Set_Entry_Call_Statement);
pragma Inline (Set_Entry_Direct_Name);
pragma Inline (Set_Entry_Index);
pragma Inline (Set_Entry_Index_Specification);
pragma Inline (Set_Etype);
pragma Inline (Set_Exception_Choices);
pragma Inline (Set_Exception_Handlers);
pragma Inline (Set_Exception_Junk);
pragma Inline (Set_Exception_Label);
pragma Inline (Set_Expansion_Delayed);
pragma Inline (Set_Explicit_Actual_Parameter);
pragma Inline (Set_Explicit_Generic_Actual_Parameter);
pragma Inline (Set_Expression);
pragma Inline (Set_Expression_Copy);
pragma Inline (Set_Expressions);
pragma Inline (Set_First_Bit);
pragma Inline (Set_First_Inlined_Subprogram);
pragma Inline (Set_First_Name);
pragma Inline (Set_First_Named_Actual);
pragma Inline (Set_First_Real_Statement);
pragma Inline (Set_First_Subtype_Link);
pragma Inline (Set_Float_Truncate);
pragma Inline (Set_Formal_Type_Definition);
pragma Inline (Set_Forwards_OK);
pragma Inline (Set_From_Aspect_Specification);
pragma Inline (Set_From_At_End);
pragma Inline (Set_From_At_Mod);
pragma Inline (Set_From_Conditional_Expression);
pragma Inline (Set_From_Default);
pragma Inline (Set_Generalized_Indexing);
pragma Inline (Set_Generic_Associations);
pragma Inline (Set_Generic_Formal_Declarations);
pragma Inline (Set_Generic_Parent);
pragma Inline (Set_Generic_Parent_Type);
pragma Inline (Set_Handled_Statement_Sequence);
pragma Inline (Set_Handler_List_Entry);
pragma Inline (Set_Has_Created_Identifier);
pragma Inline (Set_Has_Dereference_Action);
pragma Inline (Set_Has_Dynamic_Length_Check);
pragma Inline (Set_Has_Dynamic_Range_Check);
pragma Inline (Set_Has_Init_Expression);
pragma Inline (Set_Has_Local_Raise);
pragma Inline (Set_Has_No_Elaboration_Code);
pragma Inline (Set_Has_Pragma_Suppress_All);
pragma Inline (Set_Has_Private_View);
pragma Inline (Set_Has_Relative_Deadline_Pragma);
pragma Inline (Set_Has_Self_Reference);
pragma Inline (Set_Has_SP_Choice);
pragma Inline (Set_Has_Storage_Size_Pragma);
pragma Inline (Set_Has_Target_Names);
pragma Inline (Set_Has_Wide_Character);
pragma Inline (Set_Has_Wide_Wide_Character);
pragma Inline (Set_Header_Size_Added);
pragma Inline (Set_Hidden_By_Use_Clause);
pragma Inline (Set_High_Bound);
pragma Inline (Set_Identifier);
pragma Inline (Set_Implicit_With);
pragma Inline (Set_Import_Interface_Present);
pragma Inline (Set_In_Present);
pragma Inline (Set_Includes_Infinities);
pragma Inline (Set_Incomplete_View);
pragma Inline (Set_Inherited_Discriminant);
pragma Inline (Set_Instance_Spec);
pragma Inline (Set_Interface_List);
pragma Inline (Set_Interface_Present);
pragma Inline (Set_Intval);
pragma Inline (Set_Is_Abort_Block);
pragma Inline (Set_Is_Accessibility_Actual);
pragma Inline (Set_Is_Analyzed_Pragma);
pragma Inline (Set_Is_Asynchronous_Call_Block);
pragma Inline (Set_Is_Boolean_Aspect);
pragma Inline (Set_Is_Checked);
pragma Inline (Set_Is_Checked_Ghost_Pragma);
pragma Inline (Set_Is_Component_Left_Opnd);
pragma Inline (Set_Is_Component_Right_Opnd);
pragma Inline (Set_Is_Controlling_Actual);
pragma Inline (Set_Is_Delayed_Aspect);
pragma Inline (Set_Is_Disabled);
pragma Inline (Set_Is_Dynamic_Coextension);
pragma Inline (Set_Is_Elsif);
pragma Inline (Set_Is_Entry_Barrier_Function);
pragma Inline (Set_Is_Expanded_Build_In_Place_Call);
pragma Inline (Set_Is_Expanded_Contract);
pragma Inline (Set_Is_Finalization_Wrapper);
pragma Inline (Set_Is_Folded_In_Parser);
pragma Inline (Set_Is_Generic_Contract_Pragma);
pragma Inline (Set_Is_Ignored);
pragma Inline (Set_Is_Ignored_Ghost_Pragma);
pragma Inline (Set_Is_In_Discriminant_Check);
pragma Inline (Set_Is_Inherited_Pragma);
pragma Inline (Set_Is_Machine_Number);
pragma Inline (Set_Is_Null_Loop);
pragma Inline (Set_Is_Overloaded);
pragma Inline (Set_Is_Power_Of_2_For_Shift);
pragma Inline (Set_Is_Prefixed_Call);
pragma Inline (Set_Is_Protected_Subprogram_Body);
pragma Inline (Set_Is_Qualified_Universal_Literal);
pragma Inline (Set_Is_Static_Coextension);
pragma Inline (Set_Is_Static_Expression);
pragma Inline (Set_Is_Subprogram_Descriptor);
pragma Inline (Set_Is_Task_Allocation_Block);
pragma Inline (Set_Is_Task_Body_Procedure);
pragma Inline (Set_Is_Task_Master);
pragma Inline (Set_Iteration_Scheme);
pragma Inline (Set_Iterator_Specification);
pragma Inline (Set_Itype);
pragma Inline (Set_Kill_Range_Check);
pragma Inline (Set_Label_Construct);
pragma Inline (Set_Last_Bit);
pragma Inline (Set_Last_Name);
pragma Inline (Set_Left_Opnd);
pragma Inline (Set_Library_Unit);
pragma Inline (Set_Limited_Present);
pragma Inline (Set_Limited_View_Installed);
pragma Inline (Set_Literals);
pragma Inline (Set_Local_Raise_Not_OK);
pragma Inline (Set_Local_Raise_Statements);
pragma Inline (Set_Loop_Actions);
pragma Inline (Set_Loop_Parameter_Specification);
pragma Inline (Set_Low_Bound);
pragma Inline (Set_Mod_Clause);
pragma Inline (Set_More_Ids);
pragma Inline (Set_Must_Be_Byte_Aligned);
pragma Inline (Set_Must_Not_Freeze);
pragma Inline (Set_Must_Not_Override);
pragma Inline (Set_Must_Override);
pragma Inline (Set_Name);
pragma Inline (Set_Names);
pragma Inline (Set_Next_Entity);
pragma Inline (Set_Next_Exit_Statement);
pragma Inline (Set_Next_Implicit_With);
pragma Inline (Set_Next_Named_Actual);
pragma Inline (Set_Next_Pragma);
pragma Inline (Set_Next_Rep_Item);
pragma Inline (Set_Next_Use_Clause);
pragma Inline (Set_No_Ctrl_Actions);
pragma Inline (Set_No_Elaboration_Check);
pragma Inline (Set_No_Entities_Ref_In_Spec);
pragma Inline (Set_No_Initialization);
pragma Inline (Set_No_Minimize_Eliminate);
pragma Inline (Set_No_Side_Effect_Removal);
pragma Inline (Set_No_Truncation);
pragma Inline (Set_Non_Aliased_Prefix);
pragma Inline (Set_Null_Excluding_Subtype);
pragma Inline (Set_Null_Exclusion_Present);
pragma Inline (Set_Null_Exclusion_In_Return_Present);
pragma Inline (Set_Null_Present);
pragma Inline (Set_Null_Record_Present);
pragma Inline (Set_Object_Definition);
pragma Inline (Set_Of_Present);
pragma Inline (Set_Original_Discriminant);
pragma Inline (Set_Original_Entity);
pragma Inline (Set_Others_Discrete_Choices);
pragma Inline (Set_Out_Present);
pragma Inline (Set_Parameter_Associations);
pragma Inline (Set_Parameter_Specifications);
pragma Inline (Set_Parameter_Type);
pragma Inline (Set_Parent_Spec);
pragma Inline (Set_Position);
pragma Inline (Set_Pragma_Argument_Associations);
pragma Inline (Set_Pragma_Identifier);
pragma Inline (Set_Pragmas_After);
pragma Inline (Set_Pragmas_Before);
pragma Inline (Set_Pre_Post_Conditions);
pragma Inline (Set_Prefix);
pragma Inline (Set_Premature_Use);
pragma Inline (Set_Present_Expr);
pragma Inline (Set_Prev_Ids);
pragma Inline (Set_Print_In_Hex);
pragma Inline (Set_Private_Declarations);
pragma Inline (Set_Private_Present);
pragma Inline (Set_Procedure_To_Call);
pragma Inline (Set_Proper_Body);
pragma Inline (Set_Protected_Definition);
pragma Inline (Set_Protected_Present);
pragma Inline (Set_Raises_Constraint_Error);
pragma Inline (Set_Range_Constraint);
pragma Inline (Set_Range_Expression);
pragma Inline (Set_Real_Range_Specification);
pragma Inline (Set_Realval);
pragma Inline (Set_Reason);
pragma Inline (Set_Record_Extension_Part);
pragma Inline (Set_Redundant_Use);
pragma Inline (Set_Renaming_Exception);
pragma Inline (Set_Result_Definition);
pragma Inline (Set_Return_Object_Declarations);
pragma Inline (Set_Reverse_Present);
pragma Inline (Set_Right_Opnd);
pragma Inline (Set_Rounded_Result);
pragma Inline (Set_SCIL_Controlling_Tag);
pragma Inline (Set_SCIL_Entity);
pragma Inline (Set_SCIL_Tag_Value);
pragma Inline (Set_SCIL_Target_Prim);
pragma Inline (Set_Scope);
pragma Inline (Set_Select_Alternatives);
pragma Inline (Set_Selector_Name);
pragma Inline (Set_Selector_Names);
pragma Inline (Set_Shift_Count_OK);
pragma Inline (Set_Source_Type);
pragma Inline (Set_Split_PPC);
pragma Inline (Set_Statements);
pragma Inline (Set_Storage_Pool);
pragma Inline (Set_Strval);
pragma Inline (Set_Subpool_Handle_Name);
pragma Inline (Set_Subtype_Indication);
pragma Inline (Set_Subtype_Mark);
pragma Inline (Set_Subtype_Marks);
pragma Inline (Set_Suppress_Assignment_Checks);
pragma Inline (Set_Suppress_Loop_Warnings);
pragma Inline (Set_Synchronized_Present);
pragma Inline (Set_TSS_Elist);
pragma Inline (Set_Tagged_Present);
pragma Inline (Set_Target_Type);
pragma Inline (Set_Task_Definition);
pragma Inline (Set_Task_Present);
pragma Inline (Set_Then_Actions);
pragma Inline (Set_Then_Statements);
pragma Inline (Set_Treat_Fixed_As_Integer);
pragma Inline (Set_Triggering_Alternative);
pragma Inline (Set_Triggering_Statement);
pragma Inline (Set_Type_Definition);
pragma Inline (Set_Uneval_Old_Accept);
pragma Inline (Set_Uneval_Old_Warn);
pragma Inline (Set_Unit);
pragma Inline (Set_Uninitialized_Variable);
pragma Inline (Set_Unknown_Discriminants_Present);
pragma Inline (Set_Unreferenced_In_Spec);
pragma Inline (Set_Used_Operations);
pragma Inline (Set_Variant_Part);
pragma Inline (Set_Variants);
pragma Inline (Set_Visible_Declarations);
pragma Inline (Set_Was_Expression_Function);
pragma Inline (Set_Was_Originally_Stub);
pragma Inline (Set_Withed_Body);
end Sinfo;
|
with Ada.Real_Time; use Ada.Real_Time;
with STM32GD.Board; use STM32GD.Board;
procedure Main is
Next_Release : Time := Clock;
Period : constant Time_Span := Milliseconds (500);
begin
Init;
LED.Set;
Text_IO.Put_Line ("Starting");
loop
Text_IO.Put_Line ("Waiting");
Next_Release := Next_Release + Period;
delay until Next_Release;
LED.Toggle;
end loop;
end Main;
|
pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings;
with System;
package SDL_assert_h is
SDL_ASSERT_LEVEL : constant := 2; -- ..\SDL2_tmp\SDL_assert.h:38
-- arg-macro: procedure SDL_TriggerBreakpoint ()
-- __asm__ __volatile__ ( "int $3" & ASCII.LF & "" & ASCII.HT & "" )
-- unsupported macro: SDL_FUNCTION __FUNCTION__
-- unsupported macro: SDL_FILE __FILE__
-- unsupported macro: SDL_LINE __LINE__
SDL_NULL_WHILE_LOOP_CONDITION : constant := (0); -- ..\SDL2_tmp\SDL_assert.h:96
-- arg-macro: procedure SDL_disabled_assert (condition)
-- do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
-- unsupported macro: SDL_enabled_assert(condition) do { while ( !(condition) ) { static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, 0, 0, 0, 0 }; const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); if (sdl_assert_state == SDL_ASSERTION_RETRY) { continue; } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { SDL_TriggerBreakpoint(); } break; } } while (SDL_NULL_WHILE_LOOP_CONDITION)
-- arg-macro: procedure SDL_assert (condition)
-- SDL_enabled_assert(condition)
-- arg-macro: procedure SDL_assert_release (condition)
-- SDL_enabled_assert(condition)
-- arg-macro: procedure SDL_assert_paranoid (condition)
-- SDL_disabled_assert(condition)
-- arg-macro: procedure SDL_assert_always (condition)
-- SDL_enabled_assert(condition)
-- unsupported macro: SDL_assert_state SDL_AssertState
-- unsupported macro: SDL_assert_data SDL_AssertData
-- Simple DirectMedia Layer
-- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
-- 3. This notice may not be removed or altered from any source distribution.
--
-- Set up for C function definitions, even when using C++
--These are macros and not first class functions so that the debugger breaks
--on the assertion line and not in some random guts of SDL, and so each
--assert can have unique static variables associated with it.
--
-- Don't include intrin.h here because it contains C++ code
-- How do we trigger breakpoints on this platform?
--sizeof (x) makes the compiler still parse the expression even without
--assertions enabled, so the code is always checked at compile time, but
--doesn't actually generate code for it, so there are no side effects or
--expensive checks at run time, just the constant size of what x WOULD be,
--which presumably gets optimized out as unused.
--This also solves the problem of...
-- int somevalue = blah();
-- SDL_assert(somevalue == 1);
--...which would cause compiles to complain that somevalue is unused if we
--disable assertions.
--
-- "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
-- this condition isn't constant. And looks like an owl's face!
--*< Retry the assert immediately.
--*< Make the debugger trigger a breakpoint.
--*< Terminate the program.
--*< Ignore the assert.
--*< Ignore the assert from now on.
type SDL_AssertState is
(SDL_ASSERTION_RETRY,
SDL_ASSERTION_BREAK,
SDL_ASSERTION_ABORT,
SDL_ASSERTION_IGNORE,
SDL_ASSERTION_ALWAYS_IGNORE);
pragma Convention (C, SDL_AssertState); -- ..\SDL2_tmp\SDL_assert.h:109
type SDL_AssertData;
type SDL_AssertData is record
always_ignore : aliased int; -- ..\SDL2_tmp\SDL_assert.h:113
trigger_count : aliased unsigned; -- ..\SDL2_tmp\SDL_assert.h:114
condition : Interfaces.C.Strings.chars_ptr; -- ..\SDL2_tmp\SDL_assert.h:115
filename : Interfaces.C.Strings.chars_ptr; -- ..\SDL2_tmp\SDL_assert.h:116
linenum : aliased int; -- ..\SDL2_tmp\SDL_assert.h:117
c_function : Interfaces.C.Strings.chars_ptr; -- ..\SDL2_tmp\SDL_assert.h:118
next : access constant SDL_AssertData; -- ..\SDL2_tmp\SDL_assert.h:119
end record;
pragma Convention (C_Pass_By_Copy, SDL_AssertData); -- ..\SDL2_tmp\SDL_assert.h:111
-- Never call this directly. Use the SDL_assert* macros.
function SDL_ReportAssertion
(arg1 : access SDL_AssertData;
arg2 : Interfaces.C.Strings.chars_ptr;
arg3 : Interfaces.C.Strings.chars_ptr;
arg4 : int) return SDL_AssertState; -- ..\SDL2_tmp\SDL_assert.h:125
pragma Import (C, SDL_ReportAssertion, "SDL_ReportAssertion");
-- this tells Clang's static analysis that we're a custom assert function,
-- and that the analyzer should assume the condition was always true past this
-- SDL_assert test.
-- the do {} while(0) avoids dangling else problems:
-- if (x) SDL_assert(y); else blah();
-- ... without the do/while, the "else" could attach to this macro's "if".
-- We try to handle just the minimum we need here in a macro...the loop,
-- the static vars, and break points. The heavy lifting is handled in
-- SDL_ReportAssertion(), in SDL_assert.c.
--
-- Enable various levels of assertions.
-- this assertion is never disabled at any level.
type SDL_AssertionHandler is access function (arg1 : access constant SDL_AssertData; arg2 : System.Address) return SDL_AssertState;
pragma Convention (C, SDL_AssertionHandler); -- ..\SDL2_tmp\SDL_assert.h:188
--*
-- * \brief Set an application-defined assertion handler.
-- *
-- * This allows an app to show its own assertion UI and/or force the
-- * response to an assertion failure. If the app doesn't provide this, SDL
-- * will try to do the right thing, popping up a system-specific GUI dialog,
-- * and probably minimizing any fullscreen windows.
-- *
-- * This callback may fire from any thread, but it runs wrapped in a mutex, so
-- * it will only fire from one thread at a time.
-- *
-- * Setting the callback to NULL restores SDL's original internal handler.
-- *
-- * This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
-- *
-- * Return SDL_AssertState value of how to handle the assertion failure.
-- *
-- * \param handler Callback function, called when an assertion fails.
-- * \param userdata A pointer passed to the callback as-is.
--
procedure SDL_SetAssertionHandler (handler : SDL_AssertionHandler; userdata : System.Address); -- ..\SDL2_tmp\SDL_assert.h:211
pragma Import (C, SDL_SetAssertionHandler, "SDL_SetAssertionHandler");
--*
-- * \brief Get the default assertion handler.
-- *
-- * This returns the function pointer that is called by default when an
-- * assertion is triggered. This is an internal function provided by SDL,
-- * that is used for assertions when SDL_SetAssertionHandler() hasn't been
-- * used to provide a different function.
-- *
-- * \return The default SDL_AssertionHandler that is called when an assert triggers.
--
function SDL_GetDefaultAssertionHandler return SDL_AssertionHandler; -- ..\SDL2_tmp\SDL_assert.h:225
pragma Import (C, SDL_GetDefaultAssertionHandler, "SDL_GetDefaultAssertionHandler");
--*
-- * \brief Get the current assertion handler.
-- *
-- * This returns the function pointer that is called when an assertion is
-- * triggered. This is either the value last passed to
-- * SDL_SetAssertionHandler(), or if no application-specified function is
-- * set, is equivalent to calling SDL_GetDefaultAssertionHandler().
-- *
-- * \param puserdata Pointer to a void*, which will store the "userdata"
-- * pointer that was passed to SDL_SetAssertionHandler().
-- * This value will always be NULL for the default handler.
-- * If you don't care about this data, it is safe to pass
-- * a NULL pointer to this function to ignore it.
-- * \return The SDL_AssertionHandler that is called when an assert triggers.
--
function SDL_GetAssertionHandler (puserdata : System.Address) return SDL_AssertionHandler; -- ..\SDL2_tmp\SDL_assert.h:242
pragma Import (C, SDL_GetAssertionHandler, "SDL_GetAssertionHandler");
--*
-- * \brief Get a list of all assertion failures.
-- *
-- * Get all assertions triggered since last call to SDL_ResetAssertionReport(),
-- * or the start of the program.
-- *
-- * The proper way to examine this data looks something like this:
-- *
-- * <code>
-- * const SDL_AssertData *item = SDL_GetAssertionReport();
-- * while (item) {
-- * printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
-- * item->condition, item->function, item->filename,
-- * item->linenum, item->trigger_count,
-- * item->always_ignore ? "yes" : "no");
-- * item = item->next;
-- * }
-- * </code>
-- *
-- * \return List of all assertions.
-- * \sa SDL_ResetAssertionReport
--
function SDL_GetAssertionReport return access constant SDL_AssertData; -- ..\SDL2_tmp\SDL_assert.h:266
pragma Import (C, SDL_GetAssertionReport, "SDL_GetAssertionReport");
--*
-- * \brief Reset the list of all assertion failures.
-- *
-- * Reset list of all assertions triggered.
-- *
-- * \sa SDL_GetAssertionReport
--
procedure SDL_ResetAssertionReport; -- ..\SDL2_tmp\SDL_assert.h:275
pragma Import (C, SDL_ResetAssertionReport, "SDL_ResetAssertionReport");
-- these had wrong naming conventions until 2.0.4. Please update your app!
-- Ends C function definitions when using C++
-- vi: set ts=4 sw=4 expandtab:
end SDL_assert_h;
|
with Symbolic_Expressions;
package EU_Projects.Times.Time_Expressions is
type Symbolic_Duration is private;
type Symbolic_Instant is private;
type Symbolic_Instant_Array is array (Positive range <>) of Symbolic_Instant;
function Min (L, R : Symbolic_Instant) return Symbolic_Instant;
function Max (L, R : Symbolic_Instant) return Symbolic_Instant;
function Min (X : Symbolic_Instant_Array) return Symbolic_Instant;
function Max (X : Symbolic_Instant_Array) return Symbolic_Instant;
function Min (L, R : Symbolic_Duration) return Symbolic_Duration;
function Max (L, R : Symbolic_Duration) return Symbolic_Duration;
function "-" (L, R : Symbolic_Instant) return Symbolic_Duration;
function "+" (L : Symbolic_Instant; R : Symbolic_Duration) return Symbolic_Instant;
function "-" (L : Symbolic_Instant; R : Symbolic_Duration) return Symbolic_Instant;
function "+" (L : Symbolic_Duration; R : Symbolic_Instant) return Symbolic_Instant;
function Variable (Name : Dotted_Identifier) return Symbolic_Instant;
function Variable (Name : Dotted_Identifier) return Symbolic_Duration;
function Is_Constant (Item : Symbolic_Instant) return Boolean;
function Is_Constant (Item : Symbolic_Duration) return Boolean;
function To_Scalar (Item : Symbolic_Instant) return Instant;
function To_Scalar (Item : Symbolic_Duration) return Duration;
function Symbolic (Item : Instant) return Symbolic_Instant;
function Symbolic (Item : Duration) return Symbolic_Duration;
function Dump(X : Symbolic_Instant) return String;
private
function Call (Name : Dotted_Identifier; Param : Scalar_Array)
return Scalar_Type;
package Time_Expr is
new Symbolic_Expressions (Scalar_Type => Scalar_Type,
Scalar_Array => Scalar_Array,
Identifier => Dotted_Identifier,
Image => Image,
ID_Image => Image);
use type Time_Expr.Symbolic_Expression;
type Symbolic_Instant is
record
T : Time_Expr.Symbolic_Expression;
end record;
type Symbolic_Duration is
record
D : Time_Expr.Symbolic_Expression;
end record;
function Dump (X : Symbolic_Instant) return String
is (Time_Expr.Dump(X.T));
Min_Function : constant Dotted_Identifier := To_ID ("min");
Max_Function : constant Dotted_Identifier := To_ID ("max");
function Variable (Name : Dotted_Identifier) return Symbolic_Instant
is (Symbolic_Instant'(T => Time_Expr.Variable (Name)));
function Variable (Name : Dotted_Identifier) return Symbolic_Duration
is (Symbolic_Duration'(D => Time_Expr.Variable (Name)));
function Min (L, R : Symbolic_Instant) return Symbolic_Instant
is (T => Time_Expr.Function_Call (Min_Function, (L.T, R.T)));
function Max (L, R : Symbolic_Instant) return Symbolic_Instant
is (T => Time_Expr.Function_Call (Max_Function, (L.T, R.T)));
function Min (L, R : Symbolic_Duration) return Symbolic_Duration
is (D => Time_Expr.Function_Call (Min_Function, (L.D, R.D)));
function Max (L, R : Symbolic_Duration) return Symbolic_Duration
is (D => Time_Expr.Function_Call (Max_Function, (L.D, R.D)));
function "-" (L, R : Symbolic_Instant) return Symbolic_Duration
is (D => L.T - R.T);
function "+" (L : Symbolic_Instant; R : Symbolic_Duration) return Symbolic_Instant
is (T => L.T + R.D);
function "-" (L : Symbolic_Instant; R : Symbolic_Duration) return Symbolic_Instant
is (T => L.T - R.D);
function "+" (L : Symbolic_Duration; R : Symbolic_Instant) return Symbolic_Instant
is (T => L.D + R.T);
function Is_Constant (Item : Symbolic_Instant) return Boolean
is (Item.T.Is_Constant);
function Is_Constant (Item : Symbolic_Duration) return Boolean
is (Item.D.Is_Constant);
function To_Scalar (Item : Symbolic_Instant) return Instant
is (Instant (Time_Expr.Eval(Item.T)));
function To_Scalar (Item : Symbolic_Duration) return Duration
is (Duration (Time_Expr.Eval(Item.D)));
function Symbolic (Item : Instant) return Symbolic_Instant
is (T => Time_Expr.To_Expr (Scalar_Type (Item)));
function Symbolic (Item : Duration) return Symbolic_Duration
is (D => Time_Expr.To_Expr (Scalar_Type (Item)));
end EU_Projects.Times.Time_Expressions;
|
-- This spec has been automatically generated from STM32L0x3.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.LCD is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_DUTY_Field is HAL.UInt3;
subtype CR_BIAS_Field is HAL.UInt2;
-- control register
type CR_Register is record
-- LCD controller enable
LCDEN : Boolean := False;
-- Voltage source selection
VSEL : Boolean := False;
-- Duty selection
DUTY : CR_DUTY_Field := 16#0#;
-- Bias selector
BIAS : CR_BIAS_Field := 16#0#;
-- Mux segment enable
MUX_SEG : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
LCDEN at 0 range 0 .. 0;
VSEL at 0 range 1 .. 1;
DUTY at 0 range 2 .. 4;
BIAS at 0 range 5 .. 6;
MUX_SEG at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype FCR_PON_Field is HAL.UInt3;
subtype FCR_DEAD_Field is HAL.UInt3;
subtype FCR_CC_Field is HAL.UInt3;
subtype FCR_BLINKF_Field is HAL.UInt3;
subtype FCR_BLINK_Field is HAL.UInt2;
subtype FCR_DIV_Field is HAL.UInt4;
subtype FCR_PS_Field is HAL.UInt4;
-- frame control register
type FCR_Register is record
-- High drive enable
HD : Boolean := False;
-- Start of frame interrupt enable
SOFIE : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- Update display done interrupt enable
UDDIE : Boolean := False;
-- Pulse ON duration
PON : FCR_PON_Field := 16#0#;
-- Dead time duration
DEAD : FCR_DEAD_Field := 16#0#;
-- Contrast control
CC : FCR_CC_Field := 16#0#;
-- Blink frequency selection
BLINKF : FCR_BLINKF_Field := 16#0#;
-- Blink mode selection
BLINK : FCR_BLINK_Field := 16#0#;
-- DIV clock divider
DIV : FCR_DIV_Field := 16#0#;
-- PS 16-bit prescaler
PS : FCR_PS_Field := 16#0#;
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for FCR_Register use record
HD at 0 range 0 .. 0;
SOFIE at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
UDDIE at 0 range 3 .. 3;
PON at 0 range 4 .. 6;
DEAD at 0 range 7 .. 9;
CC at 0 range 10 .. 12;
BLINKF at 0 range 13 .. 15;
BLINK at 0 range 16 .. 17;
DIV at 0 range 18 .. 21;
PS at 0 range 22 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
-- status register
type SR_Register is record
-- Read-only. ENS
ENS : Boolean := False;
-- Read-only. Start of frame flag
SOF : Boolean := False;
-- Write-only. Update display request
UDR : Boolean := False;
-- Read-only. Update Display Done
UDD : Boolean := False;
-- Read-only. Ready flag
RDY : Boolean := False;
-- Read-only. LCD Frame Control Register Synchronization flag
FCRSF : Boolean := True;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
ENS at 0 range 0 .. 0;
SOF at 0 range 1 .. 1;
UDR at 0 range 2 .. 2;
UDD at 0 range 3 .. 3;
RDY at 0 range 4 .. 4;
FCRSF at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- clear register
type CLR_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Write-only. Start of frame flag clear
SOFC : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- Write-only. Update display done clear
UDDC : Boolean := False;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CLR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
SOFC at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
UDDC at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- RAM_COM_S array
type RAM_COM_S_Field_Array is array (0 .. 31) of Boolean
with Component_Size => 1, Size => 32;
-- display memory
type RAM_COM_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- S as a value
Val : HAL.UInt32;
when True =>
-- S as an array
Arr : RAM_COM_S_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access,
Bit_Order => System.Low_Order_First;
for RAM_COM_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Liquid crystal display controller
type LCD_Peripheral is record
-- control register
CR : aliased CR_Register;
-- frame control register
FCR : aliased FCR_Register;
-- status register
SR : aliased SR_Register;
-- clear register
CLR : aliased CLR_Register;
-- display memory
RAM_COM0 : aliased RAM_COM_Register;
-- display memory
RAM_COM1 : aliased RAM_COM_Register;
-- display memory
RAM_COM2 : aliased RAM_COM_Register;
-- display memory
RAM_COM3 : aliased RAM_COM_Register;
-- display memory
RAM_COM4 : aliased RAM_COM_Register;
-- display memory
RAM_COM5 : aliased RAM_COM_Register;
-- display memory
RAM_COM6 : aliased RAM_COM_Register;
-- display memory
RAM_COM7 : aliased RAM_COM_Register;
end record
with Volatile;
for LCD_Peripheral use record
CR at 16#0# range 0 .. 31;
FCR at 16#4# range 0 .. 31;
SR at 16#8# range 0 .. 31;
CLR at 16#C# range 0 .. 31;
RAM_COM0 at 16#14# range 0 .. 31;
RAM_COM1 at 16#1C# range 0 .. 31;
RAM_COM2 at 16#24# range 0 .. 31;
RAM_COM3 at 16#2C# range 0 .. 31;
RAM_COM4 at 16#34# range 0 .. 31;
RAM_COM5 at 16#3C# range 0 .. 31;
RAM_COM6 at 16#44# range 0 .. 31;
RAM_COM7 at 16#4C# range 0 .. 31;
end record;
-- Liquid crystal display controller
LCD_Periph : aliased LCD_Peripheral
with Import, Address => System'To_Address (16#40002400#);
end STM32_SVD.LCD;
|
-----------------------------------------------------------------------
-- hestia-config -- Hestia configuration
-- Copyright (C) 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
package Hestia.Config is
-- Maximum number of zones to control.
MAX_ZONES : constant := 3;
-- Simple timezone correction (+1 hour, not DST support yet).
TIME_ZONE_CORRECTION : constant := 60;
end Hestia.Config;
|
-- Copyright 2010, 2011 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package Pck is
type Shape is abstract tagged record
X, Y: Integer;
end record;
function Position_X (S : in Shape) return Integer;
type Circle is new Shape with record
R : Integer;
end record;
function Area (C : in Circle) return Integer;
end Pck;
|
-- CD5012F.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT AN ADDRESS CLAUSE CAN BE GIVEN FOR A VARIABLE OF AN
-- ARRAY TYPE IN THE DECLARATIVE PART OF A GENERIC
-- PACKAGE BODY.
-- HISTORY:
-- DHH 09/17/87 CREATED ORIGINAL TEST.
-- PWB 05/11/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA'.
WITH SYSTEM; USE SYSTEM;
WITH REPORT; USE REPORT;
WITH SPPRT13;
PROCEDURE CD5012F IS
BEGIN
TEST ("CD5012F", "AN ADDRESS CLAUSE CAN BE " &
"GIVEN FOR A VARIABLE OF AN ARRAY " &
"TYPE IN THE DECLARATIVE " &
"PART OF A GENERIC PACKAGE BODY");
DECLARE
GENERIC
PACKAGE GENPACK IS
END GENPACK;
PACKAGE BODY GENPACK IS
ARRAY_VAR : ARRAY (0..4) OF INTEGER := (0,1,2,3,4);
FOR ARRAY_VAR USE AT SPPRT13.VARIABLE_ADDRESS;
BEGIN
IF EQUAL (3, 3) THEN
ARRAY_VAR := (4,3,2,1,0);
END IF;
IF ARRAY_VAR /= (4,3,2,1,0) THEN
FAILED ("WRONG VALUE FOR VARIABLE IN " &
"A GENERIC PACKAGE BODY");
END IF;
IF ARRAY_VAR'ADDRESS /= SPPRT13.VARIABLE_ADDRESS THEN
FAILED ("WRONG ADDRESS FOR VARIABLE " &
"IN A GENERIC PACKAGE BODY");
END IF;
END GENPACK;
PACKAGE PACK IS NEW GENPACK;
BEGIN
NULL;
END;
RESULT;
END CD5012F;
|
------------------------------------------------------------------------------
-- --
-- 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 merge node is a control node that brings together multiple alternate
-- flows. It is not used to synchronize concurrent flows but to accept one
-- among several alternate flows.
------------------------------------------------------------------------------
with AMF.UML.Control_Nodes;
package AMF.UML.Merge_Nodes is
pragma Preelaborate;
type UML_Merge_Node is limited interface
and AMF.UML.Control_Nodes.UML_Control_Node;
type UML_Merge_Node_Access is
access all UML_Merge_Node'Class;
for UML_Merge_Node_Access'Storage_Size use 0;
end AMF.UML.Merge_Nodes;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- A D A . S T R I N G S . W I D E _ S E A R C H --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- Copyright (c) 1992,1993,1994 NYU, All Rights Reserved --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
-- This package contains the search functions from Ada.Strings.Wide_Fixed.
-- They are separated out because they are shared by Ada.Strings.Wide_Bounded
-- and Ada.Strings.Wide_Unbounded, and we don't want to drag other irrelevant
-- stuff from Ada.Strings.Wide_Fixed when using the other two packages. We
-- make this a private package, since user programs should access these
-- subprograms via one of the standard string packages.
with Ada.Strings.Wide_Maps;
private package Ada.Strings.Wide_Search is
pragma Preelaborate (Wide_Search);
function Index (Source : in Wide_String;
Pattern : in Wide_String;
Going : in Direction := Forward;
Mapping : in Wide_Maps.Wide_Character_Mapping :=
Wide_Maps.Identity)
return Natural;
function Index (Source : in Wide_String;
Pattern : in Wide_String;
Going : in Direction := Forward;
Mapping : in Wide_Maps.Wide_Character_Mapping_Function)
return Natural;
function Index (Source : in Wide_String;
Set : in Wide_Maps.Wide_Character_Set;
Test : in Membership := Inside;
Going : in Direction := Forward)
return Natural;
function Index_Non_Blank (Source : in Wide_String;
Going : in Direction := Forward)
return Natural;
function Count (Source : in Wide_String;
Pattern : in Wide_String;
Mapping : in Wide_Maps.Wide_Character_Mapping :=
Wide_Maps.Identity)
return Natural;
function Count (Source : in Wide_String;
Pattern : in Wide_String;
Mapping : in Wide_Maps.Wide_Character_Mapping_Function)
return Natural;
function Count (Source : in Wide_String;
Set : in Wide_Maps.Wide_Character_Set)
return Natural;
procedure Find_Token (Source : in Wide_String;
Set : in Wide_Maps.Wide_Character_Set;
Test : in Membership;
First : out Positive;
Last : out Natural);
end Ada.Strings.Wide_Search;
|
------------------------------------------------------------------------------
-- --
-- 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 classifier that specifies a domain of objects and that also defines the
-- physical implementation of those objects. For example, a Component
-- stereotyped by «realization» will only have realizing Classifiers that
-- implement behavior specified by a separate «Specification» Component. See
-- «specification». This differs from «ImplementationClass» because an
-- «ImplementationClass» is a realization of a Class that can have features
-- such as attributes and methods that are useful to system designers.
------------------------------------------------------------------------------
limited with AMF.UML.Classifiers;
package AMF.Standard_Profile_L2.Realizations is
pragma Preelaborate;
type Standard_Profile_L2_Realization is limited interface;
type Standard_Profile_L2_Realization_Access is
access all Standard_Profile_L2_Realization'Class;
for Standard_Profile_L2_Realization_Access'Storage_Size use 0;
not overriding function Get_Base_Classifier
(Self : not null access constant Standard_Profile_L2_Realization)
return AMF.UML.Classifiers.UML_Classifier_Access is abstract;
-- Getter of Realization::base_Classifier.
--
not overriding procedure Set_Base_Classifier
(Self : not null access Standard_Profile_L2_Realization;
To : AMF.UML.Classifiers.UML_Classifier_Access) is abstract;
-- Setter of Realization::base_Classifier.
--
end AMF.Standard_Profile_L2.Realizations;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2017, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of STMicroelectronics nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
-- --
-- This file is based on: --
-- --
-- @file stm32f429xx.h --
-- @author MCD Application Team --
-- @version V1.1.0 --
-- @date 19-June-2014 --
-- @brief CMSIS STM32F407xx Device Peripheral Access Layer Header File. --
-- --
-- COPYRIGHT(c) 2014 STMicroelectronics --
------------------------------------------------------------------------------
-- This file provides declarations for devices on the STM32F42xxx MCUs
-- manufactured by ST Microelectronics. For example, an STM32F429.
pragma Warnings (Off, "* is an internal GNAT unit");
private with System.BB.Parameters;
pragma Warnings (On, "* is an internal GNAT unit");
with STM32_SVD; use STM32_SVD;
with STM32_SVD.DSI;
with STM32_SVD.SAI;
with STM32_SVD.SDMMC;
with STM32.ADC; use STM32.ADC;
with STM32.DAC; use STM32.DAC;
with STM32.DMA; use STM32.DMA;
with STM32.DSI; use STM32.DSI;
with STM32.GPIO; use STM32.GPIO;
with STM32.I2C; use STM32.I2C;
with STM32.SDMMC; use STM32.SDMMC;
with STM32.SPI; use STM32.SPI;
with STM32.I2S; use STM32.I2S;
with STM32.Timers; use STM32.Timers;
with STM32.RTC; use STM32.RTC;
package STM32.Device is
pragma Elaborate_Body;
Unknown_Device : exception;
-- Raised by the routines below for a device passed as an actual parameter
-- when that device is not present on the given hardware instance.
HSI_VALUE : constant := 16_000_000;
-- Internal oscillator in Hz
HSE_VALUE : constant UInt32;
-- External oscillator in Hz
procedure Enable_Clock (This : aliased in out GPIO_Port)
with Inline;
procedure Enable_Clock (Point : GPIO_Point)
with Inline;
procedure Enable_Clock (Points : GPIO_Points)
with Inline;
procedure Reset (This : aliased in out GPIO_Port)
with Inline;
procedure Reset (Point : GPIO_Point)
with Inline;
procedure Reset (Points : GPIO_Points)
with Inline;
GPIO_A : aliased GPIO_Port
with Import, Volatile, Address => GPIOA_Base;
GPIO_B : aliased GPIO_Port
with Import, Volatile, Address => GPIOB_Base;
GPIO_C : aliased GPIO_Port
with Import, Volatile, Address => GPIOC_Base;
GPIO_D : aliased GPIO_Port
with Import, Volatile, Address => GPIOD_Base;
GPIO_E : aliased GPIO_Port
with Import, Volatile, Address => GPIOE_Base;
GPIO_F : aliased GPIO_Port
with Import, Volatile, Address => GPIOF_Base;
GPIO_G : aliased GPIO_Port
with Import, Volatile, Address => GPIOG_Base;
GPIO_H : aliased GPIO_Port
with Import, Volatile, Address => GPIOH_Base;
GPIO_I : aliased GPIO_Port
with Import, Volatile, Address => GPIOI_Base;
GPIO_J : aliased GPIO_Port
with Import, Volatile, Address => GPIOJ_Base;
GPIO_K : aliased GPIO_Port
with Import, Volatile, Address => GPIOK_Base;
function GPIO_Port_Representation (Port : GPIO_Port) return UInt4
with Inline;
PA0 : aliased GPIO_Point := (GPIO_A'Access, Pin_0);
PA1 : aliased GPIO_Point := (GPIO_A'Access, Pin_1);
PA2 : aliased GPIO_Point := (GPIO_A'Access, Pin_2);
PA3 : aliased GPIO_Point := (GPIO_A'Access, Pin_3);
PA4 : aliased GPIO_Point := (GPIO_A'Access, Pin_4);
PA5 : aliased GPIO_Point := (GPIO_A'Access, Pin_5);
PA6 : aliased GPIO_Point := (GPIO_A'Access, Pin_6);
PA7 : aliased GPIO_Point := (GPIO_A'Access, Pin_7);
PA8 : aliased GPIO_Point := (GPIO_A'Access, Pin_8);
PA9 : aliased GPIO_Point := (GPIO_A'Access, Pin_9);
PA10 : aliased GPIO_Point := (GPIO_A'Access, Pin_10);
PA11 : aliased GPIO_Point := (GPIO_A'Access, Pin_11);
PA12 : aliased GPIO_Point := (GPIO_A'Access, Pin_12);
PA13 : aliased GPIO_Point := (GPIO_A'Access, Pin_13);
PA14 : aliased GPIO_Point := (GPIO_A'Access, Pin_14);
PA15 : aliased GPIO_Point := (GPIO_A'Access, Pin_15);
PB0 : aliased GPIO_Point := (GPIO_B'Access, Pin_0);
PB1 : aliased GPIO_Point := (GPIO_B'Access, Pin_1);
PB2 : aliased GPIO_Point := (GPIO_B'Access, Pin_2);
PB3 : aliased GPIO_Point := (GPIO_B'Access, Pin_3);
PB4 : aliased GPIO_Point := (GPIO_B'Access, Pin_4);
PB5 : aliased GPIO_Point := (GPIO_B'Access, Pin_5);
PB6 : aliased GPIO_Point := (GPIO_B'Access, Pin_6);
PB7 : aliased GPIO_Point := (GPIO_B'Access, Pin_7);
PB8 : aliased GPIO_Point := (GPIO_B'Access, Pin_8);
PB9 : aliased GPIO_Point := (GPIO_B'Access, Pin_9);
PB10 : aliased GPIO_Point := (GPIO_B'Access, Pin_10);
PB11 : aliased GPIO_Point := (GPIO_B'Access, Pin_11);
PB12 : aliased GPIO_Point := (GPIO_B'Access, Pin_12);
PB13 : aliased GPIO_Point := (GPIO_B'Access, Pin_13);
PB14 : aliased GPIO_Point := (GPIO_B'Access, Pin_14);
PB15 : aliased GPIO_Point := (GPIO_B'Access, Pin_15);
PC0 : aliased GPIO_Point := (GPIO_C'Access, Pin_0);
PC1 : aliased GPIO_Point := (GPIO_C'Access, Pin_1);
PC2 : aliased GPIO_Point := (GPIO_C'Access, Pin_2);
PC3 : aliased GPIO_Point := (GPIO_C'Access, Pin_3);
PC4 : aliased GPIO_Point := (GPIO_C'Access, Pin_4);
PC5 : aliased GPIO_Point := (GPIO_C'Access, Pin_5);
PC6 : aliased GPIO_Point := (GPIO_C'Access, Pin_6);
PC7 : aliased GPIO_Point := (GPIO_C'Access, Pin_7);
PC8 : aliased GPIO_Point := (GPIO_C'Access, Pin_8);
PC9 : aliased GPIO_Point := (GPIO_C'Access, Pin_9);
PC10 : aliased GPIO_Point := (GPIO_C'Access, Pin_10);
PC11 : aliased GPIO_Point := (GPIO_C'Access, Pin_11);
PC12 : aliased GPIO_Point := (GPIO_C'Access, Pin_12);
PC13 : aliased GPIO_Point := (GPIO_C'Access, Pin_13);
PC14 : aliased GPIO_Point := (GPIO_C'Access, Pin_14);
PC15 : aliased GPIO_Point := (GPIO_C'Access, Pin_15);
PD0 : aliased GPIO_Point := (GPIO_D'Access, Pin_0);
PD1 : aliased GPIO_Point := (GPIO_D'Access, Pin_1);
PD2 : aliased GPIO_Point := (GPIO_D'Access, Pin_2);
PD3 : aliased GPIO_Point := (GPIO_D'Access, Pin_3);
PD4 : aliased GPIO_Point := (GPIO_D'Access, Pin_4);
PD5 : aliased GPIO_Point := (GPIO_D'Access, Pin_5);
PD6 : aliased GPIO_Point := (GPIO_D'Access, Pin_6);
PD7 : aliased GPIO_Point := (GPIO_D'Access, Pin_7);
PD8 : aliased GPIO_Point := (GPIO_D'Access, Pin_8);
PD9 : aliased GPIO_Point := (GPIO_D'Access, Pin_9);
PD10 : aliased GPIO_Point := (GPIO_D'Access, Pin_10);
PD11 : aliased GPIO_Point := (GPIO_D'Access, Pin_11);
PD12 : aliased GPIO_Point := (GPIO_D'Access, Pin_12);
PD13 : aliased GPIO_Point := (GPIO_D'Access, Pin_13);
PD14 : aliased GPIO_Point := (GPIO_D'Access, Pin_14);
PD15 : aliased GPIO_Point := (GPIO_D'Access, Pin_15);
PE0 : aliased GPIO_Point := (GPIO_E'Access, Pin_0);
PE1 : aliased GPIO_Point := (GPIO_E'Access, Pin_1);
PE2 : aliased GPIO_Point := (GPIO_E'Access, Pin_2);
PE3 : aliased GPIO_Point := (GPIO_E'Access, Pin_3);
PE4 : aliased GPIO_Point := (GPIO_E'Access, Pin_4);
PE5 : aliased GPIO_Point := (GPIO_E'Access, Pin_5);
PE6 : aliased GPIO_Point := (GPIO_E'Access, Pin_6);
PE7 : aliased GPIO_Point := (GPIO_E'Access, Pin_7);
PE8 : aliased GPIO_Point := (GPIO_E'Access, Pin_8);
PE9 : aliased GPIO_Point := (GPIO_E'Access, Pin_9);
PE10 : aliased GPIO_Point := (GPIO_E'Access, Pin_10);
PE11 : aliased GPIO_Point := (GPIO_E'Access, Pin_11);
PE12 : aliased GPIO_Point := (GPIO_E'Access, Pin_12);
PE13 : aliased GPIO_Point := (GPIO_E'Access, Pin_13);
PE14 : aliased GPIO_Point := (GPIO_E'Access, Pin_14);
PE15 : aliased GPIO_Point := (GPIO_E'Access, Pin_15);
PF0 : aliased GPIO_Point := (GPIO_F'Access, Pin_0);
PF1 : aliased GPIO_Point := (GPIO_F'Access, Pin_1);
PF2 : aliased GPIO_Point := (GPIO_F'Access, Pin_2);
PF3 : aliased GPIO_Point := (GPIO_F'Access, Pin_3);
PF4 : aliased GPIO_Point := (GPIO_F'Access, Pin_4);
PF5 : aliased GPIO_Point := (GPIO_F'Access, Pin_5);
PF6 : aliased GPIO_Point := (GPIO_F'Access, Pin_6);
PF7 : aliased GPIO_Point := (GPIO_F'Access, Pin_7);
PF8 : aliased GPIO_Point := (GPIO_F'Access, Pin_8);
PF9 : aliased GPIO_Point := (GPIO_F'Access, Pin_9);
PF10 : aliased GPIO_Point := (GPIO_F'Access, Pin_10);
PF11 : aliased GPIO_Point := (GPIO_F'Access, Pin_11);
PF12 : aliased GPIO_Point := (GPIO_F'Access, Pin_12);
PF13 : aliased GPIO_Point := (GPIO_F'Access, Pin_13);
PF14 : aliased GPIO_Point := (GPIO_F'Access, Pin_14);
PF15 : aliased GPIO_Point := (GPIO_F'Access, Pin_15);
PG0 : aliased GPIO_Point := (GPIO_G'Access, Pin_0);
PG1 : aliased GPIO_Point := (GPIO_G'Access, Pin_1);
PG2 : aliased GPIO_Point := (GPIO_G'Access, Pin_2);
PG3 : aliased GPIO_Point := (GPIO_G'Access, Pin_3);
PG4 : aliased GPIO_Point := (GPIO_G'Access, Pin_4);
PG5 : aliased GPIO_Point := (GPIO_G'Access, Pin_5);
PG6 : aliased GPIO_Point := (GPIO_G'Access, Pin_6);
PG7 : aliased GPIO_Point := (GPIO_G'Access, Pin_7);
PG8 : aliased GPIO_Point := (GPIO_G'Access, Pin_8);
PG9 : aliased GPIO_Point := (GPIO_G'Access, Pin_9);
PG10 : aliased GPIO_Point := (GPIO_G'Access, Pin_10);
PG11 : aliased GPIO_Point := (GPIO_G'Access, Pin_11);
PG12 : aliased GPIO_Point := (GPIO_G'Access, Pin_12);
PG13 : aliased GPIO_Point := (GPIO_G'Access, Pin_13);
PG14 : aliased GPIO_Point := (GPIO_G'Access, Pin_14);
PG15 : aliased GPIO_Point := (GPIO_G'Access, Pin_15);
PH0 : aliased GPIO_Point := (GPIO_H'Access, Pin_0);
PH1 : aliased GPIO_Point := (GPIO_H'Access, Pin_1);
PH2 : aliased GPIO_Point := (GPIO_H'Access, Pin_2);
PH3 : aliased GPIO_Point := (GPIO_H'Access, Pin_3);
PH4 : aliased GPIO_Point := (GPIO_H'Access, Pin_4);
PH5 : aliased GPIO_Point := (GPIO_H'Access, Pin_5);
PH6 : aliased GPIO_Point := (GPIO_H'Access, Pin_6);
PH7 : aliased GPIO_Point := (GPIO_H'Access, Pin_7);
PH8 : aliased GPIO_Point := (GPIO_H'Access, Pin_8);
PH9 : aliased GPIO_Point := (GPIO_H'Access, Pin_9);
PH10 : aliased GPIO_Point := (GPIO_H'Access, Pin_10);
PH11 : aliased GPIO_Point := (GPIO_H'Access, Pin_11);
PH12 : aliased GPIO_Point := (GPIO_H'Access, Pin_12);
PH13 : aliased GPIO_Point := (GPIO_H'Access, Pin_13);
PH14 : aliased GPIO_Point := (GPIO_H'Access, Pin_14);
PH15 : aliased GPIO_Point := (GPIO_H'Access, Pin_15);
PI0 : aliased GPIO_Point := (GPIO_I'Access, Pin_0);
PI1 : aliased GPIO_Point := (GPIO_I'Access, Pin_1);
PI2 : aliased GPIO_Point := (GPIO_I'Access, Pin_2);
PI3 : aliased GPIO_Point := (GPIO_I'Access, Pin_3);
PI4 : aliased GPIO_Point := (GPIO_I'Access, Pin_4);
PI5 : aliased GPIO_Point := (GPIO_I'Access, Pin_5);
PI6 : aliased GPIO_Point := (GPIO_I'Access, Pin_6);
PI7 : aliased GPIO_Point := (GPIO_I'Access, Pin_7);
PI8 : aliased GPIO_Point := (GPIO_I'Access, Pin_8);
PI9 : aliased GPIO_Point := (GPIO_I'Access, Pin_9);
PI10 : aliased GPIO_Point := (GPIO_I'Access, Pin_10);
PI11 : aliased GPIO_Point := (GPIO_I'Access, Pin_11);
PI12 : aliased GPIO_Point := (GPIO_I'Access, Pin_12);
PI13 : aliased GPIO_Point := (GPIO_I'Access, Pin_13);
PI14 : aliased GPIO_Point := (GPIO_I'Access, Pin_14);
PI15 : aliased GPIO_Point := (GPIO_I'Access, Pin_15);
PJ0 : aliased GPIO_Point := (GPIO_J'Access, Pin_0);
PJ1 : aliased GPIO_Point := (GPIO_J'Access, Pin_1);
PJ2 : aliased GPIO_Point := (GPIO_J'Access, Pin_2);
PJ3 : aliased GPIO_Point := (GPIO_J'Access, Pin_3);
PJ4 : aliased GPIO_Point := (GPIO_J'Access, Pin_4);
PJ5 : aliased GPIO_Point := (GPIO_J'Access, Pin_5);
PJ6 : aliased GPIO_Point := (GPIO_J'Access, Pin_6);
PJ7 : aliased GPIO_Point := (GPIO_J'Access, Pin_7);
PJ8 : aliased GPIO_Point := (GPIO_J'Access, Pin_8);
PJ9 : aliased GPIO_Point := (GPIO_J'Access, Pin_9);
PJ10 : aliased GPIO_Point := (GPIO_J'Access, Pin_10);
PJ11 : aliased GPIO_Point := (GPIO_J'Access, Pin_11);
PJ12 : aliased GPIO_Point := (GPIO_J'Access, Pin_12);
PJ13 : aliased GPIO_Point := (GPIO_J'Access, Pin_13);
PJ14 : aliased GPIO_Point := (GPIO_J'Access, Pin_14);
PJ15 : aliased GPIO_Point := (GPIO_J'Access, Pin_15);
PK0 : aliased GPIO_Point := (GPIO_K'Access, Pin_0);
PK1 : aliased GPIO_Point := (GPIO_K'Access, Pin_1);
PK2 : aliased GPIO_Point := (GPIO_K'Access, Pin_2);
PK3 : aliased GPIO_Point := (GPIO_K'Access, Pin_3);
PK4 : aliased GPIO_Point := (GPIO_K'Access, Pin_4);
PK5 : aliased GPIO_Point := (GPIO_K'Access, Pin_5);
PK6 : aliased GPIO_Point := (GPIO_K'Access, Pin_6);
PK7 : aliased GPIO_Point := (GPIO_K'Access, Pin_7);
PK8 : aliased GPIO_Point := (GPIO_K'Access, Pin_8);
PK9 : aliased GPIO_Point := (GPIO_K'Access, Pin_9);
PK10 : aliased GPIO_Point := (GPIO_K'Access, Pin_10);
PK11 : aliased GPIO_Point := (GPIO_K'Access, Pin_11);
PK12 : aliased GPIO_Point := (GPIO_K'Access, Pin_12);
PK13 : aliased GPIO_Point := (GPIO_K'Access, Pin_13);
PK14 : aliased GPIO_Point := (GPIO_K'Access, Pin_14);
PK15 : aliased GPIO_Point := (GPIO_K'Access, Pin_15);
GPIO_AF_RTC_50Hz_0 : constant GPIO_Alternate_Function;
GPIO_AF_MCO_0 : constant GPIO_Alternate_Function;
GPIO_AF_TAMPER_0 : constant GPIO_Alternate_Function;
GPIO_AF_SWJ_0 : constant GPIO_Alternate_Function;
GPIO_AF_TRACE_0 : constant GPIO_Alternate_Function;
GPIO_AF_TIM1_1 : constant GPIO_Alternate_Function;
GPIO_AF_TIM2_1 : constant GPIO_Alternate_Function;
GPIO_AF_I2C4_1 : constant GPIO_Alternate_Function;
GPIO_AF_UART5_1 : constant GPIO_Alternate_Function;
GPIO_AF_TIM3_2 : constant GPIO_Alternate_Function;
GPIO_AF_TIM4_2 : constant GPIO_Alternate_Function;
GPIO_AF_TIM5_2 : constant GPIO_Alternate_Function;
GPIO_AF_TIM8_3 : constant GPIO_Alternate_Function;
GPIO_AF_TIM9_3 : constant GPIO_Alternate_Function;
GPIO_AF_TIM10_3 : constant GPIO_Alternate_Function;
GPIO_AF_TIM11_3 : constant GPIO_Alternate_Function;
GPIO_AF_LPTIM1_3 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_3 : constant GPIO_Alternate_Function;
GPIO_AF_CEC_3 : constant GPIO_Alternate_Function;
GPIO_AF_I2C1_4 : constant GPIO_Alternate_Function;
GPIO_AF_I2C2_4 : constant GPIO_Alternate_Function;
GPIO_AF_I2C3_4 : constant GPIO_Alternate_Function;
GPIO_AF_I2C4_4 : constant GPIO_Alternate_Function;
GPIO_AF_USART1_4 : constant GPIO_Alternate_Function;
GPIO_AF_CEC_4 : constant GPIO_Alternate_Function;
GPIO_AF_SPI1_5 : constant GPIO_Alternate_Function;
GPIO_AF_SPI2_5 : constant GPIO_Alternate_Function;
GPIO_AF_I2S3_5 : constant GPIO_Alternate_Function;
GPIO_AF_SPI4_5 : constant GPIO_Alternate_Function;
GPIO_AF_SPI5_5 : constant GPIO_Alternate_Function;
GPIO_AF_SPI6_5 : constant GPIO_Alternate_Function;
GPIO_AF_SPI2_6 : constant GPIO_Alternate_Function;
GPIO_AF_SPI3_6 : constant GPIO_Alternate_Function;
GPIO_AF_I2S2_6 : constant GPIO_Alternate_Function;
GPIO_AF_I2S3_6 : constant GPIO_Alternate_Function;
GPIO_AF_SAI1_6 : constant GPIO_Alternate_Function;
GPIO_AF_UART4_6 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_6 : constant GPIO_Alternate_Function;
GPIO_AF_SPI2_7 : constant GPIO_Alternate_Function;
GPIO_AF_I2S2_7 : constant GPIO_Alternate_Function;
GPIO_AF_SPI3_7 : constant GPIO_Alternate_Function;
GPIO_AF_I2S3_7 : constant GPIO_Alternate_Function;
GPIO_AF_SPI6_7 : constant GPIO_Alternate_Function;
GPIO_AF_USART1_7 : constant GPIO_Alternate_Function;
GPIO_AF_USART2_7 : constant GPIO_Alternate_Function;
GPIO_AF_USART3_7 : constant GPIO_Alternate_Function;
GPIO_AF_UART5_7 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_7 : constant GPIO_Alternate_Function;
GPIO_AF_SPDIF_7 : constant GPIO_Alternate_Function;
GPIO_AF_SPI6_8 : constant GPIO_Alternate_Function;
GPIO_AF_SAI2_8 : constant GPIO_Alternate_Function;
GPIO_AF_UART4_8 : constant GPIO_Alternate_Function;
GPIO_AF_UART5_8 : constant GPIO_Alternate_Function;
GPIO_AF_USART6_8 : constant GPIO_Alternate_Function;
GPIO_AF_UART7_8 : constant GPIO_Alternate_Function;
GPIO_AF_UART8_8 : constant GPIO_Alternate_Function;
GPIO_AF_OTG_FS_8 : constant GPIO_Alternate_Function;
GPIO_AF_SPDIF_8 : constant GPIO_Alternate_Function;
GPIO_AF_CAN1_9 : constant GPIO_Alternate_Function;
GPIO_AF_CAN2_9 : constant GPIO_Alternate_Function;
GPIO_AF_TIM12_9 : constant GPIO_Alternate_Function;
GPIO_AF_TIM13_9 : constant GPIO_Alternate_Function;
GPIO_AF_TIM14_9 : constant GPIO_Alternate_Function;
GPIO_AF_QUADSPI_9 : constant GPIO_Alternate_Function;
GPIO_AF_FMC_9 : constant GPIO_Alternate_Function;
GPIO_AF_LTDC_9 : constant GPIO_Alternate_Function;
GPIO_AF_SAI2_10 : constant GPIO_Alternate_Function;
GPIO_AF_QUADSPI_10 : constant GPIO_Alternate_Function;
GPIO_AF_SDMMC2_10 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_10 : constant GPIO_Alternate_Function;
GPIO_AF_OTG1_FS_10 : constant GPIO_Alternate_Function;
GPIO_AF_OTG_HS_10 : constant GPIO_Alternate_Function;
GPIO_AF_LTDC_10 : constant GPIO_Alternate_Function;
GPIO_AF_I2C4_11 : constant GPIO_Alternate_Function;
GPIO_AF_CAN3_11 : constant GPIO_Alternate_Function;
GPIO_AF_SDMMC2_11 : constant GPIO_Alternate_Function;
GPIO_AF_ETH_11 : constant GPIO_Alternate_Function;
GPIO_AF_UART7_12 : constant GPIO_Alternate_Function;
GPIO_AF_FMC_12 : constant GPIO_Alternate_Function;
GPIO_AF_SDMMC1_12 : constant GPIO_Alternate_Function;
GPIO_AF_MDIOS_12 : constant GPIO_Alternate_Function;
GPIO_AF_OTG2_FS_12 : constant GPIO_Alternate_Function;
GPIO_AF_DCMI_13 : constant GPIO_Alternate_Function;
GPIO_AF_DSI_13 : constant GPIO_Alternate_Function;
GPIO_AF_LTDC_13 : constant GPIO_Alternate_Function;
GPIO_AF_LTDC_14 : constant GPIO_Alternate_Function;
GPIO_AF_EVENTOUT_15 : constant GPIO_Alternate_Function;
ADC_1 : aliased Analog_To_Digital_Converter
with Import, Volatile, Address => ADC1_Base;
ADC_2 : aliased Analog_To_Digital_Converter
with Import, Volatile, Address => ADC2_Base;
ADC_3 : aliased Analog_To_Digital_Converter
with Import, Volatile, Address => ADC3_Base;
VBat : constant ADC_Point := (ADC_1'Access, Channel => VBat_Channel);
Temperature_Sensor : constant ADC_Point := VBat;
-- see RM pg 410, section 13.10, also pg 389
VBat_Bridge_Divisor : constant := 4;
-- The VBAT pin is internally connected to a bridge divider. The actual
-- voltage is the raw conversion value * the divisor. See section 13.11,
-- pg 412 of the RM.
procedure Enable_Clock (This : aliased in out Analog_To_Digital_Converter);
procedure Reset_All_ADC_Units;
DAC_1 : aliased Digital_To_Analog_Converter
with Import, Volatile, Address => DAC_Base;
-- ??? Taken from the STM32F429 definition, TO BE CHECKED FOR THE F7
DAC_Channel_1_IO : constant GPIO_Point := PA4;
DAC_Channel_2_IO : constant GPIO_Point := PA5;
procedure Enable_Clock (This : aliased in out Digital_To_Analog_Converter);
procedure Reset (This : aliased in out Digital_To_Analog_Converter);
-- USART_1 : aliased USART with Import, Volatile, Address => USART1_Base;
-- USART_2 : aliased USART with Import, Volatile, Address => USART2_Base;
-- USART_3 : aliased USART with Import, Volatile, Address => USART3_Base;
-- UART_4 : aliased USART with Import, Volatile, Address => UART4_Base;
-- UART_5 : aliased USART with Import, Volatile, Address => UART5_Base;
-- USART_6 : aliased USART with Import, Volatile, Address => USART6_Base;
-- USART_7 : aliased USART with Import, Volatile, Address => UART7_Base;
-- USART_8 : aliased USART with Import, Volatile, Address => UART8_Base;
--
-- procedure Enable_Clock (This : aliased in out USART);
--
-- procedure Reset (This : aliased in out USART);
DMA_1 : aliased DMA_Controller with Import, Volatile, Address => DMA1_Base;
DMA_2 : aliased DMA_Controller with Import, Volatile, Address => DMA2_Base;
procedure Enable_Clock (This : aliased in out DMA_Controller);
procedure Reset (This : aliased in out DMA_Controller);
Internal_I2C_Port_1 : aliased Internal_I2C_Port
with Import, Volatile, Address => I2C1_Base;
Internal_I2C_Port_2 : aliased Internal_I2C_Port
with Import, Volatile, Address => I2C2_Base;
Internal_I2C_Port_3 : aliased Internal_I2C_Port
with Import, Volatile, Address => I2C3_Base;
Internal_I2C_Port_4 : aliased Internal_I2C_Port
with Import, Volatile, Address => I2C4_Base;
I2C_1 : aliased I2C_Port (Internal_I2C_Port_1'Access);
I2C_2 : aliased I2C_Port (Internal_I2C_Port_2'Access);
I2C_3 : aliased I2C_Port (Internal_I2C_Port_3'Access);
I2C_4 : aliased I2C_Port (Internal_I2C_Port_4'Access);
type I2C_Port_Id is (I2C_Id_1, I2C_Id_2, I2C_Id_3, I2C_Id_4);
function As_Port_Id (Port : I2C_Port) return I2C_Port_Id with Inline;
procedure Enable_Clock (This : I2C_Port);
procedure Enable_Clock (This : I2C_Port_Id);
procedure Reset (This : I2C_Port);
procedure Reset (This : I2C_Port_Id);
Internal_SPI_1 : aliased Internal_SPI_Port
with Import, Volatile, Address => SPI1_Base;
Internal_SPI_2 : aliased Internal_SPI_Port
with Import, Volatile, Address => SPI2_Base;
Internal_SPI_3 : aliased Internal_SPI_Port
with Import, Volatile, Address => SPI3_Base;
Internal_SPI_4 : aliased Internal_SPI_Port
with Import, Volatile, Address => SPI4_Base;
Internal_SPI_5 : aliased Internal_SPI_Port
with Import, Volatile, Address => SPI5_Base;
Internal_SPI_6 : aliased Internal_SPI_Port
with Import, Volatile, Address => SPI6_Base;
SPI_1 : aliased SPI_Port (Internal_SPI_1'Access);
SPI_2 : aliased SPI_Port (Internal_SPI_2'Access);
SPI_3 : aliased SPI_Port (Internal_SPI_3'Access);
SPI_4 : aliased SPI_Port (Internal_SPI_4'Access);
SPI_5 : aliased SPI_Port (Internal_SPI_5'Access);
SPI_6 : aliased SPI_Port (Internal_SPI_6'Access);
procedure Enable_Clock (This : SPI_Port);
procedure Reset (This : SPI_Port);
Internal_I2S_1 : aliased Internal_I2S_Port
with Import, Volatile, Address => SPI1_Base;
Internal_I2S_2 : aliased Internal_I2S_Port
with Import, Volatile, Address => SPI2_Base;
Internal_I2S_3 : aliased Internal_I2S_Port
with Import, Volatile, Address => SPI3_Base;
Internal_I2S_4 : aliased Internal_I2S_Port
with Import, Volatile, Address => SPI4_Base;
Internal_I2S_5 : aliased Internal_I2S_Port
with Import, Volatile, Address => SPI5_Base;
Internal_I2S_6 : aliased Internal_I2S_Port
with Import, Volatile, Address => SPI6_Base;
I2S_1 : aliased I2S_Port (Internal_I2S_1'Access);
I2S_2 : aliased I2S_Port (Internal_I2S_2'Access);
I2S_3 : aliased I2S_Port (Internal_I2S_3'Access);
I2S_4 : aliased I2S_Port (Internal_I2S_4'Access);
I2S_5 : aliased I2S_Port (Internal_I2S_5'Access);
I2S_6 : aliased I2S_Port (Internal_I2S_6'Access);
procedure Enable_Clock (This : I2S_Port);
procedure Reset (This : in out I2S_Port);
Timer_1 : aliased Timer with Volatile, Address => TIM1_Base;
pragma Import (Ada, Timer_1);
Timer_2 : aliased Timer with Volatile, Address => TIM2_Base;
pragma Import (Ada, Timer_2);
Timer_3 : aliased Timer with Volatile, Address => TIM3_Base;
pragma Import (Ada, Timer_3);
Timer_4 : aliased Timer with Volatile, Address => TIM4_Base;
pragma Import (Ada, Timer_4);
Timer_5 : aliased Timer with Volatile, Address => TIM5_Base;
pragma Import (Ada, Timer_5);
Timer_6 : aliased Timer with Volatile, Address => TIM6_Base;
pragma Import (Ada, Timer_6);
Timer_7 : aliased Timer with Volatile, Address => TIM7_Base;
pragma Import (Ada, Timer_7);
Timer_8 : aliased Timer with Volatile, Address => TIM8_Base;
pragma Import (Ada, Timer_8);
Timer_9 : aliased Timer with Volatile, Address => TIM9_Base;
pragma Import (Ada, Timer_9);
Timer_10 : aliased Timer with Volatile, Address => TIM10_Base;
pragma Import (Ada, Timer_10);
Timer_11 : aliased Timer with Volatile, Address => TIM11_Base;
pragma Import (Ada, Timer_11);
Timer_12 : aliased Timer with Volatile, Address => TIM12_Base;
pragma Import (Ada, Timer_12);
Timer_13 : aliased Timer with Volatile, Address => TIM13_Base;
pragma Import (Ada, Timer_13);
Timer_14 : aliased Timer with Volatile, Address => TIM14_Base;
pragma Import (Ada, Timer_14);
procedure Enable_Clock (This : in out Timer);
procedure Reset (This : in out Timer);
-----------
-- Audio --
-----------
subtype SAI_Port is STM32_SVD.SAI.SAI_Peripheral;
SAI_1 : SAI_Port renames STM32_SVD.SAI.SAI1_Periph;
SAI_2 : SAI_Port renames STM32_SVD.SAI.SAI2_Periph;
procedure Enable_Clock (This : in out SAI_Port);
procedure Reset (This : in out SAI_Port);
function Get_Input_Clock (Periph : SAI_Port) return UInt32;
--------------
-- DSI Host --
--------------
DSIHOST : aliased DSI_Host (STM32_SVD.DSI.DSI_Periph'Access);
------------
-- SDMMC --
------------
SDMMC_1 : aliased SDMMC_Controller (STM32_SVD.SDMMC.SDMMC1_Periph'Access);
SDMMC_2 : aliased SDMMC_Controller (STM32_SVD.SDMMC.SDMMC2_Periph'Access);
procedure Enable_Clock (This : in out SDMMC_Controller);
procedure Reset (This : in out SDMMC_Controller);
-----------------------------
-- Reset and Clock Control --
-----------------------------
type RCC_System_Clocks is record
SYSCLK : UInt32;
HCLK : UInt32;
PCLK1 : UInt32;
PCLK2 : UInt32;
TIMCLK1 : UInt32;
TIMCLK2 : UInt32;
I2SCLK : UInt32;
end record;
function System_Clock_Frequencies return RCC_System_Clocks;
procedure Set_PLLI2S_Factors (Pll_N : UInt9;
Pll_R : UInt3);
function PLLI2S_Enabled return Boolean;
procedure Enable_PLLI2S
with Post => PLLI2S_Enabled;
procedure Disable_PLLI2S
with Post => not PLLI2S_Enabled;
type PLLSAI_DivR is new UInt2;
PLLSAI_DIV2 : constant PLLSAI_DivR := 0;
PLLSAI_DIV4 : constant PLLSAI_DivR := 1;
PLLSAI_DIV8 : constant PLLSAI_DivR := 2;
PLLSAI_DIV16 : constant PLLSAI_DivR := 3;
procedure Set_PLLSAI_Factors
(LCD : UInt3;
VCO : UInt9;
DivR : PLLSAI_DivR);
procedure Enable_PLLSAI;
procedure Disable_PLLSAI;
function PLLSAI_Ready return Boolean;
subtype DIVQ is Natural range 1 .. 32;
procedure Configure_SAI_I2S_Clock
(Periph : SAI_Port;
PLLI2SN : UInt9;
PLLI2SQ : UInt4;
PLLI2SDIVQ : DIVQ);
procedure Enable_DCMI_Clock;
procedure Reset_DCMI;
RTC : aliased RTC_Device;
private
HSE_VALUE : constant UInt32 := System.BB.Parameters.HSE_Clock;
GPIO_AF_RTC_50Hz_0 : constant GPIO_Alternate_Function := 0;
GPIO_AF_MCO_0 : constant GPIO_Alternate_Function := 0;
GPIO_AF_TAMPER_0 : constant GPIO_Alternate_Function := 0;
GPIO_AF_SWJ_0 : constant GPIO_Alternate_Function := 0;
GPIO_AF_TRACE_0 : constant GPIO_Alternate_Function := 0;
GPIO_AF_TIM1_1 : constant GPIO_Alternate_Function := 1;
GPIO_AF_TIM2_1 : constant GPIO_Alternate_Function := 1;
GPIO_AF_I2C4_1 : constant GPIO_Alternate_Function := 1;
GPIO_AF_UART5_1 : constant GPIO_Alternate_Function := 1;
GPIO_AF_TIM3_2 : constant GPIO_Alternate_Function := 2;
GPIO_AF_TIM4_2 : constant GPIO_Alternate_Function := 2;
GPIO_AF_TIM5_2 : constant GPIO_Alternate_Function := 2;
GPIO_AF_TIM8_3 : constant GPIO_Alternate_Function := 3;
GPIO_AF_TIM9_3 : constant GPIO_Alternate_Function := 3;
GPIO_AF_TIM10_3 : constant GPIO_Alternate_Function := 3;
GPIO_AF_TIM11_3 : constant GPIO_Alternate_Function := 3;
GPIO_AF_LPTIM1_3 : constant GPIO_Alternate_Function := 3;
GPIO_AF_DFSDM1_3 : constant GPIO_Alternate_Function := 3;
GPIO_AF_CEC_3 : constant GPIO_Alternate_Function := 3;
GPIO_AF_I2C1_4 : constant GPIO_Alternate_Function := 4;
GPIO_AF_I2C2_4 : constant GPIO_Alternate_Function := 4;
GPIO_AF_I2C3_4 : constant GPIO_Alternate_Function := 4;
GPIO_AF_I2C4_4 : constant GPIO_Alternate_Function := 4;
GPIO_AF_USART1_4 : constant GPIO_Alternate_Function := 4;
GPIO_AF_CEC_4 : constant GPIO_Alternate_Function := 4;
GPIO_AF_SPI1_5 : constant GPIO_Alternate_Function := 5;
GPIO_AF_SPI2_5 : constant GPIO_Alternate_Function := 5;
GPIO_AF_I2S3_5 : constant GPIO_Alternate_Function := 5;
GPIO_AF_SPI4_5 : constant GPIO_Alternate_Function := 5;
GPIO_AF_SPI5_5 : constant GPIO_Alternate_Function := 5;
GPIO_AF_SPI6_5 : constant GPIO_Alternate_Function := 5;
GPIO_AF_SPI2_6 : constant GPIO_Alternate_Function := 6;
GPIO_AF_SPI3_6 : constant GPIO_Alternate_Function := 6;
GPIO_AF_I2S2_6 : constant GPIO_Alternate_Function := 6;
GPIO_AF_I2S3_6 : constant GPIO_Alternate_Function := 6;
GPIO_AF_SAI1_6 : constant GPIO_Alternate_Function := 6;
GPIO_AF_UART4_6 : constant GPIO_Alternate_Function := 6;
GPIO_AF_DFSDM1_6 : constant GPIO_Alternate_Function := 6;
GPIO_AF_SPI2_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_I2S2_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_SPI3_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_I2S3_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_SPI6_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_USART1_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_USART2_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_USART3_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_UART5_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_DFSDM1_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_SPDIF_7 : constant GPIO_Alternate_Function := 8;
GPIO_AF_SPI6_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_SAI2_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_UART4_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_UART5_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_USART6_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_UART7_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_UART8_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_OTG_FS_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_SPDIF_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_CAN1_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_CAN2_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_TIM12_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_TIM13_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_TIM14_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_QUADSPI_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_FMC_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_LTDC_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_SAI2_10 : constant GPIO_Alternate_Function := 10;
GPIO_AF_QUADSPI_10 : constant GPIO_Alternate_Function := 10;
GPIO_AF_SDMMC2_10 : constant GPIO_Alternate_Function := 10;
GPIO_AF_DFSDM1_10 : constant GPIO_Alternate_Function := 10;
GPIO_AF_OTG1_FS_10 : constant GPIO_Alternate_Function := 10;
GPIO_AF_OTG_HS_10 : constant GPIO_Alternate_Function := 10;
GPIO_AF_LTDC_10 : constant GPIO_Alternate_Function := 10;
GPIO_AF_I2C4_11 : constant GPIO_Alternate_Function := 11;
GPIO_AF_CAN3_11 : constant GPIO_Alternate_Function := 11;
GPIO_AF_SDMMC2_11 : constant GPIO_Alternate_Function := 11;
GPIO_AF_ETH_11 : constant GPIO_Alternate_Function := 11;
GPIO_AF_UART7_12 : constant GPIO_Alternate_Function := 12;
GPIO_AF_FMC_12 : constant GPIO_Alternate_Function := 12;
GPIO_AF_SDMMC1_12 : constant GPIO_Alternate_Function := 12;
GPIO_AF_MDIOS_12 : constant GPIO_Alternate_Function := 12;
GPIO_AF_OTG2_FS_12 : constant GPIO_Alternate_Function := 12;
GPIO_AF_DCMI_13 : constant GPIO_Alternate_Function := 13;
GPIO_AF_DSI_13 : constant GPIO_Alternate_Function := 13;
GPIO_AF_LTDC_13 : constant GPIO_Alternate_Function := 13;
GPIO_AF_LTDC_14 : constant GPIO_Alternate_Function := 14;
GPIO_AF_EVENTOUT_15 : constant GPIO_Alternate_Function := 15;
end STM32.Device;
|
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2018 Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
with Interfaces.C;
with Interfaces.C.Strings;
with SDL.Error;
package body SDL.Inputs.Joysticks is
package C renames Interfaces.C;
use type C.int;
function Total return All_Devices is
function SDL_Num_Joysticks return C.int with
Import => True,
Convention => C,
External_Name => "SDL_NumJoysticks";
Result : C.int := SDL_Num_Joysticks;
begin
if Result < 0 then
raise Joystick_Error with SDL.Error.Get;
end if;
return All_Devices (Result);
end Total;
function Name (Device : in Devices) return String is
function SDL_Joystick_Name_For_Index (Device : in C.int) return C.Strings.chars_ptr with
Import => True,
Convention => C,
External_Name => "SDL_JoystickNameForIndex";
begin
return C.Strings.Value (SDL_Joystick_Name_For_Index (C.int (Device) - 1));
end Name;
function GUID (Device : in Devices) return GUIDs is
function SDL_Joystick_Get_Device_GUID (Device : in C.int) return GUIDs with
Import => True,
Convention => C,
External_Name => "SDL_JoystickGetDeviceGUID";
begin
return SDL_Joystick_Get_Device_GUID (C.int (Device) - 1);
end GUID;
function Image (GUID : in GUIDs) return String is
procedure SDL_Joystick_Get_GUID_String (GUID : in GUIDs;
Buffer : out C.char_array;
Size : in C.int) with
Import => True,
Convention => C,
External_Name => "SDL_JoystickGetGUIDString";
Data_Buffer : C.char_array (0 .. 127) := (others => C.nul);
L : C.int := C.int (Data_Buffer'Length);
begin
SDL_Joystick_Get_GUID_String (GUID, Data_Buffer, L);
return C.To_Ada (Data_Buffer);
end Image;
function Value (GUID : in String) return GUIDs is
function SDL_Joystick_Get_GUID_From_String (Buffer : in C.char_array) return GUIDs with
Import => True,
Convention => C,
External_Name => "SDL_JoystickGetGUIDFromString";
begin
return SDL_Joystick_Get_GUID_From_String (C.To_C (GUID));
end Value;
function "=" (Left, Right : in Joystick) return Boolean is
use type SDL.C_Pointers.Joystick_Pointer;
begin
if Left.Internal = Right.Internal and then Left.Owns = Right.Owns then
return True;
end if;
return False;
end "=";
procedure Close (Self : in out Joystick) is
procedure SDL_Joystick_Close (Stick : in SDL.C_Pointers.Joystick_Pointer) with
Import => True,
Convention => C,
External_Name => "SDL_JoystickClose";
begin
SDL_Joystick_Close (Self.Internal);
-- Reinitialise the object so it's actually a Null_Joystick.
Self.Internal := null;
Self.Owns := True;
end Close;
function Axes (Self : in Joystick) return SDL.Events.Joysticks.Axes is
function SDL_Joystick_Num_Axes (Stick : in SDL.C_Pointers.Joystick_Pointer) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_JoystickNumAxes";
Total : C.int := SDL_Joystick_Num_Axes (Self.Internal);
begin
if Total < 0 then
raise Joystick_Error with SDL.Error.Get;
end if;
return SDL.Events.Joysticks.Axes (Total);
end Axes;
function Balls (Self : in Joystick) return SDL.Events.Joysticks.Balls is
function SDL_Joystick_Num_Balls (Stick : in SDL.C_Pointers.Joystick_Pointer) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_JoystickNumBalls";
Total : C.int := SDL_Joystick_Num_Balls (Self.Internal);
begin
if Total < 0 then
raise Joystick_Error with SDL.Error.Get;
end if;
return SDL.Events.Joysticks.Balls (Total);
end Balls;
function Buttons (Self : in Joystick) return SDL.Events.Joysticks.Buttons is
function SDL_Joystick_Num_Buttons (Stick : in SDL.C_Pointers.Joystick_Pointer) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_JoystickNumButtons";
Total : C.int := SDL_Joystick_Num_Buttons (Self.Internal);
begin
if Total < 0 then
raise Joystick_Error with SDL.Error.Get;
end if;
return SDL.Events.Joysticks.Buttons (Total);
end Buttons;
function Hats (Self : in Joystick) return SDL.Events.Joysticks.Hats is
function SDL_Joystick_Num_Hats (Stick : in SDL.C_Pointers.Joystick_Pointer) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_JoystickNumHats";
Total : C.int := SDL_Joystick_Num_Hats (Self.Internal);
begin
if Total < 0 then
raise Joystick_Error with SDL.Error.Get;
end if;
return SDL.Events.Joysticks.Hats (Total);
end Hats;
function Name (Self : in Joystick) return String is
function SDL_Joystick_Name (Stick : in SDL.C_Pointers.Joystick_Pointer) return C.Strings.chars_ptr with
Import => True,
Convention => C,
External_Name => "SDL_JoystickName";
begin
return C.Strings.Value (SDL_Joystick_Name (Self.Internal));
end Name;
function Is_Haptic (Self : in Joystick) return Boolean is
function SDL_Joystick_Is_Haptic (Stick : in SDL.C_Pointers.Joystick_Pointer) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_JoystickIsHaptic";
Result : C.int := SDL_Joystick_Is_Haptic (Self.Internal);
begin
if Result < 0 then
raise Joystick_Error with SDL.Error.Get;
elsif Result = 1 then
return True;
end if;
return False;
end Is_Haptic;
function Is_Attached (Self : in Joystick) return Boolean is
function SDL_Joystick_Is_Attached (Stick : in SDL.C_Pointers.Joystick_Pointer) return SDL_Bool with
Import => True,
Convention => C,
External_Name => "SDL_JoystickGetAttached";
begin
if SDL_Joystick_Is_Attached (Self.Internal) = SDL_True then
return True;
end if;
return False;
end Is_Attached;
function GUID (Self : in Joystick) return GUIDs is
function SDL_Joystick_Get_GUID (Stick : in SDL.C_Pointers.Joystick_Pointer) return GUIDs with
Import => True,
Convention => C,
External_Name => "SDL_JoystickGetGUID";
begin
return SDL_Joystick_Get_GUID (Self.Internal);
end GUID;
function Instance (Self : in Joystick) return Instances is
function SDL_Joystick_Instance_ID (Stick : in SDL.C_Pointers.Joystick_Pointer) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_JoystickInstanceID";
Result : C.int := SDL_Joystick_Instance_ID (Self.Internal);
begin
if Result < Success then
raise Joystick_Error with SDL.Error.Get;
end if;
return Instances (Result);
end Instance;
function Axis_Value (Self : in Joystick;
Axis : in SDL.Events.Joysticks.Axes) return SDL.Events.Joysticks.Axes_Values is
function SDL_Joystick_Get_Axis (Stick : in SDL.C_Pointers.Joystick_Pointer;
Axis : in SDL.Events.Joysticks.Axes) return SDL.Events.Joysticks.Axes_Values with
Import => True,
Convention => C,
External_Name => "SDL_JoystickGetAxis";
begin
return SDL_Joystick_Get_Axis (Self.Internal, Axis);
end Axis_Value;
procedure Ball_Value (Self : in Joystick;
Ball : in SDL.Events.Joysticks.Balls;
Delta_X, Delta_Y : out SDL.Events.Joysticks.Ball_Values) is
function SDL_Joystick_Get_Ball (Stick : in SDL.C_Pointers.Joystick_Pointer;
Ball : in SDL.Events.Joysticks.Balls;
Delta_X, Delta_Y : out SDL.Events.Joysticks.Ball_Values) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_JoystickGetBall";
Result : C.int := SDL_Joystick_Get_Ball (Self.Internal, Ball, Delta_X, Delta_Y);
begin
if Result < Success then
raise Joystick_Error with SDL.Error.Get;
end if;
end Ball_Value;
function Hat_Value (Self : in Joystick;
Hat : in SDL.Events.Joysticks.Hats) return SDL.Events.Joysticks.Hat_Positions is
function SDL_Joystick_Get_Hat (Stick : in SDL.C_Pointers.Joystick_Pointer;
Ball : in SDL.Events.Joysticks.Hats)
return SDL.Events.Joysticks.Hat_Positions with
Import => True,
Convention => C,
External_Name => "SDL_JoystickGetHat";
begin
return SDL_Joystick_Get_Hat (Self.Internal, Hat);
end Hat_Value;
function Is_Button_Pressed (Self : in Joystick; Button : in SDL.Events.Joysticks.Buttons)
return SDL.Events.Button_State is
function SDL_Joystick_Get_Button (Stick : in SDL.C_Pointers.Joystick_Pointer;
Button : in SDL.Events.Joysticks.Buttons) return SDL.Events.Button_State with
Import => True,
Convention => C,
External_Name => "SDL_JoystickGetButton";
begin
return SDL_Joystick_Get_Button (Self.Internal, Button);
end Is_Button_Pressed;
end SDL.Inputs.Joysticks;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . A S S E R T I O N S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
--
--
--
--
--
--
--
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package provides support for the GNAT assert pragma
-- This unit may be used directly from an application program by providing
-- an appropriate WITH, and the interface can be expected to remain stable.
package System.Assertions is
Assert_Failure : exception;
-- Exception raised when assertion fails
procedure Raise_Assert_Failure (Msg : String);
pragma No_Return (Raise_Assert_Failure);
-- Called to raise Assert_Failure with given message
end System.Assertions;
|
------------------------------------------------------------------------------
-- A d a r u n - t i m e s p e c i f i c a t i o n --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of ada.ads file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
generic
type Index_Type is range <>;
type Element_Type is private;
with function "=" (Left : in Element_Type;
Right : in Element_Type)
return Boolean is <>;
package Ada.Containers.Vectors is
pragma Preelaborate (Vectors);
subtype Extended_Index is Index_Type'Base
range Index_Type'First - 1
.. Index_Type'Min (Index_Type'Base'Last - 1, Index_Type'Last) + 1;
No_Index : constant Extended_Index := Extended_Index'First;
type Vector is tagged private;
pragma Preelaborable_Initialization (Vector);
type Cursor is private;
pragma Preelaborable_Initialization (Cursor);
Empty_Vector : constant Vector;
No_Element : constant Cursor;
function "=" (Left : in Vector;
Right : in Vector)
return Boolean;
function To_Vector (Length : in Count_Type) return Vector;
function To_Vector (New_Item : in Element_Type;
Length : in Count_Type)
return Vector;
function "&" (Left : in Vector;
Right : in Vector)
return Vector;
function "&" (Left : in Vector;
Right : in Element_Type)
return Vector;
function "&" (Left : in Element_Type;
Right : in Vector)
return Vector;
function "&" (Left : in Element_Type;
Right : in Element_Type)
return Vector;
function Capacity (Container : in Vector) return Count_Type;
procedure Reserve_Capacity (Container : in out Vector;
Capacity : in Count_Type);
function Length (Container : in Vector) return Count_Type;
procedure Set_Length (Container : in out Vector;
Length : in Count_Type);
function Is_Empty (Container : in Vector) return Boolean;
procedure Clear (Container : in out Vector);
function To_Cursor (Container : Vector;
Index : Extended_Index)
return Cursor;
function To_Index (Position : in Cursor) return Extended_Index;
function Element (Container : in Vector;
Index : in Index_Type)
return Element_Type;
function Element (Position : in Cursor) return Element_Type;
procedure Replace_Element (Container : in out Vector;
Index : in Index_Type;
New_Item : in Element_Type);
procedure Replace_Element (Container : in out Vector;
Position : in Cursor;
New_item : in Element_Type);
procedure Query_Element
(Container : in Vector;
Index : in Index_Type;
Process : not null access procedure (Element : in Element_Type));
procedure Query_Element
(Position : in Cursor;
Process : not null access procedure (Element : in Element_Type));
procedure Update_Element
(Container : in out Vector;
Index : in Index_Type;
Process : not null access procedure (Element : in out Element_Type));
procedure Update_Element
(Container : in out Vector;
Position : in Cursor;
Process : not null access procedure (Element : in out Element_Type));
procedure Move (Target : in out Vector;
Source : in out Vector);
procedure Insert (Container : in out Vector;
Before : in Extended_Index;
New_Item : in Vector);
procedure Insert (Container : in out Vector;
Before : in Cursor;
New_Item : in Vector);
procedure Insert (Container : in out Vector;
Before : in Cursor;
New_Item : in Vector;
Position : out Cursor);
procedure Insert (Container : in out Vector;
Before : in Extended_Index;
New_Item : in Element_Type;
Count : in Count_Type := 1);
procedure Insert (Container : in out Vector;
Before : in Cursor;
New_Item : in Element_Type;
Count : in Count_Type := 1);
procedure Insert (Container : in out Vector;
Before : in Cursor;
New_Item : in Element_Type;
Position : out Cursor;
Count : in Count_Type := 1);
procedure Insert (Container : in out Vector;
Before : in Extended_Index;
Count : in Count_Type := 1);
procedure Insert (Container : in out Vector;
Before : in Cursor;
Position : out Cursor;
Count : in Count_Type := 1);
procedure Prepend (Container : in out Vector;
New_Item : in Vector);
procedure Prepend (Container : in out Vector;
New_Item : in Element_Type;
Count : in Count_Type := 1);
procedure Append (Container : in out Vector;
New_Item : in Vector);
procedure Append (Container : in out Vector;
New_Item : in Element_Type;
Count : in Count_Type := 1);
procedure Insert_Space (Container : in out Vector;
Before : in Extended_Index;
Count : in Count_Type := 1);
procedure Insert_Space (Container : in out Vector;
Before : in Cursor;
Position : out Cursor;
Count : in Count_Type := 1);
procedure Delete (Container : in out Vector;
Index : in Extended_Index;
Count : in Count_Type := 1);
procedure Delete (Container : in out Vector;
Position : in out Cursor;
Count : in Count_Type := 1);
procedure Delete_First (Container : in out Vector;
Count : in Count_Type := 1);
procedure Delete_Last (Container : in out Vector;
Count : in Count_Type := 1);
procedure Reverse_Elements (Container : in out Vector);
procedure Swap (Container : in out Vector;
I : in Index_Type;
J : in Index_Type);
procedure Swap (Container : in out Vector;
I : in Cursor;
J : in Cursor);
function First_Index (Container : in Vector) return Index_Type;
function First (Container : in Vector) return Cursor;
function First_Element (Container : in Vector) return Element_Type;
function Last_Index (Container : in Vector) return Extended_Index;
function Last (Container : in Vector) return Cursor;
function Last_Element (Container : in Vector) return Element_Type;
function Next (Position : in Cursor) return Cursor;
procedure Next (Position : in out Cursor);
function Previous (Position : in Cursor) return Cursor;
procedure Previous (Position : in out Cursor);
function Find_Index (Container : in Vector;
Item : in Element_Type;
Index : in Index_Type := Index_Type'First)
return Extended_Index;
function Find (Container : in Vector;
Item : in Element_Type;
Position : in Cursor := No_Element)
return Cursor;
function Reverse_Find_Index (Container : in Vector;
Item : in Element_Type;
Index : in Index_Type := Index_Type'Last)
return Extended_Index;
function Reverse_Find (Container : in Vector;
Item : in Element_Type;
Position : in Cursor := No_Element)
return Cursor;
function Contains (Container : in Vector;
Item : in Element_Type)
return Boolean;
function Has_Element (Position : in Cursor) return Boolean;
procedure Iterate
(Container : in Vector;
Process : not null access procedure (Position : in Cursor));
procedure Reverse_Iterate
(Container : in Vector;
Process : not null access procedure (Position : in Cursor));
generic
with function "<" (Left : in Element_Type;
Right : in Element_Type)
return Boolean is <>;
package Generic_Sorting is
function Is_Sorted (Container : in Vector) return Boolean;
procedure Sort (Container : in out Vector);
procedure Merge (Target : in out Vector;
Source : in out Vector);
end Generic_Sorting;
private
type Vector is tagged null record;
Empty_Vector : constant Vector := (null record);
type Cursor is null record;
No_Element : constant Cursor := (null record);
end Ada.Containers.Vectors;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K _ P R I M I T I V E S . O P E R A T I O N S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This is a HP-UX DCE threads (HPUX 10) version of this package
-- This package contains all the GNULL primitives that interface directly with
-- the underlying OS.
with Ada.Unchecked_Conversion;
with Interfaces.C;
with System.Tasking.Debug;
with System.Interrupt_Management;
with System.OS_Constants;
with System.OS_Primitives;
with System.Task_Primitives.Interrupt_Operations;
pragma Warnings (Off);
with System.Interrupt_Management.Operations;
pragma Elaborate_All (System.Interrupt_Management.Operations);
pragma Warnings (On);
with System.Soft_Links;
-- We use System.Soft_Links instead of System.Tasking.Initialization
-- because the later is a higher level package that we shouldn't depend on.
-- For example when using the restricted run time, it is replaced by
-- System.Tasking.Restricted.Stages.
package body System.Task_Primitives.Operations is
package OSC renames System.OS_Constants;
package SSL renames System.Soft_Links;
use System.Tasking.Debug;
use System.Tasking;
use Interfaces.C;
use System.OS_Interface;
use System.Parameters;
use System.OS_Primitives;
package PIO renames System.Task_Primitives.Interrupt_Operations;
----------------
-- Local Data --
----------------
-- The followings are logically constants, but need to be initialized
-- at run time.
Single_RTS_Lock : aliased RTS_Lock;
-- This is a lock to allow only one thread of control in the RTS at
-- a time; it is used to execute in mutual exclusion from all other tasks.
-- Used to protect All_Tasks_List
Environment_Task_Id : Task_Id;
-- A variable to hold Task_Id for the environment task
Unblocked_Signal_Mask : aliased sigset_t;
-- The set of signals that should unblocked in all tasks
Time_Slice_Val : Integer;
pragma Import (C, Time_Slice_Val, "__gl_time_slice_val");
Dispatching_Policy : Character;
pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy");
-- Note: the reason that Locking_Policy is not needed is that this
-- is not implemented for DCE threads. The HPUX 10 port is at this
-- stage considered dead, and no further work is planned on it.
Foreign_Task_Elaborated : aliased Boolean := True;
-- Used to identified fake tasks (i.e., non-Ada Threads)
--------------------
-- Local Packages --
--------------------
package Specific is
procedure Initialize (Environment_Task : Task_Id);
pragma Inline (Initialize);
-- Initialize various data needed by this package
function Is_Valid_Task return Boolean;
pragma Inline (Is_Valid_Task);
-- Does the executing thread have a TCB?
procedure Set (Self_Id : Task_Id);
pragma Inline (Set);
-- Set the self id for the current task
function Self return Task_Id;
pragma Inline (Self);
-- Return a pointer to the Ada Task Control Block of the calling task
end Specific;
package body Specific is separate;
-- The body of this package is target specific
----------------------------------
-- ATCB allocation/deallocation --
----------------------------------
package body ATCB_Allocation is separate;
-- The body of this package is shared across several targets
---------------------------------
-- Support for foreign threads --
---------------------------------
function Register_Foreign_Thread (Thread : Thread_Id) return Task_Id;
-- Allocate and Initialize a new ATCB for the current Thread
function Register_Foreign_Thread
(Thread : Thread_Id) return Task_Id is separate;
-----------------------
-- Local Subprograms --
-----------------------
procedure Abort_Handler (Sig : Signal);
function To_Address is
new Ada.Unchecked_Conversion (Task_Id, System.Address);
-------------------
-- Abort_Handler --
-------------------
procedure Abort_Handler (Sig : Signal) is
pragma Unreferenced (Sig);
Self_Id : constant Task_Id := Self;
Result : Interfaces.C.int;
Old_Set : aliased sigset_t;
begin
if Self_Id.Deferral_Level = 0
and then Self_Id.Pending_ATC_Level < Self_Id.ATC_Nesting_Level
and then not Self_Id.Aborting
then
Self_Id.Aborting := True;
-- Make sure signals used for RTS internal purpose are unmasked
Result :=
pthread_sigmask
(SIG_UNBLOCK,
Unblocked_Signal_Mask'Access,
Old_Set'Access);
pragma Assert (Result = 0);
raise Standard'Abort_Signal;
end if;
end Abort_Handler;
-----------------
-- Stack_Guard --
-----------------
-- The underlying thread system sets a guard page at the bottom of a thread
-- stack, so nothing is needed.
-- ??? Check the comment above
procedure Stack_Guard (T : ST.Task_Id; On : Boolean) is
pragma Unreferenced (T, On);
begin
null;
end Stack_Guard;
-------------------
-- Get_Thread_Id --
-------------------
function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id is
begin
return T.Common.LL.Thread;
end Get_Thread_Id;
----------
-- Self --
----------
function Self return Task_Id renames Specific.Self;
---------------------
-- Initialize_Lock --
---------------------
-- Note: mutexes and cond_variables needed per-task basis are initialized
-- in Initialize_TCB and the Storage_Error is handled. Other mutexes (such
-- as RTS_Lock, Memory_Lock...) used in RTS is initialized before any
-- status change of RTS. Therefore raising Storage_Error in the following
-- routines should be able to be handled safely.
procedure Initialize_Lock
(Prio : System.Any_Priority;
L : not null access Lock)
is
Attributes : aliased pthread_mutexattr_t;
Result : Interfaces.C.int;
begin
Result := pthread_mutexattr_init (Attributes'Access);
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then
raise Storage_Error;
end if;
L.Priority := Prio;
Result := pthread_mutex_init (L.L'Access, Attributes'Access);
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then
raise Storage_Error;
end if;
Result := pthread_mutexattr_destroy (Attributes'Access);
pragma Assert (Result = 0);
end Initialize_Lock;
procedure Initialize_Lock
(L : not null access RTS_Lock;
Level : Lock_Level)
is
pragma Unreferenced (Level);
Attributes : aliased pthread_mutexattr_t;
Result : Interfaces.C.int;
begin
Result := pthread_mutexattr_init (Attributes'Access);
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then
raise Storage_Error;
end if;
Result := pthread_mutex_init (L, Attributes'Access);
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then
raise Storage_Error;
end if;
Result := pthread_mutexattr_destroy (Attributes'Access);
pragma Assert (Result = 0);
end Initialize_Lock;
-------------------
-- Finalize_Lock --
-------------------
procedure Finalize_Lock (L : not null access Lock) is
Result : Interfaces.C.int;
begin
Result := pthread_mutex_destroy (L.L'Access);
pragma Assert (Result = 0);
end Finalize_Lock;
procedure Finalize_Lock (L : not null access RTS_Lock) is
Result : Interfaces.C.int;
begin
Result := pthread_mutex_destroy (L);
pragma Assert (Result = 0);
end Finalize_Lock;
----------------
-- Write_Lock --
----------------
procedure Write_Lock
(L : not null access Lock;
Ceiling_Violation : out Boolean)
is
Result : Interfaces.C.int;
begin
L.Owner_Priority := Get_Priority (Self);
if L.Priority < L.Owner_Priority then
Ceiling_Violation := True;
return;
end if;
Result := pthread_mutex_lock (L.L'Access);
pragma Assert (Result = 0);
Ceiling_Violation := False;
end Write_Lock;
procedure Write_Lock (L : not null access RTS_Lock) is
Result : Interfaces.C.int;
begin
Result := pthread_mutex_lock (L);
pragma Assert (Result = 0);
end Write_Lock;
procedure Write_Lock (T : Task_Id) is
Result : Interfaces.C.int;
begin
Result := pthread_mutex_lock (T.Common.LL.L'Access);
pragma Assert (Result = 0);
end Write_Lock;
---------------
-- Read_Lock --
---------------
procedure Read_Lock
(L : not null access Lock;
Ceiling_Violation : out Boolean)
is
begin
Write_Lock (L, Ceiling_Violation);
end Read_Lock;
------------
-- Unlock --
------------
procedure Unlock (L : not null access Lock) is
Result : Interfaces.C.int;
begin
Result := pthread_mutex_unlock (L.L'Access);
pragma Assert (Result = 0);
end Unlock;
procedure Unlock (L : not null access RTS_Lock) is
Result : Interfaces.C.int;
begin
Result := pthread_mutex_unlock (L);
pragma Assert (Result = 0);
end Unlock;
procedure Unlock (T : Task_Id) is
Result : Interfaces.C.int;
begin
Result := pthread_mutex_unlock (T.Common.LL.L'Access);
pragma Assert (Result = 0);
end Unlock;
-----------------
-- Set_Ceiling --
-----------------
-- Dynamic priority ceilings are not supported by the underlying system
procedure Set_Ceiling
(L : not null access Lock;
Prio : System.Any_Priority)
is
pragma Unreferenced (L, Prio);
begin
null;
end Set_Ceiling;
-----------
-- Sleep --
-----------
procedure Sleep
(Self_ID : Task_Id;
Reason : System.Tasking.Task_States)
is
pragma Unreferenced (Reason);
Result : Interfaces.C.int;
begin
Result :=
pthread_cond_wait
(cond => Self_ID.Common.LL.CV'Access,
mutex => Self_ID.Common.LL.L'Access);
-- EINTR is not considered a failure
pragma Assert (Result = 0 or else Result = EINTR);
end Sleep;
-----------------
-- Timed_Sleep --
-----------------
procedure Timed_Sleep
(Self_ID : Task_Id;
Time : Duration;
Mode : ST.Delay_Modes;
Reason : System.Tasking.Task_States;
Timedout : out Boolean;
Yielded : out Boolean)
is
pragma Unreferenced (Reason);
Check_Time : constant Duration := Monotonic_Clock;
Abs_Time : Duration;
Request : aliased timespec;
Result : Interfaces.C.int;
begin
Timedout := True;
Yielded := False;
Abs_Time :=
(if Mode = Relative
then Duration'Min (Time, Max_Sensible_Delay) + Check_Time
else Duration'Min (Check_Time + Max_Sensible_Delay, Time));
if Abs_Time > Check_Time then
Request := To_Timespec (Abs_Time);
loop
exit when Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level;
Result :=
pthread_cond_timedwait
(cond => Self_ID.Common.LL.CV'Access,
mutex => Self_ID.Common.LL.L'Access,
abstime => Request'Access);
exit when Abs_Time <= Monotonic_Clock;
if Result = 0 or Result = EINTR then
-- Somebody may have called Wakeup for us
Timedout := False;
exit;
end if;
pragma Assert (Result = ETIMEDOUT);
end loop;
end if;
end Timed_Sleep;
-----------------
-- Timed_Delay --
-----------------
procedure Timed_Delay
(Self_ID : Task_Id;
Time : Duration;
Mode : ST.Delay_Modes)
is
Check_Time : constant Duration := Monotonic_Clock;
Abs_Time : Duration;
Request : aliased timespec;
Result : Interfaces.C.int;
pragma Warnings (Off, Result);
begin
Write_Lock (Self_ID);
Abs_Time :=
(if Mode = Relative
then Time + Check_Time
else Duration'Min (Check_Time + Max_Sensible_Delay, Time));
if Abs_Time > Check_Time then
Request := To_Timespec (Abs_Time);
Self_ID.Common.State := Delay_Sleep;
loop
exit when Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level;
Result :=
pthread_cond_timedwait
(cond => Self_ID.Common.LL.CV'Access,
mutex => Self_ID.Common.LL.L'Access,
abstime => Request'Access);
exit when Abs_Time <= Monotonic_Clock;
pragma Assert (Result = 0 or else
Result = ETIMEDOUT or else
Result = EINTR);
end loop;
Self_ID.Common.State := Runnable;
end if;
Unlock (Self_ID);
Result := sched_yield;
end Timed_Delay;
---------------------
-- Monotonic_Clock --
---------------------
function Monotonic_Clock return Duration is
TS : aliased timespec;
Result : Interfaces.C.int;
begin
Result := Clock_Gettime (OSC.CLOCK_RT_Ada, TS'Unchecked_Access);
pragma Assert (Result = 0);
return To_Duration (TS);
end Monotonic_Clock;
-------------------
-- RT_Resolution --
-------------------
function RT_Resolution return Duration is
begin
return 10#1.0#E-6;
end RT_Resolution;
------------
-- Wakeup --
------------
procedure Wakeup (T : Task_Id; Reason : System.Tasking.Task_States) is
pragma Unreferenced (Reason);
Result : Interfaces.C.int;
begin
Result := pthread_cond_signal (T.Common.LL.CV'Access);
pragma Assert (Result = 0);
end Wakeup;
-----------
-- Yield --
-----------
procedure Yield (Do_Yield : Boolean := True) is
Result : Interfaces.C.int;
pragma Unreferenced (Result);
begin
if Do_Yield then
Result := sched_yield;
end if;
end Yield;
------------------
-- Set_Priority --
------------------
type Prio_Array_Type is array (System.Any_Priority) of Integer;
pragma Atomic_Components (Prio_Array_Type);
Prio_Array : Prio_Array_Type;
-- Global array containing the id of the currently running task for
-- each priority.
--
-- Note: assume we are on single processor with run-til-blocked scheduling
procedure Set_Priority
(T : Task_Id;
Prio : System.Any_Priority;
Loss_Of_Inheritance : Boolean := False)
is
Result : Interfaces.C.int;
Array_Item : Integer;
Param : aliased struct_sched_param;
function Get_Policy (Prio : System.Any_Priority) return Character;
pragma Import (C, Get_Policy, "__gnat_get_specific_dispatching");
-- Get priority specific dispatching policy
Priority_Specific_Policy : constant Character := Get_Policy (Prio);
-- Upper case first character of the policy name corresponding to the
-- task as set by a Priority_Specific_Dispatching pragma.
begin
Param.sched_priority := Interfaces.C.int (Underlying_Priorities (Prio));
if Dispatching_Policy = 'R'
or else Priority_Specific_Policy = 'R'
or else Time_Slice_Val > 0
then
Result :=
pthread_setschedparam
(T.Common.LL.Thread, SCHED_RR, Param'Access);
elsif Dispatching_Policy = 'F'
or else Priority_Specific_Policy = 'F'
or else Time_Slice_Val = 0
then
Result :=
pthread_setschedparam
(T.Common.LL.Thread, SCHED_FIFO, Param'Access);
else
Result :=
pthread_setschedparam
(T.Common.LL.Thread, SCHED_OTHER, Param'Access);
end if;
pragma Assert (Result = 0);
if Dispatching_Policy = 'F' or else Priority_Specific_Policy = 'F' then
-- Annex D requirement [RM D.2.2 par. 9]:
-- If the task drops its priority due to the loss of inherited
-- priority, it is added at the head of the ready queue for its
-- new active priority.
if Loss_Of_Inheritance
and then Prio < T.Common.Current_Priority
then
Array_Item := Prio_Array (T.Common.Base_Priority) + 1;
Prio_Array (T.Common.Base_Priority) := Array_Item;
loop
-- Let some processes a chance to arrive
Yield;
-- Then wait for our turn to proceed
exit when Array_Item = Prio_Array (T.Common.Base_Priority)
or else Prio_Array (T.Common.Base_Priority) = 1;
end loop;
Prio_Array (T.Common.Base_Priority) :=
Prio_Array (T.Common.Base_Priority) - 1;
end if;
end if;
T.Common.Current_Priority := Prio;
end Set_Priority;
------------------
-- Get_Priority --
------------------
function Get_Priority (T : Task_Id) return System.Any_Priority is
begin
return T.Common.Current_Priority;
end Get_Priority;
----------------
-- Enter_Task --
----------------
procedure Enter_Task (Self_ID : Task_Id) is
begin
Self_ID.Common.LL.Thread := pthread_self;
Specific.Set (Self_ID);
end Enter_Task;
-------------------
-- Is_Valid_Task --
-------------------
function Is_Valid_Task return Boolean renames Specific.Is_Valid_Task;
-----------------------------
-- Register_Foreign_Thread --
-----------------------------
function Register_Foreign_Thread return Task_Id is
begin
if Is_Valid_Task then
return Self;
else
return Register_Foreign_Thread (pthread_self);
end if;
end Register_Foreign_Thread;
--------------------
-- Initialize_TCB --
--------------------
procedure Initialize_TCB (Self_ID : Task_Id; Succeeded : out Boolean) is
Mutex_Attr : aliased pthread_mutexattr_t;
Result : Interfaces.C.int;
Cond_Attr : aliased pthread_condattr_t;
begin
Result := pthread_mutexattr_init (Mutex_Attr'Access);
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = 0 then
Result :=
pthread_mutex_init
(Self_ID.Common.LL.L'Access, Mutex_Attr'Access);
pragma Assert (Result = 0 or else Result = ENOMEM);
end if;
if Result /= 0 then
Succeeded := False;
return;
end if;
Result := pthread_mutexattr_destroy (Mutex_Attr'Access);
pragma Assert (Result = 0);
Result := pthread_condattr_init (Cond_Attr'Access);
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = 0 then
Result :=
pthread_cond_init
(Self_ID.Common.LL.CV'Access,
Cond_Attr'Access);
pragma Assert (Result = 0 or else Result = ENOMEM);
end if;
if Result = 0 then
Succeeded := True;
else
Result := pthread_mutex_destroy (Self_ID.Common.LL.L'Access);
pragma Assert (Result = 0);
Succeeded := False;
end if;
Result := pthread_condattr_destroy (Cond_Attr'Access);
pragma Assert (Result = 0);
end Initialize_TCB;
-----------------
-- Create_Task --
-----------------
procedure Create_Task
(T : Task_Id;
Wrapper : System.Address;
Stack_Size : System.Parameters.Size_Type;
Priority : System.Any_Priority;
Succeeded : out Boolean)
is
Attributes : aliased pthread_attr_t;
Result : Interfaces.C.int;
function Thread_Body_Access is new
Ada.Unchecked_Conversion (System.Address, Thread_Body);
begin
Result := pthread_attr_init (Attributes'Access);
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result /= 0 then
Succeeded := False;
return;
end if;
Result := pthread_attr_setstacksize
(Attributes'Access, Interfaces.C.size_t (Stack_Size));
pragma Assert (Result = 0);
-- Since the initial signal mask of a thread is inherited from the
-- creator, and the Environment task has all its signals masked, we
-- do not need to manipulate caller's signal mask at this point.
-- All tasks in RTS will have All_Tasks_Mask initially.
Result := pthread_create
(T.Common.LL.Thread'Access,
Attributes'Access,
Thread_Body_Access (Wrapper),
To_Address (T));
pragma Assert (Result = 0 or else Result = EAGAIN);
Succeeded := Result = 0;
pthread_detach (T.Common.LL.Thread'Access);
-- Detach the thread using pthread_detach, since DCE threads do not have
-- pthread_attr_set_detachstate.
Result := pthread_attr_destroy (Attributes'Access);
pragma Assert (Result = 0);
Set_Priority (T, Priority);
end Create_Task;
------------------
-- Finalize_TCB --
------------------
procedure Finalize_TCB (T : Task_Id) is
Result : Interfaces.C.int;
begin
Result := pthread_mutex_destroy (T.Common.LL.L'Access);
pragma Assert (Result = 0);
Result := pthread_cond_destroy (T.Common.LL.CV'Access);
pragma Assert (Result = 0);
if T.Known_Tasks_Index /= -1 then
Known_Tasks (T.Known_Tasks_Index) := null;
end if;
ATCB_Allocation.Free_ATCB (T);
end Finalize_TCB;
---------------
-- Exit_Task --
---------------
procedure Exit_Task is
begin
Specific.Set (null);
end Exit_Task;
----------------
-- Abort_Task --
----------------
procedure Abort_Task (T : Task_Id) is
begin
-- Interrupt Server_Tasks may be waiting on an "event" flag (signal)
if T.Common.State = Interrupt_Server_Blocked_On_Event_Flag then
System.Interrupt_Management.Operations.Interrupt_Self_Process
(PIO.Get_Interrupt_ID (T));
end if;
end Abort_Task;
----------------
-- Initialize --
----------------
procedure Initialize (S : in out Suspension_Object) is
Mutex_Attr : aliased pthread_mutexattr_t;
Cond_Attr : aliased pthread_condattr_t;
Result : Interfaces.C.int;
begin
-- Initialize internal state (always to False (ARM D.10(6)))
S.State := False;
S.Waiting := False;
-- Initialize internal mutex
Result := pthread_mutex_init (S.L'Access, Mutex_Attr'Access);
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result = ENOMEM then
raise Storage_Error;
end if;
-- Initialize internal condition variable
Result := pthread_cond_init (S.CV'Access, Cond_Attr'Access);
pragma Assert (Result = 0 or else Result = ENOMEM);
if Result /= 0 then
Result := pthread_mutex_destroy (S.L'Access);
pragma Assert (Result = 0);
if Result = ENOMEM then
raise Storage_Error;
end if;
end if;
end Initialize;
--------------
-- Finalize --
--------------
procedure Finalize (S : in out Suspension_Object) is
Result : Interfaces.C.int;
begin
-- Destroy internal mutex
Result := pthread_mutex_destroy (S.L'Access);
pragma Assert (Result = 0);
-- Destroy internal condition variable
Result := pthread_cond_destroy (S.CV'Access);
pragma Assert (Result = 0);
end Finalize;
-------------------
-- Current_State --
-------------------
function Current_State (S : Suspension_Object) return Boolean is
begin
-- We do not want to use lock on this read operation. State is marked
-- as Atomic so that we ensure that the value retrieved is correct.
return S.State;
end Current_State;
---------------
-- Set_False --
---------------
procedure Set_False (S : in out Suspension_Object) is
Result : Interfaces.C.int;
begin
SSL.Abort_Defer.all;
Result := pthread_mutex_lock (S.L'Access);
pragma Assert (Result = 0);
S.State := False;
Result := pthread_mutex_unlock (S.L'Access);
pragma Assert (Result = 0);
SSL.Abort_Undefer.all;
end Set_False;
--------------
-- Set_True --
--------------
procedure Set_True (S : in out Suspension_Object) is
Result : Interfaces.C.int;
begin
SSL.Abort_Defer.all;
Result := pthread_mutex_lock (S.L'Access);
pragma Assert (Result = 0);
-- If there is already a task waiting on this suspension object then
-- we resume it, leaving the state of the suspension object to False,
-- as it is specified in ARM D.10 par. 9. Otherwise, it just leaves
-- the state to True.
if S.Waiting then
S.Waiting := False;
S.State := False;
Result := pthread_cond_signal (S.CV'Access);
pragma Assert (Result = 0);
else
S.State := True;
end if;
Result := pthread_mutex_unlock (S.L'Access);
pragma Assert (Result = 0);
SSL.Abort_Undefer.all;
end Set_True;
------------------------
-- Suspend_Until_True --
------------------------
procedure Suspend_Until_True (S : in out Suspension_Object) is
Result : Interfaces.C.int;
begin
SSL.Abort_Defer.all;
Result := pthread_mutex_lock (S.L'Access);
pragma Assert (Result = 0);
if S.Waiting then
-- Program_Error must be raised upon calling Suspend_Until_True
-- if another task is already waiting on that suspension object
-- (ARM D.10 par. 10).
Result := pthread_mutex_unlock (S.L'Access);
pragma Assert (Result = 0);
SSL.Abort_Undefer.all;
raise Program_Error;
else
-- Suspend the task if the state is False. Otherwise, the task
-- continues its execution, and the state of the suspension object
-- is set to False (ARM D.10 par. 9).
if S.State then
S.State := False;
else
S.Waiting := True;
loop
-- Loop in case pthread_cond_wait returns earlier than expected
-- (e.g. in case of EINTR caused by a signal).
Result := pthread_cond_wait (S.CV'Access, S.L'Access);
pragma Assert (Result = 0 or else Result = EINTR);
exit when not S.Waiting;
end loop;
end if;
Result := pthread_mutex_unlock (S.L'Access);
pragma Assert (Result = 0);
SSL.Abort_Undefer.all;
end if;
end Suspend_Until_True;
----------------
-- Check_Exit --
----------------
-- Dummy version
function Check_Exit (Self_ID : ST.Task_Id) return Boolean is
pragma Unreferenced (Self_ID);
begin
return True;
end Check_Exit;
--------------------
-- Check_No_Locks --
--------------------
function Check_No_Locks (Self_ID : ST.Task_Id) return Boolean is
pragma Unreferenced (Self_ID);
begin
return True;
end Check_No_Locks;
----------------------
-- Environment_Task --
----------------------
function Environment_Task return Task_Id is
begin
return Environment_Task_Id;
end Environment_Task;
--------------
-- Lock_RTS --
--------------
procedure Lock_RTS is
begin
Write_Lock (Single_RTS_Lock'Access);
end Lock_RTS;
----------------
-- Unlock_RTS --
----------------
procedure Unlock_RTS is
begin
Unlock (Single_RTS_Lock'Access);
end Unlock_RTS;
------------------
-- Suspend_Task --
------------------
function Suspend_Task
(T : ST.Task_Id;
Thread_Self : Thread_Id) return Boolean
is
pragma Unreferenced (T);
pragma Unreferenced (Thread_Self);
begin
return False;
end Suspend_Task;
-----------------
-- Resume_Task --
-----------------
function Resume_Task
(T : ST.Task_Id;
Thread_Self : Thread_Id) return Boolean
is
pragma Unreferenced (T);
pragma Unreferenced (Thread_Self);
begin
return False;
end Resume_Task;
--------------------
-- Stop_All_Tasks --
--------------------
procedure Stop_All_Tasks is
begin
null;
end Stop_All_Tasks;
---------------
-- Stop_Task --
---------------
function Stop_Task (T : ST.Task_Id) return Boolean is
pragma Unreferenced (T);
begin
return False;
end Stop_Task;
-------------------
-- Continue_Task --
-------------------
function Continue_Task (T : ST.Task_Id) return Boolean is
pragma Unreferenced (T);
begin
return False;
end Continue_Task;
----------------
-- Initialize --
----------------
procedure Initialize (Environment_Task : Task_Id) is
act : aliased struct_sigaction;
old_act : aliased struct_sigaction;
Tmp_Set : aliased sigset_t;
Result : Interfaces.C.int;
function State
(Int : System.Interrupt_Management.Interrupt_ID) return Character;
pragma Import (C, State, "__gnat_get_interrupt_state");
-- Get interrupt state. Defined in a-init.c. The input argument is
-- the interrupt number, and the result is one of the following:
Default : constant Character := 's';
-- 'n' this interrupt not set by any Interrupt_State pragma
-- 'u' Interrupt_State pragma set state to User
-- 'r' Interrupt_State pragma set state to Runtime
-- 's' Interrupt_State pragma set state to System (use "default"
-- system handler)
begin
Environment_Task_Id := Environment_Task;
Interrupt_Management.Initialize;
-- Initialize the lock used to synchronize chain of all ATCBs
Initialize_Lock (Single_RTS_Lock'Access, RTS_Lock_Level);
Specific.Initialize (Environment_Task);
-- Make environment task known here because it doesn't go through
-- Activate_Tasks, which does it for all other tasks.
Known_Tasks (Known_Tasks'First) := Environment_Task;
Environment_Task.Known_Tasks_Index := Known_Tasks'First;
Enter_Task (Environment_Task);
-- Install the abort-signal handler
if State (System.Interrupt_Management.Abort_Task_Interrupt)
/= Default
then
act.sa_flags := 0;
act.sa_handler := Abort_Handler'Address;
Result := sigemptyset (Tmp_Set'Access);
pragma Assert (Result = 0);
act.sa_mask := Tmp_Set;
Result :=
sigaction (
Signal (System.Interrupt_Management.Abort_Task_Interrupt),
act'Unchecked_Access,
old_act'Unchecked_Access);
pragma Assert (Result = 0);
end if;
end Initialize;
-- NOTE: Unlike other pthread implementations, we do *not* mask all
-- signals here since we handle signals using the process-wide primitive
-- signal, rather than using sigthreadmask and sigwait. The reason of
-- this difference is that sigwait doesn't work when some critical
-- signals (SIGABRT, SIGPIPE) are masked.
-----------------------
-- Set_Task_Affinity --
-----------------------
procedure Set_Task_Affinity (T : ST.Task_Id) is
pragma Unreferenced (T);
begin
-- Setting task affinity is not supported by the underlying system
null;
end Set_Task_Affinity;
end System.Task_Primitives.Operations;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 6 1 --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Handling of packed arrays with Component_Size = 61
package System.Pack_61 is
pragma Preelaborate;
Bits : constant := 61;
type Bits_61 is mod 2 ** Bits;
for Bits_61'Size use Bits;
-- In all subprograms below, Rev_SSO is set True if the array has the
-- non-default scalar storage order.
function Get_61
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_61 with Inline;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is extracted and returned.
procedure Set_61
(Arr : System.Address;
N : Natural;
E : Bits_61;
Rev_SSO : Boolean) with Inline;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is set to the given value.
end System.Pack_61;
|
pragma SPARK_Mode(On);
generic
type Thing is private;
Basic:in Thing;
package Stack is
subtype Count is Natural;
subtype Index is Count range 1 .. Count'Last;
type Stack (Max_Capacity : Count) is private;
type Store is array (Index range<>) of Thing;
-- "Models": For peeking into internals in the spec.
function Buffer (S : Stack) return Store with Ghost; -- Underlying buffer.
function Pushes (S : Stack) return Count with Ghost; -- # of items pushed.
-----------------------
-- Primary interface --
-----------------------
function Has_Space (S : Stack) return Boolean;
function Has_Items (S : Stack) return Boolean;
function Top (S : in Stack) return Thing
with Pre => Has_Items (S),
Post => Top'Result = Buffer (S)(Pushes (S));
procedure Pop (S : in out Stack)
with Pre => Has_Items (S),
Post => Has_Space (S) and Pushes (S) = Pushes (S)'Old -1
and Buffer (S) = Buffer (S)'Old (1..Pushes(S));
procedure Put (S : in out Stack; E : Thing)
with Pre => Has_Space (S),
Post => Has_Items (S) and Pushes (S) = Pushes (S)'Old + 1
and Buffer (S) = Buffer (S)'Old & E;
private
type Stack (Max_Capacity : Count) is record
Elements : Store (1 .. Max_Capacity) := (others => Basic);
Quantity : Count := 0; -- ^ UNNEEDED
end record
with Dynamic_Predicate => (Stack.Quantity <= Stack.Max_Capacity);
function Has_Items(S: Stack) return Boolean is (S.Quantity > 0);
function Has_Space(S: Stack) return Boolean is (S.Quantity < S.Max_Capacity);
function Buffer (S: Stack) return Store is (S.Elements(1 .. S.Quantity));
function Pushes (S: Stack) return Count is (S.Quantity );
end Stack;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
-- A comment is a textual annotation that can be attached to a set of
-- elements.
------------------------------------------------------------------------------
with AMF.CMOF.Elements;
limited with AMF.CMOF.Elements.Collections;
package AMF.CMOF.Comments is
pragma Preelaborate;
type CMOF_Comment is limited interface
and AMF.CMOF.Elements.CMOF_Element;
type CMOF_Comment_Access is
access all CMOF_Comment'Class;
for CMOF_Comment_Access'Storage_Size use 0;
not overriding function Get_Body
(Self : not null access constant CMOF_Comment)
return AMF.Optional_String is abstract;
-- Getter of Comment::body.
--
-- Specifies a string that is the comment.
not overriding procedure Set_Body
(Self : not null access CMOF_Comment;
To : AMF.Optional_String) is abstract;
-- Setter of Comment::body.
--
-- Specifies a string that is the comment.
not overriding function Get_Annotated_Element
(Self : not null access constant CMOF_Comment)
return AMF.CMOF.Elements.Collections.Set_Of_CMOF_Element is abstract;
-- Getter of Comment::annotatedElement.
--
-- References the Element(s) being commented.
end AMF.CMOF.Comments;
|
with Incomplete5_Pkg;
package Incomplete5 is
type Rec1 is private;
type Rec2 is private;
package My_G is new Incomplete5_Pkg (Rec1);
use My_G;
function Get (O: Base_Object) return Integer;
private
type Rec1 is record
I : Integer;
end record;
type Rec2 is record
A : Access_Type;
end record;
end Incomplete5;
|
with Ada.Strings.Fixed;
with TCG.Utils; use TCG.Utils;
with DOM.Core; use DOM.Core;
with DOM.Core.Elements; use DOM.Core.Elements;
with DOM.Core.Nodes; use DOM.Core.Nodes;
package body TCG.Collision_Objects is
type Polygon_Access is access all Polygon;
function To_Float (Str : String) return Float;
function To_Point (Str : String) return Point;
function To_Polygon (Offset : Point;
Str : String)
return not null Polygon_Access;
function Create (N : Node) return Collision_Shape;
function Inside_Ellipse (Pt : Point;
Ellipse : Polygon)
return Boolean
with Pre => Ellipse'Length = 4 and then Ellipse'First = 1;
--------------
-- To_Float --
--------------
function To_Float (Str : String) return Float
is (Float'Value (Str));
--------------
-- To_Point --
--------------
function To_Point (Str : String) return Point is
Index : constant Natural := Ada.Strings.Fixed.Index (Str, ",");
begin
return (To_Float (Str (Str'First .. Index - 1)),
To_Float (Str (Index + 1 .. Str'Last)));
end To_Point;
----------------
-- To_Polygon --
----------------
function To_Polygon (Offset : Point;
Str : String)
return not null Polygon_Access
is
Number_Of_Points : constant Natural :=
Ada.Strings.Fixed.Count (Str, " ") + 1;
Ret : constant not null Polygon_Access
:= new Polygon (1 .. Number_Of_Points);
Index : Natural;
Last_Index : Natural := Str'First;
begin
for Pt of Ret.all loop
Index := Ada.Strings.Fixed.Index (Str (Last_Index .. Str'Last), " ");
if Index = 0 then
-- Last point in the list
Pt := To_Point (Str (Last_Index .. Str'Last));
else
Pt := To_Point (Str (Last_Index .. Index - 1));
end if;
Pt.X := Pt.X + Offset.X;
Pt.Y := Pt.Y + Offset.Y;
Last_Index := Index + 1;
end loop;
return Ret;
end To_Polygon;
------------
-- Create --
------------
function Create (N : Node) return Collision_Shape is
X : constant Float := To_Float (Item_As_String (N, "x"));
Y : constant Float := To_Float (Item_As_String (N, "y"));
Has_Width : constant Boolean := Item_Exists (N, "width");
Has_Height : constant Boolean := Item_Exists (N, "height");
Height, Width : Float;
Rect : Polygon (1 .. 4);
Poly : access Polygon;
List : Node_List;
begin
if Has_Width or else Has_Height then
Width := To_Float (Item_As_String (N, "width"));
Height := To_Float (Item_As_String (N, "height"));
Rect := ((X, Y),
(X + Width, Y),
(X + Width, Y + Height),
(X, Y + Height));
List := Get_Elements_By_Tag_Name (N, "ellipse");
if Length (List) /= 0 then
Free (List);
return (Ellipse_Shape, Rect);
else
Free (List);
return (Rectangle_Shape, Rect);
end if;
else
List := Get_Elements_By_Tag_Name (N, "polygon");
if Length (List) /= 1 then
raise Program_Error with "Invalid number of polygon elements";
end if;
Poly := To_Polygon ((X, Y),
Item_As_String (Item (List, 0), "points"));
Free (List);
return (Polygon_Shape, Poly);
end if;
end Create;
-------------------
-- Has_Collision --
-------------------
function Has_Collision (This : Collisions)
return Boolean
is (not This.List.Is_Empty);
------------
-- Create --
------------
procedure Load (This : in out Collisions;
N : DOM.Core.Node)
is
List : Node_List;
begin
List := Elements.Get_Elements_By_Tag_Name (N, "object");
for Index in 1 .. Length (List) loop
This.List.Append (Create (Item (List, Index - 1)));
end loop;
Free (List);
end Load;
--------------------
-- Inside_Ellipse --
--------------------
function Inside_Ellipse (Pt : Point;
Ellipse : Polygon)
return Boolean
is
Diag_1 : constant Geometry.Line := To_Line (Ellipse (1), Ellipse (3));
Diag_2 : constant Geometry.Line := To_Line (Ellipse (2), Ellipse (4));
Center : constant Point := Intersection (Diag_1, Diag_2);
H_Axis : constant Vector := To_Vector ((Ellipse (1), Ellipse (2)));
V_Axis : constant Vector := To_Vector ((Ellipse (2), Ellipse (3)));
H_Semi : constant Distance_Type := Length (H_Axis) / 2.0;
V_Semi : constant Distance_Type := Length (V_Axis) / 2.0;
begin
return (
((Pt.X - Center.X)**2 / H_Semi**2)
+
((Pt.Y - Center.Y)**2 / V_Semi**2)
) <= 1.0;
end Inside_Ellipse;
-------------
-- Collide --
-------------
function Collide
(This : Collisions;
X, Y : Float)
return Boolean
is
function Fixed_Inside (P : Point; Poly : Polygon) return Boolean;
function Fixed_Inside (P : Point; Poly : Polygon) return Boolean is
J : Natural := Poly'Last;
C : Boolean := False;
Deltay : Float;
begin
-- See http://www.ecse.rpi.edu/Homepages/wrf/Research
-- /Short_Notes/pnpoly.html
for S in Poly'Range loop
Deltay := P.Y - Poly (S).Y;
-- The divide below is mandatory: if you transform it into a
-- multiplication on the other side, the sign of the denominator
-- will flip the inequality, and thus make the code harder.
if ((0.0 <= Deltay and then P.Y < Poly (J).Y)
or else (Poly (J).Y <= P.Y and then Deltay < 0.0))
and then
(P.X - Poly (S).X < (Poly (J).X - Poly (S).X) * Deltay
/ (Poly (J).Y - Poly (S).Y))
then
C := not C;
end if;
J := S;
end loop;
return C;
end Fixed_Inside;
begin
for Shape of This.List loop
case Shape.Kind is
when Rectangle_Shape =>
if Fixed_Inside ((X, Y), Shape.Rect) then
return True;
end if;
when Ellipse_Shape =>
if Inside_Ellipse ((X, Y), Shape.Rect) then
return True;
end if;
when Polygon_Shape =>
if Fixed_Inside ((X, Y), Shape.Poly.all) then
return True;
end if;
end case;
end loop;
return False;
end Collide;
end TCG.Collision_Objects;
|
with System;
package body CBOR_Codec is
subtype Additional_Value_Type is Integer range 0 .. 31;
Additional_8Bit : constant Additional_Value_Type := 24;
Additional_16Bit : constant Additional_Value_Type := 25;
Additional_32Bit : constant Additional_Value_Type := 26;
Additional_64Bit : constant Additional_Value_Type := 27;
type Encoding_Type (As_Value : Boolean := False) is
record
case As_Value is
when True =>
Val : Unsigned_8;
when False =>
Major : Major_Type;
Value : Additional_Value_Type;
end case;
end record
with Unchecked_Union, Size => 8, Bit_Order => System.Low_Order_First;
for Encoding_Type use
record
Major at 0 range 5 .. 7;
Value at 0 range 0 .. 4;
end record;
procedure Encode_Additional_Data (Value : Integer; Major : Major_Type) is
Encoding_Byte : Encoding_Type;
begin
Encoding_Byte.Major := Major;
if Value <= Additional_8Bit - 1 then
Encoding_Byte.Value := Value;
Write (Encoding_Byte.Val);
elsif Value <= Integer (Unsigned_8'Last) then
Encoding_Byte.Value := Additional_8Bit;
Write (Encoding_Byte.Val);
Write (Unsigned_8 (Value));
elsif Value <= Integer (Unsigned_16'Last) then
Encoding_Byte.Value := Additional_16Bit;
Write (Encoding_Byte.Val);
Write (Unsigned_8 (Value / 2**8));
Write (Unsigned_8 (Value mod 2**8));
elsif Value <= Integer'Last then
Encoding_Byte.Value := Additional_32Bit;
Write (Encoding_Byte.Val);
Write (Unsigned_8 ((Value / 2**24) mod 2**8));
Write (Unsigned_8 ((Value / 2**16) mod 2**8));
Write (Unsigned_8 ((Value / 2**8) mod 2**8));
Write (Unsigned_8 (Value mod 2**8));
end if;
end Encode_Additional_Data;
procedure Encode_Integer (Value : Integer) is
Major : Major_Type;
Positive_Value : Integer;
begin
if Value >= 0 then
Major := Unsigned_Integer;
Positive_Value := Value;
else
Major := Negative_Integer;
Positive_Value := -1 - Value;
end if;
Encode_Additional_Data (Positive_Value, Major);
end Encode_Integer;
procedure Encode_Byte_String (Value : String) is
begin
Encode_Additional_Data (Value'Length, Byte_String);
for C of Value loop
Write (Character'Pos (C));
end loop;
end Encode_Byte_String;
procedure Encode_UTF8_String (Value : String) is
begin
null;
end Encode_UTF8_String;
procedure Encode_Array (Count : Natural) is
begin
Encode_Additional_Data (Count, Item_Array);
end Encode_Array;
procedure Encode_Map (Count : Natural) is
begin
Encode_Additional_Data (Count, Item_Map);
end Encode_Map;
procedure Encode_Tag (Value : Natural) is
begin
Encode_Additional_Data (Value, Tag);
end Encode_Tag;
procedure Encode_Null is
begin
null;
end Encode_Null;
procedure Encode_False is
begin
null;
end Encode_False;
procedure Encode_True is
begin
null;
end Encode_True;
procedure Encode_Undefined is
begin
null;
end Encode_Undefined;
procedure Encode_Simple_Value (Value : Integer) is
begin
null;
end Encode_Simple_Value;
procedure Encode_Float (Value : Short_Float) is
begin
null;
end Encode_Float;
procedure Encode_Float (Value : Float) is
begin
null;
end Encode_Float;
procedure Encode_Decimal_Fraction (Value : Integer; Mantissa : Integer) is
begin
Encode_Tag (Decimal_Fraction_Tag);
Encode_Array (2);
Encode_Integer (Mantissa);
Encode_Integer (Value);
end Encode_Decimal_Fraction;
function Decode_Additional_Data (Value : out Integer;
Encoding_Byte : Encoding_Type) return Boolean is
Success : Boolean := False;
begin
case Encoding_Byte.Value is
when Additional_8Bit =>
Value := Integer (Read);
return True;
when Additional_16Bit =>
Value := Integer (Read) * 2**8 +
Integer (Read);
return True;
when Additional_32Bit =>
Value := Integer (Read) * 2**24 +
Integer (Read) * 2**16 +
Integer (Read) * 2**8 +
Integer (Read);
return True;
when Additional_64Bit =>
return False;
when others =>
Value := Encoding_Byte.Value;
return True;
end case;
end Decode_Additional_Data;
function Decode_Integer (Value : out Integer) return Boolean is
Encoding_Byte : Encoding_Type;
begin
Encoding_Byte.Val := Read;
if Decode_Additional_Data (Value, Encoding_Byte) then
if Encoding_Byte.Major = Unsigned_Integer then
return True;
elsif Encoding_Byte.Major = Negative_Integer then
Value := -1 - Value;
return True;
end if;
end if;
return False;
end Decode_Integer;
function Decode_Byte_String (Size : out Natural) return Boolean is
Encoding_Byte : Encoding_Type;
begin
Encoding_Byte.Val := Read;
if Encoding_Byte.Major = Byte_String and then
Decode_Additional_Data (Size, Encoding_Byte) then
return True;
else
return False;
end if;
end Decode_Byte_String;
function Decode_UTF8_String return Boolean is
begin
return False;
end Decode_UTF8_String;
function Decode_Array (Count : out Natural) return Boolean is
Encoding_Byte : Encoding_Type;
begin
Encoding_Byte.Val := Read;
if Encoding_Byte.Major = Item_Array and then
Decode_Additional_Data (Count, Encoding_Byte) then
return True;
else
return False;
end if;
end Decode_Array;
function Decode_Map return Boolean is
begin
return False;
end Decode_Map;
function Decode_Tag (Value : out Integer) return Boolean is
Encoding_Byte : Encoding_Type;
begin
Encoding_Byte.Val := Read;
if Encoding_Byte.Major = Tag and then
Decode_Additional_Data (Value, Encoding_Byte) then
return True;
else
return False;
end if;
end Decode_Tag;
function Decode_Null return Boolean is
begin
return False;
end Decode_Null;
function Decode_Boolean return Boolean is
begin
return False;
end Decode_Boolean;
function Decode_Undefined return Boolean is
begin
return False;
end Decode_Undefined;
function Decode_Simple_Value return Boolean is
begin
return False;
end Decode_Simple_Value ;
function Decode_Float return Boolean is
begin
return False;
end Decode_Float ;
function Decode_Decimal_Fraction (Value : out Integer;
Mantissa : out Integer) return Boolean is
Tag : Integer;
Count : Integer;
begin
if Decode_Tag (Tag) and then
Tag = Decimal_Fraction_Tag and then
Decode_Array (Count) and then
Count = 2 and then
Decode_Integer (Value) and then
Decode_Integer (Mantissa) then
return True;
else
return False;
end if;
end Decode_Decimal_Fraction;
end CBOR_Codec;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2017-2020, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with nRF.Device; use nRF.Device;
with nRF.GPIO; use nRF.GPIO;
package NRF52_DK.IOs is
type Pin_Id is range 0 .. 31;
type IO_Features is (Digital, Analog);
function Supports (Pin : Pin_Id; Feature : IO_Features) return Boolean is
(case Feature is
when Digital => (case Pin is
when 0 .. 2 | 5 .. 27 => True,
when others => False),
when Analog => (case Pin is
when 3 .. 4 | 28 .. 31 => True,
when others => False));
procedure Set (Pin : Pin_Id; Value : Boolean)
with Pre => Supports (Pin, Digital);
function Set (Pin : Pin_Id) return Boolean
with Pre => Supports (Pin, Digital);
type Analog_Value is range 0 .. 4095;
procedure Set_Analog_Period_Us (Period : Natural);
-- Set the period (in microseconds) of the PWM signal for all analog output
-- pins.
procedure Write (Pin : Pin_Id; Value : Analog_Value)
with Pre => Supports (Pin, Analog);
function Analog (Pin : Pin_Id) return Analog_Value
with Pre => Supports (Pin, Analog);
-- Read the voltagle applied to the pin. 0 means 0V 1023 means 3.3V
private
-- Mapping between pin id and GPIO_Points
Points : array (Pin_Id) of GPIO_Point :=
(0 => P00,
1 => P01,
2 => P02,
3 => P03,
4 => P04,
5 => P05,
6 => P06,
7 => P07,
8 => P08,
9 => P09,
10 => P10,
11 => P11,
12 => P12,
13 => P13,
14 => P14,
15 => P15,
16 => P16,
17 => P17,
18 => P18,
19 => P19,
20 => P20,
21 => P21,
22 => P22,
23 => P23,
24 => P24,
25 => P25,
26 => P26,
27 => P27,
28 => P28,
29 => P29,
30 => P30,
31 => P31
);
end NRF52_DK.IOs;
|
package CSS.Parser.Parser_Goto is
type Rule is new Natural;
type Nonterminal is new Integer;
type Small_Integer is range -32_000 .. 32_000;
subtype Small_Nonterminal is Nonterminal range -32_000 .. 32_000;
type Goto_Entry is record
Nonterm : Small_Nonterminal;
Newstate : Small_Integer;
end record;
-- pragma suppress(index_check);
type Row is new Integer range -1 .. Integer'Last;
type Goto_Parse_Table is array (Row range <>) of Goto_Entry;
Goto_Matrix : constant Goto_Parse_Table :=
((-1, -1) -- Dummy Entry.
-- State 0
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 30), (-57, 29), (-56, 26), (-55, 18), (-52, 11)
, (-45, 20), (-43, 13), (-28, 15), (-22, 14), (-20, 12)
, (-16, 17), (-13, 25), (-11, 10), (-10, 9), (-9, 8)
, (-8, 7), (-7, 6), (-6, 5), (-5, 4), (-4, 2)
, (-3, 1), (-2, 44)
-- State 1
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 30), (-57, 29), (-56, 26), (-55, 18), (-52, 11)
, (-45, 20), (-43, 13), (-28, 15), (-22, 14), (-20, 12)
, (-16, 17), (-13, 25), (-11, 10), (-10, 9), (-9, 8)
, (-8, 7), (-7, 6), (-6, 5), (-5, 4), (-4, 46)
-- State 10
, (-16, 49), (-13, 25)
-- State 11
, (-13, 50)
-- State 13
, (-13, 52)
-- State 14
, (-13, 53)
-- State 19
, (-13, 58)
-- State 20
, (-13, 59)
-- State 21
, (-13, 60)
-- State 22
, (-13, 62)
-- State 26
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 30), (-57, 67), (-50, 68)
-- State 29
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 70), (-13, 69)
-- State 36
, (-64, 38), (-63, 37), (-62, 76), (-61, 75), (-60, 74)
, (-59, 71)
-- State 37
, (-64, 79)
-- State 39
, (-13, 80)
-- State 47
, (-13, 88)
-- State 48
, (-13, 89)
-- State 50
, (-68, 92), (-53, 90), (-48, 91), (-27, 96)
-- State 51
, (-13, 98)
-- State 53
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 30), (-57, 29), (-56, 26), (-55, 18), (-52, 11)
, (-26, 103), (-25, 101), (-23, 100), (-5, 102)
-- State 54
, (-13, 113)
-- State 57
, (-13, 115)
-- State 58
, (-39, 127), (-37, 122), (-36, 121), (-34, 126), (-32, 120)
, (-31, 119), (-30, 118), (-29, 117), (-19, 116)
-- State 59
, (-47, 131), (-46, 130)
-- State 60
, (-74, 143), (-73, 136), (-72, 135), (-71, 144), (-26, 140)
, (-24, 134)
-- State 64
, (-13, 149)
-- State 65
, (-13, 150)
-- State 66
, (-13, 151)
-- State 67
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 70), (-13, 152)
-- State 68
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 30), (-57, 153)
-- State 76
, (-13, 154)
-- State 84
, (-13, 158)
-- State 88
, (-68, 92), (-64, 38), (-63, 37), (-61, 35), (-60, 34)
, (-59, 31), (-58, 30), (-57, 29), (-56, 26), (-55, 18)
, (-53, 90), (-52, 11), (-48, 91), (-27, 164), (-21, 159)
, (-5, 160)
-- State 90
, (-54, 165)
-- State 91
, (-13, 168)
-- State 94
, (-13, 172)
-- State 97
, (-13, 175)
-- State 98
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 30), (-57, 29), (-56, 26), (-55, 18), (-52, 11)
, (-21, 176), (-5, 160)
-- State 99
, (-13, 177)
-- State 100
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 30), (-57, 29), (-56, 26), (-55, 18), (-52, 11)
, (-26, 103), (-25, 179), (-5, 102)
-- State 105
, (-13, 182)
-- State 106
, (-13, 183)
-- State 107
, (-13, 184)
-- State 108
, (-13, 185)
-- State 109
, (-13, 186)
-- State 110
, (-13, 187)
-- State 111
, (-13, 188)
-- State 112
, (-13, 189)
-- State 113
, (-68, 92), (-53, 90), (-48, 91), (-27, 191)
-- State 114
, (-13, 192)
-- State 115
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 30), (-57, 29), (-56, 193)
-- State 120
, (-33, 195)
-- State 121
, (-38, 198)
-- State 122
, (-39, 199)
-- State 123
, (-13, 200)
-- State 124
, (-13, 201)
-- State 125
, (-13, 202)
-- State 128
, (-13, 203)
-- State 129
, (-34, 205)
-- State 130
, (-47, 206)
-- State 133
, (-47, 131), (-46, 208)
-- State 134
, (-74, 143), (-73, 136), (-72, 209), (-71, 144), (-26, 140)
-- State 135
, (-74, 143), (-73, 215), (-71, 144), (-26, 140)
-- State 137
, (-13, 216)
-- State 138
, (-26, 217)
-- State 139
, (-26, 218)
-- State 141
, (-13, 219)
-- State 142
, (-13, 220)
-- State 146
, (-13, 221)
-- State 147
, (-13, 222)
-- State 153
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 70), (-13, 224)
-- State 155
, (-13, 226)
-- State 158
, (-67, 228), (-66, 227), (-26, 229)
-- State 159
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 30), (-57, 29), (-56, 26), (-55, 18), (-52, 11)
, (-5, 232)
-- State 162
, (-13, 172)
-- State 165
, (-68, 92), (-48, 234)
-- State 166
, (-13, 236)
-- State 167
, (-54, 237)
-- State 169
, (-13, 238)
-- State 171
, (-13, 240)
-- State 173
, (-13, 241)
-- State 174
, (-13, 242)
-- State 176
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 30), (-57, 29), (-56, 26), (-55, 18), (-52, 11)
, (-5, 232)
-- State 177
, (-68, 92), (-48, 245), (-44, 244)
-- State 178
, (-13, 246)
-- State 180
, (-13, 247)
-- State 193
, (-64, 38), (-63, 37), (-61, 35), (-60, 34), (-59, 31)
, (-58, 30), (-57, 67), (-50, 68)
-- State 194
, (-13, 249)
-- State 195
, (-33, 250)
-- State 196
, (-13, 251)
-- State 197
, (-13, 252)
-- State 200
, (-34, 253)
-- State 202
, (-33, 256)
-- State 203
, (-40, 260), (-39, 127), (-37, 122), (-36, 121), (-34, 126)
, (-31, 259), (-26, 258)
-- State 208
, (-47, 206)
-- State 209
, (-74, 143), (-73, 215), (-71, 144), (-26, 140)
-- State 211
, (-13, 262)
-- State 212
, (-26, 217), (-13, 263)
-- State 213
, (-26, 218), (-13, 264)
-- State 214
, (-13, 265)
-- State 222
, (-74, 143), (-73, 136), (-72, 135), (-71, 144), (-26, 140)
, (-24, 267)
-- State 226
, (-65, 277)
-- State 230
, (-13, 281)
-- State 231
, (-13, 282)
-- State 233
, (-13, 283)
-- State 234
, (-13, 284)
-- State 235
, (-13, 285)
-- State 237
, (-68, 92), (-48, 286)
-- State 238
, (-74, 143), (-73, 288), (-71, 144), (-69, 287), (-26, 140)
-- State 243
, (-13, 290)
-- State 245
, (-13, 293)
-- State 247
, (-68, 92), (-53, 90), (-48, 91), (-27, 294)
-- State 248
, (-13, 295)
-- State 249
, (-39, 127), (-37, 122), (-36, 121), (-34, 126), (-32, 120)
, (-31, 119), (-30, 118), (-29, 296)
-- State 250
, (-33, 250)
-- State 251
, (-35, 298), (-34, 297)
-- State 252
, (-34, 299)
-- State 254
, (-13, 300)
-- State 255
, (-13, 301)
-- State 256
, (-33, 250)
-- State 257
, (-13, 302)
-- State 258
, (-13, 303)
-- State 259
, (-13, 304)
-- State 260
, (-13, 305)
-- State 261
, (-13, 306)
-- State 262
, (-74, 143), (-73, 136), (-72, 307), (-71, 144), (-26, 140)
-- State 263
, (-74, 143), (-73, 308), (-71, 144), (-26, 140)
-- State 264
, (-74, 143), (-73, 309), (-71, 144), (-26, 140)
-- State 266
, (-13, 310)
-- State 267
, (-74, 143), (-73, 136), (-72, 209), (-71, 144), (-26, 140)
-- State 268
, (-13, 312)
-- State 269
, (-13, 313)
-- State 277
, (-13, 314)
-- State 279
, (-13, 315)
-- State 280
, (-67, 316), (-26, 229)
-- State 286
, (-13, 318)
-- State 287
, (-74, 143), (-73, 324), (-71, 144), (-70, 322), (-49, 323)
, (-26, 140)
-- State 291
, (-13, 325)
-- State 292
, (-13, 326)
-- State 297
, (-36, 328), (-34, 126)
-- State 302
, (-41, 332)
-- State 303
, (-41, 334)
-- State 307
, (-74, 143), (-73, 215), (-71, 144), (-26, 140)
-- State 310
, (-26, 337)
-- State 311
, (-13, 338)
-- State 317
, (-13, 341)
-- State 319
, (-13, 342)
-- State 320
, (-13, 343)
-- State 321
, (-13, 344)
-- State 323
, (-74, 143), (-73, 345), (-71, 144), (-26, 140)
-- State 325
, (-68, 92), (-48, 347)
-- State 327
, (-13, 348)
-- State 328
, (-38, 198)
-- State 331
, (-13, 351)
-- State 332
, (-13, 352)
-- State 333
, (-13, 353)
-- State 334
, (-13, 354)
-- State 335
, (-13, 355)
-- State 336
, (-13, 356)
-- State 337
, (-13, 357)
-- State 339
, (-13, 358)
-- State 340
, (-13, 359)
-- State 341
, (-26, 360)
-- State 346
, (-13, 361)
-- State 347
, (-13, 362)
-- State 352
, (-26, 363)
-- State 353
, (-42, 366), (-26, 364)
-- State 367
, (-13, 370)
-- State 370
, (-26, 371)
);
-- The offset vector
Goto_Offset : constant array (0 .. 371) of Row :=
(0,
27, 52, 52, 52, 52, 52, 52, 52, 52, 52,
54, 55, 55, 56, 57, 57, 57, 57, 57, 58,
59, 60, 61, 61, 61, 61, 69, 69, 69, 76,
76, 76, 76, 76, 76, 76, 82, 83, 83, 84,
84, 84, 84, 84, 84, 84, 84, 85, 86, 86,
90, 91, 91, 105, 106, 106, 106, 107, 116, 118,
124, 124, 124, 124, 125, 126, 127, 134, 141, 141,
141, 141, 141, 141, 141, 141, 142, 142, 142, 142,
142, 142, 142, 142, 143, 143, 143, 143, 159, 159,
160, 161, 161, 161, 162, 162, 162, 163, 175, 176,
189, 189, 189, 189, 189, 190, 191, 192, 193, 194,
195, 196, 197, 201, 202, 210, 210, 210, 210, 210,
211, 212, 213, 214, 215, 216, 216, 216, 217, 218,
219, 219, 219, 221, 226, 230, 230, 231, 232, 233,
233, 234, 235, 235, 235, 235, 236, 237, 237, 237,
237, 237, 237, 244, 244, 245, 245, 245, 248, 259,
259, 259, 260, 260, 260, 262, 263, 264, 264, 265,
265, 266, 266, 267, 268, 268, 279, 282, 283, 283,
284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
284, 284, 284, 292, 293, 294, 295, 296, 296, 296,
297, 297, 298, 305, 305, 305, 305, 305, 306, 310,
310, 311, 313, 315, 316, 316, 316, 316, 316, 316,
316, 316, 322, 322, 322, 322, 323, 323, 323, 323,
324, 325, 325, 326, 327, 328, 328, 330, 335, 335,
335, 335, 335, 336, 336, 337, 337, 341, 342, 350,
351, 353, 354, 354, 355, 356, 357, 358, 359, 360,
361, 362, 367, 371, 375, 375, 376, 381, 382, 383,
383, 383, 383, 383, 383, 383, 383, 384, 384, 385,
387, 387, 387, 387, 387, 387, 388, 394, 394, 394,
394, 395, 396, 396, 396, 396, 396, 398, 398, 398,
398, 398, 399, 400, 400, 400, 400, 404, 404, 404,
405, 406, 406, 406, 406, 406, 406, 407, 407, 408,
409, 410, 410, 414, 414, 416, 416, 417, 418, 418,
418, 419, 420, 421, 422, 423, 424, 425, 425, 426,
427, 428, 428, 428, 428, 428, 429, 430, 430, 430,
430, 430, 431, 433, 433, 433, 433, 433, 433, 433,
433, 433, 433, 433, 433, 433, 433, 434, 434, 434,
435);
Rule_Length : constant array (Rule range 0 .. 202) of Natural := (2,
1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 0, 4, 3, 1, 2, 1, 1, 1, 1, 2,
1, 0, 2, 1, 6, 5, 1, 1, 6, 6, 2, 1, 0, 3, 1, 5, 4, 3, 2, 1, 1, 6, 6,
6, 2, 4, 1, 1, 1, 2, 3, 4, 4, 3, 2, 3, 0, 1, 1, 2, 1, 2, 1, 3, 2, 1,
2, 6, 6, 6, 4, 2, 2, 1, 1, 5, 7, 5, 5, 1, 1, 1, 9, 7, 4, 3, 1, 2, 1,
0, 2, 5, 2, 2, 2, 2, 2, 2, 1, 1, 5, 5, 4, 3, 2, 1, 2, 2, 4, 1, 4, 3,
2, 2, 1, 1, 1, 1, 1, 1, 4, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 5, 9,
9, 3, 1, 1, 1, 1, 1, 1, 3, 2, 5, 3, 3, 1, 1, 5, 2, 4, 5, 3, 2, 3, 2,
5, 4, 4, 3, 2, 1, 2, 3, 2, 5, 4, 4, 4, 2, 1, 4, 4, 2, 1, 6, 3, 2, 1,
2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2);
Get_LHS_Rule : constant array (Rule range 0 .. 202) of Nonterminal := (-1,
-2, -3, -3, -3, -4, -4, -4, -4, -4, -4, -4, -12, -12, -12,
-10, -14, -14, -11, -11, -16, -16, -16, -13, -13, -13, -17, -17, -15,
-15, -18, -18, -6, -6, -21, -21, -21, -20, -20, -8, -22, -22, -23,
-23, -25, -25, -9, -9, -28, -19, -19, -29, -30, -30, -32, -32, -32,
-32, -33, -33, -33, -31, -31, -35, -35, -36, -36, -38, -37, -37, -39,
-34, -34, -34, -34, -41, -41, -41, -41, -40, -40, -40, -40, -40, -42,
-42, -7, -7, -43, -43, -45, -46, -46, -46, -47, -44, -44, -49, -49,
-50, -50, -50, -51, -51, -5, -5, -5, -5, -27, -27, -52, -52, -55,
-55, -56, -56, -56, -57, -57, -58, -58, -58, -58, -58, -58, -63, -63,
-63, -59, -59, -64, -64, -62, -62, -62, -62, -62, -60, -60, -60, -60,
-65, -65, -65, -65, -65, -65, -61, -61, -61, -66, -66, -66, -67, -67,
-67, -53, -53, -53, -53, -54, -54, -48, -48, -48, -48, -48, -48, -68,
-68, -70, -71, -71, -71, -24, -24, -24, -72, -72, -72, -72, -72, -69,
-69, -69, -73, -73, -73, -73, -73, -73, -73, -73, -73, -26, -26, -26,
-26, -26, -26, -26, -26, -74);
end CSS.Parser.Parser_Goto;
|
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2016 onox <denkpadje@gmail.com>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
package Orka.SIMD.SSE is
pragma Pure;
end Orka.SIMD.SSE;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . T E X 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. --
-- --
------------------------------------------------------------------------------
-- Minimal version of Text_IO body for use on TMS570 family of MCUs, using
-- SCI1/LIN1
-- @design
-- This package is in charge of sending characters to the remote host
-- machine. The application output is sent through the UART, from which the
-- host machine extracts the application output.
--
-- The TMS570 runtime uses the SCI1/LIN1 module, configured for 115200 baud
-- rate, one stop bit, no parity.
with Interfaces; use Interfaces;
-- @design used for the 32-bit integers definition
with System.Board_Parameters; use System.Board_Parameters;
-- @design used to retrieve the system clock, used to calculate the prescaler
-- values to achieve the desired baud rate.
package body System.Text_IO is
SCI_BASE : constant := 16#FFF7_E400#;
-- SCI base address
SCIGCR0 : Unsigned_32;
for SCIGCR0'Address use SCI_BASE + 16#00#;
pragma Volatile (SCIGCR0);
pragma Import (Ada, SCIGCR0);
SCIGCR1 : Unsigned_32;
for SCIGCR1'Address use SCI_BASE + 16#04#;
pragma Volatile (SCIGCR1);
pragma Import (Ada, SCIGCR1);
SCIFLR : Unsigned_32;
for SCIFLR'Address use SCI_BASE + 16#1C#;
pragma Volatile (SCIFLR);
pragma Import (Ada, SCIFLR);
TX_READY : constant := 16#100#;
RX_READY : constant := 16#200#;
BRS : Unsigned_32;
for BRS'Address use SCI_BASE + 16#2C#;
pragma Volatile (BRS);
pragma Import (Ada, BRS);
SCIFORMAT : Unsigned_32;
for SCIFORMAT'Address use SCI_BASE + 16#28#;
pragma Volatile (SCIFORMAT);
pragma Import (Ada, SCIFORMAT);
SCIRD : Unsigned_32;
for SCIRD'Address use SCI_BASE + 16#34#;
pragma Volatile (SCIRD);
pragma Import (Ada, SCIRD);
SCITD : Unsigned_32;
for SCITD'Address use SCI_BASE + 16#38#;
pragma Volatile (SCITD);
pragma Import (Ada, SCITD);
SCIPIO0 : Unsigned_32;
for SCIPIO0'Address use SCI_BASE + 16#3C#;
pragma Volatile (SCIPIO0);
pragma Import (Ada, SCIPIO0);
SCIPIO8 : Unsigned_32;
for SCIPIO8'Address use SCI_BASE + 16#5C#;
pragma Volatile (SCIPIO8);
pragma Import (Ada, SCIPIO8);
---------
-- Get --
---------
function Get return Character is
begin
return Character'Val (SCIRD and 16#FF#);
end Get;
----------------
-- Initialize --
----------------
procedure Initialize is
begin
-- Do not reinitialize the SCI, if it is already initialized
if (SCIGCR0 and 1) = 0 then
-- Bring out of reset
SCIGCR0 := 1;
-- 8n1, enable RX and TX, async, idle-line mode, SWnRST, internal clk
-- NOTE: SPNU499A (Nov 2012) is incorrect on COMM MODE: Idle line
-- mode value is 0.
SCIGCR1 := 16#03_00_00_22#;
-- Baud rate. VCLK = RTI1CLK
declare
Baud : constant := 115200;
P : constant := VCLK_Frequency / (16 * Baud) - 1;
M : constant := (VCLK_Frequency / Baud) rem 16;
begin
BRS := P + M * 2**24;
end;
-- 8 bits
SCIFORMAT := 7;
-- Enable Tx and Rx pins, pull-up
SCIPIO0 := 2#110#;
SCIPIO8 := 2#110#;
-- Enable SCI
SCIGCR1 := SCIGCR1 or 16#80#;
end if;
Initialized := True;
end Initialize;
-----------------
-- Is_Tx_Ready --
-----------------
function Is_Tx_Ready return Boolean is
((SCIFLR and TX_READY) /= 0);
-----------------
-- Is_Rx_Ready --
-----------------
function Is_Rx_Ready return Boolean is
((SCIFLR and RX_READY) /= 0);
---------
-- Put --
---------
procedure Put (C : Character) is
begin
SCITD := Character'Pos (C);
end Put;
----------------------------
-- Use_Cr_Lf_For_New_Line --
----------------------------
function Use_Cr_Lf_For_New_Line return Boolean is
begin
return True;
end Use_Cr_Lf_For_New_Line;
end System.Text_IO;
|
------------------------------------------------------------------------------
-- --
-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K _ P R I M I T I V E S --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- Copyright (c) 1991,1992,1993,1994, FSU, All Rights Reserved --
-- --
-- GNARL 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. GNARL is distributed in the hope that it will be use- --
-- ful, but but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Gen- --
-- eral Library Public License for more details. You should have received --
-- a copy of the GNU Library General Public License along with GNARL; see --
-- file COPYING.LIB. If not, write to the Free Software Foundation, 675 --
-- Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
with Interfaces.C;
-- Used for Size_t;
with Interfaces.C.Pthreads;
-- Used for, size_t,
-- pthread_mutex_t,
-- pthread_cond_t,
-- pthread_t
with Interfaces.C.POSIX_RTE;
-- Used for, Signal,
-- siginfo_ptr,
with System.Task_Clock;
-- Used for, Stimespec
with Unchecked_Conversion;
pragma Elaborate_All (Interfaces.C.Pthreads);
package System.Task_Primitives is
-- Low level Task size and state definition
type LL_Task_Procedure_Access is access procedure (Arg : System.Address);
type Pre_Call_State is new System.Address;
type Task_Storage_Size is new Interfaces.C.size_t;
type Machine_Exceptions is new Interfaces.C.POSIX_RTE.Signal;
type Error_Information is new Interfaces.C.POSIX_RTE.siginfo_ptr;
-- type Lock is new Interfaces.C.Pthreads.pthread_mutex_t;
-- type Condition_Variable is new Interfaces.C.Pthreads.pthread_cond_t;
-- These definitions has to be private ???
type Lock is private;
type Condition_Variable is private;
-- The above types should both be limited. They are not due to a hack in
-- ATCB allocation which allocates a block of the correct size and then
-- assigns an initialized ATCB to it. This won't work with limited types.
-- When allocation is done with new, these can become limited once again.
-- ???
type Task_Control_Block is record
LL_Entry_Point : LL_Task_Procedure_Access;
LL_Arg : System.Address;
Thread : Interfaces.C.Pthreads.pthread_t;
Stack_Size : Task_Storage_Size;
Stack_Limit : System.Address;
end record;
type TCB_Ptr is access all Task_Control_Block;
-- Task ATCB related and variables.
function Address_To_TCB_Ptr is new
Unchecked_Conversion (System.Address, TCB_Ptr);
procedure Initialize_LL_Tasks (T : TCB_Ptr);
-- Initialize GNULLI. T points to the Task Control Block that should
-- be initialized for use by the environment task.
function Self return TCB_Ptr;
-- Return a pointer to the Task Control Block of the calling task.
procedure Initialize_Lock (Prio : System.Priority; L : in out Lock);
-- Initialize a lock object. Prio is the ceiling priority associated
-- with the lock.
procedure Finalize_Lock (L : in out Lock);
-- Finalize a lock object, freeing any resources allocated by the
-- corresponding Initialize_Lock.
procedure Write_Lock (L : in out Lock; Ceiling_Violation : out Boolean);
-- Lock a lock object for write access to a critical section. After
-- this operation returns, the calling task owns the lock, and
-- no other Write_Lock or Read_Lock operation on the same object will
-- return the owner executes an Unlock operation on the same object.
procedure Read_Lock (L : in out Lock; Ceiling_Violation : out Boolean);
-- Lock a lock object for read access to a critical section. After
-- this operation returns, the calling task owns the lock, and
-- no other Write_Lock operation on the same object will return until
-- the owner(s) execute Unlock operation(s) on the same object.
-- A Read_Lock to an owned lock object may return while the lock is
-- still owned, though an implementation may also implement
-- Read_Lock to have the same semantics.
procedure Unlock (L : in out Lock);
-- Unlock a locked lock object. The results are undefined if the
-- calling task does not own the lock. Lock/Unlock operations must
-- be nested, that is, the argument to Unlock must be the object
-- most recently locked.
procedure Initialize_Cond (Cond : in out Condition_Variable);
-- Initialize a condition variable object.
procedure Finalize_Cond (Cond : in out Condition_Variable);
-- Finalize a condition variable object, recovering any resources
-- allocated for it by Initialize_Cond.
procedure Cond_Wait (Cond : in out Condition_Variable; L : in out Lock);
-- Wait on a condition variable. The mutex object L is unlocked
-- atomically, such that another task that is able to lock the mutex
-- can be assured that the wait has actually commenced, and that
-- a Cond_Signal operation will cause the waiting task to become
-- eligible for execution once again. Before Cond_Wait returns,
-- the waiting task will again lock the mutex. The waiting task may become
-- eligible for execution at any time, but will become eligible for
-- execution when a Cond_Signal operation is performed on the
-- same condition variable object. The effect of more than one
-- task waiting on the same condition variable is unspecified.
procedure Cond_Timed_Wait
(Cond : in out Condition_Variable;
L : in out Lock; Abs_Time : System.Task_Clock.Stimespec;
Timed_Out : out Boolean);
-- Wait on a condition variable, as for Cond_Wait, above. In addition,
-- the waiting task will become eligible for execution again
-- when the absolute time specified by Timed_Out arrives.
procedure Cond_Signal (Cond : in out Condition_Variable);
-- Wake up a task waiting on the condition variable object specified
-- by Cond, making it eligible for execution once again.
procedure Set_Priority (T : TCB_Ptr; Prio : System.Priority);
-- Set the priority of the task specified by T to P.
procedure Set_Own_Priority (Prio : System.Priority);
-- Set the priority of the calling task to P.
function Get_Priority (T : TCB_Ptr) return System.Priority;
-- Return the priority of the task specified by T.
function Get_Own_Priority return System.Priority;
-- Return the priority of the calling task.
procedure Create_LL_Task
(Priority : System.Priority;
Stack_Size : Task_Storage_Size;
LL_Entry_Point : LL_Task_Procedure_Access;
Arg : System.Address;
T : TCB_Ptr);
-- Create a new low-level task with priority Priority. A new thread
-- of control is created with a stack size of at least Stack_Size,
-- and the procedure LL_Entry_Point is called with the argument Arg
-- from this new thread of control. The Task Control Block pointed
-- to by T is initialized to refer to this new task.
procedure Exit_LL_Task;
-- Exit a low-level task. The resources allocated for the task
-- by Create_LL_Task are recovered. The task no longer executes, and
-- the effects of further operations on task are unspecified.
procedure Abort_Task (T : TCB_Ptr);
-- Abort the task specified by T (the target task). This causes
-- the target task to asynchronously execute the handler procedure
-- installed by the target task using Install_Abort_Handler. The
-- effect of this operation is unspecified if there is no abort
-- handler procedure for the target task.
procedure Test_Abort;
-- ??? Obsolete? This is intended to allow implementation of
-- abortion and ATC in the absence of an asynchronous Abort_Task,
-- but I think that we decided that GNARL can handle this on
-- its own by making sure that there is an Undefer_Abortion at
-- every abortion synchronization point.
type Abort_Handler_Pointer is access procedure (Context : Pre_Call_State);
procedure Install_Abort_Handler (Handler : Abort_Handler_Pointer);
-- Install an abort handler procedure. This procedure is called
-- asynchronously by the calling task whenever a call to Abort_Task
-- specifies the calling task as the target. If the abort handler
-- procedure is asynchronously executed during a GNULLI operation
-- and then calls some other GNULLI operation, the effect is unspecified.
procedure Install_Error_Handler (Handler : System.Address);
-- Install an error handler for the calling task. The handler will
-- be called synchronously if an error is encountered during the
-- execution of the calling task.
procedure LL_Assert (B : Boolean; M : String);
-- If B is False, print the string M to the console and halt the
-- program.
Task_Wrapper_Frame : constant Integer := 72;
-- This is the size of the frame for the Pthread_Wrapper procedure.
type Proc is access procedure (Addr : System.Address);
procedure Test_And_Set (Flag_Add : System.Address; Result : out Boolean);
-- Flag_Add is the address of a variable of type Boolean
private
type Lock is new Interfaces.C.Pthreads.pthread_mutex_t;
-- type Condition_Variable is new Interfaces.C.Pthreads.pthread_cond_t;
type Condition_Variable is record
CV : Interfaces.C.Pthreads.pthread_cond_t;
Someone_Is_Waiting : Boolean;
end record;
end System.Task_Primitives;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E X P _ C H 1 3 --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. 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 Atree; use Atree;
with Checks; use Checks;
with Einfo; use Einfo;
with Exp_Ch3; use Exp_Ch3;
with Exp_Ch6; use Exp_Ch6;
with Exp_Imgv; use Exp_Imgv;
with Exp_Tss; use Exp_Tss;
with Exp_Util; use Exp_Util;
with Freeze; use Freeze;
with Namet; use Namet;
with Nlists; use Nlists;
with Nmake; use Nmake;
with Opt; use Opt;
with Restrict; use Restrict;
with Rident; use Rident;
with Rtsfind; use Rtsfind;
with Sem; use Sem;
with Sem_Aux; use Sem_Aux;
with Sem_Ch7; use Sem_Ch7;
with Sem_Ch8; use Sem_Ch8;
with Sem_Eval; use Sem_Eval;
with Sem_Util; use Sem_Util;
with Sinfo; use Sinfo;
with Snames; use Snames;
with Tbuild; use Tbuild;
with Uintp; use Uintp;
with Validsw; use Validsw;
package body Exp_Ch13 is
------------------------------------------
-- Expand_N_Attribute_Definition_Clause --
------------------------------------------
-- Expansion action depends on attribute involved
procedure Expand_N_Attribute_Definition_Clause (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Exp : constant Node_Id := Expression (N);
Ent : Entity_Id;
V : Node_Id;
begin
Ent := Entity (Name (N));
if Is_Type (Ent) then
Ent := Underlying_Type (Ent);
end if;
case Get_Attribute_Id (Chars (N)) is
-------------
-- Address --
-------------
when Attribute_Address =>
-- If there is an initialization which did not come from the
-- source program, then it is an artifact of our expansion, and we
-- suppress it. The case we are most concerned about here is the
-- initialization of a packed array to all false, which seems
-- inappropriate for variable to which an address clause is
-- applied. The expression may itself have been rewritten if the
-- type is packed array, so we need to examine whether the
-- original node is in the source. An exception though is the case
-- of an access variable which is default initialized to null, and
-- such initialization is retained.
-- Furthermore, if the initialization is the equivalent aggregate
-- of the type initialization procedure, it replaces an implicit
-- call to the init proc, and must be respected. Note that for
-- packed types we do not build equivalent aggregates.
-- Also, if Init_Or_Norm_Scalars applies, then we need to retain
-- any default initialization for objects of scalar types and
-- types with scalar components. Normally a composite type will
-- have an init_proc in the presence of Init_Or_Norm_Scalars,
-- so when that flag is set we have just have to do a test for
-- scalar and string types (the predefined string types such as
-- String and Wide_String don't have an init_proc).
declare
Decl : constant Node_Id := Declaration_Node (Ent);
Typ : constant Entity_Id := Etype (Ent);
begin
if Nkind (Decl) = N_Object_Declaration
and then Present (Expression (Decl))
and then Nkind (Expression (Decl)) /= N_Null
and then
not Comes_From_Source (Original_Node (Expression (Decl)))
then
if Present (Base_Init_Proc (Typ))
and then
Present (Static_Initialization (Base_Init_Proc (Typ)))
then
null;
elsif Init_Or_Norm_Scalars
and then (Is_Scalar_Type (Typ)
or else Is_String_Type (Typ))
then
null;
else
Set_Expression (Decl, Empty);
end if;
-- An object declaration to which an address clause applies
-- has a delayed freeze, but the address expression itself
-- must be elaborated at the point it appears. If the object
-- is controlled, additional checks apply elsewhere.
-- If the attribute comes from an aspect specification it
-- is being elaborated at the freeze point and side effects
-- need not be removed (and shouldn't, if the expression
-- depends on other entities that have delayed freeze).
-- This is another consequence of the delayed analysis of
-- aspects, and a real semantic difference.
elsif Nkind (Decl) = N_Object_Declaration
and then not Needs_Constant_Address (Decl, Typ)
and then not From_Aspect_Specification (N)
then
Remove_Side_Effects (Exp);
end if;
end;
---------------
-- Alignment --
---------------
when Attribute_Alignment =>
-- As required by Gigi, we guarantee that the operand is an
-- integer literal (this simplifies things in Gigi).
if Nkind (Exp) /= N_Integer_Literal then
Rewrite (Exp, Make_Integer_Literal (Loc, Expr_Value (Exp)));
end if;
-- A complex case arises if the alignment clause applies to an
-- unconstrained object initialized with a function call. The
-- result of the call is placed on the secondary stack, and the
-- declaration is rewritten as a renaming of a dereference, which
-- fails expansion. We must introduce a temporary and assign its
-- value to the existing entity.
if Nkind (Parent (Ent)) = N_Object_Renaming_Declaration
and then not Is_Entity_Name (Renamed_Object (Ent))
then
declare
Decl : constant Node_Id := Parent (Ent);
Loc : constant Source_Ptr := Sloc (N);
Temp : constant Entity_Id := Make_Temporary (Loc, 'T');
New_Decl : Node_Id;
begin
-- Replace entity with temporary and reanalyze
Set_Defining_Identifier (Decl, Temp);
Set_Analyzed (Decl, False);
Analyze (Decl);
-- Introduce new declaration for entity but do not reanalyze
-- because entity is already in scope. Type and expression
-- are already resolved.
New_Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => Ent,
Object_Definition =>
New_Occurrence_Of (Etype (Ent), Loc),
Expression => New_Occurrence_Of (Temp, Loc));
Set_Renamed_Object (Ent, Empty);
Insert_After (Decl, New_Decl);
Set_Analyzed (Decl);
end;
end if;
------------------
-- Storage_Size --
------------------
when Attribute_Storage_Size =>
-- If the type is a task type, then assign the value of the
-- storage size to the Size variable associated with the task.
-- Insert the assignment right after the declaration of the Size
-- variable.
-- Generate:
-- task_typeZ := expression
if Ekind (Ent) = E_Task_Type then
declare
Assign : Node_Id;
begin
Assign :=
Make_Assignment_Statement (Loc,
Name =>
New_Occurrence_Of (Storage_Size_Variable (Ent), Loc),
Expression =>
Convert_To (RTE (RE_Size_Type), Expression (N)));
-- If the clause is not generated by an aspect, insert
-- the assignment here. Freezing rules ensure that this
-- is safe, or clause will have been rejected already.
if Is_List_Member (N) then
Insert_After (N, Assign);
-- Otherwise, insert assignment after task declaration.
else
Insert_After
(Parent (Storage_Size_Variable (Entity (N))), Assign);
end if;
Analyze (Assign);
end;
-- For Storage_Size for an access type, create a variable to hold
-- the value of the specified size with name typeV and expand an
-- assignment statement to initialize this value.
elsif Is_Access_Type (Ent) then
-- We don't need the variable for a storage size of zero
if not No_Pool_Assigned (Ent) then
V :=
Make_Defining_Identifier (Loc,
Chars => New_External_Name (Chars (Ent), 'V'));
-- Insert the declaration of the object
Insert_Action (N,
Make_Object_Declaration (Loc,
Defining_Identifier => V,
Object_Definition =>
New_Occurrence_Of (RTE (RE_Storage_Offset), Loc),
Expression =>
Convert_To (RTE (RE_Storage_Offset), Expression (N))));
Set_Storage_Size_Variable (Ent, Entity_Id (V));
end if;
end if;
-- Other attributes require no expansion
when others =>
null;
end case;
end Expand_N_Attribute_Definition_Clause;
-----------------------------
-- Expand_N_Free_Statement --
-----------------------------
procedure Expand_N_Free_Statement (N : Node_Id) is
Expr : constant Node_Id := Expression (N);
Typ : Entity_Id;
begin
-- Certain run-time configurations and targets do not provide support
-- for controlled types.
if Restriction_Active (No_Finalization) then
return;
end if;
-- Use the base type to perform the check for finalization master
Typ := Etype (Expr);
if Ekind (Typ) = E_Access_Subtype then
Typ := Etype (Typ);
end if;
-- Handle private access types
if Is_Private_Type (Typ)
and then Present (Full_View (Typ))
then
Typ := Full_View (Typ);
end if;
-- Do not create a custom Deallocate when freeing an object with
-- suppressed finalization. In such cases the object is never attached
-- to a master, so it does not need to be detached. Use a regular free
-- statement instead.
if No (Finalization_Master (Typ)) then
return;
end if;
-- Use a temporary to store the result of a complex expression. Perform
-- the following transformation:
--
-- Free (Complex_Expression);
--
-- Temp : constant Type_Of_Expression := Complex_Expression;
-- Free (Temp);
if Nkind (Expr) /= N_Identifier then
declare
Expr_Typ : constant Entity_Id := Etype (Expr);
Loc : constant Source_Ptr := Sloc (N);
New_Expr : Node_Id;
Temp_Id : Entity_Id;
begin
Temp_Id := Make_Temporary (Loc, 'T');
Insert_Action (N,
Make_Object_Declaration (Loc,
Defining_Identifier => Temp_Id,
Object_Definition => New_Occurrence_Of (Expr_Typ, Loc),
Expression => Relocate_Node (Expr)));
New_Expr := New_Occurrence_Of (Temp_Id, Loc);
Set_Etype (New_Expr, Expr_Typ);
Set_Expression (N, New_Expr);
end;
end if;
-- Create a custom Deallocate for a controlled object. This routine
-- ensures that the hidden list header will be deallocated along with
-- the actual object.
Build_Allocate_Deallocate_Proc (N, Is_Allocate => False);
end Expand_N_Free_Statement;
----------------------------
-- Expand_N_Freeze_Entity --
----------------------------
procedure Expand_N_Freeze_Entity (N : Node_Id) is
E : constant Entity_Id := Entity (N);
Decl : Node_Id;
Delete : Boolean := False;
E_Scope : Entity_Id;
In_Other_Scope : Boolean;
In_Outer_Scope : Boolean;
begin
-- If there are delayed aspect specifications, we insert them just
-- before the freeze node. They are already analyzed so we don't need
-- to reanalyze them (they were analyzed before the type was frozen),
-- but we want them in the tree for the back end, and so that the
-- listing from sprint is clearer on where these occur logically.
if Has_Delayed_Aspects (E) then
declare
Aitem : Node_Id;
Ritem : Node_Id;
begin
-- Look for aspect specs for this entity
Ritem := First_Rep_Item (E);
while Present (Ritem) loop
if Nkind (Ritem) = N_Aspect_Specification
and then Entity (Ritem) = E
then
Aitem := Aspect_Rep_Item (Ritem);
-- Skip this for aspects (e.g. Current_Value) for which
-- there is no corresponding pragma or attribute.
if Present (Aitem)
-- Also skip if we have a null statement rather than a
-- delayed aspect (this happens when we are ignoring rep
-- items from use of the -gnatI switch).
and then Nkind (Aitem) /= N_Null_Statement
then
pragma Assert (Is_Delayed_Aspect (Aitem));
Insert_Before (N, Aitem);
end if;
end if;
Next_Rep_Item (Ritem);
end loop;
end;
end if;
-- Processing for objects
if Is_Object (E) then
if Present (Address_Clause (E)) then
Apply_Address_Clause_Check (E, N);
end if;
-- Analyze actions in freeze node, if any
if Present (Actions (N)) then
declare
Act : Node_Id;
begin
Act := First (Actions (N));
while Present (Act) loop
Analyze (Act);
Next (Act);
end loop;
end;
end if;
-- If initialization statements have been captured in a compound
-- statement, insert them back into the tree now.
Explode_Initialization_Compound_Statement (E);
return;
-- Only other items requiring any front end action are types and
-- subprograms.
elsif not Is_Type (E) and then not Is_Subprogram (E) then
return;
end if;
-- Here E is a type or a subprogram
E_Scope := Scope (E);
-- This is an error protection against previous errors
if No (E_Scope) then
Check_Error_Detected;
return;
end if;
-- The entity may be a subtype declared for a constrained record
-- component, in which case the relevant scope is the scope of
-- the record. This happens for class-wide subtypes created for
-- a constrained type extension with inherited discriminants.
if Is_Type (E_Scope)
and then Ekind (E_Scope) not in Concurrent_Kind
then
E_Scope := Scope (E_Scope);
end if;
-- Remember that we are processing a freezing entity and its freezing
-- nodes. This flag (non-zero = set) is used to avoid the need of
-- climbing through the tree while processing the freezing actions (ie.
-- to avoid generating spurious warnings or to avoid killing constant
-- indications while processing the code associated with freezing
-- actions). We use a counter to deal with nesting.
Inside_Freezing_Actions := Inside_Freezing_Actions + 1;
-- If we are freezing entities defined in protected types, they belong
-- in the enclosing scope, given that the original type has been
-- expanded away. The same is true for entities in task types, in
-- particular the parameter records of entries (Entities in bodies are
-- all frozen within the body). If we are in the task body, this is a
-- proper scope. If we are within a subprogram body, the proper scope
-- is the corresponding spec. This may happen for itypes generated in
-- the bodies of protected operations.
if Ekind (E_Scope) = E_Protected_Type
or else (Ekind (E_Scope) = E_Task_Type
and then not Has_Completion (E_Scope))
then
E_Scope := Scope (E_Scope);
elsif Ekind (E_Scope) = E_Subprogram_Body then
E_Scope := Corresponding_Spec (Unit_Declaration_Node (E_Scope));
end if;
-- If the scope of the entity is in open scopes, it is the current one
-- or an enclosing one, including a loop, a block, or a subprogram.
if In_Open_Scopes (E_Scope) then
In_Other_Scope := False;
In_Outer_Scope := E_Scope /= Current_Scope;
-- Otherwise it is a local package or a different compilation unit
else
In_Other_Scope := True;
In_Outer_Scope := False;
end if;
-- If the entity being frozen is defined in a scope that is not
-- currently on the scope stack, we must establish the proper
-- visibility before freezing the entity and related subprograms.
if In_Other_Scope then
Push_Scope (E_Scope);
-- Finalizers are little odd in terms of freezing. The spec of the
-- procedure appears in the declarations while the body appears in
-- the statement part of a single construct. Since the finalizer must
-- be called by the At_End handler of the construct, the spec is
-- manually frozen right after its declaration. The only side effect
-- of this action appears in contexts where the construct is not in
-- its final resting place. These contexts are:
-- * Entry bodies - The declarations and statements are moved to
-- the procedure equivalen of the entry.
-- * Protected subprograms - The declarations and statements are
-- moved to the non-protected version of the subprogram.
-- * Task bodies - The declarations and statements are moved to the
-- task body procedure.
-- Visible declarations do not need to be installed in these three
-- cases since it does not make semantic sense to do so. All entities
-- referenced by a finalizer are visible and already resolved, plus
-- the enclosing scope may not have visible declarations at all.
if Ekind (E) = E_Procedure
and then Is_Finalizer (E)
and then
(Is_Entry (E_Scope)
or else (Is_Subprogram (E_Scope)
and then Is_Protected_Type (Scope (E_Scope)))
or else Is_Task_Type (E_Scope))
then
null;
else
Install_Visible_Declarations (E_Scope);
end if;
if Is_Package_Or_Generic_Package (E_Scope) or else
Is_Protected_Type (E_Scope) or else
Is_Task_Type (E_Scope)
then
Install_Private_Declarations (E_Scope);
end if;
-- If the entity is in an outer scope, then that scope needs to
-- temporarily become the current scope so that operations created
-- during type freezing will be declared in the right scope and
-- can properly override any corresponding inherited operations.
elsif In_Outer_Scope then
Push_Scope (E_Scope);
end if;
-- If type, freeze the type
if Is_Type (E) then
Delete := Freeze_Type (N);
-- And for enumeration type, build the enumeration tables
if Is_Enumeration_Type (E) then
Build_Enumeration_Image_Tables (E, N);
end if;
-- If subprogram, freeze the subprogram
elsif Is_Subprogram (E) then
Exp_Ch6.Freeze_Subprogram (N);
-- Ada 2005 (AI-251): Remove the freezing node associated with the
-- entities internally used by the frontend to register primitives
-- covering abstract interfaces. The call to Freeze_Subprogram has
-- already expanded the code that fills the corresponding entry in
-- its secondary dispatch table and therefore the code generator
-- has nothing else to do with this freezing node.
Delete := Present (Interface_Alias (E));
end if;
-- Analyze actions generated by freezing. The init_proc contains source
-- expressions that may raise Constraint_Error, and the assignment
-- procedure for complex types needs checks on individual component
-- assignments, but all other freezing actions should be compiled with
-- all checks off.
if Present (Actions (N)) then
Decl := First (Actions (N));
while Present (Decl) loop
if Nkind (Decl) = N_Subprogram_Body
and then (Is_Init_Proc (Defining_Entity (Decl))
or else
Chars (Defining_Entity (Decl)) = Name_uAssign)
then
Analyze (Decl);
-- A subprogram body created for a renaming_as_body completes
-- a previous declaration, which may be in a different scope.
-- Establish the proper scope before analysis.
elsif Nkind (Decl) = N_Subprogram_Body
and then Present (Corresponding_Spec (Decl))
and then Scope (Corresponding_Spec (Decl)) /= Current_Scope
then
Push_Scope (Scope (Corresponding_Spec (Decl)));
Analyze (Decl, Suppress => All_Checks);
Pop_Scope;
-- We treat generated equality specially, if validity checks are
-- enabled, in order to detect components default-initialized
-- with invalid values.
elsif Nkind (Decl) = N_Subprogram_Body
and then Chars (Defining_Entity (Decl)) = Name_Op_Eq
and then Validity_Checks_On
and then Initialize_Scalars
then
declare
Save_Force : constant Boolean := Force_Validity_Checks;
begin
Force_Validity_Checks := True;
Analyze (Decl);
Force_Validity_Checks := Save_Force;
end;
-- All other freezing actions
else
Analyze (Decl, Suppress => All_Checks);
end if;
Next (Decl);
end loop;
end if;
-- If we are to delete this N_Freeze_Entity, do so by rewriting so that
-- a loop on all nodes being inserted will work propertly.
if Delete then
Rewrite (N, Make_Null_Statement (Sloc (N)));
end if;
-- Pop scope if we installed one for the analysis
if In_Other_Scope then
if Ekind (Current_Scope) = E_Package then
End_Package_Scope (E_Scope);
else
End_Scope;
end if;
elsif In_Outer_Scope then
Pop_Scope;
end if;
-- Restore previous value of the nesting-level counter that records
-- whether we are inside a (possibly nested) call to this procedure.
Inside_Freezing_Actions := Inside_Freezing_Actions - 1;
end Expand_N_Freeze_Entity;
-------------------------------------------
-- Expand_N_Record_Representation_Clause --
-------------------------------------------
-- The only expansion required is for the case of a mod clause present,
-- which is removed, and translated into an alignment representation
-- clause inserted immediately after the record rep clause with any
-- initial pragmas inserted at the start of the component clause list.
procedure Expand_N_Record_Representation_Clause (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Rectype : constant Entity_Id := Entity (Identifier (N));
Mod_Val : Uint;
Citems : List_Id;
Repitem : Node_Id;
AtM_Nod : Node_Id;
begin
if Present (Mod_Clause (N)) and then not Ignore_Rep_Clauses then
Mod_Val := Expr_Value (Expression (Mod_Clause (N)));
Citems := Pragmas_Before (Mod_Clause (N));
if Present (Citems) then
Append_List_To (Citems, Component_Clauses (N));
Set_Component_Clauses (N, Citems);
end if;
AtM_Nod :=
Make_Attribute_Definition_Clause (Loc,
Name => New_Occurrence_Of (Base_Type (Rectype), Loc),
Chars => Name_Alignment,
Expression => Make_Integer_Literal (Loc, Mod_Val));
Set_From_At_Mod (AtM_Nod);
Insert_After (N, AtM_Nod);
Set_Mod_Clause (N, Empty);
end if;
-- If the record representation clause has no components, then
-- completely remove it. Note that we also have to remove
-- ourself from the Rep Item list.
if Is_Empty_List (Component_Clauses (N)) then
if First_Rep_Item (Rectype) = N then
Set_First_Rep_Item (Rectype, Next_Rep_Item (N));
else
Repitem := First_Rep_Item (Rectype);
while Present (Next_Rep_Item (Repitem)) loop
if Next_Rep_Item (Repitem) = N then
Set_Next_Rep_Item (Repitem, Next_Rep_Item (N));
exit;
end if;
Next_Rep_Item (Repitem);
end loop;
end if;
Rewrite (N,
Make_Null_Statement (Loc));
end if;
end Expand_N_Record_Representation_Clause;
end Exp_Ch13;
|
with ZMQ.Sockets;
with ZMQ.Contexts;
with ZMQ.Messages;
with Ada.Text_IO; use Ada.Text_IO;
procedure ZMQ.examples.Client is
ctx : ZMQ.Contexts.Context;
s : ZMQ.Sockets.Socket;
begin
-- Initialise 0MQ context, requesting a single application thread
-- and a single I/O thread
ctx.Initialize (1);
-- Create a ZMQ_REP socket to receive requests and send replies
s.Initialize (ctx, Sockets.REQ);
-- Bind to the TCP transport and port 5555 on the 'lo' interface
s.Connect ("tcp://localhost:5555");
for i in 1 .. 10 loop
declare
query_string : constant String := "SELECT * FROM mytable";
query : ZMQ.Messages.Message;
begin
query.Initialize (query_string & "(" & i'Img & ");");
s.Send (query);
query.Finalize;
end;
declare
resultset : ZMQ.Messages.Message;
begin
resultset.Initialize;
s.recv (resultset);
Put_Line ('"' & resultset.getData & '"');
resultset.Finalize;
end;
end loop;
end ZMQ.Examples.Client;
|
pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with processor_hpp;
with memory_hpp;
with lcd_hpp;
with timer_handler_hpp;
with Interfaces.C.Extensions;
with word_operations_hpp;
package gameboy_hpp is
package Class_Gameboy is
type Gameboy is limited record
p : aliased processor_hpp.Class_Processor.Processor; -- gameboy.hpp:43
mem : aliased memory_hpp.Class_Memory.Memory; -- gameboy.hpp:44
the_lcd : aliased lcd_hpp.Class_LCD.LCD; -- gameboy.hpp:45
timers : aliased timer_handler_hpp.Class_TimerHandler.TimerHandler; -- gameboy.hpp:46
running : aliased Extensions.bool; -- gameboy.hpp:48
keys : aliased word_operations_hpp.uint8_t; -- gameboy.hpp:49
end record;
pragma Import (CPP, Gameboy);
function New_Gameboy return Gameboy; -- gameboy.hpp:18
pragma CPP_Constructor (New_Gameboy, "_ZN7GameboyC1Ev");
procedure step (this : access Gameboy; s : access unsigned_char); -- gameboy.hpp:21
pragma Import (CPP, step, "_ZN7Gameboy4stepEPh");
procedure changeGame (this : access Gameboy; game : access word_operations_hpp.uint8_t); -- gameboy.hpp:23
pragma Import (CPP, changeGame, "_ZN7Gameboy10changeGameEPh");
function isRunning (this : access Gameboy) return Extensions.bool; -- gameboy.hpp:25
pragma Import (CPP, isRunning, "_ZN7Gameboy9isRunningEv");
procedure stop (this : access Gameboy); -- gameboy.hpp:26
pragma Import (CPP, stop, "_ZN7Gameboy4stopEv");
function readyToLaunch (this : access Gameboy) return Extensions.bool; -- gameboy.hpp:30
pragma Import (CPP, readyToLaunch, "_ZN7Gameboy13readyToLaunchEv");
procedure setKeys (this : access Gameboy; value : word_operations_hpp.uint8_t); -- gameboy.hpp:34
pragma Import (CPP, setKeys, "_ZN7Gameboy7setKeysEh");
procedure setJoypadInterrupt (this : access Gameboy); -- gameboy.hpp:36
pragma Import (CPP, setJoypadInterrupt, "_ZN7Gameboy18setJoypadInterruptEv");
procedure wireComponents (this : access Gameboy); -- gameboy.hpp:38
pragma Import (CPP, wireComponents, "_ZN7Gameboy14wireComponentsEv");
procedure clockCycle (this : access Gameboy); -- gameboy.hpp:39
pragma Import (CPP, clockCycle, "_ZN7Gameboy10clockCycleEv");
procedure checkKeys (this : access Gameboy; atomic : word_operations_hpp.uint8_t); -- gameboy.hpp:40
pragma Import (CPP, checkKeys, "_ZN7Gameboy9checkKeysEh");
procedure interruptJOYPAD (this : access Gameboy); -- gameboy.hpp:41
pragma Import (CPP, interruptJOYPAD, "_ZN7Gameboy15interruptJOYPADEv");
end;
use Class_Gameboy;
end gameboy_hpp;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . S T R I N G _ O P S _ C O N C A T _ 4 --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- 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 contains the function for concatenating four strings
-- NOTE: This package is obsolescent. It is no longer used by the compiler
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
pragma Compiler_Unit_Warning;
package System.String_Ops_Concat_4 is
pragma Pure;
function Str_Concat_4 (S1, S2, S3, S4 : String) return String;
-- Concatenate four strings and return resulting string
end System.String_Ops_Concat_4;
|
-- MIT License
--
-- Copyright (c) 2020 Max Reznik
--
-- 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 PB_Support.Vectors;
package PB_Support.Boolean_Vectors is new PB_Support.Vectors (Boolean);
pragma Preelaborate (PB_Support.Boolean_Vectors);
|
with Ada.Exception_Identification.From_Here;
with System.Address_To_Named_Access_Conversions;
with System.Standard_Allocators;
with System.Storage_Elements;
with System.Zero_Terminated_WStrings;
with C.string;
with C.winerror;
package body System.Native_Directories.Volumes is
use Ada.Exception_Identification.From_Here;
use type File_Size;
use type Storage_Elements.Storage_Offset;
use type C.size_t;
use type C.windef.DWORD;
use type C.windef.WINBOOL;
use type C.winnt.LPWSTR;
use type C.winnt.HANDLE; -- C.void_ptr
use type C.winnt.WCHAR;
package LPWSTR_Conv is
new Address_To_Named_Access_Conversions (C.winnt.WCHAR, C.winnt.LPWSTR);
procedure GetVolumeInformation (
FS : aliased in out File_System;
FileSystemNameBuffer : C.winnt.LPWSTR;
FileSystemNameSize : C.windef.DWORD);
procedure GetVolumeInformation (
FS : aliased in out File_System;
FileSystemNameBuffer : C.winnt.LPWSTR;
FileSystemNameSize : C.windef.DWORD) is
begin
if FileSystemNameBuffer /= null or else not FS.Valid then
if C.winbase.GetVolumeInformation (
FS.Root_Path,
null,
0,
FS.VolumeSerialNumber'Access,
null,
FS.FileSystemFlags'Access,
FileSystemNameBuffer,
FileSystemNameSize) =
C.windef.FALSE
then
Raise_Exception (IO_Exception_Id (C.winbase.GetLastError));
end if;
FS.Valid := True;
-- save NTFS or not
if not FS.Is_NTFS_Valid and then FileSystemNameBuffer /= null then
declare
NTFS : constant C.winnt.WCHAR_array (0 .. 4) := (
C.winnt.WCHAR'Val (Wide_Character'Pos ('N')),
C.winnt.WCHAR'Val (Wide_Character'Pos ('T')),
C.winnt.WCHAR'Val (Wide_Character'Pos ('F')),
C.winnt.WCHAR'Val (Wide_Character'Pos ('S')),
C.winnt.WCHAR'Val (0));
FileSystem_All : C.winnt.WCHAR_array (0 .. 4); -- at least
for FileSystem_All'Address use
LPWSTR_Conv.To_Address (FileSystemNameBuffer);
begin
FS.Is_NTFS := FileSystem_All (0) = NTFS (0)
and then FileSystem_All (1) = NTFS (1)
and then FileSystem_All (2) = NTFS (2)
and then FileSystem_All (3) = NTFS (3)
and then FileSystem_All (4) = NTFS (4);
end;
FS.Is_NTFS_Valid := True;
end if;
end if;
end GetVolumeInformation;
-- implementation
function Is_Assigned (FS : File_System) return Boolean is
begin
return FS.Root_Path /= null;
end Is_Assigned;
procedure Get (Name : String; FS : aliased out File_System) is
W_Name : aliased C.winnt.WCHAR_array (
0 ..
Name'Length * Zero_Terminated_WStrings.Expanding);
Root_Path : aliased C.winnt.WCHAR_array (0 .. C.windef.MAX_PATH - 1);
Root_Path_Length : C.size_t;
begin
Zero_Terminated_WStrings.To_C (Name, W_Name (0)'Access);
if C.winbase.GetVolumePathName (
W_Name (0)'Access,
Root_Path (0)'Access,
Root_Path'Length) =
C.windef.FALSE
then
Raise_Exception (Named_IO_Exception_Id (C.winbase.GetLastError));
end if;
Root_Path_Length := C.string.wcslen (Root_Path (0)'Access);
declare
Dest : constant Address :=
Standard_Allocators.Allocate (
(Storage_Elements.Storage_Offset (Root_Path_Length) + 1)
* (C.winnt.WCHAR'Size / Standard'Storage_Unit));
Dest_All : C.winnt.WCHAR_array (0 .. Root_Path_Length);
for Dest_All'Address use Dest;
begin
FS.Root_Path_Length := Root_Path_Length;
Dest_All := Root_Path (0 .. Root_Path_Length);
FS.Root_Path := LPWSTR_Conv.To_Pointer (Dest);
end;
FS.Valid := False;
FS.Is_NTFS_Valid := False;
end Get;
procedure Finalize (FS : in out File_System) is
begin
Standard_Allocators.Free (LPWSTR_Conv.To_Address (FS.Root_Path));
end Finalize;
function Size (FS : File_System) return File_Size is
FreeBytesAvailable : aliased C.winnt.ULARGE_INTEGER;
TotalNumberOfBytes : aliased C.winnt.ULARGE_INTEGER;
begin
if C.winbase.GetDiskFreeSpaceEx (
FS.Root_Path,
FreeBytesAvailable'Access,
TotalNumberOfBytes'Access,
null) =
C.windef.FALSE
then
Raise_Exception (IO_Exception_Id (C.winbase.GetLastError));
end if;
return File_Size (TotalNumberOfBytes.QuadPart);
end Size;
function Free_Space (FS : File_System) return File_Size is
FreeBytesAvailable : aliased C.winnt.ULARGE_INTEGER;
TotalNumberOfBytes : aliased C.winnt.ULARGE_INTEGER;
begin
if C.winbase.GetDiskFreeSpaceEx (
FS.Root_Path,
FreeBytesAvailable'Access,
TotalNumberOfBytes'Access,
null) =
C.windef.FALSE
then
Raise_Exception (IO_Exception_Id (C.winbase.GetLastError));
end if;
return File_Size (FreeBytesAvailable.QuadPart);
end Free_Space;
function Format_Name (FS : aliased in out File_System) return String is
FileSystem : aliased C.winnt.WCHAR_array (0 .. C.windef.MAX_PATH - 1);
begin
GetVolumeInformation (
FS,
FileSystem (0)'Unchecked_Access,
FileSystem'Length);
return Zero_Terminated_WStrings.Value (FileSystem (0)'Access);
end Format_Name;
function Directory (FS : File_System) return String is
begin
return Zero_Terminated_WStrings.Value (
FS.Root_Path,
FS.Root_Path_Length);
end Directory;
function Device (FS : File_System) return String is
VolumeName : aliased C.winnt.WCHAR_array (0 .. C.windef.MAX_PATH - 1);
begin
if C.winbase.GetVolumeNameForVolumeMountPoint (
FS.Root_Path,
VolumeName (0)'Access,
VolumeName'Length) =
C.windef.FALSE
then
declare
Error : constant C.windef.DWORD := C.winbase.GetLastError;
begin
case Error is
when C.winerror.ERROR_PATH_NOT_FOUND =>
-- is it a network drive ?
-- should it call WNetGetConnection32 to get the UNC path?
Raise_Exception (Name_Error'Identity);
when others =>
Raise_Exception (IO_Exception_Id (Error));
end case;
end;
end if;
return Zero_Terminated_WStrings.Value (VolumeName (0)'Access);
end Device;
function Case_Preserving (FS : aliased in out File_System) return Boolean is
begin
GetVolumeInformation (FS, null, 0);
return (FS.FileSystemFlags and C.winbase.FS_CASE_IS_PRESERVED) /= 0;
end Case_Preserving;
function Case_Sensitive (FS : aliased in out File_System) return Boolean is
begin
if FS.Is_NTFS_Valid then
-- GetVolumeInformation reports FS_CASE_SENSITIVE at NTFS
-- though NTFS is case insensitive in the truth.
if FS.Is_NTFS then
return False;
else
GetVolumeInformation (FS, null, 0);
return (FS.FileSystemFlags and C.winbase.FS_CASE_SENSITIVE) /= 0;
end if;
else
declare
FileSystem : aliased
C.winnt.WCHAR_array (0 .. C.windef.MAX_PATH - 1);
begin
GetVolumeInformation (
FS,
FileSystem (0)'Unchecked_Access,
FileSystem'Length);
end;
return (FS.FileSystemFlags and C.winbase.FS_CASE_SENSITIVE) /= 0
and then not FS.Is_NTFS;
end if;
end Case_Sensitive;
function Identity (FS : aliased in out File_System) return File_System_Id is
begin
GetVolumeInformation (FS, null, 0);
return FS.VolumeSerialNumber;
end Identity;
end System.Native_Directories.Volumes;
|
-- ////////////////////////////////////////////////////////////
-- //
-- // SFML - Simple and Fast Multimedia Library
-- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
-- //
-- // This software is provided 'as-is', without any express or implied warranty.
-- // In no event will the authors be held liable for any damages arising from the use of this software.
-- //
-- // Permission is granted to anyone to use this software for any purpose,
-- // including commercial applications, and to alter it and redistribute it freely,
-- // subject to the following restrictions:
-- //
-- // 1. The origin of this software must not be misrepresented;
-- // you must not claim that you wrote the original software.
-- // If you use this software in a product, an acknowledgment
-- // in the product documentation would be appreciated but is not required.
-- //
-- // 2. Altered source versions must be plainly marked as such,
-- // and must not be misrepresented as being the original software.
-- //
-- // 3. This notice may not be removed or altered from any source distribution.
-- //
-- ////////////////////////////////////////////////////////////
-- ////////////////////////////////////////////////////////////
-- // Headers
-- ////////////////////////////////////////////////////////////
with Sf.Graphics.Rect;
with Sf.Graphics.Types;
package Sf.Graphics.View is
use Sf.Graphics.Rect;
use Sf.Graphics.Types;
-- ////////////////////////////////////////////////////////////
-- /// Construct a default view (1000x1000)
-- ///
-- ////////////////////////////////////////////////////////////
function sfView_Create return sfView_Ptr;
-- ////////////////////////////////////////////////////////////
-- /// Construct a view from a rectangle
-- ///
-- /// \param Rect : Rectangle defining the bounds of the view
-- ///
-- ////////////////////////////////////////////////////////////
function sfView_CreateFromRect (Rect : sfFloatRect) return sfView_Ptr;
-- ////////////////////////////////////////////////////////////
-- /// Destroy an existing view
-- ///
-- /// \param View : View to destroy
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfView_Destroy (View : sfView_Ptr);
-- ////////////////////////////////////////////////////////////
-- /// Change the center of a view
-- ///
-- /// \param View : View to modify
-- /// \param X : X coordinate of the new center
-- /// \param Y : Y coordinate of the new center
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfView_SetCenter (View : sfView_Ptr; X, Y : Float);
-- ////////////////////////////////////////////////////////////
-- /// Change the half-size of a view
-- ///
-- /// \param View : View to modify
-- /// \param HalfWidth : New half-width
-- /// \param HalfHeight : New half-height
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfView_SetHalfSize (View : sfView_Ptr; HalfWidth, HalfHeight : Float);
-- ////////////////////////////////////////////////////////////
-- /// Rebuild a view from a rectangle
-- ///
-- /// \param View : View to modify
-- /// \param ViewRect : Rectangle defining the position and size of the view
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfView_SetFromRect (View : sfView_Ptr; ViewRect : sfFloatRect);
-- ////////////////////////////////////////////////////////////
-- /// Get the X coordinate of the center of a view
-- ///
-- /// \param View : View to read
-- ///
-- /// \return X coordinate of the center of the view
-- ///
-- ////////////////////////////////////////////////////////////
function sfView_GetCenterX (View : sfView_Ptr) return Float;
-- ////////////////////////////////////////////////////////////
-- /// Get the Y coordinate of the center of a view
-- ///
-- /// \param View : View to read
-- ///
-- /// \return Y coordinate of the center of the view
-- ///
-- ////////////////////////////////////////////////////////////
function sfView_GetCenterY (View : sfView_Ptr) return Float;
-- ////////////////////////////////////////////////////////////
-- /// Get the half-width of the view
-- ///
-- /// \param View : View to read
-- ///
-- /// \return Half-width of the view
-- ///
-- ////////////////////////////////////////////////////////////
function sfView_GetHalfSizeX (View : sfView_Ptr) return Float;
-- ////////////////////////////////////////////////////////////
-- /// Get the half-height of the view
-- ///
-- /// \param View : View to read
-- ///
-- /// \return Half-height of the view
-- ///
-- ////////////////////////////////////////////////////////////
function sfView_GetHalfSizeY (View : sfView_Ptr) return Float;
-- ////////////////////////////////////////////////////////////
-- /// Get the bounding rectangle of a view
-- ///
-- /// \param View : View to read
-- ///
-- /// \return Bounding rectangle of the view
-- ///
-- ////////////////////////////////////////////////////////////
function sfView_GetRect (View : sfView_Ptr) return sfFloatRect;
-- ////////////////////////////////////////////////////////////
-- /// Move a view
-- ///
-- /// \param View : View to move
-- /// \param OffsetX : Offset to move the view, on X axis
-- /// \param OffsetY : Offset to move the view, on Y axis
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfView_Move (View : sfView_Ptr; OffsetX, OffsetY : Float);
-- ////////////////////////////////////////////////////////////
-- /// Resize a view rectangle to simulate a zoom / unzoom effect
-- ///
-- /// \param View : View to zoom
-- /// \param Factor : Zoom factor to apply, relative to the current zoom
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfView_Zoom (View : sfView_Ptr; Factor : Float);
private
pragma Import (C, sfView_Create, "sfView_Create");
pragma Import (C, sfView_CreateFromRect, "sfView_CreateFromRect");
pragma Import (C, sfView_Destroy, "sfView_Destroy");
pragma Import (C, sfView_SetCenter, "sfView_SetCenter");
pragma Import (C, sfView_SetHalfSize, "sfView_SetHalfSize");
pragma Import (C, sfView_SetFromRect, "sfView_SetFromRect");
pragma Import (C, sfView_GetCenterX, "sfView_GetCenterX");
pragma Import (C, sfView_GetCenterY, "sfView_GetCenterY");
pragma Import (C, sfView_GetHalfSizeX, "sfView_GetHalfSizeX");
pragma Import (C, sfView_GetHalfSizeY, "sfView_GetHalfSizeY");
pragma Import (C, sfView_GetRect, "sfView_GetRect");
pragma Import (C, sfView_Move, "sfView_Move");
pragma Import (C, sfView_Zoom, "sfView_Zoom");
end Sf.Graphics.View;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . --
-- I N D E F I N I T E _ O R D E R E D _ S E T S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 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. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with Ada.Containers.Red_Black_Trees.Generic_Operations;
pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Operations);
with Ada.Containers.Red_Black_Trees.Generic_Keys;
pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Keys);
with Ada.Containers.Red_Black_Trees.Generic_Set_Operations;
pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Set_Operations);
with Ada.Unchecked_Deallocation;
package body Ada.Containers.Indefinite_Ordered_Sets is
-----------------------
-- Local Subprograms --
-----------------------
function Color (Node : Node_Access) return Color_Type;
pragma Inline (Color);
function Copy_Node (Source : Node_Access) return Node_Access;
pragma Inline (Copy_Node);
procedure Free (X : in out Node_Access);
procedure Insert_Sans_Hint
(Tree : in out Tree_Type;
New_Item : Element_Type;
Node : out Node_Access;
Inserted : out Boolean);
procedure Insert_With_Hint
(Dst_Tree : in out Tree_Type;
Dst_Hint : Node_Access;
Src_Node : Node_Access;
Dst_Node : out Node_Access);
function Is_Greater_Element_Node
(Left : Element_Type;
Right : Node_Access) return Boolean;
pragma Inline (Is_Greater_Element_Node);
function Is_Less_Element_Node
(Left : Element_Type;
Right : Node_Access) return Boolean;
pragma Inline (Is_Less_Element_Node);
function Is_Less_Node_Node (L, R : Node_Access) return Boolean;
pragma Inline (Is_Less_Node_Node);
function Left (Node : Node_Access) return Node_Access;
pragma Inline (Left);
function Parent (Node : Node_Access) return Node_Access;
pragma Inline (Parent);
procedure Replace_Element
(Tree : in out Tree_Type;
Node : Node_Access;
Item : Element_Type);
function Right (Node : Node_Access) return Node_Access;
pragma Inline (Right);
procedure Set_Color (Node : Node_Access; Color : Color_Type);
pragma Inline (Set_Color);
procedure Set_Left (Node : Node_Access; Left : Node_Access);
pragma Inline (Set_Left);
procedure Set_Parent (Node : Node_Access; Parent : Node_Access);
pragma Inline (Set_Parent);
procedure Set_Right (Node : Node_Access; Right : Node_Access);
pragma Inline (Set_Right);
--------------------------
-- Local Instantiations --
--------------------------
procedure Free_Element is
new Ada.Unchecked_Deallocation (Element_Type, Element_Access);
package Tree_Operations is
new Red_Black_Trees.Generic_Operations (Tree_Types);
procedure Delete_Tree is
new Tree_Operations.Generic_Delete_Tree (Free);
function Copy_Tree is
new Tree_Operations.Generic_Copy_Tree (Copy_Node, Delete_Tree);
use Tree_Operations;
package Element_Keys is
new Red_Black_Trees.Generic_Keys
(Tree_Operations => Tree_Operations,
Key_Type => Element_Type,
Is_Less_Key_Node => Is_Less_Element_Node,
Is_Greater_Key_Node => Is_Greater_Element_Node);
package Set_Ops is
new Generic_Set_Operations
(Tree_Operations => Tree_Operations,
Insert_With_Hint => Insert_With_Hint,
Copy_Tree => Copy_Tree,
Delete_Tree => Delete_Tree,
Is_Less => Is_Less_Node_Node,
Free => Free);
---------
-- "<" --
---------
function "<" (Left, Right : Cursor) return Boolean is
begin
if Left.Node = null then
raise Constraint_Error with "Left cursor equals No_Element";
end if;
if Right.Node = null then
raise Constraint_Error with "Right cursor equals No_Element";
end if;
if Left.Node.Element = null then
raise Program_Error with "Left cursor is bad";
end if;
if Right.Node.Element = null then
raise Program_Error with "Right cursor is bad";
end if;
pragma Assert (Vet (Left.Container.Tree, Left.Node),
"bad Left cursor in ""<""");
pragma Assert (Vet (Right.Container.Tree, Right.Node),
"bad Right cursor in ""<""");
return Left.Node.Element.all < Right.Node.Element.all;
end "<";
function "<" (Left : Cursor; Right : Element_Type) return Boolean is
begin
if Left.Node = null then
raise Constraint_Error with "Left cursor equals No_Element";
end if;
if Left.Node.Element = null then
raise Program_Error with "Left cursor is bad";
end if;
pragma Assert (Vet (Left.Container.Tree, Left.Node),
"bad Left cursor in ""<""");
return Left.Node.Element.all < Right;
end "<";
function "<" (Left : Element_Type; Right : Cursor) return Boolean is
begin
if Right.Node = null then
raise Constraint_Error with "Right cursor equals No_Element";
end if;
if Right.Node.Element = null then
raise Program_Error with "Right cursor is bad";
end if;
pragma Assert (Vet (Right.Container.Tree, Right.Node),
"bad Right cursor in ""<""");
return Left < Right.Node.Element.all;
end "<";
---------
-- "=" --
---------
function "=" (Left, Right : Set) return Boolean is
function Is_Equal_Node_Node (L, R : Node_Access) return Boolean;
pragma Inline (Is_Equal_Node_Node);
function Is_Equal is
new Tree_Operations.Generic_Equal (Is_Equal_Node_Node);
------------------------
-- Is_Equal_Node_Node --
------------------------
function Is_Equal_Node_Node (L, R : Node_Access) return Boolean is
begin
return L.Element.all = R.Element.all;
end Is_Equal_Node_Node;
-- Start of processing for "="
begin
return Is_Equal (Left.Tree, Right.Tree);
end "=";
---------
-- ">" --
---------
function ">" (Left, Right : Cursor) return Boolean is
begin
if Left.Node = null then
raise Constraint_Error with "Left cursor equals No_Element";
end if;
if Right.Node = null then
raise Constraint_Error with "Right cursor equals No_Element";
end if;
if Left.Node.Element = null then
raise Program_Error with "Left cursor is bad";
end if;
if Right.Node.Element = null then
raise Program_Error with "Right cursor is bad";
end if;
pragma Assert (Vet (Left.Container.Tree, Left.Node),
"bad Left cursor in "">""");
pragma Assert (Vet (Right.Container.Tree, Right.Node),
"bad Right cursor in "">""");
-- L > R same as R < L
return Right.Node.Element.all < Left.Node.Element.all;
end ">";
function ">" (Left : Cursor; Right : Element_Type) return Boolean is
begin
if Left.Node = null then
raise Constraint_Error with "Left cursor equals No_Element";
end if;
if Left.Node.Element = null then
raise Program_Error with "Left cursor is bad";
end if;
pragma Assert (Vet (Left.Container.Tree, Left.Node),
"bad Left cursor in "">""");
return Right < Left.Node.Element.all;
end ">";
function ">" (Left : Element_Type; Right : Cursor) return Boolean is
begin
if Right.Node = null then
raise Constraint_Error with "Right cursor equals No_Element";
end if;
if Right.Node.Element = null then
raise Program_Error with "Right cursor is bad";
end if;
pragma Assert (Vet (Right.Container.Tree, Right.Node),
"bad Right cursor in "">""");
return Right.Node.Element.all < Left;
end ">";
------------
-- Adjust --
------------
procedure Adjust is
new Tree_Operations.Generic_Adjust (Copy_Tree);
procedure Adjust (Container : in out Set) is
begin
Adjust (Container.Tree);
end Adjust;
-------------
-- Ceiling --
-------------
function Ceiling (Container : Set; Item : Element_Type) return Cursor is
Node : constant Node_Access :=
Element_Keys.Ceiling (Container.Tree, Item);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Ceiling;
-----------
-- Clear --
-----------
procedure Clear is
new Tree_Operations.Generic_Clear (Delete_Tree);
procedure Clear (Container : in out Set) is
begin
Clear (Container.Tree);
end Clear;
-----------
-- Color --
-----------
function Color (Node : Node_Access) return Color_Type is
begin
return Node.Color;
end Color;
--------------
-- Contains --
--------------
function Contains (Container : Set; Item : Element_Type) return Boolean is
begin
return Find (Container, Item) /= No_Element;
end Contains;
---------------
-- Copy_Node --
---------------
function Copy_Node (Source : Node_Access) return Node_Access is
Element : Element_Access := new Element_Type'(Source.Element.all);
begin
return new Node_Type'(Parent => null,
Left => null,
Right => null,
Color => Source.Color,
Element => Element);
exception
when others =>
Free_Element (Element);
raise;
end Copy_Node;
------------
-- Delete --
------------
procedure Delete (Container : in out Set; Position : in out Cursor) is
begin
if Position.Node = null then
raise Constraint_Error with "Position cursor equals No_Element";
end if;
if Position.Node.Element = null then
raise Program_Error with "Position cursor is bad";
end if;
if Position.Container /= Container'Unrestricted_Access then
raise Program_Error with "Position cursor designates wrong set";
end if;
pragma Assert (Vet (Container.Tree, Position.Node),
"bad cursor in Delete");
Tree_Operations.Delete_Node_Sans_Free (Container.Tree, Position.Node);
Free (Position.Node);
Position.Container := null;
end Delete;
procedure Delete (Container : in out Set; Item : Element_Type) is
X : Node_Access :=
Element_Keys.Find (Container.Tree, Item);
begin
if X = null then
raise Constraint_Error with "attempt to delete element not in set";
end if;
Tree_Operations.Delete_Node_Sans_Free (Container.Tree, X);
Free (X);
end Delete;
------------------
-- Delete_First --
------------------
procedure Delete_First (Container : in out Set) is
Tree : Tree_Type renames Container.Tree;
X : Node_Access := Tree.First;
begin
if X /= null then
Tree_Operations.Delete_Node_Sans_Free (Tree, X);
Free (X);
end if;
end Delete_First;
-----------------
-- Delete_Last --
-----------------
procedure Delete_Last (Container : in out Set) is
Tree : Tree_Type renames Container.Tree;
X : Node_Access := Tree.Last;
begin
if X /= null then
Tree_Operations.Delete_Node_Sans_Free (Tree, X);
Free (X);
end if;
end Delete_Last;
----------------
-- Difference --
----------------
procedure Difference (Target : in out Set; Source : Set) is
begin
Set_Ops.Difference (Target.Tree, Source.Tree);
end Difference;
function Difference (Left, Right : Set) return Set is
Tree : constant Tree_Type :=
Set_Ops.Difference (Left.Tree, Right.Tree);
begin
return Set'(Controlled with Tree);
end Difference;
-------------
-- Element --
-------------
function Element (Position : Cursor) return Element_Type is
begin
if Position.Node = null then
raise Constraint_Error with "Position cursor equals No_Element";
end if;
if Position.Node.Element = null then
raise Program_Error with "Position cursor is bad";
end if;
pragma Assert (Vet (Position.Container.Tree, Position.Node),
"bad cursor in Element");
return Position.Node.Element.all;
end Element;
-------------------------
-- Equivalent_Elements --
-------------------------
function Equivalent_Elements (Left, Right : Element_Type) return Boolean is
begin
if Left < Right
or else Right < Left
then
return False;
else
return True;
end if;
end Equivalent_Elements;
---------------------
-- Equivalent_Sets --
---------------------
function Equivalent_Sets (Left, Right : Set) return Boolean is
function Is_Equivalent_Node_Node (L, R : Node_Access) return Boolean;
pragma Inline (Is_Equivalent_Node_Node);
function Is_Equivalent is
new Tree_Operations.Generic_Equal (Is_Equivalent_Node_Node);
-----------------------------
-- Is_Equivalent_Node_Node --
-----------------------------
function Is_Equivalent_Node_Node (L, R : Node_Access) return Boolean is
begin
if L.Element.all < R.Element.all then
return False;
elsif R.Element.all < L.Element.all then
return False;
else
return True;
end if;
end Is_Equivalent_Node_Node;
-- Start of processing for Equivalent_Sets
begin
return Is_Equivalent (Left.Tree, Right.Tree);
end Equivalent_Sets;
-------------
-- Exclude --
-------------
procedure Exclude (Container : in out Set; Item : Element_Type) is
X : Node_Access :=
Element_Keys.Find (Container.Tree, Item);
begin
if X /= null then
Tree_Operations.Delete_Node_Sans_Free (Container.Tree, X);
Free (X);
end if;
end Exclude;
----------
-- Find --
----------
function Find (Container : Set; Item : Element_Type) return Cursor is
Node : constant Node_Access :=
Element_Keys.Find (Container.Tree, Item);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Find;
-----------
-- First --
-----------
function First (Container : Set) return Cursor is
begin
if Container.Tree.First = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Container.Tree.First);
end First;
-------------------
-- First_Element --
-------------------
function First_Element (Container : Set) return Element_Type is
begin
if Container.Tree.First = null then
raise Constraint_Error with "set is empty";
end if;
return Container.Tree.First.Element.all;
end First_Element;
-----------
-- Floor --
-----------
function Floor (Container : Set; Item : Element_Type) return Cursor is
Node : constant Node_Access :=
Element_Keys.Floor (Container.Tree, Item);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Floor;
----------
-- Free --
----------
procedure Free (X : in out Node_Access) is
procedure Deallocate is
new Ada.Unchecked_Deallocation (Node_Type, Node_Access);
begin
if X = null then
return;
end if;
X.Parent := X;
X.Left := X;
X.Right := X;
begin
Free_Element (X.Element);
exception
when others =>
X.Element := null;
Deallocate (X);
raise;
end;
Deallocate (X);
end Free;
------------------
-- Generic_Keys --
------------------
package body Generic_Keys is
-----------------------
-- Local Subprograms --
-----------------------
function Is_Greater_Key_Node
(Left : Key_Type;
Right : Node_Access) return Boolean;
pragma Inline (Is_Greater_Key_Node);
function Is_Less_Key_Node
(Left : Key_Type;
Right : Node_Access) return Boolean;
pragma Inline (Is_Less_Key_Node);
--------------------------
-- Local Instantiations --
--------------------------
package Key_Keys is
new Red_Black_Trees.Generic_Keys
(Tree_Operations => Tree_Operations,
Key_Type => Key_Type,
Is_Less_Key_Node => Is_Less_Key_Node,
Is_Greater_Key_Node => Is_Greater_Key_Node);
-------------
-- Ceiling --
-------------
function Ceiling (Container : Set; Key : Key_Type) return Cursor is
Node : constant Node_Access :=
Key_Keys.Ceiling (Container.Tree, Key);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Ceiling;
--------------
-- Contains --
--------------
function Contains (Container : Set; Key : Key_Type) return Boolean is
begin
return Find (Container, Key) /= No_Element;
end Contains;
------------
-- Delete --
------------
procedure Delete (Container : in out Set; Key : Key_Type) is
X : Node_Access := Key_Keys.Find (Container.Tree, Key);
begin
if X = null then
raise Constraint_Error with "attempt to delete key not in set";
end if;
Tree_Operations.Delete_Node_Sans_Free (Container.Tree, X);
Free (X);
end Delete;
-------------
-- Element --
-------------
function Element (Container : Set; Key : Key_Type) return Element_Type is
Node : constant Node_Access :=
Key_Keys.Find (Container.Tree, Key);
begin
if Node = null then
raise Constraint_Error with "key not in set";
end if;
return Node.Element.all;
end Element;
---------------------
-- Equivalent_Keys --
---------------------
function Equivalent_Keys (Left, Right : Key_Type) return Boolean is
begin
if Left < Right
or else Right < Left
then
return False;
else
return True;
end if;
end Equivalent_Keys;
-------------
-- Exclude --
-------------
procedure Exclude (Container : in out Set; Key : Key_Type) is
X : Node_Access := Key_Keys.Find (Container.Tree, Key);
begin
if X /= null then
Tree_Operations.Delete_Node_Sans_Free (Container.Tree, X);
Free (X);
end if;
end Exclude;
----------
-- Find --
----------
function Find (Container : Set; Key : Key_Type) return Cursor is
Node : constant Node_Access :=
Key_Keys.Find (Container.Tree, Key);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Find;
-----------
-- Floor --
-----------
function Floor (Container : Set; Key : Key_Type) return Cursor is
Node : constant Node_Access :=
Key_Keys.Floor (Container.Tree, Key);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node);
end Floor;
-------------------------
-- Is_Greater_Key_Node --
-------------------------
function Is_Greater_Key_Node
(Left : Key_Type;
Right : Node_Access) return Boolean is
begin
return Key (Right.Element.all) < Left;
end Is_Greater_Key_Node;
----------------------
-- Is_Less_Key_Node --
----------------------
function Is_Less_Key_Node
(Left : Key_Type;
Right : Node_Access) return Boolean is
begin
return Left < Key (Right.Element.all);
end Is_Less_Key_Node;
---------
-- Key --
---------
function Key (Position : Cursor) return Key_Type is
begin
if Position.Node = null then
raise Constraint_Error with
"Position cursor equals No_Element";
end if;
if Position.Node.Element = null then
raise Program_Error with
"Position cursor is bad";
end if;
pragma Assert (Vet (Position.Container.Tree, Position.Node),
"bad cursor in Key");
return Key (Position.Node.Element.all);
end Key;
-------------
-- Replace --
-------------
procedure Replace
(Container : in out Set;
Key : Key_Type;
New_Item : Element_Type)
is
Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key);
begin
if Node = null then
raise Constraint_Error with
"attempt to replace key not in set";
end if;
Replace_Element (Container.Tree, Node, New_Item);
end Replace;
-----------------------------------
-- Update_Element_Preserving_Key --
-----------------------------------
procedure Update_Element_Preserving_Key
(Container : in out Set;
Position : Cursor;
Process : not null access
procedure (Element : in out Element_Type))
is
Tree : Tree_Type renames Container.Tree;
begin
if Position.Node = null then
raise Constraint_Error with "Position cursor equals No_Element";
end if;
if Position.Node.Element = null then
raise Program_Error with "Position cursor is bad";
end if;
if Position.Container /= Container'Unrestricted_Access then
raise Program_Error with "Position cursor designates wrong set";
end if;
pragma Assert (Vet (Container.Tree, Position.Node),
"bad cursor in Update_Element_Preserving_Key");
declare
E : Element_Type renames Position.Node.Element.all;
K : constant Key_Type := Key (E);
B : Natural renames Tree.Busy;
L : Natural renames Tree.Lock;
begin
B := B + 1;
L := L + 1;
begin
Process (E);
exception
when others =>
L := L - 1;
B := B - 1;
raise;
end;
L := L - 1;
B := B - 1;
if Equivalent_Keys (K, Key (E)) then
return;
end if;
end;
declare
X : Node_Access := Position.Node;
begin
Tree_Operations.Delete_Node_Sans_Free (Tree, X);
Free (X);
end;
raise Program_Error with "key was modified";
end Update_Element_Preserving_Key;
end Generic_Keys;
-----------------
-- Has_Element --
-----------------
function Has_Element (Position : Cursor) return Boolean is
begin
return Position /= No_Element;
end Has_Element;
-------------
-- Include --
-------------
procedure Include (Container : in out Set; New_Item : Element_Type) is
Position : Cursor;
Inserted : Boolean;
X : Element_Access;
begin
Insert (Container, New_Item, Position, Inserted);
if not Inserted then
if Container.Tree.Lock > 0 then
raise Program_Error with
"attempt to tamper with cursors (set is locked)";
end if;
X := Position.Node.Element;
Position.Node.Element := new Element_Type'(New_Item);
Free_Element (X);
end if;
end Include;
------------
-- Insert --
------------
procedure Insert
(Container : in out Set;
New_Item : Element_Type;
Position : out Cursor;
Inserted : out Boolean)
is
begin
Insert_Sans_Hint
(Container.Tree,
New_Item,
Position.Node,
Inserted);
Position.Container := Container'Unrestricted_Access;
end Insert;
procedure Insert (Container : in out Set; New_Item : Element_Type) is
Position : Cursor;
Inserted : Boolean;
begin
Insert (Container, New_Item, Position, Inserted);
if not Inserted then
raise Constraint_Error with
"attempt to insert element already in set";
end if;
end Insert;
----------------------
-- Insert_Sans_Hint --
----------------------
procedure Insert_Sans_Hint
(Tree : in out Tree_Type;
New_Item : Element_Type;
Node : out Node_Access;
Inserted : out Boolean)
is
function New_Node return Node_Access;
pragma Inline (New_Node);
procedure Insert_Post is
new Element_Keys.Generic_Insert_Post (New_Node);
procedure Conditional_Insert_Sans_Hint is
new Element_Keys.Generic_Conditional_Insert (Insert_Post);
--------------
-- New_Node --
--------------
function New_Node return Node_Access is
Element : Element_Access := new Element_Type'(New_Item);
begin
return new Node_Type'(Parent => null,
Left => null,
Right => null,
Color => Red_Black_Trees.Red,
Element => Element);
exception
when others =>
Free_Element (Element);
raise;
end New_Node;
-- Start of processing for Insert_Sans_Hint
begin
Conditional_Insert_Sans_Hint
(Tree,
New_Item,
Node,
Inserted);
end Insert_Sans_Hint;
----------------------
-- Insert_With_Hint --
----------------------
procedure Insert_With_Hint
(Dst_Tree : in out Tree_Type;
Dst_Hint : Node_Access;
Src_Node : Node_Access;
Dst_Node : out Node_Access)
is
Success : Boolean;
function New_Node return Node_Access;
procedure Insert_Post is
new Element_Keys.Generic_Insert_Post (New_Node);
procedure Insert_Sans_Hint is
new Element_Keys.Generic_Conditional_Insert (Insert_Post);
procedure Insert_With_Hint is
new Element_Keys.Generic_Conditional_Insert_With_Hint
(Insert_Post,
Insert_Sans_Hint);
--------------
-- New_Node --
--------------
function New_Node return Node_Access is
Element : Element_Access :=
new Element_Type'(Src_Node.Element.all);
Node : Node_Access;
begin
begin
Node := new Node_Type;
exception
when others =>
Free_Element (Element);
raise;
end;
Node.Element := Element;
return Node;
end New_Node;
-- Start of processing for Insert_With_Hint
begin
Insert_With_Hint
(Dst_Tree,
Dst_Hint,
Src_Node.Element.all,
Dst_Node,
Success);
end Insert_With_Hint;
------------------
-- Intersection --
------------------
procedure Intersection (Target : in out Set; Source : Set) is
begin
Set_Ops.Intersection (Target.Tree, Source.Tree);
end Intersection;
function Intersection (Left, Right : Set) return Set is
Tree : constant Tree_Type :=
Set_Ops.Intersection (Left.Tree, Right.Tree);
begin
return Set'(Controlled with Tree);
end Intersection;
--------------
-- Is_Empty --
--------------
function Is_Empty (Container : Set) return Boolean is
begin
return Container.Tree.Length = 0;
end Is_Empty;
-----------------------------
-- Is_Greater_Element_Node --
-----------------------------
function Is_Greater_Element_Node
(Left : Element_Type;
Right : Node_Access) return Boolean is
begin
-- e > node same as node < e
return Right.Element.all < Left;
end Is_Greater_Element_Node;
--------------------------
-- Is_Less_Element_Node --
--------------------------
function Is_Less_Element_Node
(Left : Element_Type;
Right : Node_Access) return Boolean is
begin
return Left < Right.Element.all;
end Is_Less_Element_Node;
-----------------------
-- Is_Less_Node_Node --
-----------------------
function Is_Less_Node_Node (L, R : Node_Access) return Boolean is
begin
return L.Element.all < R.Element.all;
end Is_Less_Node_Node;
---------------
-- Is_Subset --
---------------
function Is_Subset (Subset : Set; Of_Set : Set) return Boolean is
begin
return Set_Ops.Is_Subset (Subset => Subset.Tree, Of_Set => Of_Set.Tree);
end Is_Subset;
-------------
-- Iterate --
-------------
procedure Iterate
(Container : Set;
Process : not null access procedure (Position : Cursor))
is
procedure Process_Node (Node : Node_Access);
pragma Inline (Process_Node);
procedure Local_Iterate is
new Tree_Operations.Generic_Iteration (Process_Node);
------------------
-- Process_Node --
------------------
procedure Process_Node (Node : Node_Access) is
begin
Process (Cursor'(Container'Unrestricted_Access, Node));
end Process_Node;
T : Tree_Type renames Container.Tree'Unrestricted_Access.all;
B : Natural renames T.Busy;
-- Start of prccessing for Iterate
begin
B := B + 1;
begin
Local_Iterate (T);
exception
when others =>
B := B - 1;
raise;
end;
B := B - 1;
end Iterate;
----------
-- Last --
----------
function Last (Container : Set) return Cursor is
begin
if Container.Tree.Last = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Container.Tree.Last);
end Last;
------------------
-- Last_Element --
------------------
function Last_Element (Container : Set) return Element_Type is
begin
if Container.Tree.Last = null then
raise Constraint_Error with "set is empty";
end if;
return Container.Tree.Last.Element.all;
end Last_Element;
----------
-- Left --
----------
function Left (Node : Node_Access) return Node_Access is
begin
return Node.Left;
end Left;
------------
-- Length --
------------
function Length (Container : Set) return Count_Type is
begin
return Container.Tree.Length;
end Length;
----------
-- Move --
----------
procedure Move is
new Tree_Operations.Generic_Move (Clear);
procedure Move (Target : in out Set; Source : in out Set) is
begin
Move (Target => Target.Tree, Source => Source.Tree);
end Move;
----------
-- Next --
----------
procedure Next (Position : in out Cursor) is
begin
Position := Next (Position);
end Next;
function Next (Position : Cursor) return Cursor is
begin
if Position = No_Element then
return No_Element;
end if;
if Position.Node.Element = null then
raise Program_Error with "Position cursor is bad";
end if;
pragma Assert (Vet (Position.Container.Tree, Position.Node),
"bad cursor in Next");
declare
Node : constant Node_Access :=
Tree_Operations.Next (Position.Node);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Position.Container, Node);
end;
end Next;
-------------
-- Overlap --
-------------
function Overlap (Left, Right : Set) return Boolean is
begin
return Set_Ops.Overlap (Left.Tree, Right.Tree);
end Overlap;
------------
-- Parent --
------------
function Parent (Node : Node_Access) return Node_Access is
begin
return Node.Parent;
end Parent;
--------------
-- Previous --
--------------
procedure Previous (Position : in out Cursor) is
begin
Position := Previous (Position);
end Previous;
function Previous (Position : Cursor) return Cursor is
begin
if Position = No_Element then
return No_Element;
end if;
if Position.Node.Element = null then
raise Program_Error with "Position cursor is bad";
end if;
pragma Assert (Vet (Position.Container.Tree, Position.Node),
"bad cursor in Previous");
declare
Node : constant Node_Access :=
Tree_Operations.Previous (Position.Node);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Position.Container, Node);
end;
end Previous;
-------------------
-- Query_Element --
-------------------
procedure Query_Element
(Position : Cursor;
Process : not null access procedure (Element : Element_Type))
is
begin
if Position.Node = null then
raise Constraint_Error with "Position cursor equals No_Element";
end if;
if Position.Node.Element = null then
raise Program_Error with "Position cursor is bad";
end if;
pragma Assert (Vet (Position.Container.Tree, Position.Node),
"bad cursor in Query_Element");
declare
T : Tree_Type renames Position.Container.Tree;
B : Natural renames T.Busy;
L : Natural renames T.Lock;
begin
B := B + 1;
L := L + 1;
begin
Process (Position.Node.Element.all);
exception
when others =>
L := L - 1;
B := B - 1;
raise;
end;
L := L - 1;
B := B - 1;
end;
end Query_Element;
----------
-- Read --
----------
procedure Read
(Stream : access Root_Stream_Type'Class;
Container : out Set)
is
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access;
pragma Inline (Read_Node);
procedure Read is
new Tree_Operations.Generic_Read (Clear, Read_Node);
---------------
-- Read_Node --
---------------
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access
is
Node : Node_Access := new Node_Type;
begin
Node.Element := new Element_Type'(Element_Type'Input (Stream));
return Node;
exception
when others =>
Free (Node); -- Note that Free deallocates elem too
raise;
end Read_Node;
-- Start of processing for Read
begin
Read (Stream, Container.Tree);
end Read;
procedure Read
(Stream : access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
raise Program_Error with "attempt to stream set cursor";
end Read;
-------------
-- Replace --
-------------
procedure Replace (Container : in out Set; New_Item : Element_Type) is
Node : constant Node_Access :=
Element_Keys.Find (Container.Tree, New_Item);
X : Element_Access;
begin
if Node = null then
raise Constraint_Error with "attempt to replace element not in set";
end if;
if Container.Tree.Lock > 0 then
raise Program_Error with
"attempt to tamper with cursors (set is locked)";
end if;
X := Node.Element;
Node.Element := new Element_Type'(New_Item);
Free_Element (X);
end Replace;
---------------------
-- Replace_Element --
---------------------
procedure Replace_Element
(Tree : in out Tree_Type;
Node : Node_Access;
Item : Element_Type)
is
begin
if Item < Node.Element.all
or else Node.Element.all < Item
then
null;
else
if Tree.Lock > 0 then
raise Program_Error with
"attempt to tamper with cursors (set is locked)";
end if;
declare
X : Element_Access := Node.Element;
begin
Node.Element := new Element_Type'(Item);
Free_Element (X);
end;
return;
end if;
Tree_Operations.Delete_Node_Sans_Free (Tree, Node); -- Checks busy-bit
Insert_New_Item : declare
function New_Node return Node_Access;
pragma Inline (New_Node);
procedure Insert_Post is
new Element_Keys.Generic_Insert_Post (New_Node);
procedure Insert is
new Element_Keys.Generic_Conditional_Insert (Insert_Post);
--------------
-- New_Node --
--------------
function New_Node return Node_Access is
begin
Node.Element := new Element_Type'(Item); -- OK if fails
Node.Color := Red;
Node.Parent := null;
Node.Right := null;
Node.Left := null;
return Node;
end New_Node;
Result : Node_Access;
Inserted : Boolean;
X : Element_Access := Node.Element;
-- Start of processing for Insert_New_Item
begin
Attempt_Insert : begin
Insert
(Tree => Tree,
Key => Item,
Node => Result,
Success => Inserted); -- TODO: change name of formal param
exception
when others =>
Inserted := False;
end Attempt_Insert;
if Inserted then
pragma Assert (Result = Node);
Free_Element (X); -- OK if fails
return;
end if;
end Insert_New_Item;
Reinsert_Old_Element : declare
function New_Node return Node_Access;
pragma Inline (New_Node);
procedure Insert_Post is
new Element_Keys.Generic_Insert_Post (New_Node);
procedure Insert is
new Element_Keys.Generic_Conditional_Insert (Insert_Post);
--------------
-- New_Node --
--------------
function New_Node return Node_Access is
begin
Node.Color := Red;
Node.Parent := null;
Node.Right := null;
Node.Left := null;
return Node;
end New_Node;
Result : Node_Access;
Inserted : Boolean;
-- Start of processing for Reinsert_Old_Element
begin
Insert
(Tree => Tree,
Key => Node.Element.all,
Node => Result,
Success => Inserted); -- TODO: change name of formal param
exception
when others =>
null;
end Reinsert_Old_Element;
raise Program_Error with "attempt to replace existing element";
end Replace_Element;
procedure Replace_Element
(Container : in out Set;
Position : Cursor;
New_Item : Element_Type)
is
begin
if Position.Node = null then
raise Constraint_Error with "Position cursor equals No_Element";
end if;
if Position.Node.Element = null then
raise Program_Error with "Position cursor is bad";
end if;
if Position.Container /= Container'Unrestricted_Access then
raise Program_Error with "Position cursor designates wrong set";
end if;
pragma Assert (Vet (Container.Tree, Position.Node),
"bad cursor in Replace_Element");
Replace_Element (Container.Tree, Position.Node, New_Item);
end Replace_Element;
---------------------
-- Reverse_Iterate --
---------------------
procedure Reverse_Iterate
(Container : Set;
Process : not null access procedure (Position : Cursor))
is
procedure Process_Node (Node : Node_Access);
pragma Inline (Process_Node);
procedure Local_Reverse_Iterate is
new Tree_Operations.Generic_Reverse_Iteration (Process_Node);
------------------
-- Process_Node --
------------------
procedure Process_Node (Node : Node_Access) is
begin
Process (Cursor'(Container'Unrestricted_Access, Node));
end Process_Node;
T : Tree_Type renames Container.Tree'Unrestricted_Access.all;
B : Natural renames T.Busy;
-- Start of processing for Reverse_Iterate
begin
B := B + 1;
begin
Local_Reverse_Iterate (T);
exception
when others =>
B := B - 1;
raise;
end;
B := B - 1;
end Reverse_Iterate;
-----------
-- Right --
-----------
function Right (Node : Node_Access) return Node_Access is
begin
return Node.Right;
end Right;
---------------
-- Set_Color --
---------------
procedure Set_Color (Node : Node_Access; Color : Color_Type) is
begin
Node.Color := Color;
end Set_Color;
--------------
-- Set_Left --
--------------
procedure Set_Left (Node : Node_Access; Left : Node_Access) is
begin
Node.Left := Left;
end Set_Left;
----------------
-- Set_Parent --
----------------
procedure Set_Parent (Node : Node_Access; Parent : Node_Access) is
begin
Node.Parent := Parent;
end Set_Parent;
---------------
-- Set_Right --
---------------
procedure Set_Right (Node : Node_Access; Right : Node_Access) is
begin
Node.Right := Right;
end Set_Right;
--------------------------
-- Symmetric_Difference --
--------------------------
procedure Symmetric_Difference (Target : in out Set; Source : Set) is
begin
Set_Ops.Symmetric_Difference (Target.Tree, Source.Tree);
end Symmetric_Difference;
function Symmetric_Difference (Left, Right : Set) return Set is
Tree : constant Tree_Type :=
Set_Ops.Symmetric_Difference (Left.Tree, Right.Tree);
begin
return Set'(Controlled with Tree);
end Symmetric_Difference;
------------
-- To_Set --
------------
function To_Set (New_Item : Element_Type) return Set is
Tree : Tree_Type;
Node : Node_Access;
Inserted : Boolean;
begin
Insert_Sans_Hint (Tree, New_Item, Node, Inserted);
return Set'(Controlled with Tree);
end To_Set;
-----------
-- Union --
-----------
procedure Union (Target : in out Set; Source : Set) is
begin
Set_Ops.Union (Target.Tree, Source.Tree);
end Union;
function Union (Left, Right : Set) return Set is
Tree : constant Tree_Type :=
Set_Ops.Union (Left.Tree, Right.Tree);
begin
return Set'(Controlled with Tree);
end Union;
-----------
-- Write --
-----------
procedure Write
(Stream : access Root_Stream_Type'Class;
Container : Set)
is
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
procedure Write is
new Tree_Operations.Generic_Write (Write_Node);
----------------
-- Write_Node --
----------------
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
Node : Node_Access)
is
begin
Element_Type'Output (Stream, Node.Element.all);
end Write_Node;
-- Start of processing for Write
begin
Write (Stream, Container.Tree);
end Write;
procedure Write
(Stream : access Root_Stream_Type'Class;
Item : Cursor)
is
begin
raise Program_Error with "attempt to stream set cursor";
end Write;
end Ada.Containers.Indefinite_Ordered_Sets;
|
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2020, Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
-- SDL.Hints
--
-- Access to library configuration variables.
--------------------------------------------------------------------------------------------------------------------
package SDL.Hints is
pragma Preelaborate;
-- TODO: Make this more robust using more functions and platform specific
-- packages with error checking on returned values?
-- Would be nice to have the compiler only allow that which is allowed on
-- a particular platform.
-- It would be nice to have the binding test the return values as well,
-- raising an exception on values that are just wrong for a particular
-- platform, i.e. direct3d on Linux or Mac? Exception raised!
-- This is raised when something has gone horribly wrong somewhere,
-- i.e. setting the wrong hint on a platform that does not allow it.
Hint_Error : exception;
type Hint is
(Frame_Buffer_Acceleration,
Render_Driver,
Render_OpenGL_Shaders,
Render_Scale_Quality,
Render_VSync,
Video_X11_XVidMode,
Video_X11_Xinerama,
Video_X11_XRandR,
Grab_Keyboard,
Video_Minimise_On_Focus_Loss,
Idle_Timer_Disabled,
IOS_Orientations,
XInput_Enabled, -- win
Game_Controller_Config, -- win, mac, linux
Joystick_Allow_Background_Events,
Allow_Topmost,
Timer_Resolution) with -- win7 and earlier
Discard_Names => True;
type Priorities is (Default, Normal, Override) with
Convention => C;
procedure Clear with
Import => True,
Convention => C,
External_Name => "SDL_ClearHints";
function Get (Name : in Hint) return String;
procedure Set (Name : in Hint; Value : in String);
procedure Set (Name : in Hint; Value : in String; Priority : in Priorities);
end SDL.Hints;
|
with Ada.Integer_Text_IO; Use Ada.Integer_Text_IO;
with Ada.Text_IO; Use Ada.Text_IO;
package inventory_list is
-- inventory system that stores items from items.dat in a linked-list
-- alphabetically.
KEY_ERROR : exception;
OVERFLOW : exception;
type List_Type is private;
type Node_Ptr is private;
type valueArray is array(1..3) of Integer;
subtype nameType is String (1..25);
type inventoryItem is record
itemID : Integer;
name : nameType;
itemType : Integer;
quantity : Integer;
effects : valueArray;
next : Node_Ptr;
end record;
procedure Clear (List : in out List_Type);
--Empties Inventory list
procedure Insert (key : in Integer; List : in out List_Type);
--Adds inventory item from item ID
procedure useItem (key : in Integer; List : in out List_Type; item : out inventoryItem);
--uses inventory item by returning the item and deleting item after usage
procedure Drop (key : in Integer; List : in out List_Type);
--deletes item from inventory
procedure DisplayList (List : in List_Type);
--Traverses thru inventory displaying each item on screen alphabetically
procedure readItem(itemID : in Integer; name : out nameType; itemType : out Integer; effects : out valueArray);
procedure saveInventory(List : in List_Type; File : File_Type);
function isEmpty (List : in List_Type) return Boolean;
--checks whether inventory is empty
function getName (itemID : in Integer) return NameType;
function getSlotName (List : in List_Type; slot : in integer) return String;
function getSlotId (List : in List_Type; slot : in integer) return Integer;
private
type Node_Ptr is access inventoryItem;
type List_Type is record
Head : Node_Ptr; -- Designates first node in the linked list
end record;
end inventory_list;
|
with System.Multiprocessors.Dispatching_Domains;
use System.Multiprocessors.Dispatching_Domains;
package Dispatch is
My_Domain : Dispatching_Domain :=
Create(2,2);
task My_Task
with Dispatching_Domain => My_Domain;
end Dispatch;
|
with System.Storage_Elements;
private with Ada.Unchecked_Conversion;
package Posix is
type File;
type File_Status;
type Memory_Map;
-- subtype unsigned_long is Interfaces.C.unsigned_long;
-- subtype unsigned is Interfaces.C.unsigned;
-- subtype int is Interfaces.C.int;
-- subtype long is Interfaces.C.long;
-- subtype Unsigned_32 is Interfaces.Unsigned_32;
type unsigned is mod 2 ** Integer'Size;
type unsigned_long is mod 2 ** Long_Integer'Size;
type int is new Integer;
type long is new Long_Integer;
type Unsigned_32 is mod 2 ** 32;
for Unsigned_32'Size use 32;
subtype Void_Ptr is System.Address;
type S_FLag is new Unsigned_32;
type O_FLag is new Unsigned_32;
type Prot_FLag is new Unsigned_32;
use type Void_Ptr;
-- function Shift_Right
-- (Value : Unsigned_32;
-- Amount : Natural) return Unsigned_32 renames
-- Interfaces.Shift_Right;
--
-- function Shift_Right
-- (Value : S_FLag;
-- Amount : Natural) return S_FLag is
-- (S_FLag (Shift_Right (Unsigned_32 (Value), Amount)));
Nul : constant Character := Character'Val (0);
type C_String is new String with
Dynamic_Predicate => C_String'Length > 0
and then C_String (C_String'Last) = Nul;
function "-" (Text : C_String) return String;
-- Removes the last 'Nul' character and returns a normal String.
function "+" (Text : String) return C_String;
-- Appends a 'Nul' character to a standard String and returns a C_String.
--
-- Non-primitive subprograms
--
-- Write to standard out. May be used instead of Ada.Text_IO.Put ().
procedure Put (Text : String) with
Global => null;
-- Write to standard out. May be used instead of Ada.Text_IO.Put_Line ().
procedure Put_Line (Text : String) with
Global => null;
function Get_Line return String;
--
-- Encoding of the file mode.
--
S_IFMT : constant S_FLag := 0170000; --These bits determine file type.
--
-- File types
--
S_IFDIR : constant S_FLag := 0040000; -- Directory.
S_IFCHR : constant S_FLag := 0020000; -- Character device.
S_IFBLK : constant S_FLag := 0060000; -- Block device.
S_IFREG : constant S_FLag := 0100000; -- Regular file.
S_IFIFO : constant S_FLag := 0010000; -- FIFO.
S_IFLNK : constant S_FLag := 0120000; -- Symbolic link.
S_IFSOCK : constant S_FLag := 0140000; -- Socket.
-- #define __S_ISUID 04000 /* Set user ID on execution. */
-- #define __S_ISGID 02000 /* Set group ID on execution. */
-- #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
-- #define __S_IREAD 0400 /* Read by owner. */
-- #define __S_IWRITE 0200 /* Write by owner. */
-- #define __S_IEXEC 0100 /* Execute by owner. */
-- Read by owner.
S_IRUSR : constant S_FLag := 0400;
-- Write by owner.
S_IWUSR : constant S_FLag := 0200;
-- Execute by owner.
S_IXUSR : constant S_FLag := 0100;
-- Read, write, and execute by owner.
S_IRWXU : constant S_FLag := S_IRUSR or S_IWUSR or S_IXUSR;
-- Read by group.
S_IRGRP : constant S_FLag := 3_200;
-- Write by group.
S_IWGRP : constant S_FLag := 1_600;
-- Execute by group.
S_IXGRP : constant S_FLag := 800;
-- Read, write, and execute by group.
S_IRWXG : constant S_FLag := 5_600;
-- Read by others.
S_IROTH : constant S_FLag := 25_600;
-- Write by others.
S_IWOTH : constant S_FLag := 12_800;
-- Execute by others.
S_IXOTH : constant S_FLag := 6_400;
-- Read, write, and execute by others.
S_IRWXO : constant S_FLag := 44_800;
-- Open for reading only
O_RDONLY : constant O_FLag := 16#00#;
-- Open for write only
O_WRONLY : constant O_FLag := 16#01#;
-- Open for reading and writing
O_RDWR : constant O_FLag := 16#02#;
O_ACCMODE : constant O_FLag := 16#03#;
O_CREAT : constant O_FLag := 0100;
O_EXCL : constant O_FLag := 0200;
O_NOCTTY : constant O_FLag := 0400;
O_TRUNC : constant O_FLag := 01000;
O_APPEND : constant O_FLag := 02000;
O_NONBLOCK : constant O_FLag := 04000;
O_SYNC : constant O_FLag := 04010000;
O_ASYNC : constant O_FLag := 020000;
-- Protections are chosen from these bits, OR'd together. The
-- implementation does not necessarily support PROT_EXEC or PROT_WRITE
-- without PROT_READ. The only guarantees are that no writing will be
-- allowed without PROT_WRITE and no access will be allowed for PROT_NONE.
-- Page can be read.
PROT_READ : constant Prot_FLag := 16#1#;
-- Page can be written.
PROT_WRITE : constant Prot_FLag := 16#2#;
-- Page can be executed.
PROT_EXEC : constant Prot_FLag := 16#4#;
-- Page can not be accessed.
PROT_NONE : constant Prot_FLag := 16#0#;
-- Extend change to start of growsdown vma (mprotect only).
PROT_GROWSDOWN : constant Prot_FLag := 16#01000000#;
-- Extend change to start of growsup vma (mprotect only).
PROT_GROWSUP : constant Prot_FLag := 16#02000000#;
--
-- Sharing types (must choose one and only one of these).
--
-- Share changes.
MAP_SHARED : constant := 16#01#;
-- Changes are private.
MAP_PRIVATE : constant := 16#02#;
-- Interpret addr exactly.
MAP_FIXED : constant := 16#10#;
-- Don't use a file.
MAP_ANON : constant := 16#20#;
MAP_HUGE_SHIFT : constant := 26;
MAP_HUGE_MASK : constant := 16#3f#;
MAP_FAILED : constant Void_Ptr;
--
-- Flags to `msync'.
--
-- Sync memory asynchronously.
MS_ASYNC : constant := 1;
-- Synchronous memory sync.
MS_SYNC : constant := 4;
-- Invalidate the caches.
MS_INVALIDATE : constant := 2;
subtype Device_Id_Type is unsigned_long;
subtype Inode_Number_Type is unsigned_long;
subtype Hard_Link_Count_Type is unsigned_long;
subtype Mode_Type is unsigned;
subtype User_Id_Type is unsigned;
subtype Group_Id_Type is unsigned;
subtype Size_Type is unsigned_long;
subtype SSize_Type is long;
subtype Block_Size_Type is long;
subtype Block_Count_Type is long;
subtype Time_Sec is long;
subtype Time_Nano_Sec is long;
Nil : Void_Ptr renames System.Null_Address;
subtype Offset is long;
subtype Byte is System.Storage_Elements.Storage_Element;
subtype Byte_Array is System.Storage_Elements.Storage_Array;
type Time is record
Sec : aliased Time_Sec;
Nano_Sec : aliased Time_Nano_Sec;
end record with
Convention => C_Pass_By_Copy;
type File is tagged limited private with
Default_Initial_Condition => Is_Closed (File);
procedure Open
(File : in out Posix.File;
File_Name : in C_String;
Flags : in O_FLag;
S_Flags : in S_FLag) with
Global => null,
Pre => File.Is_Closed;
-- To open a file for reading example:
--
-- File : Posix.File;
--
procedure Close (File : in out Posix.File) with
Global => null,
Pre => File.Is_Open,
Post => File.Is_Closed;
procedure Write (File : Posix.File; Bytes : Byte_Array) with
Global => null,
Pre => File.Is_Open;
function Read (File : Posix.File; Bytes : in out Byte_Array) return SSize_Type with
Global => null,
Pre => File.Is_Open;
function File_Descriptor (File : Posix.File) return Integer with
Global => null,
Pre => File.Is_Open;
procedure Get_File_Status
(File : in Posix.File;
Status : in out File_Status) with
Global => null,
Pre => File.Is_Open;
procedure Map_Memory
(File : in Posix.File;
Address : Void_Ptr;
Len : Size_Type;
Prot : Prot_FLag;
Flags : int;
Offset : Posix.Offset;
Memory_Map : in out Posix.Memory_Map) with
Global => null,
Pre => not Has_Mapping (Memory_Map);
function Is_Open (File : Posix.File) return Boolean with
Global => null;
function Is_Closed (File : Posix.File) return Boolean with
Global => null;
type File_Status is tagged limited private;
function Is_Valid (Status : File_Status) return Boolean with
Global => null;
function Device_Id (Status : File_Status) return Device_Id_Type with
Global => null,
Pre => Status.Is_Valid;
function Inode_Number (Status : File_Status) return Inode_Number_Type with
Global => null,
Pre => Status.Is_Valid;
function Hard_Link_Count
(Status : File_Status) return Hard_Link_Count_Type with
Global => null,
Pre => Status.Is_Valid;
function Mode (Status : File_Status) return Mode_Type with
Global => null,
Pre => Status.Is_Valid;
function User_Id (Status : File_Status) return User_Id_Type with
Global => null,
Pre => Status.Is_Valid;
function Group_Id (Status : File_Status) return Group_Id_Type with
Global => null,
Pre => Status.Is_Valid;
function Special_Device_Id (Status : File_Status) return Device_Id_Type with
Global => null,
Pre => Status.Is_Valid;
function Size (Status : File_Status) return Offset with
Global => null,
Pre => Status.Is_Valid;
-- The file size in bytes.
function Block_Size (Status : File_Status) return Block_Size_Type with
Global => null,
Pre => Status.Is_Valid;
-- Number of 512B blocks allocated
function Block_Count (Status : File_Status) return Block_Size_Type with
Global => null,
Pre => Status.Is_Valid;
function Last_Access_Time (Status : File_Status) return Time with
Global => null,
Pre => Status.Is_Valid;
function Modification_Time (Status : File_Status) return Time with
Global => null,
Pre => Status.Is_Valid;
-- Last status change time
function Change_Time (Status : File_Status) return Time with
Global => null,
Pre => Status.Is_Valid;
type Memory_Map is tagged limited private;
function Has_Mapping (Map : Posix.Memory_Map) return Boolean with
Global => null;
function Mapping (Map : Posix.Memory_Map) return Void_Ptr with
Global => null,
Pre => Map.Has_Mapping;
-- Returns 0 on success, otherwise -1.
function Unmap_Memory (Map : in out Posix.Memory_Map) return Integer with
Global => null,
Post => (if Unmap_Memory'Result = 0 then not Map.Has_Mapping);
-- Returns 0 on success, otherwise -1.
function Memory_Unmap (Address : Void_Ptr;
Length : Size_Type) return Integer with
Global => null;
--
-- Standard file descriptors.
--
STDIN : constant File; -- Standard input.
STDOUT : constant File; -- Standard output.
STDERR : constant File; -- Standard error output.
private
package Px_Thin is
-- Standard file descriptors.
STDIN_FILENO : constant := 0; -- Standard input.
STDOUT_FILENO : constant := 1; -- Standard output.
STDERR_FILENO : constant := 2; -- Standard error output.
type File_Status_T is record
-- ID of device containing file
Device_Id : aliased Device_Id_Type;
Inode_Number : aliased Inode_Number_Type;
Hard_Link_Count : aliased Hard_Link_Count_Type;
-- Protection
Mode : aliased Mode_Type;
User_Id : aliased User_Id_Type;
Group_Id : aliased Group_Id_Type;
Padding_0 : aliased int;
-- Device ID (if special file)
Special_Device_Id : aliased Device_Id_Type;
-- Total size, in bytes
Size : aliased Offset;
-- Blocksize for file system I/O
Block_Size : aliased Block_Size_Type;
-- Number of 512B blocks allocated
Block_Count : aliased Block_Count_Type;
-- Time of last access
Access_Time : aliased Time;
-- Time of last modification
Modification_Time : aliased Time;
-- Time of last status change
Change_Time : aliased Time;
Padding_1 : long;
Padding_2 : long;
Padding_3 : long;
end record with
Convention => C_Pass_By_Copy;
function Get_File_Status
(Fd : Integer;
Status : access File_Status_T) return Integer with
Import => True,
Convention => C,
External_Name => "fstat";
-- Establishes a connection between a file and a file descriptor.
-- The file descriptor handle (a non-negative number)
-- is returned upon success, otherwise -1.
--
-- Applications shall specify exactly one of the first three flags:
-- O_RDONLY, O_WRONLY and O_RDWR. And then any combination of O_APPEND,
-- O_CREAT, O_DSYNC, O_EXCL, O_NOCTTY, O_NONBLOCK, O_RSYNC,
-- O_SYNC, O_TRUNC.
function Open
(File_Name : C_String;
Flags : O_FLag;
S_Flags : S_FLag) return Integer with
Import => True,
Convention => C,
External_Name => "open";
procedure Close (File_Descriptor : Integer) with
Import => True,
Convention => C,
External_Name => "close";
function Write
(File_Descriptor : Integer;
Buffer : Byte_Array;
Count : Size_Type) return SSize_Type with
Import => True,
Convention => C,
External_Name => "write";
function Write
(File_Descriptor : Integer;
Buffer : String;
Count : Size_Type) return SSize_Type with
Import => True,
Convention => C,
External_Name => "write";
function Read
(File_Descriptor : Integer;
Buffer : in out Byte_Array;
Count : Size_Type) return SSize_Type with
Import => True,
Convention => C,
External_Name => "read";
function Mmap
(Addr : Void_Ptr;
Len : Size_Type;
Prot : Prot_FLag;
Flags : int;
Fd : Integer;
Offset : Posix.Offset) return Void_Ptr with
Import => True,
Convention => C,
External_Name => "mmap";
function Munmap (Addr : Void_Ptr; Length : Size_Type) return Integer with
Import => True,
Convention => C,
External_Name => "munmap";
end Px_Thin;
type File is tagged limited record
My_File_Descriptor : Integer;
My_Is_Open : Boolean := False;
end record;
function Is_Open (File : Posix.File) return Boolean is (File.My_Is_Open);
function Is_Closed (File : Posix.File) return Boolean is (not File.My_Is_Open);
type File_Status is tagged limited record
My_Status : aliased Px_Thin.File_Status_T;
My_Is_Valid : Boolean := False;
end record;
function File_Descriptor (File : Posix.File) return Integer is
(File.My_File_Descriptor);
function Is_Valid
(Status : File_Status) return Boolean is
(Status.My_Is_Valid);
function Device_Id
(Status : File_Status) return Device_Id_Type is
(Status.My_Status.Device_Id);
function Inode_Number
(Status : File_Status) return Inode_Number_Type is
(Status.My_Status.Inode_Number);
function Hard_Link_Count
(Status : File_Status) return Hard_Link_Count_Type is
(Status.My_Status.Hard_Link_Count);
function Mode
(Status : File_Status) return Mode_Type is (Status.My_Status.Mode);
function User_Id
(Status : File_Status) return User_Id_Type is
(Status.My_Status.User_Id);
function Group_Id
(Status : File_Status) return Group_Id_Type is
(Status.My_Status.Group_Id);
function Special_Device_Id
(Status : File_Status) return Device_Id_Type is
(Status.My_Status.Special_Device_Id);
function Size
(Status : File_Status) return Offset is
(Status.My_Status.Size);
function Block_Size
(Status : File_Status) return Block_Size_Type is
(Status.My_Status.Block_Size);
function Block_Count
(Status : File_Status) return Block_Size_Type is
(Status.My_Status.Block_Count);
function Last_Access_Time
(Status : File_Status) return Time is
(Status.My_Status.Access_Time);
function Modification_Time
(Status : File_Status) return Time is
(Status.My_Status.Modification_Time);
function Change_Time
(Status : File_Status) return Time is
(Status.My_Status.Change_Time);
function Conv is new Ada.Unchecked_Conversion (Source => long,
Target => Void_Ptr);
MAP_FAILED_VALUE : constant long := -1;
MAP_FAILED : constant Void_Ptr := Conv (MAP_FAILED_VALUE);
type Memory_Map is tagged limited record
My_Mapping : Void_Ptr := MAP_FAILED;
My_Length : Size_Type;
end record;
function Has_Mapping
(Map : Posix.Memory_Map) return Boolean is (Map.My_Mapping /= MAP_FAILED);
function Mapping (Map : Posix.Memory_Map) return Void_Ptr is (Map.My_Mapping);
STDIN : constant File :=
(
My_File_Descriptor => Px_Thin.STDIN_FILENO,
My_Is_Open => True
);
STDOUT : constant File :=
(
My_File_Descriptor => Px_Thin.STDOUT_FILENO,
My_Is_Open => True
);
STDERR : constant File :=
(
My_File_Descriptor => Px_Thin.STDERR_FILENO,
My_Is_Open => True
);
end Posix;
|
pragma SPARK_Mode;
with Sparkduino; use Sparkduino;
with Interfaces.C; use Interfaces.C;
package body Wire is
Timeout : constant unsigned_long := 1;
function RequestFrom (Addr : Byte;
Quant : Byte;
Stop : Boolean)
return Byte
is
CB : Byte := 0;
begin
if Stop then
CB := 1;
end if;
return RequestFrom_C (Addr => Addr,
Quant => Quant,
Stop => CB);
end RequestFrom;
function EndTransmission (Stop : Boolean) return Byte
is
CB : Byte := 0;
begin
if Stop then
CB := 1;
end if;
return EndTransmission_C (Stop => CB);
end EndTransmission;
function Byte2TSI (BB : Byte)
return Transmission_Status_Index
is
begin
for I in Transmission_Status_Index loop
if Transmission_Status (I) = BB then
return I;
end if;
end loop;
return Other_Err;
end Byte2TSI;
function Read_Byte (Addr : Byte;
Reg : Byte)
return Byte
is
Ret_Val : Byte;
Bytes_Read : Byte;
Bytes_Written : Byte;
Status : Transmission_Status_Index;
begin
Wire.BeginTransmission (Addr => Addr);
Bytes_Written := Wire.Write_Value (Val => Reg);
Status := Byte2TSI (BB => Wire.EndTransmission (Stop => True));
if Status /= Wire.Success or Bytes_Written /= 1 then
return Byte'First;
end if;
Bytes_Read := RequestFrom (Addr => Addr,
Quant => 1,
Stop => True);
if Bytes_Read /= 1 then
return Byte'First;
end if;
Ret_Val := Wire.Read;
return Ret_Val;
end Read_Byte;
procedure Read_Bytes (Addr : Byte;
Reg : Byte;
Data : out Byte_Array)
is
Bytes_Read : Byte;
Bytes_Written : Byte;
Status : Transmission_Status_Index;
Start_Time : unsigned_long;
begin
Wire.BeginTransmission (Addr => Addr);
Bytes_Written := Wire.Write_Value (Val => (Reg or 16#80#));
Status := Byte2TSI (BB => Wire.EndTransmission (Stop => True));
if Status /= Wire.Success or Bytes_Written /= 1 then
Data := (others => Byte'First);
return;
end if;
Bytes_Read := RequestFrom (Addr => Addr,
Quant => Data'Length,
Stop => True);
if Bytes_Read /= Data'Length or Bytes_Read = 0 then
Data := (others => Byte'First);
return;
end if;
Start_Time := Millis;
while Wire.Available < Data'Length loop
if Millis - Start_Time > Timeout then
Data := (others => Byte'First);
return;
end if;
end loop;
for I in Data'First .. Data'Last loop
Data (I) := Wire.Read;
pragma Annotate (GNATprove,
False_Positive,
"""Data"" might not be initialized",
String'("Data properly initialized by this loop"));
end loop;
end Read_Bytes;
function Write_Byte (Addr : Byte;
Reg : Byte;
Data : Byte)
return Transmission_Status_Index
is
Bytes_Written : Byte;
begin
BeginTransmission (Addr => Addr);
Bytes_Written := Write_Value (Val => Reg);
if Bytes_Written /= 1 then
return Other_Err;
end if;
Bytes_Written := Write_Value (Val => Data);
if Bytes_Written /= 1 then
return Other_Err;
end if;
return Byte2TSI (BB => EndTransmission (Stop => True));
end Write_Byte;
end Wire;
|
-- This spec has been automatically generated from STM32F072x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package STM32_SVD.USART is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR1_UE_Field is STM32_SVD.Bit;
subtype CR1_UESM_Field is STM32_SVD.Bit;
subtype CR1_RE_Field is STM32_SVD.Bit;
subtype CR1_TE_Field is STM32_SVD.Bit;
subtype CR1_IDLEIE_Field is STM32_SVD.Bit;
subtype CR1_RXNEIE_Field is STM32_SVD.Bit;
subtype CR1_TCIE_Field is STM32_SVD.Bit;
subtype CR1_TXEIE_Field is STM32_SVD.Bit;
subtype CR1_PEIE_Field is STM32_SVD.Bit;
subtype CR1_PS_Field is STM32_SVD.Bit;
subtype CR1_PCE_Field is STM32_SVD.Bit;
subtype CR1_WAKE_Field is STM32_SVD.Bit;
subtype CR1_M_Field is STM32_SVD.Bit;
subtype CR1_MME_Field is STM32_SVD.Bit;
subtype CR1_CMIE_Field is STM32_SVD.Bit;
subtype CR1_OVER8_Field is STM32_SVD.Bit;
subtype CR1_DEDT_Field is STM32_SVD.UInt5;
subtype CR1_DEAT_Field is STM32_SVD.UInt5;
subtype CR1_RTOIE_Field is STM32_SVD.Bit;
subtype CR1_EOBIE_Field is STM32_SVD.Bit;
subtype CR1_M1_Field is STM32_SVD.Bit;
-- Control register 1
type CR1_Register is record
-- USART enable
UE : CR1_UE_Field := 16#0#;
-- USART enable in Stop mode
UESM : CR1_UESM_Field := 16#0#;
-- Receiver enable
RE : CR1_RE_Field := 16#0#;
-- Transmitter enable
TE : CR1_TE_Field := 16#0#;
-- IDLE interrupt enable
IDLEIE : CR1_IDLEIE_Field := 16#0#;
-- RXNE interrupt enable
RXNEIE : CR1_RXNEIE_Field := 16#0#;
-- Transmission complete interrupt enable
TCIE : CR1_TCIE_Field := 16#0#;
-- interrupt enable
TXEIE : CR1_TXEIE_Field := 16#0#;
-- PE interrupt enable
PEIE : CR1_PEIE_Field := 16#0#;
-- Parity selection
PS : CR1_PS_Field := 16#0#;
-- Parity control enable
PCE : CR1_PCE_Field := 16#0#;
-- Receiver wakeup method
WAKE : CR1_WAKE_Field := 16#0#;
-- Word length
M : CR1_M_Field := 16#0#;
-- Mute mode enable
MME : CR1_MME_Field := 16#0#;
-- Character match interrupt enable
CMIE : CR1_CMIE_Field := 16#0#;
-- Oversampling mode
OVER8 : CR1_OVER8_Field := 16#0#;
-- Driver Enable deassertion time
DEDT : CR1_DEDT_Field := 16#0#;
-- Driver Enable assertion time
DEAT : CR1_DEAT_Field := 16#0#;
-- Receiver timeout interrupt enable
RTOIE : CR1_RTOIE_Field := 16#0#;
-- End of Block interrupt enable
EOBIE : CR1_EOBIE_Field := 16#0#;
-- Word length
M1 : CR1_M1_Field := 16#0#;
-- unspecified
Reserved_29_31 : STM32_SVD.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register use record
UE at 0 range 0 .. 0;
UESM at 0 range 1 .. 1;
RE at 0 range 2 .. 2;
TE at 0 range 3 .. 3;
IDLEIE at 0 range 4 .. 4;
RXNEIE at 0 range 5 .. 5;
TCIE at 0 range 6 .. 6;
TXEIE at 0 range 7 .. 7;
PEIE at 0 range 8 .. 8;
PS at 0 range 9 .. 9;
PCE at 0 range 10 .. 10;
WAKE at 0 range 11 .. 11;
M at 0 range 12 .. 12;
MME at 0 range 13 .. 13;
CMIE at 0 range 14 .. 14;
OVER8 at 0 range 15 .. 15;
DEDT at 0 range 16 .. 20;
DEAT at 0 range 21 .. 25;
RTOIE at 0 range 26 .. 26;
EOBIE at 0 range 27 .. 27;
M1 at 0 range 28 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype CR2_ADDM7_Field is STM32_SVD.Bit;
subtype CR2_LBDL_Field is STM32_SVD.Bit;
subtype CR2_LBDIE_Field is STM32_SVD.Bit;
subtype CR2_LBCL_Field is STM32_SVD.Bit;
subtype CR2_CPHA_Field is STM32_SVD.Bit;
subtype CR2_CPOL_Field is STM32_SVD.Bit;
subtype CR2_CLKEN_Field is STM32_SVD.Bit;
subtype CR2_STOP_Field is STM32_SVD.UInt2;
subtype CR2_LINEN_Field is STM32_SVD.Bit;
subtype CR2_SWAP_Field is STM32_SVD.Bit;
subtype CR2_RXINV_Field is STM32_SVD.Bit;
subtype CR2_TXINV_Field is STM32_SVD.Bit;
subtype CR2_DATAINV_Field is STM32_SVD.Bit;
subtype CR2_MSBFIRST_Field is STM32_SVD.Bit;
subtype CR2_ABREN_Field is STM32_SVD.Bit;
subtype CR2_ABRMOD_Field is STM32_SVD.UInt2;
subtype CR2_RTOEN_Field is STM32_SVD.Bit;
-- CR2_ADD array element
subtype CR2_ADD_Element is STM32_SVD.UInt4;
-- CR2_ADD array
type CR2_ADD_Field_Array is array (0 .. 1) of CR2_ADD_Element
with Component_Size => 4, Size => 8;
-- Type definition for CR2_ADD
type CR2_ADD_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- ADD as a value
Val : STM32_SVD.Byte;
when True =>
-- ADD as an array
Arr : CR2_ADD_Field_Array;
end case;
end record
with Unchecked_Union, Size => 8;
for CR2_ADD_Field use record
Val at 0 range 0 .. 7;
Arr at 0 range 0 .. 7;
end record;
-- Control register 2
type CR2_Register is record
-- unspecified
Reserved_0_3 : STM32_SVD.UInt4 := 16#0#;
-- 7-bit Address Detection/4-bit Address Detection
ADDM7 : CR2_ADDM7_Field := 16#0#;
-- LIN break detection length
LBDL : CR2_LBDL_Field := 16#0#;
-- LIN break detection interrupt enable
LBDIE : CR2_LBDIE_Field := 16#0#;
-- unspecified
Reserved_7_7 : STM32_SVD.Bit := 16#0#;
-- Last bit clock pulse
LBCL : CR2_LBCL_Field := 16#0#;
-- Clock phase
CPHA : CR2_CPHA_Field := 16#0#;
-- Clock polarity
CPOL : CR2_CPOL_Field := 16#0#;
-- Clock enable
CLKEN : CR2_CLKEN_Field := 16#0#;
-- STOP bits
STOP : CR2_STOP_Field := 16#0#;
-- LIN mode enable
LINEN : CR2_LINEN_Field := 16#0#;
-- Swap TX/RX pins
SWAP : CR2_SWAP_Field := 16#0#;
-- RX pin active level inversion
RXINV : CR2_RXINV_Field := 16#0#;
-- TX pin active level inversion
TXINV : CR2_TXINV_Field := 16#0#;
-- Binary data inversion
DATAINV : CR2_DATAINV_Field := 16#0#;
-- Most significant bit first
MSBFIRST : CR2_MSBFIRST_Field := 16#0#;
-- Auto baud rate enable
ABREN : CR2_ABREN_Field := 16#0#;
-- Auto baud rate mode
ABRMOD : CR2_ABRMOD_Field := 16#0#;
-- Receiver timeout enable
RTOEN : CR2_RTOEN_Field := 16#0#;
-- Address of the USART node
ADD : CR2_ADD_Field := (As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register use record
Reserved_0_3 at 0 range 0 .. 3;
ADDM7 at 0 range 4 .. 4;
LBDL at 0 range 5 .. 5;
LBDIE at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
LBCL at 0 range 8 .. 8;
CPHA at 0 range 9 .. 9;
CPOL at 0 range 10 .. 10;
CLKEN at 0 range 11 .. 11;
STOP at 0 range 12 .. 13;
LINEN at 0 range 14 .. 14;
SWAP at 0 range 15 .. 15;
RXINV at 0 range 16 .. 16;
TXINV at 0 range 17 .. 17;
DATAINV at 0 range 18 .. 18;
MSBFIRST at 0 range 19 .. 19;
ABREN at 0 range 20 .. 20;
ABRMOD at 0 range 21 .. 22;
RTOEN at 0 range 23 .. 23;
ADD at 0 range 24 .. 31;
end record;
subtype CR3_EIE_Field is STM32_SVD.Bit;
subtype CR3_IREN_Field is STM32_SVD.Bit;
subtype CR3_IRLP_Field is STM32_SVD.Bit;
subtype CR3_HDSEL_Field is STM32_SVD.Bit;
subtype CR3_NACK_Field is STM32_SVD.Bit;
subtype CR3_SCEN_Field is STM32_SVD.Bit;
subtype CR3_DMAR_Field is STM32_SVD.Bit;
subtype CR3_DMAT_Field is STM32_SVD.Bit;
subtype CR3_RTSE_Field is STM32_SVD.Bit;
subtype CR3_CTSE_Field is STM32_SVD.Bit;
subtype CR3_CTSIE_Field is STM32_SVD.Bit;
subtype CR3_ONEBIT_Field is STM32_SVD.Bit;
subtype CR3_OVRDIS_Field is STM32_SVD.Bit;
subtype CR3_DDRE_Field is STM32_SVD.Bit;
subtype CR3_DEM_Field is STM32_SVD.Bit;
subtype CR3_DEP_Field is STM32_SVD.Bit;
subtype CR3_SCARCNT_Field is STM32_SVD.UInt3;
subtype CR3_WUS_Field is STM32_SVD.UInt2;
subtype CR3_WUFIE_Field is STM32_SVD.Bit;
-- Control register 3
type CR3_Register is record
-- Error interrupt enable
EIE : CR3_EIE_Field := 16#0#;
-- IrDA mode enable
IREN : CR3_IREN_Field := 16#0#;
-- IrDA low-power
IRLP : CR3_IRLP_Field := 16#0#;
-- Half-duplex selection
HDSEL : CR3_HDSEL_Field := 16#0#;
-- Smartcard NACK enable
NACK : CR3_NACK_Field := 16#0#;
-- Smartcard mode enable
SCEN : CR3_SCEN_Field := 16#0#;
-- DMA enable receiver
DMAR : CR3_DMAR_Field := 16#0#;
-- DMA enable transmitter
DMAT : CR3_DMAT_Field := 16#0#;
-- RTS enable
RTSE : CR3_RTSE_Field := 16#0#;
-- CTS enable
CTSE : CR3_CTSE_Field := 16#0#;
-- CTS interrupt enable
CTSIE : CR3_CTSIE_Field := 16#0#;
-- One sample bit method enable
ONEBIT : CR3_ONEBIT_Field := 16#0#;
-- Overrun Disable
OVRDIS : CR3_OVRDIS_Field := 16#0#;
-- DMA Disable on Reception Error
DDRE : CR3_DDRE_Field := 16#0#;
-- Driver enable mode
DEM : CR3_DEM_Field := 16#0#;
-- Driver enable polarity selection
DEP : CR3_DEP_Field := 16#0#;
-- unspecified
Reserved_16_16 : STM32_SVD.Bit := 16#0#;
-- Smartcard auto-retry count
SCARCNT : CR3_SCARCNT_Field := 16#0#;
-- Wakeup from Stop mode interrupt flag selection
WUS : CR3_WUS_Field := 16#0#;
-- Wakeup from Stop mode interrupt enable
WUFIE : CR3_WUFIE_Field := 16#0#;
-- unspecified
Reserved_23_31 : STM32_SVD.UInt9 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR3_Register use record
EIE at 0 range 0 .. 0;
IREN at 0 range 1 .. 1;
IRLP at 0 range 2 .. 2;
HDSEL at 0 range 3 .. 3;
NACK at 0 range 4 .. 4;
SCEN at 0 range 5 .. 5;
DMAR at 0 range 6 .. 6;
DMAT at 0 range 7 .. 7;
RTSE at 0 range 8 .. 8;
CTSE at 0 range 9 .. 9;
CTSIE at 0 range 10 .. 10;
ONEBIT at 0 range 11 .. 11;
OVRDIS at 0 range 12 .. 12;
DDRE at 0 range 13 .. 13;
DEM at 0 range 14 .. 14;
DEP at 0 range 15 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
SCARCNT at 0 range 17 .. 19;
WUS at 0 range 20 .. 21;
WUFIE at 0 range 22 .. 22;
Reserved_23_31 at 0 range 23 .. 31;
end record;
subtype BRR_DIV_Fraction_Field is STM32_SVD.UInt4;
subtype BRR_DIV_Mantissa_Field is STM32_SVD.UInt12;
-- Baud rate register
type BRR_Register is record
-- fraction of USARTDIV
DIV_Fraction : BRR_DIV_Fraction_Field := 16#0#;
-- mantissa of USARTDIV
DIV_Mantissa : BRR_DIV_Mantissa_Field := 16#0#;
-- unspecified
Reserved_16_31 : STM32_SVD.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BRR_Register use record
DIV_Fraction at 0 range 0 .. 3;
DIV_Mantissa at 0 range 4 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype GTPR_PSC_Field is STM32_SVD.Byte;
subtype GTPR_GT_Field is STM32_SVD.Byte;
-- Guard time and prescaler register
type GTPR_Register is record
-- Prescaler value
PSC : GTPR_PSC_Field := 16#0#;
-- Guard time value
GT : GTPR_GT_Field := 16#0#;
-- unspecified
Reserved_16_31 : STM32_SVD.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for GTPR_Register use record
PSC at 0 range 0 .. 7;
GT at 0 range 8 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype RTOR_RTO_Field is STM32_SVD.UInt24;
subtype RTOR_BLEN_Field is STM32_SVD.Byte;
-- Receiver timeout register
type RTOR_Register is record
-- Receiver timeout value
RTO : RTOR_RTO_Field := 16#0#;
-- Block Length
BLEN : RTOR_BLEN_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RTOR_Register use record
RTO at 0 range 0 .. 23;
BLEN at 0 range 24 .. 31;
end record;
subtype RQR_ABRRQ_Field is STM32_SVD.Bit;
subtype RQR_SBKRQ_Field is STM32_SVD.Bit;
subtype RQR_MMRQ_Field is STM32_SVD.Bit;
subtype RQR_RXFRQ_Field is STM32_SVD.Bit;
subtype RQR_TXFRQ_Field is STM32_SVD.Bit;
-- Request register
type RQR_Register is record
-- Auto baud rate request
ABRRQ : RQR_ABRRQ_Field := 16#0#;
-- Send break request
SBKRQ : RQR_SBKRQ_Field := 16#0#;
-- Mute mode request
MMRQ : RQR_MMRQ_Field := 16#0#;
-- Receive data flush request
RXFRQ : RQR_RXFRQ_Field := 16#0#;
-- Transmit data flush request
TXFRQ : RQR_TXFRQ_Field := 16#0#;
-- unspecified
Reserved_5_31 : STM32_SVD.UInt27 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RQR_Register use record
ABRRQ at 0 range 0 .. 0;
SBKRQ at 0 range 1 .. 1;
MMRQ at 0 range 2 .. 2;
RXFRQ at 0 range 3 .. 3;
TXFRQ at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
subtype ISR_PE_Field is STM32_SVD.Bit;
subtype ISR_FE_Field is STM32_SVD.Bit;
subtype ISR_NF_Field is STM32_SVD.Bit;
subtype ISR_ORE_Field is STM32_SVD.Bit;
subtype ISR_IDLE_Field is STM32_SVD.Bit;
subtype ISR_RXNE_Field is STM32_SVD.Bit;
subtype ISR_TC_Field is STM32_SVD.Bit;
subtype ISR_TXE_Field is STM32_SVD.Bit;
subtype ISR_LBDF_Field is STM32_SVD.Bit;
subtype ISR_CTSIF_Field is STM32_SVD.Bit;
subtype ISR_CTS_Field is STM32_SVD.Bit;
subtype ISR_RTOF_Field is STM32_SVD.Bit;
subtype ISR_EOBF_Field is STM32_SVD.Bit;
subtype ISR_ABRE_Field is STM32_SVD.Bit;
subtype ISR_ABRF_Field is STM32_SVD.Bit;
subtype ISR_BUSY_Field is STM32_SVD.Bit;
subtype ISR_CMF_Field is STM32_SVD.Bit;
subtype ISR_SBKF_Field is STM32_SVD.Bit;
subtype ISR_RWU_Field is STM32_SVD.Bit;
subtype ISR_WUF_Field is STM32_SVD.Bit;
subtype ISR_TEACK_Field is STM32_SVD.Bit;
subtype ISR_REACK_Field is STM32_SVD.Bit;
-- Interrupt & status register
type ISR_Register is record
-- Read-only. Parity error
PE : ISR_PE_Field;
-- Read-only. Framing error
FE : ISR_FE_Field;
-- Read-only. Noise detected flag
NF : ISR_NF_Field;
-- Read-only. Overrun error
ORE : ISR_ORE_Field;
-- Read-only. Idle line detected
IDLE : ISR_IDLE_Field;
-- Read-only. Read data register not empty
RXNE : ISR_RXNE_Field;
-- Read-only. Transmission complete
TC : ISR_TC_Field;
-- Read-only. Transmit data register empty
TXE : ISR_TXE_Field;
-- Read-only. LIN break detection flag
LBDF : ISR_LBDF_Field;
-- Read-only. CTS interrupt flag
CTSIF : ISR_CTSIF_Field;
-- Read-only. CTS flag
CTS : ISR_CTS_Field;
-- Read-only. Receiver timeout
RTOF : ISR_RTOF_Field;
-- Read-only. End of block flag
EOBF : ISR_EOBF_Field;
-- unspecified
Reserved_13_13 : STM32_SVD.Bit;
-- Read-only. Auto baud rate error
ABRE : ISR_ABRE_Field;
-- Read-only. Auto baud rate flag
ABRF : ISR_ABRF_Field;
-- Read-only. Busy flag
BUSY : ISR_BUSY_Field;
-- Read-only. character match flag
CMF : ISR_CMF_Field;
-- Read-only. Send break flag
SBKF : ISR_SBKF_Field;
-- Read-only. Receiver wakeup from Mute mode
RWU : ISR_RWU_Field;
-- Read-only. Wakeup from Stop mode flag
WUF : ISR_WUF_Field;
-- Read-only. Transmit enable acknowledge flag
TEACK : ISR_TEACK_Field;
-- Read-only. Receive enable acknowledge flag
REACK : ISR_REACK_Field;
-- unspecified
Reserved_23_31 : STM32_SVD.UInt9;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ISR_Register use record
PE at 0 range 0 .. 0;
FE at 0 range 1 .. 1;
NF at 0 range 2 .. 2;
ORE at 0 range 3 .. 3;
IDLE at 0 range 4 .. 4;
RXNE at 0 range 5 .. 5;
TC at 0 range 6 .. 6;
TXE at 0 range 7 .. 7;
LBDF at 0 range 8 .. 8;
CTSIF at 0 range 9 .. 9;
CTS at 0 range 10 .. 10;
RTOF at 0 range 11 .. 11;
EOBF at 0 range 12 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
ABRE at 0 range 14 .. 14;
ABRF at 0 range 15 .. 15;
BUSY at 0 range 16 .. 16;
CMF at 0 range 17 .. 17;
SBKF at 0 range 18 .. 18;
RWU at 0 range 19 .. 19;
WUF at 0 range 20 .. 20;
TEACK at 0 range 21 .. 21;
REACK at 0 range 22 .. 22;
Reserved_23_31 at 0 range 23 .. 31;
end record;
subtype ICR_PECF_Field is STM32_SVD.Bit;
subtype ICR_FECF_Field is STM32_SVD.Bit;
subtype ICR_NCF_Field is STM32_SVD.Bit;
subtype ICR_ORECF_Field is STM32_SVD.Bit;
subtype ICR_IDLECF_Field is STM32_SVD.Bit;
subtype ICR_TCCF_Field is STM32_SVD.Bit;
subtype ICR_LBDCF_Field is STM32_SVD.Bit;
subtype ICR_CTSCF_Field is STM32_SVD.Bit;
subtype ICR_RTOCF_Field is STM32_SVD.Bit;
subtype ICR_EOBCF_Field is STM32_SVD.Bit;
subtype ICR_CMCF_Field is STM32_SVD.Bit;
subtype ICR_WUCF_Field is STM32_SVD.Bit;
-- Interrupt flag clear register
type ICR_Register is record
-- Parity error clear flag
PECF : ICR_PECF_Field := 16#0#;
-- Framing error clear flag
FECF : ICR_FECF_Field := 16#0#;
-- Noise detected clear flag
NCF : ICR_NCF_Field := 16#0#;
-- Overrun error clear flag
ORECF : ICR_ORECF_Field := 16#0#;
-- Idle line detected clear flag
IDLECF : ICR_IDLECF_Field := 16#0#;
-- unspecified
Reserved_5_5 : STM32_SVD.Bit := 16#0#;
-- Transmission complete clear flag
TCCF : ICR_TCCF_Field := 16#0#;
-- unspecified
Reserved_7_7 : STM32_SVD.Bit := 16#0#;
-- LIN break detection clear flag
LBDCF : ICR_LBDCF_Field := 16#0#;
-- CTS clear flag
CTSCF : ICR_CTSCF_Field := 16#0#;
-- unspecified
Reserved_10_10 : STM32_SVD.Bit := 16#0#;
-- Receiver timeout clear flag
RTOCF : ICR_RTOCF_Field := 16#0#;
-- End of timeout clear flag
EOBCF : ICR_EOBCF_Field := 16#0#;
-- unspecified
Reserved_13_16 : STM32_SVD.UInt4 := 16#0#;
-- Character match clear flag
CMCF : ICR_CMCF_Field := 16#0#;
-- unspecified
Reserved_18_19 : STM32_SVD.UInt2 := 16#0#;
-- Wakeup from Stop mode clear flag
WUCF : ICR_WUCF_Field := 16#0#;
-- unspecified
Reserved_21_31 : STM32_SVD.UInt11 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ICR_Register use record
PECF at 0 range 0 .. 0;
FECF at 0 range 1 .. 1;
NCF at 0 range 2 .. 2;
ORECF at 0 range 3 .. 3;
IDLECF at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
TCCF at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
LBDCF at 0 range 8 .. 8;
CTSCF at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
RTOCF at 0 range 11 .. 11;
EOBCF at 0 range 12 .. 12;
Reserved_13_16 at 0 range 13 .. 16;
CMCF at 0 range 17 .. 17;
Reserved_18_19 at 0 range 18 .. 19;
WUCF at 0 range 20 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
subtype RDR_RDR_Field is STM32_SVD.UInt9;
-- Receive data register
type RDR_Register is record
-- Read-only. Receive data value
RDR : RDR_RDR_Field;
-- unspecified
Reserved_9_31 : STM32_SVD.UInt23;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RDR_Register use record
RDR at 0 range 0 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype TDR_TDR_Field is STM32_SVD.UInt9;
-- Transmit data register
type TDR_Register is record
-- Transmit data value
TDR : TDR_TDR_Field := 16#0#;
-- unspecified
Reserved_9_31 : STM32_SVD.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TDR_Register use record
TDR at 0 range 0 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Universal synchronous asynchronous receiver transmitter
type USART_Peripheral is record
-- Control register 1
CR1 : aliased CR1_Register;
-- Control register 2
CR2 : aliased CR2_Register;
-- Control register 3
CR3 : aliased CR3_Register;
-- Baud rate register
BRR : aliased BRR_Register;
-- Guard time and prescaler register
GTPR : aliased GTPR_Register;
-- Receiver timeout register
RTOR : aliased RTOR_Register;
-- Request register
RQR : aliased RQR_Register;
-- Interrupt & status register
ISR : aliased ISR_Register;
-- Interrupt flag clear register
ICR : aliased ICR_Register;
-- Receive data register
RDR : aliased RDR_Register;
-- Transmit data register
TDR : aliased TDR_Register;
end record
with Volatile;
for USART_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
CR3 at 16#8# range 0 .. 31;
BRR at 16#C# range 0 .. 31;
GTPR at 16#10# range 0 .. 31;
RTOR at 16#14# range 0 .. 31;
RQR at 16#18# range 0 .. 31;
ISR at 16#1C# range 0 .. 31;
ICR at 16#20# range 0 .. 31;
RDR at 16#24# range 0 .. 31;
TDR at 16#28# range 0 .. 31;
end record;
-- Universal synchronous asynchronous receiver transmitter
USART1_Periph : aliased USART_Peripheral
with Import, Address => System'To_Address (16#40013800#);
-- Universal synchronous asynchronous receiver transmitter
USART2_Periph : aliased USART_Peripheral
with Import, Address => System'To_Address (16#40004400#);
-- Universal synchronous asynchronous receiver transmitter
USART3_Periph : aliased USART_Peripheral
with Import, Address => System'To_Address (16#40004800#);
-- Universal synchronous asynchronous receiver transmitter
USART4_Periph : aliased USART_Peripheral
with Import, Address => System'To_Address (16#40004C00#);
end STM32_SVD.USART;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . F I N A L I Z A T I O N _ R O O T --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2012, 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 unit provides the basic support for controlled (finalizable) types
package System.Finalization_Root is
pragma Preelaborate;
-- The base for types Controlled and Limited_Controlled declared in Ada.
-- Finalization.
type Root_Controlled is abstract tagged null record;
procedure Adjust (Object : in out Root_Controlled);
procedure Finalize (Object : in out Root_Controlled);
procedure Initialize (Object : in out Root_Controlled);
end System.Finalization_Root;
|
with Basic_Subprogram_Calls.Child;
with Other_Basic_Subprogram_Calls;
with Subprogram_Unit;
with Subprogram_Unit_2;
package body Basic_Subprogram_Calls is
function F7 return Integer;
function F8 return Integer is
begin
return 42;
end F8;
function F9 return Integer;
function F9 return Integer is
begin
return 42;
end F9;
function F12 return Integer is separate;
procedure P4 is separate;
function F13(I : Integer) return Integer renames F2;
function F14 return Integer renames F12;
procedure P5(I : Integer := F14) renames P3;
procedure P6 renames P4;
procedure Test is
I : Integer := F10;
begin
I := F1;
I := F2(42);
I := F3;
I := F3(42);
I := F4;
I := F5(42);
I := F6;
I := F6(42);
I := F7;
I := F8;
I := F9;
declare
J : Integer;
begin
J := F1;
end;
Label:
declare
J : Integer;
begin
J := F2(F12);
end Label;
P1;
P2(42);
P3;
P3(F11);
P4;
end Test;
function F1 return Integer is
begin
return 42;
end F1;
function F2(I : Integer) return Integer is
begin
return I;
end F2;
function F3(I : Integer := 42) return Integer is
begin
return I;
end F3;
function F7 return Integer is
begin
return 42;
end F7;
procedure P1 is
begin
null;
end P1;
procedure P2(I : Integer) is
begin
null;
end P2;
procedure P3(I : Integer := F1) is
J : Integer;
begin
J := F13(I);
J := F14;
P5;
P5(J);
P6;
J := Nested.Nested_F1;
Nested.Nested_P1;
declare
use Nested;
begin
J := Nested.Nested_F1;
Nested.Nested_P1;
end;
P7;
P8;
J := Child.Child_F1;
Child.Child_P1;
J := Other_Basic_Subprogram_Calls.Other_F1;
Other_Basic_Subprogram_Calls.Other_P1;
declare
use Child;
use Other_Basic_Subprogram_Calls;
begin
J := Child_F1;
Child_P1;
J := Other_F1;
Other_P1;
end;
end P3;
package body Nested is
function Nested_F1 return Integer is
begin
return 42;
end Nested_F1;
procedure Nested_P1 is
I : Integer := 42;
S : String := I'Image;
F : access function return Integer := Other_Basic_Subprogram_Calls.Other_F1'Access;
P : access procedure := Other_Basic_Subprogram_Calls.Other_P1'Access;
begin
P := Nested_P1'Access;
P := Nested_P1'Access;
P := P1'Access;
P := P7'Access;
F := F1'Access;
F := F4'Access;
F := F14'Access;
F := F12'Access;
end Nested_P1;
end Nested;
package Nested_Renamed renames Nested;
procedure P8 is null;
function F_Overload(I: Integer) return Integer is
begin
return I;
end F_Overload;
function F_Overload(B: Boolean) return Integer is
begin
return 42;
end F_Overload;
function F_Overload(I: Integer) return Boolean is
begin
return True;
end F_Overload;
procedure P_Overload(I : Integer) is
begin
null;
end P_Overload;
procedure P_Overload(B : in out Boolean) is
I : Integer;
begin
B := F_Overload(42);
I := F_Overload(B);
I := F_Overload(I);
P_Overload(B);
P_Overload(I);
Nested_Renamed.Nested_P1;
I := Nested_Renamed.Nested_F1;
end P_Overload;
procedure Test3 is
A : array (1 .. 5) of Integer;
type PAT is array (Integer range <>) of access procedure;
function F1 return access PAT is
begin
return new PAT(1 .. 5);
end F1;
function F2(I : Integer) return access PAT is
begin
return new PAT(1 .. I);
end F2;
begin
A(3) := 42;
F1(2) := Other_Basic_Subprogram_Calls.Other_P1'Access;
F2(42)(2) := Other_Basic_Subprogram_Calls.Other_P1'Access;
F2(42)(2) := F1(3);
A(2) := A(3);
end Test3;
function F_Internal return Integer is separate;
procedure Test4 is
Exception_Declaration_Name : exception;
begin
Statement_Identifier_Name:
begin
Test3;
exception
when Choice_Parameter_Specification_Name: Exception_Declaration_Name =>
raise;
end Statement_Identifier_Name;
<<Label_Statement_Identifier_Name>> Test3;
end Test4;
X : aliased Integer := F9;
Y : array (1 .. 5) of access Integer;
procedure AnonSubp(F : access function(X, Y: Integer) return Integer) is null;
function AnonReturn return access Integer is
begin
return X'Access;
end AnonReturn;
begin
Subprogram_Unit;
Subprogram_Unit_2;
end Basic_Subprogram_Calls;
|
-- C45251A.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 FOR RELATIONAL OPERATIONS ON FIXED POINT TYPES THE
-- FOLLOWING HOLD:
-- (A) A /= B IS THE SAME AS NOT (A = B).
-- (B) A < B IS THE SAME AS NOT (A >= B).
-- (C) A > B IS THE SAME AS NOT (A <= B).
-- (D) ADJACENT MODEL NUMBERS GIVE CORRECT RESULTS.
-- (E) NON-MODEL NUMBERS WITH DISTINCT MODEL INTERVALS GIVE
-- CORRECT RESULTS.
-- (F) CASE WHERE MODEL INTERVALS INTERSECT IN A SINGLE MODEL
-- NUMBER GIVES CORRECT RESULT.
-- CASE A: BASIC TYPES THAT FIT THE CHARACTERISTICS OF DURATION'BASE.
-- WRG 8/26/86
WITH REPORT; USE REPORT;
PROCEDURE C45251A IS
-- THE NAME OF EACH TYPE OR SUBTYPE ENDS WITH THAT TYPE'S
-- 'MANTISSA VALUE.
TYPE LIKE_DURATION_M23 IS DELTA 0.020 RANGE -86_400.0 .. 86_400.0;
TYPE DECIMAL_M4 IS DELTA 100.0 RANGE -1000.0 .. 1000.0;
BEGIN
TEST ("C45251A", "CHECK RELATIONAL OPERATIONS FOR FIXED POINT " &
"TYPES - BASIC TYPES");
-------------------------------------------------------------------
DECLARE
A, B : LIKE_DURATION_M23 := 0.0;
C, D : DECIMAL_M4 := 0.0;
BEGIN
IF EQUAL (3, 3) THEN
A := 2#0.0000_0011#; -- JUST BELOW LIKE_DURATION'SMALL.
B := 2#0.0000_0101#; -- JUST ABOVE LIKE_DURATION'SMALL.
END IF;
-- (A)
IF A /= B XOR NOT (A = B) THEN
FAILED ("A /= B IS NOT THE SAME AS NOT (A = B)");
END IF;
-- (B)
IF A < B XOR NOT (A >= B) THEN
FAILED ("A < B IS NOT THE SAME AS NOT (A >= B)");
END IF;
-- (C)
IF A > B XOR NOT (A <= B) THEN
FAILED ("A > B IS NOT THE SAME AS NOT (A <= B)");
END IF;
-- (D)
IF EQUAL (3, 3) THEN
A := -(16#1_5180.00#); -- (-86_400.0)
B := -(16#1_517F.FC#); -- (-86_400.0 + 1.0/64)
C := 64.0; -- DECIMAL_M4'SMALL.
D := 128.0; -- 2 * DECIMAL_M4'SMALL.
END IF;
IF "=" (LEFT => A, RIGHT => B) THEN
FAILED ("ADJACENT MODEL NUMBERS GIVE INCORRECT RESULT " &
"- (A = B)");
END IF;
IF NOT "/=" (LEFT => C, RIGHT => D) THEN
FAILED ("ADJACENT MODEL NUMBERS GIVE INCORRECT RESULT " &
"- (C /= D)");
END IF;
IF "<" (LEFT => B, RIGHT => A) THEN
FAILED ("ADJACENT MODEL NUMBERS GIVE INCORRECT RESULT " &
"- (B < A)");
END IF;
IF ">" (LEFT => C, RIGHT => D) THEN
FAILED ("ADJACENT MODEL NUMBERS GIVE INCORRECT RESULT " &
"- (C > D)");
END IF;
IF ">=" (LEFT => A, RIGHT => B) THEN
FAILED ("ADJACENT MODEL NUMBERS GIVE INCORRECT RESULT " &
"- (A >= B)");
END IF;
IF "<=" (LEFT => D, RIGHT => C) THEN
FAILED ("ADJACENT MODEL NUMBERS GIVE INCORRECT RESULT " &
"- (D <= C)");
END IF;
-- (E)
IF EQUAL (3, 3) THEN
A := 0.02; -- INTERVAL IS 1.0/64 .. 2.0/64.
B := -0.02; -- INTERVAL IS -2.0/64 .. -1.0/64.
C := 800.0; -- INTERVAL IS 768.0 .. 832.0.
D := 900.0; -- INTERVAL IS 896.0 .. 960.0.
END IF;
IF A = B THEN
FAILED ("NON-MODEL NUMBERS WITH DISTINCT MODEL " &
"INTERVALS GIVE INCORRECT RESULT - (A = B)");
END IF;
IF NOT (C /= D) THEN
FAILED ("NON-MODEL NUMBERS WITH DISTINCT MODEL " &
"INTERVALS GIVE INCORRECT RESULT - (C /= D)");
END IF;
IF A < B THEN
FAILED ("NON-MODEL NUMBERS WITH DISTINCT MODEL " &
"INTERVALS GIVE INCORRECT RESULT - (A < B)");
END IF;
IF C > D THEN
FAILED ("NON-MODEL NUMBERS WITH DISTINCT MODEL " &
"INTERVALS GIVE INCORRECT RESULT - (C > D)");
END IF;
IF B >= A THEN
FAILED ("NON-MODEL NUMBERS WITH DISTINCT MODEL " &
"INTERVALS GIVE INCORRECT RESULT - (B >= A)");
END IF;
IF D <= C THEN
FAILED ("NON-MODEL NUMBERS WITH DISTINCT MODEL " &
"INTERVALS GIVE INCORRECT RESULT - (D <= C)");
END IF;
-- (F)
IF EQUAL (3, 3) THEN
B := 0.035; -- INTERVAL IS 2.0/64 .. 3.0/64.
C := 850.0; -- INTERVAL IS 832.0 .. 896.0.
END IF;
IF NOT (A <= B) THEN
FAILED ("COMPARISON OF NON-MODEL NUMBERS WITH ONE " &
"COMMON MODEL INTERVAL END-POINT GIVES " &
"INCORRECT RESULT - (A <= B)");
END IF;
IF A > B THEN
FAILED ("COMPARISON OF NON-MODEL NUMBERS WITH ONE " &
"COMMON MODEL INTERVAL END-POINT GIVES " &
"INCORRECT RESULT - (A > B)");
END IF;
IF NOT (D >= C) THEN
FAILED ("COMPARISON OF NON-MODEL NUMBERS WITH ONE " &
"COMMON MODEL INTERVAL END-POINT GIVES " &
"INCORRECT RESULT - (D >= C)");
END IF;
IF D < C THEN
FAILED ("COMPARISON OF NON-MODEL NUMBERS WITH ONE " &
"COMMON MODEL INTERVAL END-POINT GIVES " &
"INCORRECT RESULT - (D < C)");
END IF;
END;
-------------------------------------------------------------------
RESULT;
END C45251A;
|
with
openGL.Geometry;
package openGL.Model.capsule.lit_colored_textured
--
-- Models a lit, colored and textured capsule.
--
is
type Item is new Model.capsule.item with
record
Radius : Real;
Height : Real;
Color : lucid_Color;
Image : asset_Name := null_Asset;
end record;
type View is access all Item'Class;
---------
--- Forge
--
function new_Capsule (Radius : in Real;
Height : in Real;
Color : in lucid_Color;
Image : in asset_Name := null_Asset) return View;
--------------
--- Attributes
--
overriding
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
end openGL.Model.capsule.lit_colored_textured;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.