hexsha
stringlengths 40
40
| size
int64 3
1.05M
| ext
stringclasses 163
values | lang
stringclasses 53
values | max_stars_repo_path
stringlengths 3
945
| max_stars_repo_name
stringlengths 4
112
| max_stars_repo_head_hexsha
stringlengths 40
78
| max_stars_repo_licenses
sequencelengths 1
10
| max_stars_count
float64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 3
945
| max_issues_repo_name
stringlengths 4
113
| max_issues_repo_head_hexsha
stringlengths 40
78
| max_issues_repo_licenses
sequencelengths 1
10
| max_issues_count
float64 1
116k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 3
945
| max_forks_repo_name
stringlengths 4
113
| max_forks_repo_head_hexsha
stringlengths 40
78
| max_forks_repo_licenses
sequencelengths 1
10
| max_forks_count
float64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 3
1.05M
| avg_line_length
float64 1
966k
| max_line_length
int64 1
977k
| alphanum_fraction
float64 0
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0e9711d0551acd83b2afada5e85e16f3bad13f11 | 1,301 | ads | Ada | ada/philosophers.ads | rtoal/enhanced-dining-philosophers | e5305fb975e8eb5a3d6bbbc1ae0a798d278a074d | [
"MIT"
] | null | null | null | ada/philosophers.ads | rtoal/enhanced-dining-philosophers | e5305fb975e8eb5a3d6bbbc1ae0a798d278a074d | [
"MIT"
] | null | null | null | ada/philosophers.ads | rtoal/enhanced-dining-philosophers | e5305fb975e8eb5a3d6bbbc1ae0a798d278a074d | [
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- philosophers.ads
--
-- This package supplies a task type for the Philosophers in the Enhanced
-- Dining Philosophers simulation. It also defines an array of philosophers.
--
-- Entries:
--
-- Here_Is_Your_Name (Name) assigns the name Name to the philosopher.
-- Here_Is_Your_Food gives the philosopher what she ordered.
--
-- Behavior:
--
-- First the philosopher waits for a name, then enters a life cycle of com-
-- ing into the restaurant, thinking, ordering, then ((eating and paying) or
-- (getting a coupon) or (complaining)), then leaving.
--
-- Termination:
--
-- A philosopher "dies" be running out of money and just reaching the end of
-- its task body.
--
-- Note:
--
-- To keep the simulation from running too long, philosophers start with $30
-- and coupons are worth $5.
------------------------------------------------------------------------------
with Names, Orders;
use Names, Orders;
package Philosophers is
task type Philosopher is
entry Here_Is_Your_Name (Name: Philosopher_Name);
entry Here_Is_Your_Food;
end Philosopher;
Philosopher_Array : array (Philosopher_Name) of Philosopher;
end Philosophers;
| 30.97619 | 79 | 0.604151 |
df94b8c3727e7d82dd8cc7c92d5f19d7322c6854 | 739 | adb | Ada | 4-high/gel/applet/demo/hello_gel/launch_hello_gel.adb | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | 1 | 2022-01-20T07:13:42.000Z | 2022-01-20T07:13:42.000Z | 4-high/gel/applet/demo/hello_gel/launch_hello_gel.adb | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | 4-high/gel/applet/demo/hello_gel/launch_hello_gel.adb | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | with
gel.Applet.gui_world,
gel.Forge,
gel.Window.setup,
ada.Text_IO,
ada.Exceptions;
pragma unreferenced (gel.Window.setup);
procedure launch_hello_GEL
--
-- Opens a GEL window.
--
is
use gel.Applet.gui_world,
ada.Text_IO;
the_Applet : gel.Applet.gui_World.view := gel.Forge.new_gui_Applet ("Hello GEL");
begin
while the_Applet.is_open
loop
the_Applet.gui_World.evolve; -- Evolve the world.
the_Applet.freshen; -- Handle any new events and update the screen.
end loop;
free (the_Applet);
exception
when E : others =>
put_Line ("Exception in Environment task");
put_Line (ada.Exceptions.Exception_Information (E));
end launch_hello_GEL;
| 20.527778 | 86 | 0.668471 |
cb20f4f87d99f451ab7e89031012e91cd205eb74 | 3,662 | ads | Ada | source/RASCAL-Flex.ads | bracke/Meaning | 709f609df916aa9442f9b75c7dcb62ab807a48e9 | [
"MIT"
] | null | null | null | source/RASCAL-Flex.ads | bracke/Meaning | 709f609df916aa9442f9b75c7dcb62ab807a48e9 | [
"MIT"
] | null | null | null | source/RASCAL-Flex.ads | bracke/Meaning | 709f609df916aa9442f9b75c7dcb62ab807a48e9 | [
"MIT"
] | null | null | null | --------------------------------------------------------------------------------
-- --
-- Copyright (C) 2004, RISC OS Ada Library (RASCAL) developers. --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU Lesser General Public --
-- License as published by the Free Software Foundation; either --
-- version 2.1 of the License, or (at your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- Lesser General Public License for more details. --
-- --
-- You should have received a copy of the GNU Lesser General Public --
-- License along with this library; if not, write to the Free Software --
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --
-- --
--------------------------------------------------------------------------------
-- @brief Thin binding to the Flex shifting heap.
-- $Author$
-- $Date$
-- $Revision$
with RASCAL.OS; use RASCAL.OS;
with System; use System;
with Kernel;
package RASCAL.Flex is
subtype Flex_Ptr is Kernel.void_ptr_ptr;
--
-- Allocates 'Bytes' bytes of store, obtained from the Wimp.
--
function Alloc (Anchor : in Flex_Ptr;
Bytes : in Integer) return Integer;
--
-- Frees the previously allocated store.
--
procedure Free (Anchor : in Flex_Ptr);
--
-- Informs caller of the number of bytes allocated
--
function Get_Size (Anchor : in Flex_Ptr) return Integer;
--
-- Extend ot truncate the store area to have a new size.
--
function Extend (Anchor : in Flex_Ptr;
New_Size : in Integer) return Integer;
--
-- Extend or truncate store, at any point.
--
function Mid_Extend (Anchor : in Flex_Ptr;
Location : in Integer;
Extent : in Integer) return Integer;
--
-- Move the anchor of an allocated block.
--
function Re_Anchor (To : in Flex_Ptr;
From : in Flex_Ptr) return Integer;
--
-- Set whether to move the flex store when the runtime needs to extend the heap.
--
function Set_Budge (New_State : Integer) return Integer;
--
-- Initialise store allocation module.
--
procedure Init (Program_Name : in String;
Errors : in Messages_Handle_Type;
Max_DA_Size : in Integer := 0);
--
-- Appends information about the flex heap to the passed file.
--
procedure Save_HeapInfo (Filename : in String);
--
-- Compacts the flex heap.
--
function Compact return Integer;
--
-- Sets whether flex should compact its heap on every flex_free or on flex_alloc and flex_compact, flex_budge and flex_extend.
--
function Set_Deferred_Compaction (New_State : Integer) return Integer;
private
end RASCAL.Flex; | 37.367347 | 129 | 0.504915 |
0ed10d457a0bc048a7060a410bdad79bdbb6b8aa | 10,191 | ads | Ada | src/libriscv-sim-hart.ads | Fabien-Chouteau/libriscv | eed3ddf24a9682a95f9d315650b753577853eb92 | [
"BSD-3-Clause"
] | null | null | null | src/libriscv-sim-hart.ads | Fabien-Chouteau/libriscv | eed3ddf24a9682a95f9d315650b753577853eb92 | [
"BSD-3-Clause"
] | null | null | null | src/libriscv-sim-hart.ads | Fabien-Chouteau/libriscv | eed3ddf24a9682a95f9d315650b753577853eb92 | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2019, Fabien Chouteau --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with LibRISCV.Sim.Memory_Bus;
with LibRISCV.Except;
with LibRISCV.CSR;
private with LibRISCV.Instructions;
package LibRISCV.Sim.Hart
with SPARK_Mode => On
is
type Breakpoint_Number is range 0 .. 100;
type Instance
(Number_Of_Breakpoints : Breakpoint_Number := 1)
is tagged limited private;
subtype Class is Instance'Class;
type Ptr is access all Class;
procedure Reset (This : in out Instance);
procedure Cycle (This : in out Instance;
Bus : in out Sim.Memory_Bus.Class);
type State_Kind is (Running, Debug_Halt, Single_Step);
function State (This : Instance) return State_Kind;
type Halt_Source_Kind is (None, Single_Step, Breakpoint, Watchpoint);
function Halt_Source (This : in out Instance) return Halt_Source_Kind
with Pre => This.State = Debug_Halt;
procedure Halt (This : in out Instance)
with Post => This.State = Debug_Halt;
procedure Resume (This : in out Instance)
with Pre => This.State = Debug_Halt;
procedure Single_Step (This : in out Instance)
with Post => This.State = Single_Step;
function Read_GPR (This : Instance; Id : GPR_Id) return Register;
procedure Write_GPR (This : in out Instance; Id : GPR_Id; Value : Register);
function Read_PC (This : Instance) return Register;
procedure Write_PC (This : in out Instance; Addr : Register);
procedure Set_Debugger_Attached (This : in out Instance;
Attached : Boolean := True);
function Debug_Read_CSR (This : Instance; Id : CSR.Id) return Register;
procedure Add_Breakpoint (This : in out Instance;
Addr : Address;
Success : out Boolean);
procedure Remove_Breakpoint (This : in out Instance;
Addr : Address;
Success : out Boolean);
procedure Dump (This : Instance);
type Privilege_Level is (User, Machine)
with Size => 2;
private
for Privilege_Level use (User => 0,
Machine => 3);
type GPR_Array is array (GPR_Id) of Register;
type CSR_Array is array (CSR.Name) of Register;
type Breakpoint_Rec is record
Enabled : Boolean := False;
Addr : Address;
end record;
type Breakpoint_Array is array (Breakpoint_Number range <>) of Breakpoint_Rec;
type Instance
(Number_Of_Breakpoints : Breakpoint_Number := 1)
is tagged limited record
Privilege : Privilege_Level := Machine;
State : State_Kind := Debug_Halt;
Halt_Src : Halt_Source_Kind := None;
PC : Register;
Next_PC : Register;
Mcause : Except.Kind;
Mepc : U_Register;
GPR : GPR_Array;
CSRs : CSR_Array;
Debugger_Attached : Boolean := False;
Breakpoints : Breakpoint_Array (1 .. Number_Of_Breakpoints);
end record
with Type_Invariant => Instance.GPR (0).U = 0;
type Branch_Condition is (Cond_EQ, Cond_NE, Cond_LT, Cond_GE, Cond_GEU,
Cond_LTU);
procedure Fetch (This : in out Instance;
Bus : in out Sim.Memory_Bus.Class;
Raw_Insn : out Word;
Success : out Boolean);
function Evaluate (Cond : Branch_Condition;
R1, R2 : Register)
return Boolean;
procedure Raise_Exception (This : in out Instance;
E : Except.Kind;
tval : U_Register := 0);
procedure Read_CSR (This : in out Instance;
Data : out Register;
Id : CSR.Id);
procedure Write_CSR (This : in out Instance;
Data : Register;
Id : CSR.Id);
procedure Exec_Branch (This : in out Instance;
Insn : Instructions.Instruction)
with Pre => Insn.Kind in Instructions.B_Insn_Kind;
procedure Exec_Instruction (This : in out Instance; Raw : Word; Bus : in out Sim.Memory_Bus.Class);
procedure Exec_Invalid (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLLI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SRLI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SRAI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_ADD (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SUB (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLL (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLT (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLTU (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_XOR (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SRL (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SRA (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_OR (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_AND (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SB (This : in out Instance; Insn : Instructions.Instruction; Bus : in out Sim.Memory_Bus.Class);
procedure Exec_SH (This : in out Instance; Insn : Instructions.Instruction; Bus : in out Sim.Memory_Bus.Class);
procedure Exec_SW (This : in out Instance; Insn : Instructions.Instruction; Bus : in out Sim.Memory_Bus.Class);
procedure Exec_JALR (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_LB (This : in out Instance; Insn : Instructions.Instruction; Bus : Sim.Memory_Bus.Class);
procedure Exec_LH (This : in out Instance; Insn : Instructions.Instruction; Bus : Sim.Memory_Bus.Class);
procedure Exec_LW (This : in out Instance; Insn : Instructions.Instruction; Bus : Sim.Memory_Bus.Class);
procedure Exec_LBU (This : in out Instance; Insn : Instructions.Instruction; Bus : Sim.Memory_Bus.Class);
procedure Exec_LHU (This : in out Instance; Insn : Instructions.Instruction; Bus : Sim.Memory_Bus.Class);
procedure Exec_ADDI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLTI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLTIU (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_XORI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_ORI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_ANDI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_FENCE (This : in out Instance);
procedure Exec_FENCE_I (This : in out Instance);
procedure Exec_ECALL (This : in out Instance);
procedure Exec_EBREAK (This : in out Instance);
procedure Exec_CSRRW (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_CSRRS (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_CSRRC (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_CSRRWI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_CSRRSI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_CSRRCI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_LUI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_AUIPC (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_JAL (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_XRET (This : in out Instance; Insn : Instructions.Instruction);
end LibRISCV.Sim.Hart;
| 48.995192 | 114 | 0.629869 |
1041d5f906e661fc50bac602d6ce3aea52ff3c2d | 4,262 | adb | Ada | src/libriscv-sim-log.adb | Fabien-Chouteau/libriscv | eed3ddf24a9682a95f9d315650b753577853eb92 | [
"BSD-3-Clause"
] | null | null | null | src/libriscv-sim-log.adb | Fabien-Chouteau/libriscv | eed3ddf24a9682a95f9d315650b753577853eb92 | [
"BSD-3-Clause"
] | null | null | null | src/libriscv-sim-log.adb | Fabien-Chouteau/libriscv | eed3ddf24a9682a95f9d315650b753577853eb92 | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2019, Fabien Chouteau --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
package body LibRISCV.Sim.Log is
-------------
-- Set_Arg --
-------------
function Set_Arg (S : String) return Boolean is
function Handle_Item (Item : String) return Boolean is
Enable : constant Boolean := Item (Item'First) /= '-';
Substr : constant String :=
Item ((if not Enable then
Item'First + 1
else Item'First) .. Item'Last);
begin
if Substr = "console" then
Console := Enable;
elsif Substr = "info" then
Info := Enable;
elsif Substr = "decode" then
Decode := Enable;
elsif Substr = "exec" then
Exec := Enable;
elsif Substr = "except" then
Except := Enable;
elsif Substr = "mem" then
Mem_Access := Enable;
elsif Substr = "csr" then
CSRs := Enable;
elsif Substr = "elf" then
Elf := Enable;
else
Put_Line ("Log topics:");
Put_Line (" - console");
Put_Line (" - info");
Put_Line (" - decode");
Put_Line (" - exec");
Put_Line (" - except");
Put_Line (" - mem");
Put_Line (" - csr");
Put_Line (" - elf");
return False;
end if;
return True;
end Handle_Item;
From, To : Integer;
begin
From := S'First;
To := S'First - 1;
loop
To := To + 1;
if To > S'Last or else S (To) = ',' then
if To > From then
if not Handle_Item (S (From .. To - 1)) then
return False;
end if;
end if;
To := To + 1;
From := To;
end if;
exit when To > S'Last;
end loop;
return True;
end Set_Arg;
end LibRISCV.Sim.Log;
| 40.980769 | 78 | 0.476771 |
2074df1933ccfb87ec72b063bab703cb0b909d03 | 8,939 | ads | Ada | source/asis/spec/ada-strings-wide_wide_fixed.ads | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | 4 | 2016-02-05T15:51:56.000Z | 2022-03-25T20:38:32.000Z | source/asis/spec/ada-strings-wide_wide_fixed.ads | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | null | null | null | source/asis/spec/ada-strings-wide_wide_fixed.ads | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- 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) $
with Ada.Strings.Wide_Wide_Maps;
package Ada.Strings.Wide_Wide_Fixed is
pragma Preelaborate (Wide_Wide_Fixed);
-- "Copy" procedure for strings of possibly different lengths
procedure Move (Source : in Wide_Wide_String;
Target : out Wide_Wide_String;
Drop : in Truncation := Error;
Justify : in Alignment := Left;
Pad : in Wide_Wide_Character := Wide_Wide_Space);
-- Search subprograms
function Index (Source : in Wide_Wide_String;
Pattern : in Wide_Wide_String;
From : in Positive;
Going : in Direction := Forward;
Mapping : in Wide_Wide_Maps.Wide_Wide_Character_Mapping
:= Wide_Wide_Maps.Identity)
return Natural;
function Index
(Source : in Wide_Wide_String;
Pattern : in Wide_Wide_String;
From : in Positive;
Going : in Direction := Forward;
Mapping : in Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural;
function Index (Source : in Wide_Wide_String;
Pattern : in Wide_Wide_String;
Going : in Direction := Forward;
Mapping : in Wide_Wide_Maps.Wide_Wide_Character_Mapping
:= Wide_Wide_Maps.Identity)
return Natural;
function Index
(Source : in Wide_Wide_String;
Pattern : in Wide_Wide_String;
Going : in Direction := Forward;
Mapping : in Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural;
function Index (Source : in Wide_Wide_String;
Set : in Wide_Wide_Maps.Wide_Wide_Character_Set;
From : in Positive;
Test : in Membership := Inside;
Going : in Direction := Forward)
return Natural;
function Index (Source : in Wide_Wide_String;
Set : in Wide_Wide_Maps.Wide_Wide_Character_Set;
Test : in Membership := Inside;
Going : in Direction := Forward)
return Natural;
function Index_Non_Blank (Source : in Wide_Wide_String;
From : in Positive;
Going : in Direction := Forward)
return Natural;
function Index_Non_Blank (Source : in Wide_Wide_String;
Going : in Direction := Forward)
return Natural;
function Count (Source : in Wide_Wide_String;
Pattern : in Wide_Wide_String;
Mapping : in Wide_Wide_Maps.Wide_Wide_Character_Mapping
:= Wide_Wide_Maps.Identity)
return Natural;
function Count
(Source : in Wide_Wide_String;
Pattern : in Wide_Wide_String;
Mapping : in Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Natural;
function Count (Source : in Wide_Wide_String;
Set : in Wide_Wide_Maps.Wide_Wide_Character_Set)
return Natural;
procedure Find_Token (Source : in Wide_Wide_String;
Set : in Wide_Wide_Maps.Wide_Wide_Character_Set;
Test : in Membership;
First : out Positive;
Last : out Natural);
-- Wide_Wide_String translation subprograms
function Translate
(Source : in Wide_Wide_String;
Mapping : in Wide_Wide_Maps.Wide_Wide_Character_Mapping)
return Wide_Wide_String;
procedure Translate
(Source : in out Wide_Wide_String;
Mapping : in Wide_Wide_Maps.Wide_Wide_Character_Mapping);
function Translate
(Source : in Wide_Wide_String;
Mapping : in Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
return Wide_Wide_String;
procedure Translate
(Source : in out Wide_Wide_String;
Mapping : in Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function);
-- Wide_Wide_String transformation subprograms
function Replace_Slice (Source : in Wide_Wide_String;
Low : in Positive;
High : in Natural;
By : in Wide_Wide_String)
return Wide_Wide_String;
procedure Replace_Slice (Source : in out Wide_Wide_String;
Low : in Positive;
High : in Natural;
By : in Wide_Wide_String;
Drop : in Truncation := Error;
Justify : in Alignment := Left;
Pad : in Wide_Wide_Character
:= Wide_Wide_Space);
function Insert (Source : in Wide_Wide_String;
Before : in Positive;
New_Item : in Wide_Wide_String)
return Wide_Wide_String;
procedure Insert (Source : in out Wide_Wide_String;
Before : in Positive;
New_Item : in Wide_Wide_String;
Drop : in Truncation := Error);
function Overwrite (Source : in Wide_Wide_String;
Position : in Positive;
New_Item : in Wide_Wide_String)
return Wide_Wide_String;
procedure Overwrite (Source : in out Wide_Wide_String;
Position : in Positive;
New_Item : in Wide_Wide_String;
Drop : in Truncation := Right);
function Delete (Source : in Wide_Wide_String;
From : in Positive;
Through : in Natural)
return Wide_Wide_String;
procedure Delete (Source : in out Wide_Wide_String;
From : in Positive;
Through : in Natural;
Justify : in Alignment := Left;
Pad : in Wide_Wide_Character := Wide_Wide_Space);
-- Wide_Wide_String selector subprograms
function Trim (Source : in Wide_Wide_String;
Side : in Trim_End)
return Wide_Wide_String;
procedure Trim (Source : in out Wide_Wide_String;
Side : in Trim_End;
Justify : in Alignment := Left;
Pad : in Wide_Wide_Character := Wide_Wide_Space);
function Trim (Source : in Wide_Wide_String;
Left : in Wide_Wide_Maps.Wide_Wide_Character_Set;
Right : in Wide_Wide_Maps.Wide_Wide_Character_Set)
return Wide_Wide_String;
procedure Trim (Source : in out Wide_Wide_String;
Left : in Wide_Wide_Maps.Wide_Wide_Character_Set;
Right : in Wide_Wide_Maps.Wide_Wide_Character_Set;
Justify : in Alignment := Strings.Left;
Pad : in Wide_Wide_Character := Wide_Wide_Space);
function Head (Source : in Wide_Wide_String;
Count : in Natural;
Pad : in Wide_Wide_Character := Wide_Wide_Space)
return Wide_Wide_String;
procedure Head (Source : in out Wide_Wide_String;
Count : in Natural;
Justify : in Alignment := Left;
Pad : in Wide_Wide_Character := Wide_Wide_Space);
function Tail (Source : in Wide_Wide_String;
Count : in Natural;
Pad : in Wide_Wide_Character := Wide_Wide_Space)
return Wide_Wide_String;
procedure Tail (Source : in out Wide_Wide_String;
Count : in Natural;
Justify : in Alignment := Left;
Pad : in Wide_Wide_Character := Wide_Wide_Space);
-- Wide_Wide_String constructor functions
function "*" (Left : in Natural;
Right : in Wide_Wide_Character) return Wide_Wide_String;
function "*" (Left : in Natural;
Right : in Wide_Wide_String) return Wide_Wide_String;
end Ada.Strings.Wide_Wide_Fixed;
| 40.631818 | 78 | 0.537085 |
239418cb88ffbd95aac9189d09f94779df583106 | 15,643 | adb | Ada | source/web/spikedog/core/matreshka-servlet_containers.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | null | null | null | source/web/spikedog/core/matreshka-servlet_containers.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/web/spikedog/core/matreshka-servlet_containers.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014-2018, 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.Exceptions;
with Ada.Tags.Generic_Dispatching_Constructor;
with Ada.Text_IO;
with Servlet.Container_Initializers;
with Servlet.Generic_Servlets;
with XML.SAX.File_Input_Sources;
with XML.SAX.Simple_Readers;
with Matreshka.Servlet_Defaults;
with Matreshka.Spikedog_Deployment_Descriptors.Parsers;
package body Matreshka.Servlet_Containers is
use type League.Strings.Universal_String;
function Instantiate_Servlet is
new Ada.Tags.Generic_Dispatching_Constructor
(Servlet.Generic_Servlets.Generic_Servlet,
Servlet.Generic_Servlets.Instantiation_Parameters'Class,
Servlet.Generic_Servlets.Instantiate);
package Loader is
procedure Load
(Container : in out Servlet_Container'Class;
Initializer : out
Servlet.Container_Initializers.Servlet_Container_Initializer_Access);
end Loader;
package body Loader is separate;
------------------
-- Add_Listener --
------------------
overriding procedure Add_Listener
(Self : not null access Servlet_Container;
Listener : not null Servlet.Event_Listeners.Event_Listener_Access)
is
Success : Boolean := False;
begin
if Self.State = Initialized then
raise Servlet.Illegal_State_Exception
with "servlet context has already been initialized";
end if;
-- Check for support of Servlet_Context_Listener interface and register
-- listener in appropriate state of servlet context.
if Listener.all
in Servlet.Context_Listeners.Servlet_Context_Listener'Class
then
if Self.State = Uninitialized then
Self.Context_Listeners.Append
(Servlet.Context_Listeners.Servlet_Context_Listener_Access
(Listener));
Success := True;
else
raise Servlet.Illegal_State_Exception
with "Servlet_Container_Listener can't be added";
end if;
end if;
if not Success then
raise Servlet.Illegal_Argument_Exception
with "listener doesn't supports any of expected interfaces";
end if;
end Add_Listener;
-----------------
-- Add_Servlet --
-----------------
overriding function Add_Servlet
(Self : not null access Servlet_Container;
Name : League.Strings.Universal_String;
Instance : not null access Servlet.Servlets.Servlet'Class)
return access Servlet.Servlet_Registrations.Servlet_Registration'Class
is
use type Matreshka.Servlet_Registrations.Servlet_Access;
Object : constant Matreshka.Servlet_Registrations.Servlet_Access
:= Matreshka.Servlet_Registrations.Servlet_Access (Instance);
Registration :
Matreshka.Servlet_Registrations.Servlet_Registration_Access;
begin
if Self.State = Initialized then
raise Servlet.Illegal_State_Exception
with "servlet context has already been initialized";
end if;
if Name.Is_Empty then
raise Servlet.Illegal_Argument_Exception with "servlet name is empty";
end if;
if Instance.all
not in Servlet.Generic_Servlets.Generic_Servlet'Class
then
raise Servlet.Illegal_Argument_Exception
with "not descedant of base servlet type";
end if;
-- Check whether servlet instance or servlet name was registered.
for Registration of Self.Servlets loop
if Registration.Servlet = Object or Registration.Name = Name then
return null;
end if;
end loop;
Registration :=
new Matreshka.Servlet_Registrations.Servlet_Registration'
(Context => Self,
Name => Name,
Servlet => Object);
Self.Servlets.Insert (Name, Registration);
-- Initialize servlet.
begin
Registration.Servlet.Initialize (Registration);
exception
when X : others =>
Ada.Text_IO.Put_Line
(Ada.Text_IO.Standard_Error,
"Exception during servlet '"
& Name.To_UTF_8_String
& "' initialization:");
Ada.Text_IO.Put_Line
(Ada.Text_IO.Standard_Error,
Ada.Exceptions.Exception_Information (X));
raise;
end;
return Registration;
end Add_Servlet;
--------------
-- Dispatch --
--------------
procedure Dispatch
(Self : not null access Servlet_Container'Class;
Request : not null
Matreshka.Servlet_HTTP_Requests.HTTP_Servlet_Request_Access;
Response : not null
Matreshka.Servlet_HTTP_Responses.HTTP_Servlet_Response_Access)
is
Servlet : Matreshka.Servlet_Registrations.Servlet_Registration_Access;
begin
Self.Dispatch (Request.all, Request.Get_Path, 1, Servlet);
Request.Set_Session_Manager (Self.Session_Manager);
Request.Set_Servlet_Context (Self);
Servlet.Servlet.Service (Request.all, Response.all);
end Dispatch;
--------------
-- Finalize --
--------------
procedure Finalize (Self : not null access Servlet_Container'Class) is
begin
for Listener of reverse Self.Context_Listeners loop
Listener.Context_Destroyed (Self);
end loop;
Self.State := Uninitialized;
end Finalize;
-------------------
-- Get_MIME_Type --
-------------------
overriding function Get_MIME_Type
(Self : Servlet_Container;
Path : League.Strings.Universal_String)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
if Path.Ends_With (".atom") then
return League.Strings.To_Universal_String ("application/atom+xml");
elsif Path.Ends_With (".css") then
return League.Strings.To_Universal_String ("text/css");
elsif Path.Ends_With (".frag") then
return League.Strings.To_Universal_String ("x-shader/x-fragment");
elsif Path.Ends_With (".gif") then
return League.Strings.To_Universal_String ("image/gif");
elsif Path.Ends_With (".html") then
return League.Strings.To_Universal_String ("text/html");
elsif Path.Ends_With (".jpeg") then
return League.Strings.To_Universal_String ("image/jpeg");
elsif Path.Ends_With (".js") then
return League.Strings.To_Universal_String ("text/javascript");
elsif Path.Ends_With (".pdf") then
return League.Strings.To_Universal_String ("application/pdf");
elsif Path.Ends_With (".png") then
return League.Strings.To_Universal_String ("image/png");
elsif Path.Ends_With (".svg") then
return League.Strings.To_Universal_String ("image/svg+xml");
elsif Path.Ends_With (".tiff") then
return League.Strings.To_Universal_String ("image/tiff");
elsif Path.Ends_With (".txt") then
return League.Strings.To_Universal_String ("text/plain");
elsif Path.Ends_With (".vert") then
return League.Strings.To_Universal_String ("x-shader/x-vertex");
elsif Path.Ends_With (".xml") then
-- "text/xml" requires to specify character encoding in Content-Type
-- header, otherwise US-ASCII is used. "application/xml" doesn't
-- require to provide character encoding in Content-Type header, in
-- this case XML processor uses encoding from document.
return League.Strings.To_Universal_String ("application/xml");
else
return League.Strings.Empty_Universal_String;
end if;
end Get_MIME_Type;
-------------------
-- Get_Real_Path --
-------------------
overriding function Get_Real_Path
(Self : Servlet_Container;
Path : League.Strings.Universal_String)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return "install" & Path;
end Get_Real_Path;
------------------------------
-- Get_Servlet_Registration --
------------------------------
overriding function Get_Servlet_Registration
(Self : not null access Servlet_Container;
Servlet_Name : League.Strings.Universal_String)
return access Servlet.Servlet_Registrations.Servlet_Registration'Class is
begin
for Registration of Self.Servlets loop
if Registration.Name = Servlet_Name then
return Registration;
end if;
end loop;
return null;
end Get_Servlet_Registration;
----------------
-- Initialize --
----------------
procedure Initialize
(Self : not null access Servlet_Container'Class;
Server : not null Matreshka.Servlet_Servers.Server_Access;
Success : out Boolean)
is
Source : aliased XML.SAX.File_Input_Sources.File_Input_Source;
Reader : XML.SAX.Simple_Readers.Simple_Reader;
Parser : aliased
Matreshka.Spikedog_Deployment_Descriptors.Parsers
.Deployment_Descriptor_Parser;
Descriptor :
Matreshka.Spikedog_Deployment_Descriptors.Deployment_Descriptor_Access;
Initializer :
Servlet.Container_Initializers.Servlet_Container_Initializer_Access;
Aux : Boolean;
begin
Success := False;
-- Load deployment descriptor.
Descriptor :=
new Matreshka.Spikedog_Deployment_Descriptors.Deployment_Descriptor;
Reader.Set_Input_Source (Source'Unchecked_Access);
Reader.Set_Content_Handler (Parser'Unchecked_Access);
Parser.Set_Deployment_Descriptor (Descriptor);
Source.Open_By_File_Name
(League.Strings.To_Universal_String ("install/WEB-INF/web.xml"));
Reader.Parse;
Source.Close;
-- Start initialization of container.
Self.State := Initialization;
Self.Descriptor := Descriptor;
Server.Set_Container (Self);
-- XXX Can container be connected to server later, after successful
-- initialization?
-- Load and startup application.
begin
Loader.Load (Self.all, Initializer);
Initializer.On_Startup (Self.all);
exception
when X : others =>
Ada.Text_IO.Put_Line
(Ada.Text_IO.Standard_Error,
"Exception during application load/startup:");
Ada.Text_IO.Put_Line
(Ada.Text_IO.Standard_Error,
Ada.Exceptions.Exception_Information (X));
return;
end;
-- Notify ServletContextListeners about initialization of context
for Listener of Self.Context_Listeners loop
Listener.Context_Initialized (Self);
end loop;
-- Instantiate servlets defined by deployment descriptor
for Descriptor of Self.Descriptor.Servlets loop
declare
P : aliased Servlet.Generic_Servlets.Instantiation_Parameters;
S : constant Matreshka.Servlet_Registrations.Servlet_Access
:= new Servlet.Generic_Servlets.Generic_Servlet'Class'
(Instantiate_Servlet
(Ada.Tags.Internal_Tag
(Descriptor.Tag.To_UTF_8_String),
P'Access));
begin
Self.Add_Servlet (Descriptor.Name, S);
end;
end loop;
-- Add URL mappings
for Descriptor of Self.Descriptor.Servlet_Mappings loop
Self.Get_Servlet_Registration
(Descriptor.Name).Add_Mapping (Descriptor.URL_Patterns);
end loop;
Self.State := Initialized;
-- Setup default servlet for context.
Self.Add_Mapping
(new Matreshka.Servlet_Registrations.Servlet_Registration'
(Context => Self,
Name => League.Strings.Empty_Universal_String,
Servlet => new Matreshka.Servlet_Defaults.Default_Servlet),
League.Strings.To_Universal_String ("/"),
Aux);
Success := True;
end Initialize;
-------------------------
-- Set_Session_Manager --
-------------------------
overriding procedure Set_Session_Manager
(Self : in out Servlet_Container;
Manager :
not null Spikedog.HTTP_Session_Managers.HTTP_Session_Manager_Access) is
begin
Self.Session_Manager := Manager;
end Set_Session_Manager;
end Matreshka.Servlet_Containers;
| 35.633257 | 80 | 0.591063 |
dc83e91f10532ef6e0f85449bd1f164c93350009 | 4,664 | ads | Ada | tools/configure/configure-tests-postgresql.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | tools/configure/configure-tests-postgresql.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | tools/configure/configure-tests-postgresql.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Tools 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 test detects parameters to link with PostgreSQL client library.
--
-- It sets following substitutions variables:
-- - HAS_POSTGRESQL
-- - POSTGRESQL_LIBRARY_OPTIONS
------------------------------------------------------------------------------
with Configure.Abstract_Tests;
private with Configure.Component_Switches;
package Configure.Tests.PostgreSQL is
type PostgreSQL_Test is
new Configure.Abstract_Tests.Abstract_Test with private;
overriding function Name (Self : PostgreSQL_Test) return String;
-- Returns name of the test to be used in reports.
overriding function Help
(Self : PostgreSQL_Test) return Unbounded_String_Vector;
-- Returns help information for test.
overriding procedure Execute
(Self : in out PostgreSQL_Test;
Arguments : in out Unbounded_String_Vector);
-- Executes test's actions. All used arguments must be removed from
-- Arguments.
private
type PostgreSQL_Test is
new Configure.Abstract_Tests.Abstract_Test with record
Switches : Configure.Component_Switches.Component_Switches
:= Configure.Component_Switches.Create
(Name => "postgresql",
Description => "PostgreSQL support",
Libdir_Enabled => True);
end record;
end Configure.Tests.PostgreSQL;
| 56.192771 | 78 | 0.475557 |
c596659e356aed17ae458c8241fd7ef022768755 | 319,229 | adb | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/exp_attr.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/exp_attr.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/exp_attr.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E X P _ A T T R --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Aspects; use Aspects;
with Atree; use Atree;
with Checks; use Checks;
with Einfo; use Einfo;
with Elists; use Elists;
with Exp_Atag; use Exp_Atag;
with Exp_Ch2; use Exp_Ch2;
with Exp_Ch3; use Exp_Ch3;
with Exp_Ch6; use Exp_Ch6;
with Exp_Ch9; use Exp_Ch9;
with Exp_Dist; use Exp_Dist;
with Exp_Imgv; use Exp_Imgv;
with Exp_Pakd; use Exp_Pakd;
with Exp_Strm; use Exp_Strm;
with Exp_Put_Image;
with Exp_Tss; use Exp_Tss;
with Exp_Util; use Exp_Util;
with Expander; use Expander;
with Freeze; use Freeze;
with Gnatvsn; use Gnatvsn;
with Itypes; use Itypes;
with Lib; use Lib;
with Namet; use Namet;
with Nmake; use Nmake;
with Nlists; use Nlists;
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_Ch6; use Sem_Ch6;
with Sem_Ch7; use Sem_Ch7;
with Sem_Ch8; use Sem_Ch8;
with Sem_Eval; use Sem_Eval;
with Sem_Res; use Sem_Res;
with Sem_Util; use Sem_Util;
with Sinfo; use Sinfo;
with Snames; use Snames;
with Stand; use Stand;
with Stringt; use Stringt;
with Tbuild; use Tbuild;
with Ttypes; use Ttypes;
with Uintp; use Uintp;
with Uname; use Uname;
with Validsw; use Validsw;
package body Exp_Attr is
-----------------------
-- Local Subprograms --
-----------------------
function Build_Array_VS_Func
(Attr : Node_Id;
Formal_Typ : Entity_Id;
Array_Typ : Entity_Id) return Entity_Id;
-- Validate the components of an array type by means of a function. Return
-- the entity of the validation function. The parameters are as follows:
--
-- * Attr - the 'Valid_Scalars attribute for which the function is
-- generated.
--
-- * Formal_Typ - the type of the generated function's only formal
-- parameter.
--
-- * Array_Typ - the array type whose components are to be validated
function Build_Disp_Get_Task_Id_Call (Actual : Node_Id) return Node_Id;
-- Build a call to Disp_Get_Task_Id, passing Actual as actual parameter
function Build_Record_VS_Func
(Attr : Node_Id;
Formal_Typ : Entity_Id;
Rec_Typ : Entity_Id) return Entity_Id;
-- Validate the components, discriminants, and variants of a record type by
-- means of a function. Return the entity of the validation function. The
-- parameters are as follows:
--
-- * Attr - the 'Valid_Scalars attribute for which the function is
-- generated.
--
-- * Formal_Typ - the type of the generated function's only formal
-- parameter.
--
-- * Rec_Typ - the record type whose internals are to be validated
procedure Compile_Stream_Body_In_Scope
(N : Node_Id;
Decl : Node_Id;
Arr : Entity_Id;
Check : Boolean);
-- The body for a stream subprogram may be generated outside of the scope
-- of the type. If the type is fully private, it may depend on the full
-- view of other types (e.g. indexes) that are currently private as well.
-- We install the declarations of the package in which the type is declared
-- before compiling the body in what is its proper environment. The Check
-- parameter indicates if checks are to be suppressed for the stream body.
-- We suppress checks for array/record reads, since the rule is that these
-- are like assignments, out of range values due to uninitialized storage,
-- or other invalid values do NOT cause a Constraint_Error to be raised.
-- If we are within an instance body all visibility has been established
-- already and there is no need to install the package.
-- This mechanism is now extended to the component types of the array type,
-- when the component type is not in scope and is private, to handle
-- properly the case when the full view has defaulted discriminants.
-- This special processing is ultimately caused by the fact that the
-- compiler lacks a well-defined phase when full views are visible
-- everywhere. Having such a separate pass would remove much of the
-- special-case code that shuffles partial and full views in the middle
-- of semantic analysis and expansion.
procedure Expand_Access_To_Protected_Op
(N : Node_Id;
Pref : Node_Id;
Typ : Entity_Id);
-- An attribute reference to a protected subprogram is transformed into
-- a pair of pointers: one to the object, and one to the operations.
-- This expansion is performed for 'Access and for 'Unrestricted_Access.
procedure Expand_Fpt_Attribute
(N : Node_Id;
Pkg : RE_Id;
Nam : Name_Id;
Args : List_Id);
-- This procedure expands a call to a floating-point attribute function.
-- N is the attribute reference node, and Args is a list of arguments to
-- be passed to the function call. Pkg identifies the package containing
-- the appropriate instantiation of System.Fat_Gen. Float arguments in Args
-- have already been converted to the floating-point type for which Pkg was
-- instantiated. The Nam argument is the relevant attribute processing
-- routine to be called. This is the same as the attribute name, except in
-- the Unaligned_Valid case.
procedure Expand_Fpt_Attribute_R (N : Node_Id);
-- This procedure expands a call to a floating-point attribute function
-- that takes a single floating-point argument. The function to be called
-- is always the same as the attribute name.
procedure Expand_Fpt_Attribute_RI (N : Node_Id);
-- This procedure expands a call to a floating-point attribute function
-- that takes one floating-point argument and one integer argument. The
-- function to be called is always the same as the attribute name.
procedure Expand_Fpt_Attribute_RR (N : Node_Id);
-- This procedure expands a call to a floating-point attribute function
-- that takes two floating-point arguments. The function to be called
-- is always the same as the attribute name.
procedure Expand_Loop_Entry_Attribute (N : Node_Id);
-- Handle the expansion of attribute 'Loop_Entry. As a result, the related
-- loop may be converted into a conditional block. See body for details.
procedure Expand_Min_Max_Attribute (N : Node_Id);
-- Handle the expansion of attributes 'Max and 'Min, including expanding
-- then out if we are in Modify_Tree_For_C mode.
procedure Expand_Pred_Succ_Attribute (N : Node_Id);
-- Handles expansion of Pred or Succ attributes for case of non-real
-- operand with overflow checking required.
procedure Expand_Update_Attribute (N : Node_Id);
-- Handle the expansion of attribute Update
procedure Find_Fat_Info
(T : Entity_Id;
Fat_Type : out Entity_Id;
Fat_Pkg : out RE_Id);
-- Given a floating-point type T, identifies the package containing the
-- attributes for this type (returned in Fat_Pkg), and the corresponding
-- type for which this package was instantiated from Fat_Gen. Error if T
-- is not a floating-point type.
function Find_Stream_Subprogram
(Typ : Entity_Id;
Nam : TSS_Name_Type) return Entity_Id;
-- Returns the stream-oriented subprogram attribute for Typ. For tagged
-- types, the corresponding primitive operation is looked up, else the
-- appropriate TSS from the type itself, or from its closest ancestor
-- defining it, is returned. In both cases, inheritance of representation
-- aspects is thus taken into account.
function Full_Base (T : Entity_Id) return Entity_Id;
-- The stream functions need to examine the underlying representation of
-- composite types. In some cases T may be non-private but its base type
-- is, in which case the function returns the corresponding full view.
function Get_Stream_Convert_Pragma (T : Entity_Id) return Node_Id;
-- Given a type, find a corresponding stream convert pragma that applies to
-- the implementation base type of this type (Typ). If found, return the
-- pragma node, otherwise return Empty if no pragma is found.
function Is_Constrained_Packed_Array (Typ : Entity_Id) return Boolean;
-- Utility for array attributes, returns true on packed constrained
-- arrays, and on access to same.
function Is_Inline_Floating_Point_Attribute (N : Node_Id) return Boolean;
-- Returns true iff the given node refers to an attribute call that
-- can be expanded directly by the back end and does not need front end
-- expansion. Typically used for rounding and truncation attributes that
-- appear directly inside a conversion to integer.
-------------------------
-- Build_Array_VS_Func --
-------------------------
function Build_Array_VS_Func
(Attr : Node_Id;
Formal_Typ : Entity_Id;
Array_Typ : Entity_Id) return Entity_Id
is
Loc : constant Source_Ptr := Sloc (Attr);
Comp_Typ : constant Entity_Id :=
Validated_View (Component_Type (Array_Typ));
function Validate_Component
(Obj_Id : Entity_Id;
Indexes : List_Id) return Node_Id;
-- Process a single component denoted by indexes Indexes. Obj_Id denotes
-- the entity of the validation parameter. Return the check associated
-- with the component.
function Validate_Dimension
(Obj_Id : Entity_Id;
Dim : Int;
Indexes : List_Id) return Node_Id;
-- Process dimension Dim of the array type. Obj_Id denotes the entity
-- of the validation parameter. Indexes is a list where each dimension
-- deposits its loop variable, which will later identify a component.
-- Return the loop associated with the current dimension.
------------------------
-- Validate_Component --
------------------------
function Validate_Component
(Obj_Id : Entity_Id;
Indexes : List_Id) return Node_Id
is
Attr_Nam : Name_Id;
begin
if Is_Scalar_Type (Comp_Typ) then
Attr_Nam := Name_Valid;
else
Attr_Nam := Name_Valid_Scalars;
end if;
-- Generate:
-- if not Array_Typ (Obj_Id) (Indexes)'Valid[_Scalars] then
-- return False;
-- end if;
return
Make_If_Statement (Loc,
Condition =>
Make_Op_Not (Loc,
Right_Opnd =>
Make_Attribute_Reference (Loc,
Prefix =>
Make_Indexed_Component (Loc,
Prefix =>
Unchecked_Convert_To (Array_Typ,
New_Occurrence_Of (Obj_Id, Loc)),
Expressions => Indexes),
Attribute_Name => Attr_Nam)),
Then_Statements => New_List (
Make_Simple_Return_Statement (Loc,
Expression => New_Occurrence_Of (Standard_False, Loc))));
end Validate_Component;
------------------------
-- Validate_Dimension --
------------------------
function Validate_Dimension
(Obj_Id : Entity_Id;
Dim : Int;
Indexes : List_Id) return Node_Id
is
Index : Entity_Id;
begin
-- Validate the component once all dimensions have produced their
-- individual loops.
if Dim > Number_Dimensions (Array_Typ) then
return Validate_Component (Obj_Id, Indexes);
-- Process the current dimension
else
Index :=
Make_Defining_Identifier (Loc, New_External_Name ('J', Dim));
Append_To (Indexes, New_Occurrence_Of (Index, Loc));
-- Generate:
-- for J1 in Array_Typ (Obj_Id)'Range (1) loop
-- for JN in Array_Typ (Obj_Id)'Range (N) loop
-- if not Array_Typ (Obj_Id) (Indexes)'Valid[_Scalars]
-- then
-- return False;
-- end if;
-- end loop;
-- end loop;
return
Make_Implicit_Loop_Statement (Attr,
Identifier => Empty,
Iteration_Scheme =>
Make_Iteration_Scheme (Loc,
Loop_Parameter_Specification =>
Make_Loop_Parameter_Specification (Loc,
Defining_Identifier => Index,
Discrete_Subtype_Definition =>
Make_Attribute_Reference (Loc,
Prefix =>
Unchecked_Convert_To (Array_Typ,
New_Occurrence_Of (Obj_Id, Loc)),
Attribute_Name => Name_Range,
Expressions => New_List (
Make_Integer_Literal (Loc, Dim))))),
Statements => New_List (
Validate_Dimension (Obj_Id, Dim + 1, Indexes)));
end if;
end Validate_Dimension;
-- Local variables
Func_Id : constant Entity_Id := Make_Temporary (Loc, 'V');
Indexes : constant List_Id := New_List;
Obj_Id : constant Entity_Id := Make_Temporary (Loc, 'A');
Stmts : List_Id;
-- Start of processing for Build_Array_VS_Func
begin
Stmts := New_List (Validate_Dimension (Obj_Id, 1, Indexes));
-- Generate:
-- return True;
Append_To (Stmts,
Make_Simple_Return_Statement (Loc,
Expression => New_Occurrence_Of (Standard_True, Loc)));
-- Generate:
-- function Func_Id (Obj_Id : Formal_Typ) return Boolean is
-- begin
-- Stmts
-- end Func_Id;
Set_Ekind (Func_Id, E_Function);
Set_Is_Internal (Func_Id);
Set_Is_Pure (Func_Id);
if not Debug_Generated_Code then
Set_Debug_Info_Off (Func_Id);
end if;
Insert_Action (Attr,
Make_Subprogram_Body (Loc,
Specification =>
Make_Function_Specification (Loc,
Defining_Unit_Name => Func_Id,
Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Obj_Id,
In_Present => True,
Out_Present => False,
Parameter_Type => New_Occurrence_Of (Formal_Typ, Loc))),
Result_Definition =>
New_Occurrence_Of (Standard_Boolean, Loc)),
Declarations => New_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => Stmts)));
return Func_Id;
end Build_Array_VS_Func;
---------------------------------
-- Build_Disp_Get_Task_Id_Call --
---------------------------------
function Build_Disp_Get_Task_Id_Call (Actual : Node_Id) return Node_Id is
Loc : constant Source_Ptr := Sloc (Actual);
Typ : constant Entity_Id := Etype (Actual);
Subp : constant Entity_Id := Find_Prim_Op (Typ, Name_uDisp_Get_Task_Id);
begin
-- Generate:
-- _Disp_Get_Task_Id (Actual)
return
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Subp, Loc),
Parameter_Associations => New_List (Actual));
end Build_Disp_Get_Task_Id_Call;
--------------------------
-- Build_Record_VS_Func --
--------------------------
function Build_Record_VS_Func
(Attr : Node_Id;
Formal_Typ : Entity_Id;
Rec_Typ : Entity_Id) return Entity_Id
is
-- NOTE: The logic of Build_Record_VS_Func is intentionally passive.
-- It generates code only when there are components, discriminants,
-- or variant parts to validate.
-- NOTE: The routines within Build_Record_VS_Func are intentionally
-- unnested to avoid deep indentation of code.
Loc : constant Source_Ptr := Sloc (Attr);
procedure Validate_Component_List
(Obj_Id : Entity_Id;
Comp_List : Node_Id;
Stmts : in out List_Id);
-- Process all components and variant parts of component list Comp_List.
-- Obj_Id denotes the entity of the validation parameter. All new code
-- is added to list Stmts.
procedure Validate_Field
(Obj_Id : Entity_Id;
Field : Node_Id;
Cond : in out Node_Id);
-- Process component declaration or discriminant specification Field.
-- Obj_Id denotes the entity of the validation parameter. Cond denotes
-- an "or else" conditional expression which contains the new code (if
-- any).
procedure Validate_Fields
(Obj_Id : Entity_Id;
Fields : List_Id;
Stmts : in out List_Id);
-- Process component declarations or discriminant specifications in list
-- Fields. Obj_Id denotes the entity of the validation parameter. All
-- new code is added to list Stmts.
procedure Validate_Variant
(Obj_Id : Entity_Id;
Var : Node_Id;
Alts : in out List_Id);
-- Process variant Var. Obj_Id denotes the entity of the validation
-- parameter. Alts denotes a list of case statement alternatives which
-- contains the new code (if any).
procedure Validate_Variant_Part
(Obj_Id : Entity_Id;
Var_Part : Node_Id;
Stmts : in out List_Id);
-- Process variant part Var_Part. Obj_Id denotes the entity of the
-- validation parameter. All new code is added to list Stmts.
-----------------------------
-- Validate_Component_List --
-----------------------------
procedure Validate_Component_List
(Obj_Id : Entity_Id;
Comp_List : Node_Id;
Stmts : in out List_Id)
is
Var_Part : constant Node_Id := Variant_Part (Comp_List);
begin
-- Validate all components
Validate_Fields
(Obj_Id => Obj_Id,
Fields => Component_Items (Comp_List),
Stmts => Stmts);
-- Validate the variant part
if Present (Var_Part) then
Validate_Variant_Part
(Obj_Id => Obj_Id,
Var_Part => Var_Part,
Stmts => Stmts);
end if;
end Validate_Component_List;
--------------------
-- Validate_Field --
--------------------
procedure Validate_Field
(Obj_Id : Entity_Id;
Field : Node_Id;
Cond : in out Node_Id)
is
Field_Id : constant Entity_Id := Defining_Entity (Field);
Field_Nam : constant Name_Id := Chars (Field_Id);
Field_Typ : constant Entity_Id := Validated_View (Etype (Field_Id));
Attr_Nam : Name_Id;
begin
-- Do not process internally-generated fields. Note that checking for
-- Comes_From_Source is not correct because this will eliminate the
-- components within the corresponding record of a protected type.
if Field_Nam in Name_uObject | Name_uParent | Name_uTag then
null;
-- Do not process fields without any scalar components
elsif not Scalar_Part_Present (Field_Typ) then
null;
-- Otherwise the field needs to be validated. Use Make_Identifier
-- rather than New_Occurrence_Of to identify the field because the
-- wrong entity may be picked up when private types are involved.
-- Generate:
-- [or else] not Rec_Typ (Obj_Id).Item_Nam'Valid[_Scalars]
else
if Is_Scalar_Type (Field_Typ) then
Attr_Nam := Name_Valid;
else
Attr_Nam := Name_Valid_Scalars;
end if;
Evolve_Or_Else (Cond,
Make_Op_Not (Loc,
Right_Opnd =>
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
Unchecked_Convert_To (Rec_Typ,
New_Occurrence_Of (Obj_Id, Loc)),
Selector_Name => Make_Identifier (Loc, Field_Nam)),
Attribute_Name => Attr_Nam)));
end if;
end Validate_Field;
---------------------
-- Validate_Fields --
---------------------
procedure Validate_Fields
(Obj_Id : Entity_Id;
Fields : List_Id;
Stmts : in out List_Id)
is
Cond : Node_Id;
Field : Node_Id;
begin
-- Assume that none of the fields are eligible for verification
Cond := Empty;
-- Validate all fields
Field := First_Non_Pragma (Fields);
while Present (Field) loop
Validate_Field
(Obj_Id => Obj_Id,
Field => Field,
Cond => Cond);
Next_Non_Pragma (Field);
end loop;
-- Generate:
-- if not Rec_Typ (Obj_Id).Item_Nam_1'Valid[_Scalars]
-- or else not Rec_Typ (Obj_Id).Item_Nam_N'Valid[_Scalars]
-- then
-- return False;
-- end if;
if Present (Cond) then
Append_New_To (Stmts,
Make_Implicit_If_Statement (Attr,
Condition => Cond,
Then_Statements => New_List (
Make_Simple_Return_Statement (Loc,
Expression => New_Occurrence_Of (Standard_False, Loc)))));
end if;
end Validate_Fields;
----------------------
-- Validate_Variant --
----------------------
procedure Validate_Variant
(Obj_Id : Entity_Id;
Var : Node_Id;
Alts : in out List_Id)
is
Stmts : List_Id;
begin
-- Assume that none of the components and variants are eligible for
-- verification.
Stmts := No_List;
-- Validate components
Validate_Component_List
(Obj_Id => Obj_Id,
Comp_List => Component_List (Var),
Stmts => Stmts);
-- Generate a null statement in case none of the components were
-- verified because this will otherwise eliminate an alternative
-- from the variant case statement and render the generated code
-- illegal.
if No (Stmts) then
Append_New_To (Stmts, Make_Null_Statement (Loc));
end if;
-- Generate:
-- when Discrete_Choices =>
-- Stmts
Append_New_To (Alts,
Make_Case_Statement_Alternative (Loc,
Discrete_Choices =>
New_Copy_List_Tree (Discrete_Choices (Var)),
Statements => Stmts));
end Validate_Variant;
---------------------------
-- Validate_Variant_Part --
---------------------------
procedure Validate_Variant_Part
(Obj_Id : Entity_Id;
Var_Part : Node_Id;
Stmts : in out List_Id)
is
Vars : constant List_Id := Variants (Var_Part);
Alts : List_Id;
Var : Node_Id;
begin
-- Assume that none of the variants are eligible for verification
Alts := No_List;
-- Validate variants
Var := First_Non_Pragma (Vars);
while Present (Var) loop
Validate_Variant
(Obj_Id => Obj_Id,
Var => Var,
Alts => Alts);
Next_Non_Pragma (Var);
end loop;
-- Even though individual variants may lack eligible components, the
-- alternatives must still be generated.
pragma Assert (Present (Alts));
-- Generate:
-- case Rec_Typ (Obj_Id).Discriminant is
-- when Discrete_Choices_1 =>
-- Stmts_1
-- when Discrete_Choices_N =>
-- Stmts_N
-- end case;
Append_New_To (Stmts,
Make_Case_Statement (Loc,
Expression =>
Make_Selected_Component (Loc,
Prefix =>
Unchecked_Convert_To (Rec_Typ,
New_Occurrence_Of (Obj_Id, Loc)),
Selector_Name => New_Copy_Tree (Name (Var_Part))),
Alternatives => Alts));
end Validate_Variant_Part;
-- Local variables
Func_Id : constant Entity_Id := Make_Temporary (Loc, 'V');
Obj_Id : constant Entity_Id := Make_Temporary (Loc, 'R');
Comps : Node_Id;
Stmts : List_Id;
Typ : Entity_Id;
Typ_Decl : Node_Id;
Typ_Def : Node_Id;
Typ_Ext : Node_Id;
-- Start of processing for Build_Record_VS_Func
begin
Typ := Rec_Typ;
-- Use the root type when dealing with a class-wide type
if Is_Class_Wide_Type (Typ) then
Typ := Validated_View (Root_Type (Typ));
end if;
Typ_Decl := Declaration_Node (Typ);
Typ_Def := Type_Definition (Typ_Decl);
-- The components of a derived type are located in the extension part
if Nkind (Typ_Def) = N_Derived_Type_Definition then
Typ_Ext := Record_Extension_Part (Typ_Def);
if Present (Typ_Ext) then
Comps := Component_List (Typ_Ext);
else
Comps := Empty;
end if;
-- Otherwise the components are available in the definition
else
Comps := Component_List (Typ_Def);
end if;
-- The code generated by this routine is as follows:
--
-- function Func_Id (Obj_Id : Formal_Typ) return Boolean is
-- begin
-- if not Rec_Typ (Obj_Id).Discriminant_1'Valid[_Scalars]
-- or else not Rec_Typ (Obj_Id).Discriminant_N'Valid[_Scalars]
-- then
-- return False;
-- end if;
--
-- if not Rec_Typ (Obj_Id).Component_1'Valid[_Scalars]
-- or else not Rec_Typ (Obj_Id).Component_N'Valid[_Scalars]
-- then
-- return False;
-- end if;
--
-- case Discriminant_1 is
-- when Choice_1 =>
-- if not Rec_Typ (Obj_Id).Component_1'Valid[_Scalars]
-- or else not Rec_Typ (Obj_Id).Component_N'Valid[_Scalars]
-- then
-- return False;
-- end if;
--
-- case Discriminant_N is
-- ...
-- when Choice_N =>
-- ...
-- end case;
--
-- return True;
-- end Func_Id;
-- Assume that the record type lacks eligible components, discriminants,
-- and variant parts.
Stmts := No_List;
-- Validate the discriminants
if not Is_Unchecked_Union (Rec_Typ) then
Validate_Fields
(Obj_Id => Obj_Id,
Fields => Discriminant_Specifications (Typ_Decl),
Stmts => Stmts);
end if;
-- Validate the components and variant parts
Validate_Component_List
(Obj_Id => Obj_Id,
Comp_List => Comps,
Stmts => Stmts);
-- Generate:
-- return True;
Append_New_To (Stmts,
Make_Simple_Return_Statement (Loc,
Expression => New_Occurrence_Of (Standard_True, Loc)));
-- Generate:
-- function Func_Id (Obj_Id : Formal_Typ) return Boolean is
-- begin
-- Stmts
-- end Func_Id;
Set_Ekind (Func_Id, E_Function);
Set_Is_Internal (Func_Id);
Set_Is_Pure (Func_Id);
if not Debug_Generated_Code then
Set_Debug_Info_Off (Func_Id);
end if;
Insert_Action (Attr,
Make_Subprogram_Body (Loc,
Specification =>
Make_Function_Specification (Loc,
Defining_Unit_Name => Func_Id,
Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Obj_Id,
Parameter_Type => New_Occurrence_Of (Formal_Typ, Loc))),
Result_Definition =>
New_Occurrence_Of (Standard_Boolean, Loc)),
Declarations => New_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => Stmts)),
Suppress => Discriminant_Check);
return Func_Id;
end Build_Record_VS_Func;
----------------------------------
-- Compile_Stream_Body_In_Scope --
----------------------------------
procedure Compile_Stream_Body_In_Scope
(N : Node_Id;
Decl : Node_Id;
Arr : Entity_Id;
Check : Boolean)
is
C_Type : constant Entity_Id := Base_Type (Component_Type (Arr));
Curr : constant Entity_Id := Current_Scope;
Install : Boolean := False;
Scop : Entity_Id := Scope (Arr);
begin
if Is_Hidden (Arr)
and then not In_Open_Scopes (Scop)
and then Ekind (Scop) = E_Package
then
Install := True;
else
-- The component type may be private, in which case we install its
-- full view to compile the subprogram.
-- The component type may be private, in which case we install its
-- full view to compile the subprogram. We do not do this if the
-- type has a Stream_Convert pragma, which indicates that there are
-- special stream-processing operations for that type (for example
-- Unbounded_String and its wide varieties).
Scop := Scope (C_Type);
if Is_Private_Type (C_Type)
and then Present (Full_View (C_Type))
and then not In_Open_Scopes (Scop)
and then Ekind (Scop) = E_Package
and then No (Get_Stream_Convert_Pragma (C_Type))
then
Install := True;
end if;
end if;
-- If we are within an instance body, then all visibility has been
-- established already and there is no need to install the package.
if Install and then not In_Instance_Body then
Push_Scope (Scop);
Install_Visible_Declarations (Scop);
Install_Private_Declarations (Scop);
-- The entities in the package are now visible, but the generated
-- stream entity must appear in the current scope (usually an
-- enclosing stream function) so that itypes all have their proper
-- scopes.
Push_Scope (Curr);
else
Install := False;
end if;
if Check then
Insert_Action (N, Decl);
else
Insert_Action (N, Decl, Suppress => All_Checks);
end if;
if Install then
-- Remove extra copy of current scope, and package itself
Pop_Scope;
End_Package_Scope (Scop);
end if;
end Compile_Stream_Body_In_Scope;
-----------------------------------
-- Expand_Access_To_Protected_Op --
-----------------------------------
procedure Expand_Access_To_Protected_Op
(N : Node_Id;
Pref : Node_Id;
Typ : Entity_Id)
is
-- The value of the attribute_reference is a record containing two
-- fields: an access to the protected object, and an access to the
-- subprogram itself. The prefix is an identifier or a selected
-- component.
function Has_By_Protected_Procedure_Prefixed_View return Boolean;
-- Determine whether Pref denotes the prefixed class-wide interface
-- view of a procedure with synchronization kind By_Protected_Procedure.
----------------------------------------------
-- Has_By_Protected_Procedure_Prefixed_View --
----------------------------------------------
function Has_By_Protected_Procedure_Prefixed_View return Boolean is
begin
return Nkind (Pref) = N_Selected_Component
and then Nkind (Prefix (Pref)) in N_Has_Entity
and then Present (Entity (Prefix (Pref)))
and then Is_Class_Wide_Type (Etype (Entity (Prefix (Pref))))
and then (Is_Synchronized_Interface (Etype (Entity (Prefix (Pref))))
or else
Is_Protected_Interface (Etype (Entity (Prefix (Pref)))))
and then Is_By_Protected_Procedure (Entity (Selector_Name (Pref)));
end Has_By_Protected_Procedure_Prefixed_View;
-- Local variables
Loc : constant Source_Ptr := Sloc (N);
Agg : Node_Id;
Btyp : constant Entity_Id := Base_Type (Typ);
Sub : Entity_Id := Empty;
Sub_Ref : Node_Id;
E_T : constant Entity_Id := Equivalent_Type (Btyp);
Acc : constant Entity_Id :=
Etype (Next_Component (First_Component (E_T)));
Obj_Ref : Node_Id;
Curr : Entity_Id;
-- Start of processing for Expand_Access_To_Protected_Op
begin
-- Within the body of the protected type, the prefix designates a local
-- operation, and the object is the first parameter of the corresponding
-- protected body of the current enclosing operation.
if Is_Entity_Name (Pref) then
-- All indirect calls are external calls, so must do locking and
-- barrier reevaluation, even if the 'Access occurs within the
-- protected body. Hence the call to External_Subprogram, as opposed
-- to Protected_Body_Subprogram, below. See RM-9.5(5). This means
-- that indirect calls from within the same protected body will
-- deadlock, as allowed by RM-9.5.1(8,15,17).
Sub := New_Occurrence_Of (External_Subprogram (Entity (Pref)), Loc);
-- Don't traverse the scopes when the attribute occurs within an init
-- proc, because we directly use the _init formal of the init proc in
-- that case.
Curr := Current_Scope;
if not Is_Init_Proc (Curr) then
pragma Assert (In_Open_Scopes (Scope (Entity (Pref))));
while Scope (Curr) /= Scope (Entity (Pref)) loop
Curr := Scope (Curr);
end loop;
end if;
-- In case of protected entries the first formal of its Protected_
-- Body_Subprogram is the address of the object.
if Ekind (Curr) = E_Entry then
Obj_Ref :=
New_Occurrence_Of
(First_Formal
(Protected_Body_Subprogram (Curr)), Loc);
-- If the current scope is an init proc, then use the address of the
-- _init formal as the object reference.
elsif Is_Init_Proc (Curr) then
Obj_Ref :=
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (First_Formal (Curr), Loc),
Attribute_Name => Name_Address);
-- In case of protected subprograms the first formal of its
-- Protected_Body_Subprogram is the object and we get its address.
else
Obj_Ref :=
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of
(First_Formal
(Protected_Body_Subprogram (Curr)), Loc),
Attribute_Name => Name_Address);
end if;
elsif Has_By_Protected_Procedure_Prefixed_View then
Obj_Ref :=
Make_Attribute_Reference (Loc,
Prefix => Relocate_Node (Prefix (Pref)),
Attribute_Name => Name_Address);
-- Analyze the object address with expansion disabled. Required
-- because its expansion would displace the pointer to the object,
-- which is not correct at this stage since the object type is a
-- class-wide interface type and we are dispatching a call to a
-- thunk (which would erroneously displace the pointer again).
Expander_Mode_Save_And_Set (False);
Analyze (Obj_Ref);
Set_Analyzed (Obj_Ref);
Expander_Mode_Restore;
-- Case where the prefix is not an entity name. Find the
-- version of the protected operation to be called from
-- outside the protected object.
else
Sub :=
New_Occurrence_Of
(External_Subprogram
(Entity (Selector_Name (Pref))), Loc);
Obj_Ref :=
Make_Attribute_Reference (Loc,
Prefix => Relocate_Node (Prefix (Pref)),
Attribute_Name => Name_Address);
end if;
if Has_By_Protected_Procedure_Prefixed_View then
declare
Ctrl_Tag : Node_Id := Duplicate_Subexpr (Prefix (Pref));
Prim_Addr : Node_Id;
Subp : constant Entity_Id := Entity (Selector_Name (Pref));
Typ : constant Entity_Id :=
Etype (Etype (Entity (Prefix (Pref))));
begin
-- The target subprogram is a thunk; retrieve its address from
-- its secondary dispatch table slot.
Build_Get_Prim_Op_Address (Loc,
Typ => Typ,
Tag_Node => Ctrl_Tag,
Position => DT_Position (Subp),
New_Node => Prim_Addr);
-- Mark the access to the target subprogram as an access to the
-- dispatch table and perform an unchecked type conversion to such
-- access type. This is required to allow the backend to properly
-- identify and handle the access to the dispatch table slot on
-- targets where the dispatch table contains descriptors (instead
-- of pointers).
Set_Is_Dispatch_Table_Entity (Acc);
Sub_Ref := Unchecked_Convert_To (Acc, Prim_Addr);
Analyze (Sub_Ref);
Agg :=
Make_Aggregate (Loc,
Expressions => New_List (Obj_Ref, Sub_Ref));
end;
-- Common case
else
Sub_Ref :=
Make_Attribute_Reference (Loc,
Prefix => Sub,
Attribute_Name => Name_Access);
-- We set the type of the access reference to the already generated
-- access_to_subprogram type, and declare the reference analyzed,
-- to prevent further expansion when the enclosing aggregate is
-- analyzed.
Set_Etype (Sub_Ref, Acc);
Set_Analyzed (Sub_Ref);
Agg :=
Make_Aggregate (Loc,
Expressions => New_List (Obj_Ref, Sub_Ref));
-- Sub_Ref has been marked as analyzed, but we still need to make
-- sure Sub is correctly frozen.
Freeze_Before (N, Entity (Sub));
end if;
Rewrite (N, Agg);
Analyze_And_Resolve (N, E_T);
-- For subsequent analysis, the node must retain its type. The backend
-- will replace it with the equivalent type where needed.
Set_Etype (N, Typ);
end Expand_Access_To_Protected_Op;
--------------------------
-- Expand_Fpt_Attribute --
--------------------------
procedure Expand_Fpt_Attribute
(N : Node_Id;
Pkg : RE_Id;
Nam : Name_Id;
Args : List_Id)
is
Loc : constant Source_Ptr := Sloc (N);
Typ : constant Entity_Id := Etype (N);
Fnm : Node_Id;
begin
-- The function name is the selected component Attr_xxx.yyy where
-- Attr_xxx is the package name, and yyy is the argument Nam.
-- Note: it would be more usual to have separate RE entries for each
-- of the entities in the Fat packages, but first they have identical
-- names (so we would have to have lots of renaming declarations to
-- meet the normal RE rule of separate names for all runtime entities),
-- and second there would be an awful lot of them.
Fnm :=
Make_Selected_Component (Loc,
Prefix => New_Occurrence_Of (RTE (Pkg), Loc),
Selector_Name => Make_Identifier (Loc, Nam));
-- The generated call is given the provided set of parameters, and then
-- wrapped in a conversion which converts the result to the target type.
Rewrite (N,
Convert_To (Typ,
Make_Function_Call (Loc,
Name => Fnm,
Parameter_Associations => Args)));
Analyze_And_Resolve (N, Typ);
end Expand_Fpt_Attribute;
----------------------------
-- Expand_Fpt_Attribute_R --
----------------------------
-- The single argument is converted to its root type to call the
-- appropriate runtime function, with the actual call being built
-- by Expand_Fpt_Attribute
procedure Expand_Fpt_Attribute_R (N : Node_Id) is
E1 : constant Node_Id := First (Expressions (N));
Ftp : Entity_Id;
Pkg : RE_Id;
begin
Find_Fat_Info (Etype (E1), Ftp, Pkg);
Expand_Fpt_Attribute
(N, Pkg, Attribute_Name (N),
New_List (Unchecked_Convert_To (Ftp, Relocate_Node (E1))));
end Expand_Fpt_Attribute_R;
-----------------------------
-- Expand_Fpt_Attribute_RI --
-----------------------------
-- The first argument is converted to its root type and the second
-- argument is converted to standard long long integer to call the
-- appropriate runtime function, with the actual call being built
-- by Expand_Fpt_Attribute
procedure Expand_Fpt_Attribute_RI (N : Node_Id) is
E1 : constant Node_Id := First (Expressions (N));
Ftp : Entity_Id;
Pkg : RE_Id;
E2 : constant Node_Id := Next (E1);
begin
Find_Fat_Info (Etype (E1), Ftp, Pkg);
Expand_Fpt_Attribute
(N, Pkg, Attribute_Name (N),
New_List (
Unchecked_Convert_To (Ftp, Relocate_Node (E1)),
Unchecked_Convert_To (Standard_Integer, Relocate_Node (E2))));
end Expand_Fpt_Attribute_RI;
-----------------------------
-- Expand_Fpt_Attribute_RR --
-----------------------------
-- The two arguments are converted to their root types to call the
-- appropriate runtime function, with the actual call being built
-- by Expand_Fpt_Attribute
procedure Expand_Fpt_Attribute_RR (N : Node_Id) is
E1 : constant Node_Id := First (Expressions (N));
E2 : constant Node_Id := Next (E1);
Ftp : Entity_Id;
Pkg : RE_Id;
begin
Find_Fat_Info (Etype (E1), Ftp, Pkg);
Expand_Fpt_Attribute
(N, Pkg, Attribute_Name (N),
New_List (
Unchecked_Convert_To (Ftp, Relocate_Node (E1)),
Unchecked_Convert_To (Ftp, Relocate_Node (E2))));
end Expand_Fpt_Attribute_RR;
---------------------------------
-- Expand_Loop_Entry_Attribute --
---------------------------------
procedure Expand_Loop_Entry_Attribute (N : Node_Id) is
procedure Build_Conditional_Block
(Loc : Source_Ptr;
Cond : Node_Id;
Loop_Stmt : Node_Id;
If_Stmt : out Node_Id;
Blk_Stmt : out Node_Id);
-- Create a block Blk_Stmt with an empty declarative list and a single
-- loop Loop_Stmt. The block is encased in an if statement If_Stmt with
-- condition Cond. If_Stmt is Empty when there is no condition provided.
function Is_Array_Iteration (N : Node_Id) return Boolean;
-- Determine whether loop statement N denotes an Ada 2012 iteration over
-- an array object.
-----------------------------
-- Build_Conditional_Block --
-----------------------------
procedure Build_Conditional_Block
(Loc : Source_Ptr;
Cond : Node_Id;
Loop_Stmt : Node_Id;
If_Stmt : out Node_Id;
Blk_Stmt : out Node_Id)
is
begin
-- Do not reanalyze the original loop statement because it is simply
-- being relocated.
Set_Analyzed (Loop_Stmt);
Blk_Stmt :=
Make_Block_Statement (Loc,
Declarations => New_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => New_List (Loop_Stmt)));
if Present (Cond) then
If_Stmt :=
Make_If_Statement (Loc,
Condition => Cond,
Then_Statements => New_List (Blk_Stmt));
else
If_Stmt := Empty;
end if;
end Build_Conditional_Block;
------------------------
-- Is_Array_Iteration --
------------------------
function Is_Array_Iteration (N : Node_Id) return Boolean is
Stmt : constant Node_Id := Original_Node (N);
Iter : Node_Id;
begin
if Nkind (Stmt) = N_Loop_Statement
and then Present (Iteration_Scheme (Stmt))
and then Present (Iterator_Specification (Iteration_Scheme (Stmt)))
then
Iter := Iterator_Specification (Iteration_Scheme (Stmt));
return
Of_Present (Iter) and then Is_Array_Type (Etype (Name (Iter)));
end if;
return False;
end Is_Array_Iteration;
-- Local variables
Pref : constant Node_Id := Prefix (N);
Base_Typ : constant Entity_Id := Base_Type (Etype (Pref));
Exprs : constant List_Id := Expressions (N);
Aux_Decl : Node_Id;
Blk : Node_Id := Empty;
Decls : List_Id;
Installed : Boolean;
Loc : Source_Ptr;
Loop_Id : Entity_Id;
Loop_Stmt : Node_Id;
Result : Node_Id := Empty;
Scheme : Node_Id;
Temp_Decl : Node_Id;
Temp_Id : Entity_Id;
-- Start of processing for Expand_Loop_Entry_Attribute
begin
-- Step 1: Find the related loop
-- The loop label variant of attribute 'Loop_Entry already has all the
-- information in its expression.
if Present (Exprs) then
Loop_Id := Entity (First (Exprs));
Loop_Stmt := Label_Construct (Parent (Loop_Id));
-- Climb the parent chain to find the nearest enclosing loop. Skip
-- all internally generated loops for quantified expressions and for
-- element iterators over multidimensional arrays because the pragma
-- applies to source loop.
else
Loop_Stmt := N;
while Present (Loop_Stmt) loop
if Nkind (Loop_Stmt) = N_Loop_Statement
and then Nkind (Original_Node (Loop_Stmt)) = N_Loop_Statement
and then Comes_From_Source (Original_Node (Loop_Stmt))
then
exit;
end if;
Loop_Stmt := Parent (Loop_Stmt);
end loop;
Loop_Id := Entity (Identifier (Loop_Stmt));
end if;
Loc := Sloc (Loop_Stmt);
-- Step 2: Transform the loop
-- The loop has already been transformed during the expansion of a prior
-- 'Loop_Entry attribute. Retrieve the declarative list of the block.
if Has_Loop_Entry_Attributes (Loop_Id) then
-- When the related loop name appears as the argument of attribute
-- Loop_Entry, the corresponding label construct is the generated
-- block statement. This is because the expander reuses the label.
if Nkind (Loop_Stmt) = N_Block_Statement then
Decls := Declarations (Loop_Stmt);
-- In all other cases, the loop must appear in the handled sequence
-- of statements of the generated block.
else
pragma Assert
(Nkind (Parent (Loop_Stmt)) = N_Handled_Sequence_Of_Statements
and then
Nkind (Parent (Parent (Loop_Stmt))) = N_Block_Statement);
Decls := Declarations (Parent (Parent (Loop_Stmt)));
end if;
-- Transform the loop into a conditional block
else
Set_Has_Loop_Entry_Attributes (Loop_Id);
Scheme := Iteration_Scheme (Loop_Stmt);
-- Infinite loops are transformed into:
-- declare
-- Temp1 : constant <type of Pref1> := <Pref1>;
-- . . .
-- TempN : constant <type of PrefN> := <PrefN>;
-- begin
-- loop
-- <original source statements with attribute rewrites>
-- end loop;
-- end;
if No (Scheme) then
Build_Conditional_Block (Loc,
Cond => Empty,
Loop_Stmt => Relocate_Node (Loop_Stmt),
If_Stmt => Result,
Blk_Stmt => Blk);
Result := Blk;
-- While loops are transformed into:
-- function Fnn return Boolean is
-- begin
-- <condition actions>
-- return <condition>;
-- end Fnn;
-- if Fnn then
-- declare
-- Temp1 : constant <type of Pref1> := <Pref1>;
-- . . .
-- TempN : constant <type of PrefN> := <PrefN>;
-- begin
-- loop
-- <original source statements with attribute rewrites>
-- exit when not Fnn;
-- end loop;
-- end;
-- end if;
-- Note that loops over iterators and containers are already
-- converted into while loops.
elsif Present (Condition (Scheme)) then
declare
Func_Decl : Node_Id;
Func_Id : Entity_Id;
Stmts : List_Id;
begin
Func_Id := Make_Temporary (Loc, 'F');
-- Wrap the condition of the while loop in a Boolean function.
-- This avoids the duplication of the same code which may lead
-- to gigi issues with respect to multiple declaration of the
-- same entity in the presence of side effects or checks. Note
-- that the condition actions must also be relocated into the
-- wrapping function because they may contain itypes, e.g. in
-- the case of a comparison involving slices.
-- Generate:
-- <condition actions>
-- return <condition>;
if Present (Condition_Actions (Scheme)) then
Stmts := Condition_Actions (Scheme);
else
Stmts := New_List;
end if;
Append_To (Stmts,
Make_Simple_Return_Statement (Loc,
Expression =>
New_Copy_Tree (Condition (Scheme),
New_Scope => Func_Id)));
-- Generate:
-- function Fnn return Boolean is
-- begin
-- <Stmts>
-- end Fnn;
Func_Decl :=
Make_Subprogram_Body (Loc,
Specification =>
Make_Function_Specification (Loc,
Defining_Unit_Name => Func_Id,
Result_Definition =>
New_Occurrence_Of (Standard_Boolean, Loc)),
Declarations => Empty_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => Stmts));
-- The function is inserted before the related loop. Make sure
-- to analyze it in the context of the loop's enclosing scope.
Push_Scope (Scope (Loop_Id));
Insert_Action (Loop_Stmt, Func_Decl);
Pop_Scope;
-- The analysis of the condition may have generated entities
-- (such as itypes) that are now used within the function.
-- Adjust their scopes accordingly so that their use appears
-- in their scope of definition.
declare
Ent : Entity_Id;
begin
Ent := First_Entity (Loop_Id);
while Present (Ent) loop
-- Various entities that now occur within the function
-- need to have their scope reset, but not all entities
-- associated with Loop_Id are now inside the function.
-- The function entity itself and loop parameters can
-- be outside the function, and there may be others.
-- It's not clear how the determination of what entity
-- scopes need to be adjusted can be made accurately.
-- Perhaps it will be necessary to traverse the function
-- body to find the exact entities whose scopes need to
-- be reset to the function's Entity_Id. ???
if Ekind (Ent) /= E_Loop_Parameter
and then Ent /= Func_Id
then
Set_Scope (Ent, Func_Id);
end if;
Next_Entity (Ent);
end loop;
end;
-- Transform the original while loop into an infinite loop
-- where the last statement checks the negated condition. This
-- placement ensures that the condition will not be evaluated
-- twice on the first iteration.
Set_Iteration_Scheme (Loop_Stmt, Empty);
Scheme := Empty;
-- Generate:
-- exit when not Fnn;
Append_To (Statements (Loop_Stmt),
Make_Exit_Statement (Loc,
Condition =>
Make_Op_Not (Loc,
Right_Opnd =>
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Func_Id, Loc)))));
Build_Conditional_Block (Loc,
Cond =>
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Func_Id, Loc)),
Loop_Stmt => Relocate_Node (Loop_Stmt),
If_Stmt => Result,
Blk_Stmt => Blk);
end;
-- Ada 2012 iteration over an array is transformed into:
-- if <Array_Nam>'Length (1) > 0
-- and then <Array_Nam>'Length (N) > 0
-- then
-- declare
-- Temp1 : constant <type of Pref1> := <Pref1>;
-- . . .
-- TempN : constant <type of PrefN> := <PrefN>;
-- begin
-- for X in ... loop -- multiple loops depending on dims
-- <original source statements with attribute rewrites>
-- end loop;
-- end;
-- end if;
elsif Is_Array_Iteration (Loop_Stmt) then
declare
Array_Nam : constant Entity_Id :=
Entity (Name (Iterator_Specification
(Iteration_Scheme (Original_Node (Loop_Stmt)))));
Num_Dims : constant Pos :=
Number_Dimensions (Etype (Array_Nam));
Cond : Node_Id := Empty;
Check : Node_Id;
begin
-- Generate a check which determines whether all dimensions of
-- the array are non-null.
for Dim in 1 .. Num_Dims loop
Check :=
Make_Op_Gt (Loc,
Left_Opnd =>
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Array_Nam, Loc),
Attribute_Name => Name_Length,
Expressions => New_List (
Make_Integer_Literal (Loc, Dim))),
Right_Opnd =>
Make_Integer_Literal (Loc, 0));
if No (Cond) then
Cond := Check;
else
Cond :=
Make_And_Then (Loc,
Left_Opnd => Cond,
Right_Opnd => Check);
end if;
end loop;
Build_Conditional_Block (Loc,
Cond => Cond,
Loop_Stmt => Relocate_Node (Loop_Stmt),
If_Stmt => Result,
Blk_Stmt => Blk);
end;
-- For loops are transformed into:
-- if <Low> <= <High> then
-- declare
-- Temp1 : constant <type of Pref1> := <Pref1>;
-- . . .
-- TempN : constant <type of PrefN> := <PrefN>;
-- begin
-- for <Def_Id> in <Low> .. <High> loop
-- <original source statements with attribute rewrites>
-- end loop;
-- end;
-- end if;
elsif Present (Loop_Parameter_Specification (Scheme)) then
declare
Loop_Spec : constant Node_Id :=
Loop_Parameter_Specification (Scheme);
Cond : Node_Id;
Subt_Def : Node_Id;
begin
Subt_Def := Discrete_Subtype_Definition (Loop_Spec);
-- When the loop iterates over a subtype indication with a
-- range, use the low and high bounds of the subtype itself.
if Nkind (Subt_Def) = N_Subtype_Indication then
Subt_Def := Scalar_Range (Etype (Subt_Def));
end if;
pragma Assert (Nkind (Subt_Def) = N_Range);
-- Generate
-- Low <= High
Cond :=
Make_Op_Le (Loc,
Left_Opnd => New_Copy_Tree (Low_Bound (Subt_Def)),
Right_Opnd => New_Copy_Tree (High_Bound (Subt_Def)));
Build_Conditional_Block (Loc,
Cond => Cond,
Loop_Stmt => Relocate_Node (Loop_Stmt),
If_Stmt => Result,
Blk_Stmt => Blk);
end;
end if;
Decls := Declarations (Blk);
end if;
-- Step 3: Create a constant to capture the value of the prefix at the
-- entry point into the loop.
Temp_Id := Make_Temporary (Loc, 'P');
-- Preserve the tag of the prefix by offering a specific view of the
-- class-wide version of the prefix.
if Is_Tagged_Type (Base_Typ) then
Tagged_Case : declare
CW_Temp : Entity_Id;
CW_Typ : Entity_Id;
begin
-- Generate:
-- CW_Temp : constant Base_Typ'Class := Base_Typ'Class (Pref);
CW_Temp := Make_Temporary (Loc, 'T');
CW_Typ := Class_Wide_Type (Base_Typ);
Aux_Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => CW_Temp,
Constant_Present => True,
Object_Definition => New_Occurrence_Of (CW_Typ, Loc),
Expression =>
Convert_To (CW_Typ, Relocate_Node (Pref)));
Append_To (Decls, Aux_Decl);
-- Generate:
-- Temp : Base_Typ renames Base_Typ (CW_Temp);
Temp_Decl :=
Make_Object_Renaming_Declaration (Loc,
Defining_Identifier => Temp_Id,
Subtype_Mark => New_Occurrence_Of (Base_Typ, Loc),
Name =>
Convert_To (Base_Typ, New_Occurrence_Of (CW_Temp, Loc)));
Append_To (Decls, Temp_Decl);
end Tagged_Case;
-- Untagged case
else
Untagged_Case : declare
Temp_Expr : Node_Id;
begin
Aux_Decl := Empty;
-- Generate a nominal type for the constant when the prefix is of
-- a constrained type. This is achieved by setting the Etype of
-- the relocated prefix to its base type. Since the prefix is now
-- the initialization expression of the constant, its freezing
-- will produce a proper nominal type.
Temp_Expr := Relocate_Node (Pref);
Set_Etype (Temp_Expr, Base_Typ);
-- Generate:
-- Temp : constant Base_Typ := Pref;
Temp_Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => Temp_Id,
Constant_Present => True,
Object_Definition => New_Occurrence_Of (Base_Typ, Loc),
Expression => Temp_Expr);
Append_To (Decls, Temp_Decl);
end Untagged_Case;
end if;
-- Step 4: Analyze all bits
Installed := Current_Scope = Scope (Loop_Id);
-- Depending on the pracement of attribute 'Loop_Entry relative to the
-- associated loop, ensure the proper visibility for analysis.
if not Installed then
Push_Scope (Scope (Loop_Id));
end if;
-- The analysis of the conditional block takes care of the constant
-- declaration.
if Present (Result) then
Rewrite (Loop_Stmt, Result);
Analyze (Loop_Stmt);
-- The conditional block was analyzed when a previous 'Loop_Entry was
-- expanded. There is no point in reanalyzing the block, simply analyze
-- the declaration of the constant.
else
if Present (Aux_Decl) then
Analyze (Aux_Decl);
end if;
Analyze (Temp_Decl);
end if;
Rewrite (N, New_Occurrence_Of (Temp_Id, Loc));
Analyze (N);
if not Installed then
Pop_Scope;
end if;
end Expand_Loop_Entry_Attribute;
------------------------------
-- Expand_Min_Max_Attribute --
------------------------------
procedure Expand_Min_Max_Attribute (N : Node_Id) is
begin
-- Min and Max are handled by the back end (except that static cases
-- have already been evaluated during semantic processing, although the
-- back end should not count on this). The one bit of special processing
-- required in the normal case is that these two attributes typically
-- generate conditionals in the code, so check the relevant restriction.
Check_Restriction (No_Implicit_Conditionals, N);
end Expand_Min_Max_Attribute;
----------------------------------
-- Expand_N_Attribute_Reference --
----------------------------------
procedure Expand_N_Attribute_Reference (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Pref : constant Node_Id := Prefix (N);
Exprs : constant List_Id := Expressions (N);
function Get_Integer_Type (Typ : Entity_Id) return Entity_Id;
-- Return a small integer type appropriate for the enumeration type
procedure Rewrite_Attribute_Proc_Call (Pname : Entity_Id);
-- Rewrites an attribute for Read, Write, Output, or Put_Image with a
-- call to the appropriate TSS procedure. Pname is the entity for the
-- procedure to call.
----------------------
-- Get_Integer_Type --
----------------------
function Get_Integer_Type (Typ : Entity_Id) return Entity_Id is
Siz : constant Uint := Esize (Base_Type (Typ));
begin
-- We need to accommodate invalid values of the base type since we
-- accept them for Enum_Rep and Pos, so we reason on the Esize. And
-- we use an unsigned type since the enumeration type is unsigned.
return Small_Integer_Type_For (Siz, Uns => True);
end Get_Integer_Type;
---------------------------------
-- Rewrite_Attribute_Proc_Call --
---------------------------------
procedure Rewrite_Attribute_Proc_Call (Pname : Entity_Id) is
Item : constant Node_Id := Next (First (Exprs));
Item_Typ : constant Entity_Id := Etype (Item);
Formal : constant Entity_Id := Next_Formal (First_Formal (Pname));
Formal_Typ : constant Entity_Id := Etype (Formal);
Is_Written : constant Boolean := Ekind (Formal) /= E_In_Parameter;
begin
-- The expansion depends on Item, the second actual, which is
-- the object being streamed in or out.
-- If the item is a component of a packed array type, and
-- a conversion is needed on exit, we introduce a temporary to
-- hold the value, because otherwise the packed reference will
-- not be properly expanded.
if Nkind (Item) = N_Indexed_Component
and then Is_Packed (Base_Type (Etype (Prefix (Item))))
and then Base_Type (Item_Typ) /= Base_Type (Formal_Typ)
and then Is_Written
then
declare
Temp : constant Entity_Id := Make_Temporary (Loc, 'V');
Decl : Node_Id;
Assn : Node_Id;
begin
Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => Temp,
Object_Definition => New_Occurrence_Of (Formal_Typ, Loc));
Set_Etype (Temp, Formal_Typ);
Assn :=
Make_Assignment_Statement (Loc,
Name => New_Copy_Tree (Item),
Expression =>
Unchecked_Convert_To
(Item_Typ, New_Occurrence_Of (Temp, Loc)));
Rewrite (Item, New_Occurrence_Of (Temp, Loc));
Insert_Actions (N,
New_List (
Decl,
Make_Procedure_Call_Statement (Loc,
Name => New_Occurrence_Of (Pname, Loc),
Parameter_Associations => Exprs),
Assn));
Rewrite (N, Make_Null_Statement (Loc));
return;
end;
end if;
-- For the class-wide dispatching cases, and for cases in which
-- the base type of the second argument matches the base type of
-- the corresponding formal parameter (that is to say the stream
-- operation is not inherited), we are all set, and can use the
-- argument unchanged.
if not Is_Class_Wide_Type (Entity (Pref))
and then not Is_Class_Wide_Type (Etype (Item))
and then Base_Type (Item_Typ) /= Base_Type (Formal_Typ)
then
-- Perform a view conversion when either the argument or the
-- formal parameter are of a private type.
if Is_Private_Type (Base_Type (Formal_Typ))
or else Is_Private_Type (Base_Type (Item_Typ))
then
Rewrite (Item,
Unchecked_Convert_To (Formal_Typ, Relocate_Node (Item)));
-- Otherwise perform a regular type conversion to ensure that all
-- relevant checks are installed.
else
Rewrite (Item, Convert_To (Formal_Typ, Relocate_Node (Item)));
end if;
-- For untagged derived types set Assignment_OK, to prevent
-- copies from being created when the unchecked conversion
-- is expanded (which would happen in Remove_Side_Effects
-- if Expand_N_Unchecked_Conversion were allowed to call
-- Force_Evaluation). The copy could violate Ada semantics in
-- cases such as an actual that is an out parameter. Note that
-- this approach is also used in exp_ch7 for calls to controlled
-- type operations to prevent problems with actuals wrapped in
-- unchecked conversions.
if Is_Untagged_Derivation (Etype (Expression (Item))) then
Set_Assignment_OK (Item);
end if;
end if;
-- The stream operation to call might be a renaming created by an
-- attribute definition clause, and might not be frozen yet. Ensure
-- that it has the necessary extra formals.
if not Is_Frozen (Pname) then
Create_Extra_Formals (Pname);
end if;
-- And now rewrite the call
Rewrite (N,
Make_Procedure_Call_Statement (Loc,
Name => New_Occurrence_Of (Pname, Loc),
Parameter_Associations => Exprs));
Analyze (N);
end Rewrite_Attribute_Proc_Call;
Typ : constant Entity_Id := Etype (N);
Btyp : constant Entity_Id := Base_Type (Typ);
Ptyp : constant Entity_Id := Etype (Pref);
Id : constant Attribute_Id := Get_Attribute_Id (Attribute_Name (N));
-- Start of processing for Expand_N_Attribute_Reference
begin
-- Do required validity checking, if enabled. Do not apply check to
-- output parameters of an Asm instruction, since the value of this
-- is not set till after the attribute has been elaborated, and do
-- not apply the check to the arguments of a 'Read or 'Input attribute
-- reference since the scalar argument is an OUT scalar.
if Validity_Checks_On and then Validity_Check_Operands
and then Id /= Attribute_Asm_Output
and then Id /= Attribute_Read
and then Id /= Attribute_Input
then
declare
Expr : Node_Id;
begin
Expr := First (Expressions (N));
while Present (Expr) loop
Ensure_Valid (Expr);
Next (Expr);
end loop;
end;
end if;
-- Ada 2005 (AI-318-02): If attribute prefix is a call to a build-in-
-- place function, then a temporary return object needs to be created
-- and access to it must be passed to the function.
if Is_Build_In_Place_Function_Call (Pref) then
-- If attribute is 'Old, the context is a postcondition, and
-- the temporary must go in the corresponding subprogram, not
-- the postcondition function or any created blocks, as when
-- the attribute appears in a quantified expression. This is
-- handled below in the expansion of the attribute.
if Attribute_Name (Parent (Pref)) = Name_Old then
null;
else
Make_Build_In_Place_Call_In_Anonymous_Context (Pref);
end if;
-- Ada 2005 (AI-318-02): Specialization of the previous case for prefix
-- containing build-in-place function calls whose returned object covers
-- interface types.
elsif Present (Unqual_BIP_Iface_Function_Call (Pref)) then
Make_Build_In_Place_Iface_Call_In_Anonymous_Context (Pref);
end if;
-- If prefix is a protected type name, this is a reference to the
-- current instance of the type. For a component definition, nothing
-- to do (expansion will occur in the init proc). In other contexts,
-- rewrite into reference to current instance.
if Is_Protected_Self_Reference (Pref)
and then not
(Nkind (Parent (N)) in N_Index_Or_Discriminant_Constraint
| N_Discriminant_Association
and then Nkind (Parent (Parent (Parent (Parent (N))))) =
N_Component_Definition)
-- No action needed for these attributes since the current instance
-- will be rewritten to be the name of the _object parameter
-- associated with the enclosing protected subprogram (see below).
and then Id /= Attribute_Access
and then Id /= Attribute_Unchecked_Access
and then Id /= Attribute_Unrestricted_Access
then
Rewrite (Pref, Concurrent_Ref (Pref));
Analyze (Pref);
end if;
-- Remaining processing depends on specific attribute
-- Note: individual sections of the following case statement are
-- allowed to assume there is no code after the case statement, and
-- are legitimately allowed to execute return statements if they have
-- nothing more to do.
case Id is
-- Attributes related to Ada 2012 iterators
when Attribute_Constant_Indexing
| Attribute_Default_Iterator
| Attribute_Implicit_Dereference
| Attribute_Iterable
| Attribute_Iterator_Element
| Attribute_Variable_Indexing
=>
null;
-- Internal attributes used to deal with Ada 2012 delayed aspects. These
-- were already rejected by the parser. Thus they shouldn't appear here.
when Internal_Attribute_Id =>
raise Program_Error;
------------
-- Access --
------------
when Attribute_Access
| Attribute_Unchecked_Access
| Attribute_Unrestricted_Access
=>
Access_Cases : declare
Ref_Object : constant Node_Id := Get_Referenced_Object (Pref);
Btyp_DDT : Entity_Id;
function Enclosing_Object (N : Node_Id) return Node_Id;
-- If N denotes a compound name (selected component, indexed
-- component, or slice), returns the name of the outermost such
-- enclosing object. Otherwise returns N. If the object is a
-- renaming, then the renamed object is returned.
----------------------
-- Enclosing_Object --
----------------------
function Enclosing_Object (N : Node_Id) return Node_Id is
Obj_Name : Node_Id;
begin
Obj_Name := N;
while Nkind (Obj_Name) in N_Selected_Component
| N_Indexed_Component
| N_Slice
loop
Obj_Name := Prefix (Obj_Name);
end loop;
return Get_Referenced_Object (Obj_Name);
end Enclosing_Object;
-- Local declarations
Enc_Object : constant Node_Id := Enclosing_Object (Ref_Object);
-- Start of processing for Access_Cases
begin
Btyp_DDT := Designated_Type (Btyp);
-- Handle designated types that come from the limited view
if From_Limited_With (Btyp_DDT)
and then Has_Non_Limited_View (Btyp_DDT)
then
Btyp_DDT := Non_Limited_View (Btyp_DDT);
end if;
-- In order to improve the text of error messages, the designated
-- type of access-to-subprogram itypes is set by the semantics as
-- the associated subprogram entity (see sem_attr). Now we replace
-- such node with the proper E_Subprogram_Type itype.
if Id = Attribute_Unrestricted_Access
and then Is_Subprogram (Directly_Designated_Type (Typ))
then
-- The following conditions ensure that this special management
-- is done only for "Address!(Prim'Unrestricted_Access)" nodes.
-- At this stage other cases in which the designated type is
-- still a subprogram (instead of an E_Subprogram_Type) are
-- wrong because the semantics must have overridden the type of
-- the node with the type imposed by the context.
if Nkind (Parent (N)) = N_Unchecked_Type_Conversion
and then Etype (Parent (N)) = RTE (RE_Prim_Ptr)
then
Set_Etype (N, RTE (RE_Prim_Ptr));
else
declare
Subp : constant Entity_Id :=
Directly_Designated_Type (Typ);
Etyp : Entity_Id;
Extra : Entity_Id := Empty;
New_Formal : Entity_Id;
Old_Formal : Entity_Id := First_Formal (Subp);
Subp_Typ : Entity_Id;
begin
Subp_Typ := Create_Itype (E_Subprogram_Type, N);
Set_Etype (Subp_Typ, Etype (Subp));
Set_Returns_By_Ref (Subp_Typ, Returns_By_Ref (Subp));
if Present (Old_Formal) then
New_Formal := New_Copy (Old_Formal);
Set_First_Entity (Subp_Typ, New_Formal);
loop
Set_Scope (New_Formal, Subp_Typ);
Etyp := Etype (New_Formal);
-- Handle itypes. There is no need to duplicate
-- here the itypes associated with record types
-- (i.e the implicit full view of private types).
if Is_Itype (Etyp)
and then Ekind (Base_Type (Etyp)) /= E_Record_Type
then
Extra := New_Copy (Etyp);
Set_Parent (Extra, New_Formal);
Set_Etype (New_Formal, Extra);
Set_Scope (Extra, Subp_Typ);
end if;
Extra := New_Formal;
Next_Formal (Old_Formal);
exit when No (Old_Formal);
Link_Entities (New_Formal, New_Copy (Old_Formal));
Next_Entity (New_Formal);
end loop;
Unlink_Next_Entity (New_Formal);
Set_Last_Entity (Subp_Typ, Extra);
end if;
-- Now that the explicit formals have been duplicated,
-- any extra formals needed by the subprogram must be
-- created.
if Present (Extra) then
Set_Extra_Formal (Extra, Empty);
end if;
Create_Extra_Formals (Subp_Typ);
Set_Directly_Designated_Type (Typ, Subp_Typ);
end;
end if;
end if;
if Is_Access_Protected_Subprogram_Type (Btyp) then
Expand_Access_To_Protected_Op (N, Pref, Typ);
-- If prefix is a type name, this is a reference to the current
-- instance of the type, within its initialization procedure.
elsif Is_Entity_Name (Pref)
and then Is_Type (Entity (Pref))
then
declare
Par : Node_Id;
Formal : Entity_Id;
begin
-- If the current instance name denotes a task type, then
-- the access attribute is rewritten to be the name of the
-- "_task" parameter associated with the task type's task
-- procedure. An unchecked conversion is applied to ensure
-- a type match in cases of expander-generated calls (e.g.
-- init procs).
if Is_Task_Type (Entity (Pref)) then
Formal :=
First_Entity (Get_Task_Body_Procedure (Entity (Pref)));
while Present (Formal) loop
exit when Chars (Formal) = Name_uTask;
Next_Entity (Formal);
end loop;
pragma Assert (Present (Formal));
Rewrite (N,
Unchecked_Convert_To (Typ,
New_Occurrence_Of (Formal, Loc)));
Set_Etype (N, Typ);
elsif Is_Protected_Type (Entity (Pref)) then
-- No action needed for current instance located in a
-- component definition (expansion will occur in the
-- init proc)
if Is_Protected_Type (Current_Scope) then
null;
-- If the current instance reference is located in a
-- protected subprogram or entry then rewrite the access
-- attribute to be the name of the "_object" parameter.
-- An unchecked conversion is applied to ensure a type
-- match in cases of expander-generated calls (e.g. init
-- procs).
-- The code may be nested in a block, so find enclosing
-- scope that is a protected operation.
else
declare
Subp : Entity_Id;
begin
Subp := Current_Scope;
while Ekind (Subp) in E_Loop | E_Block loop
Subp := Scope (Subp);
end loop;
Formal :=
First_Entity
(Protected_Body_Subprogram (Subp));
-- For a protected subprogram the _Object parameter
-- is the protected record, so we create an access
-- to it. The _Object parameter of an entry is an
-- address.
if Ekind (Subp) = E_Entry then
Rewrite (N,
Unchecked_Convert_To (Typ,
New_Occurrence_Of (Formal, Loc)));
Set_Etype (N, Typ);
else
Rewrite (N,
Unchecked_Convert_To (Typ,
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Unrestricted_Access,
Prefix =>
New_Occurrence_Of (Formal, Loc))));
Analyze_And_Resolve (N);
end if;
end;
end if;
-- The expression must appear in a default expression,
-- (which in the initialization procedure is the right-hand
-- side of an assignment), and not in a discriminant
-- constraint.
else
Par := Parent (N);
while Present (Par) loop
exit when Nkind (Par) = N_Assignment_Statement;
if Nkind (Par) = N_Component_Declaration then
return;
end if;
Par := Parent (Par);
end loop;
if Present (Par) then
Rewrite (N,
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Attribute_Name => Attribute_Name (N)));
Analyze_And_Resolve (N, Typ);
end if;
end if;
end;
-- If the prefix of an Access attribute is a dereference of an
-- access parameter (or a renaming of such a dereference, or a
-- subcomponent of such a dereference) and the context is a
-- general access type (including the type of an object or
-- component with an access_definition, but not the anonymous
-- type of an access parameter or access discriminant), then
-- apply an accessibility check to the access parameter. We used
-- to rewrite the access parameter as a type conversion, but that
-- could only be done if the immediate prefix of the Access
-- attribute was the dereference, and didn't handle cases where
-- the attribute is applied to a subcomponent of the dereference,
-- since there's generally no available, appropriate access type
-- to convert to in that case. The attribute is passed as the
-- point to insert the check, because the access parameter may
-- come from a renaming, possibly in a different scope, and the
-- check must be associated with the attribute itself.
elsif Id = Attribute_Access
and then Nkind (Enc_Object) = N_Explicit_Dereference
and then Is_Entity_Name (Prefix (Enc_Object))
and then (Ekind (Btyp) = E_General_Access_Type
or else Is_Local_Anonymous_Access (Btyp))
and then Is_Formal (Entity (Prefix (Enc_Object)))
and then Ekind (Etype (Entity (Prefix (Enc_Object))))
= E_Anonymous_Access_Type
and then Present (Extra_Accessibility
(Entity (Prefix (Enc_Object))))
then
Apply_Accessibility_Check (Prefix (Enc_Object), Typ, N);
-- Ada 2005 (AI-251): If the designated type is an interface we
-- add an implicit conversion to force the displacement of the
-- pointer to reference the secondary dispatch table.
elsif Is_Interface (Btyp_DDT)
and then (Comes_From_Source (N)
or else Comes_From_Source (Ref_Object)
or else (Nkind (Ref_Object) in N_Has_Chars
and then Chars (Ref_Object) = Name_uInit))
then
if Nkind (Ref_Object) /= N_Explicit_Dereference then
-- No implicit conversion required if types match, or if
-- the prefix is the class_wide_type of the interface. In
-- either case passing an object of the interface type has
-- already set the pointer correctly.
if Btyp_DDT = Etype (Ref_Object)
or else (Is_Class_Wide_Type (Etype (Ref_Object))
and then
Class_Wide_Type (Btyp_DDT) = Etype (Ref_Object))
then
null;
else
Rewrite (Prefix (N),
Convert_To (Btyp_DDT,
New_Copy_Tree (Prefix (N))));
Analyze_And_Resolve (Prefix (N), Btyp_DDT);
end if;
-- When the object is an explicit dereference, convert the
-- dereference's prefix.
else
declare
Obj_DDT : constant Entity_Id :=
Base_Type
(Directly_Designated_Type
(Etype (Prefix (Ref_Object))));
begin
-- No implicit conversion required if designated types
-- match.
if Obj_DDT /= Btyp_DDT
and then not (Is_Class_Wide_Type (Obj_DDT)
and then Etype (Obj_DDT) = Btyp_DDT)
then
Rewrite (N,
Convert_To (Typ,
New_Copy_Tree (Prefix (Ref_Object))));
Analyze_And_Resolve (N, Typ);
end if;
end;
end if;
end if;
end Access_Cases;
--------------
-- Adjacent --
--------------
-- Transforms 'Adjacent into a call to the floating-point attribute
-- function Adjacent in Fat_xxx (where xxx is the root type)
when Attribute_Adjacent =>
Expand_Fpt_Attribute_RR (N);
-------------
-- Address --
-------------
when Attribute_Address => Address : declare
Task_Proc : Entity_Id;
function Is_Unnested_Component_Init (N : Node_Id) return Boolean;
-- Returns True if N is being used to initialize a component of
-- an activation record object where the component corresponds to
-- the object denoted by the prefix of the attribute N.
function Is_Unnested_Component_Init (N : Node_Id) return Boolean is
begin
return Present (Parent (N))
and then Nkind (Parent (N)) = N_Assignment_Statement
and then Is_Entity_Name (Pref)
and then Present (Activation_Record_Component (Entity (Pref)))
and then Nkind (Name (Parent (N))) = N_Selected_Component
and then Entity (Selector_Name (Name (Parent (N)))) =
Activation_Record_Component (Entity (Pref));
end Is_Unnested_Component_Init;
-- Start of processing for Address
begin
-- If the prefix is a task or a task type, the useful address is that
-- of the procedure for the task body, i.e. the actual program unit.
-- We replace the original entity with that of the procedure.
if Is_Entity_Name (Pref)
and then Is_Task_Type (Entity (Pref))
then
Task_Proc := Next_Entity (Root_Type (Ptyp));
while Present (Task_Proc) loop
exit when Ekind (Task_Proc) = E_Procedure
and then Etype (First_Formal (Task_Proc)) =
Corresponding_Record_Type (Ptyp);
Next_Entity (Task_Proc);
end loop;
if Present (Task_Proc) then
Set_Entity (Pref, Task_Proc);
Set_Etype (Pref, Etype (Task_Proc));
end if;
-- Similarly, the address of a protected operation is the address
-- of the corresponding protected body, regardless of the protected
-- object from which it is selected.
elsif Nkind (Pref) = N_Selected_Component
and then Is_Subprogram (Entity (Selector_Name (Pref)))
and then Is_Protected_Type (Scope (Entity (Selector_Name (Pref))))
then
Rewrite (Pref,
New_Occurrence_Of (
External_Subprogram (Entity (Selector_Name (Pref))), Loc));
elsif Nkind (Pref) = N_Explicit_Dereference
and then Ekind (Ptyp) = E_Subprogram_Type
and then Convention (Ptyp) = Convention_Protected
then
-- The prefix is be a dereference of an access_to_protected_
-- subprogram. The desired address is the second component of
-- the record that represents the access.
declare
Addr : constant Entity_Id := Etype (N);
Ptr : constant Node_Id := Prefix (Pref);
T : constant Entity_Id :=
Equivalent_Type (Base_Type (Etype (Ptr)));
begin
Rewrite (N,
Unchecked_Convert_To (Addr,
Make_Selected_Component (Loc,
Prefix => Unchecked_Convert_To (T, Ptr),
Selector_Name => New_Occurrence_Of (
Next_Entity (First_Entity (T)), Loc))));
Analyze_And_Resolve (N, Addr);
end;
-- Ada 2005 (AI-251): Class-wide interface objects are always
-- "displaced" to reference the tag associated with the interface
-- type. In order to obtain the real address of such objects we
-- generate a call to a run-time subprogram that returns the base
-- address of the object. This call is not generated in cases where
-- the attribute is being used to initialize a component of an
-- activation record object where the component corresponds to
-- prefix of the attribute (for back ends that require "unnesting"
-- of nested subprograms), since the address needs to be assigned
-- as-is to such components.
elsif Is_Class_Wide_Type (Ptyp)
and then Is_Interface (Underlying_Type (Ptyp))
and then Tagged_Type_Expansion
and then not (Nkind (Pref) in N_Has_Entity
and then Is_Subprogram (Entity (Pref)))
and then not Is_Unnested_Component_Init (N)
then
Rewrite (N,
Make_Function_Call (Loc,
Name => New_Occurrence_Of (RTE (RE_Base_Address), Loc),
Parameter_Associations => New_List (
Relocate_Node (N))));
Analyze (N);
return;
end if;
-- Deal with packed array reference, other cases are handled by
-- the back end.
if Involves_Packed_Array_Reference (Pref) then
Expand_Packed_Address_Reference (N);
end if;
end Address;
---------------
-- Alignment --
---------------
when Attribute_Alignment => Alignment : declare
New_Node : Node_Id;
begin
-- For class-wide types, X'Class'Alignment is transformed into a
-- direct reference to the Alignment of the class type, so that the
-- back end does not have to deal with the X'Class'Alignment
-- reference.
if Is_Entity_Name (Pref)
and then Is_Class_Wide_Type (Entity (Pref))
then
Rewrite (Prefix (N), New_Occurrence_Of (Entity (Pref), Loc));
return;
-- For x'Alignment applied to an object of a class wide type,
-- transform X'Alignment into a call to the predefined primitive
-- operation _Alignment applied to X.
elsif Is_Class_Wide_Type (Ptyp) then
New_Node :=
Make_Attribute_Reference (Loc,
Prefix => Pref,
Attribute_Name => Name_Tag);
New_Node := Build_Get_Alignment (Loc, New_Node);
-- Case where the context is an unchecked conversion to a specific
-- integer type. We directly convert from the alignment's type.
if Nkind (Parent (N)) = N_Unchecked_Type_Conversion then
Rewrite (N, New_Node);
Analyze_And_Resolve (N);
return;
-- Case where the context is a specific integer type with which
-- the original attribute was compatible. But the alignment has a
-- specific type in a-tags.ads (Standard.Natural) so, in order to
-- preserve type compatibility, we must convert explicitly.
elsif Typ /= Standard_Natural then
New_Node := Convert_To (Typ, New_Node);
end if;
Rewrite (N, New_Node);
Analyze_And_Resolve (N, Typ);
return;
-- For all other cases, we just have to deal with the case of
-- the fact that the result can be universal.
else
Apply_Universal_Integer_Attribute_Checks (N);
end if;
end Alignment;
---------------------------
-- Asm_Input, Asm_Output --
---------------------------
-- The Asm_Input and Asm_Output attributes are not expanded at this
-- stage, but will be eliminated in the expansion of the Asm call,
-- see Exp_Intr for details. So the back end will never see them.
when Attribute_Asm_Input
| Attribute_Asm_Output
=>
null;
---------
-- Bit --
---------
-- We compute this if a packed array reference was present, otherwise we
-- leave the computation up to the back end.
when Attribute_Bit =>
if Involves_Packed_Array_Reference (Pref) then
Expand_Packed_Bit_Reference (N);
else
Apply_Universal_Integer_Attribute_Checks (N);
end if;
------------------
-- Bit_Position --
------------------
-- We leave the computation up to the back end, since we don't know what
-- layout will be chosen if no component clause was specified.
when Attribute_Bit_Position =>
Apply_Universal_Integer_Attribute_Checks (N);
------------------
-- Body_Version --
------------------
-- A reference to P'Body_Version or P'Version is expanded to
-- Vnn : Unsigned;
-- pragma Import (C, Vnn, "uuuuT");
-- ...
-- Get_Version_String (Vnn)
-- where uuuu is the unit name (dots replaced by double underscore)
-- and T is B for the cases of Body_Version, or Version applied to a
-- subprogram acting as its own spec, and S for Version applied to a
-- subprogram spec or package. This sequence of code references the
-- unsigned constant created in the main program by the binder.
-- A special exception occurs for Standard, where the string returned
-- is a copy of the library string in gnatvsn.ads.
when Attribute_Body_Version
| Attribute_Version
=>
Version : declare
E : constant Entity_Id := Make_Temporary (Loc, 'V');
Pent : Entity_Id;
S : String_Id;
begin
-- If not library unit, get to containing library unit
Pent := Entity (Pref);
while Pent /= Standard_Standard
and then Scope (Pent) /= Standard_Standard
and then not Is_Child_Unit (Pent)
loop
Pent := Scope (Pent);
end loop;
-- Special case Standard and Standard.ASCII
if Pent = Standard_Standard or else Pent = Standard_ASCII then
Rewrite (N,
Make_String_Literal (Loc,
Strval => Verbose_Library_Version));
-- All other cases
else
-- Build required string constant
Get_Name_String (Get_Unit_Name (Pent));
Start_String;
for J in 1 .. Name_Len - 2 loop
if Name_Buffer (J) = '.' then
Store_String_Chars ("__");
else
Store_String_Char (Get_Char_Code (Name_Buffer (J)));
end if;
end loop;
-- Case of subprogram acting as its own spec, always use body
if Nkind (Declaration_Node (Pent)) in N_Subprogram_Specification
and then Nkind (Parent (Declaration_Node (Pent))) =
N_Subprogram_Body
and then Acts_As_Spec (Parent (Declaration_Node (Pent)))
then
Store_String_Chars ("B");
-- Case of no body present, always use spec
elsif not Unit_Requires_Body (Pent) then
Store_String_Chars ("S");
-- Otherwise use B for Body_Version, S for spec
elsif Id = Attribute_Body_Version then
Store_String_Chars ("B");
else
Store_String_Chars ("S");
end if;
S := End_String;
Lib.Version_Referenced (S);
-- Insert the object declaration
Insert_Actions (N, New_List (
Make_Object_Declaration (Loc,
Defining_Identifier => E,
Object_Definition =>
New_Occurrence_Of (RTE (RE_Unsigned), Loc))));
-- Set entity as imported with correct external name
Set_Is_Imported (E);
Set_Interface_Name (E, Make_String_Literal (Loc, S));
-- Set entity as internal to ensure proper Sprint output of its
-- implicit importation.
Set_Is_Internal (E);
-- And now rewrite original reference
Rewrite (N,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Get_Version_String), Loc),
Parameter_Associations => New_List (
New_Occurrence_Of (E, Loc))));
end if;
Analyze_And_Resolve (N, RTE (RE_Version_String));
end Version;
-------------
-- Ceiling --
-------------
-- Transforms 'Ceiling into a call to the floating-point attribute
-- function Ceiling in Fat_xxx (where xxx is the root type)
when Attribute_Ceiling =>
Expand_Fpt_Attribute_R (N);
--------------
-- Callable --
--------------
-- Transforms 'Callable attribute into a call to the Callable function
when Attribute_Callable =>
-- We have an object of a task interface class-wide type as a prefix
-- to Callable. Generate:
-- callable (Task_Id (Pref._disp_get_task_id));
if Ada_Version >= Ada_2005
and then Ekind (Ptyp) = E_Class_Wide_Type
and then Is_Interface (Ptyp)
and then Is_Task_Interface (Ptyp)
then
Rewrite (N,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Callable), Loc),
Parameter_Associations => New_List (
Make_Unchecked_Type_Conversion (Loc,
Subtype_Mark =>
New_Occurrence_Of (RTE (RO_ST_Task_Id), Loc),
Expression => Build_Disp_Get_Task_Id_Call (Pref)))));
else
Rewrite (N, Build_Call_With_Task (Pref, RTE (RE_Callable)));
end if;
Analyze_And_Resolve (N, Standard_Boolean);
------------
-- Caller --
------------
-- Transforms 'Caller attribute into a call to either the
-- Task_Entry_Caller or the Protected_Entry_Caller function.
when Attribute_Caller => Caller : declare
Id_Kind : constant Entity_Id := RTE (RO_AT_Task_Id);
Ent : constant Entity_Id := Entity (Pref);
Conctype : constant Entity_Id := Scope (Ent);
Nest_Depth : Integer := 0;
Name : Node_Id;
S : Entity_Id;
begin
-- Protected case
if Is_Protected_Type (Conctype) then
case Corresponding_Runtime_Package (Conctype) is
when System_Tasking_Protected_Objects_Entries =>
Name :=
New_Occurrence_Of
(RTE (RE_Protected_Entry_Caller), Loc);
when System_Tasking_Protected_Objects_Single_Entry =>
Name :=
New_Occurrence_Of
(RTE (RE_Protected_Single_Entry_Caller), Loc);
when others =>
raise Program_Error;
end case;
Rewrite (N,
Unchecked_Convert_To (Id_Kind,
Make_Function_Call (Loc,
Name => Name,
Parameter_Associations => New_List (
New_Occurrence_Of
(Find_Protection_Object (Current_Scope), Loc)))));
-- Task case
else
-- Determine the nesting depth of the E'Caller attribute, that
-- is, how many accept statements are nested within the accept
-- statement for E at the point of E'Caller. The runtime uses
-- this depth to find the specified entry call.
for J in reverse 0 .. Scope_Stack.Last loop
S := Scope_Stack.Table (J).Entity;
-- We should not reach the scope of the entry, as it should
-- already have been checked in Sem_Attr that this attribute
-- reference is within a matching accept statement.
pragma Assert (S /= Conctype);
if S = Ent then
exit;
elsif Is_Entry (S) then
Nest_Depth := Nest_Depth + 1;
end if;
end loop;
Rewrite (N,
Unchecked_Convert_To (Id_Kind,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Task_Entry_Caller), Loc),
Parameter_Associations => New_List (
Make_Integer_Literal (Loc,
Intval => Int (Nest_Depth))))));
end if;
Analyze_And_Resolve (N, Id_Kind);
end Caller;
--------------------
-- Component_Size --
--------------------
-- Component_Size is handled by the back end
when Attribute_Component_Size =>
Apply_Universal_Integer_Attribute_Checks (N);
-------------
-- Compose --
-------------
-- Transforms 'Compose into a call to the floating-point attribute
-- function Compose in Fat_xxx (where xxx is the root type)
-- Note: we strictly should have special code here to deal with the
-- case of absurdly negative arguments (less than Integer'First)
-- which will return a (signed) zero value, but it hardly seems
-- worth the effort. Absurdly large positive arguments will raise
-- constraint error which is fine.
when Attribute_Compose =>
Expand_Fpt_Attribute_RI (N);
-----------------
-- Constrained --
-----------------
when Attribute_Constrained => Constrained : declare
Formal_Ent : constant Entity_Id := Param_Entity (Pref);
-- Start of processing for Constrained
begin
-- Reference to a parameter where the value is passed as an extra
-- actual, corresponding to the extra formal referenced by the
-- Extra_Constrained field of the corresponding formal. If this
-- is an entry in-parameter, it is replaced by a constant renaming
-- for which Extra_Constrained is never created.
if Present (Formal_Ent)
and then Ekind (Formal_Ent) /= E_Constant
and then Present (Extra_Constrained (Formal_Ent))
then
Rewrite (N,
New_Occurrence_Of
(Extra_Constrained (Formal_Ent), Sloc (N)));
-- If the prefix is an access to object, the attribute applies to
-- the designated object, so rewrite with an explicit dereference.
elsif Is_Access_Type (Ptyp)
and then
(not Is_Entity_Name (Pref) or else Is_Object (Entity (Pref)))
then
Rewrite (Pref,
Make_Explicit_Dereference (Loc, Relocate_Node (Pref)));
Analyze_And_Resolve (N, Standard_Boolean);
return;
-- For variables with a Extra_Constrained field, we use the
-- corresponding entity.
elsif Nkind (Pref) = N_Identifier
and then Ekind (Entity (Pref)) = E_Variable
and then Present (Extra_Constrained (Entity (Pref)))
then
Rewrite (N,
New_Occurrence_Of
(Extra_Constrained (Entity (Pref)), Sloc (N)));
-- For all other cases, we can tell at compile time
else
-- For access type, apply access check as needed
if Is_Entity_Name (Pref)
and then not Is_Type (Entity (Pref))
and then Is_Access_Type (Ptyp)
then
Apply_Access_Check (N);
end if;
Rewrite (N,
New_Occurrence_Of
(Boolean_Literals
(Exp_Util.Attribute_Constrained_Static_Value
(Pref)), Sloc (N)));
end if;
Analyze_And_Resolve (N, Standard_Boolean);
end Constrained;
---------------
-- Copy_Sign --
---------------
-- Transforms 'Copy_Sign into a call to the floating-point attribute
-- function Copy_Sign in Fat_xxx (where xxx is the root type)
when Attribute_Copy_Sign =>
Expand_Fpt_Attribute_RR (N);
-----------
-- Count --
-----------
-- Transforms 'Count attribute into a call to the Count function
when Attribute_Count => Count : declare
Call : Node_Id;
Conctyp : Entity_Id;
Entnam : Node_Id;
Entry_Id : Entity_Id;
Index : Node_Id;
Name : Node_Id;
begin
-- If the prefix is a member of an entry family, retrieve both
-- entry name and index. For a simple entry there is no index.
if Nkind (Pref) = N_Indexed_Component then
Entnam := Prefix (Pref);
Index := First (Expressions (Pref));
else
Entnam := Pref;
Index := Empty;
end if;
Entry_Id := Entity (Entnam);
-- Find the concurrent type in which this attribute is referenced
-- (there had better be one).
Conctyp := Current_Scope;
while not Is_Concurrent_Type (Conctyp) loop
Conctyp := Scope (Conctyp);
end loop;
-- Protected case
if Is_Protected_Type (Conctyp) then
-- No need to transform 'Count into a function call if the current
-- scope has been eliminated. In this case such transformation is
-- also not viable because the enclosing protected object is not
-- available.
if Is_Eliminated (Current_Scope) then
return;
end if;
case Corresponding_Runtime_Package (Conctyp) is
when System_Tasking_Protected_Objects_Entries =>
Name := New_Occurrence_Of (RTE (RE_Protected_Count), Loc);
Call :=
Make_Function_Call (Loc,
Name => Name,
Parameter_Associations => New_List (
New_Occurrence_Of
(Find_Protection_Object (Current_Scope), Loc),
Entry_Index_Expression
(Loc, Entry_Id, Index, Scope (Entry_Id))));
when System_Tasking_Protected_Objects_Single_Entry =>
Name :=
New_Occurrence_Of (RTE (RE_Protected_Count_Entry), Loc);
Call :=
Make_Function_Call (Loc,
Name => Name,
Parameter_Associations => New_List (
New_Occurrence_Of
(Find_Protection_Object (Current_Scope), Loc)));
when others =>
raise Program_Error;
end case;
-- Task case
else
Call :=
Make_Function_Call (Loc,
Name => New_Occurrence_Of (RTE (RE_Task_Count), Loc),
Parameter_Associations => New_List (
Entry_Index_Expression (Loc,
Entry_Id, Index, Scope (Entry_Id))));
end if;
-- The call returns type Natural but the context is universal integer
-- so any integer type is allowed. The attribute was already resolved
-- so its Etype is the required result type. If the base type of the
-- context type is other than Standard.Integer we put in a conversion
-- to the required type. This can be a normal typed conversion since
-- both input and output types of the conversion are integer types
if Base_Type (Typ) /= Base_Type (Standard_Integer) then
Rewrite (N, Convert_To (Typ, Call));
else
Rewrite (N, Call);
end if;
Analyze_And_Resolve (N, Typ);
end Count;
---------------------
-- Descriptor_Size --
---------------------
-- Descriptor_Size is handled by the back end
when Attribute_Descriptor_Size =>
Apply_Universal_Integer_Attribute_Checks (N);
---------------
-- Elab_Body --
---------------
-- This processing is shared by Elab_Spec
-- What we do is to insert the following declarations
-- procedure tnn;
-- pragma Import (C, enn, "name___elabb/s");
-- and then the Elab_Body/Spec attribute is replaced by a reference
-- to this defining identifier.
when Attribute_Elab_Body
| Attribute_Elab_Spec
=>
-- Leave attribute unexpanded in CodePeer mode: the gnat2scil
-- back-end knows how to handle these attributes directly.
if CodePeer_Mode then
return;
end if;
Elab_Body : declare
Ent : constant Entity_Id := Make_Temporary (Loc, 'E');
Str : String_Id;
Lang : Node_Id;
procedure Make_Elab_String (Nod : Node_Id);
-- Given Nod, an identifier, or a selected component, put the
-- image into the current string literal, with double underline
-- between components.
----------------------
-- Make_Elab_String --
----------------------
procedure Make_Elab_String (Nod : Node_Id) is
begin
if Nkind (Nod) = N_Selected_Component then
Make_Elab_String (Prefix (Nod));
Store_String_Char ('_');
Store_String_Char ('_');
Get_Name_String (Chars (Selector_Name (Nod)));
else
pragma Assert (Nkind (Nod) = N_Identifier);
Get_Name_String (Chars (Nod));
end if;
Store_String_Chars (Name_Buffer (1 .. Name_Len));
end Make_Elab_String;
-- Start of processing for Elab_Body/Elab_Spec
begin
-- First we need to prepare the string literal for the name of
-- the elaboration routine to be referenced.
Start_String;
Make_Elab_String (Pref);
Store_String_Chars ("___elab");
Lang := Make_Identifier (Loc, Name_C);
if Id = Attribute_Elab_Body then
Store_String_Char ('b');
else
Store_String_Char ('s');
end if;
Str := End_String;
Insert_Actions (N, New_List (
Make_Subprogram_Declaration (Loc,
Specification =>
Make_Procedure_Specification (Loc,
Defining_Unit_Name => Ent)),
Make_Pragma (Loc,
Chars => Name_Import,
Pragma_Argument_Associations => New_List (
Make_Pragma_Argument_Association (Loc, Expression => Lang),
Make_Pragma_Argument_Association (Loc,
Expression => Make_Identifier (Loc, Chars (Ent))),
Make_Pragma_Argument_Association (Loc,
Expression => Make_String_Literal (Loc, Str))))));
Set_Entity (N, Ent);
Rewrite (N, New_Occurrence_Of (Ent, Loc));
end Elab_Body;
--------------------
-- Elab_Subp_Body --
--------------------
-- Always ignored. In CodePeer mode, gnat2scil knows how to handle
-- this attribute directly, and if we are not in CodePeer mode it is
-- entirely ignored ???
when Attribute_Elab_Subp_Body =>
return;
----------------
-- Elaborated --
----------------
-- Elaborated is always True for preelaborated units, predefined units,
-- pure units and units which have Elaborate_Body pragmas. These units
-- have no elaboration entity.
-- Note: The Elaborated attribute is never passed to the back end
when Attribute_Elaborated => Elaborated : declare
Elab_Id : constant Entity_Id := Elaboration_Entity (Entity (Pref));
begin
if Present (Elab_Id) then
Rewrite (N,
Make_Op_Ne (Loc,
Left_Opnd => New_Occurrence_Of (Elab_Id, Loc),
Right_Opnd => Make_Integer_Literal (Loc, Uint_0)));
Analyze_And_Resolve (N, Typ);
else
Rewrite (N, New_Occurrence_Of (Standard_True, Loc));
end if;
end Elaborated;
--------------
-- Enum_Rep --
--------------
when Attribute_Enum_Rep => Enum_Rep : declare
Expr : Node_Id;
begin
-- Get the expression, which is X for Enum_Type'Enum_Rep (X) or
-- X'Enum_Rep.
if Is_Non_Empty_List (Exprs) then
Expr := First (Exprs);
else
Expr := Pref;
end if;
-- If not constant-folded, Enum_Type'Enum_Rep (X) or X'Enum_Rep
-- expands to
-- target-type (X)
-- This is simply a direct conversion from the enumeration type to
-- the target integer type, which is treated by the back end as a
-- normal integer conversion, treating the enumeration type as an
-- integer, which is exactly what we want. We set Conversion_OK to
-- make sure that the analyzer does not complain about what otherwise
-- might be an illegal conversion.
-- However the target type is universal integer in most cases, which
-- is a very large type, so in the case of an enumeration type, we
-- first convert to a small signed integer type in order not to lose
-- the size information.
if Is_Enumeration_Type (Ptyp) then
Rewrite (N, OK_Convert_To (Get_Integer_Type (Ptyp), Expr));
Convert_To_And_Rewrite (Typ, N);
else
Rewrite (N, OK_Convert_To (Typ, Expr));
end if;
Analyze_And_Resolve (N, Typ);
end Enum_Rep;
--------------
-- Enum_Val --
--------------
when Attribute_Enum_Val => Enum_Val : declare
Expr : Node_Id;
Btyp : constant Entity_Id := Base_Type (Ptyp);
begin
-- X'Enum_Val (Y) expands to
-- [constraint_error when _rep_to_pos (Y, False) = -1, msg]
-- X!(Y);
Expr := Unchecked_Convert_To (Ptyp, First (Exprs));
-- Ensure that the expression is not truncated since the "bad" bits
-- are desired.
if Nkind (Expr) = N_Unchecked_Type_Conversion then
Set_No_Truncation (Expr);
end if;
Insert_Action (N,
Make_Raise_Constraint_Error (Loc,
Condition =>
Make_Op_Eq (Loc,
Left_Opnd =>
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (TSS (Btyp, TSS_Rep_To_Pos), Loc),
Parameter_Associations => New_List (
Relocate_Node (Duplicate_Subexpr (Expr)),
New_Occurrence_Of (Standard_False, Loc))),
Right_Opnd => Make_Integer_Literal (Loc, -1)),
Reason => CE_Range_Check_Failed));
Rewrite (N, Expr);
Analyze_And_Resolve (N, Ptyp);
end Enum_Val;
--------------
-- Exponent --
--------------
-- Transforms 'Exponent into a call to the floating-point attribute
-- function Exponent in Fat_xxx (where xxx is the root type)
when Attribute_Exponent =>
Expand_Fpt_Attribute_R (N);
------------------
-- External_Tag --
------------------
-- transforme X'External_Tag into Ada.Tags.External_Tag (X'tag)
when Attribute_External_Tag =>
Rewrite (N,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_External_Tag), Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Tag,
Prefix => Prefix (N)))));
Analyze_And_Resolve (N, Standard_String);
-----------------------
-- Finalization_Size --
-----------------------
when Attribute_Finalization_Size => Finalization_Size : declare
function Calculate_Header_Size return Node_Id;
-- Generate a runtime call to calculate the size of the hidden header
-- along with any added padding which would precede a heap-allocated
-- object of the prefix type.
---------------------------
-- Calculate_Header_Size --
---------------------------
function Calculate_Header_Size return Node_Id is
begin
-- Generate:
-- Typ (Header_Size_With_Padding (Pref'Alignment))
return
Convert_To (Typ,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Header_Size_With_Padding), Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix => New_Copy_Tree (Pref),
Attribute_Name => Name_Alignment))));
end Calculate_Header_Size;
-- Local variables
Size : Entity_Id;
-- Start of Finalization_Size
begin
-- An object of a class-wide type first requires a runtime check to
-- determine whether it is actually controlled or not. Depending on
-- the outcome of this check, the Finalization_Size of the object
-- may be zero or some positive value.
--
-- In this scenario, Pref'Finalization_Size is expanded into
--
-- Size : Integer := 0;
--
-- if Needs_Finalization (Pref'Tag) then
-- Size := Integer (Header_Size_With_Padding (Pref'Alignment));
-- end if;
--
-- and the attribute reference is replaced with a reference to Size.
if Is_Class_Wide_Type (Ptyp) then
Size := Make_Temporary (Loc, 'S');
Insert_Actions (N, New_List (
-- Generate:
-- Size : Integer := 0;
Make_Object_Declaration (Loc,
Defining_Identifier => Size,
Object_Definition =>
New_Occurrence_Of (Standard_Integer, Loc),
Expression => Make_Integer_Literal (Loc, 0)),
-- Generate:
-- if Needs_Finalization (Pref'Tag) then
-- Size :=
-- Integer (Header_Size_With_Padding (Pref'Alignment));
-- end if;
Make_If_Statement (Loc,
Condition =>
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Needs_Finalization), Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix => New_Copy_Tree (Pref),
Attribute_Name => Name_Tag))),
Then_Statements => New_List (
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Size, Loc),
Expression =>
Convert_To
(Standard_Integer, Calculate_Header_Size))))));
Rewrite (N, New_Occurrence_Of (Size, Loc));
-- The prefix is known to be controlled at compile time. Calculate
-- Finalization_Size by calling function Header_Size_With_Padding.
elsif Needs_Finalization (Ptyp) then
Rewrite (N, Calculate_Header_Size);
-- The prefix is not an object with controlled parts, so its
-- Finalization_Size is zero.
else
Rewrite (N, Make_Integer_Literal (Loc, 0));
end if;
-- Due to cases where the entity type of the attribute is already
-- resolved the rewritten N must get re-resolved to its appropriate
-- type.
Analyze_And_Resolve (N, Typ);
end Finalization_Size;
-----------------
-- First, Last --
-----------------
when Attribute_First
| Attribute_Last
=>
-- If the prefix type is a constrained packed array type which
-- already has a Packed_Array_Impl_Type representation defined, then
-- replace this attribute with a direct reference to the attribute of
-- the appropriate index subtype (since otherwise the back end will
-- try to give us the value of 'First for this implementation type).
-- Do not do this if Ptyp depends on a discriminant as its bounds
-- are only available through N.
if Is_Constrained_Packed_Array (Ptyp)
and then not Size_Depends_On_Discriminant (Ptyp)
then
Rewrite (N,
Make_Attribute_Reference (Loc,
Attribute_Name => Attribute_Name (N),
Prefix =>
New_Occurrence_Of (Get_Index_Subtype (N), Loc)));
Analyze_And_Resolve (N, Typ);
-- For a constrained array type, if the bound is a reference to an
-- entity which is not a discriminant, just replace with a direct
-- reference. Note that this must be in keeping with what is done
-- for scalar types in order for range checks to be elided in loops.
-- However, avoid doing it if the array type is public because, in
-- this case, we effectively rely on the back end to create public
-- symbols with consistent names across units for the array bounds.
elsif Is_Array_Type (Ptyp)
and then Is_Constrained (Ptyp)
and then not Is_Public (Ptyp)
then
declare
Bnd : Node_Id;
begin
if Id = Attribute_First then
Bnd := Type_Low_Bound (Get_Index_Subtype (N));
else
Bnd := Type_High_Bound (Get_Index_Subtype (N));
end if;
if Is_Entity_Name (Bnd)
and then Ekind (Entity (Bnd)) /= E_Discriminant
then
Rewrite (N, New_Occurrence_Of (Entity (Bnd), Loc));
end if;
end;
-- For access type, apply access check as needed
elsif Is_Access_Type (Ptyp) then
Apply_Access_Check (N);
-- For scalar type, if the bound is a reference to an entity, just
-- replace with a direct reference. Note that we can only have a
-- reference to a constant entity at this stage, anything else would
-- have already been rewritten.
elsif Is_Scalar_Type (Ptyp) then
declare
Bnd : Node_Id;
begin
if Id = Attribute_First then
Bnd := Type_Low_Bound (Ptyp);
else
Bnd := Type_High_Bound (Ptyp);
end if;
if Is_Entity_Name (Bnd) then
Rewrite (N, New_Occurrence_Of (Entity (Bnd), Loc));
end if;
end;
end if;
---------------
-- First_Bit --
---------------
-- We leave the computation up to the back end, since we don't know what
-- layout will be chosen if no component clause was specified.
when Attribute_First_Bit =>
Apply_Universal_Integer_Attribute_Checks (N);
--------------------------------
-- Fixed_Value, Integer_Value --
--------------------------------
-- We transform
-- fixtype'Fixed_Value (integer-value)
-- inttype'Integer_Value (fixed-value)
-- into
-- fixtype (integer-value)
-- inttype (fixed-value)
-- respectively.
-- We set Conversion_OK on the conversion because we do not want it
-- to go through the fixed-point conversion circuits.
when Attribute_Fixed_Value
| Attribute_Integer_Value
=>
Rewrite (N, OK_Convert_To (Entity (Pref), First (Exprs)));
-- Note that it might appear that a properly analyzed unchecked
-- conversion would be just fine here, but that's not the case,
-- since the full range checks performed by the following calls
-- are critical.
Apply_Type_Conversion_Checks (N);
-- Note that Apply_Type_Conversion_Checks only deals with the
-- overflow checks on conversions involving fixed-point types
-- so we must apply range checks manually on them and expand.
Apply_Scalar_Range_Check
(Expression (N), Etype (N), Fixed_Int => True);
Set_Analyzed (N);
Expand (N);
-----------
-- Floor --
-----------
-- Transforms 'Floor into a call to the floating-point attribute
-- function Floor in Fat_xxx (where xxx is the root type)
when Attribute_Floor =>
Expand_Fpt_Attribute_R (N);
----------
-- Fore --
----------
-- For the fixed-point type Typ:
-- Typ'Fore
-- expands into
-- Result_Type (System.Fore (Universal_Real (Type'First)),
-- Universal_Real (Type'Last))
-- Note that we know that the type is a nonstatic subtype, or Fore would
-- have itself been computed dynamically in Eval_Attribute.
when Attribute_Fore =>
Rewrite (N,
Convert_To (Typ,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Fore), Loc),
Parameter_Associations => New_List (
Convert_To (Universal_Real,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Ptyp, Loc),
Attribute_Name => Name_First)),
Convert_To (Universal_Real,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Ptyp, Loc),
Attribute_Name => Name_Last))))));
Analyze_And_Resolve (N, Typ);
--------------
-- Fraction --
--------------
-- Transforms 'Fraction into a call to the floating-point attribute
-- function Fraction in Fat_xxx (where xxx is the root type)
when Attribute_Fraction =>
Expand_Fpt_Attribute_R (N);
--------------
-- From_Any --
--------------
when Attribute_From_Any => From_Any : declare
Decls : constant List_Id := New_List;
begin
Rewrite (N,
Build_From_Any_Call (Ptyp,
Relocate_Node (First (Exprs)),
Decls));
Insert_Actions (N, Decls);
Analyze_And_Resolve (N, Ptyp);
end From_Any;
----------------------
-- Has_Same_Storage --
----------------------
when Attribute_Has_Same_Storage => Has_Same_Storage : declare
Loc : constant Source_Ptr := Sloc (N);
X : constant Node_Id := Prefix (N);
Y : constant Node_Id := First (Expressions (N));
-- The arguments
X_Addr : Node_Id;
Y_Addr : Node_Id;
-- Rhe expressions for their addresses
X_Size : Node_Id;
Y_Size : Node_Id;
-- Rhe expressions for their sizes
begin
-- The attribute is expanded as:
-- (X'address = Y'address)
-- and then (X'Size = Y'Size)
-- and then (X'Size /= 0) (AI12-0077)
-- If both arguments have the same Etype the second conjunct can be
-- omitted.
X_Addr :=
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Address,
Prefix => New_Copy_Tree (X));
Y_Addr :=
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Address,
Prefix => New_Copy_Tree (Y));
X_Size :=
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Size,
Prefix => New_Copy_Tree (X));
if Etype (X) = Etype (Y) then
Rewrite (N,
Make_And_Then (Loc,
Left_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd => X_Addr,
Right_Opnd => Y_Addr),
Right_Opnd =>
Make_Op_Ne (Loc,
Left_Opnd => X_Size,
Right_Opnd => Make_Integer_Literal (Loc, 0))));
else
Y_Size :=
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Size,
Prefix => New_Copy_Tree (Y));
Rewrite (N,
Make_And_Then (Loc,
Left_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd => X_Addr,
Right_Opnd => Y_Addr),
Right_Opnd =>
Make_And_Then (Loc,
Left_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd => X_Size,
Right_Opnd => Y_Size),
Right_Opnd =>
Make_Op_Ne (Loc,
Left_Opnd => New_Copy_Tree (X_Size),
Right_Opnd => Make_Integer_Literal (Loc, 0)))));
end if;
Analyze_And_Resolve (N, Standard_Boolean);
end Has_Same_Storage;
--------------
-- Identity --
--------------
-- For an exception returns a reference to the exception data:
-- Exception_Id!(Prefix'Reference)
-- For a task it returns a reference to the _task_id component of
-- corresponding record:
-- taskV!(Prefix)._Task_Id, converted to the type Task_Id defined
-- in Ada.Task_Identification
when Attribute_Identity => Identity : declare
Id_Kind : Entity_Id;
begin
if Ptyp = Standard_Exception_Type then
Id_Kind := RTE (RE_Exception_Id);
if Present (Renamed_Object (Entity (Pref))) then
Set_Entity (Pref, Renamed_Object (Entity (Pref)));
end if;
Rewrite (N,
Unchecked_Convert_To (Id_Kind, Make_Reference (Loc, Pref)));
else
Id_Kind := RTE (RO_AT_Task_Id);
-- If the prefix is a task interface, the Task_Id is obtained
-- dynamically through a dispatching call, as for other task
-- attributes applied to interfaces.
if Ada_Version >= Ada_2005
and then Ekind (Ptyp) = E_Class_Wide_Type
and then Is_Interface (Ptyp)
and then Is_Task_Interface (Ptyp)
then
Rewrite (N,
Unchecked_Convert_To
(Id_Kind, Build_Disp_Get_Task_Id_Call (Pref)));
else
Rewrite (N,
Unchecked_Convert_To (Id_Kind, Concurrent_Ref (Pref)));
end if;
end if;
Analyze_And_Resolve (N, Id_Kind);
end Identity;
-----------
-- Image --
-----------
when Attribute_Image =>
-- Leave attribute unexpanded in CodePeer mode: the gnat2scil
-- back-end knows how to handle this attribute directly.
if CodePeer_Mode then
return;
end if;
Exp_Imgv.Expand_Image_Attribute (N);
---------
-- Img --
---------
-- X'Img is expanded to typ'Image (X), where typ is the type of X
when Attribute_Img =>
Exp_Imgv.Expand_Image_Attribute (N);
-----------------
-- Initialized --
-----------------
-- For execution, we could either implement an approximation of this
-- aspect, or use Valid_Scalars as a first approximation. For now we do
-- the latter.
when Attribute_Initialized =>
-- Do not expand 'Initialized in CodePeer mode, it will be handled
-- by the back-end directly.
if CodePeer_Mode then
return;
end if;
Rewrite
(N,
Make_Attribute_Reference
(Sloc => Loc,
Prefix => Pref,
Attribute_Name => Name_Valid_Scalars,
Expressions => Exprs));
Analyze_And_Resolve (N);
-----------
-- Input --
-----------
when Attribute_Input => Input : declare
P_Type : constant Entity_Id := Entity (Pref);
B_Type : constant Entity_Id := Base_Type (P_Type);
U_Type : constant Entity_Id := Underlying_Type (P_Type);
Strm : constant Node_Id := First (Exprs);
Fname : Entity_Id;
Decl : Node_Id;
Call : Node_Id;
Prag : Node_Id;
Arg2 : Node_Id;
Rfunc : Node_Id;
Cntrl : Node_Id := Empty;
-- Value for controlling argument in call. Always Empty except in
-- the dispatching (class-wide type) case, where it is a reference
-- to the dummy object initialized to the right internal tag.
procedure Freeze_Stream_Subprogram (F : Entity_Id);
-- The expansion of the attribute reference may generate a call to
-- a user-defined stream subprogram that is frozen by the call. This
-- can lead to access-before-elaboration problem if the reference
-- appears in an object declaration and the subprogram body has not
-- been seen. The freezing of the subprogram requires special code
-- because it appears in an expanded context where expressions do
-- not freeze their constituents.
------------------------------
-- Freeze_Stream_Subprogram --
------------------------------
procedure Freeze_Stream_Subprogram (F : Entity_Id) is
Decl : constant Node_Id := Unit_Declaration_Node (F);
Bod : Node_Id;
begin
-- If this is user-defined subprogram, the corresponding
-- stream function appears as a renaming-as-body, and the
-- user subprogram must be retrieved by tree traversal.
if Present (Decl)
and then Nkind (Decl) = N_Subprogram_Declaration
and then Present (Corresponding_Body (Decl))
then
Bod := Corresponding_Body (Decl);
if Nkind (Unit_Declaration_Node (Bod)) =
N_Subprogram_Renaming_Declaration
then
Set_Is_Frozen (Entity (Name (Unit_Declaration_Node (Bod))));
end if;
end if;
end Freeze_Stream_Subprogram;
-- Start of processing for Input
begin
-- If no underlying type, we have an error that will be diagnosed
-- elsewhere, so here we just completely ignore the expansion.
if No (U_Type) then
return;
end if;
-- Stream operations can appear in user code even if the restriction
-- No_Streams is active (for example, when instantiating a predefined
-- container). In that case rewrite the attribute as a Raise to
-- prevent any run-time use.
if Restriction_Active (No_Streams) then
Rewrite (N,
Make_Raise_Program_Error (Sloc (N),
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, B_Type);
return;
end if;
-- If there is a TSS for Input, just call it
Fname := Find_Stream_Subprogram (P_Type, TSS_Stream_Input);
if Present (Fname) then
null;
else
-- If there is a Stream_Convert pragma, use it, we rewrite
-- sourcetyp'Input (stream)
-- as
-- sourcetyp (streamread (strmtyp'Input (stream)));
-- where streamread is the given Read function that converts an
-- argument of type strmtyp to type sourcetyp or a type from which
-- it is derived (extra conversion required for the derived case).
Prag := Get_Stream_Convert_Pragma (P_Type);
if Present (Prag) then
Arg2 := Next (First (Pragma_Argument_Associations (Prag)));
Rfunc := Entity (Expression (Arg2));
Rewrite (N,
Convert_To (B_Type,
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Rfunc, Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of
(Etype (First_Formal (Rfunc)), Loc),
Attribute_Name => Name_Input,
Expressions => Exprs)))));
Analyze_And_Resolve (N, B_Type);
return;
-- Elementary types
elsif Is_Elementary_Type (U_Type) then
-- A special case arises if we have a defined _Read routine,
-- since in this case we are required to call this routine.
if Present (Find_Inherited_TSS (P_Type, TSS_Stream_Read)) then
Build_Record_Or_Elementary_Input_Function
(Loc, P_Type, Decl, Fname);
Insert_Action (N, Decl);
-- For normal cases, we call the I_xxx routine directly
else
Rewrite (N, Build_Elementary_Input_Call (N));
Analyze_And_Resolve (N, P_Type);
return;
end if;
-- Array type case
elsif Is_Array_Type (U_Type) then
Build_Array_Input_Function (Loc, U_Type, Decl, Fname);
Compile_Stream_Body_In_Scope (N, Decl, U_Type, Check => False);
-- Dispatching case with class-wide type
elsif Is_Class_Wide_Type (P_Type) then
-- No need to do anything else compiling under restriction
-- No_Dispatching_Calls. During the semantic analysis we
-- already notified such violation.
if Restriction_Active (No_Dispatching_Calls) then
return;
end if;
declare
Rtyp : constant Entity_Id := Root_Type (P_Type);
Expr : Node_Id; -- call to Descendant_Tag
Get_Tag : Node_Id; -- expression to read the 'Tag
begin
-- Read the internal tag (RM 13.13.2(34)) and use it to
-- initialize a dummy tag value. We used to unconditionally
-- generate:
--
-- Descendant_Tag (String'Input (Strm), P_Type);
--
-- which turns into a call to String_Input_Blk_IO. However,
-- if the input is malformed, that could try to read an
-- enormous String, causing chaos. So instead we call
-- String_Input_Tag, which does the same thing as
-- String_Input_Blk_IO, except that if the String is
-- absurdly long, it raises an exception.
--
-- However, if the No_Stream_Optimizations restriction
-- is active, we disable this unnecessary attempt at
-- robustness; we really need to read the string
-- character-by-character.
--
-- This value is used only to provide a controlling
-- argument for the eventual _Input call. Descendant_Tag is
-- called rather than Internal_Tag to ensure that we have a
-- tag for a type that is descended from the prefix type and
-- declared at the same accessibility level (the exception
-- Tag_Error will be raised otherwise). The level check is
-- required for Ada 2005 because tagged types can be
-- extended in nested scopes (AI-344).
-- Note: we used to generate an explicit declaration of a
-- constant Ada.Tags.Tag object, and use an occurrence of
-- this constant in Cntrl, but this caused a secondary stack
-- leak.
if Restriction_Active (No_Stream_Optimizations) then
Get_Tag :=
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Standard_String, Loc),
Attribute_Name => Name_Input,
Expressions => New_List (
Relocate_Node (Duplicate_Subexpr (Strm))));
else
Get_Tag :=
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of
(RTE (RE_String_Input_Tag), Loc),
Parameter_Associations => New_List (
Relocate_Node (Duplicate_Subexpr (Strm))));
end if;
Expr :=
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Descendant_Tag), Loc),
Parameter_Associations => New_List (
Get_Tag,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (P_Type, Loc),
Attribute_Name => Name_Tag)));
Set_Etype (Expr, RTE (RE_Tag));
-- Now we need to get the entity for the call, and construct
-- a function call node, where we preset a reference to Dnn
-- as the controlling argument (doing an unchecked convert
-- to the class-wide tagged type to make it look like a real
-- tagged object).
Fname := Find_Prim_Op (Rtyp, TSS_Stream_Input);
Cntrl := Unchecked_Convert_To (P_Type, Expr);
Set_Etype (Cntrl, P_Type);
Set_Parent (Cntrl, N);
end;
-- For tagged types, use the primitive Input function
elsif Is_Tagged_Type (U_Type) then
Fname := Find_Prim_Op (U_Type, TSS_Stream_Input);
-- All other record type cases, including protected records. The
-- latter only arise for expander generated code for handling
-- shared passive partition access.
else
pragma Assert
(Is_Record_Type (U_Type) or else Is_Protected_Type (U_Type));
-- Ada 2005 (AI-216): Program_Error is raised executing default
-- implementation of the Input attribute of an unchecked union
-- type if the type lacks default discriminant values.
if Is_Unchecked_Union (Base_Type (U_Type))
and then No (Discriminant_Constraint (U_Type))
then
Insert_Action (N,
Make_Raise_Program_Error (Loc,
Reason => PE_Unchecked_Union_Restriction));
return;
end if;
-- Build the type's Input function, passing the subtype rather
-- than its base type, because checks are needed in the case of
-- constrained discriminants (see Ada 2012 AI05-0192).
Build_Record_Or_Elementary_Input_Function
(Loc, U_Type, Decl, Fname);
Insert_Action (N, Decl);
if Nkind (Parent (N)) = N_Object_Declaration
and then Is_Record_Type (U_Type)
then
-- The stream function may contain calls to user-defined
-- Read procedures for individual components.
declare
Comp : Entity_Id;
Func : Entity_Id;
begin
Comp := First_Component (U_Type);
while Present (Comp) loop
Func :=
Find_Stream_Subprogram
(Etype (Comp), TSS_Stream_Read);
if Present (Func) then
Freeze_Stream_Subprogram (Func);
end if;
Next_Component (Comp);
end loop;
end;
end if;
end if;
end if;
-- If we fall through, Fname is the function to be called. The result
-- is obtained by calling the appropriate function, then converting
-- the result. The conversion does a subtype check.
Call :=
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Fname, Loc),
Parameter_Associations => New_List (
Relocate_Node (Strm)));
Set_Controlling_Argument (Call, Cntrl);
Rewrite (N, Unchecked_Convert_To (P_Type, Call));
Analyze_And_Resolve (N, P_Type);
if Nkind (Parent (N)) = N_Object_Declaration then
Freeze_Stream_Subprogram (Fname);
end if;
end Input;
-------------------
-- Invalid_Value --
-------------------
when Attribute_Invalid_Value =>
Rewrite (N, Get_Simple_Init_Val (Ptyp, N));
-- The value produced may be a conversion of a literal, which must be
-- resolved to establish its proper type.
Analyze_And_Resolve (N);
--------------
-- Last_Bit --
--------------
-- We leave the computation up to the back end, since we don't know what
-- layout will be chosen if no component clause was specified.
when Attribute_Last_Bit =>
Apply_Universal_Integer_Attribute_Checks (N);
------------------
-- Leading_Part --
------------------
-- Transforms 'Leading_Part into a call to the floating-point attribute
-- function Leading_Part in Fat_xxx (where xxx is the root type)
-- Note: strictly, we should generate special case code to deal with
-- absurdly large positive arguments (greater than Integer'Last), which
-- result in returning the first argument unchanged, but it hardly seems
-- worth the effort. We raise constraint error for absurdly negative
-- arguments which is fine.
when Attribute_Leading_Part =>
Expand_Fpt_Attribute_RI (N);
------------
-- Length --
------------
when Attribute_Length => Length : declare
Ityp : Entity_Id;
Xnum : Uint;
begin
-- Processing for packed array types
if Is_Array_Type (Ptyp) and then Is_Packed (Ptyp) then
Ityp := Get_Index_Subtype (N);
-- If the index type, Ityp, is an enumeration type with holes,
-- then we calculate X'Length explicitly using
-- Typ'Max
-- (0, Ityp'Pos (X'Last (N)) -
-- Ityp'Pos (X'First (N)) + 1);
-- Since the bounds in the template are the representation values
-- and the back end would get the wrong value.
if Is_Enumeration_Type (Ityp)
and then Present (Enum_Pos_To_Rep (Base_Type (Ityp)))
then
if No (Exprs) then
Xnum := Uint_1;
else
Xnum := Expr_Value (First (Expressions (N)));
end if;
Rewrite (N,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Typ, Loc),
Attribute_Name => Name_Max,
Expressions => New_List
(Make_Integer_Literal (Loc, 0),
Make_Op_Add (Loc,
Left_Opnd =>
Make_Op_Subtract (Loc,
Left_Opnd =>
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Ityp, Loc),
Attribute_Name => Name_Pos,
Expressions => New_List (
Make_Attribute_Reference (Loc,
Prefix => Duplicate_Subexpr (Pref),
Attribute_Name => Name_Last,
Expressions => New_List (
Make_Integer_Literal (Loc, Xnum))))),
Right_Opnd =>
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Ityp, Loc),
Attribute_Name => Name_Pos,
Expressions => New_List (
Make_Attribute_Reference (Loc,
Prefix =>
Duplicate_Subexpr_No_Checks (Pref),
Attribute_Name => Name_First,
Expressions => New_List (
Make_Integer_Literal (Loc, Xnum)))))),
Right_Opnd => Make_Integer_Literal (Loc, 1)))));
Analyze_And_Resolve (N, Typ, Suppress => All_Checks);
return;
-- If the prefix type is a constrained packed array type which
-- already has a Packed_Array_Impl_Type representation defined,
-- then replace this attribute with a reference to 'Range_Length
-- of the appropriate index subtype (since otherwise the
-- back end will try to give us the value of 'Length for
-- this implementation type).s
elsif Is_Constrained (Ptyp) then
Rewrite (N,
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Range_Length,
Prefix => New_Occurrence_Of (Ityp, Loc)));
Analyze_And_Resolve (N, Typ);
end if;
-- Access type case
elsif Is_Access_Type (Ptyp) then
Apply_Access_Check (N);
-- If the designated type is a packed array type, then we convert
-- the reference to:
-- typ'Max (0, 1 +
-- xtyp'Pos (Pref'Last (Expr)) -
-- xtyp'Pos (Pref'First (Expr)));
-- This is a bit complex, but it is the easiest thing to do that
-- works in all cases including enum types with holes xtyp here
-- is the appropriate index type.
declare
Dtyp : constant Entity_Id := Designated_Type (Ptyp);
Xtyp : Entity_Id;
begin
if Is_Array_Type (Dtyp) and then Is_Packed (Dtyp) then
Xtyp := Get_Index_Subtype (N);
Rewrite (N,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Typ, Loc),
Attribute_Name => Name_Max,
Expressions => New_List (
Make_Integer_Literal (Loc, 0),
Make_Op_Add (Loc,
Make_Integer_Literal (Loc, 1),
Make_Op_Subtract (Loc,
Left_Opnd =>
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Xtyp, Loc),
Attribute_Name => Name_Pos,
Expressions => New_List (
Make_Attribute_Reference (Loc,
Prefix => Duplicate_Subexpr (Pref),
Attribute_Name => Name_Last,
Expressions =>
New_Copy_List (Exprs)))),
Right_Opnd =>
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Xtyp, Loc),
Attribute_Name => Name_Pos,
Expressions => New_List (
Make_Attribute_Reference (Loc,
Prefix =>
Duplicate_Subexpr_No_Checks (Pref),
Attribute_Name => Name_First,
Expressions =>
New_Copy_List (Exprs)))))))));
Analyze_And_Resolve (N, Typ);
end if;
end;
-- Otherwise leave it to the back end
else
Apply_Universal_Integer_Attribute_Checks (N);
end if;
end Length;
-- Attribute Loop_Entry is replaced with a reference to a constant value
-- which captures the prefix at the entry point of the related loop. The
-- loop itself may be transformed into a conditional block.
when Attribute_Loop_Entry =>
Expand_Loop_Entry_Attribute (N);
-------------
-- Machine --
-------------
-- Transforms 'Machine into a call to the floating-point attribute
-- function Machine in Fat_xxx (where xxx is the root type).
-- Expansion is avoided for cases the back end can handle directly.
when Attribute_Machine =>
if not Is_Inline_Floating_Point_Attribute (N) then
Expand_Fpt_Attribute_R (N);
end if;
----------------------
-- Machine_Rounding --
----------------------
-- Transforms 'Machine_Rounding into a call to the floating-point
-- attribute function Machine_Rounding in Fat_xxx (where xxx is the root
-- type). Expansion is avoided for cases the back end can handle
-- directly.
when Attribute_Machine_Rounding =>
if not Is_Inline_Floating_Point_Attribute (N) then
Expand_Fpt_Attribute_R (N);
end if;
------------------
-- Machine_Size --
------------------
-- Machine_Size is equivalent to Object_Size, so transform it into
-- Object_Size and that way the back end never sees Machine_Size.
when Attribute_Machine_Size =>
Rewrite (N,
Make_Attribute_Reference (Loc,
Prefix => Prefix (N),
Attribute_Name => Name_Object_Size));
Analyze_And_Resolve (N, Typ);
--------------
-- Mantissa --
--------------
-- The only case that can get this far is the dynamic case of the old
-- Ada 83 Mantissa attribute for the fixed-point case. For this case,
-- we expand:
-- typ'Mantissa
-- into
-- ityp (System.Mantissa.Mantissa_Value
-- (Integer'Integer_Value (typ'First),
-- Integer'Integer_Value (typ'Last)));
when Attribute_Mantissa =>
Rewrite (N,
Convert_To (Typ,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Mantissa_Value), Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Standard_Integer, Loc),
Attribute_Name => Name_Integer_Value,
Expressions => New_List (
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Ptyp, Loc),
Attribute_Name => Name_First))),
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Standard_Integer, Loc),
Attribute_Name => Name_Integer_Value,
Expressions => New_List (
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Ptyp, Loc),
Attribute_Name => Name_Last)))))));
Analyze_And_Resolve (N, Typ);
---------
-- Max --
---------
when Attribute_Max =>
Expand_Min_Max_Attribute (N);
----------------------------------
-- Max_Size_In_Storage_Elements --
----------------------------------
when Attribute_Max_Size_In_Storage_Elements => declare
Typ : constant Entity_Id := Etype (N);
Attr : Node_Id;
Atyp : Entity_Id;
Conversion_Added : Boolean := False;
-- A flag which tracks whether the original attribute has been
-- wrapped inside a type conversion.
begin
-- If the prefix is X'Class, we transform it into a direct reference
-- to the class-wide type, because the back end must not see a 'Class
-- reference. See also 'Size.
if Is_Entity_Name (Pref)
and then Is_Class_Wide_Type (Entity (Pref))
then
Rewrite (Prefix (N), New_Occurrence_Of (Entity (Pref), Loc));
return;
end if;
Apply_Universal_Integer_Attribute_Checks (N);
-- The universal integer check may sometimes add a type conversion,
-- retrieve the original attribute reference from the expression.
Attr := N;
if Nkind (Attr) = N_Type_Conversion then
Attr := Expression (Attr);
Conversion_Added := True;
end if;
pragma Assert (Nkind (Attr) = N_Attribute_Reference);
-- Heap-allocated controlled objects contain two extra pointers which
-- are not part of the actual type. Transform the attribute reference
-- into a runtime expression to add the size of the hidden header.
if Needs_Finalization (Ptyp)
and then not Header_Size_Added (Attr)
then
Set_Header_Size_Added (Attr);
Atyp := Etype (Attr);
-- Generate:
-- P'Max_Size_In_Storage_Elements +
-- Atyp (Header_Size_With_Padding (Ptyp'Alignment))
Rewrite (Attr,
Make_Op_Add (Loc,
Left_Opnd => Relocate_Node (Attr),
Right_Opnd =>
Convert_To (Atyp,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of
(RTE (RE_Header_Size_With_Padding), Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Ptyp, Loc),
Attribute_Name => Name_Alignment))))));
Analyze_And_Resolve (Attr, Atyp);
-- Add a conversion to the target type
if not Conversion_Added then
Convert_To_And_Rewrite (Typ, Attr);
end if;
return;
end if;
end;
--------------------
-- Mechanism_Code --
--------------------
when Attribute_Mechanism_Code =>
-- We must replace the prefix in the renamed case
if Is_Entity_Name (Pref)
and then Present (Alias (Entity (Pref)))
then
Set_Renamed_Subprogram (Pref, Alias (Entity (Pref)));
end if;
---------
-- Min --
---------
when Attribute_Min =>
Expand_Min_Max_Attribute (N);
---------
-- Mod --
---------
when Attribute_Mod => Mod_Case : declare
Arg : constant Node_Id := Relocate_Node (First (Exprs));
Hi : constant Node_Id := Type_High_Bound (Etype (Arg));
Modv : constant Uint := Modulus (Btyp);
begin
-- This is not so simple. The issue is what type to use for the
-- computation of the modular value.
-- The easy case is when the modulus value is within the bounds
-- of the signed integer type of the argument. In this case we can
-- just do the computation in that signed integer type, and then
-- do an ordinary conversion to the target type.
if Modv <= Expr_Value (Hi) then
Rewrite (N,
Convert_To (Btyp,
Make_Op_Mod (Loc,
Left_Opnd => Arg,
Right_Opnd => Make_Integer_Literal (Loc, Modv))));
-- Here we know that the modulus is larger than type'Last of the
-- integer type. There are two cases to consider:
-- a) The integer value is non-negative. In this case, it is
-- returned as the result (since it is less than the modulus).
-- b) The integer value is negative. In this case, we know that the
-- result is modulus + value, where the value might be as small as
-- -modulus. The trouble is what type do we use to do the subtract.
-- No type will do, since modulus can be as big as 2**64, and no
-- integer type accommodates this value. Let's do bit of algebra
-- modulus + value
-- = modulus - (-value)
-- = (modulus - 1) - (-value - 1)
-- Now modulus - 1 is certainly in range of the modular type.
-- -value is in the range 1 .. modulus, so -value -1 is in the
-- range 0 .. modulus-1 which is in range of the modular type.
-- Furthermore, (-value - 1) can be expressed as -(value + 1)
-- which we can compute using the integer base type.
-- Once this is done we analyze the if expression without range
-- checks, because we know everything is in range, and we want
-- to prevent spurious warnings on either branch.
else
Rewrite (N,
Make_If_Expression (Loc,
Expressions => New_List (
Make_Op_Ge (Loc,
Left_Opnd => Duplicate_Subexpr (Arg),
Right_Opnd => Make_Integer_Literal (Loc, 0)),
Convert_To (Btyp,
Duplicate_Subexpr_No_Checks (Arg)),
Make_Op_Subtract (Loc,
Left_Opnd =>
Make_Integer_Literal (Loc,
Intval => Modv - 1),
Right_Opnd =>
Convert_To (Btyp,
Make_Op_Minus (Loc,
Right_Opnd =>
Make_Op_Add (Loc,
Left_Opnd => Duplicate_Subexpr_No_Checks (Arg),
Right_Opnd =>
Make_Integer_Literal (Loc,
Intval => 1))))))));
end if;
Analyze_And_Resolve (N, Btyp, Suppress => All_Checks);
end Mod_Case;
-----------
-- Model --
-----------
-- Transforms 'Model into a call to the floating-point attribute
-- function Model in Fat_xxx (where xxx is the root type).
-- Expansion is avoided for cases the back end can handle directly.
when Attribute_Model =>
if not Is_Inline_Floating_Point_Attribute (N) then
Expand_Fpt_Attribute_R (N);
end if;
-----------------
-- Object_Size --
-----------------
-- The processing for Object_Size shares the processing for Size
---------
-- Old --
---------
when Attribute_Old => Old : declare
Typ : constant Entity_Id := Etype (N);
CW_Temp : Entity_Id;
CW_Typ : Entity_Id;
Decl : Node_Id;
Ins_Nod : Node_Id;
Subp : Node_Id;
Temp : Entity_Id;
use Old_Attr_Util.Conditional_Evaluation;
use Old_Attr_Util.Indirect_Temps;
begin
-- Generating C code we don't need to expand this attribute when
-- we are analyzing the internally built nested postconditions
-- procedure since it will be expanded inline (and later it will
-- be removed by Expand_N_Subprogram_Body). It this expansion is
-- performed in such case then the compiler generates unreferenced
-- extra temporaries.
if Modify_Tree_For_C
and then Chars (Current_Scope) = Name_uPostconditions
then
return;
end if;
-- Climb the parent chain looking for subprogram _Postconditions
Subp := N;
while Present (Subp) loop
exit when Nkind (Subp) = N_Subprogram_Body
and then Chars (Defining_Entity (Subp)) = Name_uPostconditions;
-- If assertions are disabled, no need to create the declaration
-- that preserves the value. The postcondition pragma in which
-- 'Old appears will be checked or disabled according to the
-- current policy in effect.
if Nkind (Subp) = N_Pragma and then not Is_Checked (Subp) then
return;
end if;
Subp := Parent (Subp);
end loop;
-- 'Old can only appear in a postcondition, the generated body of
-- _Postconditions must be in the tree (or inlined if we are
-- generating C code).
pragma Assert
(Present (Subp)
or else (Modify_Tree_For_C and then In_Inlined_Body));
Temp := Make_Temporary (Loc, 'T', Pref);
-- Set the entity kind now in order to mark the temporary as a
-- handler of attribute 'Old's prefix.
Set_Ekind (Temp, E_Constant);
Set_Stores_Attribute_Old_Prefix (Temp);
-- Push the scope of the related subprogram where _Postcondition
-- resides as this ensures that the object will be analyzed in the
-- proper context.
if Present (Subp) then
Push_Scope (Scope (Defining_Entity (Subp)));
-- No need to push the scope when generating C code since the
-- _Postcondition procedure has been inlined.
else pragma Assert (Modify_Tree_For_C);
pragma Assert (In_Inlined_Body);
null;
end if;
-- Locate the insertion place of the internal temporary that saves
-- the 'Old value.
if Present (Subp) then
Ins_Nod := Subp;
-- Generating C, the postcondition procedure has been inlined and the
-- temporary is added before the first declaration of the enclosing
-- subprogram.
else pragma Assert (Modify_Tree_For_C);
Ins_Nod := N;
while Nkind (Ins_Nod) /= N_Subprogram_Body loop
Ins_Nod := Parent (Ins_Nod);
end loop;
Ins_Nod := First (Declarations (Ins_Nod));
end if;
if Eligible_For_Conditional_Evaluation (N) then
declare
Eval_Stmts : constant List_Id := New_List;
procedure Append_For_Indirect_Temp
(N : Node_Id; Is_Eval_Stmt : Boolean);
-- Append either a declaration (which is to be elaborated
-- unconditionally) or an evaluation statement (which is
-- to be executed conditionally).
-------------------------------
-- Append_For_Indirect_Temp --
-------------------------------
procedure Append_For_Indirect_Temp
(N : Node_Id; Is_Eval_Stmt : Boolean)
is
begin
if Is_Eval_Stmt then
Append_To (Eval_Stmts, N);
else
Insert_Before_And_Analyze (Ins_Nod, N);
end if;
end Append_For_Indirect_Temp;
procedure Declare_Indirect_Temporary is new
Declare_Indirect_Temp
(Append_Item => Append_For_Indirect_Temp);
begin
Declare_Indirect_Temporary
(Attr_Prefix => Pref, Indirect_Temp => Temp);
Insert_Before_And_Analyze (
Ins_Nod,
Make_If_Statement
(Sloc => Loc,
Condition => Conditional_Evaluation_Condition (N),
Then_Statements => Eval_Stmts));
Rewrite (N, Indirect_Temp_Value
(Temp => Temp,
Typ => Etype (Pref),
Loc => Loc));
if Present (Subp) then
Pop_Scope;
end if;
return;
end;
-- Preserve the tag of the prefix by offering a specific view of the
-- class-wide version of the prefix.
elsif Is_Tagged_Type (Typ) then
-- Generate:
-- CW_Temp : constant Typ'Class := Typ'Class (Pref);
CW_Temp := Make_Temporary (Loc, 'T');
CW_Typ := Class_Wide_Type (Typ);
Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => CW_Temp,
Constant_Present => True,
Object_Definition => New_Occurrence_Of (CW_Typ, Loc),
Expression =>
Convert_To (CW_Typ, Relocate_Node (Pref)));
Insert_Before_And_Analyze (Ins_Nod, Decl);
-- Generate:
-- Temp : Typ renames Typ (CW_Temp);
Insert_Before_And_Analyze (Ins_Nod,
Make_Object_Renaming_Declaration (Loc,
Defining_Identifier => Temp,
Subtype_Mark => New_Occurrence_Of (Typ, Loc),
Name =>
Convert_To (Typ, New_Occurrence_Of (CW_Temp, Loc))));
Set_Stores_Attribute_Old_Prefix (CW_Temp);
-- Non-tagged case
else
-- Generate:
-- Temp : constant Typ := Pref;
Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => Temp,
Constant_Present => True,
Object_Definition => New_Occurrence_Of (Typ, Loc),
Expression => Relocate_Node (Pref));
Insert_Before_And_Analyze (Ins_Nod, Decl);
end if;
if Present (Subp) then
Pop_Scope;
end if;
-- Ensure that the prefix of attribute 'Old is valid. The check must
-- be inserted after the expansion of the attribute has taken place
-- to reflect the new placement of the prefix.
if Validity_Checks_On and then Validity_Check_Operands then
Ensure_Valid (Expression (Decl));
end if;
Rewrite (N, New_Occurrence_Of (Temp, Loc));
end Old;
----------------------
-- Overlaps_Storage --
----------------------
when Attribute_Overlaps_Storage => Overlaps_Storage : declare
Loc : constant Source_Ptr := Sloc (N);
X : constant Node_Id := Prefix (N);
Y : constant Node_Id := First (Expressions (N));
-- The arguments
X_Addr, Y_Addr : Node_Id;
-- The expressions for their integer addresses
X_Size, Y_Size : Node_Id;
-- The expressions for their sizes
Cond : Node_Id;
begin
-- Attribute expands into:
-- (if X'Size = 0 or else Y'Size = 0 then
-- False
-- else
-- (if X'Address <= Y'Address then
-- (X'Address + X'Size - 1) >= Y'Address
-- else
-- (Y'Address + Y'Size - 1) >= X'Address))
-- with the proper address operations. We convert addresses to
-- integer addresses to use predefined arithmetic. The size is
-- expressed in storage units. We add copies of X_Addr and Y_Addr
-- to prevent the appearance of the same node in two places in
-- the tree.
X_Addr :=
Unchecked_Convert_To (RTE (RE_Integer_Address),
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Address,
Prefix => New_Copy_Tree (X)));
Y_Addr :=
Unchecked_Convert_To (RTE (RE_Integer_Address),
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Address,
Prefix => New_Copy_Tree (Y)));
X_Size :=
Make_Op_Divide (Loc,
Left_Opnd =>
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Size,
Prefix => New_Copy_Tree (X)),
Right_Opnd =>
Make_Integer_Literal (Loc, System_Storage_Unit));
Y_Size :=
Make_Op_Divide (Loc,
Left_Opnd =>
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Size,
Prefix => New_Copy_Tree (Y)),
Right_Opnd =>
Make_Integer_Literal (Loc, System_Storage_Unit));
Cond :=
Make_Op_Le (Loc,
Left_Opnd => X_Addr,
Right_Opnd => Y_Addr);
-- Perform the rewriting
Rewrite (N,
Make_If_Expression (Loc, New_List (
-- Generate a check for zero-sized things like a null record with
-- size zero or an array with zero length since they have no
-- opportunity of overlapping.
-- Without this check, a zero-sized object can trigger a false
-- runtime result if it's compared against another object in
-- its declarative region, due to the zero-sized object having
-- the same address.
Make_Or_Else (Loc,
Left_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd =>
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Size,
Prefix => New_Copy_Tree (X)),
Right_Opnd => Make_Integer_Literal (Loc, 0)),
Right_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd =>
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Size,
Prefix => New_Copy_Tree (Y)),
Right_Opnd => Make_Integer_Literal (Loc, 0))),
New_Occurrence_Of (Standard_False, Loc),
-- Non-zero-size overlap check
Make_If_Expression (Loc, New_List (
Cond,
Make_Op_Ge (Loc,
Left_Opnd =>
Make_Op_Add (Loc,
Left_Opnd => New_Copy_Tree (X_Addr),
Right_Opnd =>
Make_Op_Subtract (Loc,
Left_Opnd => X_Size,
Right_Opnd => Make_Integer_Literal (Loc, 1))),
Right_Opnd => Y_Addr),
Make_Op_Ge (Loc,
Left_Opnd =>
Make_Op_Add (Loc,
Left_Opnd => New_Copy_Tree (Y_Addr),
Right_Opnd =>
Make_Op_Subtract (Loc,
Left_Opnd => Y_Size,
Right_Opnd => Make_Integer_Literal (Loc, 1))),
Right_Opnd => X_Addr))))));
Analyze_And_Resolve (N, Standard_Boolean);
end Overlaps_Storage;
------------
-- Output --
------------
when Attribute_Output => Output : declare
P_Type : constant Entity_Id := Entity (Pref);
U_Type : constant Entity_Id := Underlying_Type (P_Type);
Pname : Entity_Id;
Decl : Node_Id;
Prag : Node_Id;
Arg3 : Node_Id;
Wfunc : Node_Id;
begin
-- If no underlying type, we have an error that will be diagnosed
-- elsewhere, so here we just completely ignore the expansion.
if No (U_Type) then
return;
end if;
-- Stream operations can appear in user code even if the restriction
-- No_Streams is active (for example, when instantiating a predefined
-- container). In that case rewrite the attribute as a Raise to
-- prevent any run-time use.
if Restriction_Active (No_Streams) then
Rewrite (N,
Make_Raise_Program_Error (Sloc (N),
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, Standard_Void_Type);
return;
end if;
-- If TSS for Output is present, just call it
Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Output);
if Present (Pname) then
null;
else
-- If there is a Stream_Convert pragma, use it, we rewrite
-- sourcetyp'Output (stream, Item)
-- as
-- strmtyp'Output (Stream, strmwrite (acttyp (Item)));
-- where strmwrite is the given Write function that converts an
-- argument of type sourcetyp or a type acctyp, from which it is
-- derived to type strmtyp. The conversion to acttyp is required
-- for the derived case.
Prag := Get_Stream_Convert_Pragma (P_Type);
if Present (Prag) then
Arg3 :=
Next (Next (First (Pragma_Argument_Associations (Prag))));
Wfunc := Entity (Expression (Arg3));
Rewrite (N,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Etype (Wfunc), Loc),
Attribute_Name => Name_Output,
Expressions => New_List (
Relocate_Node (First (Exprs)),
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Wfunc, Loc),
Parameter_Associations => New_List (
OK_Convert_To (Etype (First_Formal (Wfunc)),
Relocate_Node (Next (First (Exprs)))))))));
Analyze (N);
return;
-- For elementary types, we call the W_xxx routine directly. Note
-- that the effect of Write and Output is identical for the case
-- of an elementary type (there are no discriminants or bounds).
elsif Is_Elementary_Type (U_Type) then
-- A special case arises if we have a defined _Write routine,
-- since in this case we are required to call this routine.
if Present (Find_Inherited_TSS (P_Type, TSS_Stream_Write)) then
Build_Record_Or_Elementary_Output_Procedure
(Loc, P_Type, Decl, Pname);
Insert_Action (N, Decl);
-- For normal cases, we call the W_xxx routine directly
else
Rewrite (N, Build_Elementary_Write_Call (N));
Analyze (N);
return;
end if;
-- Array type case
elsif Is_Array_Type (U_Type) then
Build_Array_Output_Procedure (Loc, U_Type, Decl, Pname);
Compile_Stream_Body_In_Scope (N, Decl, U_Type, Check => False);
-- Class-wide case, first output external tag, then dispatch
-- to the appropriate primitive Output function (RM 13.13.2(31)).
elsif Is_Class_Wide_Type (P_Type) then
-- No need to do anything else compiling under restriction
-- No_Dispatching_Calls. During the semantic analysis we
-- already notified such violation.
if Restriction_Active (No_Dispatching_Calls) then
return;
end if;
Tag_Write : declare
Strm : constant Node_Id := First (Exprs);
Item : constant Node_Id := Next (Strm);
begin
-- Ada 2005 (AI-344): Check that the accessibility level
-- of the type of the output object is not deeper than
-- that of the attribute's prefix type.
-- if Get_Access_Level (Item'Tag)
-- /= Get_Access_Level (P_Type'Tag)
-- then
-- raise Tag_Error;
-- end if;
-- String'Output (Strm, External_Tag (Item'Tag));
-- We cannot figure out a practical way to implement this
-- accessibility check on virtual machines, so we omit it.
if Ada_Version >= Ada_2005
and then Tagged_Type_Expansion
then
Insert_Action (N,
Make_Implicit_If_Statement (N,
Condition =>
Make_Op_Ne (Loc,
Left_Opnd =>
Build_Get_Access_Level (Loc,
Make_Attribute_Reference (Loc,
Prefix =>
Relocate_Node (
Duplicate_Subexpr (Item,
Name_Req => True)),
Attribute_Name => Name_Tag)),
Right_Opnd =>
Make_Integer_Literal (Loc,
Type_Access_Level (P_Type))),
Then_Statements =>
New_List (Make_Raise_Statement (Loc,
New_Occurrence_Of (
RTE (RE_Tag_Error), Loc)))));
end if;
Insert_Action (N,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Standard_String, Loc),
Attribute_Name => Name_Output,
Expressions => New_List (
Relocate_Node (Duplicate_Subexpr (Strm)),
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_External_Tag), Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix =>
Relocate_Node
(Duplicate_Subexpr (Item, Name_Req => True)),
Attribute_Name => Name_Tag))))));
end Tag_Write;
Pname := Find_Prim_Op (U_Type, TSS_Stream_Output);
-- Tagged type case, use the primitive Output function
elsif Is_Tagged_Type (U_Type) then
Pname := Find_Prim_Op (U_Type, TSS_Stream_Output);
-- All other record type cases, including protected records.
-- The latter only arise for expander generated code for
-- handling shared passive partition access.
else
pragma Assert
(Is_Record_Type (U_Type) or else Is_Protected_Type (U_Type));
-- Ada 2005 (AI-216): Program_Error is raised when executing
-- the default implementation of the Output attribute of an
-- unchecked union type if the type lacks default discriminant
-- values.
if Is_Unchecked_Union (Base_Type (U_Type))
and then No (Discriminant_Constraint (U_Type))
then
Insert_Action (N,
Make_Raise_Program_Error (Loc,
Reason => PE_Unchecked_Union_Restriction));
return;
end if;
Build_Record_Or_Elementary_Output_Procedure
(Loc, Base_Type (U_Type), Decl, Pname);
Insert_Action (N, Decl);
end if;
end if;
-- If we fall through, Pname is the name of the procedure to call
Rewrite_Attribute_Proc_Call (Pname);
end Output;
---------
-- Pos --
---------
-- For enumeration types, with a non-standard representation we generate
-- a call to the _Rep_To_Pos function created when the type was frozen.
-- The call has the form:
-- _rep_to_pos (expr, flag)
-- The parameter flag is True if range checks are enabled, causing
-- Program_Error to be raised if the expression has an invalid
-- representation, and False if range checks are suppressed.
-- For enumeration types with a standard representation, Pos can be
-- rewritten as a simple conversion with Conversion_OK set.
-- For integer types, Pos is equivalent to a simple integer conversion
-- and we rewrite it as such.
when Attribute_Pos => Pos : declare
Expr : constant Node_Id := First (Exprs);
Etyp : Entity_Id := Base_Type (Ptyp);
begin
-- Deal with zero/non-zero boolean values
if Is_Boolean_Type (Etyp) then
Adjust_Condition (Expr);
Etyp := Standard_Boolean;
Set_Prefix (N, New_Occurrence_Of (Standard_Boolean, Loc));
end if;
-- Case of enumeration type
if Is_Enumeration_Type (Etyp) then
-- Non-standard enumeration type (generate call)
if Present (Enum_Pos_To_Rep (Etyp)) then
Append_To (Exprs, Rep_To_Pos_Flag (Etyp, Loc));
Rewrite (N,
Convert_To (Typ,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (TSS (Etyp, TSS_Rep_To_Pos), Loc),
Parameter_Associations => Exprs)));
-- Standard enumeration type (replace by conversion)
-- This is simply a direct conversion from the enumeration type to
-- the target integer type, which is treated by the back end as a
-- normal integer conversion, treating the enumeration type as an
-- integer, which is exactly what we want. We set Conversion_OK to
-- make sure that the analyzer does not complain about what might
-- be an illegal conversion.
-- However the target type is universal integer in most cases,
-- which is a very large type, so we first convert to a small
-- signed integer type in order not to lose the size information.
else
Rewrite (N, OK_Convert_To (Get_Integer_Type (Ptyp), Expr));
Convert_To_And_Rewrite (Typ, N);
end if;
-- Deal with integer types (replace by conversion)
elsif Is_Integer_Type (Etyp) then
Rewrite (N, Convert_To (Typ, Expr));
end if;
Analyze_And_Resolve (N, Typ);
end Pos;
--------------
-- Position --
--------------
-- We leave the computation up to the back end, since we don't know what
-- layout will be chosen if no component clause was specified.
when Attribute_Position =>
Apply_Universal_Integer_Attribute_Checks (N);
----------
-- Pred --
----------
-- 1. Deal with enumeration types with holes.
-- 2. For floating-point, generate call to attribute function.
-- 3. For other cases, deal with constraint checking.
when Attribute_Pred => Pred : declare
Etyp : constant Entity_Id := Base_Type (Ptyp);
begin
-- For enumeration types with non-standard representations, we
-- expand typ'Pred (x) into:
-- Pos_To_Rep (Rep_To_Pos (x) - 1)
-- if the representation is non-contiguous, and just x - 1 if it is
-- after having dealt with constraint checking.
if Is_Enumeration_Type (Etyp)
and then Present (Enum_Pos_To_Rep (Etyp))
then
if Has_Contiguous_Rep (Etyp) then
if not Range_Checks_Suppressed (Ptyp) then
Set_Do_Range_Check (First (Exprs), False);
Expand_Pred_Succ_Attribute (N);
end if;
Rewrite (N,
Unchecked_Convert_To (Etyp,
Make_Op_Subtract (Loc,
Left_Opnd =>
Unchecked_Convert_To (
Integer_Type_For
(Esize (Etyp), Is_Unsigned_Type (Etyp)),
First (Exprs)),
Right_Opnd =>
Make_Integer_Literal (Loc, 1))));
else
-- Add Boolean parameter True, to request program error if
-- we have a bad representation on our hands. If checks are
-- suppressed, then add False instead
Append_To (Exprs, Rep_To_Pos_Flag (Ptyp, Loc));
Rewrite (N,
Make_Indexed_Component (Loc,
Prefix =>
New_Occurrence_Of
(Enum_Pos_To_Rep (Etyp), Loc),
Expressions => New_List (
Make_Op_Subtract (Loc,
Left_Opnd =>
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of
(TSS (Etyp, TSS_Rep_To_Pos), Loc),
Parameter_Associations => Exprs),
Right_Opnd => Make_Integer_Literal (Loc, 1)))));
end if;
-- Suppress checks since they have all been done above
Analyze_And_Resolve (N, Typ, Suppress => All_Checks);
-- For floating-point, we transform 'Pred into a call to the Pred
-- floating-point attribute function in Fat_xxx (xxx is root type).
-- Note that this function takes care of the overflow case.
elsif Is_Floating_Point_Type (Ptyp) then
Expand_Fpt_Attribute_R (N);
Analyze_And_Resolve (N, Typ);
-- For modular types, nothing to do (no overflow, since wraps)
elsif Is_Modular_Integer_Type (Ptyp) then
null;
-- For other types, if argument is marked as needing a range check or
-- overflow checking is enabled, we must generate a check.
elsif not Overflow_Checks_Suppressed (Ptyp)
or else Do_Range_Check (First (Exprs))
then
Set_Do_Range_Check (First (Exprs), False);
Expand_Pred_Succ_Attribute (N);
end if;
end Pred;
--------------
-- Priority --
--------------
-- Ada 2005 (AI-327): Dynamic ceiling priorities
-- We rewrite X'Priority as the following run-time call:
-- Get_Ceiling (X._Object)
-- Note that although X'Priority is notionally an object, it is quite
-- deliberately not defined as an aliased object in the RM. This means
-- that it works fine to rewrite it as a call, without having to worry
-- about complications that would other arise from X'Priority'Access,
-- which is illegal, because of the lack of aliasing.
when Attribute_Priority => Priority : declare
Call : Node_Id;
Conctyp : Entity_Id;
New_Itype : Entity_Id;
Object_Parm : Node_Id;
Subprg : Entity_Id;
RT_Subprg_Name : Node_Id;
begin
-- Look for the enclosing concurrent type
Conctyp := Current_Scope;
while not Is_Concurrent_Type (Conctyp) loop
Conctyp := Scope (Conctyp);
end loop;
pragma Assert (Is_Protected_Type (Conctyp));
-- Generate the actual of the call
Subprg := Current_Scope;
while not Present (Protected_Body_Subprogram (Subprg)) loop
Subprg := Scope (Subprg);
end loop;
-- Use of 'Priority inside protected entries and barriers (in both
-- cases the type of the first formal of their expanded subprogram
-- is Address)
if Etype (First_Entity (Protected_Body_Subprogram (Subprg))) =
RTE (RE_Address)
then
-- In the expansion of protected entries the type of the first
-- formal of the Protected_Body_Subprogram is an Address. In order
-- to reference the _object component we generate:
-- type T is access p__ptTV;
-- freeze T []
New_Itype := Create_Itype (E_Access_Type, N);
Set_Etype (New_Itype, New_Itype);
Set_Directly_Designated_Type (New_Itype,
Corresponding_Record_Type (Conctyp));
Freeze_Itype (New_Itype, N);
-- Generate:
-- T!(O)._object'unchecked_access
Object_Parm :=
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
Unchecked_Convert_To (New_Itype,
New_Occurrence_Of
(First_Entity (Protected_Body_Subprogram (Subprg)),
Loc)),
Selector_Name => Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access);
-- Use of 'Priority inside a protected subprogram
else
Object_Parm :=
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
New_Occurrence_Of
(First_Entity (Protected_Body_Subprogram (Subprg)),
Loc),
Selector_Name => Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access);
end if;
-- Select the appropriate run-time subprogram
if Number_Entries (Conctyp) = 0 then
RT_Subprg_Name := New_Occurrence_Of (RTE (RE_Get_Ceiling), Loc);
else
RT_Subprg_Name := New_Occurrence_Of (RTE (RO_PE_Get_Ceiling), Loc);
end if;
Call :=
Make_Function_Call (Loc,
Name => RT_Subprg_Name,
Parameter_Associations => New_List (Object_Parm));
Rewrite (N, Call);
-- Avoid the generation of extra checks on the pointer to the
-- protected object.
Analyze_And_Resolve (N, Typ, Suppress => Access_Check);
end Priority;
---------------
-- Put_Image --
---------------
when Attribute_Put_Image => Put_Image : declare
use Exp_Put_Image;
U_Type : constant Entity_Id := Underlying_Type (Entity (Pref));
Pname : Entity_Id;
Decl : Node_Id;
begin
-- If no underlying type, we have an error that will be diagnosed
-- elsewhere, so here we just completely ignore the expansion.
if No (U_Type) then
return;
end if;
-- If there is a TSS for Put_Image, just call it. This is true for
-- tagged types (if enabled) and if there is a user-specified
-- Put_Image.
Pname := TSS (U_Type, TSS_Put_Image);
if No (Pname) then
if Is_Tagged_Type (U_Type) and then Is_Derived_Type (U_Type) then
Pname := Find_Optional_Prim_Op (U_Type, TSS_Put_Image);
else
Pname := Find_Inherited_TSS (U_Type, TSS_Put_Image);
end if;
end if;
if No (Pname) then
-- If Put_Image is disabled, call the "unknown" version
if not Enable_Put_Image (U_Type) then
Rewrite (N, Build_Unknown_Put_Image_Call (N));
Analyze (N);
return;
-- For elementary types, we call the routine in System.Put_Images
-- directly.
elsif Is_Elementary_Type (U_Type) then
Rewrite (N, Build_Elementary_Put_Image_Call (N));
Analyze (N);
return;
elsif Is_Standard_String_Type (U_Type) then
Rewrite (N, Build_String_Put_Image_Call (N));
Analyze (N);
return;
elsif Is_Array_Type (U_Type) then
Build_Array_Put_Image_Procedure (N, U_Type, Decl, Pname);
Insert_Action (N, Decl);
-- Tagged type case, use the primitive Put_Image function. Note
-- that this will dispatch in the class-wide case which is what we
-- want.
elsif Is_Tagged_Type (U_Type) then
Pname := Find_Optional_Prim_Op (U_Type, TSS_Put_Image);
-- ????Need Find_Optional_Prim_Op instead of Find_Prim_Op,
-- because we might be deriving from a predefined type, which
-- currently has Enable_Put_Image False.
if No (Pname) then
Rewrite (N, Build_Unknown_Put_Image_Call (N));
Analyze (N);
return;
end if;
elsif Is_Protected_Type (U_Type) then
Rewrite (N, Build_Protected_Put_Image_Call (N));
Analyze (N);
return;
elsif Is_Task_Type (U_Type) then
Rewrite (N, Build_Task_Put_Image_Call (N));
Analyze (N);
return;
-- All other record type cases
else
pragma Assert (Is_Record_Type (U_Type));
Build_Record_Put_Image_Procedure
(Loc, Full_Base (U_Type), Decl, Pname);
Insert_Action (N, Decl);
end if;
end if;
-- If we fall through, Pname is the procedure to be called
Rewrite_Attribute_Proc_Call (Pname);
end Put_Image;
------------------
-- Range_Length --
------------------
when Attribute_Range_Length =>
-- The only special processing required is for the case where
-- Range_Length is applied to an enumeration type with holes.
-- In this case we transform
-- X'Range_Length
-- to
-- X'Pos (X'Last) - X'Pos (X'First) + 1
-- So that the result reflects the proper Pos values instead
-- of the underlying representations.
if Is_Enumeration_Type (Ptyp)
and then Has_Non_Standard_Rep (Ptyp)
then
Rewrite (N,
Make_Op_Add (Loc,
Left_Opnd =>
Make_Op_Subtract (Loc,
Left_Opnd =>
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Pos,
Prefix => New_Occurrence_Of (Ptyp, Loc),
Expressions => New_List (
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Last,
Prefix =>
New_Occurrence_Of (Ptyp, Loc)))),
Right_Opnd =>
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Pos,
Prefix => New_Occurrence_Of (Ptyp, Loc),
Expressions => New_List (
Make_Attribute_Reference (Loc,
Attribute_Name => Name_First,
Prefix =>
New_Occurrence_Of (Ptyp, Loc))))),
Right_Opnd => Make_Integer_Literal (Loc, 1)));
Analyze_And_Resolve (N, Typ);
-- For all other cases, the attribute is handled by the back end, but
-- we need to deal with the case of the range check on a universal
-- integer.
else
Apply_Universal_Integer_Attribute_Checks (N);
end if;
------------
-- Reduce --
------------
when Attribute_Reduce =>
declare
Loc : constant Source_Ptr := Sloc (N);
E1 : constant Node_Id := First (Expressions (N));
E2 : constant Node_Id := Next (E1);
Bnn : constant Entity_Id := Make_Temporary (Loc, 'B', N);
Typ : constant Entity_Id := Etype (N);
New_Loop : Node_Id;
Stat : Node_Id;
function Build_Stat (Comp : Node_Id) return Node_Id;
-- The reducer can be a function, a procedure whose first
-- parameter is in-out, or an attribute that is a function,
-- which (for now) can only be Min/Max. This subprogram
-- builds the corresponding computation for the generated loop.
----------------
-- Build_Stat --
----------------
function Build_Stat (Comp : Node_Id) return Node_Id is
begin
if Nkind (E1) = N_Attribute_Reference then
Stat := Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Bnn, Loc),
Expression => Make_Attribute_Reference (Loc,
Attribute_Name => Attribute_Name (E1),
Prefix => New_Copy (Prefix (E1)),
Expressions => New_List (
New_Occurrence_Of (Bnn, Loc),
Comp)));
elsif Ekind (Entity (E1)) = E_Procedure then
Stat := Make_Procedure_Call_Statement (Loc,
Name => New_Occurrence_Of (Entity (E1), Loc),
Parameter_Associations => New_List (
New_Occurrence_Of (Bnn, Loc),
Comp));
else
Stat := Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Bnn, Loc),
Expression => Make_Function_Call (Loc,
Name => New_Occurrence_Of (Entity (E1), Loc),
Parameter_Associations => New_List (
New_Occurrence_Of (Bnn, Loc),
Comp)));
end if;
return Stat;
end Build_Stat;
-- If the prefix is an aggregate, its unique component is an
-- Iterated_Element, and we create a loop out of its iterator.
-- The iterated_component_Association is parsed as a loop
-- parameter specification with "in" or as a container
-- iterator with "of".
begin
if Nkind (Prefix (N)) = N_Aggregate then
declare
Stream : constant Node_Id :=
First (Component_Associations (Prefix (N)));
Expr : constant Node_Id := Expression (Stream);
Id : constant Node_Id := Defining_Identifier (Stream);
It_Spec : constant Node_Id :=
Iterator_Specification (Stream);
Ch : Node_Id;
Iter : Node_Id;
begin
-- Iteration may be given by an element iterator:
if Nkind (Stream) = N_Iterated_Component_Association
and then Present (It_Spec)
and then Of_Present (It_Spec)
then
Iter :=
Make_Iteration_Scheme (Loc,
Iterator_Specification =>
Relocate_Node (It_Spec),
Loop_Parameter_Specification => Empty);
else
Ch := First (Discrete_Choices (Stream));
Iter :=
Make_Iteration_Scheme (Loc,
Iterator_Specification => Empty,
Loop_Parameter_Specification =>
Make_Loop_Parameter_Specification (Loc,
Defining_Identifier => New_Copy (Id),
Discrete_Subtype_Definition =>
Relocate_Node (Ch)));
end if;
New_Loop := Make_Loop_Statement (Loc,
Iteration_Scheme => Iter,
End_Label => Empty,
Statements =>
New_List (Build_Stat (Relocate_Node (Expr))));
end;
else
-- If the prefix is a name, we construct an element iterator
-- over it. Its expansion will verify that it is an array or
-- a container with the proper aspects.
declare
Iter : Node_Id;
Elem : constant Entity_Id := Make_Temporary (Loc, 'E', N);
begin
Iter :=
Make_Iterator_Specification (Loc,
Defining_Identifier => Elem,
Name => Relocate_Node (Prefix (N)),
Subtype_Indication => Empty);
Set_Of_Present (Iter);
New_Loop := Make_Loop_Statement (Loc,
Iteration_Scheme =>
Make_Iteration_Scheme (Loc,
Iterator_Specification => Iter,
Loop_Parameter_Specification => Empty),
End_Label => Empty,
Statements => New_List (
Build_Stat (New_Occurrence_Of (Elem, Loc))));
end;
end if;
Rewrite (N,
Make_Expression_With_Actions (Loc,
Actions => New_List (
Make_Object_Declaration (Loc,
Defining_Identifier => Bnn,
Object_Definition =>
New_Occurrence_Of (Typ, Loc),
Expression => Relocate_Node (E2)), New_Loop),
Expression => New_Occurrence_Of (Bnn, Loc)));
Analyze_And_Resolve (N, Typ);
end;
----------
-- Read --
----------
when Attribute_Read => Read : declare
P_Type : constant Entity_Id := Entity (Pref);
B_Type : constant Entity_Id := Base_Type (P_Type);
U_Type : constant Entity_Id := Underlying_Type (P_Type);
Pname : Entity_Id;
Decl : Node_Id;
Prag : Node_Id;
Arg2 : Node_Id;
Rfunc : Node_Id;
Lhs : Node_Id;
Rhs : Node_Id;
begin
-- If no underlying type, we have an error that will be diagnosed
-- elsewhere, so here we just completely ignore the expansion.
if No (U_Type) then
return;
end if;
-- Stream operations can appear in user code even if the restriction
-- No_Streams is active (for example, when instantiating a predefined
-- container). In that case rewrite the attribute as a Raise to
-- prevent any run-time use.
if Restriction_Active (No_Streams) then
Rewrite (N,
Make_Raise_Program_Error (Sloc (N),
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, B_Type);
return;
end if;
-- The simple case, if there is a TSS for Read, just call it
Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Read);
if Present (Pname) then
null;
else
-- If there is a Stream_Convert pragma, use it, we rewrite
-- sourcetyp'Read (stream, Item)
-- as
-- Item := sourcetyp (strmread (strmtyp'Input (Stream)));
-- where strmread is the given Read function that converts an
-- argument of type strmtyp to type sourcetyp or a type from which
-- it is derived. The conversion to sourcetyp is required in the
-- latter case.
-- A special case arises if Item is a type conversion in which
-- case, we have to expand to:
-- Itemx := typex (strmread (strmtyp'Input (Stream)));
-- where Itemx is the expression of the type conversion (i.e.
-- the actual object), and typex is the type of Itemx.
Prag := Get_Stream_Convert_Pragma (P_Type);
if Present (Prag) then
Arg2 := Next (First (Pragma_Argument_Associations (Prag)));
Rfunc := Entity (Expression (Arg2));
Lhs := Relocate_Node (Next (First (Exprs)));
Rhs :=
OK_Convert_To (B_Type,
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Rfunc, Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of
(Etype (First_Formal (Rfunc)), Loc),
Attribute_Name => Name_Input,
Expressions => New_List (
Relocate_Node (First (Exprs)))))));
if Nkind (Lhs) = N_Type_Conversion then
Lhs := Expression (Lhs);
Rhs := Convert_To (Etype (Lhs), Rhs);
end if;
Rewrite (N,
Make_Assignment_Statement (Loc,
Name => Lhs,
Expression => Rhs));
Set_Assignment_OK (Lhs);
Analyze (N);
return;
-- For elementary types, we call the I_xxx routine using the first
-- parameter and then assign the result into the second parameter.
-- We set Assignment_OK to deal with the conversion case.
elsif Is_Elementary_Type (U_Type) then
declare
Lhs : Node_Id;
Rhs : Node_Id;
begin
Lhs := Relocate_Node (Next (First (Exprs)));
Rhs := Build_Elementary_Input_Call (N);
if Nkind (Lhs) = N_Type_Conversion then
Lhs := Expression (Lhs);
Rhs := Convert_To (Etype (Lhs), Rhs);
end if;
Set_Assignment_OK (Lhs);
Rewrite (N,
Make_Assignment_Statement (Loc,
Name => Lhs,
Expression => Rhs));
Analyze (N);
return;
end;
-- Array type case
elsif Is_Array_Type (U_Type) then
Build_Array_Read_Procedure (N, U_Type, Decl, Pname);
Compile_Stream_Body_In_Scope (N, Decl, U_Type, Check => False);
-- Tagged type case, use the primitive Read function. Note that
-- this will dispatch in the class-wide case which is what we want
elsif Is_Tagged_Type (U_Type) then
Pname := Find_Prim_Op (U_Type, TSS_Stream_Read);
-- All other record type cases, including protected records. The
-- latter only arise for expander generated code for handling
-- shared passive partition access.
else
pragma Assert
(Is_Record_Type (U_Type) or else Is_Protected_Type (U_Type));
-- Ada 2005 (AI-216): Program_Error is raised when executing
-- the default implementation of the Read attribute of an
-- Unchecked_Union type. We replace the attribute with a
-- raise statement (rather than inserting it before) to handle
-- properly the case of an unchecked union that is a record
-- component.
if Is_Unchecked_Union (Base_Type (U_Type)) then
Rewrite (N,
Make_Raise_Program_Error (Loc,
Reason => PE_Unchecked_Union_Restriction));
Set_Etype (N, B_Type);
return;
end if;
if Has_Discriminants (U_Type)
and then Present
(Discriminant_Default_Value (First_Discriminant (U_Type)))
then
Build_Mutable_Record_Read_Procedure
(Loc, Full_Base (U_Type), Decl, Pname);
else
Build_Record_Read_Procedure
(Loc, Full_Base (U_Type), Decl, Pname);
end if;
-- Suppress checks, uninitialized or otherwise invalid
-- data does not cause constraint errors to be raised for
-- a complete record read.
Insert_Action (N, Decl, All_Checks);
end if;
end if;
Rewrite_Attribute_Proc_Call (Pname);
end Read;
---------
-- Ref --
---------
-- Ref is identical to To_Address, see To_Address for processing
---------------
-- Remainder --
---------------
-- Transforms 'Remainder into a call to the floating-point attribute
-- function Remainder in Fat_xxx (where xxx is the root type)
when Attribute_Remainder =>
Expand_Fpt_Attribute_RR (N);
------------
-- Result --
------------
-- Transform 'Result into reference to _Result formal. At the point
-- where a legal 'Result attribute is expanded, we know that we are in
-- the context of a _Postcondition function with a _Result parameter.
when Attribute_Result =>
Rewrite (N, Make_Identifier (Loc, Chars => Name_uResult));
Analyze_And_Resolve (N, Typ);
-----------
-- Round --
-----------
-- The handling of the Round attribute is quite delicate. The processing
-- in Sem_Attr introduced a conversion to universal real, reflecting the
-- semantics of Round, but we do not want anything to do with universal
-- real at runtime, since this corresponds to using floating-point
-- arithmetic.
-- What we have now is that the Etype of the Round attribute correctly
-- indicates the final result type. The operand of the Round is the
-- conversion to universal real, described above, and the operand of
-- this conversion is the actual operand of Round, which may be the
-- special case of a fixed point multiplication or division (Etype =
-- universal fixed)
-- The exapander will expand first the operand of the conversion, then
-- the conversion, and finally the round attribute itself, since we
-- always work inside out. But we cannot simply process naively in this
-- order. In the semantic world where universal fixed and real really
-- exist and have infinite precision, there is no problem, but in the
-- implementation world, where universal real is a floating-point type,
-- we would get the wrong result.
-- So the approach is as follows. First, when expanding a multiply or
-- divide whose type is universal fixed, we do nothing at all, instead
-- deferring the operation till later.
-- The actual processing is done in Expand_N_Type_Conversion which
-- handles the special case of Round by looking at its parent to see if
-- it is a Round attribute, and if it is, handling the conversion (or
-- its fixed multiply/divide child) in an appropriate manner.
-- This means that by the time we get to expanding the Round attribute
-- itself, the Round is nothing more than a type conversion (and will
-- often be a null type conversion), so we just replace it with the
-- appropriate conversion operation.
when Attribute_Round =>
Rewrite (N,
Convert_To (Etype (N), Relocate_Node (First (Exprs))));
Analyze_And_Resolve (N);
--------------
-- Rounding --
--------------
-- Transforms 'Rounding into a call to the floating-point attribute
-- function Rounding in Fat_xxx (where xxx is the root type)
-- Expansion is avoided for cases the back end can handle directly.
when Attribute_Rounding =>
if not Is_Inline_Floating_Point_Attribute (N) then
Expand_Fpt_Attribute_R (N);
end if;
-------------
-- Scaling --
-------------
-- Transforms 'Scaling into a call to the floating-point attribute
-- function Scaling in Fat_xxx (where xxx is the root type)
when Attribute_Scaling =>
Expand_Fpt_Attribute_RI (N);
----------------------------------------
-- Simple_Storage_Pool & Storage_Pool --
----------------------------------------
when Attribute_Simple_Storage_Pool | Attribute_Storage_Pool =>
Rewrite (N,
Make_Type_Conversion (Loc,
Subtype_Mark => New_Occurrence_Of (Etype (N), Loc),
Expression => New_Occurrence_Of (Entity (N), Loc)));
Analyze_And_Resolve (N, Typ);
----------
-- Size --
----------
when Attribute_Object_Size
| Attribute_Size
| Attribute_Value_Size
| Attribute_VADS_Size
=>
Size : declare
New_Node : Node_Id;
begin
-- Processing for VADS_Size case. Note that this processing
-- removes all traces of VADS_Size from the tree, and completes
-- all required processing for VADS_Size by translating the
-- attribute reference to an appropriate Size or Object_Size
-- reference.
if Id = Attribute_VADS_Size
or else (Use_VADS_Size and then Id = Attribute_Size)
then
-- If the size is specified, then we simply use the specified
-- size. This applies to both types and objects. The size of an
-- object can be specified in the following ways:
-- An explicit size object is given for an object
-- A component size is specified for an indexed component
-- A component clause is specified for a selected component
-- The object is a component of a packed composite object
-- If the size is specified, then VADS_Size of an object
if (Is_Entity_Name (Pref)
and then Present (Size_Clause (Entity (Pref))))
or else
(Nkind (Pref) = N_Component_Clause
and then (Present (Component_Clause
(Entity (Selector_Name (Pref))))
or else Is_Packed (Etype (Prefix (Pref)))))
or else
(Nkind (Pref) = N_Indexed_Component
and then (Component_Size (Etype (Prefix (Pref))) /= 0
or else Is_Packed (Etype (Prefix (Pref)))))
then
Set_Attribute_Name (N, Name_Size);
-- Otherwise if we have an object rather than a type, then
-- the VADS_Size attribute applies to the type of the object,
-- rather than the object itself. This is one of the respects
-- in which VADS_Size differs from Size.
else
if (not Is_Entity_Name (Pref)
or else not Is_Type (Entity (Pref)))
and then (Is_Scalar_Type (Ptyp)
or else Is_Constrained (Ptyp))
then
Rewrite (Pref, New_Occurrence_Of (Ptyp, Loc));
end if;
-- For a scalar type for which no size was explicitly given,
-- VADS_Size means Object_Size. This is the other respect in
-- which VADS_Size differs from Size.
if Is_Scalar_Type (Ptyp)
and then No (Size_Clause (Ptyp))
then
Set_Attribute_Name (N, Name_Object_Size);
-- In all other cases, Size and VADS_Size are the sane
else
Set_Attribute_Name (N, Name_Size);
end if;
end if;
end if;
-- If the prefix is X'Class, transform it into a direct reference
-- to the class-wide type, because the back end must not see a
-- 'Class reference.
if Is_Entity_Name (Pref)
and then Is_Class_Wide_Type (Entity (Pref))
then
Rewrite (Prefix (N), New_Occurrence_Of (Entity (Pref), Loc));
return;
-- For X'Size applied to an object of a class-wide type, transform
-- X'Size into a call to the primitive operation _Size applied to
-- X.
elsif Is_Class_Wide_Type (Ptyp) then
-- No need to do anything else compiling under restriction
-- No_Dispatching_Calls. During the semantic analysis we
-- already noted this restriction violation.
if Restriction_Active (No_Dispatching_Calls) then
return;
end if;
New_Node :=
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (Find_Prim_Op (Ptyp, Name_uSize), Loc),
Parameter_Associations => New_List (Pref));
if Typ /= Standard_Long_Long_Integer then
-- The context is a specific integer type with which the
-- original attribute was compatible. The function has a
-- specific type as well, so to preserve the compatibility
-- we must convert explicitly.
New_Node := Convert_To (Typ, New_Node);
end if;
Rewrite (N, New_Node);
Analyze_And_Resolve (N, Typ);
return;
end if;
-- Call Expand_Size_Attribute to do the final part of the
-- expansion which is shared with GNATprove expansion.
Expand_Size_Attribute (N);
end Size;
------------------
-- Storage_Size --
------------------
when Attribute_Storage_Size => Storage_Size : declare
Alloc_Op : Entity_Id := Empty;
begin
-- Access type case, always go to the root type
-- The case of access types results in a value of zero for the case
-- where no storage size attribute clause has been given. If a
-- storage size has been given, then the attribute is converted
-- to a reference to the variable used to hold this value.
if Is_Access_Type (Ptyp) then
if Present (Storage_Size_Variable (Root_Type (Ptyp))) then
Rewrite (N,
Convert_To (Typ,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of
(Etype (Storage_Size_Variable (Root_Type (Ptyp))), Loc),
Attribute_Name => Name_Max,
Expressions => New_List (
Make_Integer_Literal (Loc, 0),
New_Occurrence_Of
(Storage_Size_Variable (Root_Type (Ptyp)), Loc)))));
elsif Present (Associated_Storage_Pool (Root_Type (Ptyp))) then
-- If the access type is associated with a simple storage pool
-- object, then attempt to locate the optional Storage_Size
-- function of the simple storage pool type. If not found,
-- then the result will default to zero.
if Present (Get_Rep_Pragma (Root_Type (Ptyp),
Name_Simple_Storage_Pool_Type))
then
declare
Pool_Type : constant Entity_Id :=
Base_Type (Etype (Entity (N)));
begin
Alloc_Op := Get_Name_Entity_Id (Name_Storage_Size);
while Present (Alloc_Op) loop
if Scope (Alloc_Op) = Scope (Pool_Type)
and then Present (First_Formal (Alloc_Op))
and then Etype (First_Formal (Alloc_Op)) = Pool_Type
then
exit;
end if;
Alloc_Op := Homonym (Alloc_Op);
end loop;
end;
-- In the normal Storage_Pool case, retrieve the primitive
-- function associated with the pool type.
else
Alloc_Op :=
Find_Prim_Op
(Etype (Associated_Storage_Pool (Root_Type (Ptyp))),
Attribute_Name (N));
end if;
-- If Storage_Size wasn't found (can only occur in the simple
-- storage pool case), then simply use zero for the result.
if not Present (Alloc_Op) then
Rewrite (N, Make_Integer_Literal (Loc, 0));
-- Otherwise, rewrite the allocator as a call to pool type's
-- Storage_Size function.
else
Rewrite (N,
Convert_To (Typ,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (Alloc_Op, Loc),
Parameter_Associations => New_List (
New_Occurrence_Of
(Associated_Storage_Pool
(Root_Type (Ptyp)), Loc)))));
end if;
else
Rewrite (N, Make_Integer_Literal (Loc, 0));
end if;
Analyze_And_Resolve (N, Typ);
-- For tasks, we retrieve the size directly from the TCB. The
-- size may depend on a discriminant of the type, and therefore
-- can be a per-object expression, so type-level information is
-- not sufficient in general. There are four cases to consider:
-- a) If the attribute appears within a task body, the designated
-- TCB is obtained by a call to Self.
-- b) If the prefix of the attribute is the name of a task object,
-- the designated TCB is the one stored in the corresponding record.
-- c) If the prefix is a task type, the size is obtained from the
-- size variable created for each task type
-- d) If no Storage_Size was specified for the type, there is no
-- size variable, and the value is a system-specific default.
else
if In_Open_Scopes (Ptyp) then
-- Storage_Size (Self)
Rewrite (N,
Convert_To (Typ,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Storage_Size), Loc),
Parameter_Associations =>
New_List (
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Self), Loc))))));
elsif not Is_Entity_Name (Pref)
or else not Is_Type (Entity (Pref))
then
-- Storage_Size (Rec (Obj).Size)
Rewrite (N,
Convert_To (Typ,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Storage_Size), Loc),
Parameter_Associations =>
New_List (
Make_Selected_Component (Loc,
Prefix =>
Unchecked_Convert_To (
Corresponding_Record_Type (Ptyp),
New_Copy_Tree (Pref)),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id))))));
elsif Present (Storage_Size_Variable (Ptyp)) then
-- Static Storage_Size pragma given for type: retrieve value
-- from its allocated storage variable.
Rewrite (N,
Convert_To (Typ,
Make_Function_Call (Loc,
Name => New_Occurrence_Of (
RTE (RE_Adjust_Storage_Size), Loc),
Parameter_Associations =>
New_List (
New_Occurrence_Of (
Storage_Size_Variable (Ptyp), Loc)))));
else
-- Get system default
Rewrite (N,
Convert_To (Typ,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (
RTE (RE_Default_Stack_Size), Loc))));
end if;
Analyze_And_Resolve (N, Typ);
end if;
end Storage_Size;
-----------------
-- Stream_Size --
-----------------
when Attribute_Stream_Size =>
Rewrite (N,
Make_Integer_Literal (Loc, Intval => Get_Stream_Size (Ptyp)));
Analyze_And_Resolve (N, Typ);
----------
-- Succ --
----------
-- 1. Deal with enumeration types with holes.
-- 2. For floating-point, generate call to attribute function.
-- 3. For other cases, deal with constraint checking.
when Attribute_Succ => Succ : declare
Etyp : constant Entity_Id := Base_Type (Ptyp);
begin
-- For enumeration types with non-standard representations, we
-- expand typ'Pred (x) into:
-- Pos_To_Rep (Rep_To_Pos (x) + 1)
-- if the representation is non-contiguous, and just x + 1 if it is
-- after having dealt with constraint checking.
if Is_Enumeration_Type (Etyp)
and then Present (Enum_Pos_To_Rep (Etyp))
then
if Has_Contiguous_Rep (Etyp) then
if not Range_Checks_Suppressed (Ptyp) then
Set_Do_Range_Check (First (Exprs), False);
Expand_Pred_Succ_Attribute (N);
end if;
Rewrite (N,
Unchecked_Convert_To (Etyp,
Make_Op_Add (Loc,
Left_Opnd =>
Unchecked_Convert_To (
Integer_Type_For
(Esize (Etyp), Is_Unsigned_Type (Etyp)),
First (Exprs)),
Right_Opnd =>
Make_Integer_Literal (Loc, 1))));
else
-- Add Boolean parameter True, to request program error if
-- we have a bad representation on our hands. Add False if
-- checks are suppressed.
Append_To (Exprs, Rep_To_Pos_Flag (Ptyp, Loc));
Rewrite (N,
Make_Indexed_Component (Loc,
Prefix =>
New_Occurrence_Of
(Enum_Pos_To_Rep (Etyp), Loc),
Expressions => New_List (
Make_Op_Add (Loc,
Left_Opnd =>
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of
(TSS (Etyp, TSS_Rep_To_Pos), Loc),
Parameter_Associations => Exprs),
Right_Opnd => Make_Integer_Literal (Loc, 1)))));
end if;
-- Suppress checks since they have all been done above
Analyze_And_Resolve (N, Typ, Suppress => All_Checks);
-- For floating-point, we transform 'Succ into a call to the Succ
-- floating-point attribute function in Fat_xxx (xxx is root type)
elsif Is_Floating_Point_Type (Ptyp) then
Expand_Fpt_Attribute_R (N);
Analyze_And_Resolve (N, Typ);
-- For modular types, nothing to do (no overflow, since wraps)
elsif Is_Modular_Integer_Type (Ptyp) then
null;
-- For other types, if argument is marked as needing a range check or
-- overflow checking is enabled, we must generate a check.
elsif not Overflow_Checks_Suppressed (Ptyp)
or else Do_Range_Check (First (Exprs))
then
Set_Do_Range_Check (First (Exprs), False);
Expand_Pred_Succ_Attribute (N);
end if;
end Succ;
---------
-- Tag --
---------
-- Transforms X'Tag into a direct reference to the tag of X
when Attribute_Tag => Tag : declare
Ttyp : Entity_Id;
Prefix_Is_Type : Boolean;
begin
if Is_Entity_Name (Pref) and then Is_Type (Entity (Pref)) then
Ttyp := Entity (Pref);
Prefix_Is_Type := True;
else
Ttyp := Ptyp;
Prefix_Is_Type := False;
end if;
if Is_Class_Wide_Type (Ttyp) then
Ttyp := Root_Type (Ttyp);
end if;
Ttyp := Underlying_Type (Ttyp);
-- Ada 2005: The type may be a synchronized tagged type, in which
-- case the tag information is stored in the corresponding record.
if Is_Concurrent_Type (Ttyp) then
Ttyp := Corresponding_Record_Type (Ttyp);
end if;
if Prefix_Is_Type then
-- For VMs we leave the type attribute unexpanded because
-- there's not a dispatching table to reference.
if Tagged_Type_Expansion then
Rewrite (N,
Unchecked_Convert_To (RTE (RE_Tag),
New_Occurrence_Of
(Node (First_Elmt (Access_Disp_Table (Ttyp))), Loc)));
Analyze_And_Resolve (N, RTE (RE_Tag));
end if;
-- Ada 2005 (AI-251): The use of 'Tag in the sources always
-- references the primary tag of the actual object. If 'Tag is
-- applied to class-wide interface objects we generate code that
-- displaces "this" to reference the base of the object.
elsif Comes_From_Source (N)
and then Is_Class_Wide_Type (Etype (Prefix (N)))
and then Is_Interface (Underlying_Type (Etype (Prefix (N))))
then
-- Generate:
-- (To_Tag_Ptr (Prefix'Address)).all
-- Note that Prefix'Address is recursively expanded into a call
-- to Base_Address (Obj.Tag)
-- Not needed for VM targets, since all handled by the VM
if Tagged_Type_Expansion then
Rewrite (N,
Make_Explicit_Dereference (Loc,
Unchecked_Convert_To (RTE (RE_Tag_Ptr),
Make_Attribute_Reference (Loc,
Prefix => Relocate_Node (Pref),
Attribute_Name => Name_Address))));
Analyze_And_Resolve (N, RTE (RE_Tag));
end if;
else
Rewrite (N,
Make_Selected_Component (Loc,
Prefix => Relocate_Node (Pref),
Selector_Name =>
New_Occurrence_Of (First_Tag_Component (Ttyp), Loc)));
Analyze_And_Resolve (N, RTE (RE_Tag));
end if;
end Tag;
----------------
-- Terminated --
----------------
-- Transforms 'Terminated attribute into a call to Terminated function
when Attribute_Terminated => Terminated : begin
-- The prefix of Terminated is of a task interface class-wide type.
-- Generate:
-- terminated (Task_Id (_disp_get_task_id (Pref)));
if Ada_Version >= Ada_2005
and then Ekind (Ptyp) = E_Class_Wide_Type
and then Is_Interface (Ptyp)
and then Is_Task_Interface (Ptyp)
then
Rewrite (N,
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Terminated), Loc),
Parameter_Associations => New_List (
Make_Unchecked_Type_Conversion (Loc,
Subtype_Mark =>
New_Occurrence_Of (RTE (RO_ST_Task_Id), Loc),
Expression => Build_Disp_Get_Task_Id_Call (Pref)))));
elsif Restricted_Profile then
Rewrite (N,
Build_Call_With_Task (Pref, RTE (RE_Restricted_Terminated)));
else
Rewrite (N,
Build_Call_With_Task (Pref, RTE (RE_Terminated)));
end if;
Analyze_And_Resolve (N, Standard_Boolean);
end Terminated;
----------------
-- To_Address --
----------------
-- Transforms System'To_Address (X) and System.Address'Ref (X) into
-- unchecked conversion from (integral) type of X to type address. If
-- the To_Address is a static expression, the transformed expression
-- also needs to be static, because we do some legality checks (e.g.
-- for Thread_Local_Storage) after this transformation.
when Attribute_Ref
| Attribute_To_Address
=>
To_Address : declare
Is_Static : constant Boolean := Is_Static_Expression (N);
begin
Rewrite (N,
Unchecked_Convert_To (RTE (RE_Address),
Relocate_Node (First (Exprs))));
Set_Is_Static_Expression (N, Is_Static);
Analyze_And_Resolve (N, RTE (RE_Address));
end To_Address;
------------
-- To_Any --
------------
when Attribute_To_Any => To_Any : declare
Decls : constant List_Id := New_List;
begin
Rewrite (N,
Build_To_Any_Call
(Loc,
Convert_To (Ptyp,
Relocate_Node (First (Exprs))), Decls));
Insert_Actions (N, Decls);
Analyze_And_Resolve (N, RTE (RE_Any));
end To_Any;
----------------
-- Truncation --
----------------
-- Transforms 'Truncation into a call to the floating-point attribute
-- function Truncation in Fat_xxx (where xxx is the root type).
-- Expansion is avoided for cases the back end can handle directly.
when Attribute_Truncation =>
if not Is_Inline_Floating_Point_Attribute (N) then
Expand_Fpt_Attribute_R (N);
end if;
--------------
-- TypeCode --
--------------
when Attribute_TypeCode => TypeCode : declare
Decls : constant List_Id := New_List;
begin
Rewrite (N, Build_TypeCode_Call (Loc, Ptyp, Decls));
Insert_Actions (N, Decls);
Analyze_And_Resolve (N, RTE (RE_TypeCode));
end TypeCode;
-----------------------
-- Unbiased_Rounding --
-----------------------
-- Transforms 'Unbiased_Rounding into a call to the floating-point
-- attribute function Unbiased_Rounding in Fat_xxx (where xxx is the
-- root type). Expansion is avoided for cases the back end can handle
-- directly.
when Attribute_Unbiased_Rounding =>
if not Is_Inline_Floating_Point_Attribute (N) then
Expand_Fpt_Attribute_R (N);
end if;
------------
-- Update --
------------
when Attribute_Update =>
Expand_Update_Attribute (N);
---------------
-- VADS_Size --
---------------
-- The processing for VADS_Size is shared with Size
---------
-- Val --
---------
-- For enumeration types with a non-standard representation we use the
-- _Pos_To_Rep array that was created when the type was frozen, unless
-- the representation is contiguous in which case we use an addition.
-- For enumeration types with a standard representation, Val can be
-- rewritten as a simple conversion with Conversion_OK set.
-- For integer types, Val is equivalent to a simple integer conversion
-- and we rewrite it as such.
when Attribute_Val => Val : declare
Etyp : constant Entity_Id := Base_Type (Ptyp);
Expr : constant Node_Id := First (Exprs);
Rtyp : Entity_Id;
begin
-- Case of enumeration type
if Is_Enumeration_Type (Etyp) then
-- Non-contiguous non-standard enumeration type
if Present (Enum_Pos_To_Rep (Etyp))
and then not Has_Contiguous_Rep (Etyp)
then
Rewrite (N,
Make_Indexed_Component (Loc,
Prefix =>
New_Occurrence_Of (Enum_Pos_To_Rep (Etyp), Loc),
Expressions => New_List (
Convert_To (Standard_Integer, Expr))));
Analyze_And_Resolve (N, Typ);
-- Standard or contiguous non-standard enumeration type
else
-- If the argument is marked as requiring a range check then
-- generate it here, after looking through a conversion to
-- universal integer, if any.
if Do_Range_Check (Expr) then
if Present (Enum_Pos_To_Rep (Etyp)) then
Rtyp := Enum_Pos_To_Rep (Etyp);
else
Rtyp := Etyp;
end if;
if Nkind (Expr) = N_Type_Conversion
and then Entity (Subtype_Mark (Expr)) = Universal_Integer
then
Generate_Range_Check
(Expression (Expr), Rtyp, CE_Range_Check_Failed);
else
Generate_Range_Check (Expr, Rtyp, CE_Range_Check_Failed);
end if;
Set_Do_Range_Check (Expr, False);
end if;
-- Contiguous non-standard enumeration type
if Present (Enum_Pos_To_Rep (Etyp)) then
Rewrite (N,
Unchecked_Convert_To (Etyp,
Make_Op_Add (Loc,
Left_Opnd =>
Make_Integer_Literal (Loc,
Enumeration_Rep (First_Literal (Etyp))),
Right_Opnd =>
Unchecked_Convert_To (
Integer_Type_For
(Esize (Etyp), Is_Unsigned_Type (Etyp)),
Expr))));
-- Standard enumeration type
else
Rewrite (N, OK_Convert_To (Typ, Expr));
end if;
-- Suppress checks since the range check was done above
-- and it guarantees that the addition cannot overflow.
Analyze_And_Resolve (N, Typ, Suppress => All_Checks);
end if;
-- Deal with integer types
elsif Is_Integer_Type (Etyp) then
Rewrite (N, Convert_To (Typ, Expr));
Analyze_And_Resolve (N, Typ);
end if;
end Val;
-----------
-- Valid --
-----------
-- The code for valid is dependent on the particular types involved.
-- See separate sections below for the generated code in each case.
when Attribute_Valid => Valid : declare
PBtyp : Entity_Id := Base_Type (Ptyp);
Save_Validity_Checks_On : constant Boolean := Validity_Checks_On;
-- Save the validity checking mode. We always turn off validity
-- checking during process of 'Valid since this is one place
-- where we do not want the implicit validity checks to interfere
-- with the explicit validity check that the programmer is doing.
function Make_Range_Test return Node_Id;
-- Build the code for a range test of the form
-- PBtyp!(Pref) in PBtyp!(Ptyp'First) .. PBtyp!(Ptyp'Last)
---------------------
-- Make_Range_Test --
---------------------
function Make_Range_Test return Node_Id is
Temp : Node_Id;
begin
-- The prefix of attribute 'Valid should always denote an object
-- reference. The reference is either coming directly from source
-- or is produced by validity check expansion. The object may be
-- wrapped in a conversion in which case the call to Unqual_Conv
-- will yield it.
-- If the prefix denotes a variable which captures the value of
-- an object for validation purposes, use the variable in the
-- range test. This ensures that no extra copies or extra reads
-- are produced as part of the test. Generate:
-- Temp : ... := Object;
-- if not Temp in ... then
if Is_Validation_Variable_Reference (Pref) then
Temp := New_Occurrence_Of (Entity (Unqual_Conv (Pref)), Loc);
-- Otherwise the prefix is either a source object or a constant
-- produced by validity check expansion. Generate:
-- Temp : constant ... := Pref;
-- if not Temp in ... then
else
Temp := Duplicate_Subexpr (Pref);
end if;
return
Make_In (Loc,
Left_Opnd => Unchecked_Convert_To (PBtyp, Temp),
Right_Opnd =>
Make_Range (Loc,
Low_Bound =>
Unchecked_Convert_To (PBtyp,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Ptyp, Loc),
Attribute_Name => Name_First)),
High_Bound =>
Unchecked_Convert_To (PBtyp,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Ptyp, Loc),
Attribute_Name => Name_Last))));
end Make_Range_Test;
-- Local variables
Tst : Node_Id;
-- Start of processing for Attribute_Valid
begin
-- Do not expand sourced code 'Valid reference in CodePeer mode,
-- will be handled by the back-end directly.
if CodePeer_Mode and then Comes_From_Source (N) then
return;
end if;
-- Turn off validity checks. We do not want any implicit validity
-- checks to intefere with the explicit check from the attribute
Validity_Checks_On := False;
-- Retrieve the base type. Handle the case where the base type is a
-- private enumeration type.
if Is_Private_Type (PBtyp) and then Present (Full_View (PBtyp)) then
PBtyp := Full_View (PBtyp);
end if;
-- Floating-point case. This case is handled by the Valid attribute
-- code in the floating-point attribute run-time library.
if Is_Floating_Point_Type (Ptyp) then
Float_Valid : declare
Pkg : RE_Id;
Ftp : Entity_Id;
function Get_Fat_Entity (Nam : Name_Id) return Entity_Id;
-- Return entity for Pkg.Nam
--------------------
-- Get_Fat_Entity --
--------------------
function Get_Fat_Entity (Nam : Name_Id) return Entity_Id is
Exp_Name : constant Node_Id :=
Make_Selected_Component (Loc,
Prefix => New_Occurrence_Of (RTE (Pkg), Loc),
Selector_Name => Make_Identifier (Loc, Nam));
begin
Find_Selected_Component (Exp_Name);
return Entity (Exp_Name);
end Get_Fat_Entity;
-- Start of processing for Float_Valid
begin
-- The C and AAMP back-ends handle Valid for fpt types
if Modify_Tree_For_C or else Float_Rep (PBtyp) = AAMP then
Analyze_And_Resolve (Pref, Ptyp);
Set_Etype (N, Standard_Boolean);
Set_Analyzed (N);
else
Find_Fat_Info (Ptyp, Ftp, Pkg);
-- If the prefix is a reverse SSO component, or is possibly
-- unaligned, first create a temporary copy that is in
-- native SSO, and properly aligned. Make it Volatile to
-- prevent folding in the back-end. Note that we use an
-- intermediate constrained string type to initialize the
-- temporary, as the value at hand might be invalid, and in
-- that case it cannot be copied using a floating point
-- register.
if In_Reverse_Storage_Order_Object (Pref)
or else Is_Possibly_Unaligned_Object (Pref)
then
declare
Temp : constant Entity_Id :=
Make_Temporary (Loc, 'F');
Fat_S : constant Entity_Id :=
Get_Fat_Entity (Name_S);
-- Constrained string subtype of appropriate size
Fat_P : constant Entity_Id :=
Get_Fat_Entity (Name_P);
-- Access to Fat_S
Decl : constant Node_Id :=
Make_Object_Declaration (Loc,
Defining_Identifier => Temp,
Aliased_Present => True,
Object_Definition =>
New_Occurrence_Of (Ptyp, Loc));
begin
Set_Aspect_Specifications (Decl, New_List (
Make_Aspect_Specification (Loc,
Identifier =>
Make_Identifier (Loc, Name_Volatile))));
Insert_Actions (N,
New_List (
Decl,
Make_Assignment_Statement (Loc,
Name =>
Make_Explicit_Dereference (Loc,
Prefix =>
Unchecked_Convert_To (Fat_P,
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Temp, Loc),
Attribute_Name =>
Name_Unrestricted_Access))),
Expression =>
Unchecked_Convert_To (Fat_S,
Relocate_Node (Pref)))),
Suppress => All_Checks);
Rewrite (Pref, New_Occurrence_Of (Temp, Loc));
end;
end if;
-- We now have an object of the proper endianness and
-- alignment, and can construct a Valid attribute.
-- We make sure the prefix of this valid attribute is
-- marked as not coming from source, to avoid losing
-- warnings from 'Valid looking like a possible update.
Set_Comes_From_Source (Pref, False);
Expand_Fpt_Attribute
(N, Pkg, Name_Valid,
New_List (
Make_Attribute_Reference (Loc,
Prefix => Unchecked_Convert_To (Ftp, Pref),
Attribute_Name => Name_Unrestricted_Access)));
end if;
-- One more task, we still need a range check. Required
-- only if we have a constraint, since the Valid routine
-- catches infinities properly (infinities are never valid).
-- The way we do the range check is simply to create the
-- expression: Valid (N) and then Base_Type(Pref) in Typ.
if not Subtypes_Statically_Match (Ptyp, PBtyp) then
Rewrite (N,
Make_And_Then (Loc,
Left_Opnd => Relocate_Node (N),
Right_Opnd =>
Make_In (Loc,
Left_Opnd => Convert_To (PBtyp, Pref),
Right_Opnd => New_Occurrence_Of (Ptyp, Loc))));
end if;
end Float_Valid;
-- Enumeration type with holes
-- For enumeration types with holes, the Pos value constructed by
-- the Enum_Rep_To_Pos function built in Exp_Ch3 called with a
-- second argument of False returns minus one for an invalid value,
-- and the non-negative pos value for a valid value, so the
-- expansion of X'Valid is simply:
-- type(X)'Pos (X) >= 0
-- We can't quite generate it that way because of the requirement
-- for the non-standard second argument of False in the resulting
-- rep_to_pos call, so we have to explicitly create:
-- _rep_to_pos (X, False) >= 0
-- If we have an enumeration subtype, we also check that the
-- value is in range:
-- _rep_to_pos (X, False) >= 0
-- and then
-- (X >= type(X)'First and then type(X)'Last <= X)
elsif Is_Enumeration_Type (Ptyp)
and then Present (Enum_Pos_To_Rep (PBtyp))
then
Tst :=
Make_Op_Ge (Loc,
Left_Opnd =>
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (TSS (PBtyp, TSS_Rep_To_Pos), Loc),
Parameter_Associations => New_List (
Pref,
New_Occurrence_Of (Standard_False, Loc))),
Right_Opnd => Make_Integer_Literal (Loc, 0));
if Ptyp /= PBtyp
and then
(Type_Low_Bound (Ptyp) /= Type_Low_Bound (PBtyp)
or else
Type_High_Bound (Ptyp) /= Type_High_Bound (PBtyp))
then
-- The call to Make_Range_Test will create declarations
-- that need a proper insertion point, but Pref is now
-- attached to a node with no ancestor. Attach to tree
-- even if it is to be rewritten below.
Set_Parent (Tst, Parent (N));
Tst :=
Make_And_Then (Loc,
Left_Opnd => Make_Range_Test,
Right_Opnd => Tst);
end if;
Rewrite (N, Tst);
-- Fortran convention booleans
-- For the very special case of Fortran convention booleans, the
-- value is always valid, since it is an integer with the semantics
-- that non-zero is true, and any value is permissible.
elsif Is_Boolean_Type (Ptyp)
and then Convention (Ptyp) = Convention_Fortran
then
Rewrite (N, New_Occurrence_Of (Standard_True, Loc));
-- For biased representations, we will be doing an unchecked
-- conversion without unbiasing the result. That means that the range
-- test has to take this into account, and the proper form of the
-- test is:
-- PBtyp!(Pref) < PBtyp!(Ptyp'Range_Length)
elsif Has_Biased_Representation (Ptyp) then
PBtyp := RTE (RE_Unsigned_32);
Rewrite (N,
Make_Op_Lt (Loc,
Left_Opnd =>
Unchecked_Convert_To (PBtyp, Duplicate_Subexpr (Pref)),
Right_Opnd =>
Unchecked_Convert_To (PBtyp,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Ptyp, Loc),
Attribute_Name => Name_Range_Length))));
-- For all other scalar types, what we want logically is a
-- range test:
-- X in type(X)'First .. type(X)'Last
-- But that's precisely what won't work because of possible
-- unwanted optimization (and indeed the basic motivation for
-- the Valid attribute is exactly that this test does not work).
-- What will work is:
-- PBtyp!(X) >= PBtyp!(type(X)'First)
-- and then
-- PBtyp!(X) <= PBtyp!(type(X)'Last)
-- where PBtyp is an integer type large enough to cover the full
-- range of possible stored values (i.e. it is chosen on the basis
-- of the size of the type, not the range of the values). We write
-- this as two tests, rather than a range check, so that static
-- evaluation will easily remove either or both of the checks if
-- they can be -statically determined to be true (this happens
-- when the type of X is static and the range extends to the full
-- range of stored values).
-- Unsigned types. Note: it is safe to consider only whether the
-- subtype is unsigned, since we will in that case be doing all
-- unsigned comparisons based on the subtype range. Since we use the
-- actual subtype object size, this is appropriate.
-- For example, if we have
-- subtype x is integer range 1 .. 200;
-- for x'Object_Size use 8;
-- Now the base type is signed, but objects of this type are bits
-- unsigned, and doing an unsigned test of the range 1 to 200 is
-- correct, even though a value greater than 127 looks signed to a
-- signed comparison.
else
declare
Uns : constant Boolean
:= Is_Unsigned_Type (Ptyp)
or else (Is_Private_Type (Ptyp)
and then Is_Unsigned_Type (Btyp));
begin
PBtyp := Integer_Type_For (Esize (Ptyp), Uns);
Rewrite (N, Make_Range_Test);
end;
end if;
-- If a predicate is present, then we do the predicate test, even if
-- within the predicate function (infinite recursion is warned about
-- in Sem_Attr in that case).
declare
Pred_Func : constant Entity_Id := Predicate_Function (Ptyp);
begin
if Present (Pred_Func) then
Rewrite (N,
Make_And_Then (Loc,
Left_Opnd => Relocate_Node (N),
Right_Opnd => Make_Predicate_Call (Ptyp, Pref)));
end if;
end;
Analyze_And_Resolve (N, Standard_Boolean);
Validity_Checks_On := Save_Validity_Checks_On;
end Valid;
-------------------
-- Valid_Scalars --
-------------------
when Attribute_Valid_Scalars => Valid_Scalars : declare
Val_Typ : constant Entity_Id := Validated_View (Ptyp);
Expr : Node_Id;
begin
-- Assume that the prefix does not need validation
Expr := Empty;
-- Attribute 'Valid_Scalars is not supported on private tagged types;
-- see a detailed explanation where this attribute is analyzed.
if Is_Private_Type (Ptyp) and then Is_Tagged_Type (Ptyp) then
null;
-- Attribute 'Valid_Scalars evaluates to True when the type lacks
-- scalars.
elsif not Scalar_Part_Present (Val_Typ) then
null;
-- Attribute 'Valid_Scalars is the same as attribute 'Valid when the
-- validated type is a scalar type. Generate:
-- Val_Typ (Pref)'Valid
elsif Is_Scalar_Type (Val_Typ) then
Expr :=
Make_Attribute_Reference (Loc,
Prefix =>
Unchecked_Convert_To (Val_Typ, New_Copy_Tree (Pref)),
Attribute_Name => Name_Valid);
-- Required by LLVM although the sizes are the same???
if Nkind (Prefix (Expr)) = N_Unchecked_Type_Conversion then
Set_No_Truncation (Prefix (Expr));
end if;
-- Validate the scalar components of an array by iterating over all
-- dimensions of the array while checking individual components.
elsif Is_Array_Type (Val_Typ) then
Expr :=
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of
(Build_Array_VS_Func
(Attr => N,
Formal_Typ => Ptyp,
Array_Typ => Val_Typ),
Loc),
Parameter_Associations => New_List (Pref));
-- Validate the scalar components, discriminants of a record type by
-- examining the structure of a record type.
elsif Is_Record_Type (Val_Typ) then
Expr :=
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of
(Build_Record_VS_Func
(Attr => N,
Formal_Typ => Ptyp,
Rec_Typ => Val_Typ),
Loc),
Parameter_Associations => New_List (Pref));
end if;
-- Default the attribute to True when the type of the prefix does not
-- need validation.
if No (Expr) then
Expr := New_Occurrence_Of (Standard_True, Loc);
end if;
Rewrite (N, Expr);
Analyze_And_Resolve (N, Standard_Boolean);
Set_Is_Static_Expression (N, False);
end Valid_Scalars;
-----------
-- Value --
-----------
when Attribute_Value =>
Exp_Imgv.Expand_Value_Attribute (N);
-----------------
-- Value_Size --
-----------------
-- The processing for Value_Size shares the processing for Size
-------------
-- Version --
-------------
-- The processing for Version shares the processing for Body_Version
----------------
-- Wide_Image --
----------------
when Attribute_Wide_Image =>
-- Leave attribute unexpanded in CodePeer mode: the gnat2scil
-- back-end knows how to handle this attribute directly.
if CodePeer_Mode then
return;
end if;
Exp_Imgv.Expand_Wide_Image_Attribute (N);
---------------------
-- Wide_Wide_Image --
---------------------
when Attribute_Wide_Wide_Image =>
-- Leave attribute unexpanded in CodePeer mode: the gnat2scil
-- back-end knows how to handle this attribute directly.
if CodePeer_Mode then
return;
end if;
Exp_Imgv.Expand_Wide_Wide_Image_Attribute (N);
----------------
-- Wide_Value --
----------------
-- We expand typ'Wide_Value (X) into
-- typ'Value
-- (Wide_String_To_String (X, Wide_Character_Encoding_Method))
-- Wide_String_To_String is a runtime function that converts its wide
-- string argument to String, converting any non-translatable characters
-- into appropriate escape sequences. This preserves the required
-- semantics of Wide_Value in all cases, and results in a very simple
-- implementation approach.
-- Note: for this approach to be fully standard compliant for the cases
-- where typ is Wide_Character and Wide_Wide_Character, the encoding
-- method must cover the entire character range (e.g. UTF-8). But that
-- is a reasonable requirement when dealing with encoded character
-- sequences. Presumably if one of the restrictive encoding mechanisms
-- is in use such as Shift-JIS, then characters that cannot be
-- represented using this encoding will not appear in any case.
when Attribute_Wide_Value =>
Rewrite (N,
Make_Attribute_Reference (Loc,
Prefix => Pref,
Attribute_Name => Name_Value,
Expressions => New_List (
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of (RTE (RE_Wide_String_To_String), Loc),
Parameter_Associations => New_List (
Relocate_Node (First (Exprs)),
Make_Integer_Literal (Loc,
Intval => Int (Wide_Character_Encoding_Method)))))));
Analyze_And_Resolve (N, Typ);
---------------------
-- Wide_Wide_Value --
---------------------
-- We expand typ'Wide_Value_Value (X) into
-- typ'Value
-- (Wide_Wide_String_To_String (X, Wide_Character_Encoding_Method))
-- Wide_Wide_String_To_String is a runtime function that converts its
-- wide string argument to String, converting any non-translatable
-- characters into appropriate escape sequences. This preserves the
-- required semantics of Wide_Wide_Value in all cases, and results in a
-- very simple implementation approach.
-- It's not quite right where typ = Wide_Wide_Character, because the
-- encoding method may not cover the whole character type ???
when Attribute_Wide_Wide_Value =>
Rewrite (N,
Make_Attribute_Reference (Loc,
Prefix => Pref,
Attribute_Name => Name_Value,
Expressions => New_List (
Make_Function_Call (Loc,
Name =>
New_Occurrence_Of
(RTE (RE_Wide_Wide_String_To_String), Loc),
Parameter_Associations => New_List (
Relocate_Node (First (Exprs)),
Make_Integer_Literal (Loc,
Intval => Int (Wide_Character_Encoding_Method)))))));
Analyze_And_Resolve (N, Typ);
---------------------
-- Wide_Wide_Width --
---------------------
when Attribute_Wide_Wide_Width =>
Exp_Imgv.Expand_Width_Attribute (N, Wide_Wide);
----------------
-- Wide_Width --
----------------
when Attribute_Wide_Width =>
Exp_Imgv.Expand_Width_Attribute (N, Wide);
-----------
-- Width --
-----------
when Attribute_Width =>
Exp_Imgv.Expand_Width_Attribute (N, Normal);
-----------
-- Write --
-----------
when Attribute_Write => Write : declare
P_Type : constant Entity_Id := Entity (Pref);
U_Type : constant Entity_Id := Underlying_Type (P_Type);
Pname : Entity_Id;
Decl : Node_Id;
Prag : Node_Id;
Arg3 : Node_Id;
Wfunc : Node_Id;
begin
-- If no underlying type, we have an error that will be diagnosed
-- elsewhere, so here we just completely ignore the expansion.
if No (U_Type) then
return;
end if;
-- Stream operations can appear in user code even if the restriction
-- No_Streams is active (for example, when instantiating a predefined
-- container). In that case rewrite the attribute as a Raise to
-- prevent any run-time use.
if Restriction_Active (No_Streams) then
Rewrite (N,
Make_Raise_Program_Error (Sloc (N),
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, U_Type);
return;
end if;
-- The simple case, if there is a TSS for Write, just call it
Pname := Find_Stream_Subprogram (P_Type, TSS_Stream_Write);
if Present (Pname) then
null;
else
-- If there is a Stream_Convert pragma, use it, we rewrite
-- sourcetyp'Output (stream, Item)
-- as
-- strmtyp'Output (Stream, strmwrite (acttyp (Item)));
-- where strmwrite is the given Write function that converts an
-- argument of type sourcetyp or a type acctyp, from which it is
-- derived to type strmtyp. The conversion to acttyp is required
-- for the derived case.
Prag := Get_Stream_Convert_Pragma (P_Type);
if Present (Prag) then
Arg3 :=
Next (Next (First (Pragma_Argument_Associations (Prag))));
Wfunc := Entity (Expression (Arg3));
Rewrite (N,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Etype (Wfunc), Loc),
Attribute_Name => Name_Output,
Expressions => New_List (
Relocate_Node (First (Exprs)),
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Wfunc, Loc),
Parameter_Associations => New_List (
OK_Convert_To (Etype (First_Formal (Wfunc)),
Relocate_Node (Next (First (Exprs)))))))));
Analyze (N);
return;
-- For elementary types, we call the W_xxx routine directly
elsif Is_Elementary_Type (U_Type) then
Rewrite (N, Build_Elementary_Write_Call (N));
Analyze (N);
return;
-- Array type case
elsif Is_Array_Type (U_Type) then
Build_Array_Write_Procedure (N, U_Type, Decl, Pname);
Compile_Stream_Body_In_Scope (N, Decl, U_Type, Check => False);
-- Tagged type case, use the primitive Write function. Note that
-- this will dispatch in the class-wide case which is what we want
elsif Is_Tagged_Type (U_Type) then
Pname := Find_Prim_Op (U_Type, TSS_Stream_Write);
-- All other record type cases, including protected records.
-- The latter only arise for expander generated code for
-- handling shared passive partition access.
else
pragma Assert
(Is_Record_Type (U_Type) or else Is_Protected_Type (U_Type));
-- Ada 2005 (AI-216): Program_Error is raised when executing
-- the default implementation of the Write attribute of an
-- Unchecked_Union type. However, if the 'Write reference is
-- within the generated Output stream procedure, Write outputs
-- the components, and the default values of the discriminant
-- are streamed by the Output procedure itself. If there are
-- no default values this is also erroneous.
if Is_Unchecked_Union (Base_Type (U_Type)) then
if (not Is_TSS (Current_Scope, TSS_Stream_Output)
and not Is_TSS (Current_Scope, TSS_Stream_Write))
or else No (Discriminant_Default_Value
(First_Discriminant (U_Type)))
then
Rewrite (N,
Make_Raise_Program_Error (Loc,
Reason => PE_Unchecked_Union_Restriction));
Set_Etype (N, U_Type);
return;
end if;
end if;
if Has_Discriminants (U_Type)
and then Present
(Discriminant_Default_Value (First_Discriminant (U_Type)))
then
Build_Mutable_Record_Write_Procedure
(Loc, Full_Base (U_Type), Decl, Pname);
else
Build_Record_Write_Procedure
(Loc, Full_Base (U_Type), Decl, Pname);
end if;
Insert_Action (N, Decl);
end if;
end if;
-- If we fall through, Pname is the procedure to be called
Rewrite_Attribute_Proc_Call (Pname);
end Write;
-- The following attributes are handled by the back end (except that
-- static cases have already been evaluated during semantic processing,
-- but in any case the back end should not count on this).
when Attribute_Code_Address
| Attribute_Deref
| Attribute_Null_Parameter
| Attribute_Passed_By_Reference
| Attribute_Pool_Address
=>
null;
-- The following attributes should not appear at this stage, since they
-- have already been handled by the analyzer (and properly rewritten
-- with corresponding values or entities to represent the right values)
when Attribute_Abort_Signal
| Attribute_Address_Size
| Attribute_Aft
| Attribute_Atomic_Always_Lock_Free
| Attribute_Base
| Attribute_Bit_Order
| Attribute_Class
| Attribute_Compiler_Version
| Attribute_Default_Bit_Order
| Attribute_Default_Scalar_Storage_Order
| Attribute_Definite
| Attribute_Delta
| Attribute_Denorm
| Attribute_Digits
| Attribute_Emax
| Attribute_Enabled
| Attribute_Epsilon
| Attribute_Fast_Math
| Attribute_First_Valid
| Attribute_Has_Access_Values
| Attribute_Has_Discriminants
| Attribute_Has_Tagged_Values
| Attribute_Large
| Attribute_Last_Valid
| Attribute_Library_Level
| Attribute_Lock_Free
| Attribute_Machine_Emax
| Attribute_Machine_Emin
| Attribute_Machine_Mantissa
| Attribute_Machine_Overflows
| Attribute_Machine_Radix
| Attribute_Machine_Rounds
| Attribute_Max_Alignment_For_Allocation
| Attribute_Max_Integer_Size
| Attribute_Maximum_Alignment
| Attribute_Model_Emin
| Attribute_Model_Epsilon
| Attribute_Model_Mantissa
| Attribute_Model_Small
| Attribute_Modulus
| Attribute_Partition_ID
| Attribute_Range
| Attribute_Restriction_Set
| Attribute_Safe_Emax
| Attribute_Safe_First
| Attribute_Safe_Large
| Attribute_Safe_Last
| Attribute_Safe_Small
| Attribute_Scalar_Storage_Order
| Attribute_Scale
| Attribute_Signed_Zeros
| Attribute_Small
| Attribute_Storage_Unit
| Attribute_Stub_Type
| Attribute_System_Allocator_Alignment
| Attribute_Target_Name
| Attribute_Type_Class
| Attribute_Type_Key
| Attribute_Unconstrained_Array
| Attribute_Universal_Literal_String
| Attribute_Wchar_T_Size
| Attribute_Word_Size
=>
raise Program_Error;
end case;
-- Note: as mentioned earlier, individual sections of the above case
-- statement assume there is no code after the case statement, and are
-- legitimately allowed to execute return statements if they have nothing
-- more to do, so DO NOT add code at this point.
exception
when RE_Not_Available =>
return;
end Expand_N_Attribute_Reference;
--------------------------------
-- Expand_Pred_Succ_Attribute --
--------------------------------
-- For typ'Pred (exp), we generate the check
-- [constraint_error when exp = typ'Base'First]
-- Similarly, for typ'Succ (exp), we generate the check
-- [constraint_error when exp = typ'Base'Last]
-- These checks are not generated for modular types, since the proper
-- semantics for Succ and Pred on modular types is to wrap, not raise CE.
-- We also suppress these checks if we are the right side of an assignment
-- statement or the expression of an object declaration, where the flag
-- Suppress_Assignment_Checks is set for the assignment/declaration.
procedure Expand_Pred_Succ_Attribute (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
P : constant Node_Id := Parent (N);
Cnam : Name_Id;
begin
if Attribute_Name (N) = Name_Pred then
Cnam := Name_First;
else
Cnam := Name_Last;
end if;
if Nkind (P) not in N_Assignment_Statement | N_Object_Declaration
or else not Suppress_Assignment_Checks (P)
then
Insert_Action (N,
Make_Raise_Constraint_Error (Loc,
Condition =>
Make_Op_Eq (Loc,
Left_Opnd =>
Duplicate_Subexpr_Move_Checks (First (Expressions (N))),
Right_Opnd =>
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Base_Type (Etype (Prefix (N))), Loc),
Attribute_Name => Cnam)),
Reason => CE_Overflow_Check_Failed));
end if;
end Expand_Pred_Succ_Attribute;
---------------------------
-- Expand_Size_Attribute --
---------------------------
procedure Expand_Size_Attribute (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Typ : constant Entity_Id := Etype (N);
Pref : constant Node_Id := Prefix (N);
Ptyp : constant Entity_Id := Etype (Pref);
Id : constant Attribute_Id := Get_Attribute_Id (Attribute_Name (N));
Siz : Uint;
begin
-- Case of known RM_Size of a type
if (Id = Attribute_Size or else Id = Attribute_Value_Size)
and then Is_Entity_Name (Pref)
and then Is_Type (Entity (Pref))
and then Known_Static_RM_Size (Entity (Pref))
then
Siz := RM_Size (Entity (Pref));
-- Case of known Esize of a type
elsif Id = Attribute_Object_Size
and then Is_Entity_Name (Pref)
and then Is_Type (Entity (Pref))
and then Known_Static_Esize (Entity (Pref))
then
Siz := Esize (Entity (Pref));
-- Case of known size of object
elsif Id = Attribute_Size
and then Is_Entity_Name (Pref)
and then Is_Object (Entity (Pref))
and then Known_Esize (Entity (Pref))
and then Known_Static_Esize (Entity (Pref))
then
Siz := Esize (Entity (Pref));
-- For an array component, we can do Size in the front end if the
-- component_size of the array is set.
elsif Nkind (Pref) = N_Indexed_Component then
Siz := Component_Size (Etype (Prefix (Pref)));
-- For a record component, we can do Size in the front end if there is a
-- component clause, or if the record is packed and the component's size
-- is known at compile time.
elsif Nkind (Pref) = N_Selected_Component then
declare
Rec : constant Entity_Id := Etype (Prefix (Pref));
Comp : constant Entity_Id := Entity (Selector_Name (Pref));
begin
if Present (Component_Clause (Comp)) then
Siz := Esize (Comp);
elsif Is_Packed (Rec) then
Siz := RM_Size (Ptyp);
else
Apply_Universal_Integer_Attribute_Checks (N);
return;
end if;
end;
-- All other cases are handled by the back end
else
-- If Size is applied to a formal parameter that is of a packed
-- array subtype, then apply Size to the actual subtype.
if Is_Entity_Name (Pref)
and then Is_Formal (Entity (Pref))
and then Is_Array_Type (Ptyp)
and then Is_Packed (Ptyp)
then
Rewrite (N,
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Get_Actual_Subtype (Pref), Loc),
Attribute_Name => Name_Size));
Analyze_And_Resolve (N, Typ);
-- If Size is applied to a dereference of an access to unconstrained
-- packed array, the back end needs to see its unconstrained nominal
-- type, but also a hint to the actual constrained type.
elsif Nkind (Pref) = N_Explicit_Dereference
and then Is_Array_Type (Ptyp)
and then not Is_Constrained (Ptyp)
and then Is_Packed (Ptyp)
then
Set_Actual_Designated_Subtype (Pref, Get_Actual_Subtype (Pref));
-- If Size was applied to a slice of a bit-packed array, we rewrite
-- it into the product of Length and Component_Size. We need to do so
-- because bit-packed arrays are represented internally as arrays of
-- System.Unsigned_Types.Packed_Byte for code generation purposes so
-- the size is always rounded up in the back end.
elsif Nkind (Pref) = N_Slice and then Is_Bit_Packed_Array (Ptyp) then
Rewrite (N,
Make_Op_Multiply (Loc,
Make_Attribute_Reference (Loc,
Prefix => Duplicate_Subexpr (Pref, True),
Attribute_Name => Name_Length),
Make_Attribute_Reference (Loc,
Prefix => Duplicate_Subexpr (Pref, True),
Attribute_Name => Name_Component_Size)));
Analyze_And_Resolve (N, Typ);
end if;
-- Apply the required checks last, after rewriting has taken place
Apply_Universal_Integer_Attribute_Checks (N);
return;
end if;
-- Common processing for record and array component case
if Siz /= No_Uint and then Siz /= 0 then
declare
CS : constant Boolean := Comes_From_Source (N);
begin
Rewrite (N, Make_Integer_Literal (Loc, Siz));
-- This integer literal is not a static expression. We do not
-- call Analyze_And_Resolve here, because this would activate
-- the circuit for deciding that a static value was out of range,
-- and we don't want that.
-- So just manually set the type, mark the expression as
-- nonstatic, and then ensure that the result is checked
-- properly if the attribute comes from source (if it was
-- internally generated, we never need a constraint check).
Set_Etype (N, Typ);
Set_Is_Static_Expression (N, False);
if CS then
Apply_Constraint_Check (N, Typ);
end if;
end;
end if;
end Expand_Size_Attribute;
-----------------------------
-- Expand_Update_Attribute --
-----------------------------
procedure Expand_Update_Attribute (N : Node_Id) is
procedure Process_Component_Or_Element_Update
(Temp : Entity_Id;
Comp : Node_Id;
Expr : Node_Id;
Typ : Entity_Id);
-- Generate the statements necessary to update a single component or an
-- element of the prefix. The code is inserted before the attribute N.
-- Temp denotes the entity of the anonymous object created to reflect
-- the changes in values. Comp is the component/index expression to be
-- updated. Expr is an expression yielding the new value of Comp. Typ
-- is the type of the prefix of attribute Update.
procedure Process_Range_Update
(Temp : Entity_Id;
Comp : Node_Id;
Expr : Node_Id;
Typ : Entity_Id);
-- Generate the statements necessary to update a slice of the prefix.
-- The code is inserted before the attribute N. Temp denotes the entity
-- of the anonymous object created to reflect the changes in values.
-- Comp is range of the slice to be updated. Expr is an expression
-- yielding the new value of Comp. Typ is the type of the prefix of
-- attribute Update.
-----------------------------------------
-- Process_Component_Or_Element_Update --
-----------------------------------------
procedure Process_Component_Or_Element_Update
(Temp : Entity_Id;
Comp : Node_Id;
Expr : Node_Id;
Typ : Entity_Id)
is
Loc : constant Source_Ptr := Sloc (Comp);
Exprs : List_Id;
LHS : Node_Id;
begin
-- An array element may be modified by the following relations
-- depending on the number of dimensions:
-- 1 => Expr -- one dimensional update
-- (1, ..., N) => Expr -- multi dimensional update
-- The above forms are converted in assignment statements where the
-- left hand side is an indexed component:
-- Temp (1) := Expr; -- one dimensional update
-- Temp (1, ..., N) := Expr; -- multi dimensional update
if Is_Array_Type (Typ) then
-- The index expressions of a multi dimensional array update
-- appear as an aggregate.
if Nkind (Comp) = N_Aggregate then
Exprs := New_Copy_List_Tree (Expressions (Comp));
else
Exprs := New_List (Relocate_Node (Comp));
end if;
LHS :=
Make_Indexed_Component (Loc,
Prefix => New_Occurrence_Of (Temp, Loc),
Expressions => Exprs);
-- A record component update appears in the following form:
-- Comp => Expr
-- The above relation is transformed into an assignment statement
-- where the left hand side is a selected component:
-- Temp.Comp := Expr;
else pragma Assert (Is_Record_Type (Typ));
LHS :=
Make_Selected_Component (Loc,
Prefix => New_Occurrence_Of (Temp, Loc),
Selector_Name => Relocate_Node (Comp));
end if;
Insert_Action (N,
Make_Assignment_Statement (Loc,
Name => LHS,
Expression => Relocate_Node (Expr)));
end Process_Component_Or_Element_Update;
--------------------------
-- Process_Range_Update --
--------------------------
procedure Process_Range_Update
(Temp : Entity_Id;
Comp : Node_Id;
Expr : Node_Id;
Typ : Entity_Id)
is
Index_Typ : constant Entity_Id := Etype (First_Index (Typ));
Loc : constant Source_Ptr := Sloc (Comp);
Index : Entity_Id;
begin
-- A range update appears as
-- (Low .. High => Expr)
-- The above construct is transformed into a loop that iterates over
-- the given range and modifies the corresponding array values to the
-- value of Expr:
-- for Index in Low .. High loop
-- Temp (<Index_Typ> (Index)) := Expr;
-- end loop;
Index := Make_Temporary (Loc, 'I');
Insert_Action (N,
Make_Loop_Statement (Loc,
Iteration_Scheme =>
Make_Iteration_Scheme (Loc,
Loop_Parameter_Specification =>
Make_Loop_Parameter_Specification (Loc,
Defining_Identifier => Index,
Discrete_Subtype_Definition => Relocate_Node (Comp))),
Statements => New_List (
Make_Assignment_Statement (Loc,
Name =>
Make_Indexed_Component (Loc,
Prefix => New_Occurrence_Of (Temp, Loc),
Expressions => New_List (
Convert_To (Index_Typ,
New_Occurrence_Of (Index, Loc)))),
Expression => Relocate_Node (Expr))),
End_Label => Empty));
end Process_Range_Update;
-- Local variables
Aggr : constant Node_Id := First (Expressions (N));
Loc : constant Source_Ptr := Sloc (N);
Pref : constant Node_Id := Prefix (N);
Typ : constant Entity_Id := Etype (Pref);
Assoc : Node_Id;
Comp : Node_Id;
CW_Temp : Entity_Id;
CW_Typ : Entity_Id;
Expr : Node_Id;
Temp : Entity_Id;
-- Start of processing for Expand_Update_Attribute
begin
-- Create the anonymous object to store the value of the prefix and
-- capture subsequent changes in value.
Temp := Make_Temporary (Loc, 'T', Pref);
-- Preserve the tag of the prefix by offering a specific view of the
-- class-wide version of the prefix.
if Is_Tagged_Type (Typ) then
-- Generate:
-- CW_Temp : Typ'Class := Typ'Class (Pref);
CW_Temp := Make_Temporary (Loc, 'T');
CW_Typ := Class_Wide_Type (Typ);
Insert_Action (N,
Make_Object_Declaration (Loc,
Defining_Identifier => CW_Temp,
Object_Definition => New_Occurrence_Of (CW_Typ, Loc),
Expression =>
Convert_To (CW_Typ, Relocate_Node (Pref))));
-- Generate:
-- Temp : Typ renames Typ (CW_Temp);
Insert_Action (N,
Make_Object_Renaming_Declaration (Loc,
Defining_Identifier => Temp,
Subtype_Mark => New_Occurrence_Of (Typ, Loc),
Name =>
Convert_To (Typ, New_Occurrence_Of (CW_Temp, Loc))));
-- Non-tagged case
else
-- Generate:
-- Temp : Typ := Pref;
Insert_Action (N,
Make_Object_Declaration (Loc,
Defining_Identifier => Temp,
Object_Definition => New_Occurrence_Of (Typ, Loc),
Expression => Relocate_Node (Pref)));
end if;
-- Process the update aggregate
Assoc := First (Component_Associations (Aggr));
while Present (Assoc) loop
Comp := First (Choices (Assoc));
Expr := Expression (Assoc);
while Present (Comp) loop
if Nkind (Comp) = N_Range then
Process_Range_Update (Temp, Comp, Expr, Typ);
else
Process_Component_Or_Element_Update (Temp, Comp, Expr, Typ);
end if;
Next (Comp);
end loop;
Next (Assoc);
end loop;
-- The attribute is replaced by a reference to the anonymous object
Rewrite (N, New_Occurrence_Of (Temp, Loc));
Analyze (N);
end Expand_Update_Attribute;
-------------------
-- Find_Fat_Info --
-------------------
procedure Find_Fat_Info
(T : Entity_Id;
Fat_Type : out Entity_Id;
Fat_Pkg : out RE_Id)
is
Rtyp : constant Entity_Id := Root_Type (T);
begin
-- All we do is use the root type (historically this dealt with
-- VAX-float .. to be cleaned up further later ???)
Fat_Type := Rtyp;
if Fat_Type = Standard_Short_Float then
Fat_Pkg := RE_Attr_Short_Float;
elsif Fat_Type = Standard_Float then
Fat_Pkg := RE_Attr_Float;
elsif Fat_Type = Standard_Long_Float then
Fat_Pkg := RE_Attr_Long_Float;
elsif Fat_Type = Standard_Long_Long_Float then
Fat_Pkg := RE_Attr_Long_Long_Float;
-- Universal real (which is its own root type) is treated as being
-- equivalent to Standard.Long_Long_Float, since it is defined to
-- have the same precision as the longest Float type.
elsif Fat_Type = Universal_Real then
Fat_Type := Standard_Long_Long_Float;
Fat_Pkg := RE_Attr_Long_Long_Float;
else
raise Program_Error;
end if;
end Find_Fat_Info;
----------------------------
-- Find_Stream_Subprogram --
----------------------------
function Find_Stream_Subprogram
(Typ : Entity_Id;
Nam : TSS_Name_Type) return Entity_Id
is
Base_Typ : constant Entity_Id := Base_Type (Typ);
Ent : constant Entity_Id := TSS (Typ, Nam);
begin
if Present (Ent) then
return Ent;
end if;
-- Stream attributes for strings are expanded into library calls. The
-- following checks are disabled when the run-time is not available or
-- when compiling predefined types due to bootstrap issues. As a result,
-- the compiler will generate in-place stream routines for string types
-- that appear in GNAT's library, but will generate calls via rtsfind
-- to library routines for user code.
-- Note: In the case of using a configurable run time, it is very likely
-- that stream routines for string types are not present (they require
-- file system support). In this case, the specific stream routines for
-- strings are not used, relying on the regular stream mechanism
-- instead. That is why we include the test RTE_Available when dealing
-- with these cases.
if not Is_Predefined_Unit (Current_Sem_Unit) then
-- Storage_Array as defined in package System.Storage_Elements
if Is_RTE (Base_Typ, RE_Storage_Array) then
-- Case of No_Stream_Optimizations restriction active
if Restriction_Active (No_Stream_Optimizations) then
if Nam = TSS_Stream_Input
and then RTE_Available (RE_Storage_Array_Input)
then
return RTE (RE_Storage_Array_Input);
elsif Nam = TSS_Stream_Output
and then RTE_Available (RE_Storage_Array_Output)
then
return RTE (RE_Storage_Array_Output);
elsif Nam = TSS_Stream_Read
and then RTE_Available (RE_Storage_Array_Read)
then
return RTE (RE_Storage_Array_Read);
elsif Nam = TSS_Stream_Write
and then RTE_Available (RE_Storage_Array_Write)
then
return RTE (RE_Storage_Array_Write);
elsif Nam /= TSS_Stream_Input and then
Nam /= TSS_Stream_Output and then
Nam /= TSS_Stream_Read and then
Nam /= TSS_Stream_Write
then
raise Program_Error;
end if;
-- Restriction No_Stream_Optimizations is not set, so we can go
-- ahead and optimize using the block IO forms of the routines.
else
if Nam = TSS_Stream_Input
and then RTE_Available (RE_Storage_Array_Input_Blk_IO)
then
return RTE (RE_Storage_Array_Input_Blk_IO);
elsif Nam = TSS_Stream_Output
and then RTE_Available (RE_Storage_Array_Output_Blk_IO)
then
return RTE (RE_Storage_Array_Output_Blk_IO);
elsif Nam = TSS_Stream_Read
and then RTE_Available (RE_Storage_Array_Read_Blk_IO)
then
return RTE (RE_Storage_Array_Read_Blk_IO);
elsif Nam = TSS_Stream_Write
and then RTE_Available (RE_Storage_Array_Write_Blk_IO)
then
return RTE (RE_Storage_Array_Write_Blk_IO);
elsif Nam /= TSS_Stream_Input and then
Nam /= TSS_Stream_Output and then
Nam /= TSS_Stream_Read and then
Nam /= TSS_Stream_Write
then
raise Program_Error;
end if;
end if;
-- Stream_Element_Array as defined in package Ada.Streams
elsif Is_RTE (Base_Typ, RE_Stream_Element_Array) then
-- Case of No_Stream_Optimizations restriction active
if Restriction_Active (No_Stream_Optimizations) then
if Nam = TSS_Stream_Input
and then RTE_Available (RE_Stream_Element_Array_Input)
then
return RTE (RE_Stream_Element_Array_Input);
elsif Nam = TSS_Stream_Output
and then RTE_Available (RE_Stream_Element_Array_Output)
then
return RTE (RE_Stream_Element_Array_Output);
elsif Nam = TSS_Stream_Read
and then RTE_Available (RE_Stream_Element_Array_Read)
then
return RTE (RE_Stream_Element_Array_Read);
elsif Nam = TSS_Stream_Write
and then RTE_Available (RE_Stream_Element_Array_Write)
then
return RTE (RE_Stream_Element_Array_Write);
elsif Nam /= TSS_Stream_Input and then
Nam /= TSS_Stream_Output and then
Nam /= TSS_Stream_Read and then
Nam /= TSS_Stream_Write
then
raise Program_Error;
end if;
-- Restriction No_Stream_Optimizations is not set, so we can go
-- ahead and optimize using the block IO forms of the routines.
else
if Nam = TSS_Stream_Input
and then RTE_Available (RE_Stream_Element_Array_Input_Blk_IO)
then
return RTE (RE_Stream_Element_Array_Input_Blk_IO);
elsif Nam = TSS_Stream_Output
and then RTE_Available (RE_Stream_Element_Array_Output_Blk_IO)
then
return RTE (RE_Stream_Element_Array_Output_Blk_IO);
elsif Nam = TSS_Stream_Read
and then RTE_Available (RE_Stream_Element_Array_Read_Blk_IO)
then
return RTE (RE_Stream_Element_Array_Read_Blk_IO);
elsif Nam = TSS_Stream_Write
and then RTE_Available (RE_Stream_Element_Array_Write_Blk_IO)
then
return RTE (RE_Stream_Element_Array_Write_Blk_IO);
elsif Nam /= TSS_Stream_Input and then
Nam /= TSS_Stream_Output and then
Nam /= TSS_Stream_Read and then
Nam /= TSS_Stream_Write
then
raise Program_Error;
end if;
end if;
-- String as defined in package Ada
elsif Base_Typ = Standard_String then
-- Case of No_Stream_Optimizations restriction active
if Restriction_Active (No_Stream_Optimizations) then
if Nam = TSS_Stream_Input
and then RTE_Available (RE_String_Input)
then
return RTE (RE_String_Input);
elsif Nam = TSS_Stream_Output
and then RTE_Available (RE_String_Output)
then
return RTE (RE_String_Output);
elsif Nam = TSS_Stream_Read
and then RTE_Available (RE_String_Read)
then
return RTE (RE_String_Read);
elsif Nam = TSS_Stream_Write
and then RTE_Available (RE_String_Write)
then
return RTE (RE_String_Write);
elsif Nam /= TSS_Stream_Input and then
Nam /= TSS_Stream_Output and then
Nam /= TSS_Stream_Read and then
Nam /= TSS_Stream_Write
then
raise Program_Error;
end if;
-- Restriction No_Stream_Optimizations is not set, so we can go
-- ahead and optimize using the block IO forms of the routines.
else
if Nam = TSS_Stream_Input
and then RTE_Available (RE_String_Input_Blk_IO)
then
return RTE (RE_String_Input_Blk_IO);
elsif Nam = TSS_Stream_Output
and then RTE_Available (RE_String_Output_Blk_IO)
then
return RTE (RE_String_Output_Blk_IO);
elsif Nam = TSS_Stream_Read
and then RTE_Available (RE_String_Read_Blk_IO)
then
return RTE (RE_String_Read_Blk_IO);
elsif Nam = TSS_Stream_Write
and then RTE_Available (RE_String_Write_Blk_IO)
then
return RTE (RE_String_Write_Blk_IO);
elsif Nam /= TSS_Stream_Input and then
Nam /= TSS_Stream_Output and then
Nam /= TSS_Stream_Read and then
Nam /= TSS_Stream_Write
then
raise Program_Error;
end if;
end if;
-- Wide_String as defined in package Ada
elsif Base_Typ = Standard_Wide_String then
-- Case of No_Stream_Optimizations restriction active
if Restriction_Active (No_Stream_Optimizations) then
if Nam = TSS_Stream_Input
and then RTE_Available (RE_Wide_String_Input)
then
return RTE (RE_Wide_String_Input);
elsif Nam = TSS_Stream_Output
and then RTE_Available (RE_Wide_String_Output)
then
return RTE (RE_Wide_String_Output);
elsif Nam = TSS_Stream_Read
and then RTE_Available (RE_Wide_String_Read)
then
return RTE (RE_Wide_String_Read);
elsif Nam = TSS_Stream_Write
and then RTE_Available (RE_Wide_String_Write)
then
return RTE (RE_Wide_String_Write);
elsif Nam /= TSS_Stream_Input and then
Nam /= TSS_Stream_Output and then
Nam /= TSS_Stream_Read and then
Nam /= TSS_Stream_Write
then
raise Program_Error;
end if;
-- Restriction No_Stream_Optimizations is not set, so we can go
-- ahead and optimize using the block IO forms of the routines.
else
if Nam = TSS_Stream_Input
and then RTE_Available (RE_Wide_String_Input_Blk_IO)
then
return RTE (RE_Wide_String_Input_Blk_IO);
elsif Nam = TSS_Stream_Output
and then RTE_Available (RE_Wide_String_Output_Blk_IO)
then
return RTE (RE_Wide_String_Output_Blk_IO);
elsif Nam = TSS_Stream_Read
and then RTE_Available (RE_Wide_String_Read_Blk_IO)
then
return RTE (RE_Wide_String_Read_Blk_IO);
elsif Nam = TSS_Stream_Write
and then RTE_Available (RE_Wide_String_Write_Blk_IO)
then
return RTE (RE_Wide_String_Write_Blk_IO);
elsif Nam /= TSS_Stream_Input and then
Nam /= TSS_Stream_Output and then
Nam /= TSS_Stream_Read and then
Nam /= TSS_Stream_Write
then
raise Program_Error;
end if;
end if;
-- Wide_Wide_String as defined in package Ada
elsif Base_Typ = Standard_Wide_Wide_String then
-- Case of No_Stream_Optimizations restriction active
if Restriction_Active (No_Stream_Optimizations) then
if Nam = TSS_Stream_Input
and then RTE_Available (RE_Wide_Wide_String_Input)
then
return RTE (RE_Wide_Wide_String_Input);
elsif Nam = TSS_Stream_Output
and then RTE_Available (RE_Wide_Wide_String_Output)
then
return RTE (RE_Wide_Wide_String_Output);
elsif Nam = TSS_Stream_Read
and then RTE_Available (RE_Wide_Wide_String_Read)
then
return RTE (RE_Wide_Wide_String_Read);
elsif Nam = TSS_Stream_Write
and then RTE_Available (RE_Wide_Wide_String_Write)
then
return RTE (RE_Wide_Wide_String_Write);
elsif Nam /= TSS_Stream_Input and then
Nam /= TSS_Stream_Output and then
Nam /= TSS_Stream_Read and then
Nam /= TSS_Stream_Write
then
raise Program_Error;
end if;
-- Restriction No_Stream_Optimizations is not set, so we can go
-- ahead and optimize using the block IO forms of the routines.
else
if Nam = TSS_Stream_Input
and then RTE_Available (RE_Wide_Wide_String_Input_Blk_IO)
then
return RTE (RE_Wide_Wide_String_Input_Blk_IO);
elsif Nam = TSS_Stream_Output
and then RTE_Available (RE_Wide_Wide_String_Output_Blk_IO)
then
return RTE (RE_Wide_Wide_String_Output_Blk_IO);
elsif Nam = TSS_Stream_Read
and then RTE_Available (RE_Wide_Wide_String_Read_Blk_IO)
then
return RTE (RE_Wide_Wide_String_Read_Blk_IO);
elsif Nam = TSS_Stream_Write
and then RTE_Available (RE_Wide_Wide_String_Write_Blk_IO)
then
return RTE (RE_Wide_Wide_String_Write_Blk_IO);
elsif Nam /= TSS_Stream_Input and then
Nam /= TSS_Stream_Output and then
Nam /= TSS_Stream_Read and then
Nam /= TSS_Stream_Write
then
raise Program_Error;
end if;
end if;
end if;
end if;
if Is_Tagged_Type (Typ) and then Is_Derived_Type (Typ) then
return Find_Prim_Op (Typ, Nam);
else
return Find_Inherited_TSS (Typ, Nam);
end if;
end Find_Stream_Subprogram;
---------------
-- Full_Base --
---------------
function Full_Base (T : Entity_Id) return Entity_Id is
BT : Entity_Id;
begin
BT := Base_Type (T);
if Is_Private_Type (BT)
and then Present (Full_View (BT))
then
BT := Full_View (BT);
end if;
return BT;
end Full_Base;
-------------------------------
-- Get_Stream_Convert_Pragma --
-------------------------------
function Get_Stream_Convert_Pragma (T : Entity_Id) return Node_Id is
Typ : Entity_Id;
N : Node_Id;
begin
-- Note: we cannot use Get_Rep_Pragma here because of the peculiarity
-- that a stream convert pragma for a tagged type is not inherited from
-- its parent. Probably what is wrong here is that it is basically
-- incorrect to consider a stream convert pragma to be a representation
-- pragma at all ???
N := First_Rep_Item (Implementation_Base_Type (T));
while Present (N) loop
if Nkind (N) = N_Pragma
and then Pragma_Name (N) = Name_Stream_Convert
then
-- For tagged types this pragma is not inherited, so we
-- must verify that it is defined for the given type and
-- not an ancestor.
Typ :=
Entity (Expression (First (Pragma_Argument_Associations (N))));
if not Is_Tagged_Type (T)
or else T = Typ
or else (Is_Private_Type (Typ) and then T = Full_View (Typ))
then
return N;
end if;
end if;
Next_Rep_Item (N);
end loop;
return Empty;
end Get_Stream_Convert_Pragma;
---------------------------------
-- Is_Constrained_Packed_Array --
---------------------------------
function Is_Constrained_Packed_Array (Typ : Entity_Id) return Boolean is
Arr : Entity_Id := Typ;
begin
if Is_Access_Type (Arr) then
Arr := Designated_Type (Arr);
end if;
return Is_Array_Type (Arr)
and then Is_Constrained (Arr)
and then Present (Packed_Array_Impl_Type (Arr));
end Is_Constrained_Packed_Array;
----------------------------------------
-- Is_Inline_Floating_Point_Attribute --
----------------------------------------
function Is_Inline_Floating_Point_Attribute (N : Node_Id) return Boolean is
Id : constant Attribute_Id := Get_Attribute_Id (Attribute_Name (N));
function Is_GCC_Target return Boolean;
-- Return True if we are using a GCC target/back-end
-- ??? Note: the implementation is kludgy/fragile
-------------------
-- Is_GCC_Target --
-------------------
function Is_GCC_Target return Boolean is
begin
return not CodePeer_Mode
and then not Modify_Tree_For_C;
end Is_GCC_Target;
-- Start of processing for Is_Inline_Floating_Point_Attribute
begin
-- Machine and Model can be expanded by the GCC back end only
if Id = Attribute_Machine or else Id = Attribute_Model then
return Is_GCC_Target;
-- Remaining cases handled by all back ends are Rounding and Truncation
-- when appearing as the operand of a conversion to some integer type.
elsif Nkind (Parent (N)) /= N_Type_Conversion
or else not Is_Integer_Type (Etype (Parent (N)))
then
return False;
end if;
-- Here we are in the integer conversion context. We reuse Rounding for
-- Machine_Rounding as System.Fat_Gen, which is a permissible behavior.
return
Id = Attribute_Rounding
or else Id = Attribute_Machine_Rounding
or else Id = Attribute_Truncation;
end Is_Inline_Floating_Point_Attribute;
end Exp_Attr;
| 36.870986 | 79 | 0.533504 |
df6a827e7163c5230ec648e4a5d830164bc098ff | 4,234 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c64109g.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c64109g.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c64109g.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- C64109G.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 SLICES OF ARRAYS ARE PASSED CORRECTLY TO SUBPROGRAMS.
-- SPECIFICALLY,
-- (A) CHECK ALL PARAMETER MODES.
-- CPP 8/28/84
-- PWN 05/31/96 Corrected spelling problem.
WITH REPORT; USE REPORT;
PROCEDURE C64109G IS
BEGIN
TEST ("C64109G", "CHECK THAT SLICES OF ARRAYS ARE PASSED " &
"CORRECTLY TO SUBPROGRAMS");
--------------------------------------------
DECLARE -- (A)
SUBTYPE SUBINT IS INTEGER RANGE 1..5;
TYPE ARRAY_TYPE IS ARRAY (SUBINT RANGE <>) OF INTEGER;
ARR : ARRAY_TYPE (1..5) := (1..3 => 7, 4..5 => 9);
BOOL : BOOLEAN;
PROCEDURE P1 (S : ARRAY_TYPE) IS
BEGIN
IF S(IDENT_INT(3)) /= 7 THEN
FAILED ("IN PARAMETER NOT PASSED CORRECTLY - (A)");
END IF;
IF S(4) /= 9 THEN
FAILED ("IN PARAMETER NOT PASSED CORRECTLY - (A)2");
END IF;
END P1;
FUNCTION F1 (S : ARRAY_TYPE) RETURN BOOLEAN IS
BEGIN
IF S(3) /= 7 THEN
FAILED ("IN PARAMETER NOT PASSED CORRECTLY - (A)");
END IF;
IF S(IDENT_INT(4)) /= 9 THEN
FAILED ("IN PARAMETER NOT PASSED CORRECTLY - (A)2");
END IF;
RETURN TRUE;
END F1;
PROCEDURE P2 (S : IN OUT ARRAY_TYPE) IS
BEGIN
IF S(3) /= 7 THEN
FAILED ("IN OUT PARAM NOT PASSED CORRECTLY - (A)");
END IF;
IF S(4) /= 9 THEN
FAILED ("IN OUT PARAM NOT PASSED CORRECTLY - (A)2");
END IF;
FOR I IN 3 .. 4 LOOP
S(I) := 5;
END LOOP;
END P2;
PROCEDURE P3 (S : OUT ARRAY_TYPE) IS
BEGIN
FOR I IN 3 .. 4 LOOP
S(I) := 3;
END LOOP;
END P3;
BEGIN -- (A)
P1 (ARR(3..4));
IF ARR(3) /= 7 THEN
FAILED ("IN PARAM CHANGED BY PROCEDURE - (A)");
END IF;
IF ARR(4) /= 9 THEN
FAILED ("IN PARAM CHANGED BY PROCEDURE - (A)2");
END IF;
BOOL := F1 (ARR(IDENT_INT(3)..IDENT_INT(4)));
IF ARR(3) /= 7 THEN
FAILED ("IN PARAM CHANGED BY FUNCTION - (A)");
END IF;
IF ARR(4) /= 9 THEN
FAILED ("IN PARAM CHANGED BY FUNCTION - (A)2");
END IF;
P2 (ARR(3..4));
FOR I IN 3 .. 4 LOOP
IF ARR(I) /= 5 THEN
FAILED ("IN OUT PARAM RETURNED INCORRECTLY - (A)");
END IF;
END LOOP;
P3 (ARR(IDENT_INT(3)..4));
FOR I IN 3 .. 4 LOOP
IF ARR(I) /= 3 THEN
FAILED ("OUT PARAM RETURNED INCORRECTLY - (A)");
END IF;
END LOOP;
END;
RESULT;
END C64109G;
| 33.603175 | 79 | 0.506613 |
4a4f3f7f8baf8f09a364c1e6234ae635f2609341 | 588 | ads | Ada | source/s-atcaco.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 33 | 2015-04-04T09:19:36.000Z | 2021-11-10T05:33:34.000Z | source/s-atcaco.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 8 | 2017-11-14T13:05:07.000Z | 2018-08-09T15:28:49.000Z | source/s-atcaco.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 9 | 2015-02-03T17:09:53.000Z | 2021-11-12T01:16:05.000Z | pragma License (Unrestricted);
-- extended unit, see AI05-0002-1
generic
type Object (<>) is limited private;
type Object_Pointer is access constant Object;
package System.Address_To_Constant_Access_Conversions is
-- This is an implementation of Robert I. Eachus's plan in AI05-0002-1.
pragma Preelaborate;
function To_Pointer (Value : Address) return Object_Pointer
with Import, Convention => Intrinsic;
function To_Address (Value : Object_Pointer) return Address
with Import, Convention => Intrinsic;
end System.Address_To_Constant_Access_Conversions;
| 36.75 | 75 | 0.767007 |
c550a746a60660597b8d14ba5738d7e9ada1c5ba | 605 | ads | Ada | source/calendar/required/a-retide.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 33 | 2015-04-04T09:19:36.000Z | 2021-11-10T05:33:34.000Z | source/calendar/required/a-retide.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 8 | 2017-11-14T13:05:07.000Z | 2018-08-09T15:28:49.000Z | source/calendar/required/a-retide.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 9 | 2015-02-03T17:09:53.000Z | 2021-11-12T01:16:05.000Z | pragma License (Unrestricted);
-- implementation unit required by compiler
private package Ada.Real_Time.Delays is
-- required for delay until statement by compiler (a-retide.ads)
procedure Delay_Until (T : Time);
-- required by compiler (a-retide.ads)
-- for select or delay expanded to Timed_Task_Entry_Call,
-- Timed_Protected_Entry_Call, or Timed_Selective_Wait (exp_ch9.adb)
-- for pragma Relative_Deadline (exp_prag.adb)
function To_Duration (T : Time) return Duration;
pragma Pure_Function (To_Duration);
pragma Inline (To_Duration);
end Ada.Real_Time.Delays;
| 35.588235 | 74 | 0.747107 |
dfaeda540368126e71fe427bdddec4583bc588ce | 5,657 | ads | Ada | source/amf/uml/amf-standard_profile_l3-build_components-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/amf/uml/amf-standard_profile_l3-build_components-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/amf/uml/amf-standard_profile_l3-build_components-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- 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.Standard_Profile_L3.Build_Components.Collections is
pragma Preelaborate;
package Standard_Profile_L3_Build_Component_Collections is
new AMF.Generic_Collections
(Standard_Profile_L3_Build_Component,
Standard_Profile_L3_Build_Component_Access);
type Set_Of_Standard_Profile_L3_Build_Component is
new Standard_Profile_L3_Build_Component_Collections.Set with null record;
Empty_Set_Of_Standard_Profile_L3_Build_Component : constant Set_Of_Standard_Profile_L3_Build_Component;
type Ordered_Set_Of_Standard_Profile_L3_Build_Component is
new Standard_Profile_L3_Build_Component_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_Standard_Profile_L3_Build_Component : constant Ordered_Set_Of_Standard_Profile_L3_Build_Component;
type Bag_Of_Standard_Profile_L3_Build_Component is
new Standard_Profile_L3_Build_Component_Collections.Bag with null record;
Empty_Bag_Of_Standard_Profile_L3_Build_Component : constant Bag_Of_Standard_Profile_L3_Build_Component;
type Sequence_Of_Standard_Profile_L3_Build_Component is
new Standard_Profile_L3_Build_Component_Collections.Sequence with null record;
Empty_Sequence_Of_Standard_Profile_L3_Build_Component : constant Sequence_Of_Standard_Profile_L3_Build_Component;
private
Empty_Set_Of_Standard_Profile_L3_Build_Component : constant Set_Of_Standard_Profile_L3_Build_Component
:= (Standard_Profile_L3_Build_Component_Collections.Set with null record);
Empty_Ordered_Set_Of_Standard_Profile_L3_Build_Component : constant Ordered_Set_Of_Standard_Profile_L3_Build_Component
:= (Standard_Profile_L3_Build_Component_Collections.Ordered_Set with null record);
Empty_Bag_Of_Standard_Profile_L3_Build_Component : constant Bag_Of_Standard_Profile_L3_Build_Component
:= (Standard_Profile_L3_Build_Component_Collections.Bag with null record);
Empty_Sequence_Of_Standard_Profile_L3_Build_Component : constant Sequence_Of_Standard_Profile_L3_Build_Component
:= (Standard_Profile_L3_Build_Component_Collections.Sequence with null record);
end AMF.Standard_Profile_L3.Build_Components.Collections;
| 61.48913 | 122 | 0.572388 |
4a128c47a4f86996c57b89e3c816b49c2e51077f | 34,153 | adb | Ada | kv-avm-vole_tree.adb | davidkristola/vole | aa8e19d9deff2efe98fcd4dc0028c2895d624693 | [
"Unlicense"
] | 4 | 2015-02-02T12:11:41.000Z | 2020-12-19T02:14:21.000Z | kv-avm-vole_tree.adb | davidkristola/vole | aa8e19d9deff2efe98fcd4dc0028c2895d624693 | [
"Unlicense"
] | null | null | null | kv-avm-vole_tree.adb | davidkristola/vole | aa8e19d9deff2efe98fcd4dc0028c2895d624693 | [
"Unlicense"
] | 3 | 2017-02-22T10:44:02.000Z | 2021-05-16T09:34:39.000Z | with Ada.Text_IO;
with kv.avm.Log; use kv.avm.Log;
with Ada.Exceptions; use Ada.Exceptions;
with kv.avm.references; use kv.avm.references;
with kv.avm.Tree_Visitors;
with kv.avm.Symbol_Tables;
package body kv.avm.vole_tree is
function "+"(S : String) return String_Type renames Ada.Strings.Unbounded.To_Unbounded_String;
function "+"(U : String_Type) return String renames Ada.Strings.Unbounded.To_String;
----------------------------------------------------------------------------
protected type Unique_Id_Type is
procedure Next(ID : out Positive);
private
Count : Natural := 0;
end Unique_Id_Type;
protected body Unique_Id_Type is
procedure Next(ID : out Positive) is
begin
Count := Count + 1;
ID := Count;
end Next;
end Unique_Id_Type;
UID : Unique_Id_Type;
----------------------------------------------------------------------------
function Actor_Of(Target : Node_Base_Class'CLASS) return Node_Pointer is
Parent : Node_Pointer;
begin
Parent := Target.Get_Association(My_Parent);
if Parent /= null then
if Parent.all in Actor_Definition_Class'CLASS then
return Parent;
else
return Actor_Of(Parent.all);
end if;
else
raise Missing_Parent_Error;
end if;
end Actor_Of;
----------------------------------------------------------------------------
function Message_Of(Target : Node_Base_Class'CLASS) return Node_Pointer is
Parent : Node_Pointer;
begin
Parent := Target.Get_Association(My_Parent);
if Parent /= null then
if Parent.all in Message_Definition_Class'CLASS then
return Parent;
else
return Message_Of(Parent.all);
end if;
else
raise Missing_Parent_Error;
end if;
end Message_Of;
----------------------------------------------------------------------------
function Association_Of(Target : Node_Base_Class'CLASS) return Association_Type is
Parent : Node_Pointer;
Me : constant Node_Pointer := Target.Get_Association(My_Self);
Previous : Node_Pointer;
begin
--Put_Line("Looking for the association to "&Me.Get_Name);
Parent := Target.Get_Association(My_Parent);
if Parent /= null then
for Association in Child_Association_Type loop
if Parent.Get_Association(Association) = Me then
return Association;
end if;
end loop;
-- We have to follow the chain back because a parent can only point to one child in a list
Previous := Target.Get_Association(My_Previous);
if Previous /= Null then
return Association_Of(Previous.all);
else
raise Association_Error;
end if;
else
raise Missing_Parent_Error;
end if;
end Association_Of;
----------------------------------------------------------------------------
function Find_Actor(Target : String) return Node_Pointer is
Program : Program_Pointer;
Current : Node_Pointer;
begin
Program := Get_Program;
Current := Program.Get_Association(My_Actors);
while Current /= null and then Resolve_Name(Current.all) /= Target loop
Current := Current.Get_Association(My_Next);
end loop;
return Current;
end Find_Actor;
----------------------------------------------------------------------------
function Resolve_Name(Target : Node_Base_Class'CLASS; Raise_Errors : Boolean := False) return String is
First_Attempt : constant String := Target.Get_Name;
begin
if First_Attempt = "Not applicable" then
if Target in Expression_List_Class'CLASS then
return Expression_List_Class(Target).Get_Temp_Name;
else
if Raise_Errors then
raise Unresolveable_Name;
end if;
return "Could not Resolve_Name";
end if;
else
return First_Attempt;
end if;
end Resolve_Name;
----------------------------------------------------------------------------
function Resolve_Ref_Name(Target : Node_Base_Class'CLASS; Ref_Name : String; Raise_Errors : Boolean := False) return String is
Table : access kv.avm.Symbol_Tables.Symbol_Table;
My_Message : Node_Pointer;
My_Actor : Node_Pointer;
use kv.avm.Instructions;
use kv.avm.References;
begin
-- Check to see if this is a "self.x" variable and skip the message symbol table checks
if not (Target in Expression_Var_Class'CLASS and then Expression_Var_Class(Target).Get_Is_Self) then
My_Message := Message_Of(Target);
Table := Message_Definition_Class(My_Message.all).Get_Symbol_Table(VARIABLE_SYMBOLS);
if Table.Has(Ref_Name) then
return Make_Register_Name(Table.Get_Index(Ref_Name), Local);
end if;
Table := Message_Definition_Class(My_Message.all).Get_Symbol_Table(CONSTANT_SYMBOLS);
if Table.Has(Ref_Name) then
return Make_Register_Name(Table.Get_Index(Ref_Name), Input);
end if;
end if;
My_Actor := Actor_Of(Target);
Table := Actor_Definition_Class(My_Actor.all).Get_Symbol_Table(VARIABLE_SYMBOLS);
if Table.Has(Ref_Name) then
return Make_Register_Name(Table.Get_Index(Ref_Name), Attribute);
end if;
Table := Actor_Definition_Class(My_Actor.all).Get_Symbol_Table(CONSTANT_SYMBOLS);
if Table.Has(Ref_Name) then
return Make_Register_Name(Table.Get_Index(Ref_Name), Fixed);
end if;
if Raise_Errors then
raise Variable_Undefined;
end if;
return "ERROR-variable-not-found:" & Ref_Name;
end Resolve_Ref_Name;
----------------------------------------------------------------------------
function Resolve_Register(Target : Node_Base_Class'CLASS; Raise_Errors : Boolean := False) return String is
Ref_Name : constant String := Resolve_Name(Target);
begin
if Ref_Name = "Not applicable" then
if Raise_Errors then
raise Variable_Unspecified;
end if;
return "ERROR-no-variable-to-resolve";
else
return Resolve_Ref_Name(Target, Ref_Name, Raise_Errors);
end if;
end Resolve_Register;
----------------------------------------------------------------------------
function Get_ID(Self : Node_Base_Class) return Positive is
begin
return Self.ID;
end Get_ID;
----------------------------------------------------------------------------
function Get_Line(Self : Node_Base_Class) return Positive is
begin
return Self.Line;
end Get_Line;
----------------------------------------------------------------------------
function Get_Name(Self : Node_Base_Class) return String is
begin
return "Not applicable";
end Get_Name;
function Get_Name(Self : Id_Node_Class) return String is
begin
return +Self.Name;
end Get_Name;
function Get_Name(Self : Actor_Definition_Class) return String is
begin
return Self.Associations(My_Name).Get_Name;
end Get_Name;
function Get_Name(Self : Attribute_Definition_Class) return String is
begin
return Self.Associations(My_Name).Get_Name;
end Get_Name;
function Get_Name(Self : Message_Definition_Class) return String is
begin
return Self.Associations(My_Name).Get_Name;
end Get_Name;
function Get_Name(Self : Argument_Class) return String is
begin
return Self.Associations(My_Name).Get_Name;
end Get_Name;
function Get_Name(Self : Expression_Var_Class) return String is
begin
return Self.Associations(My_Name).Get_Name;
end Get_Name;
function Get_Name(Self : Statement_Var_Def_Class) return String is
begin
return Self.Associations(My_Name).Get_Name;
end Get_Name;
----------------------------------------------------------------------------
function Get_Association(Self : Node_Base_Class; Association : Association_Type) return Node_Pointer is
begin
return Self.Associations(Association);
end Get_Association;
----------------------------------------------------------------------------
procedure Visit(Self : in out Id_Node_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Id(Self, D);
end Visit;
procedure Visit(Self : in out Actor_Definition_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Actor_Definition(Self, D);
end Visit;
procedure Visit(Self : in out Attribute_Definition_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Attribute_Definition(Self, D);
end Visit;
procedure Visit(Self : in out Message_Definition_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Message_Definition(Self, D);
end Visit;
procedure Visit(Self : in out Kind_Node_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Kind_Node(Self, D);
end Visit;
procedure Visit(Self : in out Argument_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Argument(Self, D);
end Visit;
procedure Visit(Self : in out Constructor_Send_Node_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Constructor_Send_Node(Self, D);
end Visit;
procedure Visit(Self : in out Expression_List_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Expression_List(Self, D);
end Visit;
procedure Visit(Self : in out Expression_Op_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Expression_Op(Self, D);
end Visit;
procedure Visit(Self : in out Expression_Var_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Expression_Var(Self, D);
end Visit;
procedure Visit(Self : in out Expression_Literal_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Expression_Literal(Self, D);
end Visit;
procedure Visit(Self : in out Expression_Call_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Expression_Send(Self, D);
end Visit;
procedure Visit(Self : in out Expression_Fold_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Expression_Fold(Self, D);
end Visit;
procedure Visit(Self : in out Statement_List_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Statement_List(Self, D);
end Visit;
procedure Visit(Self : in out Statement_Assign_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Statement_Assign(Self, D);
end Visit;
procedure Visit(Self : in out Statement_Var_Def_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Statement_Var_Def(Self, D);
end Visit;
procedure Visit(Self : in out Statement_Emit_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Statement_Emit(Self, D);
end Visit;
procedure Visit(Self : in out Statement_Return_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Statement_Return(Self, D);
end Visit;
procedure Visit(Self : in out Statement_If_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Statement_If(Self, D);
end Visit;
procedure Visit(Self : in out Statement_Assert_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Statement_Assert(Self, D);
end Visit;
procedure Visit(Self : in out Statement_Send_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Statement_Send(Self, D);
end Visit;
procedure Visit(Self : in out Statement_While_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Statement_While(Self, D);
end Visit;
procedure Visit(Self : in out Program_Class; V : access Visitors.Visitor_Class'CLASS; D : Natural) is
begin
V.Visit_Program(Self, D);
end Visit;
----------------------------------------------------------------------------
function Get_Kind(Self : Node_Base_Class) return kv.avm.Registers.Data_Kind is
begin
if Self.Kind /= Unset then
return Self.Kind;
end if;
if Self.Associations(My_Kind) /= null then
return Self.Associations(My_Kind).Get_Kind;
end if;
return Unset;
end Get_Kind;
----------------------------------------------------------------------------
procedure Set_Kind(Self : in out Node_Base_Class; Kind : in kv.avm.Registers.Data_Kind) is
begin
Self.Kind := Kind;
end Set_Kind;
----------------------------------------------------------------------------
function Get_Op(Self : Expression_Op_Class) return kv.avm.Instructions.operation_type is
begin
return Self.Op;
end Get_Op;
----------------------------------------------------------------------------
function Get_Value(Self : Expression_Literal_Class) return String is
begin
return +Self.Value;
end Get_Value;
----------------------------------------------------------------------------
function Get_Is_Self(Self : Expression_Var_Class) return Boolean is
begin
return Self.Self;
end Get_Is_Self;
----------------------------------------------------------------------------
procedure Set_Temp_Name
(Self : in out Expression_List_Class;
Name : in String) is
begin
Self.Temp_Name := +Name;
end Set_Temp_Name;
----------------------------------------------------------------------------
function Get_Temp_Name(Self : Expression_List_Class) return String is
begin
return +Self.Temp_Name;
end Get_Temp_Name;
----------------------------------------------------------------------------
procedure Set_Tail(Self : in out Expression_Call_Class; Tail : Boolean) is
begin
Self.Is_Tail := Tail;
end Set_Tail;
----------------------------------------------------------------------------
function Get_Desc(Self : Expression_Call_Class) return String is
begin
if Self.Is_Tail then
if Self.Is_Call then
if Self.Is_Gosub then
return "tail-call-gosub";
else
return "tail-call-actor";
end if;
else
if Self.Is_Gosub then
return "tail-send-gosub";
else
return "tail-send-actor";
end if;
end if;
else
if Self.Is_Call then
if Self.Is_Gosub then
return "line-call-gosub";
else
return "line-call-actor";
end if;
else
if Self.Is_Gosub then
return "line-send-gosub";
else
return "line-send-actor";
end if;
end if;
end if;
end Get_Desc;
----------------------------------------------------------------------------
function Is_Gosub(Self : Expression_Call_Class) return Boolean is
begin
return Self.Is_Gosub;
end Is_Gosub;
----------------------------------------------------------------------------
function Is_Call(Self : Expression_Call_Class) return Boolean is
begin
return Self.Is_Call;
end Is_Call;
----------------------------------------------------------------------------
function Is_Tail(Self : Expression_Call_Class) return Boolean is
begin
return Self.Is_Tail;
end Is_Tail;
----------------------------------------------------------------------------
procedure Set_Tuple_Map_Name
(Self : in out Expression_Fold_Class;
Name : in String) is
begin
Self.Tuple_Map_Name := +Name;
end Set_Tuple_Map_Name;
----------------------------------------------------------------------------
function Get_Tuple_Map_Name(Self : Expression_Fold_Class) return String is
begin
return +Self.Tuple_Map_Name;
end Get_Tuple_Map_Name;
----------------------------------------------------------------------------
procedure Set_Tuple_Map_Init
(Self : in out Expression_Fold_Class;
Init : in String) is
begin
Self.Tuple_Map_Init := +Init;
end Set_Tuple_Map_Init;
----------------------------------------------------------------------------
function Get_Tuple_Map_Init(Self : Expression_Fold_Class) return String is
begin
return +Self.Tuple_Map_Init;
end Get_Tuple_Map_Init;
----------------------------------------------------------------------------
procedure Set_Block_Name
(Self : in out Statement_List_Class;
Name : in String) is
begin
Self.Block_Name := +Name;
end Set_Block_Name;
----------------------------------------------------------------------------
function Get_Block_Name(Self : Statement_List_Class) return String is
begin
return +Self.Block_Name;
end Get_Block_Name;
----------------------------------------------------------------------------
function Get_Symbol_Table(Self : Actor_Definition_Class; Attributes : Boolean) return access kv.avm.Symbol_Tables.Symbol_Table is
begin
if Attributes then
return Self.Attribute_Symbols;
else
return Self.Constant_Symbols;
end if;
end Get_Symbol_Table;
----------------------------------------------------------------------------
function Get_Super_Class(Self : Actor_Definition_Class) return Node_Pointer is
begin
return Self.Super_Class;
end Get_Super_Class;
----------------------------------------------------------------------------
function Get_Symbol_Table(Self : Message_Definition_Class; Local : Boolean) return access kv.avm.Symbol_Tables.Symbol_Table is
begin
if Local then
return Self.Local_Symbols;
else
return Self.Input_Symbols;
end if;
end Get_Symbol_Table;
----------------------------------------------------------------------------
function Get_Length(Self : Node_Base_Class) return Positive is
begin
return 1;
end Get_Length;
----------------------------------------------------------------------------
function Get_Length(Self : Node_List_Class) return Positive is
begin
if Self.Associations(My_Next) = null then
return 1;
else
return Self.Associations(My_Next).Get_Length + 1;
end if;
end Get_Length;
----------------------------------------------------------------------------
procedure Set_Destination
(Self : in out Statement_Send_Class;
Dest : in Destination_Type) is
begin
Self.Destination := Dest;
end Set_Destination;
----------------------------------------------------------------------------
function Get_Destination(Self : Statement_Send_Class) return Destination_Type is
begin
return Self.Destination;
end Get_Destination;
----------------------------------------------------------------------------
procedure Set
(Node : in out Node_Base_Class;
Association : in Association_Type;
Target : in Node_Pointer) is
begin
Node.Associations(Association) := Target;
end Set;
----------------------------------------------------------------------------
procedure Build_Id_Node
(Node : in out Node_Pointer;
Line : in Positive;
Name : in String) is
N : Id_Node_Pointer;
begin
--Put_Line("Build_Id_Node, Name="&(Name));
N := new Id_Node_Class;
UID.Next(N.ID);
N.Name := +Name;
N.Line := Line;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
end Build_Id_Node;
----------------------------------------------------------------------------
procedure Build_Actor_Node
(Node : in out Node_Pointer;
Line : in Positive;
Name : in Node_Pointer;
Attr : in Node_Pointer;
Meth : in Node_Pointer;
Supr : in Node_Pointer := null) is
N : Actor_Definition_Pointer;
begin
--Put_Line("Build_Actor_Node, Name="&(+Id.Name));
N := new Actor_Definition_Class;
UID.Next(N.ID);
N.Line := Line;
N.Super_Class := Supr;
N.Attribute_Symbols := new kv.avm.Symbol_Tables.Symbol_Table;
N.Attribute_Symbols.Initialize;
N.Constant_Symbols := new kv.avm.Symbol_Tables.Symbol_Table;
N.Constant_Symbols.Initialize;
-- TODO: if Supr /= null, copy Supr's constants into our table... er... preserve indexs
Node := Node_Pointer(N);
N.Set(My_Self, Node);
N.Set(My_Name, Name);
N.Set(My_Attributes, Attr);
N.Set(My_Methods, Meth);
end Build_Actor_Node;
----------------------------------------------------------------------------
procedure Build_Attribute
(Node : in out Node_Pointer;
Line : in Positive;
Name : in Node_Pointer;
Ty_I : in Node_Pointer) is
N : Attribute_Definition_Pointer;
begin
N := new Attribute_Definition_Class;
UID.Next(N.ID);
N.Line := Line;
Node := Node_Pointer(N);
--Put_Line("Build_Attribute, Name="&(+N.Name.Name));
N.Set(My_Self, Node);
N.Set(My_Name, Name);
N.Set(My_Kind, Ty_I);
end Build_Attribute;
----------------------------------------------------------------------------
procedure Add_Next
(Node : in Node_Pointer;
Next : in Node_Pointer) is
begin
if Next /= null then
if Node.ID = Next.ID then
Raise_Exception(Parsing_Error'IDENTITY, "Node"&Positive'IMAGE(Node.ID)&" can't be added as its own next!");
end if;
Next.Associations(My_Previous) := Node;
end if;
Node.Associations(My_Next) := Next;
end Add_Next;
----------------------------------------------------------------------------
procedure Build_Message
(Node : in out Node_Pointer;
Line : in Positive;
pMsg : in Boolean;
Name : in Node_Pointer;
Args : in Node_Pointer;
Rtn : in Node_Pointer;
Code : in Node_Pointer;
Pred : in Node_Pointer) is
N : Message_Definition_Pointer;
begin
N := new Message_Definition_Class;
UID.Next(N.ID);
N.Line := Line;
N.Method := not pMsg;
N.Input_Symbols := new kv.avm.Symbol_Tables.Symbol_Table;
N.Input_Symbols.Initialize;
N.Local_Symbols := new kv.avm.Symbol_Tables.Symbol_Table;
N.Local_Symbols.Initialize;
Node := Node_Pointer(N);
--Put_Line("Build_Message, Name="&(+N.Name.Name));
N.Set(My_Self, Node);
N.Set(My_Name, Name);
N.Set(My_Inputs, Args);
N.Set(My_Outputs, Rtn);
N.Set(My_Code, Code);
N.Set(My_Condition, Pred);
end Build_Message;
----------------------------------------------------------------------------
procedure Build_Constructor
(Node : in out Node_Pointer;
Line : in Positive;
Args : in Node_Pointer;
Code : in Node_Pointer) is
N : Message_Definition_Pointer;
Name : Node_Pointer;
begin
--Put_Line("Build_Constructor");
Build_Id_Node(Name, Line, "CONSTRUCTOR");
N := new Message_Definition_Class;
UID.Next(N.ID);
N.Line := Line;
N.Method := False;
N.Input_Symbols := new kv.avm.Symbol_Tables.Symbol_Table;
N.Input_Symbols.Initialize;
N.Local_Symbols := new kv.avm.Symbol_Tables.Symbol_Table;
N.Local_Symbols.Initialize;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
N.Set(My_Name, Name);
N.Set(My_Inputs, Args);
N.Set(My_Code, Code);
end Build_Constructor;
----------------------------------------------------------------------------
procedure Build_Arg
(Node : in out Node_Pointer;
Line : in Positive;
Name : in Node_Pointer;
Kind : in Node_Pointer) is
N : Argument_Pointer;
Id : Id_Node_Pointer := Id_Node_Pointer(Name);
begin
--Put_Line("Build_Arg, Name="&(+Id.Name));
N := new Argument_Class;
UID.Next(N.ID);
N.Line := Line;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
N.Set(My_Name, Name);
N.Set(My_Kind, Kind);
end Build_Arg;
----------------------------------------------------------------------------
procedure Build_Kind
(Node : in out Node_Pointer;
Line : in Positive;
Kind : in kv.avm.Registers.Data_Kind;
Init : in Node_Pointer := null) is
N : Kind_Node_Pointer;
begin
--Put_Line("Build_Kind, kind="&kv.avm.Registers.Data_Kind'IMAGE(Kind));
N := new Kind_Node_Class;
UID.Next(N.ID);
N.Kind := Kind;
N.Line := Line;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
N.Set(My_Value, Init);
end Build_Kind;
----------------------------------------------------------------------------
function New_Constructor_Send
(Actor : in Node_Pointer;
Args : in Node_Pointer) return Node_Pointer is
N : Constructor_Send_Node_Pointer;
begin
N := new Constructor_Send_Node_Class;
UID.Next(N.ID);
N.Line := Actor.Line;
N.Set(My_Self, Node_Pointer(N));
N.Set(My_Destination, Actor);
N.Set(My_Arguments, Args);
return Node_Pointer(N);
end New_Constructor_Send;
----------------------------------------------------------------------------
procedure Build_Op_Expression
(Node : in out Node_Pointer;
Line : in Positive;
Op : in kv.avm.Instructions.operation_type;
Left : in Node_Pointer;
Right : in Node_Pointer := null) is
N : Expression_Op_Pointer;
begin
N := new Expression_Op_Class;
UID.Next(N.ID);
N.Line := Line;
N.Op := Op;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
N.Set(My_Left, Left);
N.Set(My_Right, Right);
end Build_Op_Expression;
----------------------------------------------------------------------------
procedure Build_Var_Expression
(Node : in out Node_Pointer;
Line : in Positive;
Self : in Boolean;
Name : in Node_Pointer) is
N : Expression_Var_Pointer;
begin
N := new Expression_Var_Class;
UID.Next(N.ID);
N.Line := Line;
N.Self := Self;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
N.Set(My_Name, Name);
end Build_Var_Expression;
----------------------------------------------------------------------------
procedure Build_Literal_Expression
(Node : in out Node_Pointer;
Line : in Positive;
Kind : in kv.avm.Registers.Data_Kind;
Value : in String) is
N : Expression_Literal_Pointer;
begin
N := new Expression_Literal_Class;
UID.Next(N.ID);
N.Line := Line;
N.Kind := Kind;
N.Value := +Value;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
end Build_Literal_Expression;
----------------------------------------------------------------------------
procedure Build_Assignment
(Node : in out Node_Pointer;
Line : in Positive;
Target : in Node_Pointer;
Value : in Node_Pointer) is
N : Statement_Assign_Pointer;
begin
N := new Statement_Assign_Class;
UID.Next(N.ID);
N.Line := Line;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
N.Set(My_Destination, Target);
N.Set(My_Value, Value);
end Build_Assignment;
----------------------------------------------------------------------------
procedure Build_Var_Def
(Node : in out Node_Pointer;
Line : in Positive;
Name : in Node_Pointer;
Ty_I : in Node_Pointer) is
N : Statement_Var_Def_Pointer;
begin
N := new Statement_Var_Def_Class;
UID.Next(N.ID);
N.Line := Line;
Node := Node_Pointer(N);
--Put_Line("Build_Var_Def, Name="&(+N.Name.Name));
N.Set(My_Self, Node);
N.Set(My_Name, Name);
N.Set(My_Kind, Ty_I);
end Build_Var_Def;
----------------------------------------------------------------------------
procedure Build_Emit
(Node : in out Node_Pointer;
Line : in Positive;
Expr : in Node_Pointer) is
N : Statement_Emit_Pointer;
begin
N := new Statement_Emit_Class;
UID.Next(N.ID);
N.Line := Line;
Node := Node_Pointer(N);
--Put_Line("Build_Emit");
N.Set(My_Self, Node);
N.Set(My_Value, Expr);
end Build_Emit;
----------------------------------------------------------------------------
procedure Build_Return
(Node : in out Node_Pointer;
Line : in Positive;
What : in Node_Pointer) is
N : Statement_Return_Pointer;
begin
N := new Statement_Return_Class;
UID.Next(N.ID);
N.Line := Line;
Node := Node_Pointer(N);
--Put_Line("Build_Return");
N.Set(My_Self, Node);
N.Set(My_Value, What);
end Build_Return;
----------------------------------------------------------------------------
procedure Build_Call_Statement
(Node : in out Node_Pointer;
Line : in Positive;
Kind : in Destination_Type;
-- Self : in Boolean;
-- Call : in Boolean;
Dest : in Node_Pointer;
Name : in Node_Pointer;
Args : in Node_Pointer) is
N : Expression_Send_Pointer;
begin
N := new Expression_Call_Class;
UID.Next(N.ID);
N.Line := Line;
-- N.Is_Gosub := Self;
-- N.Is_Call := Call;
N.Destination := Kind;
N.Is_Gosub := (Kind = Self);
N.Is_Call := True;
Node := Node_Pointer(N);
--Put_Line("Build_Send to "&(+N.Message_Name.Name));
N.Set(My_Self, Node);
N.Set(My_Destination, Dest);
N.Set(My_Name, Name);
N.Set(My_Arguments, Args);
end Build_Call_Statement;
----------------------------------------------------------------------------
procedure Build_Send_Statement
(Node : in out Node_Pointer;
Line : in Positive;
Kind : in Destination_Type;
Dest : in Node_Pointer;
Name : in Node_Pointer;
Args : in Node_Pointer) is
N : Statement_Send_Pointer;
begin
N := new Statement_Send_Class;
UID.Next(N.ID);
N.Line := Line;
N.Destination := Kind;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
N.Set(My_Destination, Dest);
N.Set(My_Name, Name);
N.Set(My_Arguments, Args);
end Build_Send_Statement;
----------------------------------------------------------------------------
procedure Build_If
(Node : in out Node_Pointer;
Line : in Positive;
Condition : in Node_Pointer;
Then_Part : in Node_Pointer;
Else_Part : in Node_Pointer) is
N : Statement_If_Pointer;
begin
N := new Statement_If_Class;
UID.Next(N.ID);
N.Line := Line;
Node := Node_Pointer(N);
--Put_Line("Build_If");
N.Set(My_Self, Node);
N.Set(My_Condition, Condition);
N.Set(My_Then_Part, Then_Part);
N.Set(My_Else_Part, Else_Part);
end Build_If;
----------------------------------------------------------------------------
procedure Build_Fold
(Node : in out Node_Pointer;
Line : in Positive;
What : in Node_Pointer) is
N : Expression_Fold_Pointer;
begin
N := new Expression_Fold_Class;
UID.Next(N.ID);
N.Line := Line;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
N.Set(My_Value, What);
end Build_Fold;
----------------------------------------------------------------------------
procedure Build_Assert
(Node : in out Node_Pointer;
Line : in Positive;
Condition : in Node_Pointer) is
N : Statement_Assert_Pointer;
begin
N := new Statement_Assert_Class;
UID.Next(N.ID);
N.Line := Line;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
N.Set(My_Condition, Condition);
end Build_Assert;
----------------------------------------------------------------------------
procedure Build_While
(Node : in out Node_Pointer;
Line : in Positive;
Condition : in Node_Pointer;
Loop_Part : in Node_Pointer) is
N : Statement_While_Pointer;
begin
N := new Statement_While_Class;
UID.Next(N.ID);
N.Line := Line;
Node := Node_Pointer(N);
N.Set(My_Self, Node);
N.Set(My_Condition, Condition);
N.Set(My_Loop_Part, Loop_Part);
end Build_While;
----------------------------------------------------------------------------
procedure Build_Program
(Node : in out Node_Pointer;
Line : in Positive;
Imports : in Node_Pointer;
Actors : in Node_Pointer) is
N : Program_Pointer;
begin
N := new Program_Class;
UID.Next(N.ID);
N.Line := Line;
Node := Node_Pointer(N);
--Put_Line("Build_Program");
N.Set(My_Self, Node);
N.Set(My_Imports, Imports);
N.Set(My_Actors, Actors);
end Build_Program;
Last_Saved_Program : Program_Pointer;
----------------------------------------------------------------------------
procedure Save_Program
(Node : in Node_Pointer) is
begin
Last_Saved_Program := Program_Pointer(Node);
end Save_Program;
----------------------------------------------------------------------------
function Get_Program return Program_Pointer is
begin
return Last_Saved_Program;
end Get_Program;
end kv.avm.vole_tree;
| 32.807877 | 132 | 0.544315 |
23f243e6cdd34c30432a3dc0e8c726537db0adee | 39,022 | adb | Ada | tools-src/gnu/gcc/gcc/ada/par-ch6.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 80 | 2015-01-02T10:14:04.000Z | 2021-06-07T06:29:49.000Z | tools-src/gnu/gcc/gcc/ada/par-ch6.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 9 | 2015-05-14T11:03:12.000Z | 2018-01-04T07:12:58.000Z | tools-src/gnu/gcc/gcc/ada/par-ch6.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 69 | 2015-01-02T10:45:56.000Z | 2021-09-06T07:52:13.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P A R . C H 6 --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
pragma Style_Checks (All_Checks);
-- Turn off subprogram body ordering check. Subprograms are in order
-- by RM section rather than alphabetical
with Sinfo.CN; use Sinfo.CN;
separate (Par)
package body Ch6 is
-- Local subprograms, used only in this chapter
function P_Defining_Designator return Node_Id;
function P_Defining_Operator_Symbol return Node_Id;
procedure Check_Junk_Semicolon_Before_Return;
-- Check for common error of junk semicolon before RETURN keyword of
-- function specification. If present, skip over it with appropriate
-- error message, leaving Scan_Ptr pointing to the RETURN after. This
-- routine also deals with a possibly misspelled version of Return.
----------------------------------------
-- Check_Junk_Semicolon_Before_Return --
----------------------------------------
procedure Check_Junk_Semicolon_Before_Return is
Scan_State : Saved_Scan_State;
begin
if Token = Tok_Semicolon then
Save_Scan_State (Scan_State);
Scan; -- past the semicolon
if Token = Tok_Return then
Restore_Scan_State (Scan_State);
Error_Msg_SC ("Unexpected semicolon ignored");
Scan; -- rescan past junk semicolon
else
Restore_Scan_State (Scan_State);
end if;
elsif Bad_Spelling_Of (Tok_Return) then
null;
end if;
end Check_Junk_Semicolon_Before_Return;
-----------------------------------------------------
-- 6.1 Subprogram (Also 6.3, 8.5.4, 10.1.3, 12.3) --
-----------------------------------------------------
-- This routine scans out a subprogram declaration, subprogram body,
-- subprogram renaming declaration or subprogram generic instantiation.
-- SUBPROGRAM_DECLARATION ::= SUBPROGRAM_SPECIFICATION;
-- ABSTRACT_SUBPROGRAM_DECLARATION ::=
-- SUBPROGRAM_SPECIFICATION is abstract;
-- SUBPROGRAM_SPECIFICATION ::=
-- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
-- | function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
-- PARAMETER_PROFILE ::= [FORMAL_PART]
-- PARAMETER_AND_RESULT_PROFILE ::= [FORMAL_PART] return SUBTYPE_MARK
-- SUBPROGRAM_BODY ::=
-- SUBPROGRAM_SPECIFICATION is
-- DECLARATIVE_PART
-- begin
-- HANDLED_SEQUENCE_OF_STATEMENTS
-- end [DESIGNATOR];
-- SUBPROGRAM_RENAMING_DECLARATION ::=
-- SUBPROGRAM_SPECIFICATION renames callable_entity_NAME;
-- SUBPROGRAM_BODY_STUB ::=
-- SUBPROGRAM_SPECIFICATION is separate;
-- GENERIC_INSTANTIATION ::=
-- procedure DEFINING_PROGRAM_UNIT_NAME is
-- new generic_procedure_NAME [GENERIC_ACTUAL_PART];
-- | function DEFINING_DESIGNATOR is
-- new generic_function_NAME [GENERIC_ACTUAL_PART];
-- The value in Pf_Flags indicates which of these possible declarations
-- is acceptable to the caller:
-- Pf_Flags.Decl Set if declaration OK
-- Pf_Flags.Gins Set if generic instantiation OK
-- Pf_Flags.Pbod Set if proper body OK
-- Pf_Flags.Rnam Set if renaming declaration OK
-- Pf_Flags.Stub Set if body stub OK
-- If an inappropriate form is encountered, it is scanned out but an
-- error message indicating that it is appearing in an inappropriate
-- context is issued. The only possible values for Pf_Flags are those
-- defined as constants in the Par package.
-- The caller has checked that the initial token is FUNCTION or PROCEDURE
-- Error recovery: cannot raise Error_Resync
function P_Subprogram (Pf_Flags : Pf_Rec) return Node_Id is
Specification_Node : Node_Id;
Name_Node : Node_Id;
Fpart_List : List_Id;
Fpart_Sloc : Source_Ptr;
Return_Node : Node_Id;
Inst_Node : Node_Id;
Body_Node : Node_Id;
Decl_Node : Node_Id;
Rename_Node : Node_Id;
Absdec_Node : Node_Id;
Stub_Node : Node_Id;
Fproc_Sloc : Source_Ptr;
Func : Boolean;
Scan_State : Saved_Scan_State;
begin
-- Set up scope stack entry. Note that the Labl field will be set later
SIS_Entry_Active := False;
SIS_Missing_Semicolon_Message := No_Error_Msg;
Push_Scope_Stack;
Scope.Table (Scope.Last).Sloc := Token_Ptr;
Scope.Table (Scope.Last).Etyp := E_Name;
Scope.Table (Scope.Last).Ecol := Start_Column;
Scope.Table (Scope.Last).Lreq := False;
Func := (Token = Tok_Function);
Fproc_Sloc := Token_Ptr;
Scan; -- past FUNCTION or PROCEDURE
Ignore (Tok_Type);
Ignore (Tok_Body);
if Func then
Name_Node := P_Defining_Designator;
if Nkind (Name_Node) = N_Defining_Operator_Symbol
and then Scope.Last = 1
then
Error_Msg_SP ("operator symbol not allowed at library level");
Name_Node := New_Entity (N_Defining_Identifier, Sloc (Name_Node));
-- Set name from file name, we need some junk name, and that's
-- as good as anything. This is only approximate, since we do
-- not do anything with non-standard name translations.
Get_Name_String (File_Name (Current_Source_File));
for J in 1 .. Name_Len loop
if Name_Buffer (J) = '.' then
Name_Len := J - 1;
exit;
end if;
end loop;
Set_Chars (Name_Node, Name_Find);
Set_Error_Posted (Name_Node);
end if;
else
Name_Node := P_Defining_Program_Unit_Name;
end if;
Scope.Table (Scope.Last).Labl := Name_Node;
if Token = Tok_Colon then
Error_Msg_SC ("redundant colon ignored");
Scan; -- past colon
end if;
-- Deal with generic instantiation, the one case in which we do not
-- have a subprogram specification as part of whatever we are parsing
if Token = Tok_Is then
Save_Scan_State (Scan_State); -- at the IS
T_Is; -- checks for redundant IS's
if Token = Tok_New then
if not Pf_Flags.Gins then
Error_Msg_SC ("generic instantiation not allowed here!");
end if;
Scan; -- past NEW
if Func then
Inst_Node := New_Node (N_Function_Instantiation, Fproc_Sloc);
Set_Name (Inst_Node, P_Function_Name);
else
Inst_Node := New_Node (N_Procedure_Instantiation, Fproc_Sloc);
Set_Name (Inst_Node, P_Qualified_Simple_Name);
end if;
Set_Defining_Unit_Name (Inst_Node, Name_Node);
Set_Generic_Associations (Inst_Node, P_Generic_Actual_Part_Opt);
TF_Semicolon;
Pop_Scope_Stack; -- Don't need scope stack entry in this case
return Inst_Node;
else
Restore_Scan_State (Scan_State); -- to the IS
end if;
end if;
-- If not a generic instantiation, then we definitely have a subprogram
-- specification (all possibilities at this stage include one here)
Fpart_Sloc := Token_Ptr;
Check_Misspelling_Of (Tok_Return);
-- Scan formal part. First a special error check. If we have an
-- identifier here, then we have a definite error. If this identifier
-- is on the same line as the designator, then we assume it is the
-- first formal after a missing left parenthesis
if Token = Tok_Identifier
and then not Token_Is_At_Start_Of_Line
then
T_Left_Paren; -- to generate message
Fpart_List := P_Formal_Part;
-- Otherwise scan out an optional formal part in the usual manner
else
Fpart_List := P_Parameter_Profile;
end if;
-- We treat what we have as a function specification if FUNCTION was
-- used, or if a RETURN is present. This gives better error recovery
-- since later RETURN statements will be valid in either case.
Check_Junk_Semicolon_Before_Return;
Return_Node := Error;
if Token = Tok_Return then
if not Func then
Error_Msg ("PROCEDURE should be FUNCTION", Fproc_Sloc);
Func := True;
end if;
Scan; -- past RETURN
Return_Node := P_Subtype_Mark;
No_Constraint;
else
if Func then
Ignore (Tok_Right_Paren);
TF_Return;
end if;
end if;
if Func then
Specification_Node :=
New_Node (N_Function_Specification, Fproc_Sloc);
Set_Subtype_Mark (Specification_Node, Return_Node);
else
Specification_Node :=
New_Node (N_Procedure_Specification, Fproc_Sloc);
end if;
Set_Defining_Unit_Name (Specification_Node, Name_Node);
Set_Parameter_Specifications (Specification_Node, Fpart_List);
-- Error check: barriers not allowed on protected functions/procedures
if Token = Tok_When then
if Func then
Error_Msg_SC ("barrier not allowed on function, only on entry");
else
Error_Msg_SC ("barrier not allowed on procedure, only on entry");
end if;
Scan; -- past WHEN
Discard_Junk_Node (P_Expression);
end if;
-- Deal with case of semicolon ending a subprogram declaration
if Token = Tok_Semicolon then
if not Pf_Flags.Decl then
T_Is;
end if;
Scan; -- past semicolon
-- If semicolon is immediately followed by IS, then ignore the
-- semicolon, and go process the body.
if Token = Tok_Is then
Error_Msg_SP ("unexpected semicolon ignored");
T_Is; -- ignroe redundant IS's
goto Subprogram_Body;
-- If BEGIN follows in an appropriate column, we immediately
-- commence the error action of assuming that the previous
-- subprogram declaration should have been a subprogram body,
-- i.e. that the terminating semicolon should have been IS.
elsif Token = Tok_Begin
and then Start_Column >= Scope.Table (Scope.Last).Ecol
then
Error_Msg_SP (""";"" should be IS!");
goto Subprogram_Body;
else
goto Subprogram_Declaration;
end if;
-- Case of not followed by semicolon
else
-- Subprogram renaming declaration case
Check_Misspelling_Of (Tok_Renames);
if Token = Tok_Renames then
if not Pf_Flags.Rnam then
Error_Msg_SC ("renaming declaration not allowed here!");
end if;
Rename_Node :=
New_Node (N_Subprogram_Renaming_Declaration, Token_Ptr);
Scan; -- past RENAMES
Set_Name (Rename_Node, P_Name);
Set_Specification (Rename_Node, Specification_Node);
TF_Semicolon;
Pop_Scope_Stack;
return Rename_Node;
-- Case of IS following subprogram specification
elsif Token = Tok_Is then
T_Is; -- ignore redundant Is's
if Token_Name = Name_Abstract then
Check_95_Keyword (Tok_Abstract, Tok_Semicolon);
end if;
-- Deal nicely with (now obsolete) use of <> in place of abstract
if Token = Tok_Box then
Error_Msg_SC ("ABSTRACT expected");
Token := Tok_Abstract;
end if;
-- Abstract subprogram declaration case
if Token = Tok_Abstract then
Absdec_Node :=
New_Node (N_Abstract_Subprogram_Declaration, Token_Ptr);
Set_Specification (Absdec_Node, Specification_Node);
Pop_Scope_Stack; -- discard unneeded entry
Scan; -- past ABSTRACT
TF_Semicolon;
return Absdec_Node;
-- Check for IS NEW with Formal_Part present and handle nicely
elsif Token = Tok_New then
Error_Msg
("formal part not allowed in instantiation", Fpart_Sloc);
Scan; -- past NEW
if Func then
Inst_Node := New_Node (N_Function_Instantiation, Fproc_Sloc);
else
Inst_Node :=
New_Node (N_Procedure_Instantiation, Fproc_Sloc);
end if;
Set_Defining_Unit_Name (Inst_Node, Name_Node);
Set_Name (Inst_Node, P_Name);
Set_Generic_Associations (Inst_Node, P_Generic_Actual_Part_Opt);
TF_Semicolon;
Pop_Scope_Stack; -- Don't need scope stack entry in this case
return Inst_Node;
else
goto Subprogram_Body;
end if;
-- Here we have a missing IS or missing semicolon, we always guess
-- a missing semicolon, since we are pretty good at fixing up a
-- semicolon which should really be an IS
else
Error_Msg_AP ("missing "";""");
SIS_Missing_Semicolon_Message := Get_Msg_Id;
goto Subprogram_Declaration;
end if;
end if;
-- Processing for subprogram body
<<Subprogram_Body>>
if not Pf_Flags.Pbod then
Error_Msg_SP ("subprogram body not allowed here!");
end if;
-- Subprogram body stub case
if Separate_Present then
if not Pf_Flags.Stub then
Error_Msg_SC ("body stub not allowed here!");
end if;
if Nkind (Name_Node) = N_Defining_Operator_Symbol then
Error_Msg
("operator symbol cannot be used as subunit name",
Sloc (Name_Node));
end if;
Stub_Node :=
New_Node (N_Subprogram_Body_Stub, Sloc (Specification_Node));
Set_Specification (Stub_Node, Specification_Node);
Scan; -- past SEPARATE
Pop_Scope_Stack;
TF_Semicolon;
return Stub_Node;
-- Subprogram body case
else
-- Here is the test for a suspicious IS (i.e. one that looks
-- like it might more properly be a semicolon). See separate
-- section discussing use of IS instead of semicolon in
-- package Parse.
if (Token in Token_Class_Declk
or else
Token = Tok_Identifier)
and then Start_Column <= Scope.Table (Scope.Last).Ecol
and then Scope.Last /= 1
then
Scope.Table (Scope.Last).Etyp := E_Suspicious_Is;
Scope.Table (Scope.Last).S_Is := Prev_Token_Ptr;
end if;
Body_Node :=
New_Node (N_Subprogram_Body, Sloc (Specification_Node));
Set_Specification (Body_Node, Specification_Node);
Parse_Decls_Begin_End (Body_Node);
return Body_Node;
end if;
-- Processing for subprogram declaration
<<Subprogram_Declaration>>
Decl_Node :=
New_Node (N_Subprogram_Declaration, Sloc (Specification_Node));
Set_Specification (Decl_Node, Specification_Node);
-- If this is a context in which a subprogram body is permitted,
-- set active SIS entry in case (see section titled "Handling
-- Semicolon Used in Place of IS" in body of Parser package)
-- Note that SIS_Missing_Semicolon_Message is already set properly.
if Pf_Flags.Pbod then
SIS_Labl := Scope.Table (Scope.Last).Labl;
SIS_Sloc := Scope.Table (Scope.Last).Sloc;
SIS_Ecol := Scope.Table (Scope.Last).Ecol;
SIS_Declaration_Node := Decl_Node;
SIS_Semicolon_Sloc := Prev_Token_Ptr;
SIS_Entry_Active := True;
end if;
Pop_Scope_Stack;
return Decl_Node;
end P_Subprogram;
---------------------------------
-- 6.1 Subprogram Declaration --
---------------------------------
-- Parsed by P_Subprogram (6.1)
------------------------------------------
-- 6.1 Abstract Subprogram Declaration --
------------------------------------------
-- Parsed by P_Subprogram (6.1)
-----------------------------------
-- 6.1 Subprogram Specification --
-----------------------------------
-- SUBPROGRAM_SPECIFICATION ::=
-- procedure DEFINING_PROGRAM_UNIT_NAME PARAMETER_PROFILE
-- | function DEFINING_DESIGNATOR PARAMETER_AND_RESULT_PROFILE
-- PARAMETER_PROFILE ::= [FORMAL_PART]
-- PARAMETER_AND_RESULT_PROFILE ::= [FORMAL_PART] return SUBTYPE_MARK
-- Subprogram specifications that appear in subprogram declarations
-- are parsed by P_Subprogram (6.1). This routine is used in other
-- contexts where subprogram specifications occur.
-- Note: this routine does not affect the scope stack in any way
-- Error recovery: can raise Error_Resync
function P_Subprogram_Specification return Node_Id is
Specification_Node : Node_Id;
begin
if Token = Tok_Function then
Specification_Node := New_Node (N_Function_Specification, Token_Ptr);
Scan; -- past FUNCTION
Ignore (Tok_Body);
Set_Defining_Unit_Name (Specification_Node, P_Defining_Designator);
Set_Parameter_Specifications
(Specification_Node, P_Parameter_Profile);
Check_Junk_Semicolon_Before_Return;
TF_Return;
Set_Subtype_Mark (Specification_Node, P_Subtype_Mark);
No_Constraint;
return Specification_Node;
elsif Token = Tok_Procedure then
Specification_Node := New_Node (N_Procedure_Specification, Token_Ptr);
Scan; -- past PROCEDURE
Ignore (Tok_Body);
Set_Defining_Unit_Name
(Specification_Node, P_Defining_Program_Unit_Name);
Set_Parameter_Specifications
(Specification_Node, P_Parameter_Profile);
return Specification_Node;
else
Error_Msg_SC ("subprogram specification expected");
raise Error_Resync;
end if;
end P_Subprogram_Specification;
---------------------
-- 6.1 Designator --
---------------------
-- DESIGNATOR ::=
-- [PARENT_UNIT_NAME .] IDENTIFIER | OPERATOR_SYMBOL
-- The caller has checked that the initial token is an identifier,
-- operator symbol, or string literal. Note that we don't bother to
-- do much error diagnosis in this routine, since it is only used for
-- the label on END lines, and the routines in package Par.Endh will
-- check that the label is appropriate.
-- Error recovery: cannot raise Error_Resync
function P_Designator return Node_Id is
Ident_Node : Node_Id;
Name_Node : Node_Id;
Prefix_Node : Node_Id;
function Real_Dot return Boolean;
-- Tests if a current token is an interesting period, i.e. is followed
-- by an identifier or operator symbol or string literal. If not, it is
-- probably just incorrect punctuation to be caught by our caller. Note
-- that the case of an operator symbol or string literal is also an
-- error, but that is an error that we catch here. If the result is
-- True, a real dot has been scanned and we are positioned past it,
-- if the result is False, the scan position is unchanged.
function Real_Dot return Boolean is
Scan_State : Saved_Scan_State;
begin
if Token /= Tok_Dot then
return False;
else
Save_Scan_State (Scan_State);
Scan; -- past dot
if Token = Tok_Identifier
or else Token = Tok_Operator_Symbol
or else Token = Tok_String_Literal
then
return True;
else
Restore_Scan_State (Scan_State);
return False;
end if;
end if;
end Real_Dot;
-- Start of processing for P_Designator
begin
Ident_Node := Token_Node;
Scan; -- past initial token
if Prev_Token = Tok_Operator_Symbol
or else Prev_Token = Tok_String_Literal
or else not Real_Dot
then
return Ident_Node;
-- Child name case
else
Prefix_Node := Ident_Node;
-- Loop through child names, on entry to this loop, Prefix contains
-- the name scanned so far, and Ident_Node is the last identifier.
loop
Name_Node := New_Node (N_Selected_Component, Prev_Token_Ptr);
Set_Prefix (Name_Node, Prefix_Node);
Ident_Node := P_Identifier;
Set_Selector_Name (Name_Node, Ident_Node);
Prefix_Node := Name_Node;
exit when not Real_Dot;
end loop;
-- On exit from the loop, Ident_Node is the last identifier scanned,
-- i.e. the defining identifier, and Prefix_Node is a node for the
-- entire name, structured (incorrectly!) as a selected component.
Name_Node := Prefix (Prefix_Node);
Change_Node (Prefix_Node, N_Designator);
Set_Name (Prefix_Node, Name_Node);
Set_Identifier (Prefix_Node, Ident_Node);
return Prefix_Node;
end if;
exception
when Error_Resync =>
while Token = Tok_Dot or else Token = Tok_Identifier loop
Scan;
end loop;
return Error;
end P_Designator;
------------------------------
-- 6.1 Defining Designator --
------------------------------
-- DEFINING_DESIGNATOR ::=
-- DEFINING_PROGRAM_UNIT_NAME | DEFINING_OPERATOR_SYMBOL
-- Error recovery: cannot raise Error_Resync
function P_Defining_Designator return Node_Id is
begin
if Token = Tok_Operator_Symbol then
return P_Defining_Operator_Symbol;
elsif Token = Tok_String_Literal then
Error_Msg_SC ("invalid operator name");
Scan; -- past junk string
return Error;
else
return P_Defining_Program_Unit_Name;
end if;
end P_Defining_Designator;
-------------------------------------
-- 6.1 Defining Program Unit Name --
-------------------------------------
-- DEFINING_PROGRAM_UNIT_NAME ::=
-- [PARENT_UNIT_NAME .] DEFINING_IDENTIFIER
-- Note: PARENT_UNIT_NAME may be present only in 95 mode at the outer level
-- Error recovery: cannot raise Error_Resync
function P_Defining_Program_Unit_Name return Node_Id is
Ident_Node : Node_Id;
Name_Node : Node_Id;
Prefix_Node : Node_Id;
begin
-- Set identifier casing if not already set and scan initial identifier
if Token = Tok_Identifier
and then Identifier_Casing (Current_Source_File) = Unknown
then
Set_Identifier_Casing (Current_Source_File, Determine_Token_Casing);
end if;
Ident_Node := P_Identifier;
Merge_Identifier (Ident_Node, Tok_Return);
-- Normal case (not child library unit name)
if Token /= Tok_Dot then
Change_Identifier_To_Defining_Identifier (Ident_Node);
return Ident_Node;
-- Child library unit name case
else
if Scope.Last > 1 then
Error_Msg_SP ("child unit allowed only at library level");
raise Error_Resync;
elsif Ada_83 then
Error_Msg_SP ("(Ada 83) child unit not allowed!");
end if;
Prefix_Node := Ident_Node;
-- Loop through child names, on entry to this loop, Prefix contains
-- the name scanned so far, and Ident_Node is the last identifier.
loop
exit when Token /= Tok_Dot;
Name_Node := New_Node (N_Selected_Component, Token_Ptr);
Scan; -- past period
Set_Prefix (Name_Node, Prefix_Node);
Ident_Node := P_Identifier;
Set_Selector_Name (Name_Node, Ident_Node);
Prefix_Node := Name_Node;
end loop;
-- On exit from the loop, Ident_Node is the last identifier scanned,
-- i.e. the defining identifier, and Prefix_Node is a node for the
-- entire name, structured (incorrectly!) as a selected component.
Name_Node := Prefix (Prefix_Node);
Change_Node (Prefix_Node, N_Defining_Program_Unit_Name);
Set_Name (Prefix_Node, Name_Node);
Change_Identifier_To_Defining_Identifier (Ident_Node);
Set_Defining_Identifier (Prefix_Node, Ident_Node);
-- All set with unit name parsed
return Prefix_Node;
end if;
exception
when Error_Resync =>
while Token = Tok_Dot or else Token = Tok_Identifier loop
Scan;
end loop;
return Error;
end P_Defining_Program_Unit_Name;
--------------------------
-- 6.1 Operator Symbol --
--------------------------
-- OPERATOR_SYMBOL ::= STRING_LITERAL
-- Operator symbol is returned by the scanner as Tok_Operator_Symbol
-----------------------------------
-- 6.1 Defining Operator Symbol --
-----------------------------------
-- DEFINING_OPERATOR_SYMBOL ::= OPERATOR_SYMBOL
-- The caller has checked that the initial symbol is an operator symbol
function P_Defining_Operator_Symbol return Node_Id is
Op_Node : Node_Id;
begin
Op_Node := Token_Node;
Change_Operator_Symbol_To_Defining_Operator_Symbol (Op_Node);
Scan; -- past operator symbol
return Op_Node;
end P_Defining_Operator_Symbol;
----------------------------
-- 6.1 Parameter_Profile --
----------------------------
-- PARAMETER_PROFILE ::= [FORMAL_PART]
-- Empty is returned if no formal part is present
-- Error recovery: cannot raise Error_Resync
function P_Parameter_Profile return List_Id is
begin
if Token = Tok_Left_Paren then
Scan; -- part left paren
return P_Formal_Part;
else
return No_List;
end if;
end P_Parameter_Profile;
---------------------------------------
-- 6.1 Parameter And Result Profile --
---------------------------------------
-- Parsed by its parent construct, which uses P_Parameter_Profile to
-- parse the parameters, and P_Subtype_Mark to parse the return type.
----------------------
-- 6.1 Formal part --
----------------------
-- FORMAL_PART ::= (PARAMETER_SPECIFICATION {; PARAMETER_SPECIFICATION})
-- PARAMETER_SPECIFICATION ::=
-- DEFINING_IDENTIFIER_LIST : MODE SUBTYPE_MARK
-- [:= DEFAULT_EXPRESSION]
-- | DEFINING_IDENTIFIER_LIST : ACCESS_DEFINITION
-- [:= DEFAULT_EXPRESSION]
-- This scans the construct Formal_Part. The caller has already checked
-- that the initial token is a left parenthesis, and skipped past it, so
-- that on entry Token is the first token following the left parenthesis.
-- Error recovery: cannot raise Error_Resync
function P_Formal_Part return List_Id is
Specification_List : List_Id;
Specification_Node : Node_Id;
Scan_State : Saved_Scan_State;
Num_Idents : Nat;
Ident : Nat;
Ident_Sloc : Source_Ptr;
Idents : array (Int range 1 .. 4096) of Entity_Id;
-- This array holds the list of defining identifiers. The upper bound
-- of 4096 is intended to be essentially infinite, and we do not even
-- bother to check for it being exceeded.
begin
Specification_List := New_List;
Specification_Loop : loop
begin
if Token = Tok_Pragma then
P_Pragmas_Misplaced;
end if;
Ignore (Tok_Left_Paren);
Ident_Sloc := Token_Ptr;
Idents (1) := P_Defining_Identifier;
Num_Idents := 1;
Ident_Loop : loop
exit Ident_Loop when Token = Tok_Colon;
-- The only valid tokens are colon and comma, so if we have
-- neither do a bit of investigation to see which is the
-- better choice for insertion.
if Token /= Tok_Comma then
-- Assume colon if IN or OUT keyword found
exit Ident_Loop when Token = Tok_In or else Token = Tok_Out;
-- Otherwise scan ahead
Save_Scan_State (Scan_State);
Look_Ahead : loop
-- If we run into a semicolon, then assume that a
-- colon was missing, e.g. Parms (X Y; ...). Also
-- assume missing colon on EOF (a real disaster!)
-- and on a right paren, e.g. Parms (X Y), and also
-- on an assignment symbol, e.g. Parms (X Y := ..)
if Token = Tok_Semicolon
or else Token = Tok_Right_Paren
or else Token = Tok_EOF
or else Token = Tok_Colon_Equal
then
Restore_Scan_State (Scan_State);
exit Ident_Loop;
-- If we run into a colon, assume that we had a missing
-- comma, e.g. Parms (A B : ...). Also assume a missing
-- comma if we hit another comma, e.g. Parms (A B, C ..)
elsif Token = Tok_Colon
or else Token = Tok_Comma
then
Restore_Scan_State (Scan_State);
exit Look_Ahead;
end if;
Scan;
end loop Look_Ahead;
end if;
-- Here if a comma is present, or to be assumed
T_Comma;
Num_Idents := Num_Idents + 1;
Idents (Num_Idents) := P_Defining_Identifier;
end loop Ident_Loop;
-- Fall through the loop on encountering a colon, or deciding
-- that there is a missing colon.
T_Colon;
-- If there are multiple identifiers, we repeatedly scan the
-- type and initialization expression information by resetting
-- the scan pointer (so that we get completely separate trees
-- for each occurrence).
if Num_Idents > 1 then
Save_Scan_State (Scan_State);
end if;
-- Loop through defining identifiers in list
Ident := 1;
Ident_List_Loop : loop
Specification_Node :=
New_Node (N_Parameter_Specification, Ident_Sloc);
Set_Defining_Identifier (Specification_Node, Idents (Ident));
if Token = Tok_Access then
if Ada_83 then
Error_Msg_SC ("(Ada 83) access parameters not allowed");
end if;
Set_Parameter_Type
(Specification_Node, P_Access_Definition);
else
P_Mode (Specification_Node);
if Token = Tok_Procedure
or else
Token = Tok_Function
then
Error_Msg_SC ("formal subprogram parameter not allowed");
Scan;
if Token = Tok_Left_Paren then
Discard_Junk_List (P_Formal_Part);
end if;
if Token = Tok_Return then
Scan;
Discard_Junk_Node (P_Subtype_Mark);
end if;
Set_Parameter_Type (Specification_Node, Error);
else
Set_Parameter_Type (Specification_Node, P_Subtype_Mark);
No_Constraint;
end if;
end if;
Set_Expression (Specification_Node, Init_Expr_Opt (True));
if Ident > 1 then
Set_Prev_Ids (Specification_Node, True);
end if;
if Ident < Num_Idents then
Set_More_Ids (Specification_Node, True);
end if;
Append (Specification_Node, Specification_List);
exit Ident_List_Loop when Ident = Num_Idents;
Ident := Ident + 1;
Restore_Scan_State (Scan_State);
end loop Ident_List_Loop;
exception
when Error_Resync =>
Resync_Semicolon_List;
end;
if Token = Tok_Semicolon then
Scan; -- past semicolon
-- If we have RETURN or IS after the semicolon, then assume
-- that semicolon should have been a right parenthesis and exit
if Token = Tok_Is or else Token = Tok_Return then
Error_Msg_SP ("expected "")"" in place of "";""");
exit Specification_Loop;
end if;
elsif Token = Tok_Right_Paren then
Scan; -- past right paren
exit Specification_Loop;
-- Special check for common error of using comma instead of semicolon
elsif Token = Tok_Comma then
T_Semicolon;
Scan; -- past comma
-- Special check for omitted separator
elsif Token = Tok_Identifier then
T_Semicolon;
-- If nothing sensible, skip to next semicolon or right paren
else
T_Semicolon;
Resync_Semicolon_List;
if Token = Tok_Semicolon then
Scan; -- past semicolon
else
T_Right_Paren;
exit Specification_Loop;
end if;
end if;
end loop Specification_Loop;
return Specification_List;
end P_Formal_Part;
----------------------------------
-- 6.1 Parameter Specification --
----------------------------------
-- Parsed by P_Formal_Part (6.1)
---------------
-- 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.
-- Error_Recovery: cannot raise Error_Resync
procedure P_Mode (Node : Node_Id) is
begin
if Token = Tok_In then
Scan; -- past IN
Set_In_Present (Node, True);
end if;
if Token = Tok_Out then
Scan; -- past OUT
Set_Out_Present (Node, True);
end if;
if Token = Tok_In then
Error_Msg_SC ("IN must precede OUT in parameter mode");
Scan; -- past IN
Set_In_Present (Node, True);
end if;
end P_Mode;
--------------------------
-- 6.3 Subprogram Body --
--------------------------
-- Parsed by P_Subprogram (6.1)
-----------------------------------
-- 6.4 Procedure Call Statement --
-----------------------------------
-- Parsed by P_Sequence_Of_Statements (5.1)
------------------------
-- 6.4 Function Call --
------------------------
-- Parsed by P_Call_Or_Name (4.1)
--------------------------------
-- 6.4 Actual Parameter Part --
--------------------------------
-- Parsed by P_Call_Or_Name (4.1)
--------------------------------
-- 6.4 Parameter Association --
--------------------------------
-- Parsed by P_Call_Or_Name (4.1)
------------------------------------
-- 6.4 Explicit Actual Parameter --
------------------------------------
-- Parsed by P_Call_Or_Name (4.1)
---------------------------
-- 6.5 Return Statement --
---------------------------
-- RETURN_STATEMENT ::= return [EXPRESSION];
-- The caller has checked that the initial token is RETURN
-- Error recovery: can raise Error_Resync
function P_Return_Statement return Node_Id is
Return_Node : Node_Id;
begin
Return_Node := New_Node (N_Return_Statement, Token_Ptr);
-- Sloc points to RETURN
-- Expression (Op3)
Scan; -- past RETURN
if Token /= Tok_Semicolon then
-- If no semicolon, then scan an expression, except that
-- we avoid trying to scan an expression if we are at an
-- expression terminator since in that case the best error
-- message is probably that we have a missing semicolon.
if Token not in Token_Class_Eterm then
Set_Expression (Return_Node, P_Expression_No_Right_Paren);
end if;
end if;
TF_Semicolon;
return Return_Node;
end P_Return_Statement;
end Ch6;
| 33.466552 | 79 | 0.565066 |
205b6e4cfd55ebbfbe21eff7f6ad01fa6c61243f | 10,229 | adb | Ada | bb-runtimes/src/s-textio__xps_uart16550.adb | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/src/s-textio__xps_uart16550.adb | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/src/s-textio__xps_uart16550.adb | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- This is the Xilinx XPS UART16550 version of this package
-- The UART interface is configured for 115200 baud rate, 8-bits, no parity
-- and 1 stop bit. The baud rate is set by the constant below. This package
-- uses a simple polling interface.
with Interfaces;
with System;
with System.BB.Board_Parameters;
package body System.Text_IO is
use Interfaces;
Baud_Rate : constant := 115_200;
-- XPS UART16550 Registers
pragma Warnings (Off, "*is not referenced*");
-- Disable warnings on unused interface entities
UART16550_Base_Address : constant := 16#83E0_0000#;
Receiver_Buffer_Offset : constant := 16#1000#;
Transmitter_Holding_Offset : constant := 16#1000#;
Interrupt_Enable_Offset : constant := 16#1004#;
Interrupt_Identification_Offset : constant := 16#1008#;
FIFO_Control_Offset : constant := 16#1008#;
Line_Control_Offset : constant := 16#100C#;
Modem_Control_Offset : constant := 16#1010#;
Line_Status_Offset : constant := 16#1014#;
Modem_Status_Offset : constant := 16#1018#;
Scratch_Offset : constant := 16#101C#;
Divisor_Latch_Low_Offset : constant := 16#1000#;
Divisor_Latch_High_Offset : constant := 16#1004#;
type Interrupt_Enable is record
Enable_Modem_Status_Interrupt : Boolean;
Enable_Receiver_Line_Status_Interrupt : Boolean;
Enable_Transmitter_Holding_Register_Empty_Interrupt : Boolean;
Enable_Received_Data_Available_Interrupt : Boolean;
end record with Size => 32;
for Interrupt_Enable use record
Enable_Modem_Status_Interrupt at 0 range 28 .. 28;
Enable_Receiver_Line_Status_Interrupt at 0 range 29 .. 29;
Enable_Transmitter_Holding_Register_Empty_Interrupt at 0 range 30 .. 30;
Enable_Received_Data_Available_Interrupt at 0 range 31 .. 31;
end record;
type UART16550_Interrupt_ID is
(Modem_Status, Transmitter_Holding_Register_Empty,
Received_Data_Available, Receiver_Line_Status, Character_Timeout);
type Interrupt_Identification is record
FIFOs_Enabled : Boolean;
Interrupt_ID : UART16550_Interrupt_ID;
Interrupt_Not_Pending : Boolean;
end record with Size => 32;
for Interrupt_Identification use record
FIFOs_Enabled at 0 range 24 .. 25;
Interrupt_ID at 0 range 28 .. 30;
Interrupt_Not_Pending at 0 range 31 .. 31;
end record;
type Stop_Bits_Type is (One, Two);
type Word_Length_Type is (Five, Six, Seven, Eight);
type Line_Control is record
Divisor_Latch_Access : Boolean;
Set_Break : Boolean;
Stick_Parity : Boolean;
Even_Parity : Boolean;
Parity_Enable : Boolean;
Stop_Bits : Stop_Bits_Type;
Word_Length : Word_Length_Type;
end record with Size => 32;
for Line_Control use record
Divisor_Latch_Access at 0 range 24 .. 24;
Set_Break at 0 range 25 .. 25;
Stick_Parity at 0 range 26 .. 26;
Even_Parity at 0 range 27 .. 27;
Parity_Enable at 0 range 28 .. 28;
Stop_Bits at 0 range 29 .. 29;
Word_Length at 0 range 30 .. 31;
end record;
type Line_Status is record
Error_in_RCVR_FIFO : Boolean;
Transmitter_Empty : Boolean;
Transmitter_Holding_Register_Empty : Boolean;
Break_Interrupt : Boolean;
Framing_Error : Boolean;
Parity_Error : Boolean;
Overrun_Error : Boolean;
Data_Ready : Boolean;
end record with Size => 32;
for Line_Status use record
Error_in_RCVR_FIFO at 0 range 24 .. 24;
Transmitter_Empty at 0 range 25 .. 25;
Transmitter_Holding_Register_Empty at 0 range 26 .. 26;
Break_Interrupt at 0 range 27 .. 27;
Framing_Error at 0 range 28 .. 28;
Parity_Error at 0 range 29 .. 29;
Overrun_Error at 0 range 30 .. 30;
Data_Ready at 0 range 31 .. 31;
end record;
Receiver_Buffer_Register : Character
with Volatile_Full_Access,
Address =>
System'To_Address
(UART16550_Base_Address + Receiver_Buffer_Offset + 3);
Transmitter_Holding_Register : Character
with Volatile_Full_Access,
Address =>
System'To_Address
(UART16550_Base_Address + Transmitter_Holding_Offset + 3);
Interrupt_Enable_Register : Interrupt_Enable
with Volatile_Full_Access,
Address =>
System'To_Address
(UART16550_Base_Address + Interrupt_Enable_Offset);
Interrupt_Identification_Register : Interrupt_Identification
with Volatile_Full_Access,
Address =>
System'To_Address
(UART16550_Base_Address + Interrupt_Identification_Offset);
Line_Control_Register : Line_Control
with Volatile_Full_Access,
Address =>
System'To_Address
(UART16550_Base_Address + Line_Control_Offset);
Line_Status_Register : Line_Status
with Volatile_Full_Access,
Address =>
System'To_Address
(UART16550_Base_Address + Line_Status_Offset);
Divisor_Latch_Low : Unsigned_32
with Volatile_Full_Access,
Address =>
System'To_Address
(UART16550_Base_Address + Divisor_Latch_Low_Offset);
Divisor_Latch_High : Unsigned_32
with Volatile_Full_Access,
Address =>
System'To_Address
(UART16550_Base_Address + Divisor_Latch_High_Offset);
pragma Warnings (On, "*is not referenced*");
-- Restore warnings
---------
-- Get --
---------
function Get return Character is
begin
-- Retrive character from receiver buffer
return Receiver_Buffer_Register;
end Get;
----------------
-- Initialize --
----------------
procedure Initialize is
Divisor : constant Unsigned_32 :=
System.BB.Board_Parameters.PLB_Clock_Frequency / (Baud_Rate * 16);
begin
-- Configured the UART for 115200 baud rate, 8-bits, no parity
-- and 1 stop bit.
-- Set divisor latch
Line_Control_Register.Divisor_Latch_Access := True;
Divisor_Latch_Low := Divisor;
Divisor_Latch_High := Shift_Right (Divisor, 8);
-- Setup Line Control Register
Line_Control_Register :=
(Divisor_Latch_Access => False,
Set_Break => False,
Stick_Parity => False,
Even_Parity => True,
Parity_Enable => False,
Stop_Bits => One,
Word_Length => Eight);
Initialized := True;
end Initialize;
-----------------
-- Is_Rx_Ready --
-----------------
function Is_Rx_Ready return Boolean is
begin
return Line_Status_Register.Data_Ready;
end Is_Rx_Ready;
-----------------
-- Is_Tx_Ready --
-----------------
function Is_Tx_Ready return Boolean is
begin
return Line_Status_Register.Transmitter_Holding_Register_Empty;
end Is_Tx_Ready;
---------
-- Put --
---------
procedure Put (C : Character) is
begin
-- Send the character
Transmitter_Holding_Register := 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;
| 37.745387 | 78 | 0.552253 |
188fdbcf95175e3f8378e5f9ff864e5bf6de9dec | 21,884 | adb | Ada | src/rejuvenation-text_rewrites.adb | TNO/Rejuvenation-Ada | 8113ec28da3923ccde40d76cbab70e0e614f4b75 | [
"BSD-3-Clause"
] | 1 | 2022-03-08T13:00:47.000Z | 2022-03-08T13:00:47.000Z | src/libraries/Rejuvenation_Lib/src/rejuvenation-text_rewrites.adb | selroc/Renaissance-Ada | 39230b34aced4a9d83831be346ca103136c53715 | [
"BSD-3-Clause"
] | null | null | null | src/libraries/Rejuvenation_Lib/src/rejuvenation-text_rewrites.adb | selroc/Renaissance-Ada | 39230b34aced4a9d83831be346ca103136c53715 | [
"BSD-3-Clause"
] | null | null | null | with Ada.Assertions; use Ada.Assertions;
with Ada.Strings; use Ada.Strings;
-- Debug includes:
-- with Ada.Strings.Fixed; use Ada.Strings.Fixed;
-- with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO; use Ada.Text_IO;
with Rejuvenation.File_Utils; use Rejuvenation.File_Utils;
with Rejuvenation.Navigation; use Rejuvenation.Navigation;
package body Rejuvenation.Text_Rewrites is
-- Public: Collect rewrite operation (node) --------
function Prepend
(TR : in out Text_Rewrite; Node : Ada_Node'Class; Text : String;
Before : Node_Location := No_Trivia; Charset : String := "")
return Boolean
is
First : constant Positive := Start_Offset (Node, Before);
WText : constant Wide_Wide_String :=
Langkit_Support.Text.Decode (Text, Charset);
begin
Assert
(Check => TR.Is_Initialized,
Message => "Text Rewrite used uninitialized");
Assert
(Check => Is_Reflexive_Ancestor (TR.Get_Unit.Root, Node),
Message =>
"Text Rewrite does not contain provided Node - " &
Langkit_Support.Text.Image (Node.Text));
Assert
(Check => TR.First <= First,
Message => "Text Rewrite - prepend before part");
return Replace (TR, First, First - 1, WText);
end Prepend;
function Append
(TR : in out Text_Rewrite; Node : Ada_Node'Class; Text : String;
After : Node_Location := No_Trivia; Charset : String := "")
return Boolean
is
Last : constant Positive := End_Offset (Node, After);
WText : constant Wide_Wide_String :=
Langkit_Support.Text.Decode (Text, Charset);
begin
Assert
(Check => TR.Is_Initialized,
Message => "Text Rewrite used uninitialized");
Assert
(Check => Is_Reflexive_Ancestor (TR.Get_Unit.Root, Node),
Message =>
"Text Rewrite Node does not contain provided Node - " &
Langkit_Support.Text.Image (Node.Text));
Assert
(Check => Last <= TR.Last,
Message => "Text Rewrite - append after part");
return Replace (TR, Last + 1, Last, WText);
end Append;
procedure Remove
(TR : in out Text_Rewrite; Node : Ada_Node'Class;
Before : Node_Location := No_Trivia; After : Node_Location := No_Trivia)
is
Dummy : Boolean;
begin
Dummy := TR.Remove (Node, Before, After);
end Remove;
procedure Prepend
(TR : in out Text_Rewrite; Node : Ada_Node'Class; Text : String;
Before : Node_Location := No_Trivia; Charset : String := "")
is
Dummy : Boolean;
begin
Dummy := TR.Prepend (Node, Text, Before, Charset);
end Prepend;
procedure Append
(TR : in out Text_Rewrite; Node : Ada_Node'Class; Text : String;
After : Node_Location := No_Trivia; Charset : String := "")
is
Dummy : Boolean;
begin
Dummy := TR.Append (Node, Text, After, Charset);
end Append;
procedure Replace
(TR : in out Text_Rewrite; Node : Ada_Node'Class; Text : String;
Before, After : Node_Location := No_Trivia; Charset : String := "")
is
Dummy : Boolean;
begin
Dummy := TR.Replace (Node, Text, Before, After, Charset);
end Replace;
procedure Restore (TR : in out Text_Rewrite; Node : Ada_Node'Class) is
Dummy : Boolean;
begin
Dummy := TR.Restore (Node);
end Restore;
procedure ReplaceAround
(TR : in out Text_Rewrite; Node : Ada_Node'Class; Before_Text : String;
Innernode : Ada_Node'Class; After_Text : String;
Before : Node_Location := No_Trivia; After : Node_Location := No_Trivia;
Charset : String := "")
is
NodeStartOffset : constant Positive := Start_Offset (Node, Before);
NodeEndOffset : constant Positive := End_Offset (Node, After);
InnernodeStartOffset : constant Positive :=
Start_Offset (Innernode, Before);
InnernodeEndOffset : constant Positive := End_Offset (Innernode, After);
Before_WText : constant Wide_Wide_String :=
Langkit_Support.Text.Decode (Before_Text, Charset);
After_WText : constant Wide_Wide_String :=
Langkit_Support.Text.Decode (After_Text, Charset);
Dummy_Before, Dummy_After : Boolean;
begin
Assert
(Check => TR.Is_Initialized,
Message => "Text Rewrite used uninitialized");
Assert
(Check => Is_Reflexive_Ancestor (TR.Get_Unit.Root, Node),
Message =>
"Text Rewrite Node does not contain provided Node - " &
Langkit_Support.Text.Image (Node.Text));
Assert
(Check => TR.First <= NodeStartOffset,
Message => "Text Rewrite - start of node outside part");
Assert
(Check => NodeEndOffset <= TR.Last,
Message => "Text Rewrite - end of node outside part");
Assert
(Check => Is_Reflexive_Ancestor (Node, Innernode),
Message => "Innernode should be contained in node");
Log ("ReplaceAround - Before");
Dummy_Before :=
Replace (TR, NodeStartOffset, InnernodeStartOffset - 1, Before_WText);
Log ("ReplaceAround - After");
Dummy_After :=
Replace (TR, InnernodeEndOffset + 1, NodeEndOffset, After_WText);
Assert
(Check => Dummy_Before = Dummy_After,
Message =>
Langkit_Support.Text.Image (Node.Full_Sloc_Image) &
"How to handle only one of the two is accepted?" & ASCII.LF &
"Before = " & Boolean'Image (Dummy_Before) & ASCII.LF & "After = " &
Boolean'Image (Dummy_After));
end ReplaceAround;
-- Collect rewrite operation (nodes) ---------------
function Replace
(TR : in out Text_Rewrite; First_Node, Last_Node : Ada_Node'Class;
Text : String; Before : Node_Location := No_Trivia;
After : Node_Location := No_Trivia; Charset : String := "")
return Boolean
is
First : constant Positive := Start_Offset (First_Node, Before);
Last : constant Positive := End_Offset (Last_Node, After);
WText : constant Wide_Wide_String :=
Langkit_Support.Text.Decode (Text, Charset);
begin
Assert
(Check => TR.Is_Initialized,
Message => "Text Rewrite used uninitialized");
-- TODO: First and Last node might be the same node
-- How to check it efficiently?
-- Options [at least]
-- * Move Assert upwards (before duplication happens)
-- * add check "First_Node = Last_Node or else .."
Assert
(Check => Is_Reflexive_Ancestor (TR.Get_Unit.Root, First_Node),
Message =>
"Text Rewrite Node does not contain provided First Node - " &
Langkit_Support.Text.Image (First_Node.Text));
Assert
(Check => TR.First <= First,
Message => "Text Rewrite - start of first node outside part");
Assert
(Check => Is_Reflexive_Ancestor (TR.Get_Unit.Root, Last_Node),
Message =>
"Text Rewrite Node does not contain provided Last Node - " &
Langkit_Support.Text.Image (Last_Node.Text));
Assert
(Check => Last <= TR.Last,
Message => "Text Rewrite - end of last node outside part");
return Replace (TR, First, Last, WText);
end Replace;
procedure Remove
(TR : in out Text_Rewrite; First_Node, Last_Node : Ada_Node'Class;
Before : Node_Location := No_Trivia; After : Node_Location := No_Trivia)
is
Dummy : Boolean;
begin
Dummy := Remove (TR, First_Node, Last_Node, Before, After);
end Remove;
procedure Replace
(TR : in out Text_Rewrite; First_Node, Last_Node : Ada_Node'Class;
Text : String; Before : Node_Location := No_Trivia;
After : Node_Location := No_Trivia; Charset : String := "")
is
Dummy : Boolean;
begin
Dummy :=
Replace (TR, First_Node, Last_Node, Text, Before, After, Charset);
end Replace;
-- Public: Collect rewrite operation (token) --------
function Prepend
(TR : in out Text_Rewrite; Token : Token_Reference; Text : String;
Charset : String := "") return Boolean
is
First : constant Integer := Raw_Data (Token).Source_First;
WText : constant Wide_Wide_String :=
Langkit_Support.Text.Decode (Text, Charset);
begin
return Replace (TR, First, First - 1, WText);
end Prepend;
function Append
(TR : in out Text_Rewrite; Token : Token_Reference; Text : String;
Charset : String := "") return Boolean
is
Last : constant Integer := Raw_Data (Token).Source_Last;
WText : constant Wide_Wide_String :=
Langkit_Support.Text.Decode (Text, Charset);
begin
return Replace (TR, Last + 1, Last, WText);
end Append;
function Replace
(TR : in out Text_Rewrite; Token : Token_Reference; Text : String;
Charset : String := "") return Boolean
is
First : constant Integer := Raw_Data (Token).Source_First;
Last : constant Integer := Raw_Data (Token).Source_Last;
WText : constant Wide_Wide_String :=
Langkit_Support.Text.Decode (Text, Charset);
begin
return Replace (TR, First, Last, WText);
end Replace;
procedure Remove (TR : in out Text_Rewrite; Token : Token_Reference) is
Dummy : Boolean;
begin
Dummy := TR.Remove (Token);
end Remove;
procedure Prepend
(TR : in out Text_Rewrite; Token : Token_Reference; Text : String;
Charset : String := "")
is
Dummy : Boolean;
begin
Dummy := TR.Prepend (Token, Text, Charset);
end Prepend;
procedure Append
(TR : in out Text_Rewrite; Token : Token_Reference; Text : String;
Charset : String := "")
is
Dummy : Boolean;
begin
Dummy := TR.Append (Token, Text, Charset);
end Append;
procedure Replace
(TR : in out Text_Rewrite; Token : Token_Reference; Text : String;
Charset : String := "")
is
Dummy : Boolean;
begin
Dummy := TR.Replace (Token, Text, Charset);
end Replace;
-- Public: Inspect rewrite operations --------
function HasReplacements (TR : Text_Rewrite) return Boolean is
begin
return not TR.Entries.Is_Empty;
end HasReplacements;
-- Public: Apply rewrite operations --------
function ApplyToString (TR : Text_Rewrite) return String is
use Replacement_List;
Txt : constant Langkit_Support.Text.Text_Type :=
TR.Get_Unit.Text (TR.First .. TR.Last);
Str : Unbounded_Wide_Wide_String := To_Unbounded_Wide_Wide_String (Txt);
Str_First : constant Positive := 1;
-- lower bound of an Unbounded_Wide_Wide_String is 1
C : Cursor := TR.Entries.Last;
begin
Assert
(Check => TR.Is_Initialized,
Message => "Text Rewrite used uninitialized");
Log ("ApplyToString -" & TR.Entries.Length'Image & " Slices");
while Has_Element (C) loop
declare
RE : constant Replacement_Entry := Element (C);
From : constant Positive := RE.First - TR.First + Str_First;
To : constant Natural := RE.Last - TR.First + Str_First;
Replacement : constant Wide_Wide_String :=
To_Wide_Wide_String (RE.Text);
begin
Log
("Slice #" & To_Index (C)'Image & " [" & From'Image & ":" &
To'Image & " ]");
Replace_Slice (Str, From, To, Replacement);
end;
Previous (C);
end loop;
return
Langkit_Support.Text.Encode
(To_Wide_Wide_String (Str), TR.Get_Unit.Get_Charset);
exception
when others =>
Put_Line ("Error in ApplyToString - " & TR.Get_Unit.Get_Filename);
raise;
end ApplyToString;
function Make_Text_Rewrite_Nodes
(First_Node, Last_Node : Ada_Node'Class;
Before : Node_Location := No_Trivia; After : Node_Location := No_Trivia)
return Text_Rewrite
is
First : constant Positive := Start_Offset (First_Node, Before);
Last : constant Positive := End_Offset (Last_Node, After);
begin
Assert
(Check => First <= Last,
Message => "Make_Text_Rewrite_Nodes - not a sequence");
Assert
(Check => "=" (First_Node.Unit, Last_Node.Unit),
Message => "Make_Text_Rewrite_Nodes - not same unit");
return
(Entries => Replacement_List.Empty_Vector, Unit => First_Node.Unit,
First => First, Last => Last);
end Make_Text_Rewrite_Nodes;
function Make_Text_Rewrite_Unit
(Unit : Analysis_Unit) return Text_Rewrite_Unit
is
begin
return
(Entries => Replacement_List.Empty_Vector, Unit => Unit, First => 1,
Last => Length (To_Unbounded_Wide_Wide_String (Unit.Text)));
end Make_Text_Rewrite_Unit;
procedure Apply (TR : Text_Rewrite_Unit) is
begin
if TR.HasReplacements then
Write_String_To_File (TR.ApplyToString, TR.Get_Unit.Get_Filename);
end if;
end Apply;
procedure Apply_And_Reparse (TR : in out Text_Rewrite_Unit) is
begin
if TR.HasReplacements then
declare
Unit : constant Analysis_Unit := TR.Get_Unit;
begin
Write_String_To_File (TR.ApplyToString, Unit.Get_Filename);
Unit.Reparse;
TR := Make_Text_Rewrite_Unit (Unit);
end;
end if;
end Apply_And_Reparse;
-- Private: Collect rewrite operation --------
function Replace_Inner
(TR : in out Text_Rewrite; First, Last : Natural; Text : Wide_Wide_String)
return Boolean;
-- Return value indicates whether replacement is accepted.
function Replace_Inner
(TR : in out Text_Rewrite; First, Last : Natural; Text : Wide_Wide_String)
return Boolean
is
use Replacement_List;
New_Text : Unbounded_Wide_Wide_String :=
To_Unbounded_Wide_Wide_String (Text);
C : Cursor := TR.Entries.First;
begin
while Has_Element (C) loop
declare
RE : Replacement_Entry := Element (C);
begin
if First = RE.First then
if RE.First - RE.Last = 1 then
Log ("Merge insert/replacement with earlier insertion");
New_Text := RE.Text & New_Text;
-- Might cover multiple earlier inserted replacements
if TR.Entries.Last = C then
Delete (TR.Entries, C);
else
declare
Dummy : Cursor := C;
begin
Delete (TR.Entries, Dummy);
end;
end if;
elsif First - Last = 1 then
Log ("Merge insertion with earlier replacement");
RE.Text := New_Text & RE.Text;
Replace_Element (TR.Entries, C, RE);
return True;
elsif Last < RE.Last then
Log ("Replacements at the same offset; keep the earlier");
return False;
elsif RE.Last < Last then
Log ("Replacements at the same offset; keep the current");
-- Might cover multiple earlier inserted replacements
if TR.Entries.Last = C then
Delete (TR.Entries, C);
else
declare
Dummy : Cursor := C;
begin
Delete (TR.Entries, Dummy);
end;
end if;
else
if RE.Text = New_Text then
Log ("Identical replacements");
return True;
-- TODO: Why return False / True?
-- Both the current is accepted and the old is kept
-- (since both are identical)
else
Log
("Conflicting replacements of equal length; " &
"keep the current");
RE.Text := New_Text;
Replace_Element (TR.Entries, C, RE);
return True;
end if;
end if;
elsif First < RE.First then
if RE.Last = Last then
-- length != 0
if RE.First - RE.Last = 1 then
Log ("Merging of operation with insert operation");
RE.First := First;
RE.Text := New_Text & RE.Text;
Replace_Element (TR.Entries, C, RE);
return True;
else
Log
("Replacements at the same end-offset; " &
"keep the current");
RE.First := First;
RE.Text := New_Text;
Replace_Element (TR.Entries, C, RE);
return True;
end if;
elsif RE.Last < Last then
Log
("Earlier replacement is completely covered " &
"by the current");
-- Might cover multiple earlier inserted replacements
if TR.Entries.Last = C then
Delete (TR.Entries, C);
else
declare
Dummy : Cursor := C;
begin
Delete (TR.Entries, Dummy);
end;
end if;
elsif RE.First - 1 < Last then
Log ("Overlapping edit operations (1)");
return False;
else
Log ("Insert current operation before earlier operation");
exit;
end if;
else
-- RE.First < First
if Last = RE.Last then
-- entry.length != 0
if First - Last = 1 then
Log ("Merging of operation with insert operation");
RE.Text := RE.Text & New_Text;
Replace_Element (TR.Entries, C, RE);
return True;
else
Log
("Replacements at the same end-offset; " &
"keep the earlier");
return False;
end if;
elsif Last < RE.Last then
Log
("Current replacement is completely covered " &
"by the earlier");
return False;
elsif First - 1 < RE.Last then
Log ("Overlapping edit operations (2)");
return False;
else
Next (C);
end if;
end if;
end;
end loop;
-- To have "the largest replacement wins" independent of the order
-- we cannot check for trivial replacements
-- since by removing the replacement,
-- a later smaller replacement can unexpectedly win!
declare
RE : Replacement_Entry;
begin
RE.First := First;
RE.Last := Last;
RE.Text := New_Text;
Log ("Add replacement");
Insert (TR.Entries, C, RE);
end;
return True;
end Replace_Inner;
--
-- Debug functionality to check replace
--
-- Max_Length_Text : constant Integer := 30;
--
-- function Image (TR : Text_Rewrite) return String
-- is
-- Return_Value : Unbounded_String;
-- begin
-- for E of TR.Entries loop
-- Return_Value := Return_Value & E.First'Image & "-"
-- & E.Last'Image & ":"
-- & Head (Image (To_Text (E.Text)), Max_Length_Text)
-- & ASCII.CR & ASCII.LF;
-- end loop;
--
-- return To_String (Return_Value);
-- end Image;
--
-- function Is_Internally_Consistent (TR : Text_Rewrite) return Boolean
-- is
-- Last : Integer := -1;
-- begin
-- for E of TR.Entries loop
-- if Last > E.First then
-- return False;
-- else
-- Last := E.Last;
-- end if;
-- end loop;
-- return True;
-- end Is_Internally_Consistent;
--
-- function Replace (TR : in out Text_Rewrite;
-- First, Last : Natural;
-- Text : Wide_Wide_String)
-- return Boolean
-- is
-- Return_Value : Boolean;
-- begin
-- Log ("Replace " & First'Image & "-" & Last'Image & ":" &
-- Head (Image (To_Text (To_Unbounded_Wide_Wide_String (Text))),
-- Max_Length_Text));
-- Return_Value := Replace_Inner (TR, First, Last, Text);
-- Assert (Check => Is_Internally_Consistent (TR),
-- Message => "Text Rewrite no longer internally consistent" &
-- ASCII.CR & ASCII.LF & Image (TR));
-- return Return_Value;
-- end Replace;
function Replace
(TR : in out Text_Rewrite; First, Last : Natural; Text : Wide_Wide_String)
return Boolean is
(Replace_Inner (TR, First, Last, Text));
-- Proxy to allow easy switching to debug variant
-- Private: Debugging utilities --------
procedure Log (Str : String) is
begin
if DEBUG then
Put_Line (Str);
end if;
end Log;
end Rejuvenation.Text_Rewrites;
| 36.291874 | 79 | 0.554286 |
0e2ad6f47f762b7ef35218861c4faf0c8b947f19 | 2,268 | ads | Ada | src/wiki-render.ads | jquorning/ada-wiki | 21dcbeb3897499ee4b4a85353f8a782e154c0a43 | [
"Apache-2.0"
] | 18 | 2015-10-26T21:32:08.000Z | 2021-11-30T10:38:51.000Z | src/wiki-render.ads | jquorning/ada-wiki | 21dcbeb3897499ee4b4a85353f8a782e154c0a43 | [
"Apache-2.0"
] | 2 | 2018-03-18T08:22:06.000Z | 2022-02-16T22:15:05.000Z | src/wiki-render.ads | jquorning/ada-wiki | 21dcbeb3897499ee4b4a85353f8a782e154c0a43 | [
"Apache-2.0"
] | 2 | 2019-04-05T17:10:34.000Z | 2022-02-13T20:50:56.000Z | -----------------------------------------------------------------------
-- wiki-render -- Wiki renderer
-- Copyright (C) 2015, 2016, 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Wiki.Nodes;
with Wiki.Documents;
-- == Wiki Renderer {#wiki-render} ==
-- The `Wiki.Render` package represents the renderer that takes a wiki document
-- and render the result either in text, HTML or another format.
--
-- @include wiki-render-html.ads
-- @include wiki-render-links.ads
-- @include wiki-render-text.ads
-- @include wiki-render-wiki.ads
package Wiki.Render is
pragma Preelaborate;
-- ------------------------------
-- Document renderer
-- ------------------------------
type Renderer is limited interface;
type Renderer_Access is access all Renderer'Class;
-- Render the node instance from the document.
procedure Render (Engine : in out Renderer;
Doc : in Wiki.Documents.Document;
Node : in Wiki.Nodes.Node_Type) is abstract;
-- Finish the rendering pass after all the wiki document nodes are rendered.
procedure Finish (Engine : in out Renderer;
Doc : in Wiki.Documents.Document) is null;
-- Render the list of nodes from the document.
procedure Render (Engine : in out Renderer'Class;
Doc : in Wiki.Documents.Document;
List : in Wiki.Nodes.Node_List_Access);
-- Render the document.
procedure Render (Engine : in out Renderer'Class;
Doc : in Wiki.Documents.Document);
end Wiki.Render;
| 39.103448 | 80 | 0.612434 |
20e27360009e3e25082fce8fcbb739957579e2e3 | 7,398 | ads | Ada | tools/scitools/conf/understand/ada/ada05/s-parint.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | 1 | 2020-01-20T21:26:46.000Z | 2020-01-20T21:26:46.000Z | tools/scitools/conf/understand/ada/ada05/s-parint.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | tools/scitools/conf/understand/ada/ada05/s-parint.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A R T I T I O N _ I N T E R F A C E --
-- --
-- S p e c --
-- --
-- Copyright (C) 1995-2005, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
--
--
--
--
--
--
--
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This unit may be used directly from an application program by providing
-- an appropriate WITH, and the interface can be expected to remain stable.
with Ada.Exceptions;
with Ada.Streams;
with Interfaces;
with System.RPC;
package System.Partition_Interface is
pragma Elaborate_Body;
type DSA_Implementation_Name is (No_DSA, GARLIC_DSA, PolyORB_DSA);
DSA_Implementation : constant DSA_Implementation_Name := No_DSA;
-- RCI receiving stubs contain a table of descriptors for
-- all user subprograms exported by the unit.
type Subprogram_Id is new Natural;
First_RCI_Subprogram_Id : constant := 2;
type RCI_Subp_Info is record
Addr : System.Address;
-- Local address of the proxy object
end record;
type RCI_Subp_Info_Access is access all RCI_Subp_Info;
type RCI_Subp_Info_Array is array (Integer range <>) of
aliased RCI_Subp_Info;
subtype Unit_Name is String;
-- Name of Ada units
type Main_Subprogram_Type is access procedure;
type RACW_Stub_Type is tagged record
Origin : RPC.Partition_ID;
Receiver : Interfaces.Unsigned_64;
Addr : Interfaces.Unsigned_64;
Asynchronous : Boolean;
end record;
type RACW_Stub_Type_Access is access RACW_Stub_Type;
-- This type is used by the expansion to implement distributed objects.
-- Do not change its definition or its layout without updating
-- exp_dist.adb.
type RAS_Proxy_Type is tagged limited record
All_Calls_Remote : Boolean;
Receiver : System.Address;
Subp_Id : Subprogram_Id;
end record;
type RAS_Proxy_Type_Access is access RAS_Proxy_Type;
pragma No_Strict_Aliasing (RAS_Proxy_Type_Access);
-- This type is used by the expansion to implement distributed objects.
-- Do not change its definition or its layout without updating
-- Exp_Dist.Build_Remote_Supbrogram_Proxy_Type.
-- The Request_Access type is used for communication between the PCS
-- and the RPC receiver generated by the compiler: it contains all the
-- necessary information for the receiver to process an incoming call.
type RST_Access is access all Ada.Streams.Root_Stream_Type'Class;
type Request_Access is record
Params : RST_Access;
-- A stream describing the called subprogram and its parameters
Result : RST_Access;
-- A stream where the result, raised exception, or out values,
-- are marshalled.
end record;
procedure Check
(Name : Unit_Name;
Version : String;
RCI : Boolean := True);
-- Use by the main subprogram to check that a remote receiver
-- unit has has the same version than the caller's one.
function Same_Partition
(Left : access RACW_Stub_Type;
Right : access RACW_Stub_Type) return Boolean;
-- Determine whether Left and Right correspond to objects instantiated
-- on the same partition, for enforcement of E.4(19).
function Get_Active_Partition_ID (Name : Unit_Name) return RPC.Partition_ID;
-- Similar in some respects to RCI_Locator.Get_Active_Partition_ID
function Get_Active_Version (Name : Unit_Name) return String;
-- Similar in some respects to Get_Active_Partition_ID
function Get_Local_Partition_ID return RPC.Partition_ID;
-- Return the Partition_ID of the current partition
function Get_Passive_Partition_ID
(Name : Unit_Name) return RPC.Partition_ID;
-- Return the Partition_ID of the given shared passive partition
function Get_Passive_Version (Name : Unit_Name) return String;
-- Return the version corresponding to a shared passive unit
function Get_RCI_Package_Receiver
(Name : Unit_Name) return Interfaces.Unsigned_64;
-- Similar in some respects to RCI_Locator.Get_RCI_Package_Receiver
procedure Get_Unique_Remote_Pointer
(Handler : in out RACW_Stub_Type_Access);
-- Get a unique pointer on a remote object
procedure Raise_Program_Error_Unknown_Tag
(E : Ada.Exceptions.Exception_Occurrence);
pragma No_Return (Raise_Program_Error_Unknown_Tag);
-- Raise Program_Error with the same message as E one
type RPC_Receiver is access procedure (R : Request_Access);
procedure Register_Receiving_Stub
(Name : Unit_Name;
Receiver : RPC_Receiver;
Version : String := "";
Subp_Info : System.Address;
Subp_Info_Len : Integer);
-- Register the fact that the Name receiving stub is now elaborated.
-- Register the access value to the package RPC_Receiver procedure.
procedure Get_RAS_Info
(Name : Unit_Name;
Subp_Id : Subprogram_Id;
Proxy_Address : out Interfaces.Unsigned_64);
-- Look up the address of the proxy object for the given subprogram
-- in the named unit, or Null_Address if not present on the local
-- partition.
procedure Register_Passive_Package
(Name : Unit_Name;
Version : String := "");
-- Register a passive package
generic
RCI_Name : String;
package RCI_Locator is
function Get_RCI_Package_Receiver return Interfaces.Unsigned_64;
function Get_Active_Partition_ID return RPC.Partition_ID;
end RCI_Locator;
-- RCI package information caching
procedure Run (Main : Main_Subprogram_Type := null);
-- Run the main subprogram
end System.Partition_Interface;
| 40.206522 | 79 | 0.626791 |
10878357fae4fbfa794bbdbf9aa4aa269641092d | 3,031 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c37103a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c37103a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c37103a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- C37103A.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 DISCRIMINANTS MAY BE BOOLEAN, CHARACTER, USER_ENUM,
-- INTEGER, DERIVED CHARACTER, DERIVED USER_ENUM, DERIVED INTEGER,
-- AND DERIVED DERIVED USER_ENUM.
-- DAT 5/18/81
-- SPS 10/25/82
WITH REPORT; USE REPORT;
PROCEDURE C37103A IS
BEGIN
TEST ("C37103A", "MANY DIFFERENT DISCRIMINANT TYPES");
DECLARE
PACKAGE P1 IS
TYPE ENUM IS (A, Z, Q, 'W', 'A');
END P1;
PACKAGE P2 IS
TYPE E2 IS NEW P1.ENUM;
END P2;
PACKAGE P3 IS
TYPE E3 IS NEW P2.E2;
END P3;
USE P1, P2, P3;
TYPE INT IS NEW INTEGER RANGE -3 .. 7;
TYPE CHAR IS NEW CHARACTER;
TYPE R1 (D : ENUM) IS RECORD NULL; END RECORD;
TYPE R2 (D : INTEGER) IS RECORD NULL; END RECORD;
TYPE R3 (D : BOOLEAN) IS RECORD NULL; END RECORD;
TYPE R4 (D : CHARACTER) IS RECORD NULL; END RECORD;
TYPE R5 (D : CHAR) IS RECORD NULL; END RECORD;
TYPE R6 (D : E2) IS RECORD NULL; END RECORD;
TYPE R7 (D : E3) IS RECORD NULL; END RECORD;
TYPE R8 (D : INT) IS RECORD NULL; END RECORD;
O1 : R1(A) := (D => A);
O2 : R2(3) := (D => 3);
O3 : R3(TRUE) := (D => TRUE);
O4 : R4(ASCII.NUL) := (D => ASCII.NUL);
O5 : R5('A') := (D => 'A');
O6 : R6('A') := (D => 'A');
O7 : R7(A) := (D => A);
O8 : R8(2) := (D => 2);
BEGIN
IF O1.D /= A
OR O2.D /= 3
OR NOT O3.D
OR O4.D IN 'A' .. 'Z'
OR O5.D /= 'A'
OR O6.D /= 'A'
OR O7.D /= A
OR O8.D /= 2
THEN FAILED ("WRONG DISCRIMINANT VALUE");
END IF;
END;
RESULT;
END C37103A;
| 36.083333 | 79 | 0.559221 |
dc2fa40656af0b7a26169ae45ce78910eb0df946 | 38,807 | adb | Ada | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/g-catiio.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/g-catiio.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/g-catiio.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- G N A T . C A L E N D A R . T I M E _ I O --
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2019, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Calendar; use Ada.Calendar;
with Ada.Characters.Handling;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO;
with GNAT.Case_Util;
package body GNAT.Calendar.Time_IO is
type Month_Name is
(January,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December);
function Month_Name_To_Number
(Str : String) return Ada.Calendar.Month_Number;
-- Converts a string that contains an abbreviated month name to a month
-- number. Constraint_Error is raised if Str is not a valid month name.
-- Comparison is case insensitive
type Padding_Mode is (None, Zero, Space);
type Sec_Number is mod 2 ** 64;
-- Type used to compute the number of seconds since 01/01/1970. A 32 bit
-- number will cover only a period of 136 years. This means that for date
-- past 2106 the computation is not possible. A 64 bits number should be
-- enough for a very large period of time.
-----------------------
-- Local Subprograms --
-----------------------
function Am_Pm (H : Natural) return String;
-- Return AM or PM depending on the hour H
function Hour_12 (H : Natural) return Positive;
-- Convert a 1-24h format to a 0-12 hour format
function Image (Str : String; Length : Natural := 0) return String;
-- Return Str capitalized and cut to length number of characters. If
-- length is 0, then no cut operation is performed.
function Image
(N : Sec_Number;
Padding : Padding_Mode := Zero;
Length : Natural := 0) return String;
-- Return image of N. This number is eventually padded with zeros or spaces
-- depending of the length required. If length is 0 then no padding occurs.
function Image
(N : Natural;
Padding : Padding_Mode := Zero;
Length : Natural := 0) return String;
-- As above with N provided in Integer format
procedure Parse_ISO_8861_UTC
(Date : String;
Time : out Ada.Calendar.Time;
Success : out Boolean);
-- Subsidiary of function Value. It parses the string Date, interpreted as
-- an ISO 8861 time representation, and returns corresponding Time value.
-- Success is set to False when the string is not a supported ISO 8861
-- date. The following regular expression defines the supported format:
--
-- (yyyymmdd | yyyy'-'mm'-'dd)'T'(hhmmss | hh':'mm':'ss)
-- [ ('Z' | ('.' | ',') s{s} | ('+'|'-')hh':'mm) ]
--
-- Trailing characters (in particular spaces) are not allowed.
--
-- Examples:
--
-- 2017-04-14T14:47:06 20170414T14:47:06 20170414T144706
-- 2017-04-14T14:47:06,12 20170414T14:47:06.12
-- 2017-04-14T19:47:06+05 20170414T09:00:06-05:47
-----------
-- Am_Pm --
-----------
function Am_Pm (H : Natural) return String is
begin
if H = 0 or else H > 12 then
return "PM";
else
return "AM";
end if;
end Am_Pm;
-------------
-- Hour_12 --
-------------
function Hour_12 (H : Natural) return Positive is
begin
if H = 0 then
return 12;
elsif H <= 12 then
return H;
else -- H > 12
return H - 12;
end if;
end Hour_12;
-----------
-- Image --
-----------
function Image
(Str : String;
Length : Natural := 0) return String
is
use Ada.Characters.Handling;
Local : constant String :=
To_Upper (Str (Str'First)) &
To_Lower (Str (Str'First + 1 .. Str'Last));
begin
if Length = 0 then
return Local;
else
return Local (1 .. Length);
end if;
end Image;
-----------
-- Image --
-----------
function Image
(N : Natural;
Padding : Padding_Mode := Zero;
Length : Natural := 0) return String
is
begin
return Image (Sec_Number (N), Padding, Length);
end Image;
function Image
(N : Sec_Number;
Padding : Padding_Mode := Zero;
Length : Natural := 0) return String
is
function Pad_Char return String;
--------------
-- Pad_Char --
--------------
function Pad_Char return String is
begin
case Padding is
when None => return "";
when Zero => return "00";
when Space => return " ";
end case;
end Pad_Char;
-- Local Declarations
NI : constant String := Sec_Number'Image (N);
NIP : constant String := Pad_Char & NI (2 .. NI'Last);
-- Start of processing for Image
begin
if Length = 0 or else Padding = None then
return NI (2 .. NI'Last);
else
return NIP (NIP'Last - Length + 1 .. NIP'Last);
end if;
end Image;
-----------
-- Image --
-----------
function Image
(Date : Ada.Calendar.Time;
Picture : Picture_String) return String
is
Padding : Padding_Mode := Zero;
-- Padding is set for one directive
Result : Unbounded_String;
Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number;
Sub_Second : Second_Duration;
P : Positive;
begin
-- Get current time in split format
Split (Date, Year, Month, Day, Hour, Minute, Second, Sub_Second);
-- Null picture string is error
if Picture = "" then
raise Picture_Error with "null picture string";
end if;
-- Loop through characters of picture string, building result
Result := Null_Unbounded_String;
P := Picture'First;
while P <= Picture'Last loop
-- A directive has the following format "%[-_]."
if Picture (P) = '%' then
Padding := Zero;
if P = Picture'Last then
raise Picture_Error with "picture string ends with '%";
end if;
-- Check for GNU extension to change the padding
if Picture (P + 1) = '-' then
Padding := None;
P := P + 1;
elsif Picture (P + 1) = '_' then
Padding := Space;
P := P + 1;
end if;
if P = Picture'Last then
raise Picture_Error with "picture string ends with '- or '_";
end if;
case Picture (P + 1) is
-- Literal %
when '%' =>
Result := Result & '%';
-- A newline
when 'n' =>
Result := Result & ASCII.LF;
-- A horizontal tab
when 't' =>
Result := Result & ASCII.HT;
-- Hour (00..23)
when 'H' =>
Result := Result & Image (Hour, Padding, 2);
-- Hour (01..12)
when 'I' =>
Result := Result & Image (Hour_12 (Hour), Padding, 2);
-- Hour ( 0..23)
when 'k' =>
Result := Result & Image (Hour, Space, 2);
-- Hour ( 1..12)
when 'l' =>
Result := Result & Image (Hour_12 (Hour), Space, 2);
-- Minute (00..59)
when 'M' =>
Result := Result & Image (Minute, Padding, 2);
-- AM/PM
when 'p' =>
Result := Result & Am_Pm (Hour);
-- Time, 12-hour (hh:mm:ss [AP]M)
when 'r' =>
Result := Result &
Image (Hour_12 (Hour), Padding, Length => 2) & ':' &
Image (Minute, Padding, Length => 2) & ':' &
Image (Second, Padding, Length => 2) & ' ' &
Am_Pm (Hour);
-- Seconds since 1970-01-01 00:00:00 UTC
-- (a nonstandard extension)
when 's' =>
declare
-- Compute the number of seconds using Ada.Calendar.Time
-- values rather than Julian days to account for Daylight
-- Savings Time.
Neg : Boolean := False;
Sec : Duration := Date - Time_Of (1970, 1, 1, 0.0);
begin
-- Avoid rounding errors and perform special processing
-- for dates earlier than the Unix Epoc.
if Sec > 0.0 then
Sec := Sec - 0.5;
elsif Sec < 0.0 then
Neg := True;
Sec := abs (Sec + 0.5);
end if;
-- Prepend a minus sign to the result since Sec_Number
-- cannot handle negative numbers.
if Neg then
Result :=
Result & "-" & Image (Sec_Number (Sec), None);
else
Result := Result & Image (Sec_Number (Sec), None);
end if;
end;
-- Second (00..59)
when 'S' =>
Result := Result & Image (Second, Padding, Length => 2);
-- Milliseconds (3 digits)
-- Microseconds (6 digits)
-- Nanoseconds (9 digits)
when 'i' | 'e' | 'o' =>
declare
Sub_Sec : constant Long_Integer :=
Long_Integer (Sub_Second * 1_000_000_000);
Img1 : constant String := Sub_Sec'Img;
Img2 : constant String :=
"00000000" & Img1 (Img1'First + 1 .. Img1'Last);
Nanos : constant String :=
Img2 (Img2'Last - 8 .. Img2'Last);
begin
case Picture (P + 1) is
when 'i' =>
Result := Result &
Nanos (Nanos'First .. Nanos'First + 2);
when 'e' =>
Result := Result &
Nanos (Nanos'First .. Nanos'First + 5);
when 'o' =>
Result := Result & Nanos;
when others =>
null;
end case;
end;
-- Time, 24-hour (hh:mm:ss)
when 'T' =>
Result := Result &
Image (Hour, Padding, Length => 2) & ':' &
Image (Minute, Padding, Length => 2) & ':' &
Image (Second, Padding, Length => 2);
-- Locale's abbreviated weekday name (Sun..Sat)
when 'a' =>
Result := Result &
Image (Day_Name'Image (Day_Of_Week (Date)), 3);
-- Locale's full weekday name, variable length
-- (Sunday..Saturday)
when 'A' =>
Result := Result &
Image (Day_Name'Image (Day_Of_Week (Date)));
-- Locale's abbreviated month name (Jan..Dec)
when 'b' | 'h' =>
Result := Result &
Image (Month_Name'Image (Month_Name'Val (Month - 1)), 3);
-- Locale's full month name, variable length
-- (January..December).
when 'B' =>
Result := Result &
Image (Month_Name'Image (Month_Name'Val (Month - 1)));
-- Locale's date and time (Sat Nov 04 12:02:33 EST 1989)
when 'c' =>
case Padding is
when Zero =>
Result := Result & Image (Date, "%a %b %d %T %Y");
when Space =>
Result := Result & Image (Date, "%a %b %_d %_T %Y");
when None =>
Result := Result & Image (Date, "%a %b %-d %-T %Y");
end case;
-- Day of month (01..31)
when 'd' =>
Result := Result & Image (Day, Padding, 2);
-- Date (mm/dd/yy)
when 'D' | 'x' =>
Result := Result &
Image (Month, Padding, 2) & '/' &
Image (Day, Padding, 2) & '/' &
Image (Year, Padding, 2);
-- Day of year (001..366)
when 'j' =>
Result := Result & Image (Day_In_Year (Date), Padding, 3);
-- Month (01..12)
when 'm' =>
Result := Result & Image (Month, Padding, 2);
-- Week number of year with Sunday as first day of week
-- (00..53)
when 'U' =>
declare
Offset : constant Natural :=
(Julian_Day (Year, 1, 1) + 1) mod 7;
Week : constant Natural :=
1 + ((Day_In_Year (Date) - 1) + Offset) / 7;
begin
Result := Result & Image (Week, Padding, 2);
end;
-- Day of week (0..6) with 0 corresponding to Sunday
when 'w' =>
declare
DOW : constant Natural range 0 .. 6 :=
(if Day_Of_Week (Date) = Sunday
then 0
else Day_Name'Pos (Day_Of_Week (Date)));
begin
Result := Result & Image (DOW, Length => 1);
end;
-- Week number of year with Monday as first day of week
-- (00..53)
when 'W' =>
Result := Result & Image (Week_In_Year (Date), Padding, 2);
-- Last two digits of year (00..99)
when 'y' =>
declare
Y : constant Natural := Year - (Year / 100) * 100;
begin
Result := Result & Image (Y, Padding, 2);
end;
-- Year (1970...)
when 'Y' =>
Result := Result & Image (Year, None, 4);
when others =>
raise Picture_Error with
"unknown format character in picture string";
end case;
-- Skip past % and format character
P := P + 2;
-- Character other than % is copied into the result
else
Result := Result & Picture (P);
P := P + 1;
end if;
end loop;
return To_String (Result);
end Image;
--------------------------
-- Month_Name_To_Number --
--------------------------
function Month_Name_To_Number
(Str : String) return Ada.Calendar.Month_Number
is
subtype String3 is String (1 .. 3);
Abbrev_Upper_Month_Names :
constant array (Ada.Calendar.Month_Number) of String3 :=
("JAN", "FEB", "MAR", "APR", "MAY", "JUN",
"JUL", "AUG", "SEP", "OCT", "NOV", "DEC");
-- Short version of the month names, used when parsing date strings
S : String := Str;
begin
GNAT.Case_Util.To_Upper (S);
for J in Abbrev_Upper_Month_Names'Range loop
if Abbrev_Upper_Month_Names (J) = S then
return J;
end if;
end loop;
return Abbrev_Upper_Month_Names'First;
end Month_Name_To_Number;
------------------------
-- Parse_ISO_8861_UTC --
------------------------
procedure Parse_ISO_8861_UTC
(Date : String;
Time : out Ada.Calendar.Time;
Success : out Boolean)
is
Index : Positive := Date'First;
-- The current character scan index. After a call to Advance, Index
-- points to the next character.
End_Of_Source_Reached : exception;
-- An exception used to signal that the scan pointer has reached the
-- end of the source string.
Wrong_Syntax : exception;
-- An exception used to signal that the scan pointer has reached an
-- unexpected character in the source string.
procedure Advance;
pragma Inline (Advance);
-- Past the current character of Date
procedure Advance_Digits (Num_Digits : Positive);
pragma Inline (Advance_Digits);
-- Past the given number of digit characters
function Scan_Day return Day_Number;
pragma Inline (Scan_Day);
-- Scan the two digits of a day number and return its value
function Scan_Hour return Hour_Number;
pragma Inline (Scan_Hour);
-- Scan the two digits of an hour number and return its value
function Scan_Minute return Minute_Number;
pragma Inline (Scan_Minute);
-- Scan the two digits of a minute number and return its value
function Scan_Month return Month_Number;
pragma Inline (Scan_Month);
-- Scan the two digits of a month number and return its value
function Scan_Second return Second_Number;
pragma Inline (Scan_Second);
-- Scan the two digits of a second number and return its value
function Scan_Separator (Expected_Symbol : Character) return Boolean;
pragma Inline (Scan_Separator);
-- If the current symbol matches the Expected_Symbol then advance the
-- scanner index and return True; otherwise do nothing and return False
procedure Scan_Separator (Required : Boolean; Separator : Character);
pragma Inline (Scan_Separator);
-- If Required then check that the current character matches Separator
-- and advance the scanner index; if not Required then do nothing.
function Scan_Subsecond return Second_Duration;
pragma Inline (Scan_Subsecond);
-- Scan all the digits of a subsecond number and return its value
function Scan_Year return Year_Number;
pragma Inline (Scan_Year);
-- Scan the four digits of a year number and return its value
function Symbol return Character;
pragma Inline (Symbol);
-- Return the current character being scanned
-------------
-- Advance --
-------------
procedure Advance is
begin
-- Signal the end of the source string. This stops a complex scan by
-- bottoming up any recursive calls till control reaches routine Scan
-- which handles the exception. Certain scanning scenarios may handle
-- this exception on their own.
if Index > Date'Last then
raise End_Of_Source_Reached;
-- Advance the scan pointer as long as there are characters to scan,
-- in other words, the scan pointer has not passed the end of the
-- source string.
else
Index := Index + 1;
end if;
end Advance;
--------------------
-- Advance_Digits --
--------------------
procedure Advance_Digits (Num_Digits : Positive) is
begin
for J in 1 .. Num_Digits loop
if Symbol not in '0' .. '9' then
raise Wrong_Syntax;
end if;
Advance; -- past digit
end loop;
end Advance_Digits;
--------------
-- Scan_Day --
--------------
function Scan_Day return Day_Number is
From : constant Positive := Index;
begin
Advance_Digits (Num_Digits => 2);
return Day_Number'Value (Date (From .. Index - 1));
end Scan_Day;
---------------
-- Scan_Hour --
---------------
function Scan_Hour return Hour_Number is
From : constant Positive := Index;
begin
Advance_Digits (Num_Digits => 2);
return Hour_Number'Value (Date (From .. Index - 1));
end Scan_Hour;
-----------------
-- Scan_Minute --
-----------------
function Scan_Minute return Minute_Number is
From : constant Positive := Index;
begin
Advance_Digits (Num_Digits => 2);
return Minute_Number'Value (Date (From .. Index - 1));
end Scan_Minute;
----------------
-- Scan_Month --
----------------
function Scan_Month return Month_Number is
From : constant Positive := Index;
begin
Advance_Digits (Num_Digits => 2);
return Month_Number'Value (Date (From .. Index - 1));
end Scan_Month;
-----------------
-- Scan_Second --
-----------------
function Scan_Second return Second_Number is
From : constant Positive := Index;
begin
Advance_Digits (Num_Digits => 2);
return Second_Number'Value (Date (From .. Index - 1));
end Scan_Second;
--------------------
-- Scan_Separator --
--------------------
function Scan_Separator (Expected_Symbol : Character) return Boolean is
begin
if Symbol = Expected_Symbol then
Advance;
return True;
else
return False;
end if;
end Scan_Separator;
--------------------
-- Scan_Separator --
--------------------
procedure Scan_Separator (Required : Boolean; Separator : Character) is
begin
if Required then
if Symbol /= Separator then
raise Wrong_Syntax;
end if;
Advance; -- Past the separator
end if;
end Scan_Separator;
--------------------
-- Scan_Subsecond --
--------------------
function Scan_Subsecond return Second_Duration is
From : constant Positive := Index;
begin
Advance_Digits (Num_Digits => 1);
while Symbol in '0' .. '9'
and then Index < Date'Length
loop
Advance;
end loop;
if Symbol not in '0' .. '9' then
raise Wrong_Syntax;
end if;
Advance;
return Second_Duration'Value ("0." & Date (From .. Index - 1));
end Scan_Subsecond;
---------------
-- Scan_Year --
---------------
function Scan_Year return Year_Number is
From : constant Positive := Index;
begin
Advance_Digits (Num_Digits => 4);
return Year_Number'Value (Date (From .. Index - 1));
end Scan_Year;
------------
-- Symbol --
------------
function Symbol return Character is
begin
-- Signal the end of the source string. This stops a complex scan by
-- bottoming up any recursive calls till control reaches routine Scan
-- which handles the exception. Certain scanning scenarios may handle
-- this exception on their own.
if Index > Date'Last then
raise End_Of_Source_Reached;
else
return Date (Index);
end if;
end Symbol;
-- Local variables
Date_Separator : constant Character := '-';
Hour_Separator : constant Character := ':';
Day : Day_Number;
Month : Month_Number;
Year : Year_Number;
Hour : Hour_Number := 0;
Minute : Minute_Number := 0;
Second : Second_Number := 0;
Subsec : Second_Duration := 0.0;
Local_Hour : Hour_Number := 0;
Local_Minute : Minute_Number := 0;
Local_Sign : Character := ' ';
Local_Disp : Duration;
Sep_Required : Boolean := False;
-- True if a separator is seen (and therefore required after it!)
begin
-- Parse date
Year := Scan_Year;
Sep_Required := Scan_Separator (Date_Separator);
Month := Scan_Month;
Scan_Separator (Sep_Required, Date_Separator);
Day := Scan_Day;
if Index < Date'Last and then Symbol = 'T' then
Advance;
-- Parse time
Hour := Scan_Hour;
Sep_Required := Scan_Separator (Hour_Separator);
Minute := Scan_Minute;
Scan_Separator (Sep_Required, Hour_Separator);
Second := Scan_Second;
-- [('Z' | ('.' | ',') s{s} | ('+'|'-')hh:mm)]
if Index <= Date'Last then
-- Suffix 'Z' just confirms that this is an UTC time. No further
-- action needed.
if Symbol = 'Z' then
Advance;
-- A decimal fraction shall have at least one digit, and has as
-- many digits as supported by the underlying implementation.
-- The valid decimal separators are those specified in ISO 31-0,
-- i.e. the comma [,] or full stop [.]. Of these, the comma is
-- the preferred separator of ISO-8861.
elsif Symbol = ',' or else Symbol = '.' then
Advance; -- past decimal separator
Subsec := Scan_Subsecond;
-- Difference between local time and UTC: It shall be expressed
-- as positive (i.e. with the leading plus sign [+]) if the local
-- time is ahead of or equal to UTC of day and as negative (i.e.
-- with the leading minus sign [-]) if it is behind UTC of day.
-- The minutes time element of the difference may only be omitted
-- if the difference between the time scales is exactly an
-- integral number of hours.
elsif Symbol = '+' or else Symbol = '-' then
Local_Sign := Symbol;
Advance;
Local_Hour := Scan_Hour;
-- Past ':'
if Index < Date'Last and then Symbol = Hour_Separator then
Advance;
Local_Minute := Scan_Minute;
end if;
-- Compute local displacement
Local_Disp := Local_Hour * 3600.0 + Local_Minute * 60.0;
else
raise Wrong_Syntax;
end if;
end if;
end if;
-- Sanity checks. The check on Index ensures that there are no trailing
-- characters.
if Index /= Date'Length + 1
or else not Year'Valid
or else not Month'Valid
or else not Day'Valid
or else not Hour'Valid
or else not Minute'Valid
or else not Second'Valid
or else not Subsec'Valid
or else not Local_Hour'Valid
or else not Local_Minute'Valid
then
raise Wrong_Syntax;
end if;
-- Compute time without local displacement
if Local_Sign = ' ' then
Time := Time_Of (Year, Month, Day, Hour, Minute, Second, Subsec);
-- Compute time with positive local displacement
elsif Local_Sign = '+' then
Time :=
Time_Of (Year, Month, Day, Hour, Minute, Second, Subsec) -
Local_Disp;
-- Compute time with negative local displacement
elsif Local_Sign = '-' then
Time :=
Time_Of (Year, Month, Day, Hour, Minute, Second, Subsec) +
Local_Disp;
end if;
-- Notify that the input string was successfully parsed
Success := True;
exception
when End_Of_Source_Reached
| Wrong_Syntax
=>
Success := False;
end Parse_ISO_8861_UTC;
-----------
-- Value --
-----------
function Value (Date : String) return Ada.Calendar.Time is
D : String (1 .. 21);
D_Length : constant Natural := Date'Length;
Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number;
procedure Extract_Date
(Year : out Year_Number;
Month : out Month_Number;
Day : out Day_Number;
Time_Start : out Natural);
-- Try and extract a date value from string D. Time_Start is set to the
-- first character that could be the start of time data.
procedure Extract_Time
(Index : Positive;
Hour : out Hour_Number;
Minute : out Minute_Number;
Second : out Second_Number;
Check_Space : Boolean := False);
-- Try and extract a time value from string D starting from position
-- Index. Set Check_Space to True to check whether the character at
-- Index - 1 is a space. Raise Constraint_Error if the portion of D
-- corresponding to the date is not well formatted.
------------------
-- Extract_Date --
------------------
procedure Extract_Date
(Year : out Year_Number;
Month : out Month_Number;
Day : out Day_Number;
Time_Start : out Natural)
is
begin
if D (3) = '-' or else D (3) = '/' then
if D_Length = 8 or else D_Length = 17 then
-- Formats are "yy*mm*dd" or "yy*mm*dd hh:mm:ss"
if D (6) /= D (3) then
raise Constraint_Error;
end if;
Year := Year_Number'Value ("20" & D (1 .. 2));
Month := Month_Number'Value (D (4 .. 5));
Day := Day_Number'Value (D (7 .. 8));
Time_Start := 10;
elsif D_Length = 10 or else D_Length = 19 then
-- Formats are "mm*dd*yyyy" or "mm*dd*yyyy hh:mm:ss"
if D (6) /= D (3) then
raise Constraint_Error;
end if;
Year := Year_Number'Value (D (7 .. 10));
Month := Month_Number'Value (D (1 .. 2));
Day := Day_Number'Value (D (4 .. 5));
Time_Start := 12;
elsif D_Length = 11 or else D_Length = 20 then
-- Formats are "dd*mmm*yyyy" or "dd*mmm*yyyy hh:mm:ss"
if D (7) /= D (3) then
raise Constraint_Error;
end if;
Year := Year_Number'Value (D (8 .. 11));
Month := Month_Name_To_Number (D (4 .. 6));
Day := Day_Number'Value (D (1 .. 2));
Time_Start := 13;
else
raise Constraint_Error;
end if;
elsif D (3) = ' ' then
if D_Length = 11 or else D_Length = 20 then
-- Possible formats are "dd mmm yyyy", "dd mmm yyyy hh:mm:ss"
if D (7) /= ' ' then
raise Constraint_Error;
end if;
Year := Year_Number'Value (D (8 .. 11));
Month := Month_Name_To_Number (D (4 .. 6));
Day := Day_Number'Value (D (1 .. 2));
Time_Start := 13;
else
raise Constraint_Error;
end if;
else
if D_Length = 8 or else D_Length = 17 then
-- Possible formats are "yyyymmdd" or "yyyymmdd hh:mm:ss"
Year := Year_Number'Value (D (1 .. 4));
Month := Month_Number'Value (D (5 .. 6));
Day := Day_Number'Value (D (7 .. 8));
Time_Start := 10;
elsif D_Length = 10 or else D_Length = 19 then
-- Possible formats are "yyyy*mm*dd" or "yyyy*mm*dd hh:mm:ss"
if (D (5) /= '-' and then D (5) /= '/')
or else D (8) /= D (5)
then
raise Constraint_Error;
end if;
Year := Year_Number'Value (D (1 .. 4));
Month := Month_Number'Value (D (6 .. 7));
Day := Day_Number'Value (D (9 .. 10));
Time_Start := 12;
elsif D_Length = 11 or else D_Length = 20 then
-- Possible formats are "yyyy*mmm*dd"
if (D (5) /= '-' and then D (5) /= '/')
or else D (9) /= D (5)
then
raise Constraint_Error;
end if;
Year := Year_Number'Value (D (1 .. 4));
Month := Month_Name_To_Number (D (6 .. 8));
Day := Day_Number'Value (D (10 .. 11));
Time_Start := 13;
elsif D_Length = 12 or else D_Length = 21 then
-- Formats are "mmm dd, yyyy" or "mmm dd, yyyy hh:mm:ss"
if D (4) /= ' '
or else D (7) /= ','
or else D (8) /= ' '
then
raise Constraint_Error;
end if;
Year := Year_Number'Value (D (9 .. 12));
Month := Month_Name_To_Number (D (1 .. 3));
Day := Day_Number'Value (D (5 .. 6));
Time_Start := 14;
else
raise Constraint_Error;
end if;
end if;
end Extract_Date;
------------------
-- Extract_Time --
------------------
procedure Extract_Time
(Index : Positive;
Hour : out Hour_Number;
Minute : out Minute_Number;
Second : out Second_Number;
Check_Space : Boolean := False)
is
begin
-- If no time was specified in the string (do not allow trailing
-- character either)
if Index = D_Length + 2 then
Hour := 0;
Minute := 0;
Second := 0;
else
-- Not enough characters left ?
if Index /= D_Length - 7 then
raise Constraint_Error;
end if;
if Check_Space and then D (Index - 1) /= ' ' then
raise Constraint_Error;
end if;
if D (Index + 2) /= ':' or else D (Index + 5) /= ':' then
raise Constraint_Error;
end if;
Hour := Hour_Number'Value (D (Index .. Index + 1));
Minute := Minute_Number'Value (D (Index + 3 .. Index + 4));
Second := Second_Number'Value (D (Index + 6 .. Index + 7));
end if;
end Extract_Time;
-- Local Declarations
Success : Boolean;
Time_Start : Natural := 1;
Time : Ada.Calendar.Time;
-- Start of processing for Value
begin
-- Let's try parsing Date as a supported ISO-8861 format. If we do not
-- succeed, then retry using all the other GNAT supported formats.
Parse_ISO_8861_UTC (Date, Time, Success);
if Success then
return Time;
end if;
-- Length checks
if D_Length /= 8
and then D_Length /= 10
and then D_Length /= 11
and then D_Length /= 12
and then D_Length /= 17
and then D_Length /= 19
and then D_Length /= 20
and then D_Length /= 21
then
raise Constraint_Error;
end if;
-- After the correct length has been determined, it is safe to create
-- a local string copy in order to avoid String'First N arithmetic.
D (1 .. D_Length) := Date;
if D_Length /= 8 or else D (3) /= ':' then
Extract_Date (Year, Month, Day, Time_Start);
Extract_Time (Time_Start, Hour, Minute, Second, Check_Space => True);
else
declare
Discard : Second_Duration;
begin
Split (Clock, Year, Month, Day, Hour, Minute, Second,
Sub_Second => Discard);
end;
Extract_Time (1, Hour, Minute, Second, Check_Space => False);
end if;
-- Sanity checks
if not Year'Valid
or else not Month'Valid
or else not Day'Valid
or else not Hour'Valid
or else not Minute'Valid
or else not Second'Valid
then
raise Constraint_Error;
end if;
return Time_Of (Year, Month, Day, Hour, Minute, Second);
end Value;
--------------
-- Put_Time --
--------------
procedure Put_Time (Date : Ada.Calendar.Time; Picture : Picture_String) is
begin
Ada.Text_IO.Put (Image (Date, Picture));
end Put_Time;
end GNAT.Calendar.Time_IO;
| 31.220434 | 79 | 0.484191 |
20915bc42c3092a701ef93d712e95ceb1e261980 | 4,942 | adb | Ada | gcc-gcc-7_3_0-release/gcc/ada/itypes.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/ada/itypes.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/ada/itypes.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- I T Y P E S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2013, 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 Opt; use Opt;
with Sem; use Sem;
with Sinfo; use Sinfo;
with Stand; use Stand;
with Targparm; use Targparm;
with Uintp; use Uintp;
package body Itypes is
------------------
-- Create_Itype --
------------------
function Create_Itype
(Ekind : Entity_Kind;
Related_Nod : Node_Id;
Related_Id : Entity_Id := Empty;
Suffix : Character := ' ';
Suffix_Index : Nat := 0;
Scope_Id : Entity_Id := Current_Scope) return Entity_Id
is
Typ : Entity_Id;
begin
-- Should comment setting of Public_Status here ???
if Related_Id = Empty then
Typ := New_Internal_Entity (Ekind, Scope_Id, Sloc (Related_Nod), 'T');
Set_Public_Status (Typ);
else
Typ :=
New_External_Entity
(Ekind, Scope_Id, Sloc (Related_Nod), Related_Id, Suffix,
Suffix_Index, 'T');
end if;
-- Make sure Esize (Typ) was properly initialized, it should be since
-- New_Internal_Entity/New_External_Entity call Init_Size_Align.
pragma Assert (Esize (Typ) = Uint_0);
Set_Etype (Typ, Any_Type);
Set_Is_Itype (Typ);
Set_Associated_Node_For_Itype (Typ, Related_Nod);
if In_Deleted_Code
and then not ASIS_Mode
then
Set_Is_Frozen (Typ);
end if;
if Ekind in Access_Subprogram_Kind then
Set_Can_Use_Internal_Rep (Typ, not Always_Compatible_Rep_On_Target);
end if;
return Typ;
end Create_Itype;
---------------------------------
-- Create_Null_Excluding_Itype --
---------------------------------
function Create_Null_Excluding_Itype
(T : Entity_Id;
Related_Nod : Node_Id;
Scope_Id : Entity_Id := Current_Scope) return Entity_Id
is
I_Typ : Entity_Id;
begin
pragma Assert (Is_Access_Type (T));
I_Typ := Create_Itype (Ekind => E_Access_Subtype,
Related_Nod => Related_Nod,
Scope_Id => Scope_Id);
Set_Directly_Designated_Type (I_Typ, Directly_Designated_Type (T));
Set_Etype (I_Typ, Base_Type (T));
Set_Depends_On_Private (I_Typ, Depends_On_Private (T));
Set_Is_Public (I_Typ, Is_Public (T));
Set_From_Limited_With (I_Typ, From_Limited_With (T));
Set_Is_Access_Constant (I_Typ, Is_Access_Constant (T));
Set_Is_Generic_Type (I_Typ, Is_Generic_Type (T));
Set_Is_Volatile (I_Typ, Is_Volatile (T));
Set_Treat_As_Volatile (I_Typ, Treat_As_Volatile (T));
Set_Is_Atomic (I_Typ, Is_Atomic (T));
Set_Is_Ada_2005_Only (I_Typ, Is_Ada_2005_Only (T));
Set_Is_Ada_2012_Only (I_Typ, Is_Ada_2012_Only (T));
Set_Can_Never_Be_Null (I_Typ);
return I_Typ;
end Create_Null_Excluding_Itype;
end Itypes;
| 40.508197 | 79 | 0.493727 |
23bf22b9fa4cad7f08fffe6ddde160746d6f245f | 231 | ads | Ada | 3-mid/opengl/source/lean/model/opengl-model-line.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | 1 | 2022-01-20T07:13:42.000Z | 2022-01-20T07:13:42.000Z | 3-mid/opengl/source/lean/model/opengl-model-line.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | 3-mid/opengl/source/lean/model/opengl-model-line.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | package openGL.Model.line
--
-- Provides an abstract class for line models.
--
is
type Item is abstract new Model.item with private;
private
type Item is abstract new Model.item with null record;
end openGL.Model.line;
| 15.4 | 57 | 0.735931 |
d0b1a18f8bfea948e3cef4866cae7a4ad6ea81a4 | 975 | ads | Ada | src/gdb/gdb-7.11/gdb/testsuite/gdb.ada/pckd_neg/pck.ads | alrooney/unum-sdk | bbccb10b0cd3500feccbbef22e27ea111c3d18eb | [
"Apache-2.0"
] | 31 | 2018-08-01T21:25:24.000Z | 2022-02-14T07:52:34.000Z | src/gdb/gdb-7.11/gdb/testsuite/gdb.ada/pckd_neg/pck.ads | alrooney/unum-sdk | bbccb10b0cd3500feccbbef22e27ea111c3d18eb | [
"Apache-2.0"
] | 40 | 2018-12-03T19:48:52.000Z | 2021-03-10T06:34:26.000Z | src/gdb/gdb-7.11/gdb/testsuite/gdb.ada/pckd_neg/pck.ads | alrooney/unum-sdk | bbccb10b0cd3500feccbbef22e27ea111c3d18eb | [
"Apache-2.0"
] | 20 | 2018-11-16T21:19:22.000Z | 2021-10-18T23:08:24.000Z | -- Copyright (C) 2015-2016 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 Signed_Small is new Integer range - (2 ** 5) .. (2 ** 5 - 1);
type Signed_Simple_Array is array (1 .. 4) of Signed_Small;
pragma Pack (Signed_Simple_Array);
procedure Update_Signed_Small (S : in out Signed_Small);
end Pck;
| 42.391304 | 73 | 0.724103 |
dfa49179cc3fc9b2361e314aded1c5f97c3b43ad | 2,343 | adb | Ada | src/core/spat-proof_attempt-list.adb | HeisenbugLtd/spat | c3ec2b7675a12bdbe5378862b1ec6b17805d5a6c | [
"WTFPL"
] | 20 | 2020-05-17T18:55:16.000Z | 2021-05-26T14:53:53.000Z | src/core/spat-proof_attempt-list.adb | selroc/spat | c3ec2b7675a12bdbe5378862b1ec6b17805d5a6c | [
"WTFPL"
] | 33 | 2020-04-03T13:08:50.000Z | 2020-10-17T04:26:34.000Z | src/core/spat-proof_attempt-list.adb | selroc/spat | c3ec2b7675a12bdbe5378862b1ec6b17805d5a6c | [
"WTFPL"
] | 4 | 2020-06-12T12:17:27.000Z | 2021-09-09T14:19:31.000Z | ------------------------------------------------------------------------------
-- Copyright (C) 2020 by Heisenbug Ltd. (gh+spat@heisenbug.eu)
--
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the LICENSE file for more details.
------------------------------------------------------------------------------
pragma License (Unrestricted);
package body SPAT.Proof_Attempt.List is
---------------------------------------------------------------------------
-- "<"
---------------------------------------------------------------------------
not overriding
function "<" (Left : in T;
Right : in T) return Boolean
is
Left_Time : Duration := 0.0;
Right_Time : Duration := 0.0;
-- FIXME: Proof_Attempts should have a field storing the max/accumulated
-- time directly, so we don't need to recalculate it each time.
begin
for A of Left loop
Left_Time := Left_Time + A.Time;
end loop;
for A of Right loop
Right_Time := Right_Time + A.Time;
end loop;
return Left_Time > Right_Time;
end "<";
---------------------------------------------------------------------------
-- Has_Failed_Attempts
---------------------------------------------------------------------------
not overriding
function Has_Failed_Attempts (This : in T) return Boolean is
(for some A of This => A.Result /= "Valid");
---------------------------------------------------------------------------
-- Is_Unproved
---------------------------------------------------------------------------
not overriding
function Is_Unproved (This : in T) return Boolean is
(for all A of This => A.Result /= "Valid");
package By_Duration is new
Implementation.Vectors.Generic_Sorting ("<" => "<");
---------------------------------------------------------------------------
-- Sort_By_Duration
---------------------------------------------------------------------------
not overriding
procedure Sort_By_Duration (Container : in out T) is
begin
By_Duration.Sort (Implementation.Vectors.Vector (Container));
end Sort_By_Duration;
end SPAT.Proof_Attempt.List;
| 37.790323 | 79 | 0.431925 |
dc41ecaf1402de96084de7f360ba70f77e64dda8 | 23,769 | ads | Ada | stm32f1/stm32f103xx/svd/stm32_svd-scb.ads | ekoeppen/STM32_Generic_Ada_Drivers | 4ff29c3026c4b24280baf22a5b81ea9969375466 | [
"MIT"
] | 1 | 2021-04-06T07:57:56.000Z | 2021-04-06T07:57:56.000Z | stm32f1/stm32f103xx/svd/stm32_svd-scb.ads | ekoeppen/STM32_Generic_Ada_Drivers | 4ff29c3026c4b24280baf22a5b81ea9969375466 | [
"MIT"
] | null | null | null | stm32f1/stm32f103xx/svd/stm32_svd-scb.ads | ekoeppen/STM32_Generic_Ada_Drivers | 4ff29c3026c4b24280baf22a5b81ea9969375466 | [
"MIT"
] | 2 | 2018-05-29T13:59:31.000Z | 2019-02-03T19:48:08.000Z | -- This spec has been automatically generated from STM32F103.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package STM32_SVD.SCB is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CPUID_Revision_Field is STM32_SVD.UInt4;
subtype CPUID_PartNo_Field is STM32_SVD.UInt12;
subtype CPUID_Constant_Field is STM32_SVD.UInt4;
subtype CPUID_Variant_Field is STM32_SVD.UInt4;
subtype CPUID_Implementer_Field is STM32_SVD.Byte;
-- CPUID base register
type CPUID_Register is record
-- Read-only. Revision number
Revision : CPUID_Revision_Field;
-- Read-only. Part number of the processor
PartNo : CPUID_PartNo_Field;
-- Read-only. Reads as 0xF
Constant_k : CPUID_Constant_Field;
-- Read-only. Variant number
Variant : CPUID_Variant_Field;
-- Read-only. Implementer code
Implementer : CPUID_Implementer_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CPUID_Register use record
Revision at 0 range 0 .. 3;
PartNo at 0 range 4 .. 15;
Constant_k at 0 range 16 .. 19;
Variant at 0 range 20 .. 23;
Implementer at 0 range 24 .. 31;
end record;
subtype ICSR_VECTACTIVE_Field is STM32_SVD.UInt9;
subtype ICSR_RETTOBASE_Field is STM32_SVD.Bit;
subtype ICSR_VECTPENDING_Field is STM32_SVD.UInt7;
subtype ICSR_ISRPENDING_Field is STM32_SVD.Bit;
subtype ICSR_PENDSTCLR_Field is STM32_SVD.Bit;
subtype ICSR_PENDSTSET_Field is STM32_SVD.Bit;
subtype ICSR_PENDSVCLR_Field is STM32_SVD.Bit;
subtype ICSR_PENDSVSET_Field is STM32_SVD.Bit;
subtype ICSR_NMIPENDSET_Field is STM32_SVD.Bit;
-- Interrupt control and state register
type ICSR_Register is record
-- Active vector
VECTACTIVE : ICSR_VECTACTIVE_Field := 16#0#;
-- unspecified
Reserved_9_10 : STM32_SVD.UInt2 := 16#0#;
-- Return to base level
RETTOBASE : ICSR_RETTOBASE_Field := 16#0#;
-- Pending vector
VECTPENDING : ICSR_VECTPENDING_Field := 16#0#;
-- unspecified
Reserved_19_21 : STM32_SVD.UInt3 := 16#0#;
-- Interrupt pending flag
ISRPENDING : ICSR_ISRPENDING_Field := 16#0#;
-- unspecified
Reserved_23_24 : STM32_SVD.UInt2 := 16#0#;
-- SysTick exception clear-pending bit
PENDSTCLR : ICSR_PENDSTCLR_Field := 16#0#;
-- SysTick exception set-pending bit
PENDSTSET : ICSR_PENDSTSET_Field := 16#0#;
-- PendSV clear-pending bit
PENDSVCLR : ICSR_PENDSVCLR_Field := 16#0#;
-- PendSV set-pending bit
PENDSVSET : ICSR_PENDSVSET_Field := 16#0#;
-- unspecified
Reserved_29_30 : STM32_SVD.UInt2 := 16#0#;
-- NMI set-pending bit.
NMIPENDSET : ICSR_NMIPENDSET_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ICSR_Register use record
VECTACTIVE at 0 range 0 .. 8;
Reserved_9_10 at 0 range 9 .. 10;
RETTOBASE at 0 range 11 .. 11;
VECTPENDING at 0 range 12 .. 18;
Reserved_19_21 at 0 range 19 .. 21;
ISRPENDING at 0 range 22 .. 22;
Reserved_23_24 at 0 range 23 .. 24;
PENDSTCLR at 0 range 25 .. 25;
PENDSTSET at 0 range 26 .. 26;
PENDSVCLR at 0 range 27 .. 27;
PENDSVSET at 0 range 28 .. 28;
Reserved_29_30 at 0 range 29 .. 30;
NMIPENDSET at 0 range 31 .. 31;
end record;
subtype VTOR_TBLOFF_Field is STM32_SVD.UInt21;
-- Vector table offset register
type VTOR_Register is record
-- unspecified
Reserved_0_8 : STM32_SVD.UInt9 := 16#0#;
-- Vector table base offset field
TBLOFF : VTOR_TBLOFF_Field := 16#0#;
-- unspecified
Reserved_30_31 : STM32_SVD.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for VTOR_Register use record
Reserved_0_8 at 0 range 0 .. 8;
TBLOFF at 0 range 9 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype AIRCR_VECTRESET_Field is STM32_SVD.Bit;
subtype AIRCR_VECTCLRACTIVE_Field is STM32_SVD.Bit;
subtype AIRCR_SYSRESETREQ_Field is STM32_SVD.Bit;
subtype AIRCR_PRIGROUP_Field is STM32_SVD.UInt3;
subtype AIRCR_ENDIANESS_Field is STM32_SVD.Bit;
subtype AIRCR_VECTKEYSTAT_Field is STM32_SVD.UInt16;
-- Application interrupt and reset control register
type AIRCR_Register is record
-- VECTRESET
VECTRESET : AIRCR_VECTRESET_Field := 16#0#;
-- VECTCLRACTIVE
VECTCLRACTIVE : AIRCR_VECTCLRACTIVE_Field := 16#0#;
-- SYSRESETREQ
SYSRESETREQ : AIRCR_SYSRESETREQ_Field := 16#0#;
-- unspecified
Reserved_3_7 : STM32_SVD.UInt5 := 16#0#;
-- PRIGROUP
PRIGROUP : AIRCR_PRIGROUP_Field := 16#0#;
-- unspecified
Reserved_11_14 : STM32_SVD.UInt4 := 16#0#;
-- ENDIANESS
ENDIANESS : AIRCR_ENDIANESS_Field := 16#0#;
-- Register key
VECTKEYSTAT : AIRCR_VECTKEYSTAT_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for AIRCR_Register use record
VECTRESET at 0 range 0 .. 0;
VECTCLRACTIVE at 0 range 1 .. 1;
SYSRESETREQ at 0 range 2 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
PRIGROUP at 0 range 8 .. 10;
Reserved_11_14 at 0 range 11 .. 14;
ENDIANESS at 0 range 15 .. 15;
VECTKEYSTAT at 0 range 16 .. 31;
end record;
subtype SCR_SLEEPONEXIT_Field is STM32_SVD.Bit;
subtype SCR_SLEEPDEEP_Field is STM32_SVD.Bit;
subtype SCR_SEVEONPEND_Field is STM32_SVD.Bit;
-- System control register
type SCR_Register is record
-- unspecified
Reserved_0_0 : STM32_SVD.Bit := 16#0#;
-- SLEEPONEXIT
SLEEPONEXIT : SCR_SLEEPONEXIT_Field := 16#0#;
-- SLEEPDEEP
SLEEPDEEP : SCR_SLEEPDEEP_Field := 16#0#;
-- unspecified
Reserved_3_3 : STM32_SVD.Bit := 16#0#;
-- Send Event on Pending bit
SEVEONPEND : SCR_SEVEONPEND_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 SCR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
SLEEPONEXIT at 0 range 1 .. 1;
SLEEPDEEP at 0 range 2 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
SEVEONPEND at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
subtype CCR_NONBASETHRDENA_Field is STM32_SVD.Bit;
subtype CCR_USERSETMPEND_Field is STM32_SVD.Bit;
subtype CCR_UNALIGN_TRP_Field is STM32_SVD.Bit;
subtype CCR_DIV_0_TRP_Field is STM32_SVD.Bit;
subtype CCR_BFHFNMIGN_Field is STM32_SVD.Bit;
subtype CCR_STKALIGN_Field is STM32_SVD.Bit;
-- Configuration and control register
type CCR_Register is record
-- Configures how the processor enters Thread mode
NONBASETHRDENA : CCR_NONBASETHRDENA_Field := 16#0#;
-- USERSETMPEND
USERSETMPEND : CCR_USERSETMPEND_Field := 16#0#;
-- unspecified
Reserved_2_2 : STM32_SVD.Bit := 16#0#;
-- UNALIGN_ TRP
UNALIGN_TRP : CCR_UNALIGN_TRP_Field := 16#0#;
-- DIV_0_TRP
DIV_0_TRP : CCR_DIV_0_TRP_Field := 16#0#;
-- unspecified
Reserved_5_7 : STM32_SVD.UInt3 := 16#0#;
-- BFHFNMIGN
BFHFNMIGN : CCR_BFHFNMIGN_Field := 16#0#;
-- STKALIGN
STKALIGN : CCR_STKALIGN_Field := 16#0#;
-- unspecified
Reserved_10_31 : STM32_SVD.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCR_Register use record
NONBASETHRDENA at 0 range 0 .. 0;
USERSETMPEND at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
UNALIGN_TRP at 0 range 3 .. 3;
DIV_0_TRP at 0 range 4 .. 4;
Reserved_5_7 at 0 range 5 .. 7;
BFHFNMIGN at 0 range 8 .. 8;
STKALIGN at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype SHPR1_PRI_4_Field is STM32_SVD.Byte;
subtype SHPR1_PRI_5_Field is STM32_SVD.Byte;
subtype SHPR1_PRI_6_Field is STM32_SVD.Byte;
-- System handler priority registers
type SHPR1_Register is record
-- Priority of system handler 4
PRI_4 : SHPR1_PRI_4_Field := 16#0#;
-- Priority of system handler 5
PRI_5 : SHPR1_PRI_5_Field := 16#0#;
-- Priority of system handler 6
PRI_6 : SHPR1_PRI_6_Field := 16#0#;
-- unspecified
Reserved_24_31 : STM32_SVD.Byte := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SHPR1_Register use record
PRI_4 at 0 range 0 .. 7;
PRI_5 at 0 range 8 .. 15;
PRI_6 at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype SHPR2_PRI_11_Field is STM32_SVD.Byte;
-- System handler priority registers
type SHPR2_Register is record
-- unspecified
Reserved_0_23 : STM32_SVD.UInt24 := 16#0#;
-- Priority of system handler 11
PRI_11 : SHPR2_PRI_11_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SHPR2_Register use record
Reserved_0_23 at 0 range 0 .. 23;
PRI_11 at 0 range 24 .. 31;
end record;
subtype SHPR3_PRI_14_Field is STM32_SVD.Byte;
subtype SHPR3_PRI_15_Field is STM32_SVD.Byte;
-- System handler priority registers
type SHPR3_Register is record
-- unspecified
Reserved_0_15 : STM32_SVD.UInt16 := 16#0#;
-- Priority of system handler 14
PRI_14 : SHPR3_PRI_14_Field := 16#0#;
-- Priority of system handler 15
PRI_15 : SHPR3_PRI_15_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SHPR3_Register use record
Reserved_0_15 at 0 range 0 .. 15;
PRI_14 at 0 range 16 .. 23;
PRI_15 at 0 range 24 .. 31;
end record;
subtype SHCRS_MEMFAULTACT_Field is STM32_SVD.Bit;
subtype SHCRS_BUSFAULTACT_Field is STM32_SVD.Bit;
subtype SHCRS_USGFAULTACT_Field is STM32_SVD.Bit;
subtype SHCRS_SVCALLACT_Field is STM32_SVD.Bit;
subtype SHCRS_MONITORACT_Field is STM32_SVD.Bit;
subtype SHCRS_PENDSVACT_Field is STM32_SVD.Bit;
subtype SHCRS_SYSTICKACT_Field is STM32_SVD.Bit;
subtype SHCRS_USGFAULTPENDED_Field is STM32_SVD.Bit;
subtype SHCRS_MEMFAULTPENDED_Field is STM32_SVD.Bit;
subtype SHCRS_BUSFAULTPENDED_Field is STM32_SVD.Bit;
subtype SHCRS_SVCALLPENDED_Field is STM32_SVD.Bit;
subtype SHCRS_MEMFAULTENA_Field is STM32_SVD.Bit;
subtype SHCRS_BUSFAULTENA_Field is STM32_SVD.Bit;
subtype SHCRS_USGFAULTENA_Field is STM32_SVD.Bit;
-- System handler control and state register
type SHCRS_Register is record
-- Memory management fault exception active bit
MEMFAULTACT : SHCRS_MEMFAULTACT_Field := 16#0#;
-- Bus fault exception active bit
BUSFAULTACT : SHCRS_BUSFAULTACT_Field := 16#0#;
-- unspecified
Reserved_2_2 : STM32_SVD.Bit := 16#0#;
-- Usage fault exception active bit
USGFAULTACT : SHCRS_USGFAULTACT_Field := 16#0#;
-- unspecified
Reserved_4_6 : STM32_SVD.UInt3 := 16#0#;
-- SVC call active bit
SVCALLACT : SHCRS_SVCALLACT_Field := 16#0#;
-- Debug monitor active bit
MONITORACT : SHCRS_MONITORACT_Field := 16#0#;
-- unspecified
Reserved_9_9 : STM32_SVD.Bit := 16#0#;
-- PendSV exception active bit
PENDSVACT : SHCRS_PENDSVACT_Field := 16#0#;
-- SysTick exception active bit
SYSTICKACT : SHCRS_SYSTICKACT_Field := 16#0#;
-- Usage fault exception pending bit
USGFAULTPENDED : SHCRS_USGFAULTPENDED_Field := 16#0#;
-- Memory management fault exception pending bit
MEMFAULTPENDED : SHCRS_MEMFAULTPENDED_Field := 16#0#;
-- Bus fault exception pending bit
BUSFAULTPENDED : SHCRS_BUSFAULTPENDED_Field := 16#0#;
-- SVC call pending bit
SVCALLPENDED : SHCRS_SVCALLPENDED_Field := 16#0#;
-- Memory management fault enable bit
MEMFAULTENA : SHCRS_MEMFAULTENA_Field := 16#0#;
-- Bus fault enable bit
BUSFAULTENA : SHCRS_BUSFAULTENA_Field := 16#0#;
-- Usage fault enable bit
USGFAULTENA : SHCRS_USGFAULTENA_Field := 16#0#;
-- unspecified
Reserved_19_31 : STM32_SVD.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SHCRS_Register use record
MEMFAULTACT at 0 range 0 .. 0;
BUSFAULTACT at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
USGFAULTACT at 0 range 3 .. 3;
Reserved_4_6 at 0 range 4 .. 6;
SVCALLACT at 0 range 7 .. 7;
MONITORACT at 0 range 8 .. 8;
Reserved_9_9 at 0 range 9 .. 9;
PENDSVACT at 0 range 10 .. 10;
SYSTICKACT at 0 range 11 .. 11;
USGFAULTPENDED at 0 range 12 .. 12;
MEMFAULTPENDED at 0 range 13 .. 13;
BUSFAULTPENDED at 0 range 14 .. 14;
SVCALLPENDED at 0 range 15 .. 15;
MEMFAULTENA at 0 range 16 .. 16;
BUSFAULTENA at 0 range 17 .. 17;
USGFAULTENA at 0 range 18 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
subtype CFSR_UFSR_BFSR_MMFSR_IACCVIOL_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_DACCVIOL_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_MUNSTKERR_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_MSTKERR_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_MLSPERR_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_MMARVALID_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_IBUSERR_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_PRECISERR_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_IMPRECISERR_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_UNSTKERR_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_STKERR_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_LSPERR_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_BFARVALID_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_UNDEFINSTR_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_INVSTATE_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_INVPC_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_NOCP_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_UNALIGNED_Field is STM32_SVD.Bit;
subtype CFSR_UFSR_BFSR_MMFSR_DIVBYZERO_Field is STM32_SVD.Bit;
-- Configurable fault status register
type CFSR_UFSR_BFSR_MMFSR_Register is record
-- IACCVIOL
IACCVIOL : CFSR_UFSR_BFSR_MMFSR_IACCVIOL_Field := 16#0#;
-- DACCVIOL
DACCVIOL : CFSR_UFSR_BFSR_MMFSR_DACCVIOL_Field := 16#0#;
-- unspecified
Reserved_2_2 : STM32_SVD.Bit := 16#0#;
-- MUNSTKERR
MUNSTKERR : CFSR_UFSR_BFSR_MMFSR_MUNSTKERR_Field := 16#0#;
-- MSTKERR
MSTKERR : CFSR_UFSR_BFSR_MMFSR_MSTKERR_Field := 16#0#;
-- MLSPERR
MLSPERR : CFSR_UFSR_BFSR_MMFSR_MLSPERR_Field := 16#0#;
-- unspecified
Reserved_6_6 : STM32_SVD.Bit := 16#0#;
-- MMARVALID
MMARVALID : CFSR_UFSR_BFSR_MMFSR_MMARVALID_Field := 16#0#;
-- Instruction bus error
IBUSERR : CFSR_UFSR_BFSR_MMFSR_IBUSERR_Field := 16#0#;
-- Precise data bus error
PRECISERR : CFSR_UFSR_BFSR_MMFSR_PRECISERR_Field := 16#0#;
-- Imprecise data bus error
IMPRECISERR : CFSR_UFSR_BFSR_MMFSR_IMPRECISERR_Field := 16#0#;
-- Bus fault on unstacking for a return from exception
UNSTKERR : CFSR_UFSR_BFSR_MMFSR_UNSTKERR_Field := 16#0#;
-- Bus fault on stacking for exception entry
STKERR : CFSR_UFSR_BFSR_MMFSR_STKERR_Field := 16#0#;
-- Bus fault on floating-point lazy state preservation
LSPERR : CFSR_UFSR_BFSR_MMFSR_LSPERR_Field := 16#0#;
-- unspecified
Reserved_14_14 : STM32_SVD.Bit := 16#0#;
-- Bus Fault Address Register (BFAR) valid flag
BFARVALID : CFSR_UFSR_BFSR_MMFSR_BFARVALID_Field := 16#0#;
-- Undefined instruction usage fault
UNDEFINSTR : CFSR_UFSR_BFSR_MMFSR_UNDEFINSTR_Field := 16#0#;
-- Invalid state usage fault
INVSTATE : CFSR_UFSR_BFSR_MMFSR_INVSTATE_Field := 16#0#;
-- Invalid PC load usage fault
INVPC : CFSR_UFSR_BFSR_MMFSR_INVPC_Field := 16#0#;
-- No coprocessor usage fault.
NOCP : CFSR_UFSR_BFSR_MMFSR_NOCP_Field := 16#0#;
-- unspecified
Reserved_20_23 : STM32_SVD.UInt4 := 16#0#;
-- Unaligned access usage fault
UNALIGNED : CFSR_UFSR_BFSR_MMFSR_UNALIGNED_Field := 16#0#;
-- Divide by zero usage fault
DIVBYZERO : CFSR_UFSR_BFSR_MMFSR_DIVBYZERO_Field := 16#0#;
-- unspecified
Reserved_26_31 : STM32_SVD.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CFSR_UFSR_BFSR_MMFSR_Register use record
IACCVIOL at 0 range 0 .. 0;
DACCVIOL at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
MUNSTKERR at 0 range 3 .. 3;
MSTKERR at 0 range 4 .. 4;
MLSPERR at 0 range 5 .. 5;
Reserved_6_6 at 0 range 6 .. 6;
MMARVALID at 0 range 7 .. 7;
IBUSERR at 0 range 8 .. 8;
PRECISERR at 0 range 9 .. 9;
IMPRECISERR at 0 range 10 .. 10;
UNSTKERR at 0 range 11 .. 11;
STKERR at 0 range 12 .. 12;
LSPERR at 0 range 13 .. 13;
Reserved_14_14 at 0 range 14 .. 14;
BFARVALID at 0 range 15 .. 15;
UNDEFINSTR at 0 range 16 .. 16;
INVSTATE at 0 range 17 .. 17;
INVPC at 0 range 18 .. 18;
NOCP at 0 range 19 .. 19;
Reserved_20_23 at 0 range 20 .. 23;
UNALIGNED at 0 range 24 .. 24;
DIVBYZERO at 0 range 25 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
subtype HFSR_VECTTBL_Field is STM32_SVD.Bit;
subtype HFSR_FORCED_Field is STM32_SVD.Bit;
subtype HFSR_DEBUG_VT_Field is STM32_SVD.Bit;
-- Hard fault status register
type HFSR_Register is record
-- unspecified
Reserved_0_0 : STM32_SVD.Bit := 16#0#;
-- Vector table hard fault
VECTTBL : HFSR_VECTTBL_Field := 16#0#;
-- unspecified
Reserved_2_29 : STM32_SVD.UInt28 := 16#0#;
-- Forced hard fault
FORCED : HFSR_FORCED_Field := 16#0#;
-- Reserved for Debug use
DEBUG_VT : HFSR_DEBUG_VT_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for HFSR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
VECTTBL at 0 range 1 .. 1;
Reserved_2_29 at 0 range 2 .. 29;
FORCED at 0 range 30 .. 30;
DEBUG_VT at 0 range 31 .. 31;
end record;
subtype ACTRL_DISFOLD_Field is STM32_SVD.Bit;
subtype ACTRL_FPEXCODIS_Field is STM32_SVD.Bit;
subtype ACTRL_DISRAMODE_Field is STM32_SVD.Bit;
subtype ACTRL_DISITMATBFLUSH_Field is STM32_SVD.Bit;
-- Auxiliary control register
type ACTRL_Register is record
-- unspecified
Reserved_0_1 : STM32_SVD.UInt2 := 16#0#;
-- DISFOLD
DISFOLD : ACTRL_DISFOLD_Field := 16#0#;
-- unspecified
Reserved_3_9 : STM32_SVD.UInt7 := 16#0#;
-- FPEXCODIS
FPEXCODIS : ACTRL_FPEXCODIS_Field := 16#0#;
-- DISRAMODE
DISRAMODE : ACTRL_DISRAMODE_Field := 16#0#;
-- DISITMATBFLUSH
DISITMATBFLUSH : ACTRL_DISITMATBFLUSH_Field := 16#0#;
-- unspecified
Reserved_13_31 : STM32_SVD.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ACTRL_Register use record
Reserved_0_1 at 0 range 0 .. 1;
DISFOLD at 0 range 2 .. 2;
Reserved_3_9 at 0 range 3 .. 9;
FPEXCODIS at 0 range 10 .. 10;
DISRAMODE at 0 range 11 .. 11;
DISITMATBFLUSH at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- System control block
type SCB_Peripheral is record
-- CPUID base register
CPUID : aliased CPUID_Register;
-- Interrupt control and state register
ICSR : aliased ICSR_Register;
-- Vector table offset register
VTOR : aliased VTOR_Register;
-- Application interrupt and reset control register
AIRCR : aliased AIRCR_Register;
-- System control register
SCR : aliased SCR_Register;
-- Configuration and control register
CCR : aliased CCR_Register;
-- System handler priority registers
SHPR1 : aliased SHPR1_Register;
-- System handler priority registers
SHPR2 : aliased SHPR2_Register;
-- System handler priority registers
SHPR3 : aliased SHPR3_Register;
-- System handler control and state register
SHCRS : aliased SHCRS_Register;
-- Configurable fault status register
CFSR_UFSR_BFSR_MMFSR : aliased CFSR_UFSR_BFSR_MMFSR_Register;
-- Hard fault status register
HFSR : aliased HFSR_Register;
-- Memory management fault address register
MMFAR : aliased STM32_SVD.UInt32;
-- Bus fault address register
BFAR : aliased STM32_SVD.UInt32;
end record
with Volatile;
for SCB_Peripheral use record
CPUID at 16#0# range 0 .. 31;
ICSR at 16#4# range 0 .. 31;
VTOR at 16#8# range 0 .. 31;
AIRCR at 16#C# range 0 .. 31;
SCR at 16#10# range 0 .. 31;
CCR at 16#14# range 0 .. 31;
SHPR1 at 16#18# range 0 .. 31;
SHPR2 at 16#1C# range 0 .. 31;
SHPR3 at 16#20# range 0 .. 31;
SHCRS at 16#24# range 0 .. 31;
CFSR_UFSR_BFSR_MMFSR at 16#28# range 0 .. 31;
HFSR at 16#2C# range 0 .. 31;
MMFAR at 16#34# range 0 .. 31;
BFAR at 16#38# range 0 .. 31;
end record;
-- System control block
SCB_Periph : aliased SCB_Peripheral
with Import, Address => System'To_Address (16#E000ED00#);
-- System control block ACTLR
type SCB_ACTRL_Peripheral is record
-- Auxiliary control register
ACTRL : aliased ACTRL_Register;
end record
with Volatile;
for SCB_ACTRL_Peripheral use record
ACTRL at 0 range 0 .. 31;
end record;
-- System control block ACTLR
SCB_ACTRL_Periph : aliased SCB_ACTRL_Peripheral
with Import, Address => System'To_Address (16#E000E008#);
end STM32_SVD.SCB;
| 38.523501 | 71 | 0.635786 |
4a8d83c7612ea382e01a459aa0240991b5921a92 | 2,926 | ads | Ada | demo/adainclude/s-fatllf.ads | e3l6/SSMDev | 2929757aab3842aefd84debb2d7c3e8b28c2b340 | [
"MIT"
] | 12 | 2017-06-08T14:19:57.000Z | 2022-03-09T02:48:59.000Z | demo/adainclude/s-fatllf.ads | e3l6/SSMDev | 2929757aab3842aefd84debb2d7c3e8b28c2b340 | [
"MIT"
] | 6 | 2017-06-08T13:13:50.000Z | 2020-05-15T09:32:43.000Z | demo/adainclude/s-fatllf.ads | e3l6/SSMDev | 2929757aab3842aefd84debb2d7c3e8b28c2b340 | [
"MIT"
] | 3 | 2017-06-30T14:05:06.000Z | 2022-02-17T12:20:45.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . F A T _ L L F --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- 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 an instantiation of the floating-point attribute
-- runtime routines for the type Long_Long_Float.
with System.Fat_Gen;
package System.Fat_LLF is
pragma Pure;
-- Note the only entity from this package that is accessed by Rtsfind
-- is the name of the package instantiation. Entities within this package
-- (i.e. the individual floating-point attribute routines) are accessed
-- by name using selected notation.
package Attr_Long_Long_Float is new System.Fat_Gen (Long_Long_Float);
end System.Fat_LLF;
| 60.958333 | 78 | 0.383459 |
104a588bc9a7b35f0f25cca73b0ba1c36e56d6f7 | 1,624 | ads | Ada | tier-1/xcb/source/thin/xcb-xcb_change_keyboard_control_request_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 2 | 2015-11-12T11:16:20.000Z | 2021-08-24T22:32:04.000Z | tier-1/xcb/source/thin/xcb-xcb_change_keyboard_control_request_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 1 | 2018-06-05T05:19:35.000Z | 2021-11-20T01:13:23.000Z | tier-1/xcb/source/thin/xcb-xcb_change_keyboard_control_request_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | null | null | null | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_change_keyboard_control_request_t is
-- Item
--
type Item is record
major_opcode : aliased Interfaces.Unsigned_8;
pad0 : aliased Interfaces.Unsigned_8;
length : aliased Interfaces.Unsigned_16;
value_mask : aliased Interfaces.Unsigned_32;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_change_keyboard_control_request_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_change_keyboard_control_request_t.Item,
Element_Array => xcb.xcb_change_keyboard_control_request_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_change_keyboard_control_request_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_change_keyboard_control_request_t.Pointer,
Element_Array => xcb.xcb_change_keyboard_control_request_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_change_keyboard_control_request_t;
| 28 | 79 | 0.678571 |
dfabe1b103f2eb3d5d24dff3a45a2e9101ea4388 | 1,569 | adb | Ada | source/lexer/program-scanners-on_accept.adb | reznikmm/gela | 20134f1d154fb763812e73860c6f4b04f353df79 | [
"MIT"
] | null | null | null | source/lexer/program-scanners-on_accept.adb | reznikmm/gela | 20134f1d154fb763812e73860c6f4b04f353df79 | [
"MIT"
] | null | null | null | source/lexer/program-scanners-on_accept.adb | reznikmm/gela | 20134f1d154fb763812e73860c6f4b04f353df79 | [
"MIT"
] | 1 | 2019-10-16T09:05:27.000Z | 2019-10-16T09:05:27.000Z | -- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
separate (Program.Scanners)
procedure On_Accept
(Self : not null access Program.Scanned_Rule_Handlers.Handler'Class;
Scanner : not null access Program.Scanners.Scanner'Class;
Rule : Program.Scanner_States.Rule_Index;
Token : out Program.Scanner_Destinations.Token_Kind;
Skip : in out Boolean) is
begin
case Rule is
when 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
| 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20
| 21 | 22 | 23 | 24 | 25 | 26 | 27 =>
Self.Delimiter (Scanner, Rule, Token, Skip);
when 28 =>
Self.Identifier (Scanner, Rule, Token, Skip);
when 29 =>
Self.Numeric_Literal (Scanner, Rule, Token, Skip);
when 30 =>
Self.Obsolescent_Numeric_Literal (Scanner, Rule, Token, Skip);
when 31 =>
Self.Character_Literal (Scanner, Rule, Token, Skip);
when 32 =>
Self.String_Literal (Scanner, Rule, Token, Skip);
when 33 =>
Self.Obsolescent_String_Literal (Scanner, Rule, Token, Skip);
when 34 =>
Self.Comment (Scanner, Rule, Token, Skip);
when 35 =>
Self.Space (Scanner, Rule, Token, Skip);
when 36 =>
Self.New_Line (Scanner, Rule, Token, Skip);
when 37 | 38 =>
Self.Error (Scanner, Rule, Token, Skip);
when others =>
raise Constraint_Error;
end case;
end On_Accept;
| 29.055556 | 73 | 0.573614 |
cb5023844a5ab7075d27161026038b238f7d9423 | 778 | adb | Ada | tests/notcurses_test.adb | JeremyGrosser/notcursesada | 01c895ffe6b27069aaeca842bd6d01b27aead011 | [
"Apache-2.0"
] | 5 | 2021-05-14T10:02:36.000Z | 2021-11-03T18:53:58.000Z | tests/notcurses_test.adb | JeremyGrosser/notcursesada | 01c895ffe6b27069aaeca842bd6d01b27aead011 | [
"Apache-2.0"
] | null | null | null | tests/notcurses_test.adb | JeremyGrosser/notcursesada | 01c895ffe6b27069aaeca842bd6d01b27aead011 | [
"Apache-2.0"
] | null | null | null | --
-- Copyright 2021 (C) Jeremy Grosser <jeremy@synack.me>
--
-- SPDX-License-Identifier: Apache-2.0
--
with Ada.Exceptions;
with Ada.Text_IO;
with Tests; use Tests;
with Notcurses.Context;
with Notcurses;
procedure Notcurses_Test is
begin
begin
Notcurses.Context.Initialize;
Test_Version;
Test_Hello_World;
Test_Colors;
Test_Palette;
Test_Dimensions;
Test_Plane_Split;
Test_Progress_Bar;
Test_Visual_File;
Test_Visual_Bitmap;
Test_Visual_Pixel;
-- Test_Input;
Notcurses.Context.Stop;
exception
when E : others =>
Notcurses.Context.Stop;
Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E));
return;
end;
Test_Direct;
end Notcurses_Test;
| 20.473684 | 73 | 0.670951 |
cb26512c391ee5ff0dc88670839721a1cdc7abaf | 3,974 | adb | Ada | tests/tzheevd.adb | leo-brewin/ada-lapack | defd2051452480998b59cfdbe94d3219ae786746 | [
"MIT"
] | 5 | 2021-01-07T17:32:57.000Z | 2022-02-24T18:48:56.000Z | tests/tzheevd.adb | leo-brewin/ada-lapack | defd2051452480998b59cfdbe94d3219ae786746 | [
"MIT"
] | null | null | null | tests/tzheevd.adb | leo-brewin/ada-lapack | defd2051452480998b59cfdbe94d3219ae786746 | [
"MIT"
] | null | null | null | with Ada.Text_IO;
with Ada.Text_IO.Complex_IO;
with Ada.Numerics.Generic_Real_Arrays;
with Ada.Numerics.Generic_Complex_Types;
with Ada.Numerics.Generic_Complex_Arrays;
with Ada.Numerics.Generic_Elementary_Functions;
with Ada.Numerics.Generic_Complex_Elementary_Functions;
with Ada_Lapack;
use Ada.Text_IO;
procedure tzheevd is
type Real is digits 18;
package Real_Arrays is new Ada.Numerics.Generic_Real_Arrays (Real);
package Complex_Types is new Ada.Numerics.Generic_Complex_Types (Real);
package Complex_Arrays is new Ada.Numerics.Generic_Complex_Arrays (Real_Arrays, Complex_Types);
package Real_Maths is new Ada.Numerics.Generic_Elementary_Functions (Real);
package Complex_Maths is new Ada.Numerics.Generic_Complex_Elementary_Functions (Complex_Types);
package Real_IO is new Ada.Text_IO.Float_IO (Real);
package Integer_IO is new Ada.Text_IO.Integer_IO (Integer);
package Complex_IO is new Ada.Text_IO.Complex_IO (Complex_Types);
package Lapack is new Ada_Lapack(Real, Complex_Types, Real_Arrays, Complex_Arrays);
use Lapack;
use Real_Arrays;
use Complex_Types;
use Complex_Arrays;
use Real_IO;
use Integer_IO;
use Complex_IO;
use Real_Maths;
use Complex_Maths;
matrix : Complex_Matrix (1..4,1..4);
matrix_rows : Integer := Matrix'Length (1);
matrix_cols : Integer := Matrix'Length (2);
eigenvalues : Real_Vector (1..matrix_rows);
eigenvalues_rows : Integer := matrix_rows;
short_complex_vector : Complex_Vector (1..1);
short_real_vector : Real_Vector (1..1);
short_intg_vector : Integer_Vector (1..1);
return_code : Integer;
begin
matrix:= (( ( 3.40, 0.00), ( -2.36, -1.93), ( -4.68, 9.55), ( 5.37, -1.23) ),
( ( -2.36, 1.93), ( 6.94, 0.00), ( 8.13, -1.47), ( 2.07, -5.78) ),
( ( -4.68, -9.55), ( 8.13, 1.47), ( -2.14, 0.00), ( 4.68, 7.44) ),
( ( 5.37, 1.23), ( 2.07, 5.78), ( 4.68, -7.44), ( -7.42, 0.00) ));
HEEVD ( JOBZ => 'V',
UPLO => 'L',
A => matrix,
N => matrix_cols,
LDA => matrix_rows,
W => eigenvalues,
WORK => short_complex_vector,
LWORK => -1,
RWORK => short_real_vector,
LRWORK => -1,
IWORK => short_intg_vector,
LIWORK => -1,
INFO => return_code );
declare
complex_work_max : Constant Integer := Integer( short_complex_vector(1).Re );
real_work_max : Constant Integer := Integer( short_real_vector(1) );
intg_work_max : Constant Integer := short_intg_vector(1);
complex_work : Complex_Vector (1 .. complex_work_max);
real_work : Real_Vector (1 .. real_work_max);
intg_work : Integer_Vector (1 .. intg_work_max);
begin
HEEVD ( JOBZ => 'V',
UPLO => 'L',
A => matrix,
N => matrix_cols,
LDA => matrix_rows,
W => eigenvalues,
WORK => complex_work,
LWORK => complex_work_max,
RWORK => real_work,
LRWORK => real_work_max,
IWORK => intg_work,
LIWORK => intg_work_max,
INFO => return_code );
end;
if (return_code /= 0) then
Put ("ZHEEVD failed, the return code was : ");
Put ( return_code );
New_line;
else
Put_line("The eigenvalues");
for i in eigenvalues'range loop
put(eigenvalues(i),3,4,0);
put(" ");
end loop;
new_line;
new_line;
Put_line("The eigenvectors");
for i in 1..matrix_rows loop
for j in 1..matrix_cols loop
put(matrix(i,j),3,4,0);
put(" ");
end loop;
new_line;
end loop;
end if;
end tzheevd;
| 30.806202 | 100 | 0.574987 |
1819e524033f2b98c4391591729e67f45dd253a5 | 1,674 | ads | Ada | 1-base/lace/source/events/utility/lace-event-utility.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | 1 | 2022-01-20T07:13:42.000Z | 2022-01-20T07:13:42.000Z | 1-base/lace/source/events/utility/lace-event-utility.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | 1-base/lace/source/events/utility/lace-event-utility.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | with
lace.Observer,
lace.Subject,
lace.Response,
lace.Event.Logger,
ada.Tags;
package lace.Event.utility
--
-- Provides convenience subprograms for working with events.
--
is
--------------
-- Event Kinds
--
function Name_of (Kind : in Event.Kind) return String;
function to_Kind (From : in ada.Tags.Tag) return Event.Kind;
function "+" (From : in ada.Tags.Tag) return Event.Kind
renames to_Kind;
---------
-- Events
--
function Name_of (the_Event : in Event.item'Class) return String;
function Kind_of (the_Event : in Event.item'Class) return Event.Kind;
--------------
-- Connections
--
procedure connect (the_Observer : in Observer.view;
to_Subject : in Subject .view;
with_Response : in Response.view;
to_Event_Kind : in Event.Kind);
procedure disconnect (the_Observer : in Observer.view;
from_Subject : in Subject .view;
for_Response : in Response.view;
to_Event_Kind : in Event.Kind;
subject_Name : in String);
----------
-- Logging
--
procedure use_text_Logger (log_Filename : in String);
--
-- Requests activation of the default text file logger.
function Logger return lace.Event.Logger.view;
--
-- Returns the Logger currently in use.
-- Returns null, if no Logger is in use.
--------------
-- Termination
--
procedure close;
--
-- Ensures any registered event logger is destroyed.
end lace.Event.utility;
| 23.25 | 72 | 0.564516 |
0e226833997442b2e48f46c004ae539541d43e38 | 673 | adb | Ada | examples/ada-runtime/compute.adb | Ureir/pok | 1f9e357e3f66caf56354d186c5f96f296b158ba5 | [
"BSD-2-Clause"
] | null | null | null | examples/ada-runtime/compute.adb | Ureir/pok | 1f9e357e3f66caf56354d186c5f96f296b158ba5 | [
"BSD-2-Clause"
] | null | null | null | examples/ada-runtime/compute.adb | Ureir/pok | 1f9e357e3f66caf56354d186c5f96f296b158ba5 | [
"BSD-2-Clause"
] | null | null | null | -- POK header
--
-- The following file is a part of the POK project. Any modification should
-- be made according to the POK licence. You CANNOT use this file or a part
-- of a file for your own project.
--
-- For more information on the POK licence, please see our LICENCE FILE
--
-- Please follow the coding guidelines described in doc/CODING_GUIDELINES
--
-- Copyright (c) 2007-2022 POK team
package body Compute is
procedure Printf (String : in Interfaces.C.char_array);
pragma Import (C, Printf, "printf");
procedure Compute is
begin
Printf ("beep ");
end Compute;
end Compute;
| 30.590909 | 75 | 0.644874 |
dc611e8c75a3c952523f7ffde30184f734b69fec | 9,421 | adb | Ada | main.adb | twinbee/lamportsBakery | 19ce67e9e2ea36d34039625997e9131214b37c02 | [
"MIT"
] | null | null | null | main.adb | twinbee/lamportsBakery | 19ce67e9e2ea36d34039625997e9131214b37c02 | [
"MIT"
] | null | null | null | main.adb | twinbee/lamportsBakery | 19ce67e9e2ea36d34039625997e9131214b37c02 | [
"MIT"
] | null | null | null | ----------------------------csc410/prog5/as5.adb----------------------------
-- Author: Matthew Bennett
-- Class: CSC410 Burgess
-- Date: 11-01-04 Modified: 11-15-04
-- Due: 11-16-04
-- Desc: Assignment 5: LAMPORT'S ALGORITHM FOR VIRTUAL TOPOLOGY NETWORKS
--
-- a nonproduction implementation of
-- LAMPORT's "bakery" algorithm which utilizes clocks (a 'ticketing' system
-- like IN the bakery or at the dept of motor vehicles) to determine which
-- process may go into the critical section next.
--
-- LAMPORT implemented as described IN
-- "Algorithms FOR Mutual Exclusion", M. Raynal
-- MIT PRESS Cambridge, 1986 ISBN: 0-262-18119-3
-- with additional revisions due to message passing across a virtual topology
----------------------------------------------------------------------------
----------------------------------------------------------------
-- dependencies
WITH ADA.TEXT_IO; USE ADA.TEXT_IO;
WITH ADA.INTEGER_TEXT_IO; USE ADA.INTEGER_TEXT_IO;
WITH ADA.NUMERICS.FLOAT_RANDOM; USE ADA.NUMERICS.FLOAT_RANDOM;
WITH ADA.CALENDAR; -- (provides cast: natural -> time FOR input into delay)
WITH ADA.STRINGS; USE ADA.STRINGS;
WITH ADA.STRINGS.UNBOUNDED; USE ADA.STRINGS.UNBOUNDED;
PROCEDURE Main IS
--GLOBALS VARS: randomPool, taskarray, go, stop
randomPool : ADA.NUMERICS.FLOAT_RANDOM.GENERATOR;
--random number pool FOR generating
go, stop: Boolean := FALSE; --allow FOR graceful execution and termination
TYPE MESG IS (REQ, ACK, REL);
PACKAGE MESG_IO IS NEW Enumeration_IO(MESG); USE MESG_IO;
--so that we can natively output enumerated type
MAX_NEIGHBORS : CONSTANT := 30;
--maximum number of neighbors, FOR efficiency IN array passing
-- 1/2 of this num is the same as euler # FOR a graph
MAX_TASKS : CONSTANT := 20;
--maximum number of neighbors, FOR efficiency IN array passing
TYPE type_message IS (REQ, ACK, REL); --request, acknowledge, release
PACKAGE ENUM_IO IS NEW Enumeration_IO(type_message); Use ENUM_IO;
--allow input and output of our enumerated names
TYPE RX_TASK;
TYPE RX_Ptr IS ACCESS RX_TASK;
--forward declaration needed FOR access type to RX_TASK FOR array of access es
TYPE passableArray IS ARRAY (0..MAX_NEIGHBORS) OF Integer;
--this is needed bc anonymous types are not allowed IN declarations
--specifically, so that we can pass arrays around between entries as arguments
taskArray : ARRAY (0..MAX_NEIGHBORS) OF RX_Ptr;
--keep up with tasks thrown off
-- Receive/listener task
TASK TYPE RX_TASK IS
ENTRY Start( id_IN : IN Integer; Neighbors_IN : IN passableArray);
--initialize variables
ENTRY FWD(dest: Integer; msg: type_message; k: Integer; j: Integer);
--method used to propogate messages through the network until dest = self
ENTRY kill;
--kill off the task, politely ask it to die
ENTRY REQUEST;
ENTRY ACKNOWLEDGE;
ENTRY RELEASE;
END RX_TASK;
-- BEGIN Receive TASK Definition --
TASK BODY RX_TASK IS
TYPE message IS
RECORD
mestype: type_message := rel;
clock: Integer := 0;
id: Integer;
END RECORD;
queue: ARRAY (0 .. MAX_TASKS) OF message;
--the distributed queue of messages
Neighbors : passableArray;
--keeps track of who task can send to, receive from
id : Integer;
--self identification
outp : Unbounded_String := Null_Unbounded_String;
--temporary string variable FOR uninterrupted output
friends : ARRAY(0..MAX_NEIGHBORS) OF RX_PTR;
--used FOR calling on receiver tasks
osn, tempOSN : Integer := 0;
--"own sequence number", Lamport clock FOR task
temp1, temp2: message;
FOR_all: boolean := TRUE;
dead: boolean := FALSE;
--temporary variables
TASK TYPE TX_TASK (
--seperate task, so it can be spawned any time!
dest: Integer; --destination IN network
mess: MESG; --the message itself
clock: Integer; --the sequence number of the sending process
i: Integer --sending process id #
)
IS --seperate task, so we can spawn a send -whenever- asynchronously
--ge that was short
END TX_TASK;
TYPE TX_PTR IS ACCESS TX_TASK;
myTX : TX_PTR; --so we can launch transmit task anytime
TASK BODY TX_TASK IS
BEGIN
null;
END TX_TASK; --definition
TASK TYPE AL_TASK
--gee, that was short
IS END AL_TASK;
--internal task, FOR lamport's algorithm
TASK BODY AL_TASK IS
BEGIN
LOOP
FOR index IN 0 .. MAX_NEIGHBORS LOOP
queue(index).id := index;
END LOOP;
EXIT WHEN (go);
END LOOP;
--intitialize the queue so that each element stores the proper process id
LOOP
--broadcast
FOR I IN 0..n
LOOP
IF(I /= id)THEN tsk_TX := new transmit(I, req, local_clock, id); END IF;
END LOOP;
q(id) := (req, local_clock, id);
osn := osn + 1;
tempOSN := osn;
wait:
LOOP
FOR j IN 0..n
LOOP
IF j /= id THEN
IF((q(id).clock < q(j).clock)
OR ((q(id).clock = q(j).clock) AND (q(id).id < q(j).id)))
THEN null;
ELSE FOR_all := FALSE;
END IF;
END IF;
END LOOP;
EXIT wait WHEN (FOR_all = TRUE);
FOR_all := TRUE;
END LOOP wait;
EXIT WHEN dead = TRUE;
outp := (((80/6)*id) * " ") & Integer'Image(id) & " IN CS.";
Put(To_String(outp)); New_line;
delay Duration(float(random(G)) + float(10));
st := (((80/(n+1))*id) * " ") & Integer'Image(id) & " out CS.";
Put_line(To_String(st));
-- broadcast
local_clock := osn;
FOR I IN 0..n
LOOP
IF(I /= id)THEN
tsk_TX := new transmit(I, rel, local_clock, id);
END IF;
END LOOP;
q(id) := (rel, local_clock, id);
osn := osn + 1;
local_clock := osn;
EXIT WHEN dead = TRUE;
END LOOP;
END AL_TASK;
TYPE AL_Ptr IS ACCESS AL_TASK;
aPtr : AL_Ptr;
--END of internal task, FOR lamport's algorithm
-- beginnig of RX_TASK definition
BEGIN
-- ACCEPT creation messages --
ACCEPT Start (
id_IN : IN Integer;
Neighbors_IN : IN passableArray
)
DO
--initialize neighbors array
FOR I IN Neighbors'First .. Neighbors'Last
LOOP
Neighbors(I) := Neighbors_IN(I);
END LOOP;
id := id_IN;
END Start;
ACCEPT KILL
DO
null;
END KILL;
ACCEPT FWD(dest: Integer; msg: type_message; k: Integer; j: Integer)
DO
null;
END FWD;
SELECT
ACCEPT REQUEST
DO
null;
END REQUEST;
ACCEPT ACKNOWLEDGE --acknkowledge
DO
null;
END ACKNOWLEDGE;
ACCEPT RELEASE
DO
null;
END RELEASE;
END SELECT;
-- RX_TASK definition
aPtr := new AL_TASK; -- spin off lamport task
-- Start Message Receiving LOOP --
--LOOP
null;
--END LOOP; -- RX LOOP
END RX_TASK;
PROCEDURE Driver IS
seedUser : Integer;
--user input random seed FOR random number generator
infile : FILE_TYPE;
--ada.standard.textIO type FOR reading ascii and iso-8XXX
filename : string(1..5);
--what file should we read from?
--Following are variables FOR building logical network topologies
taskId : Integer;
--temporary FOR keeping track of which task we are reading IN
neighbors : passableArray;
--array of neighbors to be passed into a node upon initialization
neighborCount : Integer;
--temporary to keep up with number of neighbors FOR a certain task/node
--killing time variables
toKill : Integer;
--assigned a random ID to determine which process to kill next
dead : ARRAY (0..MAX_TASKS) of Boolean := (Others => FALSE);
--keeps track of which processes have been slain, so we dont try to kill a
--process twice , which would raise an exception
BEGIN
put_line("Lamport's Algorithm");
put("# random seed: ");
get(seedUser); --to ensure a significantly random series, a seed is needed
-- to generate pseudo-random numbers
Ada.Numerics.Float_Random.Reset(randomPool,seedUser);
--seed the random number pool
put("Filename: ");
get(filename);
--first lets read IN the
Open (File=> inFile, Mode => IN_FILE, Name => filename);
--open as read only ascii and use reference infile
--file format is: nodeID neighbor neighbor neighbor...neighbor[MAX_NEIGHBORS]
WHILE NOT END_OF_FILE(infile)
LOOP
neighborCount := 0;
--receive file input
Get(infile, TASKId);
WHILE NOT END_OF_LINE(infile) --there is routing information on the line
LOOP
Get(infile, neighbors(neighborCount) );
neighborCount := neighborCount + 1;
END LOOP;
--we can have one tight LOOP now since this time
-- all neighbors are known ahead of time
--create and initialize part FOR nodes/tasks
taskArray(TASKId) := new RX_TASK;
taskArray(TASKId).start(taskId, neighbors);
END LOOP; --END of file reading LOOP
go := TRUE;
-- DELAY Duration(60.0); --allow things to run 1 minute before doom
Put("Number of tasks: "); Put (taskID); new_line;
--kill off random processes
FOR kill_index IN 0 .. (TaskID) --FOR as many as there are tasks
LOOP
delay (1.0);
Put ("Going to kill random process ... ");
toKill := (Integer(random(randomPool)) MOD TaskID);
WHILE (dead(toKill))
LOOP --iterate until process toKill isn't one that is already dead!
toKill := toKill + 1 MOD TaskID; --random didnt cut it, try the next one
END LOOP;
Put (toKill); new_line;
taskArray(toKill).kill; --kill off our random process
dead(toKill) := TRUE;
END LOOP; --END LOOP to kill out all processes
stop := TRUE;
Close(infile);
EXCEPTION
WHEN Name_Error =>
Put(Item => "File not found.");
WHEN Status_Error =>
Put(Item => "File already open.");
WHEN Use_Error =>
Put(Item => "You lack permission to open file");
-- WHEN constraint_Error =>
-- Put(Item => "problem IN code! constraint error thrown");
END Driver;
BEGIN Driver; END Main; --seperation of global vars
| 24.727034 | 79 | 0.686551 |
233b8642a040fa98cea72c2291699739b01317c8 | 5,770 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce3704d.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce3704d.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce3704d.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- CE3704D.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 INTEGER_IO GET READS AT MOST WIDTH CHARACTERS
-- OR UP TO THE NEXT TERMINATOR; INCLUDING LEADING BLANKS
-- AND HORIZONTAL TABULATION CHARACTERS, WHEN WIDTH IS
-- NONZERO.
-- CHECK THAT INPUT TERMINATES WHEN A LINE TERMINATOR IS
-- ENCOUNTERED AND THAT DATA_ERROR IS RAISED IF THE DATA
-- READ IS INVALID.
-- APPLICABILITY CRITERIA:
-- THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH
-- SUPPORT TEXT FILES.
-- HISTORY:
-- SPS 10/04/82
-- VKG 01/12/83
-- SPS 02/08/83
-- JBG 02/22/84 CHANGED TO .ADA TEST
-- RJW 11/04/86 REVISED TEST TO OUTPUT A NON_APPLICABLE
-- RESULT WHEN FILES ARE NOT SUPPORTED.
-- DWC 09/09/87 ADDED CASES FOR TABS, REMOVED UNNECESSARY
-- CODE, AND CHECKED FOR USE_ERROR ON DELETE.
WITH REPORT; USE REPORT;
WITH TEXT_IO; USE TEXT_IO;
PROCEDURE CE3704D IS
INCOMPLETE : EXCEPTION;
BEGIN
TEST ("CE3704D", "CHECK THAT INTEGER_IO GET READS AT MOST " &
"WIDTH CHARACTERS OR UP TO THE NEXT " &
"TERMINATOR; INCLUDING LEADING BLANKS AND " &
"HORIZONTAL TABULATION CHARACTERS, WHEN WIDTH " &
"IS NONZERO");
DECLARE
FT : FILE_TYPE;
X : INTEGER;
PACKAGE IIO IS NEW INTEGER_IO (INTEGER);
USE IIO;
BEGIN
-- CREATE AND INITIALIZE FILE
BEGIN
CREATE (FT, OUT_FILE, LEGAL_FILE_NAME);
EXCEPTION
WHEN USE_ERROR =>
NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
"WITH OUT_FILE MODE");
RAISE INCOMPLETE;
WHEN NAME_ERROR =>
NOT_APPLICABLE ("NAME_ERROR RAISED; TEXT CREATE " &
"WITH OUT_FILE MODE");
RAISE INCOMPLETE;
END;
PUT (FT, " 123");
NEW_LINE (FT);
PUT (FT, "-5678");
NEW_LINE (FT);
PUT (FT, " ");
NEW_PAGE (FT);
PUT (FT, ASCII.HT & "9");
NEW_PAGE (FT);
CLOSE (FT);
BEGIN
OPEN (FT, IN_FILE, LEGAL_FILE_NAME);
EXCEPTION
WHEN USE_ERROR =>
NOT_APPLICABLE ("USE_ERROR RAISED; TEXT OPEN " &
"WITH IN_FILE MODE");
RAISE INCOMPLETE;
END;
-- BEGIN TEST
GET (FT, X, 5);
IF X /= IDENT_INT (123) THEN
FAILED ("WIDTH CHARACTERS NOT READ - 1");
ELSE
BEGIN
GET (FT, X, 2);
FAILED ("DATA_ERROR NOT RAISED - 1");
EXCEPTION
WHEN DATA_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED -1");
END;
SKIP_LINE (FT);
GET (FT, X, 6);
IF X /= IDENT_INT (-5678) THEN
FAILED ("GET WITH WIDTH " &
"INCORRECT - 2");
ELSE
BEGIN
GET (FT, X, 2);
FAILED ("DATA_ERROR NOT RAISED - 2");
EXCEPTION
WHEN DATA_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - 2");
END;
SKIP_LINE(FT);
BEGIN
GET (FT, X, 2);
FAILED ("DATA_ERROR NOT RAISED - 3");
EXCEPTION
WHEN DATA_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - 3");
END;
SKIP_LINE(FT);
GET (FT, X, 2);
IF X /= IDENT_INT (9) THEN
FAILED ("GET WITH WIDTH " &
"INCORRECT - 3");
END IF;
END IF;
END IF;
BEGIN
DELETE (FT);
EXCEPTION
WHEN USE_ERROR =>
NULL;
END;
EXCEPTION
WHEN INCOMPLETE =>
NULL;
END;
RESULT;
END CE3704D;
| 33.941176 | 79 | 0.482496 |
104180fef50cf77ec24f88baf93fb06a403fbeff | 98 | adb | Ada | showroom/ada.adb | 50m-regent/HelloWorldExhibition | 068b23f7e5d2c21fbaec932d31e40cc1d1a48180 | [
"MIT"
] | null | null | null | showroom/ada.adb | 50m-regent/HelloWorldExhibition | 068b23f7e5d2c21fbaec932d31e40cc1d1a48180 | [
"MIT"
] | null | null | null | showroom/ada.adb | 50m-regent/HelloWorldExhibition | 068b23f7e5d2c21fbaec932d31e40cc1d1a48180 | [
"MIT"
] | null | null | null | with Ada.Text_IO;
procedure Prologue is
begin
Ada.Text_IO.Put("Hello World!");
end Prologue; | 14 | 36 | 0.734694 |
cb0f471e3e0127da5a7e5ad2917bc589d6e2a509 | 7,488 | ads | Ada | source/web/tools/wsdl2ada/wsdl-ast-faults.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/web/tools/wsdl2ada/wsdl-ast-faults.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/web/tools/wsdl2ada/wsdl-ast-faults.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Tools Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 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$
------------------------------------------------------------------------------
package WSDL.AST.Faults is
pragma Preelaborate;
---------------------
-- Interface Fault --
---------------------
type Interface_Fault_Node is new Abstract_Node with record
Local_Name : League.Strings.Universal_String;
-- Local name part of the name of the fault.
Parent : Interface_Access;
-- Value of {parent} property.
Message_Content_Model : WSDL.AST.Message_Content_Models;
-- Value of {message content model} property.
Element : WSDL.AST.Qualified_Name;
-- Name of the element which is used as content of the fault.
end record;
overriding procedure Enter
(Self : not null access Interface_Fault_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
overriding procedure Leave
(Self : not null access Interface_Fault_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
overriding procedure Visit
(Self : not null access Interface_Fault_Node;
Iterator : in out WSDL.Iterators.WSDL_Iterator'Class;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
-------------------------------
-- Interface Fault Reference --
-------------------------------
type Interface_Fault_Reference_Node is new Abstract_Node with record
Interface_Fault_Name : Qualified_Name;
-- QName of referenced interface fault component.
Interface_Fault : WSDL.AST.Interface_Fault_Access;
-- Value of {interface fault} property.
Parent : WSDL.AST.Interface_Operation_Access;
-- Value of {parent} property.
Message_Label : League.Strings.Universal_String;
-- Value of {message label} property.
Direction : WSDL.AST.Message_Directions;
-- Value of {direction} property.
end record;
overriding procedure Enter
(Self : not null access Interface_Fault_Reference_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
overriding procedure Leave
(Self : not null access Interface_Fault_Reference_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
overriding procedure Visit
(Self : not null access Interface_Fault_Reference_Node;
Iterator : in out WSDL.Iterators.WSDL_Iterator'Class;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
-------------------
-- Binding Fault --
-------------------
-- type SOAP_Binding_Operation_Extension is record
-- MEP : League.Strings.Universal_String;
-- -- Value of {soap mep} property.
--
-- Action : League.Strings.Universal_String;
-- -- Value of {soap action} property.
-- end record;
type Binding_Fault_Node is new Abstract_Node with record
Ref : Qualified_Name;
-- Name of the related interface fault.
Parent : Binding_Access;
-- Value of {parent} property.
Interface_Fault : Interface_Fault_Access;
-- Value of {interface fault} property.
-- SOAP : SOAP_Binding_Operation_Extension;
-- -- SOAP Binding extension information;
end record;
overriding procedure Enter
(Self : not null access Binding_Fault_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
overriding procedure Leave
(Self : not null access Binding_Fault_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
overriding procedure Visit
(Self : not null access Binding_Fault_Node;
Iterator : in out WSDL.Iterators.WSDL_Iterator'Class;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control);
end WSDL.AST.Faults;
| 45.93865 | 78 | 0.535657 |
c56b6a24a83109ca7b29e8f5c53aef7a26145c88 | 2,529 | ads | Ada | source/oasis/program-elements-select_statements.ads | optikos/oasis | 9f64d46d26d964790d69f9db681c874cfb3bf96d | [
"MIT"
] | null | null | null | source/oasis/program-elements-select_statements.ads | optikos/oasis | 9f64d46d26d964790d69f9db681c874cfb3bf96d | [
"MIT"
] | null | null | null | source/oasis/program-elements-select_statements.ads | optikos/oasis | 9f64d46d26d964790d69f9db681c874cfb3bf96d | [
"MIT"
] | 2 | 2019-09-14T23:18:50.000Z | 2019-10-02T10:11:40.000Z | -- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Elements.Statements;
with Program.Lexical_Elements;
with Program.Elements.Select_Paths;
with Program.Element_Vectors;
package Program.Elements.Select_Statements is
pragma Pure (Program.Elements.Select_Statements);
type Select_Statement is
limited interface and Program.Elements.Statements.Statement;
type Select_Statement_Access is access all Select_Statement'Class
with Storage_Size => 0;
not overriding function Paths
(Self : Select_Statement)
return not null Program.Elements.Select_Paths.Select_Path_Vector_Access
is abstract;
not overriding function Then_Abort_Statements
(Self : Select_Statement)
return Program.Element_Vectors.Element_Vector_Access is abstract;
not overriding function Else_Statements
(Self : Select_Statement)
return Program.Element_Vectors.Element_Vector_Access is abstract;
type Select_Statement_Text is limited interface;
type Select_Statement_Text_Access is access all Select_Statement_Text'Class
with Storage_Size => 0;
not overriding function To_Select_Statement_Text
(Self : aliased in out Select_Statement)
return Select_Statement_Text_Access is abstract;
not overriding function Select_Token
(Self : Select_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Then_Token
(Self : Select_Statement_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function Abort_Token
(Self : Select_Statement_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function Else_Token
(Self : Select_Statement_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function End_Token
(Self : Select_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Select_Token_2
(Self : Select_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Semicolon_Token
(Self : Select_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
end Program.Elements.Select_Statements;
| 32.844156 | 78 | 0.764729 |
dc77d2495831679bef1fba44b285128fe04ff937 | 3,730 | adb | Ada | src/fltk-images-pixmaps.adb | micahwelf/FLTK-Ada | 83e0c58ea98e5ede2cbbb158b42eae44196c3ba7 | [
"Unlicense"
] | 1 | 2020-12-18T15:20:13.000Z | 2020-12-18T15:20:13.000Z | src/fltk-images-pixmaps.adb | micahwelf/FLTK-Ada | 83e0c58ea98e5ede2cbbb158b42eae44196c3ba7 | [
"Unlicense"
] | null | null | null | src/fltk-images-pixmaps.adb | micahwelf/FLTK-Ada | 83e0c58ea98e5ede2cbbb158b42eae44196c3ba7 | [
"Unlicense"
] | null | null | null |
with
Interfaces.C,
System;
use type
System.Address;
package body FLTK.Images.Pixmaps is
procedure free_fl_pixmap
(I : in System.Address);
pragma Import (C, free_fl_pixmap, "free_fl_pixmap");
pragma Inline (free_fl_pixmap);
function fl_pixmap_copy
(I : in System.Address;
W, H : in Interfaces.C.int)
return System.Address;
pragma Import (C, fl_pixmap_copy, "fl_pixmap_copy");
pragma Inline (fl_pixmap_copy);
function fl_pixmap_copy2
(I : in System.Address)
return System.Address;
pragma Import (C, fl_pixmap_copy2, "fl_pixmap_copy2");
pragma Inline (fl_pixmap_copy2);
procedure fl_pixmap_color_average
(I : in System.Address;
C : in Interfaces.C.int;
B : in Interfaces.C.C_float);
pragma Import (C, fl_pixmap_color_average, "fl_pixmap_color_average");
pragma Inline (fl_pixmap_color_average);
procedure fl_pixmap_desaturate
(I : in System.Address);
pragma Import (C, fl_pixmap_desaturate, "fl_pixmap_desaturate");
pragma Inline (fl_pixmap_desaturate);
procedure fl_pixmap_draw2
(I : in System.Address;
X, Y : in Interfaces.C.int);
pragma Import (C, fl_pixmap_draw2, "fl_pixmap_draw2");
pragma Inline (fl_pixmap_draw2);
procedure fl_pixmap_draw
(I : in System.Address;
X, Y, W, H, CX, CY : in Interfaces.C.int);
pragma Import (C, fl_pixmap_draw, "fl_pixmap_draw");
pragma Inline (fl_pixmap_draw);
overriding procedure Finalize
(This : in out Pixmap) is
begin
if This.Void_Ptr /= System.Null_Address and then
This in Pixmap'Class
then
free_fl_pixmap (This.Void_Ptr);
This.Void_Ptr := System.Null_Address;
end if;
Finalize (Image (This));
end Finalize;
function Copy
(This : in Pixmap;
Width, Height : in Natural)
return Pixmap'Class is
begin
return Copied : Pixmap do
Copied.Void_Ptr := fl_pixmap_copy
(This.Void_Ptr,
Interfaces.C.int (Width),
Interfaces.C.int (Height));
end return;
end Copy;
function Copy
(This : in Pixmap)
return Pixmap'Class is
begin
return Copied : Pixmap do
Copied.Void_Ptr := fl_pixmap_copy2 (This.Void_Ptr);
end return;
end Copy;
procedure Color_Average
(This : in out Pixmap;
Col : in Color;
Amount : in Blend) is
begin
fl_pixmap_color_average
(This.Void_Ptr,
Interfaces.C.int (Col),
Interfaces.C.C_float (Amount));
end Color_Average;
procedure Desaturate
(This : in out Pixmap) is
begin
fl_pixmap_desaturate (This.Void_Ptr);
end Desaturate;
procedure Draw
(This : in Pixmap;
X, Y : in Integer) is
begin
fl_pixmap_draw2
(This.Void_Ptr,
Interfaces.C.int (X),
Interfaces.C.int (Y));
end Draw;
procedure Draw
(This : in Pixmap;
X, Y, W, H : in Integer;
CX, CY : in Integer := 0) is
begin
fl_pixmap_draw
(This.Void_Ptr,
Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H),
Interfaces.C.int (CX),
Interfaces.C.int (CY));
end Draw;
end FLTK.Images.Pixmaps;
| 23.607595 | 74 | 0.556836 |
d0dbe8c9ce02614a7a96068a913d7a50f396daa2 | 27,706 | ads | Ada | llvm-gcc-4.2-2.9/gcc/ada/a-strbou.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | 1 | 2016-04-09T02:58:13.000Z | 2016-04-09T02:58:13.000Z | llvm-gcc-4.2-2.9/gcc/ada/a-strbou.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | llvm-gcc-4.2-2.9/gcc/ada/a-strbou.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S T R I N G S . B O U N D E D --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Maps;
with Ada.Strings.Superbounded;
package Ada.Strings.Bounded is
pragma Preelaborate;
generic
Max : Positive;
-- Maximum length of a Bounded_String
package Generic_Bounded_Length is
Max_Length : constant Positive := Max;
type Bounded_String is private;
Null_Bounded_String : constant Bounded_String;
subtype Length_Range is Natural range 0 .. Max_Length;
function Length (Source : Bounded_String) return Length_Range;
--------------------------------------------------------
-- Conversion, Concatenation, and Selection Functions --
--------------------------------------------------------
function To_Bounded_String
(Source : String;
Drop : Truncation := Error) return Bounded_String;
function To_String (Source : Bounded_String) return String;
procedure Set_Bounded_String
(Target : out Bounded_String;
Source : String;
Drop : Truncation := Error);
pragma Ada_05 (Set_Bounded_String);
function Append
(Left : Bounded_String;
Right : Bounded_String;
Drop : Truncation := Error) return Bounded_String;
function Append
(Left : Bounded_String;
Right : String;
Drop : Truncation := Error) return Bounded_String;
function Append
(Left : String;
Right : Bounded_String;
Drop : Truncation := Error) return Bounded_String;
function Append
(Left : Bounded_String;
Right : Character;
Drop : Truncation := Error) return Bounded_String;
function Append
(Left : Character;
Right : Bounded_String;
Drop : Truncation := Error) return Bounded_String;
procedure Append
(Source : in out Bounded_String;
New_Item : Bounded_String;
Drop : Truncation := Error);
procedure Append
(Source : in out Bounded_String;
New_Item : String;
Drop : Truncation := Error);
procedure Append
(Source : in out Bounded_String;
New_Item : Character;
Drop : Truncation := Error);
function "&"
(Left : Bounded_String;
Right : Bounded_String) return Bounded_String;
function "&"
(Left : Bounded_String;
Right : String) return Bounded_String;
function "&"
(Left : String;
Right : Bounded_String) return Bounded_String;
function "&"
(Left : Bounded_String;
Right : Character) return Bounded_String;
function "&"
(Left : Character;
Right : Bounded_String) return Bounded_String;
function Element
(Source : Bounded_String;
Index : Positive) return Character;
procedure Replace_Element
(Source : in out Bounded_String;
Index : Positive;
By : Character);
function Slice
(Source : Bounded_String;
Low : Positive;
High : Natural) return String;
function Bounded_Slice
(Source : Bounded_String;
Low : Positive;
High : Natural) return Bounded_String;
pragma Ada_05 (Bounded_Slice);
procedure Bounded_Slice
(Source : Bounded_String;
Target : out Bounded_String;
Low : Positive;
High : Natural);
pragma Ada_05 (Bounded_Slice);
function "="
(Left : Bounded_String;
Right : Bounded_String) return Boolean;
function "="
(Left : Bounded_String;
Right : String) return Boolean;
function "="
(Left : String;
Right : Bounded_String) return Boolean;
function "<"
(Left : Bounded_String;
Right : Bounded_String) return Boolean;
function "<"
(Left : Bounded_String;
Right : String) return Boolean;
function "<"
(Left : String;
Right : Bounded_String) return Boolean;
function "<="
(Left : Bounded_String;
Right : Bounded_String) return Boolean;
function "<="
(Left : Bounded_String;
Right : String) return Boolean;
function "<="
(Left : String;
Right : Bounded_String) return Boolean;
function ">"
(Left : Bounded_String;
Right : Bounded_String) return Boolean;
function ">"
(Left : Bounded_String;
Right : String) return Boolean;
function ">"
(Left : String;
Right : Bounded_String) return Boolean;
function ">="
(Left : Bounded_String;
Right : Bounded_String) return Boolean;
function ">="
(Left : Bounded_String;
Right : String) return Boolean;
function ">="
(Left : String;
Right : Bounded_String) return Boolean;
----------------------
-- Search Functions --
----------------------
function Index
(Source : Bounded_String;
Pattern : String;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
function Index
(Source : Bounded_String;
Pattern : String;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping_Function) return Natural;
function Index
(Source : Bounded_String;
Set : Maps.Character_Set;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
function Index
(Source : Bounded_String;
Pattern : String;
From : Positive;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
pragma Ada_05 (Index);
function Index
(Source : Bounded_String;
Pattern : String;
From : Positive;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping_Function) return Natural;
pragma Ada_05 (Index);
function Index
(Source : Bounded_String;
Set : Maps.Character_Set;
From : Positive;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
pragma Ada_05 (Index);
function Index_Non_Blank
(Source : Bounded_String;
Going : Direction := Forward) return Natural;
function Index_Non_Blank
(Source : Bounded_String;
From : Positive;
Going : Direction := Forward) return Natural;
pragma Ada_05 (Index_Non_Blank);
function Count
(Source : Bounded_String;
Pattern : String;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
function Count
(Source : Bounded_String;
Pattern : String;
Mapping : Maps.Character_Mapping_Function) return Natural;
function Count
(Source : Bounded_String;
Set : Maps.Character_Set) return Natural;
procedure Find_Token
(Source : Bounded_String;
Set : Maps.Character_Set;
Test : Membership;
First : out Positive;
Last : out Natural);
------------------------------------
-- String Translation Subprograms --
------------------------------------
function Translate
(Source : Bounded_String;
Mapping : Maps.Character_Mapping) return Bounded_String;
procedure Translate
(Source : in out Bounded_String;
Mapping : Maps.Character_Mapping);
function Translate
(Source : Bounded_String;
Mapping : Maps.Character_Mapping_Function) return Bounded_String;
procedure Translate
(Source : in out Bounded_String;
Mapping : Maps.Character_Mapping_Function);
---------------------------------------
-- String Transformation Subprograms --
---------------------------------------
function Replace_Slice
(Source : Bounded_String;
Low : Positive;
High : Natural;
By : String;
Drop : Truncation := Error) return Bounded_String;
procedure Replace_Slice
(Source : in out Bounded_String;
Low : Positive;
High : Natural;
By : String;
Drop : Truncation := Error);
function Insert
(Source : Bounded_String;
Before : Positive;
New_Item : String;
Drop : Truncation := Error) return Bounded_String;
procedure Insert
(Source : in out Bounded_String;
Before : Positive;
New_Item : String;
Drop : Truncation := Error);
function Overwrite
(Source : Bounded_String;
Position : Positive;
New_Item : String;
Drop : Truncation := Error) return Bounded_String;
procedure Overwrite
(Source : in out Bounded_String;
Position : Positive;
New_Item : String;
Drop : Truncation := Error);
function Delete
(Source : Bounded_String;
From : Positive;
Through : Natural) return Bounded_String;
procedure Delete
(Source : in out Bounded_String;
From : Positive;
Through : Natural);
---------------------------------
-- String Selector Subprograms --
---------------------------------
function Trim
(Source : Bounded_String;
Side : Trim_End) return Bounded_String;
procedure Trim
(Source : in out Bounded_String;
Side : Trim_End);
function Trim
(Source : Bounded_String;
Left : Maps.Character_Set;
Right : Maps.Character_Set) return Bounded_String;
procedure Trim
(Source : in out Bounded_String;
Left : Maps.Character_Set;
Right : Maps.Character_Set);
function Head
(Source : Bounded_String;
Count : Natural;
Pad : Character := Space;
Drop : Truncation := Error) return Bounded_String;
procedure Head
(Source : in out Bounded_String;
Count : Natural;
Pad : Character := Space;
Drop : Truncation := Error);
function Tail
(Source : Bounded_String;
Count : Natural;
Pad : Character := Space;
Drop : Truncation := Error) return Bounded_String;
procedure Tail
(Source : in out Bounded_String;
Count : Natural;
Pad : Character := Space;
Drop : Truncation := Error);
------------------------------------
-- String Constructor Subprograms --
------------------------------------
function "*"
(Left : Natural;
Right : Character) return Bounded_String;
function "*"
(Left : Natural;
Right : String) return Bounded_String;
function "*"
(Left : Natural;
Right : Bounded_String) return Bounded_String;
function Replicate
(Count : Natural;
Item : Character;
Drop : Truncation := Error) return Bounded_String;
function Replicate
(Count : Natural;
Item : String;
Drop : Truncation := Error) return Bounded_String;
function Replicate
(Count : Natural;
Item : Bounded_String;
Drop : Truncation := Error) return Bounded_String;
private
-- Most of the implementation is in the separate non generic package
-- Ada.Strings.Superbounded. Type Bounded_String is derived from type
-- Superbounded.Super_String with the maximum length constraint. In
-- almost all cases, the routines in Superbounded can be called with
-- no requirement to pass the maximum length explicitly, since there
-- is at least one Bounded_String argument from which the maximum
-- length can be obtained. For all such routines, the implementation
-- in this private part is simply a renaming of the corresponding
-- routine in the super bouded package.
-- The five exceptions are the * and Replicate routines operating on
-- character values. For these cases, we have a routine in the body
-- that calls the superbounded routine passing the maximum length
-- explicitly as an extra parameter.
type Bounded_String is new Superbounded.Super_String (Max_Length);
-- Deriving Bounded_String from Superbounded.Super_String is the
-- real trick, it ensures that the type Bounded_String declared in
-- the generic instantiation is compatible with the Super_String
-- type declared in the Superbounded package.
Null_Bounded_String : constant Bounded_String :=
(Max_Length => Max_Length,
Current_Length => 0,
Data =>
(1 .. Max_Length => ASCII.NUL));
pragma Inline (To_Bounded_String);
procedure Set_Bounded_String
(Target : out Bounded_String;
Source : String;
Drop : Truncation := Error)
renames Set_Super_String;
function Length
(Source : Bounded_String) return Length_Range
renames Super_Length;
function To_String
(Source : Bounded_String) return String
renames Super_To_String;
function Append
(Left : Bounded_String;
Right : Bounded_String;
Drop : Truncation := Error) return Bounded_String
renames Super_Append;
function Append
(Left : Bounded_String;
Right : String;
Drop : Truncation := Error) return Bounded_String
renames Super_Append;
function Append
(Left : String;
Right : Bounded_String;
Drop : Truncation := Error) return Bounded_String
renames Super_Append;
function Append
(Left : Bounded_String;
Right : Character;
Drop : Truncation := Error) return Bounded_String
renames Super_Append;
function Append
(Left : Character;
Right : Bounded_String;
Drop : Truncation := Error) return Bounded_String
renames Super_Append;
procedure Append
(Source : in out Bounded_String;
New_Item : Bounded_String;
Drop : Truncation := Error)
renames Super_Append;
procedure Append
(Source : in out Bounded_String;
New_Item : String;
Drop : Truncation := Error)
renames Super_Append;
procedure Append
(Source : in out Bounded_String;
New_Item : Character;
Drop : Truncation := Error)
renames Super_Append;
function "&"
(Left : Bounded_String;
Right : Bounded_String) return Bounded_String
renames Concat;
function "&"
(Left : Bounded_String;
Right : String) return Bounded_String
renames Concat;
function "&"
(Left : String;
Right : Bounded_String) return Bounded_String
renames Concat;
function "&"
(Left : Bounded_String;
Right : Character) return Bounded_String
renames Concat;
function "&"
(Left : Character;
Right : Bounded_String) return Bounded_String
renames Concat;
function Element
(Source : Bounded_String;
Index : Positive) return Character
renames Super_Element;
procedure Replace_Element
(Source : in out Bounded_String;
Index : Positive;
By : Character)
renames Super_Replace_Element;
function Slice
(Source : Bounded_String;
Low : Positive;
High : Natural) return String
renames Super_Slice;
function Bounded_Slice
(Source : Bounded_String;
Low : Positive;
High : Natural) return Bounded_String
renames Super_Slice;
procedure Bounded_Slice
(Source : Bounded_String;
Target : out Bounded_String;
Low : Positive;
High : Natural)
renames Super_Slice;
function "="
(Left : Bounded_String;
Right : Bounded_String) return Boolean
renames Equal;
function "="
(Left : Bounded_String;
Right : String) return Boolean
renames Equal;
function "="
(Left : String;
Right : Bounded_String) return Boolean
renames Equal;
function "<"
(Left : Bounded_String;
Right : Bounded_String) return Boolean
renames Less;
function "<"
(Left : Bounded_String;
Right : String) return Boolean
renames Less;
function "<"
(Left : String;
Right : Bounded_String) return Boolean
renames Less;
function "<="
(Left : Bounded_String;
Right : Bounded_String) return Boolean
renames Less_Or_Equal;
function "<="
(Left : Bounded_String;
Right : String) return Boolean
renames Less_Or_Equal;
function "<="
(Left : String;
Right : Bounded_String) return Boolean
renames Less_Or_Equal;
function ">"
(Left : Bounded_String;
Right : Bounded_String) return Boolean
renames Greater;
function ">"
(Left : Bounded_String;
Right : String) return Boolean
renames Greater;
function ">"
(Left : String;
Right : Bounded_String) return Boolean
renames Greater;
function ">="
(Left : Bounded_String;
Right : Bounded_String) return Boolean
renames Greater_Or_Equal;
function ">="
(Left : Bounded_String;
Right : String) return Boolean
renames Greater_Or_Equal;
function ">="
(Left : String;
Right : Bounded_String) return Boolean
renames Greater_Or_Equal;
function Index
(Source : Bounded_String;
Pattern : String;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural
renames Super_Index;
function Index
(Source : Bounded_String;
Pattern : String;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping_Function) return Natural
renames Super_Index;
function Index
(Source : Bounded_String;
Set : Maps.Character_Set;
Test : Membership := Inside;
Going : Direction := Forward) return Natural
renames Super_Index;
function Index
(Source : Bounded_String;
Pattern : String;
From : Positive;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural
renames Super_Index;
function Index
(Source : Bounded_String;
Pattern : String;
From : Positive;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping_Function) return Natural
renames Super_Index;
function Index
(Source : Bounded_String;
Set : Maps.Character_Set;
From : Positive;
Test : Membership := Inside;
Going : Direction := Forward) return Natural
renames Super_Index;
function Index_Non_Blank
(Source : Bounded_String;
Going : Direction := Forward) return Natural
renames Super_Index_Non_Blank;
function Index_Non_Blank
(Source : Bounded_String;
From : Positive;
Going : Direction := Forward) return Natural
renames Super_Index_Non_Blank;
function Count
(Source : Bounded_String;
Pattern : String;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural
renames Super_Count;
function Count
(Source : Bounded_String;
Pattern : String;
Mapping : Maps.Character_Mapping_Function) return Natural
renames Super_Count;
function Count
(Source : Bounded_String;
Set : Maps.Character_Set) return Natural
renames Super_Count;
procedure Find_Token
(Source : Bounded_String;
Set : Maps.Character_Set;
Test : Membership;
First : out Positive;
Last : out Natural)
renames Super_Find_Token;
function Translate
(Source : Bounded_String;
Mapping : Maps.Character_Mapping) return Bounded_String
renames Super_Translate;
procedure Translate
(Source : in out Bounded_String;
Mapping : Maps.Character_Mapping)
renames Super_Translate;
function Translate
(Source : Bounded_String;
Mapping : Maps.Character_Mapping_Function) return Bounded_String
renames Super_Translate;
procedure Translate
(Source : in out Bounded_String;
Mapping : Maps.Character_Mapping_Function)
renames Super_Translate;
function Replace_Slice
(Source : Bounded_String;
Low : Positive;
High : Natural;
By : String;
Drop : Truncation := Error) return Bounded_String
renames Super_Replace_Slice;
procedure Replace_Slice
(Source : in out Bounded_String;
Low : Positive;
High : Natural;
By : String;
Drop : Truncation := Error)
renames Super_Replace_Slice;
function Insert
(Source : Bounded_String;
Before : Positive;
New_Item : String;
Drop : Truncation := Error) return Bounded_String
renames Super_Insert;
procedure Insert
(Source : in out Bounded_String;
Before : Positive;
New_Item : String;
Drop : Truncation := Error)
renames Super_Insert;
function Overwrite
(Source : Bounded_String;
Position : Positive;
New_Item : String;
Drop : Truncation := Error) return Bounded_String
renames Super_Overwrite;
procedure Overwrite
(Source : in out Bounded_String;
Position : Positive;
New_Item : String;
Drop : Truncation := Error)
renames Super_Overwrite;
function Delete
(Source : Bounded_String;
From : Positive;
Through : Natural) return Bounded_String
renames Super_Delete;
procedure Delete
(Source : in out Bounded_String;
From : Positive;
Through : Natural)
renames Super_Delete;
function Trim
(Source : Bounded_String;
Side : Trim_End) return Bounded_String
renames Super_Trim;
procedure Trim
(Source : in out Bounded_String;
Side : Trim_End)
renames Super_Trim;
function Trim
(Source : Bounded_String;
Left : Maps.Character_Set;
Right : Maps.Character_Set) return Bounded_String
renames Super_Trim;
procedure Trim
(Source : in out Bounded_String;
Left : Maps.Character_Set;
Right : Maps.Character_Set)
renames Super_Trim;
function Head
(Source : Bounded_String;
Count : Natural;
Pad : Character := Space;
Drop : Truncation := Error) return Bounded_String
renames Super_Head;
procedure Head
(Source : in out Bounded_String;
Count : Natural;
Pad : Character := Space;
Drop : Truncation := Error)
renames Super_Head;
function Tail
(Source : Bounded_String;
Count : Natural;
Pad : Character := Space;
Drop : Truncation := Error) return Bounded_String
renames Super_Tail;
procedure Tail
(Source : in out Bounded_String;
Count : Natural;
Pad : Character := Space;
Drop : Truncation := Error)
renames Super_Tail;
function "*"
(Left : Natural;
Right : Bounded_String) return Bounded_String
renames Times;
function Replicate
(Count : Natural;
Item : Bounded_String;
Drop : Truncation := Error) return Bounded_String
renames Super_Replicate;
end Generic_Bounded_Length;
end Ada.Strings.Bounded;
| 31.060538 | 78 | 0.556703 |
c513e90c313f33c92356361b6b8ce347983a81c4 | 1,712 | ads | Ada | src/asf-contexts-exceptions-iterator.ads | jquorning/ada-asf | ddc697c5dfa4e22c57c6958f4cff27e14d02ce98 | [
"Apache-2.0"
] | 12 | 2015-01-18T23:02:20.000Z | 2022-03-25T15:30:30.000Z | src/asf-contexts-exceptions-iterator.ads | jquorning/ada-asf | ddc697c5dfa4e22c57c6958f4cff27e14d02ce98 | [
"Apache-2.0"
] | 3 | 2021-01-06T09:44:02.000Z | 2022-02-04T20:20:53.000Z | src/asf-contexts-exceptions-iterator.ads | jquorning/ada-asf | ddc697c5dfa4e22c57c6958f4cff27e14d02ce98 | [
"Apache-2.0"
] | 4 | 2016-04-12T05:29:00.000Z | 2022-01-24T23:53:59.000Z | -----------------------------------------------------------------------
-- asf-contexts-exceptions-iterator -- Exception handlers in faces context
-- Copyright (C) 2011, 2021 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with ASF.Contexts.Faces;
-- Iterate over the exception events which are in the queue and execute the given procedure.
-- The procedure should return True in <b>Remove</b> to indicate that the exception has been
-- processed.
--
-- Notes: this procedure should not be called directly (use ASF.Contexts.Faces.Iterate).
-- This procedure is separate to avoid circular dependency.
package ASF.Contexts.Exceptions.Iterator is
procedure Iterate
(Queue : in out Exception_Queue;
Context : in out ASF.Contexts.Faces.Faces_Context'Class;
Process : not null access
procedure (Event : in ASF.Events.Exceptions.Exception_Event'Class;
Remove : out Boolean;
Context : in out ASF.Contexts.Faces.Faces_Context'Class));
end ASF.Contexts.Exceptions.Iterator;
| 45.052632 | 93 | 0.66472 |
237832886e95d6ceaaa02a30a6541d9d95c14bf6 | 133,112 | adb | Ada | test/halide_data/pldi_camera_ready/big_apps_32_real/conv2d/collateral/conv2d/hls_target/.autopilot/db/call_Loop_LB2D_buf_p.bind.adb | David-Durst/embeddedHaskellAetherling | 34c5403e07433e572170699f3bd69c5b5c3eff2d | [
"BSD-3-Clause"
] | 20 | 2019-03-12T20:12:31.000Z | 2022-02-07T04:23:22.000Z | test/halide_data/pldi_camera_ready/big_apps_32_real/conv2d/collateral/conv2d/hls_target/.autopilot/db/call_Loop_LB2D_buf_p.bind.adb | David-Durst/embeddedHaskellAetherling | 34c5403e07433e572170699f3bd69c5b5c3eff2d | [
"BSD-3-Clause"
] | 30 | 2019-07-22T19:25:42.000Z | 2020-06-18T17:58:43.000Z | test/halide_data/pldi_camera_ready/big_apps_32_real/conv2d/collateral/conv2d/hls_target/.autopilot/db/call_Loop_LB2D_buf_p.bind.adb | David-Durst/embeddedHaskellAetherling | 34c5403e07433e572170699f3bd69c5b5c3eff2d | [
"BSD-3-Clause"
] | 3 | 2019-10-14T18:07:26.000Z | 2022-01-20T14:36:17.000Z | <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>call_Loop_LB2D_buf_p</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>in_stream_V_value_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>stream&lt;PackedStencil&lt;unsigned int, 1, 1, 1, 1&gt; &gt;.V.value.V</originalName>
<rtlName></rtlName>
<coreName>FIFO_SRL</coreName>
</Obj>
<bitwidth>32</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>slice_stream_V_value_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName>FIFO_SRL</coreName>
</Obj>
<bitwidth>96</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>43</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_3">
<Value>
<Obj>
<type>0</type>
<id>7</id>
<name>buffer_0_value_V</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>168</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</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>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>168</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>buffer[0].value.V</originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>71</item>
</oprand_edges>
<opcode>alloca</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_4">
<Value>
<Obj>
<type>0</type>
<id>8</id>
<name>buffer_1_value_V</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>168</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>168</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>buffer[1].value.V</originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</oprand_edges>
<opcode>alloca</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>9</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>write_idx_1</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>write_idx_1</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>75</item>
<item>76</item>
<item>77</item>
<item>78</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name>row</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>row</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>80</item>
<item>81</item>
<item>82</item>
<item>83</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name>tmp</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>177</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>177</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>84</item>
<item>86</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>15</id>
<name>row_1</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>177</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>177</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>row</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>87</item>
<item>89</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>177</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>177</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>90</item>
<item>91</item>
<item>92</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name>tmp_5</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>187</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>187</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>10</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>113</item>
<item>114</item>
<item>116</item>
<item>118</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>icmp</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>187</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>187</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>119</item>
<item>121</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</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>122</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>write_idx_1_1</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>211</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>211</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>96</item>
<item>97</item>
<item>98</item>
<item>99</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>col</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>col</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>100</item>
<item>101</item>
<item>102</item>
<item>103</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>tmp_6</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</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>104</item>
<item>106</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>27</id>
<name>col_1</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>col</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>107</item>
<item>108</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</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>109</item>
<item>110</item>
<item>111</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name>col_cast</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>131</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>34</id>
<name>tmp_7</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>183</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>183</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>63</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>133</item>
<item>134</item>
<item>135</item>
<item>137</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name>icmp1</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>183</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>183</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>138</item>
<item>140</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>write_idx_1_3</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>184</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>184</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>write_idx_1</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>141</item>
<item>143</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>37</id>
<name>p_write_idx_1_1</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>183</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>183</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>144</item>
<item>145</item>
<item>146</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name>tmp_value_V_2</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>186</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>186</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>148</item>
<item>149</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>39</id>
<name>buffer_0_value_V_ad</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>150</item>
<item>151</item>
<item>152</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>40</id>
<name>buffer_0_value_V_lo</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>198</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>198</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>153</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>41</id>
<name>buffer_1_value_V_ad</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>154</item>
<item>155</item>
<item>156</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>42</id>
<name>buffer_1_value_V_lo</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>198</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>198</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>157</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>43</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>187</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>187</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>158</item>
<item>159</item>
<item>160</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>45</id>
<name>tmp_8</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>183</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>183</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>161</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>46</id>
<name>p_Val2_8_0_phi</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>198</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>198</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>162</item>
<item>163</item>
<item>164</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>47</id>
<name>p_Val2_8_1_phi</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>198</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>198</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>165</item>
<item>166</item>
<item>167</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>48</id>
<name>p_Result_s</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>206</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>206</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>__Result__</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>96</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>169</item>
<item>170</item>
<item>171</item>
<item>172</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>49</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>207</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>207</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>174</item>
<item>175</item>
<item>176</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>50</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>208</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>208</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>177</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>52</id>
<name>tmp_9</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>183</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>183</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>127</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>53</id>
<name></name>
<fileName>../../../lib_files/Stencil.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>operator=</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>209</second>
</item>
<item>
<first>
<first>../../../lib_files/Stencil.h</first>
<second>operator=</second>
</first>
<second>75</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>128</item>
<item>129</item>
<item>130</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>55</id>
<name></name>
<fileName>../../../lib_files/Stencil.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>operator=</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>209</second>
</item>
<item>
<first>
<first>../../../lib_files/Stencil.h</first>
<second>operator=</second>
</first>
<second>75</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>124</item>
<item>125</item>
<item>297</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>56</id>
<name></name>
<fileName>../../../lib_files/Stencil.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>operator=</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>209</second>
</item>
<item>
<first>
<first>../../../lib_files/Stencil.h</first>
<second>operator=</second>
</first>
<second>75</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>126</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>58</id>
<name></name>
<fileName>../../../lib_files/Stencil.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>operator=</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>209</second>
</item>
<item>
<first>
<first>../../../lib_files/Stencil.h</first>
<second>operator=</second>
</first>
<second>75</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>178</item>
<item>179</item>
<item>296</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>59</id>
<name></name>
<fileName>../../../lib_files/Stencil.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>operator=</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>209</second>
</item>
<item>
<first>
<first>../../../lib_files/Stencil.h</first>
<second>operator=</second>
</first>
<second>75</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>180</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</type>
<id>62</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</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>123</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>64</id>
<name>write_idx_1_2</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>211</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>211</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>write_idx_1</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>93</item>
<item>94</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</fileDirectory>
<lineNumber>177</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>177</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>95</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>68</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>12</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_46">
<Value>
<Obj>
<type>2</type>
<id>70</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_47">
<Value>
<Obj>
<type>2</type>
<id>74</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_48">
<Value>
<Obj>
<type>2</type>
<id>79</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>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_49">
<Value>
<Obj>
<type>2</type>
<id>85</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>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>1080</content>
</item>
<item class_id_reference="16" object_id="_50">
<Value>
<Obj>
<type>2</type>
<id>88</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>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_51">
<Value>
<Obj>
<type>2</type>
<id>105</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>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>1920</content>
</item>
<item class_id_reference="16" object_id="_52">
<Value>
<Obj>
<type>2</type>
<id>115</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_53">
<Value>
<Obj>
<type>2</type>
<id>117</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>10</content>
</item>
<item class_id_reference="16" object_id="_54">
<Value>
<Obj>
<type>2</type>
<id>120</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>10</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_55">
<Value>
<Obj>
<type>2</type>
<id>136</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>63</content>
</item>
<item class_id_reference="16" object_id="_56">
<Value>
<Obj>
<type>2</type>
<id>139</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>63</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_57">
<Value>
<Obj>
<type>2</type>
<id>142</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>18446744073709551614</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>12</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_58">
<Obj>
<type>3</type>
<id>10</id>
<name>newFuncRoot</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>3</count>
<item_version>0</item_version>
<item>7</item>
<item>8</item>
<item>9</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_59">
<Obj>
<type>3</type>
<id>17</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>5</count>
<item_version>0</item_version>
<item>11</item>
<item>12</item>
<item>13</item>
<item>15</item>
<item>16</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_60">
<Obj>
<type>3</type>
<id>23</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>3</count>
<item_version>0</item_version>
<item>20</item>
<item>21</item>
<item>22</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_61">
<Obj>
<type>3</type>
<id>29</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>5</count>
<item_version>0</item_version>
<item>24</item>
<item>25</item>
<item>26</item>
<item>27</item>
<item>28</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_62">
<Obj>
<type>3</type>
<id>44</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>11</count>
<item_version>0</item_version>
<item>30</item>
<item>34</item>
<item>35</item>
<item>36</item>
<item>37</item>
<item>38</item>
<item>39</item>
<item>40</item>
<item>41</item>
<item>42</item>
<item>43</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_63">
<Obj>
<type>3</type>
<id>51</id>
<name>.preheader56.preheader.critedge.0</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>6</count>
<item_version>0</item_version>
<item>45</item>
<item>46</item>
<item>47</item>
<item>48</item>
<item>49</item>
<item>50</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_64">
<Obj>
<type>3</type>
<id>54</id>
<name>._crit_edge</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>2</count>
<item_version>0</item_version>
<item>52</item>
<item>53</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_65">
<Obj>
<type>3</type>
<id>57</id>
<name>branch4</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>2</count>
<item_version>0</item_version>
<item>55</item>
<item>56</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_66">
<Obj>
<type>3</type>
<id>60</id>
<name>branch5</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>2</count>
<item_version>0</item_version>
<item>58</item>
<item>59</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_67">
<Obj>
<type>3</type>
<id>63</id>
<name>._crit_edge33</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>62</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_68">
<Obj>
<type>3</type>
<id>67</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>2</count>
<item_version>0</item_version>
<item>64</item>
<item>66</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_69">
<Obj>
<type>3</type>
<id>69</id>
<name>.preheader.exitStub</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>68</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>106</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_70">
<id>71</id>
<edge_type>1</edge_type>
<source_obj>70</source_obj>
<sink_obj>7</sink_obj>
</item>
<item class_id_reference="20" object_id="_71">
<id>72</id>
<edge_type>1</edge_type>
<source_obj>70</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_72">
<id>73</id>
<edge_type>2</edge_type>
<source_obj>17</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_73">
<id>75</id>
<edge_type>1</edge_type>
<source_obj>74</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_74">
<id>76</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_75">
<id>77</id>
<edge_type>1</edge_type>
<source_obj>64</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_76">
<id>78</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_77">
<id>80</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_78">
<id>81</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_79">
<id>82</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_80">
<id>83</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_81">
<id>84</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_82">
<id>86</id>
<edge_type>1</edge_type>
<source_obj>85</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_83">
<id>87</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>15</sink_obj>
</item>
<item class_id_reference="20" object_id="_84">
<id>89</id>
<edge_type>1</edge_type>
<source_obj>88</source_obj>
<sink_obj>15</sink_obj>
</item>
<item class_id_reference="20" object_id="_85">
<id>90</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_86">
<id>91</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_87">
<id>92</id>
<edge_type>2</edge_type>
<source_obj>69</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_88">
<id>93</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>64</sink_obj>
</item>
<item class_id_reference="20" object_id="_89">
<id>94</id>
<edge_type>1</edge_type>
<source_obj>70</source_obj>
<sink_obj>64</sink_obj>
</item>
<item class_id_reference="20" object_id="_90">
<id>95</id>
<edge_type>2</edge_type>
<source_obj>17</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_91">
<id>96</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_92">
<id>97</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_93">
<id>98</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_94">
<id>99</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_95">
<id>100</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_96">
<id>101</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_97">
<id>102</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_98">
<id>103</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_99">
<id>104</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_100">
<id>106</id>
<edge_type>1</edge_type>
<source_obj>105</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_101">
<id>107</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_102">
<id>108</id>
<edge_type>1</edge_type>
<source_obj>88</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_103">
<id>109</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_104">
<id>110</id>
<edge_type>2</edge_type>
<source_obj>44</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_105">
<id>111</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_106">
<id>114</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_107">
<id>116</id>
<edge_type>1</edge_type>
<source_obj>115</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_108">
<id>118</id>
<edge_type>1</edge_type>
<source_obj>117</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_109">
<id>119</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_110">
<id>121</id>
<edge_type>1</edge_type>
<source_obj>120</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_111">
<id>122</id>
<edge_type>2</edge_type>
<source_obj>29</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_112">
<id>123</id>
<edge_type>2</edge_type>
<source_obj>29</source_obj>
<sink_obj>62</sink_obj>
</item>
<item class_id_reference="20" object_id="_113">
<id>124</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_114">
<id>125</id>
<edge_type>1</edge_type>
<source_obj>39</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_115">
<id>126</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_116">
<id>127</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>52</sink_obj>
</item>
<item class_id_reference="20" object_id="_117">
<id>128</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_118">
<id>129</id>
<edge_type>2</edge_type>
<source_obj>57</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_119">
<id>130</id>
<edge_type>2</edge_type>
<source_obj>60</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_120">
<id>131</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_121">
<id>134</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_122">
<id>135</id>
<edge_type>1</edge_type>
<source_obj>115</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_123">
<id>137</id>
<edge_type>1</edge_type>
<source_obj>136</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_124">
<id>138</id>
<edge_type>1</edge_type>
<source_obj>34</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_125">
<id>140</id>
<edge_type>1</edge_type>
<source_obj>139</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_126">
<id>141</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_127">
<id>143</id>
<edge_type>1</edge_type>
<source_obj>142</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_128">
<id>144</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_129">
<id>145</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_130">
<id>146</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_131">
<id>149</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_132">
<id>150</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_133">
<id>151</id>
<edge_type>1</edge_type>
<source_obj>74</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_134">
<id>152</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_135">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>39</source_obj>
<sink_obj>40</sink_obj>
</item>
<item class_id_reference="20" object_id="_136">
<id>154</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_137">
<id>155</id>
<edge_type>1</edge_type>
<source_obj>74</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_138">
<id>156</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_139">
<id>157</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_140">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>43</sink_obj>
</item>
<item class_id_reference="20" object_id="_141">
<id>159</id>
<edge_type>2</edge_type>
<source_obj>51</source_obj>
<sink_obj>43</sink_obj>
</item>
<item class_id_reference="20" object_id="_142">
<id>160</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>43</sink_obj>
</item>
<item class_id_reference="20" object_id="_143">
<id>161</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_144">
<id>162</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_145">
<id>163</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_146">
<id>164</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_147">
<id>165</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_148">
<id>166</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_149">
<id>167</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_150">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_151">
<id>171</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_152">
<id>172</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_153">
<id>175</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_154">
<id>176</id>
<edge_type>1</edge_type>
<source_obj>48</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_155">
<id>177</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_156">
<id>178</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_157">
<id>179</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_158">
<id>180</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>59</sink_obj>
</item>
<item class_id_reference="20" object_id="_159">
<id>281</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_160">
<id>282</id>
<edge_type>2</edge_type>
<source_obj>17</source_obj>
<sink_obj>69</sink_obj>
</item>
<item class_id_reference="20" object_id="_161">
<id>283</id>
<edge_type>2</edge_type>
<source_obj>17</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_162">
<id>284</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_163">
<id>285</id>
<edge_type>2</edge_type>
<source_obj>29</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_164">
<id>286</id>
<edge_type>2</edge_type>
<source_obj>29</source_obj>
<sink_obj>44</sink_obj>
</item>
<item class_id_reference="20" object_id="_165">
<id>287</id>
<edge_type>2</edge_type>
<source_obj>44</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_166">
<id>288</id>
<edge_type>2</edge_type>
<source_obj>44</source_obj>
<sink_obj>51</sink_obj>
</item>
<item class_id_reference="20" object_id="_167">
<id>289</id>
<edge_type>2</edge_type>
<source_obj>51</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_168">
<id>290</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>60</sink_obj>
</item>
<item class_id_reference="20" object_id="_169">
<id>291</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>57</sink_obj>
</item>
<item class_id_reference="20" object_id="_170">
<id>292</id>
<edge_type>2</edge_type>
<source_obj>57</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_171">
<id>293</id>
<edge_type>2</edge_type>
<source_obj>60</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_172">
<id>294</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_173">
<id>295</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_174">
<id>296</id>
<edge_type>4</edge_type>
<source_obj>42</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_175">
<id>297</id>
<edge_type>4</edge_type>
<source_obj>40</source_obj>
<sink_obj>55</sink_obj>
</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="_176">
<mId>1</mId>
<mTag>call_Loop_LB2D_buf_p</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>2077921</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_177">
<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>10</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_178">
<mId>3</mId>
<mTag>LB2D_buf</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>1080</mMinTripCount>
<mMaxTripCount>1080</mMaxTripCount>
<mMinLatency>2077920</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_179">
<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>17</item>
<item>23</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_180">
<mId>5</mId>
<mTag>LB2D_buf.1</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>7</count>
<item_version>0</item_version>
<item>29</item>
<item>44</item>
<item>51</item>
<item>54</item>
<item>57</item>
<item>60</item>
<item>63</item>
</basic_blocks>
<mII>1</mII>
<mDepth>3</mDepth>
<mMinTripCount>1920</mMinTripCount>
<mMaxTripCount>1920</mMaxTripCount>
<mMinLatency>1921</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_181">
<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>67</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_182">
<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>69</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_183">
<states class_id="25" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_184">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_185">
<id>3</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_186">
<id>4</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_187">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_188">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_189">
<id>7</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_190">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_191">
<id>9</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_192">
<id>2</id>
<operations>
<count>12</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_193">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_194">
<id>12</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_195">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_196">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_197">
<id>15</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_198">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_199">
<id>18</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_200">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_201">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_202">
<id>21</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_203">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_204">
<id>68</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_205">
<id>3</id>
<operations>
<count>13</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_206">
<id>24</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_207">
<id>25</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_208">
<id>26</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_209">
<id>27</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_210">
<id>28</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_211">
<id>30</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_212">
<id>34</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_213">
<id>35</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_214">
<id>39</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_215">
<id>40</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_216">
<id>41</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_217">
<id>42</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_218">
<id>43</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_219">
<id>4</id>
<operations>
<count>8</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_220">
<id>36</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_221">
<id>37</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_222">
<id>38</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_223">
<id>40</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_224">
<id>42</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_225">
<id>45</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_226">
<id>52</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_227">
<id>53</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_228">
<id>5</id>
<operations>
<count>14</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_229">
<id>31</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_230">
<id>32</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_231">
<id>33</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_232">
<id>46</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_233">
<id>47</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_234">
<id>48</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_235">
<id>49</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_236">
<id>50</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_237">
<id>55</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_238">
<id>56</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_239">
<id>58</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_240">
<id>59</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_241">
<id>61</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_242">
<id>62</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_243">
<id>6</id>
<operations>
<count>3</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_244">
<id>64</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_245">
<id>65</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_246">
<id>66</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_247">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>55</id>
<sop class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_248">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>57</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item class_id="34" tracking_level="0" version="0">
<first class_id="35" tracking_level="0" version="0">
<first>13</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_249">
<inState>6</inState>
<outState>2</outState>
<condition>
<id>68</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_250">
<inState>4</inState>
<outState>5</outState>
<condition>
<id>70</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_251">
<inState>5</inState>
<outState>3</outState>
<condition>
<id>71</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_252">
<inState>3</inState>
<outState>6</outState>
<condition>
<id>69</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>26</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_253">
<inState>3</inState>
<outState>4</outState>
<condition>
<id>72</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>26</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
</transitions>
</fsm>
<res class_id="-1"></res>
<node_label_latency class_id="37" tracking_level="0" version="0">
<count>43</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>7</first>
<second class_id="39" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>8</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>9</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>11</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>15</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>16</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>34</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>37</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>38</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>39</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>41</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>42</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>43</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>46</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>47</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>52</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>53</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>55</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>56</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>58</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>59</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>64</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>68</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="40" tracking_level="0" version="0">
<count>12</count>
<item_version>0</item_version>
<item class_id="41" tracking_level="0" version="0">
<first>10</first>
<second class_id="42" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>29</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>44</first>
<second>
<first>2</first>
<second>4</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>3</first>
<second>4</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>3</first>
<second>3</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>4</first>
<second>4</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>4</first>
<second>4</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>4</first>
<second>4</second>
</second>
</item>
<item>
<first>67</first>
<second>
<first>3</first>
<second>3</second>
</second>
</item>
<item>
<first>69</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="43" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="44" tracking_level="1" version="0" object_id="_254">
<region_name>LB2D_buf.1</region_name>
<basic_blocks>
<count>7</count>
<item_version>0</item_version>
<item>29</item>
<item>44</item>
<item>51</item>
<item>54</item>
<item>57</item>
<item>60</item>
<item>63</item>
</basic_blocks>
<nodes>
<count>0</count>
<item_version>0</item_version>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>8</region_type>
<interval>1</interval>
<pipe_depth>3</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="45" tracking_level="0" version="0">
<count>29</count>
<item_version>0</item_version>
<item class_id="46" tracking_level="0" version="0">
<first>74</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>78</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>82</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>88</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>95</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>39</item>
</second>
</item>
<item>
<first>101</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>40</item>
<item>40</item>
<item>55</item>
</second>
</item>
<item>
<first>106</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>112</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>42</item>
<item>42</item>
<item>58</item>
</second>
</item>
<item>
<first>127</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>139</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>149</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>161</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>168</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>174</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
<item>
<first>180</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>190</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>196</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>202</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>208</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>214</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>224</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>230</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>236</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>243</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</item>
</second>
</item>
<item>
<first>247</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>251</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>256</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>47</item>
</second>
</item>
<item>
<first>261</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>271</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="48" tracking_level="0" version="0">
<count>25</count>
<item_version>0</item_version>
<item class_id="49" tracking_level="0" version="0">
<first>buffer_0_value_V_ad_gep_fu_95</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>39</item>
</second>
</item>
<item>
<first>buffer_0_value_V_alloca_fu_74</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>buffer_1_value_V_ad_gep_fu_106</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>buffer_1_value_V_alloca_fu_78</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>col_1_fu_202</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>col_cast_fu_208</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>col_phi_fu_161</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>icmp1_fu_224</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>icmp_fu_190</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>p_Result_s_fu_261</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>p_Val2_8_0_phi_fu_251</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>p_Val2_8_1_phi_fu_256</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>47</item>
</second>
</item>
<item>
<first>p_write_idx_1_1_fu_236</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>row_1_fu_174</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
<item>
<first>row_phi_fu_139</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>tmp_5_fu_180</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>tmp_6_fu_196</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>tmp_7_fu_214</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>tmp_8_fu_243</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</item>
</second>
</item>
<item>
<first>tmp_9_fu_247</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>tmp_fu_168</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>write_idx_1_1_phi_fu_149</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>write_idx_1_2_fu_271</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>write_idx_1_3_fu_230</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>write_idx_1_phi_fu_127</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>2</count>
<item_version>0</item_version>
<item>
<first>StgValue_53_write_fu_88</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>tmp_value_V_2_read_fu_82</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="50" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="51" tracking_level="0" version="0">
<first class_id="52" tracking_level="0" version="0">
<first>buffer_0_value_V</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>40</item>
<item>40</item>
</second>
</item>
<item>
<first>
<first>buffer_0_value_V</first>
<second>1</second>
</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>
<first>buffer_1_value_V</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>42</item>
<item>42</item>
</second>
</item>
<item>
<first>
<first>buffer_1_value_V</first>
<second>1</second>
</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>58</item>
</second>
</item>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>19</count>
<item_version>0</item_version>
<item>
<first>123</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>135</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>146</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>157</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>277</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>281</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
<item>
<first>286</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>290</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>294</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>299</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>304</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>39</item>
</second>
</item>
<item>
<first>310</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>316</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>321</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>328</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>334</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>42</item>
</second>
</item>
<item>
<first>340</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</item>
</second>
</item>
<item>
<first>346</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>350</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>19</count>
<item_version>0</item_version>
<item>
<first>buffer_0_value_V_ad_reg_304</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>39</item>
</second>
</item>
<item>
<first>buffer_0_value_V_lo_reg_328</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>buffer_1_value_V_ad_reg_310</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>buffer_1_value_V_lo_reg_334</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>42</item>
</second>
</item>
<item>
<first>col_1_reg_294</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>col_reg_157</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>icmp1_reg_299</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>icmp_reg_286</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>p_write_idx_1_1_reg_316</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>row_1_reg_281</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
<item>
<first>row_reg_135</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>tmp_6_reg_290</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>tmp_8_reg_340</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</item>
</second>
</item>
<item>
<first>tmp_9_reg_346</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>tmp_reg_277</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>tmp_value_V_2_reg_321</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>write_idx_1_1_reg_146</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>write_idx_1_2_reg_350</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>write_idx_1_reg_123</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>4</count>
<item_version>0</item_version>
<item>
<first>123</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>135</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>146</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>157</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>4</count>
<item_version>0</item_version>
<item>
<first>col_reg_157</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>row_reg_135</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>write_idx_1_1_reg_146</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>write_idx_1_reg_123</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="53" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="54" tracking_level="0" version="0">
<first>in_stream_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
</second>
</item>
<item>
<first>slice_stream_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="55" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="56" tracking_level="0" version="0">
<first>1</first>
<second>FIFO_SRL</second>
</item>
<item>
<first>2</first>
<second>FIFO_SRL</second>
</item>
</port2core>
<node2core>
<count>2</count>
<item_version>0</item_version>
<item>
<first>7</first>
<second>RAM</second>
</item>
<item>
<first>8</first>
<second>RAM</second>
</item>
</node2core>
</syndb>
</boost_serialization>
| 25.85201 | 134 | 0.591141 |
106584e2e258cbb45101413b8eb655e9a05bd5d3 | 5,108 | adb | Ada | applet/aide/source/editors/aide-editor-of_raw_source.adb | charlie5/aIDE | fab406dbcd9b72a4cb215ffebb05166c788d6365 | [
"MIT"
] | 3 | 2017-04-29T14:25:22.000Z | 2017-09-29T10:15:28.000Z | applet/aide/source/editors/aide-editor-of_raw_source.adb | charlie5/aIDE | fab406dbcd9b72a4cb215ffebb05166c788d6365 | [
"MIT"
] | null | null | null | applet/aide/source/editors/aide-editor-of_raw_source.adb | charlie5/aIDE | fab406dbcd9b72a4cb215ffebb05166c788d6365 | [
"MIT"
] | null | null | null | with
Glib,
glib.Error,
gtk.Builder,
gtk.Handlers,
gtk.Text_Buffer,
gtk.Text_Iter,
gtk.Enums,
ada.Characters.Latin_1;
package body aIDE.Editor.of_raw_source
is
use gtk.Builder,
gtk.Text_Buffer,
gtk.Text_Iter,
Glib,
glib.Error;
function on_comment_text_View_leave (the_Entry : access Gtk_Text_View_Record'Class;
the_Operation : in AdaM.raw_Source.view) return Boolean
is
use Gtk.Text_Iter;
Start : Gtk_Text_Iter;
the_End : Gtk_Text_Iter;
Continue : Boolean;
the_Lines : AdaM.text_Lines;
begin
the_Entry.Get_Buffer.get_start_Iter (Start);
the_End := Start;
Forward_Line (the_End, Continue);
if Start = the_End
then
return False;
end if;
loop
declare
use AdaM;
the_Text : constant String := the_Entry.Get_Buffer.Get_Text (Start, the_End);
begin
if the_Text (the_Text'Last) = ada.Characters.Latin_1.LF
then
the_Lines.append (+the_Text (the_Text'First .. the_Text'Last - 1)); -- Drop Line Feed.
else
the_Lines.append (+the_Text);
end if;
end;
exit when not Continue;
Start := the_End;
the_End := Start;
Forward_Line (the_End, Continue);
end loop;
the_Operation.Lines_are (the_Lines);
return False;
end on_comment_text_View_leave;
procedure on_rid_Button_clicked (the_Button : access Gtk_Button_Record'Class;
the_raw_source_Editor : in aIDE.Editor.of_raw_source.view)
is
pragma Unreferenced (the_raw_source_Editor);
begin
the_Button.get_Parent.get_Parent.get_Parent.destroy;
end on_rid_Button_clicked;
package text_View_return_Callbacks is new Gtk.Handlers.User_Return_Callback (Gtk_Text_View_Record,
Boolean,
AdaM.raw_Source.view);
package Button_Callbacks is new Gtk.Handlers.User_Callback (Gtk_Button_Record,
aIDE.Editor.of_raw_Source.view);
package body Forge
is
function to_comment_Editor (the_Comment : in AdaM.raw_Source.view) return View
is
Self : constant Editor.of_raw_Source.view := new Editor.of_raw_Source.item;
the_Builder : Gtk_Builder;
Error : aliased GError;
Result : Guint;
pragma Unreferenced (Result);
begin
Self.Comment := the_Comment;
Gtk_New (the_Builder);
Result := the_Builder.Add_From_File ("glade/editor/raw_source_editor.glade", Error'Access);
if Error /= null then
raise Program_Error with "Error: adam.Editor.context_line ~ " & Get_Message (Error);
end if;
Self.Top := gtk_Frame (the_Builder.get_Object ("top_Frame"));
Self.comment_text_View := gtk_Text_View (the_Builder.get_Object ("source_text_View"));
Self.comment_text_View.Override_Background_Color (State => Gtk.Enums.Gtk_State_Flag_Normal,
Color => (0.85, 0.92, 0.98,
1.0));
Self.parameters_Alignment := gtk_Alignment (the_Builder.get_Object ("top_Alignment"));
Self.rid_Button := gtk_Button (the_Builder.get_Object ("rid_Button"));
Text_View_return_Callbacks.Connect (Self.comment_text_View,
"focus-out-event",
on_comment_text_View_leave'Access,
the_Comment);
Button_Callbacks.Connect (Self.rid_Button,
"clicked",
on_rid_Button_clicked'Access,
Self);
declare
use AdaM;
Buffer : constant Gtk_Text_Buffer := Self.comment_text_View.Get_Buffer;
Iter : Gtk_Text_Iter;
begin
Buffer.Get_Start_Iter (Iter);
for i in 1 .. Natural (the_Comment.Lines.Length)
loop
if i /= Natural (the_Comment.Lines.Length)
then
Buffer.Insert (Iter, +Self.Comment.Lines.Element (i) & Ada.Characters.Latin_1.LF);
else
Buffer.Insert (Iter, +Self.Comment.Lines.Element (i));
end if;
end loop;
end;
return Self;
end to_comment_Editor;
end Forge;
overriding
function top_Widget (Self : in Item) return gtk.Widget.Gtk_Widget
is
begin
return gtk.Widget.Gtk_Widget (Self.Top);
end top_Widget;
end aIDE.Editor.of_raw_source;
| 30.586826 | 103 | 0.543461 |
4a9772a0a548fc505cf9146f6191366c1fdb0705 | 784 | ada | Ada | Task/Self-describing-numbers/Ada/self-describing-numbers.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:38.000Z | 2018-11-09T22:08:38.000Z | Task/Self-describing-numbers/Ada/self-describing-numbers.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | null | null | null | Task/Self-describing-numbers/Ada/self-describing-numbers.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | with Ada.Text_IO; use Ada.Text_IO;
procedure SelfDesc is
subtype Desc_Int is Long_Integer range 0 .. 10**10-1;
function isDesc (innum : Desc_Int) return Boolean is
subtype S_Int is Natural range 0 .. 10;
type S_Int_Arr is array (0 .. 9) of S_Int;
ref, cnt : S_Int_Arr := (others => 0);
n, digit : S_Int := 0; num : Desc_Int := innum;
begin
loop
digit := S_Int (num mod 10);
ref (9 - n) := digit; cnt (digit) := cnt (digit) + 1;
num := num / 10; exit when num = 0; n := n + 1;
end loop;
return ref (9 - n .. 9) = cnt (0 .. n);
end isDesc;
begin
for i in Desc_Int range 1 .. 100_000_000 loop
if isDesc (i) then
Put_Line (Desc_Int'Image (i));
end if;
end loop;
end SelfDesc;
| 30.153846 | 63 | 0.566327 |
0eec49c0f90ed5e076c2e9191a9656b33360ced8 | 3,391 | adb | Ada | 固件源码/三代控A12-带模型命名源码-易深工程/List/main.adb | wooddoor/Loli3 | 78d87e43effad7dcb17c9d36dd55401aa67e87ac | [
"MIT"
] | 47 | 2019-06-10T07:45:57.000Z | 2022-02-11T03:25:45.000Z | 固件源码/三代控A12-带模型命名源码-易深工程/List/main.adb | wooddoor/Loli3 | 78d87e43effad7dcb17c9d36dd55401aa67e87ac | [
"MIT"
] | 1 | 2020-03-01T15:49:53.000Z | 2020-03-01T15:49:53.000Z | 固件源码/三代控A12-带模型命名源码-易深工程/List/main.adb | wooddoor/Loli3 | 78d87e43effad7dcb17c9d36dd55401aa67e87ac | [
"MIT"
] | 14 | 2019-07-15T23:25:04.000Z | 2021-12-01T00:15:31.000Z | M:main
F:G$Delay1ms$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$delay_ms$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$EEPROM_read$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$EEPROM_write$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$EEPROM_clean$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$Data_change$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$DATA_read1$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$DATA_save1$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$Model_data_reset$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$Model_adress$0_0$0({2}DF,SI:U),C,0,0,0,0,0
F:G$DATA_read2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$DATA_save2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$SPI$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$REG_write$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$REG_read$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$FIFO_write$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$FIFO_write2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$FIFO_read$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$FIFO_read2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$TX_address$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$RX_address$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$RX_mode$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$TX_mode$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$NRF_power$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$NRF_size$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$NRF_channel$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$NRF_init$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$NRF_test$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$device_connect$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$LCD$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$location$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$LCD_ON$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$LCD_OFF$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$LCD_clean$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$LCD_init$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$send$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$send2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$send2_rev$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$send2_hex$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$send3$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$write$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$write0$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$photo$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_trim1$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_trim2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_throttle$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$warning$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$write_num100$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$write_num1000$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$move_cursor$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$displayModel$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_menu$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_mapping$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_receiver_mode$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_switch$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_bar$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$point$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_curve$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_curve2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$Xdata_check$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$rounding$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$get_curve$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$get_curve2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_size$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_inverted$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_mix$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_curve$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_curve2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_mapping$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$change_trim$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$CH_calib$0_0$0({2}DF,SI:S),C,0,0,0,0,0
F:G$function_filter$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$Switch_Check$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$UartInit$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$initial$0_0$0({2}DF,SV:S),C,0,0,0,0,0
| 44.038961 | 55 | 0.623415 |
df7924e4b6f20ba440b2a6d29fb1a5955a625b35 | 3,983 | adb | Ada | source/xml/dom/xml-dom-nodes.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/xml/dom/xml-dom-nodes.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/xml/dom/xml-dom-nodes.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- XML Processor --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013-2014, 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$
------------------------------------------------------------------------------
package body XML.DOM.Nodes is
------------------
-- Append_Child --
------------------
procedure Append_Child
(Self : not null access DOM_Node'Class;
New_Child : not null DOM_Node_Access)
is
Aux : DOM_Node_Access;
begin
Aux := Self.Append_Child (New_Child);
end Append_Child;
------------------
-- Remove_Child --
------------------
procedure Remove_Child
(Self : not null access DOM_Node'Class;
Old_Child : not null DOM_Node_Access)
is
Aux : DOM_Node_Access;
begin
Aux := Self.Remove_Child (Old_Child);
end Remove_Child;
end XML.DOM.Nodes;
| 52.407895 | 78 | 0.415014 |
0e7f1f5b441a7aef82ba68b847177b7b67f3a688 | 3,999 | ads | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-szuzti.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-szuzti.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-szuzti.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ADA.STRINGS.WIDE_WIDE_UNBOUNDED.WIDE_WIDE_TEXT_IO --
-- --
-- S p e c --
-- --
-- Copyright (C) 1997-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 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;
| 55.541667 | 78 | 0.531633 |
20f6a4ae302c2113d9b86f2be237140ae9627aa7 | 7,708 | ads | Ada | src/servlet-sessions.ads | jquorning/ada-servlet | 97db5fcdd59e01441c717b95a9e081aa7d6a7bbe | [
"Apache-2.0"
] | 6 | 2018-01-04T07:19:46.000Z | 2020-12-27T14:49:44.000Z | src/servlet-sessions.ads | jquorning/ada-servlet | 97db5fcdd59e01441c717b95a9e081aa7d6a7bbe | [
"Apache-2.0"
] | 9 | 2020-12-20T15:29:18.000Z | 2022-02-04T20:13:58.000Z | src/servlet-sessions.ads | jquorning/ada-servlet | 97db5fcdd59e01441c717b95a9e081aa7d6a7bbe | [
"Apache-2.0"
] | 2 | 2021-01-06T08:32:38.000Z | 2022-01-24T23:46:36.000Z | -----------------------------------------------------------------------
-- servlet-sessions -- Servlet Sessions
-- Copyright (C) 2010, 2011, 2018, 2021 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with EL.Objects;
with Ada.Calendar;
with Ada.Finalization;
with Ada.Strings.Unbounded;
with Servlet.Principals;
private with Util.Beans.Objects.Maps;
private with Util.Concurrent.Locks;
private with Util.Concurrent.Counters;
-- The <b>Servlet.Sessions</b> package is an Ada implementation of the
-- Java servlet Specification (See JSR 315 at jcp.org).
package Servlet.Sessions is
-- Raised if there is no session.
No_Session : exception;
-- The default session inactive timeout.
DEFAULT_INACTIVE_TIMEOUT : constant Duration := 300.0;
-- Provides a way to identify a user across more than one page request
-- or visit to a Web site and to store information about that user.
--
-- The servlet container uses this interface to create a session between
-- an HTTP client and an HTTP server. The session persists for a specified
-- time period, across more than one connection or page request from the user.
-- A session usually corresponds to one user, who may visit a site many times.
-- The server can maintain a session in many ways such as using cookies
-- or rewriting URLs.
--
-- This interface allows servlets to
-- * View and manipulate information about a session, such as the session
-- identifier, creation time, and last accessed time
-- * Bind objects to sessions, allowing user information to persist across
-- multiple user connections
--
-- A servlet should be able to handle cases in which the client does not
-- choose to join a session, such as when cookies are intentionally turned off.
-- Until the client joins the session, isNew returns true. If the client chooses
-- not to join the session, getSession will return a different session on each
-- request, and isNew will always return true.
--
-- Session information is scoped only to the current web application (ServletContext),
-- so information stored in one context will not be directly visible in another.
type Session is tagged private;
-- Returns true if the session is valid.
function Is_Valid (Sess : in Session'Class) return Boolean;
-- Returns a string containing the unique identifier assigned to this session.
-- The identifier is assigned by the servlet container and is implementation dependent.
function Get_Id (Sess : in Session) return String;
-- Returns the last time the client sent a request associated with this session,
-- as the number of milliseconds since midnight January 1, 1970 GMT, and marked
-- by the time the container recieved the request.
--
-- Actions that your application takes, such as getting or setting a value associated
-- with the session, do not affect the access time.
function Get_Last_Accessed_Time (Sess : in Session) return Ada.Calendar.Time;
-- Returns the maximum time interval, in seconds, that the servlet container will
-- keep this session open between client accesses. After this interval, the servlet
-- container will invalidate the session. The maximum time interval can be set with
-- the Set_Max_Inactive_Interval method.
-- A negative time indicates the session should never timeout.
function Get_Max_Inactive_Interval (Sess : in Session) return Duration;
-- Specifies the time, in seconds, between client requests before the servlet
-- container will invalidate this session. A negative time indicates the session
-- should never timeout.
procedure Set_Max_Inactive_Interval (Sess : in Session;
Interval : in Duration);
-- Returns the object bound with the specified name in this session,
-- or null if no object is bound under the name.
function Get_Attribute (Sess : in Session;
Name : in String) return EL.Objects.Object;
-- Binds an object to this session, using the name specified.
-- If an object of the same name is already bound to the session,
-- the object is replaced.
--
-- If the value passed in is null, this has the same effect as calling
-- removeAttribute().
procedure Set_Attribute (Sess : in out Session;
Name : in String;
Value : in EL.Objects.Object);
-- Removes the object bound with the specified name from this session.
-- If the session does not have an object bound with the specified name,
-- this method does nothing.
procedure Remove_Attribute (Sess : in out Session;
Name : in String);
-- Gets the principal that authenticated to the session.
-- Returns null if there is no principal authenticated.
function Get_Principal (Sess : in Session) return Servlet.Principals.Principal_Access;
-- Sets the principal associated with the session.
procedure Set_Principal (Sess : in out Session;
Principal : in Servlet.Principals.Principal_Access);
-- Invalidates this session then unbinds any objects bound to it.
procedure Invalidate (Sess : in out Session);
Null_Session : constant Session;
private
type Session_Record is tagged;
type Session_Record_Access is access all Session_Record'Class;
type Session_Record is new Ada.Finalization.Limited_Controlled with record
-- Reference counter.
Ref_Counter : Util.Concurrent.Counters.Counter;
-- RW lock to protect access to members.
Lock : Util.Concurrent.Locks.RW_Lock;
-- Attributes bound to this session.
Attributes : aliased Util.Beans.Objects.Maps.Map;
-- Time when the session was created.
Create_Time : Ada.Calendar.Time;
-- Time when the session was last accessed.
Access_Time : Ada.Calendar.Time;
-- Max inactive time in seconds.
Max_Inactive : Duration := DEFAULT_INACTIVE_TIMEOUT;
-- Session identifier.
Id : Ada.Strings.Unbounded.String_Access;
-- True if the session is active.
Is_Active : Boolean := True;
-- When not null, the principal that authenticated to this session.
Principal : Servlet.Principals.Principal_Access := null;
end record;
overriding
procedure Finalize (Object : in out Session_Record);
type Session is new Ada.Finalization.Controlled with record
Impl : Session_Record_Access;
end record;
-- Adjust (increment) the session record reference counter.
overriding
procedure Adjust (Object : in out Session);
-- Decrement the session record reference counter and free the session record
-- if this was the last session reference.
overriding
procedure Finalize (Object : in out Session);
Null_Session : constant Session := Session'(Ada.Finalization.Controlled with Impl => null);
end Servlet.Sessions;
| 43.548023 | 94 | 0.691619 |
0e28991c5b088221b0a78e0ba68c0c7063116759 | 19,334 | adb | Ada | components/src/audio/SGTL5000/sgtl5000.adb | shakram02/Ada_Drivers_Library | a407ca7ddbc2d9756647016c2f8fd8ef24a239ff | [
"BSD-3-Clause"
] | 6 | 2017-05-28T04:37:11.000Z | 2020-11-22T11:26:19.000Z | components/src/audio/SGTL5000/sgtl5000.adb | shakram02/Ada_Drivers_Library | a407ca7ddbc2d9756647016c2f8fd8ef24a239ff | [
"BSD-3-Clause"
] | 2 | 2019-08-30T10:57:40.000Z | 2020-02-11T21:34:14.000Z | components/src/audio/SGTL5000/sgtl5000.adb | shakram02/Ada_Drivers_Library | a407ca7ddbc2d9756647016c2f8fd8ef24a239ff | [
"BSD-3-Clause"
] | 2 | 2017-02-07T19:42:02.000Z | 2020-11-22T11:26:20.000Z | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2017, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
package body SGTL5000 is
------------
-- Modify --
------------
procedure Modify (This : in out SGTL5000_DAC;
Reg : UInt16;
Mask : UInt16;
Value : UInt16)
is
Tmp : UInt16 := This.I2C_Read (Reg);
begin
Tmp := Tmp and (not Mask);
Tmp := Tmp or Value;
This.I2C_Write (Reg, Tmp);
end Modify;
---------------
-- I2C_Write --
---------------
procedure I2C_Write (This : in out SGTL5000_DAC;
Reg : UInt16;
Value : UInt16)
is
Status : I2C_Status with Unreferenced;
begin
This.Port.Mem_Write
(Addr => SGTL5000_QFN20_I2C_Addr,
Mem_Addr => Reg,
Mem_Addr_Size => Memory_Size_16b,
Data => (1 => UInt8 (Shift_Right (Value, 8) and 16#FF#),
2 => UInt8 (Value and 16#FF#)),
Status => Status);
end I2C_Write;
--------------
-- I2C_Read --
--------------
function I2C_Read (This : SGTL5000_DAC;
Reg : UInt16)
return UInt16
is
Status : I2C_Status;
Data : I2C_Data (1 .. 2);
begin
This.Port.Mem_Read
(Addr => SGTL5000_QFN20_I2C_Addr,
Mem_Addr => Reg,
Mem_Addr_Size => Memory_Size_16b,
Data => Data,
Status => Status);
return Shift_Left (UInt16 (Data (1)), 8) or UInt16 (Data (2));
end I2C_Read;
--------------
-- Valid_Id --
--------------
function Valid_Id (This : SGTL5000_DAC) return Boolean is
Id : constant UInt16 := This.I2C_Read (Chip_ID_Reg);
begin
return (Id and 16#FF00#) = SGTL5000_Chip_ID;
end Valid_Id;
--------------------
-- Set_DAC_Volume --
--------------------
procedure Set_DAC_Volume (This : in out SGTL5000_DAC;
Left, Right : DAC_Volume)
is
begin
This.I2C_Write (DAC_VOL_REG,
UInt16 (Left) or Shift_Left (UInt16 (Right), 8));
end Set_DAC_Volume;
--------------------
-- Set_ADC_Volume --
--------------------
procedure Set_ADC_Volume (This : in out SGTL5000_DAC;
Left, Right : ADC_Volume;
Minus_6db : Boolean)
is
begin
This.Modify (ANA_ADC_CTRL_REG,
2#0000_0001_1111_1111#,
UInt16 (Left) or Shift_Left (UInt16 (Right), 4)
or (if Minus_6db then 2#000_0001_0000_0000# else 0));
end Set_ADC_Volume;
---------------------------
-- Set_Headphones_Volume --
---------------------------
procedure Set_Headphones_Volume (This : in out SGTL5000_DAC;
Left, Right : HP_Volume)
is
begin
This.Modify (ANA_HP_CTRL_REG,
2#0111_1111_0111_1111#,
UInt16 (Left) or Shift_Left (UInt16 (Right), 8));
end Set_Headphones_Volume;
-------------------------
-- Set_Line_Out_Volume --
-------------------------
procedure Set_Line_Out_Volume (This : in out SGTL5000_DAC;
Left, Right : Line_Out_Volume)
is
begin
This.Modify (LINE_OUT_VOL_REG,
2#0001_1111_0001_1111#,
UInt16 (Left) or Shift_Left (UInt16 (Right), 8));
end Set_Line_Out_Volume;
---------------------
-- Mute_Headphones --
---------------------
procedure Mute_Headphones (This : in out SGTL5000_DAC;
Mute : Boolean := True)
is
begin
This.Modify (ANA_CTRL_REG,
2#0000_0000_0001_0000#,
(if Mute then 2#0000_0000_0001_0000# else 0));
end Mute_Headphones;
-------------------
-- Mute_Line_Out --
-------------------
procedure Mute_Line_Out (This : in out SGTL5000_DAC;
Mute : Boolean := True)
is
begin
This.Modify (ANA_CTRL_REG,
2#0000_0001_0000_0000#,
(if Mute then 2#0000_0001_0000_0000# else 0));
end Mute_Line_Out;
--------------
-- Mute_ADC --
--------------
procedure Mute_ADC (This : in out SGTL5000_DAC;
Mute : Boolean := True)
is
begin
This.Modify (ANA_CTRL_REG,
2#0000_0000_0000_0001#,
(if Mute then 2#0000_0000_0000_0001# else 0));
end Mute_ADC;
--------------
-- Mute_DAC --
--------------
procedure Mute_DAC (This : in out SGTL5000_DAC;
Mute : Boolean := True)
is
begin
This.Modify (ADCDAC_CTRL_REG,
2#0000_0000_0000_1100#,
(if Mute then 2#0000_0000_0000_1100# else 0));
end Mute_DAC;
-----------------------
-- Set_Power_Control --
-----------------------
procedure Set_Power_Control (This : in out SGTL5000_DAC;
ADC : Power_State;
DAC : Power_State;
DAP : Power_State;
I2S_Out : Power_State;
I2S_In : Power_State)
is
Value : UInt16 := 0;
begin
if ADC = On then
Value := Value or 2#0000_0000_0100_0000#;
end if;
if DAC = On then
Value := Value or 2#0000_0000_0010_0000#;
end if;
if DAP = On then
Value := Value or 2#0000_0000_0001_0000#;
end if;
if I2S_Out = On then
Value := Value or 2#0000_0000_0000_0010#;
end if;
if I2S_In = On then
Value := Value or 2#0000_0000_0000_0001#;
end if;
This.Modify (DIG_POWER_REG,
2#0000_0000_0111_0011#,
Value);
end Set_Power_Control;
---------------------------
-- Set_Reference_Control --
---------------------------
procedure Set_Reference_Control (This : in out SGTL5000_DAC;
VAG : Analog_Ground_Voltage;
Bias : Current_Bias;
Slow_VAG_Ramp : Boolean)
is
Value : UInt16 := 0;
begin
Value := Value or Shift_Left (UInt16 (VAG), 4);
Value := Value or Shift_Left (UInt16 (Bias), 1);
Value := Value or (if Slow_VAG_Ramp then 1 else 0);
This.I2C_Write (REF_CTRL_REG, Value);
end Set_Reference_Control;
-------------------------
-- Set_Short_Detectors --
-------------------------
procedure Set_Short_Detectors (This : in out SGTL5000_DAC;
Right_HP : Short_Detector_Level;
Left_HP : Short_Detector_Level;
Center_HP : Short_Detector_Level;
Mode_LR : UInt2;
Mode_CM : UInt2)
is
Value : UInt16 := 0;
begin
Value := Value or (Shift_Left (UInt16 (Right_HP), 12));
Value := Value or (Shift_Left (UInt16 (Left_HP), 8));
Value := Value or (Shift_Left (UInt16 (Center_HP), 4));
Value := Value or (Shift_Left (UInt16 (Mode_LR), 2));
Value := Value or UInt16 (Mode_CM);
This.I2C_Write (SHORT_CTRL_REG, Value);
end Set_Short_Detectors;
-------------------------
-- Set_Linereg_Control --
-------------------------
procedure Set_Linereg_Control (This : in out SGTL5000_DAC;
Charge_Pump_Src_Override : Boolean;
Charge_Pump_Src : Charge_Pump_Source;
Linereg_Out_Voltage : Linear_Regulator_Out_Voltage)
is
Value : UInt16 := 0;
begin
if Charge_Pump_Src_Override then
Value := Value or 2#10_0000#;
end if;
if Charge_Pump_Src = VDDIO then
Value := Value or 2#100_0000#;
end if;
Value := Value or UInt16 (Linereg_Out_Voltage);
This.I2C_Write (LINE_OUT_CTRL_REG, Value);
end Set_Linereg_Control;
----------------------
-- Set_Analog_Power --
----------------------
procedure Set_Analog_Power (This : in out SGTL5000_DAC;
DAC_Mono : Boolean := False;
Linreg_Simple_PowerUp : Boolean := False;
Startup_PowerUp : Boolean := False;
VDDC_Charge_Pump_PowerUp : Boolean := False;
PLL_PowerUp : Boolean := False;
Linereg_D_PowerUp : Boolean := False;
VCOAmp_PowerUp : Boolean := False;
VAG_PowerUp : Boolean := False;
ADC_Mono : Boolean := False;
Reftop_PowerUp : Boolean := False;
Headphone_PowerUp : Boolean := False;
DAC_PowerUp : Boolean := False;
Capless_Headphone_PowerUp : Boolean := False;
ADC_PowerUp : Boolean := False;
Linout_PowerUp : Boolean := False)
is
Value : UInt16 := 0;
begin
if Linout_PowerUp then
Value := Value or 2**0;
end if;
if ADC_PowerUp then
Value := Value or 2**1;
end if;
if Capless_Headphone_PowerUp then
Value := Value or 2**2;
end if;
if DAC_PowerUp then
Value := Value or 2**3;
end if;
if Headphone_PowerUp then
Value := Value or 2**4;
end if;
if Reftop_PowerUp then
Value := Value or 2**5;
end if;
if not ADC_Mono then
Value := Value or 2**6;
end if;
if VAG_PowerUp then
Value := Value or 2**7;
end if;
if VCOAmp_PowerUp then
Value := Value or 2**8;
end if;
if Linereg_D_PowerUp then
Value := Value or 2**9;
end if;
if PLL_PowerUp then
Value := Value or 2**10;
end if;
if VDDC_Charge_Pump_PowerUp then
Value := Value or 2**11;
end if;
if Startup_PowerUp then
Value := Value or 2**12;
end if;
if Linreg_Simple_PowerUp then
Value := Value or 2**13;
end if;
if not DAC_Mono then
Value := Value or 2**14;
end if;
This.I2C_Write (ANA_POWER_REG, Value);
end Set_Analog_Power;
-----------------------
-- Set_Clock_Control --
-----------------------
procedure Set_Clock_Control (This : in out SGTL5000_DAC;
Rate : Rate_Mode;
FS : SYS_FS_Freq;
MCLK : MCLK_Mode)
is
Value : UInt16 := 0;
begin
Value := Value or (case Rate is
when SYS_FS => 2#00_0000#,
when Half_SYS_FS => 2#01_0000#,
when Quarter_SYS_FS => 2#10_0000#,
when Sixth_SYS_FS => 2#11_0000#);
Value := Value or (case FS is
when SYS_FS_32kHz => 2#0000#,
when SYS_FS_44kHz => 2#0100#,
when SYS_FS_48kHz => 2#1000#,
when SYS_FS_96kHz => 2#1100#);
Value := Value or (case MCLK is
when MCLK_256FS => 2#00#,
when MCLK_384FS => 2#01#,
when MCLK_512FS => 2#10#,
when Use_PLL => 2#11#);
This.I2C_Write (CLK_CTRL_REG, Value);
end Set_Clock_Control;
---------------------
-- Set_I2S_Control --
---------------------
procedure Set_I2S_Control (This : in out SGTL5000_DAC;
SCLKFREQ : SCLKFREQ_Mode;
Invert_SCLK : Boolean;
Master_Mode : Boolean;
Data_Len : Data_Len_Mode;
I2S : I2S_Mode;
LR_Align : Boolean;
LR_Polarity : Boolean)
is
Value : UInt16 := 0;
begin
Value := Value or (case SCLKFREQ is
when SCLKFREQ_64FS => 2#0_0000_0000#,
when SCLKFREQ_32FS => 2#1_0000_0000#);
if Invert_SCLK then
Value := Value or 2#0100_0000#;
end if;
if Master_Mode then
Value := Value or 2#1000_0000#;
end if;
Value := Value or (case Data_Len is
when Data_32b => 2#00_0000#,
when Data_24b => 2#01_0000#,
when Data_20b => 2#10_0000#,
when Data_16b => 2#11_0000#);
Value := Value or (case I2S is
when I2S_Left_Justified => 2#0000#,
when Right_Justified => 2#0100#,
when PCM => 2#1000#);
if LR_Align then
Value := Value or 2#10#;
end if;
if LR_Polarity then
Value := Value or 2#1#;
end if;
This.I2C_Write (I2S_CTRL_REG, Value);
end Set_I2S_Control;
-----------------------
-- Select_ADC_Source --
-----------------------
procedure Select_ADC_Source (This : in out SGTL5000_DAC;
Source : ADC_Source;
Enable_ZCD : Boolean)
is
begin
This.Modify (ANA_CTRL_REG,
2#0000_0000_0000_0100#,
(case Source is
when Microphone => 2#0000_0000_0000_0000#,
when Line_In => 2#0000_0000_0000_0100#)
or (if Enable_ZCD then 2#0000_0000_0000_0010# else 0));
end Select_ADC_Source;
-----------------------
-- Select_DAP_Source --
-----------------------
procedure Select_DAP_Source (This : in out SGTL5000_DAC;
Source : DAP_Source)
is
begin
This.Modify (SSS_CTRL_REG,
2#0000_0000_1100_0000#,
(case Source is
when ADC => 2#0000_0000_0000_0000#,
when I2S_In => 2#0000_0000_0100_0000#));
end Select_DAP_Source;
---------------------------
-- Select_DAP_Mix_Source --
---------------------------
procedure Select_DAP_Mix_Source (This : in out SGTL5000_DAC;
Source : DAP_Mix_Source)
is
begin
This.Modify (SSS_CTRL_REG,
2#0000_0011_0000_0000#,
(case Source is
when ADC => 2#0000_0000_0000_0000#,
when I2S_In => 2#0000_0001_0000_0000#));
end Select_DAP_Mix_Source;
-----------------------
-- Select_DAC_Source --
-----------------------
procedure Select_DAC_Source (This : in out SGTL5000_DAC;
Source : DAC_Source)
is
begin
This.Modify (SSS_CTRL_REG,
2#0000_0000_0011_0000#,
(case Source is
when ADC => 2#0000_0000_0000_0000#,
when I2S_In => 2#0000_0000_0001_0000#,
when DAP => 2#0000_0000_0011_0000#));
end Select_DAC_Source;
----------------------
-- Select_HP_Source --
----------------------
procedure Select_HP_Source (This : in out SGTL5000_DAC;
Source : HP_Source;
Enable_ZCD : Boolean)
is
begin
This.Modify (ANA_CTRL_REG,
2#0000_0000_0100_0000#,
(case Source is
when DAC => 2#0000_0000_0000_0000#,
when Line_In => 2#0000_0000_0100_0000#)
or (if Enable_ZCD then 2#0000_0000_0010_0000# else 0));
end Select_HP_Source;
---------------------------
-- Select_I2S_Out_Source --
---------------------------
procedure Select_I2S_Out_Source (This : in out SGTL5000_DAC;
Source : I2S_Out_Source)
is
begin
This.Modify (SSS_CTRL_REG,
2#0000_0000_0000_0011#,
(case Source is
when ADC => 2#0000_0000_0000_0000#,
when I2S_In => 2#0000_0000_0000_0001#,
when DAP => 2#0000_0000_0000_0011#));
end Select_I2S_Out_Source;
end SGTL5000;
| 34.898917 | 90 | 0.461519 |
107a7cf0d11c637c347117d79ca0bdb21b7a3d96 | 3,647 | ads | Ada | source/amf/uml/amf-umldi-uml_multiplicity_labels-hash.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/amf/uml/amf-umldi-uml_multiplicity_labels-hash.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/amf/uml/amf-umldi-uml_multiplicity_labels-hash.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Elements.Generic_Hash;
function AMF.UMLDI.UML_Multiplicity_Labels.Hash is
new AMF.Elements.Generic_Hash (UMLDI_UML_Multiplicity_Label, UMLDI_UML_Multiplicity_Label_Access);
| 72.94 | 100 | 0.408281 |
dceb777a5d3c7c9af30be5d887ccef997c57998d | 1,191 | ads | Ada | src/Command_Line/line_parsers-receivers-enumeration_receivers.ads | fintatarta/eugen | 2c384838ff0e81b51172310ce5d0e47d71ffd4fd | [
"MIT"
] | null | null | null | src/Command_Line/line_parsers-receivers-enumeration_receivers.ads | fintatarta/eugen | 2c384838ff0e81b51172310ce5d0e47d71ffd4fd | [
"MIT"
] | null | null | null | src/Command_Line/line_parsers-receivers-enumeration_receivers.ads | fintatarta/eugen | 2c384838ff0e81b51172310ce5d0e47d71ffd4fd | [
"MIT"
] | null | null | null | --
-- This package provides handlers for enumerative types. Since the
-- type is not fixed in advance, the package needs to be generic.
--
generic
type Value_Type is (<>);
package Line_Parsers.Receivers.Enumeration_Receivers is
type Receiver_Type is new Abstract_Parameter_Handler with private;
function Is_Set (Handler : Receiver_Type) return Boolean;
overriding
procedure Receive (Handler : in out Receiver_Type;
Name : String;
Value : String;
Position : Natural);
function Get (Handler : Receiver_Type) return Value_Type
with Pre => Handler.Is_Set;
overriding function Reusable (Handler : Receiver_Type) return Boolean;
private
type Receiver_Type is new Abstract_Parameter_Handler with
record
Value : Value_Type;
Set : Boolean := False;
end record;
function Is_Set (Handler : Receiver_Type) return Boolean
is (Handler.Set);
function Reusable (Handler : Receiver_Type) return Boolean
is (False);
function Get (Handler : Receiver_Type) return Value_Type
is (Handler.Value);
end Line_Parsers.Receivers.Enumeration_Receivers;
| 28.357143 | 73 | 0.689337 |
d0e2885b8c964d62effcf8518f7bc16a8bfcab32 | 266 | ads | Ada | specs/ada/server/ike/tkmrpc-operation_handlers-ike-tkm_limits.ads | DrenfongWong/tkm-rpc | 075d22871cf81d497aac656c7f03a513278b641c | [
"BSD-3-Clause"
] | null | null | null | specs/ada/server/ike/tkmrpc-operation_handlers-ike-tkm_limits.ads | DrenfongWong/tkm-rpc | 075d22871cf81d497aac656c7f03a513278b641c | [
"BSD-3-Clause"
] | null | null | null | specs/ada/server/ike/tkmrpc-operation_handlers-ike-tkm_limits.ads | DrenfongWong/tkm-rpc | 075d22871cf81d497aac656c7f03a513278b641c | [
"BSD-3-Clause"
] | null | null | null | with Tkmrpc.Request;
with Tkmrpc.Response;
package Tkmrpc.Operation_Handlers.Ike.Tkm_Limits is
procedure Handle (Req : Request.Data_Type; Res : out Response.Data_Type);
-- Handler for the tkm_limits operation.
end Tkmrpc.Operation_Handlers.Ike.Tkm_Limits;
| 26.6 | 76 | 0.789474 |
dfe7c74011a08b4212d0388e8fec7d6bcd88a852 | 2,378 | adb | Ada | demo/src/demo_single.adb | mosteo/yeison | bd13e1d34555cdacf7801eb319eed61a6a21e5b7 | [
"MIT"
] | 6 | 2021-12-25T16:05:50.000Z | 2022-02-05T00:41:50.000Z | demo/src/demo_single.adb | mosteo/yeison | bd13e1d34555cdacf7801eb319eed61a6a21e5b7 | [
"MIT"
] | 4 | 2021-12-25T12:35:34.000Z | 2021-12-25T12:38:22.000Z | demo/src/demo_single.adb | mosteo/yeison | bd13e1d34555cdacf7801eb319eed61a6a21e5b7 | [
"MIT"
] | 1 | 2022-02-04T20:53:22.000Z | 2022-02-04T20:53:22.000Z | with Ada.Text_IO; use Ada.Text_IO;
with Yeison_Single;
procedure Demo_Single is
package Yeison renames Yeison_Single;
use Yeison.Operators;
A1 : constant Yeison.Any := 1;
-- An integer atom;
A2 : constant Yeison.Any := "string";
-- A string atom
A3 : constant Yeison.Any := Yeison.True;
-- A Boolean atom
A4 : constant Yeison.Any := 3.14;
-- A real atom
M1 : constant Yeison.Any := ("one" => A1, "two" => A2);
-- A map initialized with yeison atoms
M2 : constant Yeison.Any := ("one" => 1, "two" => "two");
-- A map initialized with literals
M3 : constant Yeison.Any := ("one" => A1, "two" => "two", "three" => M2);
-- A map containing other maps
V1 : constant Yeison.Any := +(A1, A2);
-- A vector initialized with atoms
V2 : constant Yeison.Any := +(1, 2, 3) with Unreferenced;
-- A vector initialized with integer literals
V3 : constant Yeison.Any := +("one", "two", "three") with Unreferenced;
-- A vector initialized with string literals
V4 : constant Yeison.Any := ("one", 2, "three", 4.0);
-- A vector made of mixed atoms/literals
M4 : constant Yeison.Any := ("one" => A1, "two" => 2, "three" => M3, "four" => V4);
-- A map initialized with all kinds of elements
V5 : constant Yeison.Any := (A1, 2, M3, V4, "five");
-- A vector initialized with all kinds of elements
M5 : constant Yeison.Any := ("one" => 1,
"two" => ("two" => 2,
"three" => M3),
"zri" => +(1, 2, 3));
-- Inline declaration of nested maps/vectors. Unfortunately the qualification is mandatory.
V6 : constant Yeison.Any := (1,
+(1, 2),
("one" => 1,
"two" => M2));
-- A vector with a nested vector/map. Same problem as with maps.
X0 : Yeison.Any;
X1 : constant Yeison.Any := 1;
X2 : constant Yeison.Any := "two";
X3 : constant Yeison.Any := M4;
X4 : constant Yeison.Any := V5;
-- Storing any kind of value in a variable
begin
X0 := 1;
Put_Line (X0.Image);
X0 := "one";
Put_Line (X0.Image);
Put_Line (M1.Image);
Put_Line (V1.Image);
Put_Line (M5.Image);
Put_Line (M4 ("one").Image);
Put_Line (V6 (1).Image);
end Demo_Single;
| 29.358025 | 95 | 0.550883 |
233eb3c03bc093e20c4437a2fd56ee210485dbd4 | 3,687 | ads | Ada | Ada95/src/terminal_interface-curses-text_io-complex_io.ads | mvaisakh/android_external_libncurses | d44c8a16d7f1ed276d0de0b3f6f1a5596c5f556f | [
"DOC",
"Unlicense"
] | 35 | 2015-03-07T13:26:22.000Z | 2021-11-06T16:18:59.000Z | Ada95/src/terminal_interface-curses-text_io-complex_io.ads | mvaisakh/android_external_libncurses | d44c8a16d7f1ed276d0de0b3f6f1a5596c5f556f | [
"DOC",
"Unlicense"
] | 3 | 2017-04-07T21:02:48.000Z | 2017-04-08T17:59:35.000Z | Ada95/src/terminal_interface-curses-text_io-complex_io.ads | mvaisakh/android_external_libncurses | d44c8a16d7f1ed276d0de0b3f6f1a5596c5f556f | [
"DOC",
"Unlicense"
] | 19 | 2015-06-16T06:13:44.000Z | 2021-07-24T02:37:45.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- Terminal_Interface.Curses.Text_IO.Complex_IO --
-- --
-- S P E C --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
-- $Revision: 1.10 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Numerics.Generic_Complex_Types;
generic
with package Complex_Types is new Ada.Numerics.Generic_Complex_Types (<>);
package Terminal_Interface.Curses.Text_IO.Complex_IO is
use Complex_Types;
Default_Fore : Field := 2;
Default_Aft : Field := Real'Digits - 1;
Default_Exp : Field := 3;
procedure Put
(Win : in Window;
Item : in Complex;
Fore : in Field := Default_Fore;
Aft : in Field := Default_Aft;
Exp : in Field := Default_Exp);
procedure Put
(Item : in Complex;
Fore : in Field := Default_Fore;
Aft : in Field := Default_Aft;
Exp : in Field := Default_Exp);
private
pragma Inline (Put);
end Terminal_Interface.Curses.Text_IO.Complex_IO;
| 51.929577 | 78 | 0.457825 |
23fbd168aac943c79cfdbb44b6e8ba106d407061 | 597 | adb | Ada | obj/gnattest/tests/dg_types-test_data.adb | SMerrony/dgemua | 138b09f814c3576e45fe8d25303a6c2329999757 | [
"MIT"
] | 2 | 2021-03-26T08:25:38.000Z | 2021-06-08T03:10:12.000Z | obj/gnattest/tests/dg_types-test_data.adb | SMerrony/dgemua | 138b09f814c3576e45fe8d25303a6c2329999757 | [
"MIT"
] | null | null | null | obj/gnattest/tests/dg_types-test_data.adb | SMerrony/dgemua | 138b09f814c3576e45fe8d25303a6c2329999757 | [
"MIT"
] | null | null | null | -- This package is intended to set up and tear down the test environment.
-- Once created by GNATtest, this package will never be overwritten
-- automatically. Contents of this package can be modified in any way
-- except for sections surrounded by a 'read only' marker.
package body DG_Types.Test_Data is
procedure Set_Up (Gnattest_T : in out Test) is
pragma Unreferenced (Gnattest_T);
begin
null;
end Set_Up;
procedure Tear_Down (Gnattest_T : in out Test) is
pragma Unreferenced (Gnattest_T);
begin
null;
end Tear_Down;
end DG_Types.Test_Data;
| 28.428571 | 75 | 0.720268 |
1021a7c573804609f150fc19ba5f71b96ad479ab | 91,055 | ads | Ada | source/conformance/generated/protobuf_test_messages-proto_2-test_messages_proto_2.ads | mgrojo/protobuf | ffc50782c0c5bbb60e8f1504fcfc5a5fbafdb7dd | [
"MIT"
] | 12 | 2020-05-04T09:30:21.000Z | 2022-02-08T21:47:32.000Z | source/conformance/generated/protobuf_test_messages-proto_2-test_messages_proto_2.ads | mgrojo/protobuf | ffc50782c0c5bbb60e8f1504fcfc5a5fbafdb7dd | [
"MIT"
] | 6 | 2021-03-16T15:17:33.000Z | 2022-03-31T21:32:47.000Z | source/conformance/generated/protobuf_test_messages-proto_2-test_messages_proto_2.ads | mgrojo/protobuf | ffc50782c0c5bbb60e8f1504fcfc5a5fbafdb7dd | [
"MIT"
] | 1 | 2021-03-16T15:09:27.000Z | 2021-03-16T15:09:27.000Z | with Ada.Finalization;
with Ada.Streams;
with Interfaces;
with League.Stream_Element_Vectors;
with League.String_Vectors;
with League.Strings;
with PB_Support.Boolean_Vectors;
with PB_Support.IEEE_Float_32_Vectors;
with PB_Support.IEEE_Float_64_Vectors;
with PB_Support.Integer_32_Vectors;
with PB_Support.Integer_64_Vectors;
with PB_Support.Stream_Element_Vector_Vectors;
with PB_Support.Universal_String_Vectors;
with PB_Support.Unsigned_32_Vectors;
with PB_Support.Unsigned_64_Vectors;
with PB_Support.Vectors;
package Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2 is
type Foreign_Enum_Proto_2 is (FOREIGN_FOO, FOREIGN_BAR, FOREIGN_BAZ);
for Foreign_Enum_Proto_2 use
(FOREIGN_FOO => 0, FOREIGN_BAR => 1, FOREIGN_BAZ => 2);
package Foreign_Enum_Proto_2_Vectors is
new PB_Support.Vectors (Foreign_Enum_Proto_2);
type Nested_Enum is (NEG, FOO, BAR, BAZ);
for Nested_Enum use (NEG => - 1, FOO => 0, BAR => 1, BAZ => 2);
package Nested_Enum_Vectors is new PB_Support.Vectors (Nested_Enum);
type Test_All_Types_Proto_2_Vector is tagged private
with Variable_Indexing => Get_Test_All_Types_Proto_2_Variable_Reference,
Constant_Indexing => Get_Test_All_Types_Proto_2_Constant_Reference;
type Nested_Message_Vector is tagged private
with Variable_Indexing => Get_Nested_Message_Variable_Reference,
Constant_Indexing => Get_Nested_Message_Constant_Reference;
type Map_Int_32Int_32Entry_Vector is tagged private
with Variable_Indexing => Get_Map_Int_32Int_32Entry_Variable_Reference,
Constant_Indexing => Get_Map_Int_32Int_32Entry_Constant_Reference;
type Map_Int_64Int_64Entry_Vector is tagged private
with Variable_Indexing => Get_Map_Int_64Int_64Entry_Variable_Reference,
Constant_Indexing => Get_Map_Int_64Int_64Entry_Constant_Reference;
type Map_Uint_32Uint_32Entry_Vector is tagged private
with Variable_Indexing => Get_Map_Uint_32Uint_32Entry_Variable_Reference,
Constant_Indexing => Get_Map_Uint_32Uint_32Entry_Constant_Reference;
type Map_Uint_64Uint_64Entry_Vector is tagged private
with Variable_Indexing => Get_Map_Uint_64Uint_64Entry_Variable_Reference,
Constant_Indexing => Get_Map_Uint_64Uint_64Entry_Constant_Reference;
type Map_Sint_32Sint_32Entry_Vector is tagged private
with Variable_Indexing => Get_Map_Sint_32Sint_32Entry_Variable_Reference,
Constant_Indexing => Get_Map_Sint_32Sint_32Entry_Constant_Reference;
type Map_Sint_64Sint_64Entry_Vector is tagged private
with Variable_Indexing => Get_Map_Sint_64Sint_64Entry_Variable_Reference,
Constant_Indexing => Get_Map_Sint_64Sint_64Entry_Constant_Reference;
type Map_Fixed_32Fixed_32Entry_Vector is tagged private
with Variable_Indexing =>
Get_Map_Fixed_32Fixed_32Entry_Variable_Reference,
Constant_Indexing => Get_Map_Fixed_32Fixed_32Entry_Constant_Reference;
type Map_Fixed_64Fixed_64Entry_Vector is tagged private
with Variable_Indexing =>
Get_Map_Fixed_64Fixed_64Entry_Variable_Reference,
Constant_Indexing => Get_Map_Fixed_64Fixed_64Entry_Constant_Reference;
type Map_Sfixed_32Sfixed_32Entry_Vector is tagged private
with Variable_Indexing =>
Get_Map_Sfixed_32Sfixed_32Entry_Variable_Reference,
Constant_Indexing => Get_Map_Sfixed_32Sfixed_32Entry_Constant_Reference;
type Map_Sfixed_64Sfixed_64Entry_Vector is tagged private
with Variable_Indexing =>
Get_Map_Sfixed_64Sfixed_64Entry_Variable_Reference,
Constant_Indexing => Get_Map_Sfixed_64Sfixed_64Entry_Constant_Reference;
type Map_Int_32Float_Entry_Vector is tagged private
with Variable_Indexing => Get_Map_Int_32Float_Entry_Variable_Reference,
Constant_Indexing => Get_Map_Int_32Float_Entry_Constant_Reference;
type Map_Int_32Double_Entry_Vector is tagged private
with Variable_Indexing => Get_Map_Int_32Double_Entry_Variable_Reference,
Constant_Indexing => Get_Map_Int_32Double_Entry_Constant_Reference;
type Map_Bool_Bool_Entry_Vector is tagged private
with Variable_Indexing => Get_Map_Bool_Bool_Entry_Variable_Reference,
Constant_Indexing => Get_Map_Bool_Bool_Entry_Constant_Reference;
type Map_String_String_Entry_Vector is tagged private
with Variable_Indexing => Get_Map_String_String_Entry_Variable_Reference,
Constant_Indexing => Get_Map_String_String_Entry_Constant_Reference;
type Map_String_Bytes_Entry_Vector is tagged private
with Variable_Indexing => Get_Map_String_Bytes_Entry_Variable_Reference,
Constant_Indexing => Get_Map_String_Bytes_Entry_Constant_Reference;
type Map_String_Nested_Message_Entry_Vector is tagged private
with Variable_Indexing =>
Get_Map_String_Nested_Message_Entry_Variable_Reference,
Constant_Indexing =>
Get_Map_String_Nested_Message_Entry_Constant_Reference;
type Map_String_Foreign_Message_Entry_Vector is tagged private
with Variable_Indexing =>
Get_Map_String_Foreign_Message_Entry_Variable_Reference,
Constant_Indexing =>
Get_Map_String_Foreign_Message_Entry_Constant_Reference;
type Map_String_Nested_Enum_Entry_Vector is tagged private
with Variable_Indexing =>
Get_Map_String_Nested_Enum_Entry_Variable_Reference,
Constant_Indexing => Get_Map_String_Nested_Enum_Entry_Constant_Reference;
type Map_String_Foreign_Enum_Entry_Vector is tagged private
with Variable_Indexing =>
Get_Map_String_Foreign_Enum_Entry_Variable_Reference,
Constant_Indexing => Get_Map_String_Foreign_Enum_Entry_Constant_Reference;
type Data_Vector is tagged private
with Variable_Indexing => Get_Data_Variable_Reference,
Constant_Indexing => Get_Data_Constant_Reference;
type Message_Set_Correct_Vector is tagged private
with Variable_Indexing => Get_Message_Set_Correct_Variable_Reference,
Constant_Indexing => Get_Message_Set_Correct_Constant_Reference;
type Message_Set_Correct_Extension_1_Vector is tagged private
with Variable_Indexing =>
Get_Message_Set_Correct_Extension_1_Variable_Reference,
Constant_Indexing =>
Get_Message_Set_Correct_Extension_1_Constant_Reference;
type Message_Set_Correct_Extension_2_Vector is tagged private
with Variable_Indexing =>
Get_Message_Set_Correct_Extension_2_Variable_Reference,
Constant_Indexing =>
Get_Message_Set_Correct_Extension_2_Constant_Reference;
type Foreign_Message_Proto_2_Vector is tagged private
with Variable_Indexing => Get_Foreign_Message_Proto_2_Variable_Reference,
Constant_Indexing => Get_Foreign_Message_Proto_2_Constant_Reference;
type Unknown_To_Test_All_Types_Vector is tagged private
with Variable_Indexing =>
Get_Unknown_To_Test_All_Types_Variable_Reference,
Constant_Indexing => Get_Unknown_To_Test_All_Types_Constant_Reference;
type Optional_Group_Vector is tagged private
with Variable_Indexing => Get_Optional_Group_Variable_Reference,
Constant_Indexing => Get_Optional_Group_Constant_Reference;
type Map_Int_32Int_32Entry is
record
Key : PB_Support.Integer_32_Vectors.Option;
Value : PB_Support.Integer_32_Vectors.Option;
end record;
type Optional_Map_Int_32Int_32Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Int_32Int_32Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Int_32Int_32Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Int_32Int_32Entry_Vector);
procedure Append
(Self : in out Map_Int_32Int_32Entry_Vector;
V : Map_Int_32Int_32Entry);
type Map_Int_32Int_32Entry_Variable_Reference
(Element : not null access Map_Int_32Int_32Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Int_32Int_32Entry_Variable_Reference
(Self : aliased in out Map_Int_32Int_32Entry_Vector;
Index : Positive)
return Map_Int_32Int_32Entry_Variable_Reference
with Inline;
type Map_Int_32Int_32Entry_Constant_Reference
(Element : not null access constant Map_Int_32Int_32Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Int_32Int_32Entry_Constant_Reference
(Self : aliased Map_Int_32Int_32Entry_Vector;
Index : Positive)
return Map_Int_32Int_32Entry_Constant_Reference
with Inline;
type Map_Int_64Int_64Entry is
record
Key : PB_Support.Integer_64_Vectors.Option;
Value : PB_Support.Integer_64_Vectors.Option;
end record;
type Optional_Map_Int_64Int_64Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Int_64Int_64Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Int_64Int_64Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Int_64Int_64Entry_Vector);
procedure Append
(Self : in out Map_Int_64Int_64Entry_Vector;
V : Map_Int_64Int_64Entry);
type Map_Int_64Int_64Entry_Variable_Reference
(Element : not null access Map_Int_64Int_64Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Int_64Int_64Entry_Variable_Reference
(Self : aliased in out Map_Int_64Int_64Entry_Vector;
Index : Positive)
return Map_Int_64Int_64Entry_Variable_Reference
with Inline;
type Map_Int_64Int_64Entry_Constant_Reference
(Element : not null access constant Map_Int_64Int_64Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Int_64Int_64Entry_Constant_Reference
(Self : aliased Map_Int_64Int_64Entry_Vector;
Index : Positive)
return Map_Int_64Int_64Entry_Constant_Reference
with Inline;
type Map_Uint_32Uint_32Entry is
record
Key : PB_Support.Unsigned_32_Vectors.Option;
Value : PB_Support.Unsigned_32_Vectors.Option;
end record;
type Optional_Map_Uint_32Uint_32Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Uint_32Uint_32Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Uint_32Uint_32Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Uint_32Uint_32Entry_Vector);
procedure Append
(Self : in out Map_Uint_32Uint_32Entry_Vector;
V : Map_Uint_32Uint_32Entry);
type Map_Uint_32Uint_32Entry_Variable_Reference
(Element : not null access Map_Uint_32Uint_32Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Uint_32Uint_32Entry_Variable_Reference
(Self : aliased in out Map_Uint_32Uint_32Entry_Vector;
Index : Positive)
return Map_Uint_32Uint_32Entry_Variable_Reference
with Inline;
type Map_Uint_32Uint_32Entry_Constant_Reference
(Element : not null access constant Map_Uint_32Uint_32Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Uint_32Uint_32Entry_Constant_Reference
(Self : aliased Map_Uint_32Uint_32Entry_Vector;
Index : Positive)
return Map_Uint_32Uint_32Entry_Constant_Reference
with Inline;
type Map_Uint_64Uint_64Entry is
record
Key : PB_Support.Unsigned_64_Vectors.Option;
Value : PB_Support.Unsigned_64_Vectors.Option;
end record;
type Optional_Map_Uint_64Uint_64Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Uint_64Uint_64Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Uint_64Uint_64Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Uint_64Uint_64Entry_Vector);
procedure Append
(Self : in out Map_Uint_64Uint_64Entry_Vector;
V : Map_Uint_64Uint_64Entry);
type Map_Uint_64Uint_64Entry_Variable_Reference
(Element : not null access Map_Uint_64Uint_64Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Uint_64Uint_64Entry_Variable_Reference
(Self : aliased in out Map_Uint_64Uint_64Entry_Vector;
Index : Positive)
return Map_Uint_64Uint_64Entry_Variable_Reference
with Inline;
type Map_Uint_64Uint_64Entry_Constant_Reference
(Element : not null access constant Map_Uint_64Uint_64Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Uint_64Uint_64Entry_Constant_Reference
(Self : aliased Map_Uint_64Uint_64Entry_Vector;
Index : Positive)
return Map_Uint_64Uint_64Entry_Constant_Reference
with Inline;
type Map_Sint_32Sint_32Entry is
record
Key : PB_Support.Integer_32_Vectors.Option;
Value : PB_Support.Integer_32_Vectors.Option;
end record;
type Optional_Map_Sint_32Sint_32Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Sint_32Sint_32Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Sint_32Sint_32Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Sint_32Sint_32Entry_Vector);
procedure Append
(Self : in out Map_Sint_32Sint_32Entry_Vector;
V : Map_Sint_32Sint_32Entry);
type Map_Sint_32Sint_32Entry_Variable_Reference
(Element : not null access Map_Sint_32Sint_32Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Sint_32Sint_32Entry_Variable_Reference
(Self : aliased in out Map_Sint_32Sint_32Entry_Vector;
Index : Positive)
return Map_Sint_32Sint_32Entry_Variable_Reference
with Inline;
type Map_Sint_32Sint_32Entry_Constant_Reference
(Element : not null access constant Map_Sint_32Sint_32Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Sint_32Sint_32Entry_Constant_Reference
(Self : aliased Map_Sint_32Sint_32Entry_Vector;
Index : Positive)
return Map_Sint_32Sint_32Entry_Constant_Reference
with Inline;
type Map_Sint_64Sint_64Entry is
record
Key : PB_Support.Integer_64_Vectors.Option;
Value : PB_Support.Integer_64_Vectors.Option;
end record;
type Optional_Map_Sint_64Sint_64Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Sint_64Sint_64Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Sint_64Sint_64Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Sint_64Sint_64Entry_Vector);
procedure Append
(Self : in out Map_Sint_64Sint_64Entry_Vector;
V : Map_Sint_64Sint_64Entry);
type Map_Sint_64Sint_64Entry_Variable_Reference
(Element : not null access Map_Sint_64Sint_64Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Sint_64Sint_64Entry_Variable_Reference
(Self : aliased in out Map_Sint_64Sint_64Entry_Vector;
Index : Positive)
return Map_Sint_64Sint_64Entry_Variable_Reference
with Inline;
type Map_Sint_64Sint_64Entry_Constant_Reference
(Element : not null access constant Map_Sint_64Sint_64Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Sint_64Sint_64Entry_Constant_Reference
(Self : aliased Map_Sint_64Sint_64Entry_Vector;
Index : Positive)
return Map_Sint_64Sint_64Entry_Constant_Reference
with Inline;
type Map_Fixed_32Fixed_32Entry is
record
Key : PB_Support.Unsigned_32_Vectors.Option;
Value : PB_Support.Unsigned_32_Vectors.Option;
end record;
type Optional_Map_Fixed_32Fixed_32Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Fixed_32Fixed_32Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Fixed_32Fixed_32Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Fixed_32Fixed_32Entry_Vector);
procedure Append
(Self : in out Map_Fixed_32Fixed_32Entry_Vector;
V : Map_Fixed_32Fixed_32Entry);
type Map_Fixed_32Fixed_32Entry_Variable_Reference
(Element : not null access Map_Fixed_32Fixed_32Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Fixed_32Fixed_32Entry_Variable_Reference
(Self : aliased in out Map_Fixed_32Fixed_32Entry_Vector;
Index : Positive)
return Map_Fixed_32Fixed_32Entry_Variable_Reference
with Inline;
type Map_Fixed_32Fixed_32Entry_Constant_Reference
(Element : not null access constant Map_Fixed_32Fixed_32Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Fixed_32Fixed_32Entry_Constant_Reference
(Self : aliased Map_Fixed_32Fixed_32Entry_Vector;
Index : Positive)
return Map_Fixed_32Fixed_32Entry_Constant_Reference
with Inline;
type Map_Fixed_64Fixed_64Entry is
record
Key : PB_Support.Unsigned_64_Vectors.Option;
Value : PB_Support.Unsigned_64_Vectors.Option;
end record;
type Optional_Map_Fixed_64Fixed_64Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Fixed_64Fixed_64Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Fixed_64Fixed_64Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Fixed_64Fixed_64Entry_Vector);
procedure Append
(Self : in out Map_Fixed_64Fixed_64Entry_Vector;
V : Map_Fixed_64Fixed_64Entry);
type Map_Fixed_64Fixed_64Entry_Variable_Reference
(Element : not null access Map_Fixed_64Fixed_64Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Fixed_64Fixed_64Entry_Variable_Reference
(Self : aliased in out Map_Fixed_64Fixed_64Entry_Vector;
Index : Positive)
return Map_Fixed_64Fixed_64Entry_Variable_Reference
with Inline;
type Map_Fixed_64Fixed_64Entry_Constant_Reference
(Element : not null access constant Map_Fixed_64Fixed_64Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Fixed_64Fixed_64Entry_Constant_Reference
(Self : aliased Map_Fixed_64Fixed_64Entry_Vector;
Index : Positive)
return Map_Fixed_64Fixed_64Entry_Constant_Reference
with Inline;
type Map_Sfixed_32Sfixed_32Entry is
record
Key : PB_Support.Integer_32_Vectors.Option;
Value : PB_Support.Integer_32_Vectors.Option;
end record;
type Optional_Map_Sfixed_32Sfixed_32Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Sfixed_32Sfixed_32Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Sfixed_32Sfixed_32Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Sfixed_32Sfixed_32Entry_Vector);
procedure Append
(Self : in out Map_Sfixed_32Sfixed_32Entry_Vector;
V : Map_Sfixed_32Sfixed_32Entry);
type Map_Sfixed_32Sfixed_32Entry_Variable_Reference
(Element : not null access Map_Sfixed_32Sfixed_32Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Sfixed_32Sfixed_32Entry_Variable_Reference
(Self : aliased in out Map_Sfixed_32Sfixed_32Entry_Vector;
Index : Positive)
return Map_Sfixed_32Sfixed_32Entry_Variable_Reference
with Inline;
type Map_Sfixed_32Sfixed_32Entry_Constant_Reference
(Element : not null access constant Map_Sfixed_32Sfixed_32Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Sfixed_32Sfixed_32Entry_Constant_Reference
(Self : aliased Map_Sfixed_32Sfixed_32Entry_Vector;
Index : Positive)
return Map_Sfixed_32Sfixed_32Entry_Constant_Reference
with Inline;
type Map_Sfixed_64Sfixed_64Entry is
record
Key : PB_Support.Integer_64_Vectors.Option;
Value : PB_Support.Integer_64_Vectors.Option;
end record;
type Optional_Map_Sfixed_64Sfixed_64Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Sfixed_64Sfixed_64Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Sfixed_64Sfixed_64Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Sfixed_64Sfixed_64Entry_Vector);
procedure Append
(Self : in out Map_Sfixed_64Sfixed_64Entry_Vector;
V : Map_Sfixed_64Sfixed_64Entry);
type Map_Sfixed_64Sfixed_64Entry_Variable_Reference
(Element : not null access Map_Sfixed_64Sfixed_64Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Sfixed_64Sfixed_64Entry_Variable_Reference
(Self : aliased in out Map_Sfixed_64Sfixed_64Entry_Vector;
Index : Positive)
return Map_Sfixed_64Sfixed_64Entry_Variable_Reference
with Inline;
type Map_Sfixed_64Sfixed_64Entry_Constant_Reference
(Element : not null access constant Map_Sfixed_64Sfixed_64Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Sfixed_64Sfixed_64Entry_Constant_Reference
(Self : aliased Map_Sfixed_64Sfixed_64Entry_Vector;
Index : Positive)
return Map_Sfixed_64Sfixed_64Entry_Constant_Reference
with Inline;
type Map_Int_32Float_Entry is
record
Key : PB_Support.Integer_32_Vectors.Option;
Value : PB_Support.IEEE_Float_32_Vectors.Option;
end record;
type Optional_Map_Int_32Float_Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Int_32Float_Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Int_32Float_Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Int_32Float_Entry_Vector);
procedure Append
(Self : in out Map_Int_32Float_Entry_Vector;
V : Map_Int_32Float_Entry);
type Map_Int_32Float_Entry_Variable_Reference
(Element : not null access Map_Int_32Float_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Int_32Float_Entry_Variable_Reference
(Self : aliased in out Map_Int_32Float_Entry_Vector;
Index : Positive)
return Map_Int_32Float_Entry_Variable_Reference
with Inline;
type Map_Int_32Float_Entry_Constant_Reference
(Element : not null access constant Map_Int_32Float_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Int_32Float_Entry_Constant_Reference
(Self : aliased Map_Int_32Float_Entry_Vector;
Index : Positive)
return Map_Int_32Float_Entry_Constant_Reference
with Inline;
type Map_Int_32Double_Entry is
record
Key : PB_Support.Integer_32_Vectors.Option;
Value : PB_Support.IEEE_Float_64_Vectors.Option;
end record;
type Optional_Map_Int_32Double_Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Int_32Double_Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Int_32Double_Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Int_32Double_Entry_Vector);
procedure Append
(Self : in out Map_Int_32Double_Entry_Vector;
V : Map_Int_32Double_Entry);
type Map_Int_32Double_Entry_Variable_Reference
(Element : not null access Map_Int_32Double_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Int_32Double_Entry_Variable_Reference
(Self : aliased in out Map_Int_32Double_Entry_Vector;
Index : Positive)
return Map_Int_32Double_Entry_Variable_Reference
with Inline;
type Map_Int_32Double_Entry_Constant_Reference
(Element : not null access constant Map_Int_32Double_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Int_32Double_Entry_Constant_Reference
(Self : aliased Map_Int_32Double_Entry_Vector;
Index : Positive)
return Map_Int_32Double_Entry_Constant_Reference
with Inline;
type Map_Bool_Bool_Entry is
record
Key : PB_Support.Boolean_Vectors.Option;
Value : PB_Support.Boolean_Vectors.Option;
end record;
type Optional_Map_Bool_Bool_Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_Bool_Bool_Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_Bool_Bool_Entry_Vector) return Natural;
procedure Clear (Self : in out Map_Bool_Bool_Entry_Vector);
procedure Append
(Self : in out Map_Bool_Bool_Entry_Vector;
V : Map_Bool_Bool_Entry);
type Map_Bool_Bool_Entry_Variable_Reference
(Element : not null access Map_Bool_Bool_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Bool_Bool_Entry_Variable_Reference
(Self : aliased in out Map_Bool_Bool_Entry_Vector;
Index : Positive)
return Map_Bool_Bool_Entry_Variable_Reference
with Inline;
type Map_Bool_Bool_Entry_Constant_Reference
(Element : not null access constant Map_Bool_Bool_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_Bool_Bool_Entry_Constant_Reference
(Self : aliased Map_Bool_Bool_Entry_Vector;
Index : Positive)
return Map_Bool_Bool_Entry_Constant_Reference
with Inline;
type Map_String_String_Entry is
record
Key : PB_Support.Universal_String_Vectors.Option;
Value : PB_Support.Universal_String_Vectors.Option;
end record;
type Optional_Map_String_String_Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_String_String_Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_String_String_Entry_Vector) return Natural;
procedure Clear (Self : in out Map_String_String_Entry_Vector);
procedure Append
(Self : in out Map_String_String_Entry_Vector;
V : Map_String_String_Entry);
type Map_String_String_Entry_Variable_Reference
(Element : not null access Map_String_String_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_String_Entry_Variable_Reference
(Self : aliased in out Map_String_String_Entry_Vector;
Index : Positive)
return Map_String_String_Entry_Variable_Reference
with Inline;
type Map_String_String_Entry_Constant_Reference
(Element : not null access constant Map_String_String_Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_String_Entry_Constant_Reference
(Self : aliased Map_String_String_Entry_Vector;
Index : Positive)
return Map_String_String_Entry_Constant_Reference
with Inline;
type Map_String_Bytes_Entry is
record
Key : PB_Support.Universal_String_Vectors.Option;
Value : PB_Support.Stream_Element_Vector_Vectors.Option;
end record;
type Optional_Map_String_Bytes_Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_String_Bytes_Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_String_Bytes_Entry_Vector) return Natural;
procedure Clear (Self : in out Map_String_Bytes_Entry_Vector);
procedure Append
(Self : in out Map_String_Bytes_Entry_Vector;
V : Map_String_Bytes_Entry);
type Map_String_Bytes_Entry_Variable_Reference
(Element : not null access Map_String_Bytes_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_Bytes_Entry_Variable_Reference
(Self : aliased in out Map_String_Bytes_Entry_Vector;
Index : Positive)
return Map_String_Bytes_Entry_Variable_Reference
with Inline;
type Map_String_Bytes_Entry_Constant_Reference
(Element : not null access constant Map_String_Bytes_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_Bytes_Entry_Constant_Reference
(Self : aliased Map_String_Bytes_Entry_Vector;
Index : Positive)
return Map_String_Bytes_Entry_Constant_Reference
with Inline;
type Map_String_Nested_Enum_Entry is
record
Key : PB_Support.Universal_String_Vectors.Option;
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Nested_Enum_Vectors.Option;
end record;
type Optional_Map_String_Nested_Enum_Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_String_Nested_Enum_Entry;
when False =>
null;
end case;
end record;
function Length (Self : Map_String_Nested_Enum_Entry_Vector) return Natural;
procedure Clear (Self : in out Map_String_Nested_Enum_Entry_Vector);
procedure Append
(Self : in out Map_String_Nested_Enum_Entry_Vector;
V : Map_String_Nested_Enum_Entry);
type Map_String_Nested_Enum_Entry_Variable_Reference
(Element : not null access Map_String_Nested_Enum_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_Nested_Enum_Entry_Variable_Reference
(Self : aliased in out Map_String_Nested_Enum_Entry_Vector;
Index : Positive)
return Map_String_Nested_Enum_Entry_Variable_Reference
with Inline;
type Map_String_Nested_Enum_Entry_Constant_Reference
(Element : not null access constant Map_String_Nested_Enum_Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_Nested_Enum_Entry_Constant_Reference
(Self : aliased Map_String_Nested_Enum_Entry_Vector;
Index : Positive)
return Map_String_Nested_Enum_Entry_Constant_Reference
with Inline;
type Map_String_Foreign_Enum_Entry is
record
Key : PB_Support.Universal_String_Vectors.Option;
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Foreign_Enum_Proto_2_Vectors.Option;
end record;
type Optional_Map_String_Foreign_Enum_Entry (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_String_Foreign_Enum_Entry;
when False =>
null;
end case;
end record;
function Length
(Self : Map_String_Foreign_Enum_Entry_Vector)
return Natural;
procedure Clear (Self : in out Map_String_Foreign_Enum_Entry_Vector);
procedure Append
(Self : in out Map_String_Foreign_Enum_Entry_Vector;
V : Map_String_Foreign_Enum_Entry);
type Map_String_Foreign_Enum_Entry_Variable_Reference
(Element : not null access Map_String_Foreign_Enum_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_Foreign_Enum_Entry_Variable_Reference
(Self : aliased in out Map_String_Foreign_Enum_Entry_Vector;
Index : Positive)
return Map_String_Foreign_Enum_Entry_Variable_Reference
with Inline;
type Map_String_Foreign_Enum_Entry_Constant_Reference
(Element : not null access constant Map_String_Foreign_Enum_Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_Foreign_Enum_Entry_Constant_Reference
(Self : aliased Map_String_Foreign_Enum_Entry_Vector;
Index : Positive)
return Map_String_Foreign_Enum_Entry_Constant_Reference
with Inline;
type Data is
record
Group_Int_32 : PB_Support.Integer_32_Vectors.Option;
Group_Uint_32 : PB_Support.Unsigned_32_Vectors.Option;
end record;
type Optional_Data (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Data;
when False =>
null;
end case;
end record;
function Length (Self : Data_Vector) return Natural;
procedure Clear (Self : in out Data_Vector);
procedure Append (Self : in out Data_Vector; V : Data);
type Data_Variable_Reference (Element : not null access Data) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Data_Variable_Reference
(Self : aliased in out Data_Vector;
Index : Positive)
return Data_Variable_Reference
with Inline;
type Data_Constant_Reference (Element : not null access constant Data) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Data_Constant_Reference
(Self : aliased Data_Vector;
Index : Positive)
return Data_Constant_Reference
with Inline;
type Message_Set_Correct is null record;
type Optional_Message_Set_Correct (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Message_Set_Correct;
when False =>
null;
end case;
end record;
function Length (Self : Message_Set_Correct_Vector) return Natural;
procedure Clear (Self : in out Message_Set_Correct_Vector);
procedure Append
(Self : in out Message_Set_Correct_Vector;
V : Message_Set_Correct);
type Message_Set_Correct_Variable_Reference
(Element : not null access Message_Set_Correct) is null record
with Implicit_Dereference => Element;
not overriding function Get_Message_Set_Correct_Variable_Reference
(Self : aliased in out Message_Set_Correct_Vector;
Index : Positive)
return Message_Set_Correct_Variable_Reference
with Inline;
type Message_Set_Correct_Constant_Reference
(Element : not null access constant Message_Set_Correct) is null record
with Implicit_Dereference => Element;
not overriding function Get_Message_Set_Correct_Constant_Reference
(Self : aliased Message_Set_Correct_Vector;
Index : Positive)
return Message_Set_Correct_Constant_Reference
with Inline;
type Message_Set_Correct_Extension_1 is
record
Str : PB_Support.Universal_String_Vectors.Option;
end record;
type Optional_Message_Set_Correct_Extension_1
(Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Message_Set_Correct_Extension_1;
when False =>
null;
end case;
end record;
function Length
(Self : Message_Set_Correct_Extension_1_Vector)
return Natural;
procedure Clear (Self : in out Message_Set_Correct_Extension_1_Vector);
procedure Append
(Self : in out Message_Set_Correct_Extension_1_Vector;
V : Message_Set_Correct_Extension_1);
type Message_Set_Correct_Extension_1_Variable_Reference
(Element : not null access Message_Set_Correct_Extension_1) is null record
with Implicit_Dereference => Element;
not overriding function Get_Message_Set_Correct_Extension_1_Variable_Reference
(Self : aliased in out Message_Set_Correct_Extension_1_Vector;
Index : Positive)
return Message_Set_Correct_Extension_1_Variable_Reference
with Inline;
type Message_Set_Correct_Extension_1_Constant_Reference
(Element : not null access constant Message_Set_Correct_Extension_1) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Message_Set_Correct_Extension_1_Constant_Reference
(Self : aliased Message_Set_Correct_Extension_1_Vector;
Index : Positive)
return Message_Set_Correct_Extension_1_Constant_Reference
with Inline;
type Message_Set_Correct_Extension_2 is
record
I : PB_Support.Integer_32_Vectors.Option;
end record;
type Optional_Message_Set_Correct_Extension_2
(Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Message_Set_Correct_Extension_2;
when False =>
null;
end case;
end record;
function Length
(Self : Message_Set_Correct_Extension_2_Vector)
return Natural;
procedure Clear (Self : in out Message_Set_Correct_Extension_2_Vector);
procedure Append
(Self : in out Message_Set_Correct_Extension_2_Vector;
V : Message_Set_Correct_Extension_2);
type Message_Set_Correct_Extension_2_Variable_Reference
(Element : not null access Message_Set_Correct_Extension_2) is null record
with Implicit_Dereference => Element;
not overriding function Get_Message_Set_Correct_Extension_2_Variable_Reference
(Self : aliased in out Message_Set_Correct_Extension_2_Vector;
Index : Positive)
return Message_Set_Correct_Extension_2_Variable_Reference
with Inline;
type Message_Set_Correct_Extension_2_Constant_Reference
(Element : not null access constant Message_Set_Correct_Extension_2) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Message_Set_Correct_Extension_2_Constant_Reference
(Self : aliased Message_Set_Correct_Extension_2_Vector;
Index : Positive)
return Message_Set_Correct_Extension_2_Constant_Reference
with Inline;
type Foreign_Message_Proto_2 is
record
C : PB_Support.Integer_32_Vectors.Option;
end record;
type Optional_Foreign_Message_Proto_2 (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Foreign_Message_Proto_2;
when False =>
null;
end case;
end record;
function Length (Self : Foreign_Message_Proto_2_Vector) return Natural;
procedure Clear (Self : in out Foreign_Message_Proto_2_Vector);
procedure Append
(Self : in out Foreign_Message_Proto_2_Vector;
V : Foreign_Message_Proto_2);
type Foreign_Message_Proto_2_Variable_Reference
(Element : not null access Foreign_Message_Proto_2) is null record
with Implicit_Dereference => Element;
not overriding function Get_Foreign_Message_Proto_2_Variable_Reference
(Self : aliased in out Foreign_Message_Proto_2_Vector;
Index : Positive)
return Foreign_Message_Proto_2_Variable_Reference
with Inline;
type Foreign_Message_Proto_2_Constant_Reference
(Element : not null access constant Foreign_Message_Proto_2) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Foreign_Message_Proto_2_Constant_Reference
(Self : aliased Foreign_Message_Proto_2_Vector;
Index : Positive)
return Foreign_Message_Proto_2_Constant_Reference
with Inline;
type Optional_Group is
record
A : PB_Support.Integer_32_Vectors.Option;
end record;
type Optional_Optional_Group (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Optional_Group;
when False =>
null;
end case;
end record;
function Length (Self : Optional_Group_Vector) return Natural;
procedure Clear (Self : in out Optional_Group_Vector);
procedure Append
(Self : in out Optional_Group_Vector;
V : Optional_Group);
type Optional_Group_Variable_Reference
(Element : not null access Optional_Group) is null record
with Implicit_Dereference => Element;
not overriding function Get_Optional_Group_Variable_Reference
(Self : aliased in out Optional_Group_Vector;
Index : Positive)
return Optional_Group_Variable_Reference
with Inline;
type Optional_Group_Constant_Reference
(Element : not null access constant Optional_Group) is null record
with Implicit_Dereference => Element;
not overriding function Get_Optional_Group_Constant_Reference
(Self : aliased Optional_Group_Vector;
Index : Positive)
return Optional_Group_Constant_Reference
with Inline;
type Unknown_To_Test_All_Types is
record
Optional_Int_32 : PB_Support.Integer_32_Vectors.Option;
Optional_String : PB_Support.Universal_String_Vectors.Option;
Nested_Message : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Optional_Foreign_Message_Proto_2;
Optionalgroup : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Optional_Optional_Group;
Optional_Bool : PB_Support.Boolean_Vectors.Option;
Repeated_Int_32 : PB_Support.Integer_32_Vectors.Vector;
end record;
type Optional_Unknown_To_Test_All_Types (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Unknown_To_Test_All_Types;
when False =>
null;
end case;
end record;
function Length (Self : Unknown_To_Test_All_Types_Vector) return Natural;
procedure Clear (Self : in out Unknown_To_Test_All_Types_Vector);
procedure Append
(Self : in out Unknown_To_Test_All_Types_Vector;
V : Unknown_To_Test_All_Types);
type Unknown_To_Test_All_Types_Variable_Reference
(Element : not null access Unknown_To_Test_All_Types) is null record
with Implicit_Dereference => Element;
not overriding function Get_Unknown_To_Test_All_Types_Variable_Reference
(Self : aliased in out Unknown_To_Test_All_Types_Vector;
Index : Positive)
return Unknown_To_Test_All_Types_Variable_Reference
with Inline;
type Unknown_To_Test_All_Types_Constant_Reference
(Element : not null access constant Unknown_To_Test_All_Types) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Unknown_To_Test_All_Types_Constant_Reference
(Self : aliased Unknown_To_Test_All_Types_Vector;
Index : Positive)
return Unknown_To_Test_All_Types_Constant_Reference
with Inline;
type Map_String_Foreign_Message_Entry is
record
Key : PB_Support.Universal_String_Vectors.Option;
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Optional_Foreign_Message_Proto_2;
end record;
type Optional_Map_String_Foreign_Message_Entry
(Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_String_Foreign_Message_Entry;
when False =>
null;
end case;
end record;
function Length
(Self : Map_String_Foreign_Message_Entry_Vector)
return Natural;
procedure Clear (Self : in out Map_String_Foreign_Message_Entry_Vector);
procedure Append
(Self : in out Map_String_Foreign_Message_Entry_Vector;
V : Map_String_Foreign_Message_Entry);
type Map_String_Foreign_Message_Entry_Variable_Reference
(Element : not null access Map_String_Foreign_Message_Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_Foreign_Message_Entry_Variable_Reference
(Self : aliased in out Map_String_Foreign_Message_Entry_Vector;
Index : Positive)
return Map_String_Foreign_Message_Entry_Variable_Reference
with Inline;
type Map_String_Foreign_Message_Entry_Constant_Reference
(Element : not null access constant Map_String_Foreign_Message_Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_Foreign_Message_Entry_Constant_Reference
(Self : aliased Map_String_Foreign_Message_Entry_Vector;
Index : Positive)
return Map_String_Foreign_Message_Entry_Constant_Reference
with Inline;
type Nested_Message is
record
A : PB_Support.Integer_32_Vectors.Option;
Corecursive : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Test_All_Types_Proto_2_Vector;
end record;
type Optional_Nested_Message (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Nested_Message;
when False =>
null;
end case;
end record;
function Length (Self : Nested_Message_Vector) return Natural;
procedure Clear (Self : in out Nested_Message_Vector);
procedure Append
(Self : in out Nested_Message_Vector;
V : Nested_Message);
type Nested_Message_Variable_Reference
(Element : not null access Nested_Message) is null record
with Implicit_Dereference => Element;
not overriding function Get_Nested_Message_Variable_Reference
(Self : aliased in out Nested_Message_Vector;
Index : Positive)
return Nested_Message_Variable_Reference
with Inline;
type Nested_Message_Constant_Reference
(Element : not null access constant Nested_Message) is null record
with Implicit_Dereference => Element;
not overriding function Get_Nested_Message_Constant_Reference
(Self : aliased Nested_Message_Vector;
Index : Positive)
return Nested_Message_Constant_Reference
with Inline;
type Map_String_Nested_Message_Entry is
record
Key : PB_Support.Universal_String_Vectors.Option;
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Optional_Nested_Message;
end record;
type Optional_Map_String_Nested_Message_Entry
(Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Map_String_Nested_Message_Entry;
when False =>
null;
end case;
end record;
function Length
(Self : Map_String_Nested_Message_Entry_Vector)
return Natural;
procedure Clear (Self : in out Map_String_Nested_Message_Entry_Vector);
procedure Append
(Self : in out Map_String_Nested_Message_Entry_Vector;
V : Map_String_Nested_Message_Entry);
type Map_String_Nested_Message_Entry_Variable_Reference
(Element : not null access Map_String_Nested_Message_Entry) is null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_Nested_Message_Entry_Variable_Reference
(Self : aliased in out Map_String_Nested_Message_Entry_Vector;
Index : Positive)
return Map_String_Nested_Message_Entry_Variable_Reference
with Inline;
type Map_String_Nested_Message_Entry_Constant_Reference
(Element : not null access constant Map_String_Nested_Message_Entry) is
null record
with Implicit_Dereference => Element;
not overriding function Get_Map_String_Nested_Message_Entry_Constant_Reference
(Self : aliased Map_String_Nested_Message_Entry_Vector;
Index : Positive)
return Map_String_Nested_Message_Entry_Constant_Reference
with Inline;
type Test_All_Types_Proto_2_Variant_Kind is
(Oneof_Field_Not_Set,
Oneof_Uint_32_Kind ,
Oneof_Nested_Message_Kind,
Oneof_String_Kind ,
Oneof_Bytes_Kind ,
Oneof_Bool_Kind ,
Oneof_Uint_64_Kind ,
Oneof_Float_Kind ,
Oneof_Double_Kind ,
Oneof_Enum_Kind );
type Test_All_Types_Proto_2_Variant
(Oneof_Field : Test_All_Types_Proto_2_Variant_Kind := Oneof_Field_Not_Set) is
record
case Oneof_Field is
when Oneof_Field_Not_Set =>
null;
when Oneof_Uint_32_Kind =>
Oneof_Uint_32 : Interfaces.Unsigned_32 := 0;
when Oneof_Nested_Message_Kind =>
Oneof_Nested_Message : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Nested_Message;
when Oneof_String_Kind =>
Oneof_String : League.Strings.Universal_String;
when Oneof_Bytes_Kind =>
Oneof_Bytes : League.Stream_Element_Vectors
.Stream_Element_Vector;
when Oneof_Bool_Kind =>
Oneof_Bool : Boolean := False;
when Oneof_Uint_64_Kind =>
Oneof_Uint_64 : Interfaces.Unsigned_64 := 0;
when Oneof_Float_Kind =>
Oneof_Float : Interfaces.IEEE_Float_32 := 0.0;
when Oneof_Double_Kind =>
Oneof_Double : Interfaces.IEEE_Float_64 := 0.0;
when Oneof_Enum_Kind =>
Oneof_Enum : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Nested_Enum :=
Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2.FOO;
end case;
end record;
type Test_All_Types_Proto_2 is
record
Optional_Int_32 : PB_Support.Integer_32_Vectors.Option;
Optional_Int_64 : PB_Support.Integer_64_Vectors.Option;
Optional_Uint_32 : PB_Support.Unsigned_32_Vectors.Option;
Optional_Uint_64 : PB_Support.Unsigned_64_Vectors.Option;
Optional_Sint_32 : PB_Support.Integer_32_Vectors.Option;
Optional_Sint_64 : PB_Support.Integer_64_Vectors.Option;
Optional_Fixed_32 : PB_Support.Unsigned_32_Vectors.Option;
Optional_Fixed_64 : PB_Support.Unsigned_64_Vectors.Option;
Optional_Sfixed_32 : PB_Support.Integer_32_Vectors.Option;
Optional_Sfixed_64 : PB_Support.Integer_64_Vectors.Option;
Optional_Float : PB_Support.IEEE_Float_32_Vectors.Option;
Optional_Double : PB_Support.IEEE_Float_64_Vectors.Option;
Optional_Bool : PB_Support.Boolean_Vectors.Option;
Optional_String : PB_Support.Universal_String_Vectors
.Option;
Optional_Bytes : PB_Support.Stream_Element_Vector_Vectors
.Option;
Optional_Nested_Message : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Optional_Nested_Message;
Optional_Foreign_Message : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Optional_Foreign_Message_Proto_2;
Optional_Nested_Enum : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Nested_Enum_Vectors.Option;
Optional_Foreign_Enum : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Foreign_Enum_Proto_2_Vectors.Option;
Optional_String_Piece : PB_Support.Universal_String_Vectors
.Option;
Optional_Cord : PB_Support.Universal_String_Vectors
.Option;
Recursive_Message : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Test_All_Types_Proto_2_Vector;
Repeated_Int_32 : PB_Support.Integer_32_Vectors.Vector;
Repeated_Int_64 : PB_Support.Integer_64_Vectors.Vector;
Repeated_Uint_32 : PB_Support.Unsigned_32_Vectors.Vector;
Repeated_Uint_64 : PB_Support.Unsigned_64_Vectors.Vector;
Repeated_Sint_32 : PB_Support.Integer_32_Vectors.Vector;
Repeated_Sint_64 : PB_Support.Integer_64_Vectors.Vector;
Repeated_Fixed_32 : PB_Support.Unsigned_32_Vectors.Vector;
Repeated_Fixed_64 : PB_Support.Unsigned_64_Vectors.Vector;
Repeated_Sfixed_32 : PB_Support.Integer_32_Vectors.Vector;
Repeated_Sfixed_64 : PB_Support.Integer_64_Vectors.Vector;
Repeated_Float : PB_Support.IEEE_Float_32_Vectors.Vector;
Repeated_Double : PB_Support.IEEE_Float_64_Vectors.Vector;
Repeated_Bool : PB_Support.Boolean_Vectors.Vector;
Repeated_String : League.String_Vectors
.Universal_String_Vector;
Repeated_Bytes : PB_Support.Stream_Element_Vector_Vectors
.Vector;
Repeated_Nested_Message : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Nested_Message_Vector;
Repeated_Foreign_Message : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Foreign_Message_Proto_2_Vector;
Repeated_Nested_Enum : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Nested_Enum_Vectors.Vector;
Repeated_Foreign_Enum : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Foreign_Enum_Proto_2_Vectors.Vector;
Repeated_String_Piece : League.String_Vectors
.Universal_String_Vector;
Repeated_Cord : League.String_Vectors
.Universal_String_Vector;
Packed_Int_32 : PB_Support.Integer_32_Vectors.Vector;
Packed_Int_64 : PB_Support.Integer_64_Vectors.Vector;
Packed_Uint_32 : PB_Support.Unsigned_32_Vectors.Vector;
Packed_Uint_64 : PB_Support.Unsigned_64_Vectors.Vector;
Packed_Sint_32 : PB_Support.Integer_32_Vectors.Vector;
Packed_Sint_64 : PB_Support.Integer_64_Vectors.Vector;
Packed_Fixed_32 : PB_Support.Unsigned_32_Vectors.Vector;
Packed_Fixed_64 : PB_Support.Unsigned_64_Vectors.Vector;
Packed_Sfixed_32 : PB_Support.Integer_32_Vectors.Vector;
Packed_Sfixed_64 : PB_Support.Integer_64_Vectors.Vector;
Packed_Float : PB_Support.IEEE_Float_32_Vectors.Vector;
Packed_Double : PB_Support.IEEE_Float_64_Vectors.Vector;
Packed_Bool : PB_Support.Boolean_Vectors.Vector;
Packed_Nested_Enum : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Nested_Enum_Vectors.Vector;
Unpacked_Int_32 : PB_Support.Integer_32_Vectors.Vector;
Unpacked_Int_64 : PB_Support.Integer_64_Vectors.Vector;
Unpacked_Uint_32 : PB_Support.Unsigned_32_Vectors.Vector;
Unpacked_Uint_64 : PB_Support.Unsigned_64_Vectors.Vector;
Unpacked_Sint_32 : PB_Support.Integer_32_Vectors.Vector;
Unpacked_Sint_64 : PB_Support.Integer_64_Vectors.Vector;
Unpacked_Fixed_32 : PB_Support.Unsigned_32_Vectors.Vector;
Unpacked_Fixed_64 : PB_Support.Unsigned_64_Vectors.Vector;
Unpacked_Sfixed_32 : PB_Support.Integer_32_Vectors.Vector;
Unpacked_Sfixed_64 : PB_Support.Integer_64_Vectors.Vector;
Unpacked_Float : PB_Support.IEEE_Float_32_Vectors.Vector;
Unpacked_Double : PB_Support.IEEE_Float_64_Vectors.Vector;
Unpacked_Bool : PB_Support.Boolean_Vectors.Vector;
Unpacked_Nested_Enum : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Nested_Enum_Vectors.Vector;
Map_Int_32_Int_32 : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Int_32Int_32Entry_Vector;
Map_Int_64_Int_64 : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Int_64Int_64Entry_Vector;
Map_Uint_32_Uint_32 : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Uint_32Uint_32Entry_Vector;
Map_Uint_64_Uint_64 : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Uint_64Uint_64Entry_Vector;
Map_Sint_32_Sint_32 : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Sint_32Sint_32Entry_Vector;
Map_Sint_64_Sint_64 : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Sint_64Sint_64Entry_Vector;
Map_Fixed_32_Fixed_32 : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Fixed_32Fixed_32Entry_Vector;
Map_Fixed_64_Fixed_64 : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Fixed_64Fixed_64Entry_Vector;
Map_Sfixed_32_Sfixed_32 : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Sfixed_32Sfixed_32Entry_Vector;
Map_Sfixed_64_Sfixed_64 : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Sfixed_64Sfixed_64Entry_Vector;
Map_Int_32_Float : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Int_32Float_Entry_Vector;
Map_Int_32_Double : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Int_32Double_Entry_Vector;
Map_Bool_Bool : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_Bool_Bool_Entry_Vector;
Map_String_String : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_String_String_Entry_Vector;
Map_String_Bytes : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_String_Bytes_Entry_Vector;
Map_String_Nested_Message : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_String_Nested_Message_Entry_Vector;
Map_String_Foreign_Message : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_String_Foreign_Message_Entry_Vector;
Map_String_Nested_Enum : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_String_Nested_Enum_Entry_Vector;
Map_String_Foreign_Enum : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Map_String_Foreign_Enum_Entry_Vector;
Data : Protobuf_Test_Messages.Proto_2
.Test_Messages_Proto_2.Optional_Data;
Fieldname_1 : PB_Support.Integer_32_Vectors.Option;
Field_Name_2 : PB_Support.Integer_32_Vectors.Option;
Field_Name_3 : PB_Support.Integer_32_Vectors.Option;
Field_Name_4 : PB_Support.Integer_32_Vectors.Option;
Field_0name_5 : PB_Support.Integer_32_Vectors.Option;
Field_0_Name_6 : PB_Support.Integer_32_Vectors.Option;
Field_Name_7 : PB_Support.Integer_32_Vectors.Option;
Field_Name_8 : PB_Support.Integer_32_Vectors.Option;
Field_Name_9 : PB_Support.Integer_32_Vectors.Option;
Field_Name_10 : PB_Support.Integer_32_Vectors.Option;
FIELD_NAME11 : PB_Support.Integer_32_Vectors.Option;
FIELD_Name_12 : PB_Support.Integer_32_Vectors.Option;
Field_Name_13 : PB_Support.Integer_32_Vectors.Option;
Field_Name_14 : PB_Support.Integer_32_Vectors.Option;
Field_Name_15 : PB_Support.Integer_32_Vectors.Option;
Field_Name_16 : PB_Support.Integer_32_Vectors.Option;
Field_Name_17 : PB_Support.Integer_32_Vectors.Option;
Field_Name_18 : PB_Support.Integer_32_Vectors.Option;
Variant : Test_All_Types_Proto_2_Variant;
end record;
type Optional_Test_All_Types_Proto_2 (Is_Set : Boolean := False) is
record
case Is_Set is
when True =>
Value : Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2
.Test_All_Types_Proto_2;
when False =>
null;
end case;
end record;
function Length (Self : Test_All_Types_Proto_2_Vector) return Natural;
procedure Clear (Self : in out Test_All_Types_Proto_2_Vector);
procedure Append
(Self : in out Test_All_Types_Proto_2_Vector;
V : Test_All_Types_Proto_2);
type Test_All_Types_Proto_2_Variable_Reference
(Element : not null access Test_All_Types_Proto_2) is null record
with Implicit_Dereference => Element;
not overriding function Get_Test_All_Types_Proto_2_Variable_Reference
(Self : aliased in out Test_All_Types_Proto_2_Vector;
Index : Positive)
return Test_All_Types_Proto_2_Variable_Reference
with Inline;
type Test_All_Types_Proto_2_Constant_Reference
(Element : not null access constant Test_All_Types_Proto_2) is null record
with Implicit_Dereference => Element;
not overriding function Get_Test_All_Types_Proto_2_Constant_Reference
(Self : aliased Test_All_Types_Proto_2_Vector;
Index : Positive)
return Test_All_Types_Proto_2_Constant_Reference
with Inline;
private
procedure Read_Nested_Message
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Nested_Message);
procedure Write_Nested_Message
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Nested_Message);
for Nested_Message'Read use Read_Nested_Message;
for Nested_Message'Write use Write_Nested_Message;
type Nested_Message_Array is
array (Positive range <>) of aliased Nested_Message;
type Nested_Message_Array_Access is access Nested_Message_Array;
type Nested_Message_Vector is
new Ada.Finalization.Controlled
with record
Data : Nested_Message_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Nested_Message_Vector);
overriding procedure Finalize (Self : in out Nested_Message_Vector);
procedure Read_Map_Int_32Int_32Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Int_32Int_32Entry);
procedure Write_Map_Int_32Int_32Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Int_32Int_32Entry);
for Map_Int_32Int_32Entry'Read use Read_Map_Int_32Int_32Entry;
for Map_Int_32Int_32Entry'Write use Write_Map_Int_32Int_32Entry;
type Map_Int_32Int_32Entry_Array is
array (Positive range <>) of aliased Map_Int_32Int_32Entry;
type Map_Int_32Int_32Entry_Array_Access is
access Map_Int_32Int_32Entry_Array;
type Map_Int_32Int_32Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Int_32Int_32Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Map_Int_32Int_32Entry_Vector);
overriding procedure Finalize (Self : in out Map_Int_32Int_32Entry_Vector);
procedure Read_Map_Int_64Int_64Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Int_64Int_64Entry);
procedure Write_Map_Int_64Int_64Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Int_64Int_64Entry);
for Map_Int_64Int_64Entry'Read use Read_Map_Int_64Int_64Entry;
for Map_Int_64Int_64Entry'Write use Write_Map_Int_64Int_64Entry;
type Map_Int_64Int_64Entry_Array is
array (Positive range <>) of aliased Map_Int_64Int_64Entry;
type Map_Int_64Int_64Entry_Array_Access is
access Map_Int_64Int_64Entry_Array;
type Map_Int_64Int_64Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Int_64Int_64Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Map_Int_64Int_64Entry_Vector);
overriding procedure Finalize (Self : in out Map_Int_64Int_64Entry_Vector);
procedure Read_Map_Uint_32Uint_32Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Uint_32Uint_32Entry);
procedure Write_Map_Uint_32Uint_32Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Uint_32Uint_32Entry);
for Map_Uint_32Uint_32Entry'Read use Read_Map_Uint_32Uint_32Entry;
for Map_Uint_32Uint_32Entry'Write use Write_Map_Uint_32Uint_32Entry;
type Map_Uint_32Uint_32Entry_Array is
array (Positive range <>) of aliased Map_Uint_32Uint_32Entry;
type Map_Uint_32Uint_32Entry_Array_Access is
access Map_Uint_32Uint_32Entry_Array;
type Map_Uint_32Uint_32Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Uint_32Uint_32Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Map_Uint_32Uint_32Entry_Vector);
overriding procedure Finalize
(Self : in out Map_Uint_32Uint_32Entry_Vector);
procedure Read_Map_Uint_64Uint_64Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Uint_64Uint_64Entry);
procedure Write_Map_Uint_64Uint_64Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Uint_64Uint_64Entry);
for Map_Uint_64Uint_64Entry'Read use Read_Map_Uint_64Uint_64Entry;
for Map_Uint_64Uint_64Entry'Write use Write_Map_Uint_64Uint_64Entry;
type Map_Uint_64Uint_64Entry_Array is
array (Positive range <>) of aliased Map_Uint_64Uint_64Entry;
type Map_Uint_64Uint_64Entry_Array_Access is
access Map_Uint_64Uint_64Entry_Array;
type Map_Uint_64Uint_64Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Uint_64Uint_64Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Map_Uint_64Uint_64Entry_Vector);
overriding procedure Finalize
(Self : in out Map_Uint_64Uint_64Entry_Vector);
procedure Read_Map_Sint_32Sint_32Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Sint_32Sint_32Entry);
procedure Write_Map_Sint_32Sint_32Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Sint_32Sint_32Entry);
for Map_Sint_32Sint_32Entry'Read use Read_Map_Sint_32Sint_32Entry;
for Map_Sint_32Sint_32Entry'Write use Write_Map_Sint_32Sint_32Entry;
type Map_Sint_32Sint_32Entry_Array is
array (Positive range <>) of aliased Map_Sint_32Sint_32Entry;
type Map_Sint_32Sint_32Entry_Array_Access is
access Map_Sint_32Sint_32Entry_Array;
type Map_Sint_32Sint_32Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Sint_32Sint_32Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Map_Sint_32Sint_32Entry_Vector);
overriding procedure Finalize
(Self : in out Map_Sint_32Sint_32Entry_Vector);
procedure Read_Map_Sint_64Sint_64Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Sint_64Sint_64Entry);
procedure Write_Map_Sint_64Sint_64Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Sint_64Sint_64Entry);
for Map_Sint_64Sint_64Entry'Read use Read_Map_Sint_64Sint_64Entry;
for Map_Sint_64Sint_64Entry'Write use Write_Map_Sint_64Sint_64Entry;
type Map_Sint_64Sint_64Entry_Array is
array (Positive range <>) of aliased Map_Sint_64Sint_64Entry;
type Map_Sint_64Sint_64Entry_Array_Access is
access Map_Sint_64Sint_64Entry_Array;
type Map_Sint_64Sint_64Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Sint_64Sint_64Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Map_Sint_64Sint_64Entry_Vector);
overriding procedure Finalize
(Self : in out Map_Sint_64Sint_64Entry_Vector);
procedure Read_Map_Fixed_32Fixed_32Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Fixed_32Fixed_32Entry);
procedure Write_Map_Fixed_32Fixed_32Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Fixed_32Fixed_32Entry);
for Map_Fixed_32Fixed_32Entry'Read use Read_Map_Fixed_32Fixed_32Entry;
for Map_Fixed_32Fixed_32Entry'Write use Write_Map_Fixed_32Fixed_32Entry;
type Map_Fixed_32Fixed_32Entry_Array is
array (Positive range <>) of aliased Map_Fixed_32Fixed_32Entry;
type Map_Fixed_32Fixed_32Entry_Array_Access is
access Map_Fixed_32Fixed_32Entry_Array;
type Map_Fixed_32Fixed_32Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Fixed_32Fixed_32Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust
(Self : in out Map_Fixed_32Fixed_32Entry_Vector);
overriding procedure Finalize
(Self : in out Map_Fixed_32Fixed_32Entry_Vector);
procedure Read_Map_Fixed_64Fixed_64Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Fixed_64Fixed_64Entry);
procedure Write_Map_Fixed_64Fixed_64Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Fixed_64Fixed_64Entry);
for Map_Fixed_64Fixed_64Entry'Read use Read_Map_Fixed_64Fixed_64Entry;
for Map_Fixed_64Fixed_64Entry'Write use Write_Map_Fixed_64Fixed_64Entry;
type Map_Fixed_64Fixed_64Entry_Array is
array (Positive range <>) of aliased Map_Fixed_64Fixed_64Entry;
type Map_Fixed_64Fixed_64Entry_Array_Access is
access Map_Fixed_64Fixed_64Entry_Array;
type Map_Fixed_64Fixed_64Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Fixed_64Fixed_64Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust
(Self : in out Map_Fixed_64Fixed_64Entry_Vector);
overriding procedure Finalize
(Self : in out Map_Fixed_64Fixed_64Entry_Vector);
procedure Read_Map_Sfixed_32Sfixed_32Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Sfixed_32Sfixed_32Entry);
procedure Write_Map_Sfixed_32Sfixed_32Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Sfixed_32Sfixed_32Entry);
for Map_Sfixed_32Sfixed_32Entry'Read use Read_Map_Sfixed_32Sfixed_32Entry;
for Map_Sfixed_32Sfixed_32Entry'Write use Write_Map_Sfixed_32Sfixed_32Entry;
type Map_Sfixed_32Sfixed_32Entry_Array is
array (Positive range <>) of aliased Map_Sfixed_32Sfixed_32Entry;
type Map_Sfixed_32Sfixed_32Entry_Array_Access is
access Map_Sfixed_32Sfixed_32Entry_Array;
type Map_Sfixed_32Sfixed_32Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Sfixed_32Sfixed_32Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust
(Self : in out Map_Sfixed_32Sfixed_32Entry_Vector);
overriding procedure Finalize
(Self : in out Map_Sfixed_32Sfixed_32Entry_Vector);
procedure Read_Map_Sfixed_64Sfixed_64Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Sfixed_64Sfixed_64Entry);
procedure Write_Map_Sfixed_64Sfixed_64Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Sfixed_64Sfixed_64Entry);
for Map_Sfixed_64Sfixed_64Entry'Read use Read_Map_Sfixed_64Sfixed_64Entry;
for Map_Sfixed_64Sfixed_64Entry'Write use Write_Map_Sfixed_64Sfixed_64Entry;
type Map_Sfixed_64Sfixed_64Entry_Array is
array (Positive range <>) of aliased Map_Sfixed_64Sfixed_64Entry;
type Map_Sfixed_64Sfixed_64Entry_Array_Access is
access Map_Sfixed_64Sfixed_64Entry_Array;
type Map_Sfixed_64Sfixed_64Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Sfixed_64Sfixed_64Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust
(Self : in out Map_Sfixed_64Sfixed_64Entry_Vector);
overriding procedure Finalize
(Self : in out Map_Sfixed_64Sfixed_64Entry_Vector);
procedure Read_Map_Int_32Float_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Int_32Float_Entry);
procedure Write_Map_Int_32Float_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Int_32Float_Entry);
for Map_Int_32Float_Entry'Read use Read_Map_Int_32Float_Entry;
for Map_Int_32Float_Entry'Write use Write_Map_Int_32Float_Entry;
type Map_Int_32Float_Entry_Array is
array (Positive range <>) of aliased Map_Int_32Float_Entry;
type Map_Int_32Float_Entry_Array_Access is
access Map_Int_32Float_Entry_Array;
type Map_Int_32Float_Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Int_32Float_Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Map_Int_32Float_Entry_Vector);
overriding procedure Finalize (Self : in out Map_Int_32Float_Entry_Vector);
procedure Read_Map_Int_32Double_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Int_32Double_Entry);
procedure Write_Map_Int_32Double_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Int_32Double_Entry);
for Map_Int_32Double_Entry'Read use Read_Map_Int_32Double_Entry;
for Map_Int_32Double_Entry'Write use Write_Map_Int_32Double_Entry;
type Map_Int_32Double_Entry_Array is
array (Positive range <>) of aliased Map_Int_32Double_Entry;
type Map_Int_32Double_Entry_Array_Access is
access Map_Int_32Double_Entry_Array;
type Map_Int_32Double_Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Int_32Double_Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Map_Int_32Double_Entry_Vector);
overriding procedure Finalize (Self : in out Map_Int_32Double_Entry_Vector);
procedure Read_Map_Bool_Bool_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_Bool_Bool_Entry);
procedure Write_Map_Bool_Bool_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_Bool_Bool_Entry);
for Map_Bool_Bool_Entry'Read use Read_Map_Bool_Bool_Entry;
for Map_Bool_Bool_Entry'Write use Write_Map_Bool_Bool_Entry;
type Map_Bool_Bool_Entry_Array is
array (Positive range <>) of aliased Map_Bool_Bool_Entry;
type Map_Bool_Bool_Entry_Array_Access is access Map_Bool_Bool_Entry_Array;
type Map_Bool_Bool_Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_Bool_Bool_Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Map_Bool_Bool_Entry_Vector);
overriding procedure Finalize (Self : in out Map_Bool_Bool_Entry_Vector);
procedure Read_Map_String_String_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_String_String_Entry);
procedure Write_Map_String_String_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_String_String_Entry);
for Map_String_String_Entry'Read use Read_Map_String_String_Entry;
for Map_String_String_Entry'Write use Write_Map_String_String_Entry;
type Map_String_String_Entry_Array is
array (Positive range <>) of aliased Map_String_String_Entry;
type Map_String_String_Entry_Array_Access is
access Map_String_String_Entry_Array;
type Map_String_String_Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_String_String_Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Map_String_String_Entry_Vector);
overriding procedure Finalize
(Self : in out Map_String_String_Entry_Vector);
procedure Read_Map_String_Bytes_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_String_Bytes_Entry);
procedure Write_Map_String_Bytes_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_String_Bytes_Entry);
for Map_String_Bytes_Entry'Read use Read_Map_String_Bytes_Entry;
for Map_String_Bytes_Entry'Write use Write_Map_String_Bytes_Entry;
type Map_String_Bytes_Entry_Array is
array (Positive range <>) of aliased Map_String_Bytes_Entry;
type Map_String_Bytes_Entry_Array_Access is
access Map_String_Bytes_Entry_Array;
type Map_String_Bytes_Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_String_Bytes_Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Map_String_Bytes_Entry_Vector);
overriding procedure Finalize (Self : in out Map_String_Bytes_Entry_Vector);
procedure Read_Map_String_Nested_Message_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_String_Nested_Message_Entry);
procedure Write_Map_String_Nested_Message_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_String_Nested_Message_Entry);
for Map_String_Nested_Message_Entry'Read use Read_Map_String_Nested_Message_Entry;
for Map_String_Nested_Message_Entry'Write use Write_Map_String_Nested_Message_Entry;
type Map_String_Nested_Message_Entry_Array is
array (Positive range <>) of aliased Map_String_Nested_Message_Entry;
type Map_String_Nested_Message_Entry_Array_Access is
access Map_String_Nested_Message_Entry_Array;
type Map_String_Nested_Message_Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_String_Nested_Message_Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust
(Self : in out Map_String_Nested_Message_Entry_Vector);
overriding procedure Finalize
(Self : in out Map_String_Nested_Message_Entry_Vector);
procedure Read_Map_String_Foreign_Message_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_String_Foreign_Message_Entry);
procedure Write_Map_String_Foreign_Message_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_String_Foreign_Message_Entry);
for Map_String_Foreign_Message_Entry'Read use Read_Map_String_Foreign_Message_Entry;
for Map_String_Foreign_Message_Entry'Write use Write_Map_String_Foreign_Message_Entry;
type Map_String_Foreign_Message_Entry_Array is
array (Positive range <>) of aliased Map_String_Foreign_Message_Entry;
type Map_String_Foreign_Message_Entry_Array_Access is
access Map_String_Foreign_Message_Entry_Array;
type Map_String_Foreign_Message_Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_String_Foreign_Message_Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust
(Self : in out Map_String_Foreign_Message_Entry_Vector);
overriding procedure Finalize
(Self : in out Map_String_Foreign_Message_Entry_Vector);
procedure Read_Map_String_Nested_Enum_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_String_Nested_Enum_Entry);
procedure Write_Map_String_Nested_Enum_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_String_Nested_Enum_Entry);
for Map_String_Nested_Enum_Entry'Read use Read_Map_String_Nested_Enum_Entry;
for Map_String_Nested_Enum_Entry'Write use Write_Map_String_Nested_Enum_Entry;
type Map_String_Nested_Enum_Entry_Array is
array (Positive range <>) of aliased Map_String_Nested_Enum_Entry;
type Map_String_Nested_Enum_Entry_Array_Access is
access Map_String_Nested_Enum_Entry_Array;
type Map_String_Nested_Enum_Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_String_Nested_Enum_Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust
(Self : in out Map_String_Nested_Enum_Entry_Vector);
overriding procedure Finalize
(Self : in out Map_String_Nested_Enum_Entry_Vector);
procedure Read_Map_String_Foreign_Enum_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Map_String_Foreign_Enum_Entry);
procedure Write_Map_String_Foreign_Enum_Entry
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Map_String_Foreign_Enum_Entry);
for Map_String_Foreign_Enum_Entry'Read use Read_Map_String_Foreign_Enum_Entry;
for Map_String_Foreign_Enum_Entry'Write use Write_Map_String_Foreign_Enum_Entry;
type Map_String_Foreign_Enum_Entry_Array is
array (Positive range <>) of aliased Map_String_Foreign_Enum_Entry;
type Map_String_Foreign_Enum_Entry_Array_Access is
access Map_String_Foreign_Enum_Entry_Array;
type Map_String_Foreign_Enum_Entry_Vector is
new Ada.Finalization.Controlled
with record
Data : Map_String_Foreign_Enum_Entry_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust
(Self : in out Map_String_Foreign_Enum_Entry_Vector);
overriding procedure Finalize
(Self : in out Map_String_Foreign_Enum_Entry_Vector);
procedure Read_Data
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Data);
procedure Write_Data
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Data);
for Data'Read use Read_Data;
for Data'Write use Write_Data;
type Data_Array is array (Positive range <>) of aliased Data;
type Data_Array_Access is access Data_Array;
type Data_Vector is
new Ada.Finalization.Controlled
with record
Data : Data_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Data_Vector);
overriding procedure Finalize (Self : in out Data_Vector);
procedure Read_Message_Set_Correct
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Message_Set_Correct);
procedure Write_Message_Set_Correct
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Message_Set_Correct);
for Message_Set_Correct'Read use Read_Message_Set_Correct;
for Message_Set_Correct'Write use Write_Message_Set_Correct;
type Message_Set_Correct_Array is
array (Positive range <>) of aliased Message_Set_Correct;
type Message_Set_Correct_Array_Access is access Message_Set_Correct_Array;
type Message_Set_Correct_Vector is
new Ada.Finalization.Controlled
with record
Data : Message_Set_Correct_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Message_Set_Correct_Vector);
overriding procedure Finalize (Self : in out Message_Set_Correct_Vector);
procedure Read_Message_Set_Correct_Extension_1
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Message_Set_Correct_Extension_1);
procedure Write_Message_Set_Correct_Extension_1
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Message_Set_Correct_Extension_1);
for Message_Set_Correct_Extension_1'Read use Read_Message_Set_Correct_Extension_1;
for Message_Set_Correct_Extension_1'Write use Write_Message_Set_Correct_Extension_1;
type Message_Set_Correct_Extension_1_Array is
array (Positive range <>) of aliased Message_Set_Correct_Extension_1;
type Message_Set_Correct_Extension_1_Array_Access is
access Message_Set_Correct_Extension_1_Array;
type Message_Set_Correct_Extension_1_Vector is
new Ada.Finalization.Controlled
with record
Data : Message_Set_Correct_Extension_1_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust
(Self : in out Message_Set_Correct_Extension_1_Vector);
overriding procedure Finalize
(Self : in out Message_Set_Correct_Extension_1_Vector);
procedure Read_Message_Set_Correct_Extension_2
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Message_Set_Correct_Extension_2);
procedure Write_Message_Set_Correct_Extension_2
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Message_Set_Correct_Extension_2);
for Message_Set_Correct_Extension_2'Read use Read_Message_Set_Correct_Extension_2;
for Message_Set_Correct_Extension_2'Write use Write_Message_Set_Correct_Extension_2;
type Message_Set_Correct_Extension_2_Array is
array (Positive range <>) of aliased Message_Set_Correct_Extension_2;
type Message_Set_Correct_Extension_2_Array_Access is
access Message_Set_Correct_Extension_2_Array;
type Message_Set_Correct_Extension_2_Vector is
new Ada.Finalization.Controlled
with record
Data : Message_Set_Correct_Extension_2_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust
(Self : in out Message_Set_Correct_Extension_2_Vector);
overriding procedure Finalize
(Self : in out Message_Set_Correct_Extension_2_Vector);
procedure Read_Test_All_Types_Proto_2
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Test_All_Types_Proto_2);
procedure Write_Test_All_Types_Proto_2
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Test_All_Types_Proto_2);
for Test_All_Types_Proto_2'Read use Read_Test_All_Types_Proto_2;
for Test_All_Types_Proto_2'Write use Write_Test_All_Types_Proto_2;
type Test_All_Types_Proto_2_Array is
array (Positive range <>) of aliased Test_All_Types_Proto_2;
type Test_All_Types_Proto_2_Array_Access is
access Test_All_Types_Proto_2_Array;
type Test_All_Types_Proto_2_Vector is
new Ada.Finalization.Controlled
with record
Data : Test_All_Types_Proto_2_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Test_All_Types_Proto_2_Vector);
overriding procedure Finalize (Self : in out Test_All_Types_Proto_2_Vector);
procedure Read_Foreign_Message_Proto_2
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Foreign_Message_Proto_2);
procedure Write_Foreign_Message_Proto_2
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Foreign_Message_Proto_2);
for Foreign_Message_Proto_2'Read use Read_Foreign_Message_Proto_2;
for Foreign_Message_Proto_2'Write use Write_Foreign_Message_Proto_2;
type Foreign_Message_Proto_2_Array is
array (Positive range <>) of aliased Foreign_Message_Proto_2;
type Foreign_Message_Proto_2_Array_Access is
access Foreign_Message_Proto_2_Array;
type Foreign_Message_Proto_2_Vector is
new Ada.Finalization.Controlled
with record
Data : Foreign_Message_Proto_2_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Foreign_Message_Proto_2_Vector);
overriding procedure Finalize
(Self : in out Foreign_Message_Proto_2_Vector);
procedure Read_Optional_Group
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Optional_Group);
procedure Write_Optional_Group
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Optional_Group);
for Optional_Group'Read use Read_Optional_Group;
for Optional_Group'Write use Write_Optional_Group;
type Optional_Group_Array is
array (Positive range <>) of aliased Optional_Group;
type Optional_Group_Array_Access is access Optional_Group_Array;
type Optional_Group_Vector is
new Ada.Finalization.Controlled
with record
Data : Optional_Group_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust (Self : in out Optional_Group_Vector);
overriding procedure Finalize (Self : in out Optional_Group_Vector);
procedure Read_Unknown_To_Test_All_Types
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : out Unknown_To_Test_All_Types);
procedure Write_Unknown_To_Test_All_Types
(Stream : access Ada.Streams.Root_Stream_Type'Class;
V : Unknown_To_Test_All_Types);
for Unknown_To_Test_All_Types'Read use Read_Unknown_To_Test_All_Types;
for Unknown_To_Test_All_Types'Write use Write_Unknown_To_Test_All_Types;
type Unknown_To_Test_All_Types_Array is
array (Positive range <>) of aliased Unknown_To_Test_All_Types;
type Unknown_To_Test_All_Types_Array_Access is
access Unknown_To_Test_All_Types_Array;
type Unknown_To_Test_All_Types_Vector is
new Ada.Finalization.Controlled
with record
Data : Unknown_To_Test_All_Types_Array_Access;
Length : Natural := 0;
end record;
overriding procedure Adjust
(Self : in out Unknown_To_Test_All_Types_Vector);
overriding procedure Finalize
(Self : in out Unknown_To_Test_All_Types_Vector);
end Protobuf_Test_Messages.Proto_2.Test_Messages_Proto_2; | 36.730537 | 89 | 0.742694 |
10207b98de281a8d31dff7861522ef35fb07ce80 | 5,256 | adb | Ada | tools/documentation_generator/documentation_generator-wiki.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | tools/documentation_generator/documentation_generator-wiki.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | tools/documentation_generator/documentation_generator-wiki.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | with Ada.Wide_Wide_Text_IO;
with League.Strings;
with Documentation_Generator.Database;
package body Documentation_Generator.Wiki is
use Documentation_Generator.Database;
use type League.Strings.Universal_String;
procedure Generate_Main_Page;
procedure Generate_Type_Page (The_Type : not null Type_Access);
function Wiki_Link
(The_Module : not null Module_Access;
Text : League.Strings.Universal_String)
return League.Strings.Universal_String;
-- Returns wiki format reference to the corresponding wiki page.
function Wiki_Link
(The_Type : not null Type_Access;
Text : League.Strings.Universal_String)
return League.Strings.Universal_String;
-- Returns wiki format reference to the corresponding wiki page.
function Wiki_Resource
(The_Type : not null Type_Access) return League.Strings.Universal_String;
-- Returns wiki resource name for the specified type.
--------------
-- Generate --
--------------
procedure Generate is
begin
Generate_Main_Page;
Iterate (Generate_Type_Page'Access);
end Generate;
------------------------
-- Generate_Type_Page --
------------------------
procedure Generate_Type_Page (The_Type : not null Type_Access) is
File : Ada.Wide_Wide_Text_IO.File_Type;
begin
Ada.Wide_Wide_Text_IO.Create
(File,
Ada.Wide_Wide_Text_IO.Out_File,
"wiki/"
& Wiki_Resource (The_Type).To_UTF_8_String
& ".wiki");
Ada.Wide_Wide_Text_IO.Put_Line (File, "[[PageOutline]]");
Ada.Wide_Wide_Text_IO.New_Line (File);
Ada.Wide_Wide_Text_IO.Put_Line
(File,
"= "
& The_Type.Name.To_Wide_Wide_String
& " Type (declared in "
& The_Type.Compilation_Unit.Name.To_Wide_Wide_String
& " package) =");
Ada.Wide_Wide_Text_IO.New_Line (File);
Ada.Wide_Wide_Text_IO.Put_Line
(File, The_Type.Description.To_Wide_Wide_String);
Ada.Wide_Wide_Text_IO.New_Line (File);
Ada.Wide_Wide_Text_IO.Close (File);
end Generate_Type_Page;
------------------------
-- Generate_Main_Page --
------------------------
procedure Generate_Main_Page is
procedure Process_Module (The_Module : not null Module_Access);
procedure Process_Type (The_Type : not null Type_Access);
File : Ada.Wide_Wide_Text_IO.File_Type;
--------------------
-- Process_Module --
--------------------
procedure Process_Module (The_Module : not null Module_Access) is
begin
Ada.Wide_Wide_Text_IO.Put_Line
(File,
"|| "
& Wiki_Link (The_Module, The_Module.Name).To_Wide_Wide_String
& " || "
& The_Module.Short_Description.To_Wide_Wide_String
& " ||");
end Process_Module;
------------------
-- Process_Type --
------------------
procedure Process_Type (The_Type : not null Type_Access) is
begin
Ada.Wide_Wide_Text_IO.Put_Line
(File,
"|| "
& Wiki_Link
(The_Type,
The_Type.Name).To_Wide_Wide_String
& " || "
& The_Type.Compilation_Unit.Name.To_Wide_Wide_String
& " ||");
end Process_Type;
begin
Ada.Wide_Wide_Text_IO.Create
(File, Ada.Wide_Wide_Text_IO.Out_File, "wiki/Reference.wiki");
Ada.Wide_Wide_Text_IO.Put_Line (File, "= User's Guide =");
Ada.Wide_Wide_Text_IO.New_Line (File);
Ada.Wide_Wide_Text_IO.Put_Line (File, "== Modules ==");
Ada.Wide_Wide_Text_IO.New_Line (File);
Ada.Wide_Wide_Text_IO.Put_Line (File, "||= Name =||= Description =||");
Iterate (Process_Module'Access);
Ada.Wide_Wide_Text_IO.New_Line (File);
Ada.Wide_Wide_Text_IO.Put_Line (File, "== Types ==");
Ada.Wide_Wide_Text_IO.New_Line (File);
Ada.Wide_Wide_Text_IO.Put_Line (File, "||= Name =||= Package =||");
Iterate (Process_Type'Access);
Ada.Wide_Wide_Text_IO.New_Line (File);
Ada.Wide_Wide_Text_IO.Close (File);
end Generate_Main_Page;
---------------
-- Wiki_Link --
---------------
function Wiki_Link
(The_Type : not null Type_Access;
Text : League.Strings.Universal_String)
return League.Strings.Universal_String is
begin
return
"[wiki:"
& Wiki_Resource (The_Type)
& " "
& Text
& ']';
end Wiki_Link;
---------------
-- Wiki_Link --
---------------
function Wiki_Link
(The_Module : not null Module_Access;
Text : League.Strings.Universal_String)
return League.Strings.Universal_String is
begin
return
"[wiki:Reference/"
& The_Module.Name
& " "
& Text
& ']';
end Wiki_Link;
-------------------
-- Wiki_Resource --
-------------------
function Wiki_Resource
(The_Type : not null Type_Access) return League.Strings.Universal_String is
begin
return
"Reference/"
& The_Type.Module.Name
& "/_types/"
& The_Type.Name;
end Wiki_Resource;
end Documentation_Generator.Wiki;
| 27.233161 | 79 | 0.594939 |
20a9075ca027f68dd49e2fbbeaf92708395cb624 | 3,321 | ads | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-conca6.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-conca6.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-conca6.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . C O N C A T _ 6 --
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-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 a procedure for runtime concatenation of six string
-- operands. It is used when we want to save space in the generated code.
pragma Compiler_Unit_Warning;
package System.Concat_6 is
procedure Str_Concat_6 (R : out String; S1, S2, S3, S4, S5, S6 : String);
-- Performs the operation R := S1 & S2 & S3 & S4 & S5 & S6. The
-- bounds of R are known to be correct (usually set by a call to the
-- Str_Concat_Bounds_6 procedure below), so no bounds checks are required,
-- and it is known that none of the input operands overlaps R. No
-- assumptions can be made about the lower bounds of any of the operands.
procedure Str_Concat_Bounds_6
(Lo, Hi : out Natural;
S1, S2, S3, S4, S5, S6 : String);
-- Assigns to Lo..Hi the bounds of the result of concatenating the six
-- given strings, following the rules in the RM regarding null operands.
end System.Concat_6;
| 62.660377 | 78 | 0.461909 |
cb7b2fa27185f189dde38561eaa121c92276a71f | 1,939 | ads | Ada | boards/stm32f746_discovery/src/full/adl_config.ads | mbdme26/Ada_Drivers_Library | dc9cc80f5338c9d1ae942dd461eef6a2402e44de | [
"BSD-3-Clause"
] | 192 | 2016-06-01T18:32:04.000Z | 2022-03-26T22:52:31.000Z | boards/stm32f746_discovery/src/full/adl_config.ads | mbdme26/Ada_Drivers_Library | dc9cc80f5338c9d1ae942dd461eef6a2402e44de | [
"BSD-3-Clause"
] | 239 | 2016-05-26T20:02:01.000Z | 2022-03-31T09:46:56.000Z | boards/stm32f746_discovery/src/full/adl_config.ads | mbdme26/Ada_Drivers_Library | dc9cc80f5338c9d1ae942dd461eef6a2402e44de | [
"BSD-3-Clause"
] | 142 | 2016-06-05T08:12:20.000Z | 2022-03-24T17:37:17.000Z | -- This package was generated by the Ada_Drivers_Library project wizard script
package ADL_Config is
Architecture : constant String := "ARM"; -- From board definition
Board : constant String := "STM32F746_Discovery"; -- From command line
CPU_Core : constant String := "ARM Cortex-M7F"; -- From mcu definition
Device_Family : constant String := "STM32F7"; -- From board definition
Device_Name : constant String := "STM32F746NGHx"; -- From board definition
Has_Ravenscar_Full_Runtime : constant String := "True"; -- From board definition
Has_Ravenscar_SFP_Runtime : constant String := "True"; -- From board definition
Has_ZFP_Runtime : constant String := "False"; -- From board definition
High_Speed_External_Clock : constant := 25000000; -- From board definition
Max_Mount_Name_Length : constant := 128; -- From default value
Max_Mount_Points : constant := 2; -- From default value
Max_Path_Length : constant := 1024; -- From default value
Number_Of_Interrupts : constant := 0; -- From default value
Runtime_Name : constant String := "ravenscar-full-stm32f746disco"; -- From default value
Runtime_Name_Suffix : constant String := "stm32f746disco"; -- From board definition
Runtime_Profile : constant String := "ravenscar-full"; -- From command line
Use_Startup_Gen : constant Boolean := False; -- From command line
Vendor : constant String := "STMicro"; -- From board definition
end ADL_Config;
| 88.136364 | 110 | 0.548221 |
d0bc9bee1734d92e7ecb67ea6b6eda0193a693da | 9,128 | adb | Ada | vector_math.adb | FROL256/ada-ray-tracer | 7a4c538dac2fa54523d4eb315c2c963af4ef0f99 | [
"MIT"
] | 3 | 2017-02-22T18:53:43.000Z | 2020-09-03T06:27:53.000Z | vector_math.adb | FROL256/ada-ray-tracer | 7a4c538dac2fa54523d4eb315c2c963af4ef0f99 | [
"MIT"
] | 1 | 2018-12-14T18:10:35.000Z | 2018-12-24T19:48:14.000Z | vector_math.adb | FROL256/ada-ray-tracer | 7a4c538dac2fa54523d4eb315c2c963af4ef0f99 | [
"MIT"
] | null | null | null | with Ada.Text_IO;
with Ada.Numerics;
with Ada.Numerics.Generic_Elementary_Functions;
use Ada.Numerics;
use Ada.Text_IO;
package body Vector_Math is
package Float_Functions is new Generic_Elementary_Functions (float);
use Float_Functions;
function safe_tan(x : float) return float is
Half_Pi: constant float := Ada.Numerics.Pi*0.5;
begin
if abs(x) = Half_Pi then
return float'Last;
else
return tan(x);
end if;
end;
function pow(Left, Right : float) return float is
begin
if Left = 0.0 and then Right = 0.0 then
raise Argument_Error;
elsif Left < 0.0 then
raise Argument_Error;
elsif Right = 0.0 then
return 1.0;
elsif Left = 0.0 then
if Right < 0.0 then
raise Constraint_Error;
else
return 0.0;
end if;
elsif Left = 1.0 then
return 1.0;
elsif Right = 1.0 then
return Left;
else
return Left ** Right;
end if;
end pow;
function sign(x : float) return float is
begin
if x >= 0.0 then
return 1.0;
else
return -1.0;
end if;
end sign;
function lerp(t,a,b : float) return float is
begin
return (1.0 - t) * a + t * b;
end lerp;
function normalize (a : float3) return float3 is
l_inv : float;
begin
l_inv := 1.0/sqrt(dot(a,a));
return (l_inv*a.x, l_inv*a.y, l_inv*a.z);
exception
when Constraint_Error =>
return (0.0, 1.0, 0.0);
end normalize;
function length(a : float3) return float is
begin
return sqrt(dot(a,a));
end length;
function reflect (dir : float3; normal: float3) return float3 is
begin
return normalize( (normal * dot(dir,normal) * (-2.0)) + dir);
end reflect;
function RotationMatrix(angle : float; a_v : float3) return float4x4 is
M : float4x4;
v : float3;
cos_t, sin_t : float;
begin
M := IdentityMatrix;
v := normalize(a_v);
cos_t := cos(angle);
sin_t := sin(angle);
M(0,0) := (1.0-cos_t)*v.x*v.x + cos_t;
M(0,1) := (1.0-cos_t)*v.x*v.y - sin_t*v.z;
M(0,2) := (1.0-cos_t)*v.x*v.z + sin_t*v.y;
M(1,0) := (1.0-cos_t)*v.y*v.x + sin_t*v.z;
M(1,1) := (1.0-cos_t)*v.y*v.y + cos_t;
M(1,2) := (1.0-cos_t)*v.y*v.z - sin_t*v.x;
M(2,0) := (1.0-cos_t)*v.x*v.z - sin_t*v.y;
M(2,1) := (1.0-cos_t)*v.z*v.y + sin_t*v.x;
M(2,2) := (1.0-cos_t)*v.z*v.z + cos_t;
return M;
end RotationMatrix;
function LookAtMatrix(eye, center, up: float3) return float4x4 is
M : float4x4;
f,s,u : float3;
begin
M := IdentityMatrix;
f := normalize(center - eye);
s := cross(f,up);
u := cross(s,f);
M(0,0) := f.x; M(0,1) := f.y; M(0,2) := f.z;
M(1,0) := u.x; M(1,1) := u.y; M(1,2) := u.z;
M(2,0) := -f.x; M(2,1) := -f.y; M(2,2) := -f.z;
M(0,3) := -eye.x;
M(1,3) := -eye.y;
M(2,3) := -eye.z;
return M;
end LookAtMatrix;
function "*"(m : float4x4; v : float3) return float3 is
res : float3;
begin
res.x := m(0,0)*v.x + m(0,1)*v.y + m(0,2)*v.z + m(0,3);
res.y := m(1,0)*v.x + m(1,1)*v.y + m(1,2)*v.z + m(1,3);
res.z := m(2,0)*v.x + m(2,1)*v.y + m(2,2)*v.z + m(2,3);
return res;
end;
function TransformNormal(m : float4x4; n : float3) return float3 is
res : float3;
begin
res.x := m(0,0)*n.x + m(0,1)*n.y + m(0,2)*n.z;
res.y := m(1,0)*n.x + m(1,1)*n.y + m(1,2)*n.z;
res.z := m(2,0)*n.x + m(2,1)*n.y + m(2,2)*n.z;
return res;
end;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------- Monte-Carlo Path Tracing -----------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--
---- this function is for path tracing parameters; it can be redefifed in further subclasses
--
function rnd_uniform(gen : access RandomGenerator; l,h : float) return float is
t : float;
begin
t := Ada.Numerics.Float_Random.Random(Gen => gen.agen);
return l + (h-l)*t;
end rnd_uniform;
function GetPerpendicular(a_vec : float3) return float3 is
leastPerpendicular : float3;
bestProjection : float;
xProjection : float;
yProjection : float;
zProjection : float;
begin
xProjection := abs(a_vec.x);
yProjection := abs(a_vec.y);
zProjection := abs(a_vec.z);
if (xProjection <= yProjection + 1.0e-5) and (xProjection <= zProjection + 1.0e-5) then
leastPerpendicular := (1.0, 0.0, 0.0);
bestProjection := xProjection;
elsif (yProjection < xProjection + 1.0e-5) and (yProjection <= zProjection + 1.0e-5) then
leastPerpendicular := (0.0, 1.0, 0.0);
bestProjection := yProjection;
else
leastPerpendicular := (0.0, 0.0, 1.0);
bestProjection := zProjection;
end if;
return normalize(cross(a_vec, leastPerpendicular));
end GetPerpendicular;
function MapSampleToCosineDist(r1,r2 : float; direction, normal : float3; power : float) return float3 is
e,sin_phi,cos_phi: float;
sin_theta,cos_theta : float;
deviation,nx,ny,nz,tmp,res : float3;
invSign : float;
begin
e := power;
sin_phi := sin(2.0*r1*M_PI);
cos_phi := cos(2.0*r1*M_PI);
cos_theta := (1.0-r2) ** (1.0/(e+1.0));
sin_theta := sqrt(1.0-cos_theta*cos_theta);
deviation := (sin_theta*cos_phi, sin_theta*sin_phi, cos_theta);
ny := direction;
nx := GetPerpendicular(ny);
nz := normalize(cross(nx, ny));
tmp := ny; ny := nz; nz := tmp; -- swap(ny,nz); // depends on the coordinate system
res := nx*deviation.x + ny*deviation.y + nz*deviation.z;
if dot(direction, normal) >= 0.0 then
invSign := 1.0;
else
invSign := -1.0;
end if;
if invSign*dot(res, normal) < 0.0 then -- reflect vector with surface normal
nx := normalize(cross(normal, direction));
nz := normalize(cross(nx, ny));
if dot(nz,res) < 0.0 then
nz := (-1.0)*nz;
end if;
res := reflect((-1.0)*res, nz);
if dot(res, normal) < 0.0 then -- for debug only
res := direction;
--raise Numeric_Error;
end if;
end if;
return res;
end MapSampleToCosineDist;
function MapSampleToCosineDistFixed(r1,r2 : float; direction, normal : float3; power : float) return float3 is
--e,sin_phi,cos_phi: float;
--sin_theta,cos_theta : float;
deviation,nx,ny,nz,tmp,res : float3;
invSign : float;
h : float;
begin
h := sqrt(1.0 - r1 ** (2.0/(power + 1.0)));
deviation.x := h*cos(2.0*M_PI*r2);
deviation.y := h*sin(2.0*M_PI*r2);
deviation.z := r1 ** (1.0/(power + 1.0));
--e := power;
--sin_phi := sin(2.0*r1*M_PI);
--cos_phi := cos(2.0*r1*M_PI);
--cos_theta := (1.0-r2) ** (1.0/(e+1.0));
--sin_theta := sqrt(1.0-cos_theta*cos_theta);
--deviation := (sin_theta*cos_phi, sin_theta*sin_phi, cos_theta);
ny := direction;
nx := GetPerpendicular(ny);
nz := normalize(cross(nx, ny));
tmp := ny; ny := nz; nz := tmp; -- swap(ny,nz); // depends on the coordinate system
res := nx*deviation.x + ny*deviation.y + nz*deviation.z;
if dot(direction, normal) >= 0.0 then
invSign := 1.0;
else
invSign := -1.0;
end if;
if invSign*dot(res, normal) < 0.0 then -- reflect vector with surface normal
nx := normalize(cross(normal, direction));
nz := normalize(cross(nx, ny));
if dot(nz,res) < 0.0 then
nz := (-1.0)*nz;
end if;
res := reflect((-1.0)*res, nz);
if dot(res, normal) < 0.0 then -- for debug only
res := direction;
--raise Numeric_Error;
end if;
end if;
return res;
end MapSampleToCosineDistFixed;
function RandomCosineVectorOf(gen : RandRef; norm : float3) return float3 is
r1 : float := gen.rnd_uniform(0.0, 1.0);
r2 : float := gen.rnd_uniform(0.0, 1.0);
begin
return MapSampleToCosineDist(r1,r2,norm,norm,1.0);
end RandomCosineVectorOf;
function RandomCosineVectorOf(gen : RandRef; refl : float3; norm : float3; cosPower : float) return float3 is
r1 : float := gen.rnd_uniform(0.0, 1.0);
r2 : float := gen.rnd_uniform(0.0, 1.0);
begin
return MapSampleToCosineDistFixed(r1,r2,refl,norm,cosPower);
end RandomCosineVectorOf;
function Is_Finite(x : float) return boolean is
begin
return (x'Valid) and (x > Float'First) and (x < Float'Last);
end Is_Finite;
function Flush_To_Zero(v : float3) return float3 is
begin
if Is_Finite(v.x) and Is_Finite(v.y) and Is_Finite(v.z) then
return v;
else
return (0.0, 0.0, 0.0);
end if;
end Flush_To_Zero;
end Vector_Math;
| 26.154728 | 176 | 0.542287 |
23c23578352244b2040fec7e958685acf130e944 | 2,852 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd5014i.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd5014i.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd5014i.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- CD5014I.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 IN THE VISIBLE PART
-- OF A GENERIC PACKAGE SPECIFICATION FOR A VARIABLE OF AN ARRAY
-- TYPE, WHERE THE VARIABLE IS DECLARED IN THE VISIBLE PART OF THE
-- SPECIFICATION.
-- HISTORY:
-- CDJ 07/24/87 CREATED ORIGINAL TEST.
-- BCB 10/01/87 CHANGED TEST TO STANDARD FORMAT.
-- PWB 05/11/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA'.
-- MCH 04/03/90 ADDED INSTANTIATION.
WITH SYSTEM; USE SYSTEM;
WITH SPPRT13; USE SPPRT13;
WITH REPORT; USE REPORT;
PROCEDURE CD5014I IS
BEGIN
TEST ("CD5014I", " AN ADDRESS CLAUSE CAN BE GIVEN " &
"IN THE VISIBLE PART OF A GENERIC PACKAGE " &
"SPECIFICATION FOR A VARIABLE OF AN ARRAY " &
"TYPE, WHERE THE VARIABLE IS DECLARED IN THE " &
"VISIBLE PART OF THE SPECIFICATION");
DECLARE
GENERIC
PACKAGE PKG IS
TYPE ARR_TYPE IS ARRAY (1..2) OF INTEGER;
ARR_OBJ1 : ARR_TYPE := (5,10);
FOR ARR_OBJ1 USE AT VARIABLE_ADDRESS;
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF EQUAL(3,3) THEN
ARR_OBJ1 := (13,21);
END IF;
IF ARR_OBJ1 /= (13,21) THEN
FAILED ("INCORRECT VALUE FOR ARRAY VARIABLE");
END IF;
IF ARR_OBJ1'ADDRESS /= VARIABLE_ADDRESS THEN
FAILED ("INCORRECT ADDRESS FOR ARRAY VARIABLE");
END IF;
END PKG;
PACKAGE INSTANTIATE IS NEW PKG;
BEGIN
NULL;
END;
RESULT;
END CD5014I;
| 33.952381 | 79 | 0.62202 |
cb8c9454a43286571b1fef88b48082cd7f37a564 | 1,920 | ads | Ada | src/stm32-crc.ads | damaki/EVB1000 | 1589a3f3bd79d7c9970f3b0758e133e3ec1ee6e2 | [
"MIT"
] | null | null | null | src/stm32-crc.ads | damaki/EVB1000 | 1589a3f3bd79d7c9970f3b0758e133e3ec1ee6e2 | [
"MIT"
] | null | null | null | src/stm32-crc.ads | damaki/EVB1000 | 1589a3f3bd79d7c9970f3b0758e133e3ec1ee6e2 | [
"MIT"
] | 1 | 2021-02-10T14:33:06.000Z | 2021-02-10T14:33:06.000Z | -- This spec has been automatically generated from STM32F105xx.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
with System;
package STM32.CRC is
pragma Preelaborate;
---------------
-- Registers --
---------------
------------------
-- IDR_Register --
------------------
subtype IDR_IDR_Field is STM32.Byte;
-- Independent Data register
type IDR_Register is record
-- Independent Data register
IDR : IDR_IDR_Field := 16#0#;
-- unspecified
Reserved_8_31 : STM32.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IDR_Register use record
IDR at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-----------------
-- CR_Register --
-----------------
subtype CR_RESET_Field is STM32.Bit;
-- Control register
type CR_Register is record
-- Write-only. Reset bit
RESET : CR_RESET_Field := 16#0#;
-- unspecified
Reserved_1_31 : STM32.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
RESET at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- CRC calculation unit
type CRC_Peripheral is record
-- Data register
DR : STM32.Word;
-- Independent Data register
IDR : IDR_Register;
-- Control register
CR : CR_Register;
end record
with Volatile;
for CRC_Peripheral use record
DR at 0 range 0 .. 31;
IDR at 4 range 0 .. 31;
CR at 8 range 0 .. 31;
end record;
-- CRC calculation unit
CRC_Periph : aliased CRC_Peripheral
with Import, Address => CRC_Base;
end STM32.CRC;
| 23.13253 | 67 | 0.568229 |
4af8f63853d2bb6e3da66fdc16fac2f907b75ded | 437 | ads | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr41.ads | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr41.ads | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr41.ads | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | package Discr41 is
type Vector is array (Positive range <>) of Long_Float;
type Date is record
LF : Long_Float := 0.0;
end record;
type Date_Vector is array (Positive range <>) of Date;
type Rec (D : Natural) is record
B1 : Boolean := False;
DL : Date_Vector (1 .. D);
VL : Vector (1 .. D) := (others => 0.0);
B2 : Boolean := True;
end record;
function F return Rec;
end Discr41;
| 20.809524 | 58 | 0.590389 |
d00c846781a9e822f2c10e9eb218321adfd8982f | 10,556 | ads | Ada | tls/inet-internal-tls.ads | annexi-strayline/ASAP-INET | df3b73e2aa94a786e5b1759db2cb2d1be3c0a4b6 | [
"BSD-3-Clause"
] | null | null | null | tls/inet-internal-tls.ads | annexi-strayline/ASAP-INET | df3b73e2aa94a786e5b1759db2cb2d1be3c0a4b6 | [
"BSD-3-Clause"
] | null | null | null | tls/inet-internal-tls.ads | annexi-strayline/ASAP-INET | df3b73e2aa94a786e5b1759db2cb2d1be3c0a4b6 | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- Internet Protocol Suite Package --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * Richard Wai (ANNEXI-STRAYLINE) --
-- --
-- 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 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 --
-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- This package provides low-level interfaces to libtls for the management of
-- "contexts", and the sending and receiving of data through those contexts
with Ada.Streams;
with Ada.Finalization;
with Interfaces.C;
limited with INET.TLS;
with INET.Internal.UNIX_Sockets;
package INET.Internal.TLS is
package UNIX_Sockets renames Internal.UNIX_Sockets;
-----------------------
-- Common Facilities --
-----------------------
use type Interfaces.C.size_t;
type Random_Data is
array (Interfaces.C.size_t range <>) of Interfaces.C.unsigned_char with
Pack => True, Convention => C;
procedure Cryptographic_Randomize (Data : out Random_Data);
procedure Cryptographic_Randomize (Value: out Interfaces.Unsigned_32);
-- Provides cryptographically random values for arbitrary data
-- (usually keys), or unsigned 32-bit integers. This means high-entropy
-- random data, typically harvested by the operating system.
-----------------
-- TLS_Context --
-----------------
type TLS_Context is abstract tagged limited private;
-- A TLS_Context represents the state of a TLS connection, and libtls
-- needs the context in order to send or receive. The context is configured
-- for each connection, and eventually associated with a socket.
function Available (Context: TLS_Context) return Boolean;
-- True if the context has been configured OR established
procedure Shutdown (Context: in out TLS_Context) with
Post'Class => not Context.Available;
-- Closes-down the underlying session, but does not reset or free the
-- context. Those operations are handled by finalization or one of
-- the Establish or Configure operations of the derrived types
procedure Handshake (Context: in out TLS_Context;
Socket : in UNIX_Sockets.UNIX_Socket;
Timeout: in Duration)
with
Pre'Class => Context.Available;
-- Causes a TLS handshake to be executed immediately. If the handshake
-- fails, TLS_Handshake_Failed is propegated with the corresponding error
-- message from libtls
--
-- If the handshake times-out, TLS_Handshake_Failed will be raised, but
-- the context will not be closed.
--
-- If Context is not Available, Program_Error is raised
--------------------------
-- TLS_Listener_Context --
--------------------------
type TLS_Listener_Context is limited new TLS_Context with private;
not overriding
procedure Configure
(Context : in out TLS_Listener_Context;
Configuration: in INET.TLS.TLS_Server_Configuration'Class)
with Post'Class => Context.Available;
-- TLS_Listener_Contexts are configured with a handle from a
-- TLS_Server_Configuration'Class object, and is able to initialize new
-- TLS_Stream_Contexts
--
-- The Caller shall ensure that Configuration is from a
-- TLS_Server_Configuration object
--
-- If the context is already Available, the context is closed and reset.
--
-- ** Note **
-- libtls internally links the configuration to the context, and so as long
-- as the TLS_Configuration object remains visible, it can be modified
-- directly, such as adding ticket keys, and this will affect all associated
-- contexts. A full reconfiguration is therefore not necessary for such
-- operations.
------------------------
-- TLS_Stream_Context --
------------------------
type TLS_Stream_Context is limited new TLS_Context with private;
-- "native" TLS: A context for reliable stream transports (usually TCP or
-- SCTP).
not overriding
procedure Establish
(Context : in out TLS_Stream_Context;
Listener_Context: in TLS_Listener_Context'Class;
Socket : in UNIX_Sockets.UNIX_Socket;
Timeout : in Duration)
with
Pre'Class => not Context.Available
and Listener_Context.Available
and UNIX_Sockets.Socket_Active (Socket),
Post'Class => Context.Available;
-- Setting up a new server TLS stream via a TLS_Listener_Context.
not overriding
procedure Establish
(Context : in out TLS_Stream_Context;
Configuration: in INET.TLS.TLS_Client_Configuration'Class;
Socket : in UNIX_Sockets.UNIX_Socket;
Timeout : in Duration)
with
Pre'Class => not Context.Available and
UNIX_Sockets.Socket_Active (Socket),
Post'Class => Context.Available;
-- Setting up a new TLS stream to a remote server
not overriding
procedure Establish
(Context : in out TLS_Stream_Context;
Configuration: in INET.TLS.TLS_Client_Configuration'Class;
Server_Name : in String;
Socket : in UNIX_Sockets.UNIX_Socket;
Timeout : in Duration)
with
Pre'Class => not Context.Available and
UNIX_Sockets.Socket_Active (Socket),
Post'Class => Context.Available;
-- Setting up a new TLS stream to a remote server with SNI
-- Sets up and configures, TLS context, associating it with some existing
-- TCP connection, and then invokes Hanshake on Context.
--
-- If Context is currently Available, Program_Error is raised.
--
-- If Server_Name is specified, the SNI extension (RFC 4366) is enforced.
--
-- Any failure raises TLS_Error with an appropriate message.
--
-- Timeout is passed directly to Handshake, with the same consequences
not overriding
procedure TLS_Send_Immediate
(Context: in out TLS_Stream_Context;
Buffer : in Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset)
with
Pre'Class => Context.Available;
not overriding
procedure TLS_Receive_Immediate
(Context: in out TLS_Stream_Context;
Buffer : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset)
with
Pre'Class => Context.Available;
-- Attempts to Send or Receive over an established TLS context. The
-- underlying socket is assumed to be non-blocking.
--
-- If an error occurs, TLS_Error is raised with the appropriate error
-- message.
-- type TLS_Datagram_Context is limited new TLS_Context with private;
-- DTLS: A context for (unreliable) datagram transports.
-- ** Future implementation ** --
private
type Context_Handle is new INET_Extension_Handle;
-- A "C" pointer to the "struct tls" structure in libtls. This is a
-- transparent structure
Null_Context_Handle: constant Context_Handle
:= Context_Handle (Null_Handle);
type TLS_Context is abstract limited
new Ada.Finalization.Limited_Controlled with
record
Avail : Boolean := False;
Handle: Context_Handle := Null_Context_Handle;
end record;
overriding
procedure Finalize (Context: in out TLS_Context);
-- Deactivates and deinitializes Context
type TLS_Listener_Context is limited new TLS_Context with null record;
type TLS_Stream_Context is limited new TLS_Context with null record;
end INET.Internal.TLS;
| 41.888889 | 79 | 0.585544 |
236da0e7e330e88e097c60746b9fa7bddbf078ae | 142 | ada | Ada | Task/Scope-modifiers/Ada/scope-modifiers-3.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | 1 | 2021-02-01T17:43:23.000Z | 2021-02-01T17:43:23.000Z | Task/Scope-modifiers/Ada/scope-modifiers-3.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | null | null | null | Task/Scope-modifiers/Ada/scope-modifiers-3.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | package body P is
-- The implementation of P, invisible to anybody
procedure W (X : in out T); -- Operation used only internally
end P;
| 28.4 | 64 | 0.704225 |
102d6b8b35252c9879c272ca8866e76720b4c101 | 201,664 | adb | Ada | Vivado_HLS_Tutorial/RTL_Verification/lab2/duc_prj/solution1/.autopilot/db/duc.sched.adb | williambong/Vivado | 68efafbc44b65c0bb047dbafc0ff7f1b56ee36bb | [
"MIT"
] | null | null | null | Vivado_HLS_Tutorial/RTL_Verification/lab2/duc_prj/solution1/.autopilot/db/duc.sched.adb | williambong/Vivado | 68efafbc44b65c0bb047dbafc0ff7f1b56ee36bb | [
"MIT"
] | null | null | null | Vivado_HLS_Tutorial/RTL_Verification/lab2/duc_prj/solution1/.autopilot/db/duc.sched.adb | williambong/Vivado | 68efafbc44b65c0bb047dbafc0ff7f1b56ee36bb | [
"MIT"
] | null | null | null | <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="11">
<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>duc</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>din_i</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>din_i</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>freq</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>freq</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>dout_i</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>dout_i</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>dout_q</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>dout_q</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>93</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>45</id>
<name>freq_read</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>freq</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>152</item>
<item>153</item>
</oprand_edges>
<opcode>read</opcode>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>46</id>
<name>din_i_read</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>din_i</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>155</item>
<item>156</item>
</oprand_edges>
<opcode>read</opcode>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>47</id>
<name>i_load</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>20</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second class_id="12" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="13" tracking_level="0" version="0">
<first class_id="14" tracking_level="0" version="0">
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>20</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>157</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>48</id>
<name>tmp_i</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>20</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>20</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>158</item>
<item>160</item>
</oprand_edges>
<opcode>icmp</opcode>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>49</id>
<name></name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>20</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>20</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>161</item>
<item>162</item>
<item>163</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>51</id>
<name></name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>20</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>20</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>164</item>
<item>165</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>52</id>
<name></name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>20</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>20</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>166</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>54</id>
<name>inc</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>21</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>21</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>inc</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>167</item>
<item>169</item>
</oprand_edges>
<opcode>add</opcode>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>55</id>
<name>tmp_2_i</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>170</item>
</oprand_edges>
<opcode>zext</opcode>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>56</id>
<name>c_addr</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>171</item>
<item>173</item>
<item>174</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>57</id>
<name>c_load</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>c</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>175</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>58</id>
<name>in_load</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>d</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>176</item>
<item>410</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>59</id>
<name>init_load</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>177</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>60</id>
<name>ch_load</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>178</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>61</id>
<name>tmp_18</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>21</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>21</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>180</item>
<item>181</item>
<item>182</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>62</id>
<name>tmp_19</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>183</item>
</oprand_edges>
<opcode>zext</opcode>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>63</id>
<name>shift_reg_p_addr</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>184</item>
<item>185</item>
<item>186</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>64</id>
<name>shift_reg_p_load</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>187</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>65</id>
<name>sel_tmp1_i</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</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>188</item>
<item>190</item>
</oprand_edges>
<opcode>icmp</opcode>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name>sel_tmp2_i</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</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>191</item>
<item>193</item>
</oprand_edges>
<opcode>icmp</opcode>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>67</id>
<name>sel_tmp3_i</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</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>194</item>
<item>196</item>
</oprand_edges>
<opcode>xor</opcode>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>68</id>
<name>sel_tmp4_i</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</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>197</item>
<item>198</item>
</oprand_edges>
<opcode>or</opcode>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>69</id>
<name>sel_tmp5_i</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</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>199</item>
<item>200</item>
</oprand_edges>
<opcode>and</opcode>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>70</id>
<name>tmp</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</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>201</item>
<item>202</item>
</oprand_edges>
<opcode>or</opcode>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>71</id>
<name>tmp_5_i</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>23</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>203</item>
<item>205</item>
<item>206</item>
</oprand_edges>
<opcode>select</opcode>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>72</id>
<name>tmp_i_i</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>srrc_mac</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>srrc_mac</second>
</first>
<second>16</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>36</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>207</item>
</oprand_edges>
<opcode>sext</opcode>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>73</id>
<name>tmp_i_i_14</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>srrc_mac</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>srrc_mac</second>
</first>
<second>16</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>36</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>208</item>
</oprand_edges>
<opcode>sext</opcode>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>74</id>
<name>m</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>srrc_mac</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>srrc_mac</second>
</first>
<second>16</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>m</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>36</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>209</item>
<item>210</item>
</oprand_edges>
<opcode>mul</opcode>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>75</id>
<name>tmp_21_i_i</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>srrc_mac</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>srrc_mac</second>
</first>
<second>17</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>211</item>
</oprand_edges>
<opcode>sext</opcode>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>76</id>
<name>acc_1</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>18</lineNumber>
<contextFuncName>srrc_mac</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>srrc_mac</second>
</first>
<second>18</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>23</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>acc</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>212</item>
<item>213</item>
</oprand_edges>
<opcode>add</opcode>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>77</id>
<name>tmp_20</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>20</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>20</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>214</item>
<item>215</item>
<item>216</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>78</id>
<name>tmp_21</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>25</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>25</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>217</item>
</oprand_edges>
<opcode>zext</opcode>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>79</id>
<name>shift_reg_p_addr_1</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>25</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>25</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>218</item>
<item>219</item>
<item>220</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>80</id>
<name></name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>25</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>25</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>221</item>
<item>222</item>
<item>406</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>81</id>
<name></name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>26</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>26</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>223</item>
<item>224</item>
<item>225</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>83</id>
<name></name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>27</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>27</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>226</item>
<item>227</item>
<item>228</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>85</id>
<name></name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>27</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>27</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>230</item>
<item>231</item>
<item>411</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</type>
<id>86</id>
<name></name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>27</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>27</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>232</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>88</id>
<name>tmp_i_15</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>28</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>28</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>233</item>
<item>234</item>
</oprand_edges>
<opcode>xor</opcode>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>89</id>
<name></name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>28</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>28</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>235</item>
<item>236</item>
<item>412</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>90</id>
<name></name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>29</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>29</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>237</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_46">
<Value>
<Obj>
<type>0</type>
<id>92</id>
<name>srrc_o</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>33</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>33</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>y</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>239</item>
<item>240</item>
<item>242</item>
<item>244</item>
</oprand_edges>
<opcode>partselect</opcode>
</item>
<item class_id_reference="9" object_id="_47">
<Value>
<Obj>
<type>0</type>
<id>93</id>
<name>inc_4</name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>35</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>35</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>inc</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>245</item>
<item>246</item>
<item>247</item>
</oprand_edges>
<opcode>select</opcode>
</item>
<item class_id_reference="9" object_id="_48">
<Value>
<Obj>
<type>0</type>
<id>94</id>
<name></name>
<fileName>srrc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>35</lineNumber>
<contextFuncName>srrc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>29</second>
</item>
<item>
<first>
<first>srrc.c</first>
<second>srrc</second>
</first>
<second>35</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>248</item>
<item>249</item>
<item>409</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_49">
<Value>
<Obj>
<type>0</type>
<id>95</id>
<name>i_4_load</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>24</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>24</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>250</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_50">
<Value>
<Obj>
<type>0</type>
<id>96</id>
<name>tmp_i1</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>24</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>24</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>251</item>
<item>253</item>
</oprand_edges>
<opcode>icmp</opcode>
</item>
<item class_id_reference="9" object_id="_51">
<Value>
<Obj>
<type>0</type>
<id>97</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>24</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>24</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>254</item>
<item>255</item>
<item>256</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_52">
<Value>
<Obj>
<type>0</type>
<id>99</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>25</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>25</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>257</item>
<item>258</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_53">
<Value>
<Obj>
<type>0</type>
<id>100</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>26</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>26</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>259</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_54">
<Value>
<Obj>
<type>0</type>
<id>102</id>
<name>inc_5</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>27</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>27</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>inc</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>260</item>
<item>262</item>
</oprand_edges>
<opcode>add</opcode>
</item>
<item class_id_reference="9" object_id="_55">
<Value>
<Obj>
<type>0</type>
<id>103</id>
<name>tmp_i3</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>263</item>
</oprand_edges>
<opcode>zext</opcode>
</item>
<item class_id_reference="9" object_id="_56">
<Value>
<Obj>
<type>0</type>
<id>104</id>
<name>c_2_addr</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>264</item>
<item>265</item>
<item>266</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_57">
<Value>
<Obj>
<type>0</type>
<id>105</id>
<name>c_2_load</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>c</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>267</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_58">
<Value>
<Obj>
<type>0</type>
<id>106</id>
<name>in_3_load</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>d</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>268</item>
<item>414</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_59">
<Value>
<Obj>
<type>0</type>
<id>107</id>
<name>init_4_load</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>269</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_60">
<Value>
<Obj>
<type>0</type>
<id>108</id>
<name>ch_3_load</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>270</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_61">
<Value>
<Obj>
<type>0</type>
<id>109</id>
<name>tmp_23</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>27</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>27</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>272</item>
<item>273</item>
<item>274</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
</item>
<item class_id_reference="9" object_id="_62">
<Value>
<Obj>
<type>0</type>
<id>110</id>
<name>tmp_s</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>275</item>
</oprand_edges>
<opcode>zext</opcode>
</item>
<item class_id_reference="9" object_id="_63">
<Value>
<Obj>
<type>0</type>
<id>111</id>
<name>shift_reg_p_2_addr</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>276</item>
<item>277</item>
<item>278</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_64">
<Value>
<Obj>
<type>0</type>
<id>112</id>
<name>shift_reg_p_2_load</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>279</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_65">
<Value>
<Obj>
<type>0</type>
<id>113</id>
<name>sel_tmp1_i7</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</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>280</item>
<item>282</item>
</oprand_edges>
<opcode>icmp</opcode>
</item>
<item class_id_reference="9" object_id="_66">
<Value>
<Obj>
<type>0</type>
<id>114</id>
<name>sel_tmp2_i8</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</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>283</item>
<item>285</item>
</oprand_edges>
<opcode>icmp</opcode>
</item>
<item class_id_reference="9" object_id="_67">
<Value>
<Obj>
<type>0</type>
<id>115</id>
<name>sel_tmp3_i9</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</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>286</item>
<item>287</item>
</oprand_edges>
<opcode>xor</opcode>
</item>
<item class_id_reference="9" object_id="_68">
<Value>
<Obj>
<type>0</type>
<id>116</id>
<name>sel_tmp4_i1</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</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>288</item>
<item>289</item>
</oprand_edges>
<opcode>or</opcode>
</item>
<item class_id_reference="9" object_id="_69">
<Value>
<Obj>
<type>0</type>
<id>117</id>
<name>sel_tmp5_i1</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</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>290</item>
<item>291</item>
</oprand_edges>
<opcode>and</opcode>
</item>
<item class_id_reference="9" object_id="_70">
<Value>
<Obj>
<type>0</type>
<id>118</id>
<name>tmp_22</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</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>292</item>
<item>293</item>
</oprand_edges>
<opcode>or</opcode>
</item>
<item class_id_reference="9" object_id="_71">
<Value>
<Obj>
<type>0</type>
<id>119</id>
<name>s_assign</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>30</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>s</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>294</item>
<item>295</item>
<item>296</item>
</oprand_edges>
<opcode>select</opcode>
</item>
<item class_id_reference="9" object_id="_72">
<Value>
<Obj>
<type>0</type>
<id>120</id>
<name>tmp_i_i1</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>26</lineNumber>
<contextFuncName>mac1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>mac1</second>
</first>
<second>26</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>36</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>297</item>
</oprand_edges>
<opcode>sext</opcode>
</item>
<item class_id_reference="9" object_id="_73">
<Value>
<Obj>
<type>0</type>
<id>121</id>
<name>tmp_i_i1_16</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>26</lineNumber>
<contextFuncName>mac1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>mac1</second>
</first>
<second>26</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>36</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>298</item>
</oprand_edges>
<opcode>sext</opcode>
</item>
<item class_id_reference="9" object_id="_74">
<Value>
<Obj>
<type>0</type>
<id>122</id>
<name>m_2</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>26</lineNumber>
<contextFuncName>mac1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>mac1</second>
</first>
<second>26</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>m</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>36</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>299</item>
<item>300</item>
</oprand_edges>
<opcode>mul</opcode>
</item>
<item class_id_reference="9" object_id="_75">
<Value>
<Obj>
<type>0</type>
<id>123</id>
<name>tmp_24_i_i</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>27</lineNumber>
<contextFuncName>mac1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>mac1</second>
</first>
<second>27</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>301</item>
</oprand_edges>
<opcode>sext</opcode>
</item>
<item class_id_reference="9" object_id="_76">
<Value>
<Obj>
<type>0</type>
<id>124</id>
<name>sum</name>
<fileName>mac.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>27</lineNumber>
<contextFuncName>mac1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>30</second>
</item>
<item>
<first>
<first>mac.c</first>
<second>mac1</second>
</first>
<second>27</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>sum</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>38</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>302</item>
<item>303</item>
</oprand_edges>
<opcode>add</opcode>
</item>
<item class_id_reference="9" object_id="_77">
<Value>
<Obj>
<type>0</type>
<id>125</id>
<name>tmp_24</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>24</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>24</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>304</item>
<item>305</item>
<item>306</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
</item>
<item class_id_reference="9" object_id="_78">
<Value>
<Obj>
<type>0</type>
<id>126</id>
<name>tmp_25</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>307</item>
</oprand_edges>
<opcode>zext</opcode>
</item>
<item class_id_reference="9" object_id="_79">
<Value>
<Obj>
<type>0</type>
<id>127</id>
<name>shift_reg_p_2_addr_1</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>32</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>308</item>
<item>309</item>
<item>310</item>
</oprand_edges>
<opcode>getelementptr</opcode>
</item>
<item class_id_reference="9" object_id="_80">
<Value>
<Obj>
<type>0</type>
<id>128</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>32</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>32</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>311</item>
<item>312</item>
<item>407</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_81">
<Value>
<Obj>
<type>0</type>
<id>129</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>33</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>33</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>313</item>
<item>314</item>
<item>315</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_82">
<Value>
<Obj>
<type>0</type>
<id>131</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>34</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>316</item>
<item>317</item>
<item>318</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_83">
<Value>
<Obj>
<type>0</type>
<id>133</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>34</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>319</item>
<item>320</item>
<item>415</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_84">
<Value>
<Obj>
<type>0</type>
<id>134</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>34</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>321</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_85">
<Value>
<Obj>
<type>0</type>
<id>136</id>
<name>cnt_1_load</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>35</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>35</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>322</item>
</oprand_edges>
<opcode>load</opcode>
</item>
<item class_id_reference="9" object_id="_86">
<Value>
<Obj>
<type>0</type>
<id>137</id>
<name>tmp_41_i</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>35</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>35</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>323</item>
<item>324</item>
</oprand_edges>
<opcode>xor</opcode>
</item>
<item class_id_reference="9" object_id="_87">
<Value>
<Obj>
<type>0</type>
<id>138</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>35</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>35</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>325</item>
<item>326</item>
<item>416</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_88">
<Value>
<Obj>
<type>0</type>
<id>139</id>
<name>tmp_42_i</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>36</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>327</item>
<item>328</item>
</oprand_edges>
<opcode>xor</opcode>
</item>
<item class_id_reference="9" object_id="_89">
<Value>
<Obj>
<type>0</type>
<id>140</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>36</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>329</item>
<item>330</item>
<item>408</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_90">
<Value>
<Obj>
<type>0</type>
<id>141</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>37</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>37</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>331</item>
</oprand_edges>
<opcode>br</opcode>
</item>
<item class_id_reference="9" object_id="_91">
<Value>
<Obj>
<type>0</type>
<id>143</id>
<name>imf1_o</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>41</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>41</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>y</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>332</item>
<item>333</item>
<item>334</item>
<item>335</item>
</oprand_edges>
<opcode>partselect</opcode>
</item>
<item class_id_reference="9" object_id="_92">
<Value>
<Obj>
<type>0</type>
<id>144</id>
<name>inc_6</name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>44</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>44</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>inc</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>336</item>
<item>337</item>
<item>338</item>
</oprand_edges>
<opcode>select</opcode>
</item>
<item class_id_reference="9" object_id="_93">
<Value>
<Obj>
<type>0</type>
<id>145</id>
<name></name>
<fileName>imf1.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>44</lineNumber>
<contextFuncName>imf1</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>31</second>
</item>
<item>
<first>
<first>imf1.c</first>
<second>imf1</second>
</first>
<second>44</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>339</item>
<item>340</item>
<item>413</item>
</oprand_edges>
<opcode>store</opcode>
</item>
<item class_id_reference="9" object_id="_94">
<Value>
<Obj>
<type>0</type>
<id>146</id>
<name>imf2_o</name>
<fileName>duc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>33</lineNumber>
<contextFuncName>duc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>33</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>imf2_o</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>9</count>
<item_version>0</item_version>
<item>342</item>
<item>343</item>
<item>353</item>
<item>354</item>
<item>355</item>
<item>356</item>
<item>357</item>
<item>358</item>
<item>359</item>
</oprand_edges>
<opcode>call</opcode>
</item>
<item class_id_reference="9" object_id="_95">
<Value>
<Obj>
<type>0</type>
<id>147</id>
<name>imf3_o</name>
<fileName>duc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>35</lineNumber>
<contextFuncName>duc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>35</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>imf3_o</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>18</bitwidth>
</Value>
<oprand_edges>
<count>10</count>
<item_version>0</item_version>
<item>345</item>
<item>346</item>
<item>360</item>
<item>361</item>
<item>362</item>
<item>363</item>
<item>364</item>
<item>365</item>
<item>366</item>
<item>367</item>
</oprand_edges>
<opcode>call</opcode>
</item>
<item class_id_reference="9" object_id="_96">
<Value>
<Obj>
<type>0</type>
<id>148</id>
<name></name>
<fileName>duc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>37</lineNumber>
<contextFuncName>duc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>37</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>12</count>
<item_version>0</item_version>
<item>348</item>
<item>349</item>
<item>350</item>
<item>351</item>
<item>352</item>
<item>368</item>
<item>369</item>
<item>370</item>
<item>371</item>
<item>372</item>
<item>373</item>
<item>374</item>
</oprand_edges>
<opcode>call</opcode>
</item>
<item class_id_reference="9" object_id="_97">
<Value>
<Obj>
<type>0</type>
<id>149</id>
<name></name>
<fileName>duc.c</fileName>
<fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>duc</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>duc.c</first>
<second>duc</second>
</first>
<second>39</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>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>17</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_98">
<Value>
<Obj>
<type>2</type>
<id>159</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="_99">
<Value>
<Obj>
<type>2</type>
<id>168</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>
<item class_id_reference="16" object_id="_100">
<Value>
<Obj>
<type>2</type>
<id>172</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_101">
<Value>
<Obj>
<type>2</type>
<id>189</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>47</content>
</item>
<item class_id_reference="16" object_id="_102">
<Value>
<Obj>
<type>2</type>
<id>192</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>23</content>
</item>
<item class_id_reference="16" object_id="_103">
<Value>
<Obj>
<type>2</type>
<id>195</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_104">
<Value>
<Obj>
<type>2</type>
<id>204</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>38</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_105">
<Value>
<Obj>
<type>2</type>
<id>229</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_106">
<Value>
<Obj>
<type>2</type>
<id>241</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>17</content>
</item>
<item class_id_reference="16" object_id="_107">
<Value>
<Obj>
<type>2</type>
<id>243</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>34</content>
</item>
<item class_id_reference="16" object_id="_108">
<Value>
<Obj>
<type>2</type>
<id>252</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>5</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_109">
<Value>
<Obj>
<type>2</type>
<id>261</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>5</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_110">
<Value>
<Obj>
<type>2</type>
<id>281</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>5</bitwidth>
</Value>
<const_type>0</const_type>
<content>23</content>
</item>
<item class_id_reference="16" object_id="_111">
<Value>
<Obj>
<type>2</type>
<id>284</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>5</bitwidth>
</Value>
<const_type>0</const_type>
<content>11</content>
</item>
<item class_id_reference="16" object_id="_112">
<Value>
<Obj>
<type>2</type>
<id>341</id>
<name>duc_imf2</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>18</bitwidth>
</Value>
<const_type>6</const_type>
<content><constant:duc_imf2></content>
</item>
<item class_id_reference="16" object_id="_113">
<Value>
<Obj>
<type>2</type>
<id>344</id>
<name>duc_imf3</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>18</bitwidth>
</Value>
<const_type>6</const_type>
<content><constant:duc_imf3></content>
</item>
<item class_id_reference="16" object_id="_114">
<Value>
<Obj>
<type>2</type>
<id>347</id>
<name>duc_mixer</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<const_type>6</const_type>
<content><constant:duc_mixer></content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>13</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_115">
<Obj>
<type>3</type>
<id>50</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>5</count>
<item_version>0</item_version>
<item>45</item>
<item>46</item>
<item>47</item>
<item>48</item>
<item>49</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_116">
<Obj>
<type>3</type>
<id>53</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>2</count>
<item_version>0</item_version>
<item>51</item>
<item>52</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_117">
<Obj>
<type>3</type>
<id>82</id>
<name>._crit_edge_ifconv.i</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>28</count>
<item_version>0</item_version>
<item>54</item>
<item>55</item>
<item>56</item>
<item>57</item>
<item>58</item>
<item>59</item>
<item>60</item>
<item>61</item>
<item>62</item>
<item>63</item>
<item>64</item>
<item>65</item>
<item>66</item>
<item>67</item>
<item>68</item>
<item>69</item>
<item>70</item>
<item>71</item>
<item>72</item>
<item>73</item>
<item>74</item>
<item>75</item>
<item>76</item>
<item>77</item>
<item>78</item>
<item>79</item>
<item>80</item>
<item>81</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_118">
<Obj>
<type>3</type>
<id>84</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>83</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_119">
<Obj>
<type>3</type>
<id>87</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>2</count>
<item_version>0</item_version>
<item>85</item>
<item>86</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_120">
<Obj>
<type>3</type>
<id>91</id>
<name>._crit_edge9.i</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>3</count>
<item_version>0</item_version>
<item>88</item>
<item>89</item>
<item>90</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_121">
<Obj>
<type>3</type>
<id>98</id>
<name>srrc.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>6</count>
<item_version>0</item_version>
<item>92</item>
<item>93</item>
<item>94</item>
<item>95</item>
<item>96</item>
<item>97</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_122">
<Obj>
<type>3</type>
<id>101</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>2</count>
<item_version>0</item_version>
<item>99</item>
<item>100</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_123">
<Obj>
<type>3</type>
<id>130</id>
<name>._crit_edge_ifconv.i15</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>28</count>
<item_version>0</item_version>
<item>102</item>
<item>103</item>
<item>104</item>
<item>105</item>
<item>106</item>
<item>107</item>
<item>108</item>
<item>109</item>
<item>110</item>
<item>111</item>
<item>112</item>
<item>113</item>
<item>114</item>
<item>115</item>
<item>116</item>
<item>117</item>
<item>118</item>
<item>119</item>
<item>120</item>
<item>121</item>
<item>122</item>
<item>123</item>
<item>124</item>
<item>125</item>
<item>126</item>
<item>127</item>
<item>128</item>
<item>129</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_124">
<Obj>
<type>3</type>
<id>132</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>131</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_125">
<Obj>
<type>3</type>
<id>135</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>2</count>
<item_version>0</item_version>
<item>133</item>
<item>134</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_126">
<Obj>
<type>3</type>
<id>142</id>
<name>._crit_edge9.i16</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>6</count>
<item_version>0</item_version>
<item>136</item>
<item>137</item>
<item>138</item>
<item>139</item>
<item>140</item>
<item>141</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_127">
<Obj>
<type>3</type>
<id>150</id>
<name>imf1.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>7</count>
<item_version>0</item_version>
<item>143</item>
<item>144</item>
<item>145</item>
<item>146</item>
<item>147</item>
<item>148</item>
<item>149</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>223</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_128">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_129">
<id>156</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_130">
<id>157</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_131">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_132">
<id>160</id>
<edge_type>1</edge_type>
<source_obj>159</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_133">
<id>161</id>
<edge_type>1</edge_type>
<source_obj>48</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_134">
<id>162</id>
<edge_type>2</edge_type>
<source_obj>82</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_135">
<id>163</id>
<edge_type>2</edge_type>
<source_obj>53</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_136">
<id>164</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>51</sink_obj>
</item>
<item class_id_reference="20" object_id="_137">
<id>165</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>51</sink_obj>
</item>
<item class_id_reference="20" object_id="_138">
<id>166</id>
<edge_type>2</edge_type>
<source_obj>82</source_obj>
<sink_obj>52</sink_obj>
</item>
<item class_id_reference="20" object_id="_139">
<id>167</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_140">
<id>169</id>
<edge_type>1</edge_type>
<source_obj>168</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_141">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_142">
<id>171</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_143">
<id>173</id>
<edge_type>1</edge_type>
<source_obj>172</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_144">
<id>174</id>
<edge_type>1</edge_type>
<source_obj>55</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_145">
<id>175</id>
<edge_type>1</edge_type>
<source_obj>56</source_obj>
<sink_obj>57</sink_obj>
</item>
<item class_id_reference="20" object_id="_146">
<id>176</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_147">
<id>177</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>59</sink_obj>
</item>
<item class_id_reference="20" object_id="_148">
<id>178</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>60</sink_obj>
</item>
<item class_id_reference="20" object_id="_149">
<id>181</id>
<edge_type>1</edge_type>
<source_obj>54</source_obj>
<sink_obj>61</sink_obj>
</item>
<item class_id_reference="20" object_id="_150">
<id>182</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>61</sink_obj>
</item>
<item class_id_reference="20" object_id="_151">
<id>183</id>
<edge_type>1</edge_type>
<source_obj>61</source_obj>
<sink_obj>62</sink_obj>
</item>
<item class_id_reference="20" object_id="_152">
<id>184</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_153">
<id>185</id>
<edge_type>1</edge_type>
<source_obj>172</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_154">
<id>186</id>
<edge_type>1</edge_type>
<source_obj>62</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_155">
<id>187</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>64</sink_obj>
</item>
<item class_id_reference="20" object_id="_156">
<id>188</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>65</sink_obj>
</item>
<item class_id_reference="20" object_id="_157">
<id>190</id>
<edge_type>1</edge_type>
<source_obj>189</source_obj>
<sink_obj>65</sink_obj>
</item>
<item class_id_reference="20" object_id="_158">
<id>191</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_159">
<id>193</id>
<edge_type>1</edge_type>
<source_obj>192</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_160">
<id>194</id>
<edge_type>1</edge_type>
<source_obj>59</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_161">
<id>196</id>
<edge_type>1</edge_type>
<source_obj>195</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_162">
<id>197</id>
<edge_type>1</edge_type>
<source_obj>65</source_obj>
<sink_obj>68</sink_obj>
</item>
<item class_id_reference="20" object_id="_163">
<id>198</id>
<edge_type>1</edge_type>
<source_obj>66</source_obj>
<sink_obj>68</sink_obj>
</item>
<item class_id_reference="20" object_id="_164">
<id>199</id>
<edge_type>1</edge_type>
<source_obj>68</source_obj>
<sink_obj>69</sink_obj>
</item>
<item class_id_reference="20" object_id="_165">
<id>200</id>
<edge_type>1</edge_type>
<source_obj>67</source_obj>
<sink_obj>69</sink_obj>
</item>
<item class_id_reference="20" object_id="_166">
<id>201</id>
<edge_type>1</edge_type>
<source_obj>69</source_obj>
<sink_obj>70</sink_obj>
</item>
<item class_id_reference="20" object_id="_167">
<id>202</id>
<edge_type>1</edge_type>
<source_obj>59</source_obj>
<sink_obj>70</sink_obj>
</item>
<item class_id_reference="20" object_id="_168">
<id>203</id>
<edge_type>1</edge_type>
<source_obj>70</source_obj>
<sink_obj>71</sink_obj>
</item>
<item class_id_reference="20" object_id="_169">
<id>205</id>
<edge_type>1</edge_type>
<source_obj>204</source_obj>
<sink_obj>71</sink_obj>
</item>
<item class_id_reference="20" object_id="_170">
<id>206</id>
<edge_type>1</edge_type>
<source_obj>64</source_obj>
<sink_obj>71</sink_obj>
</item>
<item class_id_reference="20" object_id="_171">
<id>207</id>
<edge_type>1</edge_type>
<source_obj>57</source_obj>
<sink_obj>72</sink_obj>
</item>
<item class_id_reference="20" object_id="_172">
<id>208</id>
<edge_type>1</edge_type>
<source_obj>58</source_obj>
<sink_obj>73</sink_obj>
</item>
<item class_id_reference="20" object_id="_173">
<id>209</id>
<edge_type>1</edge_type>
<source_obj>72</source_obj>
<sink_obj>74</sink_obj>
</item>
<item class_id_reference="20" object_id="_174">
<id>210</id>
<edge_type>1</edge_type>
<source_obj>73</source_obj>
<sink_obj>74</sink_obj>
</item>
<item class_id_reference="20" object_id="_175">
<id>211</id>
<edge_type>1</edge_type>
<source_obj>74</source_obj>
<sink_obj>75</sink_obj>
</item>
<item class_id_reference="20" object_id="_176">
<id>212</id>
<edge_type>1</edge_type>
<source_obj>75</source_obj>
<sink_obj>76</sink_obj>
</item>
<item class_id_reference="20" object_id="_177">
<id>213</id>
<edge_type>1</edge_type>
<source_obj>71</source_obj>
<sink_obj>76</sink_obj>
</item>
<item class_id_reference="20" object_id="_178">
<id>215</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>77</sink_obj>
</item>
<item class_id_reference="20" object_id="_179">
<id>216</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>77</sink_obj>
</item>
<item class_id_reference="20" object_id="_180">
<id>217</id>
<edge_type>1</edge_type>
<source_obj>77</source_obj>
<sink_obj>78</sink_obj>
</item>
<item class_id_reference="20" object_id="_181">
<id>218</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>79</sink_obj>
</item>
<item class_id_reference="20" object_id="_182">
<id>219</id>
<edge_type>1</edge_type>
<source_obj>172</source_obj>
<sink_obj>79</sink_obj>
</item>
<item class_id_reference="20" object_id="_183">
<id>220</id>
<edge_type>1</edge_type>
<source_obj>78</source_obj>
<sink_obj>79</sink_obj>
</item>
<item class_id_reference="20" object_id="_184">
<id>221</id>
<edge_type>1</edge_type>
<source_obj>76</source_obj>
<sink_obj>80</sink_obj>
</item>
<item class_id_reference="20" object_id="_185">
<id>222</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>80</sink_obj>
</item>
<item class_id_reference="20" object_id="_186">
<id>223</id>
<edge_type>1</edge_type>
<source_obj>65</source_obj>
<sink_obj>81</sink_obj>
</item>
<item class_id_reference="20" object_id="_187">
<id>224</id>
<edge_type>2</edge_type>
<source_obj>98</source_obj>
<sink_obj>81</sink_obj>
</item>
<item class_id_reference="20" object_id="_188">
<id>225</id>
<edge_type>2</edge_type>
<source_obj>84</source_obj>
<sink_obj>81</sink_obj>
</item>
<item class_id_reference="20" object_id="_189">
<id>226</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>83</sink_obj>
</item>
<item class_id_reference="20" object_id="_190">
<id>227</id>
<edge_type>2</edge_type>
<source_obj>91</source_obj>
<sink_obj>83</sink_obj>
</item>
<item class_id_reference="20" object_id="_191">
<id>228</id>
<edge_type>2</edge_type>
<source_obj>87</source_obj>
<sink_obj>83</sink_obj>
</item>
<item class_id_reference="20" object_id="_192">
<id>230</id>
<edge_type>1</edge_type>
<source_obj>229</source_obj>
<sink_obj>85</sink_obj>
</item>
<item class_id_reference="20" object_id="_193">
<id>231</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>85</sink_obj>
</item>
<item class_id_reference="20" object_id="_194">
<id>232</id>
<edge_type>2</edge_type>
<source_obj>91</source_obj>
<sink_obj>86</sink_obj>
</item>
<item class_id_reference="20" object_id="_195">
<id>233</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_196">
<id>234</id>
<edge_type>1</edge_type>
<source_obj>195</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_197">
<id>235</id>
<edge_type>1</edge_type>
<source_obj>88</source_obj>
<sink_obj>89</sink_obj>
</item>
<item class_id_reference="20" object_id="_198">
<id>236</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>89</sink_obj>
</item>
<item class_id_reference="20" object_id="_199">
<id>237</id>
<edge_type>2</edge_type>
<source_obj>98</source_obj>
<sink_obj>90</sink_obj>
</item>
<item class_id_reference="20" object_id="_200">
<id>240</id>
<edge_type>1</edge_type>
<source_obj>76</source_obj>
<sink_obj>92</sink_obj>
</item>
<item class_id_reference="20" object_id="_201">
<id>242</id>
<edge_type>1</edge_type>
<source_obj>241</source_obj>
<sink_obj>92</sink_obj>
</item>
<item class_id_reference="20" object_id="_202">
<id>244</id>
<edge_type>1</edge_type>
<source_obj>243</source_obj>
<sink_obj>92</sink_obj>
</item>
<item class_id_reference="20" object_id="_203">
<id>245</id>
<edge_type>1</edge_type>
<source_obj>65</source_obj>
<sink_obj>93</sink_obj>
</item>
<item class_id_reference="20" object_id="_204">
<id>246</id>
<edge_type>1</edge_type>
<source_obj>159</source_obj>
<sink_obj>93</sink_obj>
</item>
<item class_id_reference="20" object_id="_205">
<id>247</id>
<edge_type>1</edge_type>
<source_obj>54</source_obj>
<sink_obj>93</sink_obj>
</item>
<item class_id_reference="20" object_id="_206">
<id>248</id>
<edge_type>1</edge_type>
<source_obj>93</source_obj>
<sink_obj>94</sink_obj>
</item>
<item class_id_reference="20" object_id="_207">
<id>249</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>94</sink_obj>
</item>
<item class_id_reference="20" object_id="_208">
<id>250</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>95</sink_obj>
</item>
<item class_id_reference="20" object_id="_209">
<id>251</id>
<edge_type>1</edge_type>
<source_obj>95</source_obj>
<sink_obj>96</sink_obj>
</item>
<item class_id_reference="20" object_id="_210">
<id>253</id>
<edge_type>1</edge_type>
<source_obj>252</source_obj>
<sink_obj>96</sink_obj>
</item>
<item class_id_reference="20" object_id="_211">
<id>254</id>
<edge_type>1</edge_type>
<source_obj>96</source_obj>
<sink_obj>97</sink_obj>
</item>
<item class_id_reference="20" object_id="_212">
<id>255</id>
<edge_type>2</edge_type>
<source_obj>130</source_obj>
<sink_obj>97</sink_obj>
</item>
<item class_id_reference="20" object_id="_213">
<id>256</id>
<edge_type>2</edge_type>
<source_obj>101</source_obj>
<sink_obj>97</sink_obj>
</item>
<item class_id_reference="20" object_id="_214">
<id>257</id>
<edge_type>1</edge_type>
<source_obj>92</source_obj>
<sink_obj>99</sink_obj>
</item>
<item class_id_reference="20" object_id="_215">
<id>258</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>99</sink_obj>
</item>
<item class_id_reference="20" object_id="_216">
<id>259</id>
<edge_type>2</edge_type>
<source_obj>130</source_obj>
<sink_obj>100</sink_obj>
</item>
<item class_id_reference="20" object_id="_217">
<id>260</id>
<edge_type>1</edge_type>
<source_obj>95</source_obj>
<sink_obj>102</sink_obj>
</item>
<item class_id_reference="20" object_id="_218">
<id>262</id>
<edge_type>1</edge_type>
<source_obj>261</source_obj>
<sink_obj>102</sink_obj>
</item>
<item class_id_reference="20" object_id="_219">
<id>263</id>
<edge_type>1</edge_type>
<source_obj>95</source_obj>
<sink_obj>103</sink_obj>
</item>
<item class_id_reference="20" object_id="_220">
<id>264</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>104</sink_obj>
</item>
<item class_id_reference="20" object_id="_221">
<id>265</id>
<edge_type>1</edge_type>
<source_obj>172</source_obj>
<sink_obj>104</sink_obj>
</item>
<item class_id_reference="20" object_id="_222">
<id>266</id>
<edge_type>1</edge_type>
<source_obj>103</source_obj>
<sink_obj>104</sink_obj>
</item>
<item class_id_reference="20" object_id="_223">
<id>267</id>
<edge_type>1</edge_type>
<source_obj>104</source_obj>
<sink_obj>105</sink_obj>
</item>
<item class_id_reference="20" object_id="_224">
<id>268</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>106</sink_obj>
</item>
<item class_id_reference="20" object_id="_225">
<id>269</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>107</sink_obj>
</item>
<item class_id_reference="20" object_id="_226">
<id>270</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>108</sink_obj>
</item>
<item class_id_reference="20" object_id="_227">
<id>273</id>
<edge_type>1</edge_type>
<source_obj>102</source_obj>
<sink_obj>109</sink_obj>
</item>
<item class_id_reference="20" object_id="_228">
<id>274</id>
<edge_type>1</edge_type>
<source_obj>108</source_obj>
<sink_obj>109</sink_obj>
</item>
<item class_id_reference="20" object_id="_229">
<id>275</id>
<edge_type>1</edge_type>
<source_obj>109</source_obj>
<sink_obj>110</sink_obj>
</item>
<item class_id_reference="20" object_id="_230">
<id>276</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>111</sink_obj>
</item>
<item class_id_reference="20" object_id="_231">
<id>277</id>
<edge_type>1</edge_type>
<source_obj>172</source_obj>
<sink_obj>111</sink_obj>
</item>
<item class_id_reference="20" object_id="_232">
<id>278</id>
<edge_type>1</edge_type>
<source_obj>110</source_obj>
<sink_obj>111</sink_obj>
</item>
<item class_id_reference="20" object_id="_233">
<id>279</id>
<edge_type>1</edge_type>
<source_obj>111</source_obj>
<sink_obj>112</sink_obj>
</item>
<item class_id_reference="20" object_id="_234">
<id>280</id>
<edge_type>1</edge_type>
<source_obj>95</source_obj>
<sink_obj>113</sink_obj>
</item>
<item class_id_reference="20" object_id="_235">
<id>282</id>
<edge_type>1</edge_type>
<source_obj>281</source_obj>
<sink_obj>113</sink_obj>
</item>
<item class_id_reference="20" object_id="_236">
<id>283</id>
<edge_type>1</edge_type>
<source_obj>95</source_obj>
<sink_obj>114</sink_obj>
</item>
<item class_id_reference="20" object_id="_237">
<id>285</id>
<edge_type>1</edge_type>
<source_obj>284</source_obj>
<sink_obj>114</sink_obj>
</item>
<item class_id_reference="20" object_id="_238">
<id>286</id>
<edge_type>1</edge_type>
<source_obj>107</source_obj>
<sink_obj>115</sink_obj>
</item>
<item class_id_reference="20" object_id="_239">
<id>287</id>
<edge_type>1</edge_type>
<source_obj>195</source_obj>
<sink_obj>115</sink_obj>
</item>
<item class_id_reference="20" object_id="_240">
<id>288</id>
<edge_type>1</edge_type>
<source_obj>113</source_obj>
<sink_obj>116</sink_obj>
</item>
<item class_id_reference="20" object_id="_241">
<id>289</id>
<edge_type>1</edge_type>
<source_obj>114</source_obj>
<sink_obj>116</sink_obj>
</item>
<item class_id_reference="20" object_id="_242">
<id>290</id>
<edge_type>1</edge_type>
<source_obj>116</source_obj>
<sink_obj>117</sink_obj>
</item>
<item class_id_reference="20" object_id="_243">
<id>291</id>
<edge_type>1</edge_type>
<source_obj>115</source_obj>
<sink_obj>117</sink_obj>
</item>
<item class_id_reference="20" object_id="_244">
<id>292</id>
<edge_type>1</edge_type>
<source_obj>117</source_obj>
<sink_obj>118</sink_obj>
</item>
<item class_id_reference="20" object_id="_245">
<id>293</id>
<edge_type>1</edge_type>
<source_obj>107</source_obj>
<sink_obj>118</sink_obj>
</item>
<item class_id_reference="20" object_id="_246">
<id>294</id>
<edge_type>1</edge_type>
<source_obj>118</source_obj>
<sink_obj>119</sink_obj>
</item>
<item class_id_reference="20" object_id="_247">
<id>295</id>
<edge_type>1</edge_type>
<source_obj>204</source_obj>
<sink_obj>119</sink_obj>
</item>
<item class_id_reference="20" object_id="_248">
<id>296</id>
<edge_type>1</edge_type>
<source_obj>112</source_obj>
<sink_obj>119</sink_obj>
</item>
<item class_id_reference="20" object_id="_249">
<id>297</id>
<edge_type>1</edge_type>
<source_obj>105</source_obj>
<sink_obj>120</sink_obj>
</item>
<item class_id_reference="20" object_id="_250">
<id>298</id>
<edge_type>1</edge_type>
<source_obj>106</source_obj>
<sink_obj>121</sink_obj>
</item>
<item class_id_reference="20" object_id="_251">
<id>299</id>
<edge_type>1</edge_type>
<source_obj>120</source_obj>
<sink_obj>122</sink_obj>
</item>
<item class_id_reference="20" object_id="_252">
<id>300</id>
<edge_type>1</edge_type>
<source_obj>121</source_obj>
<sink_obj>122</sink_obj>
</item>
<item class_id_reference="20" object_id="_253">
<id>301</id>
<edge_type>1</edge_type>
<source_obj>122</source_obj>
<sink_obj>123</sink_obj>
</item>
<item class_id_reference="20" object_id="_254">
<id>302</id>
<edge_type>1</edge_type>
<source_obj>123</source_obj>
<sink_obj>124</sink_obj>
</item>
<item class_id_reference="20" object_id="_255">
<id>303</id>
<edge_type>1</edge_type>
<source_obj>119</source_obj>
<sink_obj>124</sink_obj>
</item>
<item class_id_reference="20" object_id="_256">
<id>305</id>
<edge_type>1</edge_type>
<source_obj>95</source_obj>
<sink_obj>125</sink_obj>
</item>
<item class_id_reference="20" object_id="_257">
<id>306</id>
<edge_type>1</edge_type>
<source_obj>108</source_obj>
<sink_obj>125</sink_obj>
</item>
<item class_id_reference="20" object_id="_258">
<id>307</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>126</sink_obj>
</item>
<item class_id_reference="20" object_id="_259">
<id>308</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>127</sink_obj>
</item>
<item class_id_reference="20" object_id="_260">
<id>309</id>
<edge_type>1</edge_type>
<source_obj>172</source_obj>
<sink_obj>127</sink_obj>
</item>
<item class_id_reference="20" object_id="_261">
<id>310</id>
<edge_type>1</edge_type>
<source_obj>126</source_obj>
<sink_obj>127</sink_obj>
</item>
<item class_id_reference="20" object_id="_262">
<id>311</id>
<edge_type>1</edge_type>
<source_obj>124</source_obj>
<sink_obj>128</sink_obj>
</item>
<item class_id_reference="20" object_id="_263">
<id>312</id>
<edge_type>1</edge_type>
<source_obj>127</source_obj>
<sink_obj>128</sink_obj>
</item>
<item class_id_reference="20" object_id="_264">
<id>313</id>
<edge_type>1</edge_type>
<source_obj>113</source_obj>
<sink_obj>129</sink_obj>
</item>
<item class_id_reference="20" object_id="_265">
<id>314</id>
<edge_type>2</edge_type>
<source_obj>150</source_obj>
<sink_obj>129</sink_obj>
</item>
<item class_id_reference="20" object_id="_266">
<id>315</id>
<edge_type>2</edge_type>
<source_obj>132</source_obj>
<sink_obj>129</sink_obj>
</item>
<item class_id_reference="20" object_id="_267">
<id>316</id>
<edge_type>1</edge_type>
<source_obj>108</source_obj>
<sink_obj>131</sink_obj>
</item>
<item class_id_reference="20" object_id="_268">
<id>317</id>
<edge_type>2</edge_type>
<source_obj>142</source_obj>
<sink_obj>131</sink_obj>
</item>
<item class_id_reference="20" object_id="_269">
<id>318</id>
<edge_type>2</edge_type>
<source_obj>135</source_obj>
<sink_obj>131</sink_obj>
</item>
<item class_id_reference="20" object_id="_270">
<id>319</id>
<edge_type>1</edge_type>
<source_obj>229</source_obj>
<sink_obj>133</sink_obj>
</item>
<item class_id_reference="20" object_id="_271">
<id>320</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>133</sink_obj>
</item>
<item class_id_reference="20" object_id="_272">
<id>321</id>
<edge_type>2</edge_type>
<source_obj>142</source_obj>
<sink_obj>134</sink_obj>
</item>
<item class_id_reference="20" object_id="_273">
<id>322</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>136</sink_obj>
</item>
<item class_id_reference="20" object_id="_274">
<id>323</id>
<edge_type>1</edge_type>
<source_obj>108</source_obj>
<sink_obj>137</sink_obj>
</item>
<item class_id_reference="20" object_id="_275">
<id>324</id>
<edge_type>1</edge_type>
<source_obj>136</source_obj>
<sink_obj>137</sink_obj>
</item>
<item class_id_reference="20" object_id="_276">
<id>325</id>
<edge_type>1</edge_type>
<source_obj>137</source_obj>
<sink_obj>138</sink_obj>
</item>
<item class_id_reference="20" object_id="_277">
<id>326</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>138</sink_obj>
</item>
<item class_id_reference="20" object_id="_278">
<id>327</id>
<edge_type>1</edge_type>
<source_obj>136</source_obj>
<sink_obj>139</sink_obj>
</item>
<item class_id_reference="20" object_id="_279">
<id>328</id>
<edge_type>1</edge_type>
<source_obj>195</source_obj>
<sink_obj>139</sink_obj>
</item>
<item class_id_reference="20" object_id="_280">
<id>329</id>
<edge_type>1</edge_type>
<source_obj>139</source_obj>
<sink_obj>140</sink_obj>
</item>
<item class_id_reference="20" object_id="_281">
<id>330</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>140</sink_obj>
</item>
<item class_id_reference="20" object_id="_282">
<id>331</id>
<edge_type>2</edge_type>
<source_obj>150</source_obj>
<sink_obj>141</sink_obj>
</item>
<item class_id_reference="20" object_id="_283">
<id>333</id>
<edge_type>1</edge_type>
<source_obj>124</source_obj>
<sink_obj>143</sink_obj>
</item>
<item class_id_reference="20" object_id="_284">
<id>334</id>
<edge_type>1</edge_type>
<source_obj>241</source_obj>
<sink_obj>143</sink_obj>
</item>
<item class_id_reference="20" object_id="_285">
<id>335</id>
<edge_type>1</edge_type>
<source_obj>243</source_obj>
<sink_obj>143</sink_obj>
</item>
<item class_id_reference="20" object_id="_286">
<id>336</id>
<edge_type>1</edge_type>
<source_obj>113</source_obj>
<sink_obj>144</sink_obj>
</item>
<item class_id_reference="20" object_id="_287">
<id>337</id>
<edge_type>1</edge_type>
<source_obj>252</source_obj>
<sink_obj>144</sink_obj>
</item>
<item class_id_reference="20" object_id="_288">
<id>338</id>
<edge_type>1</edge_type>
<source_obj>102</source_obj>
<sink_obj>144</sink_obj>
</item>
<item class_id_reference="20" object_id="_289">
<id>339</id>
<edge_type>1</edge_type>
<source_obj>144</source_obj>
<sink_obj>145</sink_obj>
</item>
<item class_id_reference="20" object_id="_290">
<id>340</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>145</sink_obj>
</item>
<item class_id_reference="20" object_id="_291">
<id>342</id>
<edge_type>1</edge_type>
<source_obj>341</source_obj>
<sink_obj>146</sink_obj>
</item>
<item class_id_reference="20" object_id="_292">
<id>343</id>
<edge_type>1</edge_type>
<source_obj>143</source_obj>
<sink_obj>146</sink_obj>
</item>
<item class_id_reference="20" object_id="_293">
<id>345</id>
<edge_type>1</edge_type>
<source_obj>344</source_obj>
<sink_obj>147</sink_obj>
</item>
<item class_id_reference="20" object_id="_294">
<id>346</id>
<edge_type>1</edge_type>
<source_obj>146</source_obj>
<sink_obj>147</sink_obj>
</item>
<item class_id_reference="20" object_id="_295">
<id>348</id>
<edge_type>1</edge_type>
<source_obj>347</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_296">
<id>349</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_297">
<id>350</id>
<edge_type>1</edge_type>
<source_obj>147</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_298">
<id>351</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_299">
<id>352</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_300">
<id>353</id>
<edge_type>1</edge_type>
<source_obj>18</source_obj>
<sink_obj>146</sink_obj>
</item>
<item class_id_reference="20" object_id="_301">
<id>354</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>146</sink_obj>
</item>
<item class_id_reference="20" object_id="_302">
<id>355</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>146</sink_obj>
</item>
<item class_id_reference="20" object_id="_303">
<id>356</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>146</sink_obj>
</item>
<item class_id_reference="20" object_id="_304">
<id>357</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>146</sink_obj>
</item>
<item class_id_reference="20" object_id="_305">
<id>358</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>146</sink_obj>
</item>
<item class_id_reference="20" object_id="_306">
<id>359</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>146</sink_obj>
</item>
<item class_id_reference="20" object_id="_307">
<id>360</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>147</sink_obj>
</item>
<item class_id_reference="20" object_id="_308">
<id>361</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>147</sink_obj>
</item>
<item class_id_reference="20" object_id="_309">
<id>362</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>147</sink_obj>
</item>
<item class_id_reference="20" object_id="_310">
<id>363</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>147</sink_obj>
</item>
<item class_id_reference="20" object_id="_311">
<id>364</id>
<edge_type>1</edge_type>
<source_obj>29</source_obj>
<sink_obj>147</sink_obj>
</item>
<item class_id_reference="20" object_id="_312">
<id>365</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>147</sink_obj>
</item>
<item class_id_reference="20" object_id="_313">
<id>366</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>147</sink_obj>
</item>
<item class_id_reference="20" object_id="_314">
<id>367</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>147</sink_obj>
</item>
<item class_id_reference="20" object_id="_315">
<id>368</id>
<edge_type>1</edge_type>
<source_obj>33</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_316">
<id>369</id>
<edge_type>1</edge_type>
<source_obj>34</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_317">
<id>370</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_318">
<id>371</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_319">
<id>372</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_320">
<id>373</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_321">
<id>374</id>
<edge_type>1</edge_type>
<source_obj>39</source_obj>
<sink_obj>148</sink_obj>
</item>
<item class_id_reference="20" object_id="_322">
<id>388</id>
<edge_type>2</edge_type>
<source_obj>50</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_323">
<id>389</id>
<edge_type>2</edge_type>
<source_obj>50</source_obj>
<sink_obj>82</sink_obj>
</item>
<item class_id_reference="20" object_id="_324">
<id>390</id>
<edge_type>2</edge_type>
<source_obj>53</source_obj>
<sink_obj>82</sink_obj>
</item>
<item class_id_reference="20" object_id="_325">
<id>391</id>
<edge_type>2</edge_type>
<source_obj>82</source_obj>
<sink_obj>84</sink_obj>
</item>
<item class_id_reference="20" object_id="_326">
<id>392</id>
<edge_type>2</edge_type>
<source_obj>82</source_obj>
<sink_obj>98</sink_obj>
</item>
<item class_id_reference="20" object_id="_327">
<id>393</id>
<edge_type>2</edge_type>
<source_obj>84</source_obj>
<sink_obj>87</sink_obj>
</item>
<item class_id_reference="20" object_id="_328">
<id>394</id>
<edge_type>2</edge_type>
<source_obj>84</source_obj>
<sink_obj>91</sink_obj>
</item>
<item class_id_reference="20" object_id="_329">
<id>395</id>
<edge_type>2</edge_type>
<source_obj>87</source_obj>
<sink_obj>91</sink_obj>
</item>
<item class_id_reference="20" object_id="_330">
<id>396</id>
<edge_type>2</edge_type>
<source_obj>91</source_obj>
<sink_obj>98</sink_obj>
</item>
<item class_id_reference="20" object_id="_331">
<id>397</id>
<edge_type>2</edge_type>
<source_obj>98</source_obj>
<sink_obj>101</sink_obj>
</item>
<item class_id_reference="20" object_id="_332">
<id>398</id>
<edge_type>2</edge_type>
<source_obj>98</source_obj>
<sink_obj>130</sink_obj>
</item>
<item class_id_reference="20" object_id="_333">
<id>399</id>
<edge_type>2</edge_type>
<source_obj>101</source_obj>
<sink_obj>130</sink_obj>
</item>
<item class_id_reference="20" object_id="_334">
<id>400</id>
<edge_type>2</edge_type>
<source_obj>130</source_obj>
<sink_obj>132</sink_obj>
</item>
<item class_id_reference="20" object_id="_335">
<id>401</id>
<edge_type>2</edge_type>
<source_obj>130</source_obj>
<sink_obj>150</sink_obj>
</item>
<item class_id_reference="20" object_id="_336">
<id>402</id>
<edge_type>2</edge_type>
<source_obj>132</source_obj>
<sink_obj>135</sink_obj>
</item>
<item class_id_reference="20" object_id="_337">
<id>403</id>
<edge_type>2</edge_type>
<source_obj>132</source_obj>
<sink_obj>142</sink_obj>
</item>
<item class_id_reference="20" object_id="_338">
<id>404</id>
<edge_type>2</edge_type>
<source_obj>135</source_obj>
<sink_obj>142</sink_obj>
</item>
<item class_id_reference="20" object_id="_339">
<id>405</id>
<edge_type>2</edge_type>
<source_obj>142</source_obj>
<sink_obj>150</sink_obj>
</item>
<item class_id_reference="20" object_id="_340">
<id>406</id>
<edge_type>4</edge_type>
<source_obj>64</source_obj>
<sink_obj>80</sink_obj>
</item>
<item class_id_reference="20" object_id="_341">
<id>407</id>
<edge_type>4</edge_type>
<source_obj>112</source_obj>
<sink_obj>128</sink_obj>
</item>
<item class_id_reference="20" object_id="_342">
<id>408</id>
<edge_type>4</edge_type>
<source_obj>136</source_obj>
<sink_obj>140</sink_obj>
</item>
<item class_id_reference="20" object_id="_343">
<id>409</id>
<edge_type>4</edge_type>
<source_obj>47</source_obj>
<sink_obj>94</sink_obj>
</item>
<item class_id_reference="20" object_id="_344">
<id>410</id>
<edge_type>4</edge_type>
<source_obj>51</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_345">
<id>411</id>
<edge_type>4</edge_type>
<source_obj>59</source_obj>
<sink_obj>85</sink_obj>
</item>
<item class_id_reference="20" object_id="_346">
<id>412</id>
<edge_type>4</edge_type>
<source_obj>60</source_obj>
<sink_obj>89</sink_obj>
</item>
<item class_id_reference="20" object_id="_347">
<id>413</id>
<edge_type>4</edge_type>
<source_obj>95</source_obj>
<sink_obj>145</sink_obj>
</item>
<item class_id_reference="20" object_id="_348">
<id>414</id>
<edge_type>4</edge_type>
<source_obj>99</source_obj>
<sink_obj>106</sink_obj>
</item>
<item class_id_reference="20" object_id="_349">
<id>415</id>
<edge_type>4</edge_type>
<source_obj>107</source_obj>
<sink_obj>133</sink_obj>
</item>
<item class_id_reference="20" object_id="_350">
<id>416</id>
<edge_type>4</edge_type>
<source_obj>108</source_obj>
<sink_obj>138</sink_obj>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_351">
<mId>1</mId>
<mTag>duc</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>13</count>
<item_version>0</item_version>
<item>50</item>
<item>53</item>
<item>82</item>
<item>84</item>
<item>87</item>
<item>91</item>
<item>98</item>
<item>101</item>
<item>130</item>
<item>132</item>
<item>135</item>
<item>142</item>
<item>150</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>38</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="-1"></fsm>
<res class_id="25" tracking_level="1" version="0" object_id="_352">
<dp_component_resource class_id="26" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_resource>
<dp_expression_resource>
<count>0</count>
<item_version>0</item_version>
</dp_expression_resource>
<dp_fifo_resource>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_resource>
<dp_memory_resource>
<count>0</count>
<item_version>0</item_version>
</dp_memory_resource>
<dp_multiplexer_resource>
<count>0</count>
<item_version>0</item_version>
</dp_multiplexer_resource>
<dp_register_resource>
<count>0</count>
<item_version>0</item_version>
</dp_register_resource>
<dp_component_map class_id="27" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_map>
<dp_expression_map>
<count>0</count>
<item_version>0</item_version>
</dp_expression_map>
<dp_fifo_map>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_map>
<dp_memory_map>
<count>0</count>
<item_version>0</item_version>
</dp_memory_map>
</res>
<node_label_latency class_id="28" tracking_level="0" version="0">
<count>93</count>
<item_version>0</item_version>
<item class_id="29" tracking_level="0" version="0">
<first>45</first>
<second class_id="30" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>46</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>47</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>52</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>55</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>56</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>0</first>
<second>1</second>
</second>
</item>
<item>
<first>58</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>59</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>61</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>64</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>65</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>67</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>68</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>69</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>70</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>71</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>72</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>73</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>74</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>75</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>76</first>
<second>
<first>4</first>
<second>1</second>
</second>
</item>
<item>
<first>77</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>78</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>79</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>80</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>81</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>83</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>85</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>86</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>88</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>89</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>90</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>92</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>93</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>94</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>95</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>96</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>97</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>99</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>100</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>102</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>103</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>104</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>105</first>
<second>
<first>6</first>
<second>1</second>
</second>
</item>
<item>
<first>106</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>107</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>108</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>109</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>110</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>111</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>112</first>
<second>
<first>7</first>
<second>1</second>
</second>
</item>
<item>
<first>113</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>114</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>115</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>116</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>117</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>118</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>119</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>120</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>121</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>122</first>
<second>
<first>8</first>
<second>2</second>
</second>
</item>
<item>
<first>123</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>124</first>
<second>
<first>10</first>
<second>1</second>
</second>
</item>
<item>
<first>125</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>126</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>127</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>128</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>129</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>131</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>133</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>134</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>136</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>137</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>138</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>139</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>140</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>141</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>143</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>144</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>145</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>146</first>
<second>
<first>12</first>
<second>1</second>
</second>
</item>
<item>
<first>147</first>
<second>
<first>13</first>
<second>1</second>
</second>
</item>
<item>
<first>148</first>
<second>
<first>15</first>
<second>1</second>
</second>
</item>
<item>
<first>149</first>
<second>
<first>16</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="31" tracking_level="0" version="0">
<count>13</count>
<item_version>0</item_version>
<item class_id="32" tracking_level="0" version="0">
<first>50</first>
<second class_id="33" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>53</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>82</first>
<second>
<first>0</first>
<second>6</second>
</second>
</item>
<item>
<first>84</first>
<second>
<first>6</first>
<second>6</second>
</second>
</item>
<item>
<first>87</first>
<second>
<first>6</first>
<second>6</second>
</second>
</item>
<item>
<first>91</first>
<second>
<first>6</first>
<second>6</second>
</second>
</item>
<item>
<first>98</first>
<second>
<first>6</first>
<second>6</second>
</second>
</item>
<item>
<first>101</first>
<second>
<first>6</first>
<second>6</second>
</second>
</item>
<item>
<first>130</first>
<second>
<first>6</first>
<second>12</second>
</second>
</item>
<item>
<first>132</first>
<second>
<first>12</first>
<second>12</second>
</second>
</item>
<item>
<first>135</first>
<second>
<first>12</first>
<second>12</second>
</second>
</item>
<item>
<first>142</first>
<second>
<first>12</first>
<second>12</second>
</second>
</item>
<item>
<first>150</first>
<second>
<first>12</first>
<second>16</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="34" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</regions>
<dp_fu_nodes class_id="35" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="36" 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="37" 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="38" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_port_io_nodes>
<port2core class_id="39" 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>
| 26.105372 | 99 | 0.568247 |
20ea9bf69ba4afd0091413a56bbdd5962aff8459 | 3,070 | adb | Ada | regtests/search-fields-tests.adb | stcarrez/ada-search | 286dda8fbdd7fb0cd5e447347f92a77e34615089 | [
"Apache-2.0"
] | 9 | 2020-06-28T11:00:30.000Z | 2021-11-30T21:38:58.000Z | regtests/search-fields-tests.adb | stcarrez/ada-search | 286dda8fbdd7fb0cd5e447347f92a77e34615089 | [
"Apache-2.0"
] | null | null | null | regtests/search-fields-tests.adb | stcarrez/ada-search | 286dda8fbdd7fb0cd5e447347f92a77e34615089 | [
"Apache-2.0"
] | null | null | null | -----------------------------------------------------------------------
-- search-fields-tests -- Tests for tokens
-- Copyright (C) 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Test_Caller;
package body Search.Fields.Tests is
package Caller is new Util.Test_Caller (Test, "Search.Fields");
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
begin
Caller.Add_Test (Suite, "Test Search.Fields.Create",
Test_Create_Field'Access);
Caller.Add_Test (Suite, "Test Search.Fields.Stream",
Test_Stream_Field'Access);
end Add_Tests;
procedure Test_Create_Field (T : in out Test) is
Field : Field_Type;
begin
-- F_TOKEN field
Field := Create ("author", "Tolkien");
T.Assert_Equals ("author", Get_Name (Field), "Get_Name invalid");
T.Assert (Is_Indexable (Field), "Is_Indexable failed");
T.Assert (not Is_Tokenized (Field), "Is_Tokenized failed");
-- F_META field
Field := Create ("ident", "123", F_META);
T.Assert_Equals ("ident", Get_Name (Field), "Get_Name invalid");
T.Assert (not Is_Indexable (Field), "Is_Indexable failed");
T.Assert (not Is_Tokenized (Field), "Is_Tokenized failed");
-- F_CONTENT field
Field := Create ("title", "Lord of the Rings", F_CONTENT);
T.Assert_Equals ("title", Get_Name (Field), "Get_Name invalid");
T.Assert (Is_Indexable (Field), "Is_Indexable failed");
T.Assert (Is_Tokenized (Field), "Is_Tokenized failed");
end Test_Create_Field;
procedure Test_Stream_Field (T : in out Test;
Field : in Field_Type) is
procedure Read (Stream : in out Util.Streams.Input_Stream'Class);
procedure Read (Stream : in out Util.Streams.Input_Stream'Class) is
Data : Ada.Streams.Stream_Element_Array (1 .. 100);
Last : Ada.Streams.Stream_Element_Offset;
begin
Stream.Read (Data, Last);
Util.Tests.Assert_Equals (T, Length (Field.Value), Natural (Last), "Invalid length");
end Read;
begin
Stream (Field, Read'Access);
end Test_Stream_Field;
procedure Test_Stream_Field (T : in out Test) is
Field : Field_Type;
begin
Field := Create ("test", "some content");
Test_Stream_Field (T, Field);
end Test_Stream_Field;
end Search.Fields.Tests;
| 37.439024 | 94 | 0.632573 |
2383fadcd7e00f37272bed501139aee02a03e504 | 30,755 | ads | Ada | arch/ARM/STM32/svd/stm32l4x3/stm32_svd-rtc.ads | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | 2 | 2018-05-16T03:56:39.000Z | 2019-07-31T13:53:56.000Z | arch/ARM/STM32/svd/stm32l4x3/stm32_svd-rtc.ads | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | null | null | null | arch/ARM/STM32/svd/stm32l4x3/stm32_svd-rtc.ads | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | null | null | null | -- This spec has been automatically generated from STM32L4x3.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.RTC is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype TR_SU_Field is HAL.UInt4;
subtype TR_ST_Field is HAL.UInt3;
subtype TR_MNU_Field is HAL.UInt4;
subtype TR_MNT_Field is HAL.UInt3;
subtype TR_HU_Field is HAL.UInt4;
subtype TR_HT_Field is HAL.UInt2;
-- time register
type TR_Register is record
-- Second units in BCD format
SU : TR_SU_Field := 16#0#;
-- Second tens in BCD format
ST : TR_ST_Field := 16#0#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Minute units in BCD format
MNU : TR_MNU_Field := 16#0#;
-- Minute tens in BCD format
MNT : TR_MNT_Field := 16#0#;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- Hour units in BCD format
HU : TR_HU_Field := 16#0#;
-- Hour tens in BCD format
HT : TR_HT_Field := 16#0#;
-- AM/PM notation
PM : Boolean := False;
-- unspecified
Reserved_23_31 : HAL.UInt9 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TR_Register use record
SU at 0 range 0 .. 3;
ST at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
MNU at 0 range 8 .. 11;
MNT at 0 range 12 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
HU at 0 range 16 .. 19;
HT at 0 range 20 .. 21;
PM at 0 range 22 .. 22;
Reserved_23_31 at 0 range 23 .. 31;
end record;
subtype DR_DU_Field is HAL.UInt4;
subtype DR_DT_Field is HAL.UInt2;
subtype DR_MU_Field is HAL.UInt4;
subtype DR_WDU_Field is HAL.UInt3;
subtype DR_YU_Field is HAL.UInt4;
subtype DR_YT_Field is HAL.UInt4;
-- date register
type DR_Register is record
-- Date units in BCD format
DU : DR_DU_Field := 16#1#;
-- Date tens in BCD format
DT : DR_DT_Field := 16#0#;
-- unspecified
Reserved_6_7 : HAL.UInt2 := 16#0#;
-- Month units in BCD format
MU : DR_MU_Field := 16#1#;
-- Month tens in BCD format
MT : Boolean := False;
-- Week day units
WDU : DR_WDU_Field := 16#1#;
-- Year units in BCD format
YU : DR_YU_Field := 16#0#;
-- Year tens in BCD format
YT : DR_YT_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DR_Register use record
DU at 0 range 0 .. 3;
DT at 0 range 4 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
MU at 0 range 8 .. 11;
MT at 0 range 12 .. 12;
WDU at 0 range 13 .. 15;
YU at 0 range 16 .. 19;
YT at 0 range 20 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype CR_WCKSEL_Field is HAL.UInt3;
subtype CR_OSEL_Field is HAL.UInt2;
-- control register
type CR_Register is record
-- Wakeup clock selection
WCKSEL : CR_WCKSEL_Field := 16#0#;
-- Time-stamp event active edge
TSEDGE : Boolean := False;
-- Reference clock detection enable (50 or 60 Hz)
REFCKON : Boolean := False;
-- Bypass the shadow registers
BYPSHAD : Boolean := False;
-- Hour format
FMT : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Alarm A enable
ALRAE : Boolean := False;
-- Alarm B enable
ALRBE : Boolean := False;
-- Wakeup timer enable
WUTE : Boolean := False;
-- Time stamp enable
TSE : Boolean := False;
-- Alarm A interrupt enable
ALRAIE : Boolean := False;
-- Alarm B interrupt enable
ALRBIE : Boolean := False;
-- Wakeup timer interrupt enable
WUTIE : Boolean := False;
-- Time-stamp interrupt enable
TSIE : Boolean := False;
-- Add 1 hour (summer time change)
ADD1H : Boolean := False;
-- Subtract 1 hour (winter time change)
SUB1H : Boolean := False;
-- Backup
BKP : Boolean := False;
-- Calibration output selection
COSEL : Boolean := False;
-- Output polarity
POL : Boolean := False;
-- Output selection
OSEL : CR_OSEL_Field := 16#0#;
-- Calibration output enable
COE : Boolean := False;
-- timestamp on internal event enable
ITSE : Boolean := False;
-- unspecified
Reserved_25_31 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
WCKSEL at 0 range 0 .. 2;
TSEDGE at 0 range 3 .. 3;
REFCKON at 0 range 4 .. 4;
BYPSHAD at 0 range 5 .. 5;
FMT at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
ALRAE at 0 range 8 .. 8;
ALRBE at 0 range 9 .. 9;
WUTE at 0 range 10 .. 10;
TSE at 0 range 11 .. 11;
ALRAIE at 0 range 12 .. 12;
ALRBIE at 0 range 13 .. 13;
WUTIE at 0 range 14 .. 14;
TSIE at 0 range 15 .. 15;
ADD1H at 0 range 16 .. 16;
SUB1H at 0 range 17 .. 17;
BKP at 0 range 18 .. 18;
COSEL at 0 range 19 .. 19;
POL at 0 range 20 .. 20;
OSEL at 0 range 21 .. 22;
COE at 0 range 23 .. 23;
ITSE at 0 range 24 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
-- initialization and status register
type ISR_Register is record
-- Read-only. Alarm A write flag
ALRAWF : Boolean := True;
-- Read-only. Alarm B write flag
ALRBWF : Boolean := True;
-- Read-only. Wakeup timer write flag
WUTWF : Boolean := True;
-- Shift operation pending
SHPF : Boolean := False;
-- Read-only. Initialization status flag
INITS : Boolean := False;
-- Registers synchronization flag
RSF : Boolean := False;
-- Read-only. Initialization flag
INITF : Boolean := False;
-- Initialization mode
INIT : Boolean := False;
-- Alarm A flag
ALRAF : Boolean := False;
-- Alarm B flag
ALRBF : Boolean := False;
-- Wakeup timer flag
WUTF : Boolean := False;
-- Time-stamp flag
TSF : Boolean := False;
-- Time-stamp overflow flag
TSOVF : Boolean := False;
-- Tamper detection flag
TAMP1F : Boolean := False;
-- RTC_TAMP2 detection flag
TAMP2F : Boolean := False;
-- RTC_TAMP3 detection flag
TAMP3F : Boolean := False;
-- Read-only. Recalibration pending Flag
RECALPF : Boolean := False;
-- unspecified
Reserved_17_31 : HAL.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ISR_Register use record
ALRAWF at 0 range 0 .. 0;
ALRBWF at 0 range 1 .. 1;
WUTWF at 0 range 2 .. 2;
SHPF at 0 range 3 .. 3;
INITS at 0 range 4 .. 4;
RSF at 0 range 5 .. 5;
INITF at 0 range 6 .. 6;
INIT at 0 range 7 .. 7;
ALRAF at 0 range 8 .. 8;
ALRBF at 0 range 9 .. 9;
WUTF at 0 range 10 .. 10;
TSF at 0 range 11 .. 11;
TSOVF at 0 range 12 .. 12;
TAMP1F at 0 range 13 .. 13;
TAMP2F at 0 range 14 .. 14;
TAMP3F at 0 range 15 .. 15;
RECALPF at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
subtype PRER_PREDIV_S_Field is HAL.UInt15;
subtype PRER_PREDIV_A_Field is HAL.UInt7;
-- prescaler register
type PRER_Register is record
-- Synchronous prescaler factor
PREDIV_S : PRER_PREDIV_S_Field := 16#FF#;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- Asynchronous prescaler factor
PREDIV_A : PRER_PREDIV_A_Field := 16#7F#;
-- unspecified
Reserved_23_31 : HAL.UInt9 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PRER_Register use record
PREDIV_S at 0 range 0 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
PREDIV_A at 0 range 16 .. 22;
Reserved_23_31 at 0 range 23 .. 31;
end record;
subtype WUTR_WUT_Field is HAL.UInt16;
-- wakeup timer register
type WUTR_Register is record
-- Wakeup auto-reload value bits
WUT : WUTR_WUT_Field := 16#FFFF#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for WUTR_Register use record
WUT at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype ALRMAR_SU_Field is HAL.UInt4;
subtype ALRMAR_ST_Field is HAL.UInt3;
subtype ALRMAR_MNU_Field is HAL.UInt4;
subtype ALRMAR_MNT_Field is HAL.UInt3;
subtype ALRMAR_HU_Field is HAL.UInt4;
subtype ALRMAR_HT_Field is HAL.UInt2;
subtype ALRMAR_DU_Field is HAL.UInt4;
subtype ALRMAR_DT_Field is HAL.UInt2;
-- alarm A register
type ALRMAR_Register is record
-- Second units in BCD format
SU : ALRMAR_SU_Field := 16#0#;
-- Second tens in BCD format
ST : ALRMAR_ST_Field := 16#0#;
-- Alarm A seconds mask
MSK1 : Boolean := False;
-- Minute units in BCD format
MNU : ALRMAR_MNU_Field := 16#0#;
-- Minute tens in BCD format
MNT : ALRMAR_MNT_Field := 16#0#;
-- Alarm A minutes mask
MSK2 : Boolean := False;
-- Hour units in BCD format
HU : ALRMAR_HU_Field := 16#0#;
-- Hour tens in BCD format
HT : ALRMAR_HT_Field := 16#0#;
-- AM/PM notation
PM : Boolean := False;
-- Alarm A hours mask
MSK3 : Boolean := False;
-- Date units or day in BCD format
DU : ALRMAR_DU_Field := 16#0#;
-- Date tens in BCD format
DT : ALRMAR_DT_Field := 16#0#;
-- Week day selection
WDSEL : Boolean := False;
-- Alarm A date mask
MSK4 : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ALRMAR_Register use record
SU at 0 range 0 .. 3;
ST at 0 range 4 .. 6;
MSK1 at 0 range 7 .. 7;
MNU at 0 range 8 .. 11;
MNT at 0 range 12 .. 14;
MSK2 at 0 range 15 .. 15;
HU at 0 range 16 .. 19;
HT at 0 range 20 .. 21;
PM at 0 range 22 .. 22;
MSK3 at 0 range 23 .. 23;
DU at 0 range 24 .. 27;
DT at 0 range 28 .. 29;
WDSEL at 0 range 30 .. 30;
MSK4 at 0 range 31 .. 31;
end record;
subtype ALRMBR_SU_Field is HAL.UInt4;
subtype ALRMBR_ST_Field is HAL.UInt3;
subtype ALRMBR_MNU_Field is HAL.UInt4;
subtype ALRMBR_MNT_Field is HAL.UInt3;
subtype ALRMBR_HU_Field is HAL.UInt4;
subtype ALRMBR_HT_Field is HAL.UInt2;
subtype ALRMBR_DU_Field is HAL.UInt4;
subtype ALRMBR_DT_Field is HAL.UInt2;
-- alarm B register
type ALRMBR_Register is record
-- Second units in BCD format
SU : ALRMBR_SU_Field := 16#0#;
-- Second tens in BCD format
ST : ALRMBR_ST_Field := 16#0#;
-- Alarm B seconds mask
MSK1 : Boolean := False;
-- Minute units in BCD format
MNU : ALRMBR_MNU_Field := 16#0#;
-- Minute tens in BCD format
MNT : ALRMBR_MNT_Field := 16#0#;
-- Alarm B minutes mask
MSK2 : Boolean := False;
-- Hour units in BCD format
HU : ALRMBR_HU_Field := 16#0#;
-- Hour tens in BCD format
HT : ALRMBR_HT_Field := 16#0#;
-- AM/PM notation
PM : Boolean := False;
-- Alarm B hours mask
MSK3 : Boolean := False;
-- Date units or day in BCD format
DU : ALRMBR_DU_Field := 16#0#;
-- Date tens in BCD format
DT : ALRMBR_DT_Field := 16#0#;
-- Week day selection
WDSEL : Boolean := False;
-- Alarm B date mask
MSK4 : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ALRMBR_Register use record
SU at 0 range 0 .. 3;
ST at 0 range 4 .. 6;
MSK1 at 0 range 7 .. 7;
MNU at 0 range 8 .. 11;
MNT at 0 range 12 .. 14;
MSK2 at 0 range 15 .. 15;
HU at 0 range 16 .. 19;
HT at 0 range 20 .. 21;
PM at 0 range 22 .. 22;
MSK3 at 0 range 23 .. 23;
DU at 0 range 24 .. 27;
DT at 0 range 28 .. 29;
WDSEL at 0 range 30 .. 30;
MSK4 at 0 range 31 .. 31;
end record;
subtype WPR_KEY_Field is HAL.UInt8;
-- write protection register
type WPR_Register is record
-- Write-only. Write protection key
KEY : WPR_KEY_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for WPR_Register use record
KEY at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype SSR_SS_Field is HAL.UInt16;
-- sub second register
type SSR_Register is record
-- Read-only. Sub second value
SS : SSR_SS_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SSR_Register use record
SS at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype SHIFTR_SUBFS_Field is HAL.UInt15;
-- shift control register
type SHIFTR_Register is record
-- Write-only. Subtract a fraction of a second
SUBFS : SHIFTR_SUBFS_Field := 16#0#;
-- unspecified
Reserved_15_30 : HAL.UInt16 := 16#0#;
-- Write-only. Add one second
ADD1S : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SHIFTR_Register use record
SUBFS at 0 range 0 .. 14;
Reserved_15_30 at 0 range 15 .. 30;
ADD1S at 0 range 31 .. 31;
end record;
subtype TSTR_SU_Field is HAL.UInt4;
subtype TSTR_ST_Field is HAL.UInt3;
subtype TSTR_MNU_Field is HAL.UInt4;
subtype TSTR_MNT_Field is HAL.UInt3;
subtype TSTR_HU_Field is HAL.UInt4;
subtype TSTR_HT_Field is HAL.UInt2;
-- time stamp time register
type TSTR_Register is record
-- Read-only. Second units in BCD format
SU : TSTR_SU_Field;
-- Read-only. Second tens in BCD format
ST : TSTR_ST_Field;
-- unspecified
Reserved_7_7 : HAL.Bit;
-- Read-only. Minute units in BCD format
MNU : TSTR_MNU_Field;
-- Read-only. Minute tens in BCD format
MNT : TSTR_MNT_Field;
-- unspecified
Reserved_15_15 : HAL.Bit;
-- Read-only. Hour units in BCD format
HU : TSTR_HU_Field;
-- Read-only. Hour tens in BCD format
HT : TSTR_HT_Field;
-- Read-only. AM/PM notation
PM : Boolean;
-- unspecified
Reserved_23_31 : HAL.UInt9;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TSTR_Register use record
SU at 0 range 0 .. 3;
ST at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
MNU at 0 range 8 .. 11;
MNT at 0 range 12 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
HU at 0 range 16 .. 19;
HT at 0 range 20 .. 21;
PM at 0 range 22 .. 22;
Reserved_23_31 at 0 range 23 .. 31;
end record;
subtype TSDR_DU_Field is HAL.UInt4;
subtype TSDR_DT_Field is HAL.UInt2;
subtype TSDR_MU_Field is HAL.UInt4;
subtype TSDR_WDU_Field is HAL.UInt3;
-- time stamp date register
type TSDR_Register is record
-- Read-only. Date units in BCD format
DU : TSDR_DU_Field;
-- Read-only. Date tens in BCD format
DT : TSDR_DT_Field;
-- unspecified
Reserved_6_7 : HAL.UInt2;
-- Read-only. Month units in BCD format
MU : TSDR_MU_Field;
-- Read-only. Month tens in BCD format
MT : Boolean;
-- Read-only. Week day units
WDU : TSDR_WDU_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TSDR_Register use record
DU at 0 range 0 .. 3;
DT at 0 range 4 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
MU at 0 range 8 .. 11;
MT at 0 range 12 .. 12;
WDU at 0 range 13 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype TSSSR_SS_Field is HAL.UInt16;
-- timestamp sub second register
type TSSSR_Register is record
-- Read-only. Sub second value
SS : TSSSR_SS_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TSSSR_Register use record
SS at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CALR_CALM_Field is HAL.UInt9;
-- calibration register
type CALR_Register is record
-- Calibration minus
CALM : CALR_CALM_Field := 16#0#;
-- unspecified
Reserved_9_12 : HAL.UInt4 := 16#0#;
-- Use a 16-second calibration cycle period
CALW16 : Boolean := False;
-- Use an 8-second calibration cycle period
CALW8 : Boolean := False;
-- Increase frequency of RTC by 488.5 ppm
CALP : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CALR_Register use record
CALM at 0 range 0 .. 8;
Reserved_9_12 at 0 range 9 .. 12;
CALW16 at 0 range 13 .. 13;
CALW8 at 0 range 14 .. 14;
CALP at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype TAMPCR_TAMPFREQ_Field is HAL.UInt3;
subtype TAMPCR_TAMPFLT_Field is HAL.UInt2;
subtype TAMPCR_TAMPPRCH_Field is HAL.UInt2;
-- tamper configuration register
type TAMPCR_Register is record
-- Tamper 1 detection enable
TAMP1E : Boolean := False;
-- Active level for tamper 1
TAMP1TRG : Boolean := False;
-- Tamper interrupt enable
TAMPIE : Boolean := False;
-- Tamper 2 detection enable
TAMP2E : Boolean := False;
-- Active level for tamper 2
TAMP2TRG : Boolean := False;
-- Tamper 3 detection enable
TAMP3E : Boolean := False;
-- Active level for tamper 3
TAMP3TRG : Boolean := False;
-- Activate timestamp on tamper detection event
TAMPTS : Boolean := False;
-- Tamper sampling frequency
TAMPFREQ : TAMPCR_TAMPFREQ_Field := 16#0#;
-- Tamper filter count
TAMPFLT : TAMPCR_TAMPFLT_Field := 16#0#;
-- Tamper precharge duration
TAMPPRCH : TAMPCR_TAMPPRCH_Field := 16#0#;
-- TAMPER pull-up disable
TAMPPUDIS : Boolean := False;
-- Tamper 1 interrupt enable
TAMP1IE : Boolean := False;
-- Tamper 1 no erase
TAMP1NOERASE : Boolean := False;
-- Tamper 1 mask flag
TAMP1MF : Boolean := False;
-- Tamper 2 interrupt enable
TAMP2IE : Boolean := False;
-- Tamper 2 no erase
TAMP2NOERASE : Boolean := False;
-- Tamper 2 mask flag
TAMP2MF : Boolean := False;
-- Tamper 3 interrupt enable
TAMP3IE : Boolean := False;
-- Tamper 3 no erase
TAMP3NOERASE : Boolean := False;
-- Tamper 3 mask flag
TAMP3MF : Boolean := False;
-- unspecified
Reserved_25_31 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TAMPCR_Register use record
TAMP1E at 0 range 0 .. 0;
TAMP1TRG at 0 range 1 .. 1;
TAMPIE at 0 range 2 .. 2;
TAMP2E at 0 range 3 .. 3;
TAMP2TRG at 0 range 4 .. 4;
TAMP3E at 0 range 5 .. 5;
TAMP3TRG at 0 range 6 .. 6;
TAMPTS at 0 range 7 .. 7;
TAMPFREQ at 0 range 8 .. 10;
TAMPFLT at 0 range 11 .. 12;
TAMPPRCH at 0 range 13 .. 14;
TAMPPUDIS at 0 range 15 .. 15;
TAMP1IE at 0 range 16 .. 16;
TAMP1NOERASE at 0 range 17 .. 17;
TAMP1MF at 0 range 18 .. 18;
TAMP2IE at 0 range 19 .. 19;
TAMP2NOERASE at 0 range 20 .. 20;
TAMP2MF at 0 range 21 .. 21;
TAMP3IE at 0 range 22 .. 22;
TAMP3NOERASE at 0 range 23 .. 23;
TAMP3MF at 0 range 24 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
subtype ALRMASSR_SS_Field is HAL.UInt15;
subtype ALRMASSR_MASKSS_Field is HAL.UInt4;
-- alarm A sub second register
type ALRMASSR_Register is record
-- Sub seconds value
SS : ALRMASSR_SS_Field := 16#0#;
-- unspecified
Reserved_15_23 : HAL.UInt9 := 16#0#;
-- Mask the most-significant bits starting at this bit
MASKSS : ALRMASSR_MASKSS_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ALRMASSR_Register use record
SS at 0 range 0 .. 14;
Reserved_15_23 at 0 range 15 .. 23;
MASKSS at 0 range 24 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
subtype ALRMBSSR_SS_Field is HAL.UInt15;
subtype ALRMBSSR_MASKSS_Field is HAL.UInt4;
-- alarm B sub second register
type ALRMBSSR_Register is record
-- Sub seconds value
SS : ALRMBSSR_SS_Field := 16#0#;
-- unspecified
Reserved_15_23 : HAL.UInt9 := 16#0#;
-- Mask the most-significant bits starting at this bit
MASKSS : ALRMBSSR_MASKSS_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ALRMBSSR_Register use record
SS at 0 range 0 .. 14;
Reserved_15_23 at 0 range 15 .. 23;
MASKSS at 0 range 24 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-- option register
type OR_Register is record
-- RTC_ALARM on PC13 output type
RTC_ALARM_TYPE : Boolean := False;
-- RTC_OUT remap
RTC_OUT_RMP : Boolean := False;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for OR_Register use record
RTC_ALARM_TYPE at 0 range 0 .. 0;
RTC_OUT_RMP at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Real-time clock
type RTC_Peripheral is record
-- time register
TR : aliased TR_Register;
-- date register
DR : aliased DR_Register;
-- control register
CR : aliased CR_Register;
-- initialization and status register
ISR : aliased ISR_Register;
-- prescaler register
PRER : aliased PRER_Register;
-- wakeup timer register
WUTR : aliased WUTR_Register;
-- alarm A register
ALRMAR : aliased ALRMAR_Register;
-- alarm B register
ALRMBR : aliased ALRMBR_Register;
-- write protection register
WPR : aliased WPR_Register;
-- sub second register
SSR : aliased SSR_Register;
-- shift control register
SHIFTR : aliased SHIFTR_Register;
-- time stamp time register
TSTR : aliased TSTR_Register;
-- time stamp date register
TSDR : aliased TSDR_Register;
-- timestamp sub second register
TSSSR : aliased TSSSR_Register;
-- calibration register
CALR : aliased CALR_Register;
-- tamper configuration register
TAMPCR : aliased TAMPCR_Register;
-- alarm A sub second register
ALRMASSR : aliased ALRMASSR_Register;
-- alarm B sub second register
ALRMBSSR : aliased ALRMBSSR_Register;
-- option register
OR_k : aliased OR_Register;
-- backup register
BKP0R : aliased HAL.UInt32;
-- backup register
BKP1R : aliased HAL.UInt32;
-- backup register
BKP2R : aliased HAL.UInt32;
-- backup register
BKP3R : aliased HAL.UInt32;
-- backup register
BKP4R : aliased HAL.UInt32;
-- backup register
BKP5R : aliased HAL.UInt32;
-- backup register
BKP6R : aliased HAL.UInt32;
-- backup register
BKP7R : aliased HAL.UInt32;
-- backup register
BKP8R : aliased HAL.UInt32;
-- backup register
BKP9R : aliased HAL.UInt32;
-- backup register
BKP10R : aliased HAL.UInt32;
-- backup register
BKP11R : aliased HAL.UInt32;
-- backup register
BKP12R : aliased HAL.UInt32;
-- backup register
BKP13R : aliased HAL.UInt32;
-- backup register
BKP14R : aliased HAL.UInt32;
-- backup register
BKP15R : aliased HAL.UInt32;
-- backup register
BKP16R : aliased HAL.UInt32;
-- backup register
BKP17R : aliased HAL.UInt32;
-- backup register
BKP18R : aliased HAL.UInt32;
-- backup register
BKP19R : aliased HAL.UInt32;
-- backup register
BKP20R : aliased HAL.UInt32;
-- backup register
BKP21R : aliased HAL.UInt32;
-- backup register
BKP22R : aliased HAL.UInt32;
-- backup register
BKP23R : aliased HAL.UInt32;
-- backup register
BKP24R : aliased HAL.UInt32;
-- backup register
BKP25R : aliased HAL.UInt32;
-- backup register
BKP26R : aliased HAL.UInt32;
-- backup register
BKP27R : aliased HAL.UInt32;
-- backup register
BKP28R : aliased HAL.UInt32;
-- backup register
BKP29R : aliased HAL.UInt32;
-- backup register
BKP30R : aliased HAL.UInt32;
-- backup register
BKP31R : aliased HAL.UInt32;
end record
with Volatile;
for RTC_Peripheral use record
TR at 16#0# range 0 .. 31;
DR at 16#4# range 0 .. 31;
CR at 16#8# range 0 .. 31;
ISR at 16#C# range 0 .. 31;
PRER at 16#10# range 0 .. 31;
WUTR at 16#14# range 0 .. 31;
ALRMAR at 16#1C# range 0 .. 31;
ALRMBR at 16#20# range 0 .. 31;
WPR at 16#24# range 0 .. 31;
SSR at 16#28# range 0 .. 31;
SHIFTR at 16#2C# range 0 .. 31;
TSTR at 16#30# range 0 .. 31;
TSDR at 16#34# range 0 .. 31;
TSSSR at 16#38# range 0 .. 31;
CALR at 16#3C# range 0 .. 31;
TAMPCR at 16#40# range 0 .. 31;
ALRMASSR at 16#44# range 0 .. 31;
ALRMBSSR at 16#48# range 0 .. 31;
OR_k at 16#4C# range 0 .. 31;
BKP0R at 16#50# range 0 .. 31;
BKP1R at 16#54# range 0 .. 31;
BKP2R at 16#58# range 0 .. 31;
BKP3R at 16#5C# range 0 .. 31;
BKP4R at 16#60# range 0 .. 31;
BKP5R at 16#64# range 0 .. 31;
BKP6R at 16#68# range 0 .. 31;
BKP7R at 16#6C# range 0 .. 31;
BKP8R at 16#70# range 0 .. 31;
BKP9R at 16#74# range 0 .. 31;
BKP10R at 16#78# range 0 .. 31;
BKP11R at 16#7C# range 0 .. 31;
BKP12R at 16#80# range 0 .. 31;
BKP13R at 16#84# range 0 .. 31;
BKP14R at 16#88# range 0 .. 31;
BKP15R at 16#8C# range 0 .. 31;
BKP16R at 16#90# range 0 .. 31;
BKP17R at 16#94# range 0 .. 31;
BKP18R at 16#98# range 0 .. 31;
BKP19R at 16#9C# range 0 .. 31;
BKP20R at 16#A0# range 0 .. 31;
BKP21R at 16#A4# range 0 .. 31;
BKP22R at 16#A8# range 0 .. 31;
BKP23R at 16#AC# range 0 .. 31;
BKP24R at 16#B0# range 0 .. 31;
BKP25R at 16#B4# range 0 .. 31;
BKP26R at 16#B8# range 0 .. 31;
BKP27R at 16#BC# range 0 .. 31;
BKP28R at 16#C0# range 0 .. 31;
BKP29R at 16#C4# range 0 .. 31;
BKP30R at 16#C8# range 0 .. 31;
BKP31R at 16#CC# range 0 .. 31;
end record;
-- Real-time clock
RTC_Periph : aliased RTC_Peripheral
with Import, Address => RTC_Base;
end STM32_SVD.RTC;
| 33.90849 | 65 | 0.551975 |
102ae6811e1364bf920c544173a8978412c25213 | 76,484 | adb | Ada | awa/plugins/awa-workspaces/src/model/awa-workspaces-models.adb | My-Colaborations/ada-awa | cc2dee291a14e4df0dbc9c10285bf284a7f1caa8 | [
"Apache-2.0"
] | 81 | 2015-01-18T23:02:30.000Z | 2022-03-19T17:34:57.000Z | awa/plugins/awa-workspaces/src/model/awa-workspaces-models.adb | My-Colaborations/ada-awa | cc2dee291a14e4df0dbc9c10285bf284a7f1caa8 | [
"Apache-2.0"
] | 20 | 2015-12-09T19:26:19.000Z | 2022-03-23T14:32:43.000Z | awa/plugins/awa-workspaces/src/model/awa-workspaces-models.adb | My-Colaborations/ada-awa | cc2dee291a14e4df0dbc9c10285bf284a7f1caa8 | [
"Apache-2.0"
] | 16 | 2015-06-29T02:44:06.000Z | 2021-09-23T18:47:50.000Z | -----------------------------------------------------------------------
-- AWA.Workspaces.Models -- AWA.Workspaces.Models
-----------------------------------------------------------------------
-- File generated by ada-gen DO NOT MODIFY
-- Template used: templates/model/package-body.xhtml
-- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095
-----------------------------------------------------------------------
-- Copyright (C) 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
with Util.Beans.Objects.Time;
with ASF.Events.Faces.Actions;
package body AWA.Workspaces.Models is
use type ADO.Objects.Object_Record_Access;
use type ADO.Objects.Object_Ref;
pragma Warnings (Off, "formal parameter * is not referenced");
function Workspace_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Key;
function Workspace_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Key;
function "=" (Left, Right : Workspace_Ref'Class) return Boolean is
begin
return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right);
end "=";
procedure Set_Field (Object : in out Workspace_Ref'Class;
Impl : out Workspace_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Workspace_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
procedure Allocate (Object : in out Workspace_Ref) is
Impl : Workspace_Access;
begin
Impl := new Workspace_Impl;
Impl.Version := 0;
Impl.Create_Date := ADO.DEFAULT_TIME;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Workspace
-- ----------------------------------------
procedure Set_Id (Object : in out Workspace_Ref;
Value : in ADO.Identifier) is
Impl : Workspace_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value);
end Set_Id;
function Get_Id (Object : in Workspace_Ref)
return ADO.Identifier is
Impl : constant Workspace_Access
:= Workspace_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
function Get_Version (Object : in Workspace_Ref)
return Integer is
Impl : constant Workspace_Access
:= Workspace_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Version;
end Get_Version;
procedure Set_Create_Date (Object : in out Workspace_Ref;
Value : in Ada.Calendar.Time) is
Impl : Workspace_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 3, Impl.Create_Date, Value);
end Set_Create_Date;
function Get_Create_Date (Object : in Workspace_Ref)
return Ada.Calendar.Time is
Impl : constant Workspace_Access
:= Workspace_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Create_Date;
end Get_Create_Date;
procedure Set_Owner (Object : in out Workspace_Ref;
Value : in AWA.Users.Models.User_Ref'Class) is
Impl : Workspace_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 4, Impl.Owner, Value);
end Set_Owner;
function Get_Owner (Object : in Workspace_Ref)
return AWA.Users.Models.User_Ref'Class is
Impl : constant Workspace_Access
:= Workspace_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Owner;
end Get_Owner;
-- Copy of the object.
procedure Copy (Object : in Workspace_Ref;
Into : in out Workspace_Ref) is
Result : Workspace_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Workspace_Access
:= Workspace_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Workspace_Access
:= new Workspace_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Version := Impl.Version;
Copy.Create_Date := Impl.Create_Date;
Copy.Owner := Impl.Owner;
end;
end if;
Into := Result;
end Copy;
procedure Find (Object : in out Workspace_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Workspace_Access := new Workspace_Impl;
begin
Impl.Find (Session, Query, Found);
if Found then
ADO.Objects.Set_Object (Object, Impl.all'Access);
else
ADO.Objects.Set_Object (Object, null);
Destroy (Impl);
end if;
end Find;
procedure Load (Object : in out Workspace_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Workspace_Access := new Workspace_Impl;
Found : Boolean;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
raise ADO.Objects.NOT_FOUND;
end if;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Load;
procedure Load (Object : in out Workspace_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Workspace_Access := new Workspace_Impl;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
else
ADO.Objects.Set_Object (Object, Impl.all'Access);
end if;
end Load;
procedure Save (Object : in out Workspace_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl = null then
Impl := new Workspace_Impl;
ADO.Objects.Set_Object (Object, Impl);
end if;
if not ADO.Objects.Is_Created (Impl.all) then
Impl.Create (Session);
else
Impl.Save (Session);
end if;
end Save;
procedure Delete (Object : in out Workspace_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl /= null then
Impl.Delete (Session);
end if;
end Delete;
-- --------------------
-- Free the object
-- --------------------
procedure Destroy (Object : access Workspace_Impl) is
type Workspace_Impl_Ptr is access all Workspace_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Workspace_Impl, Workspace_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Workspace_Impl_Ptr := Workspace_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
procedure Find (Object : in out Workspace_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, WORKSPACE_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Object.Load (Stmt, Session);
Stmt.Next;
Found := not Stmt.Has_Elements;
else
Found := False;
end if;
end Find;
overriding
procedure Load (Object : in out Workspace_Impl;
Session : in out ADO.Sessions.Session'Class) is
Found : Boolean;
Query : ADO.SQL.Query;
Id : constant ADO.Identifier := Object.Get_Key_Value;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Object.Find (Session, Query, Found);
if not Found then
raise ADO.Objects.NOT_FOUND;
end if;
end Load;
procedure Save (Object : in out Workspace_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (WORKSPACE_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_1_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_1_NAME, -- create_date
Value => Object.Create_Date);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (4) then
Stmt.Save_Field (Name => COL_3_1_NAME, -- owner_id
Value => Object.Owner);
Object.Clear_Modified (4);
end if;
if Stmt.Has_Save_Fields then
Object.Version := Object.Version + 1;
Stmt.Save_Field (Name => "version",
Value => Object.Version);
Stmt.Set_Filter (Filter => "id = ? and version = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Version - 1);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
else
raise ADO.Objects.LAZY_LOCK;
end if;
end if;
end;
end if;
end Save;
procedure Create (Object : in out Workspace_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (WORKSPACE_DEF'Access);
Result : Integer;
begin
Object.Version := 1;
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_0_1_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_1_1_NAME, -- version
Value => Object.Version);
Query.Save_Field (Name => COL_2_1_NAME, -- create_date
Value => Object.Create_Date);
Query.Save_Field (Name => COL_3_1_NAME, -- owner_id
Value => Object.Owner);
Query.Execute (Result);
if Result /= 1 then
raise ADO.Objects.INSERT_ERROR;
end if;
ADO.Objects.Set_Created (Object);
end Create;
procedure Delete (Object : in out Workspace_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (WORKSPACE_DEF'Access);
begin
Stmt.Set_Filter (Filter => "id = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Execute;
end Delete;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Workspace_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Workspace_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Workspace_Impl (Obj.all)'Access;
if Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "create_date" then
return Util.Beans.Objects.Time.To_Object (Impl.Create_Date);
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out Workspace_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Set_Key_Value (Stmt.Get_Identifier (0));
Object.Create_Date := Stmt.Get_Time (2);
if not Stmt.Is_Null (3) then
Object.Owner.Set_Key_Value (Stmt.Get_Identifier (3), Session);
end if;
Object.Version := Stmt.Get_Integer (1);
ADO.Objects.Set_Created (Object);
end Load;
function Workspace_Member_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_MEMBER_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Member_Key;
function Workspace_Member_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_MEMBER_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Member_Key;
function "=" (Left, Right : Workspace_Member_Ref'Class) return Boolean is
begin
return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right);
end "=";
procedure Set_Field (Object : in out Workspace_Member_Ref'Class;
Impl : out Workspace_Member_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Workspace_Member_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
procedure Allocate (Object : in out Workspace_Member_Ref) is
Impl : Workspace_Member_Access;
begin
Impl := new Workspace_Member_Impl;
Impl.Join_Date.Is_Null := True;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Workspace_Member
-- ----------------------------------------
procedure Set_Id (Object : in out Workspace_Member_Ref;
Value : in ADO.Identifier) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value);
end Set_Id;
function Get_Id (Object : in Workspace_Member_Ref)
return ADO.Identifier is
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
procedure Set_Join_Date (Object : in out Workspace_Member_Ref;
Value : in ADO.Nullable_Time) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 2, Impl.Join_Date, Value);
end Set_Join_Date;
function Get_Join_Date (Object : in Workspace_Member_Ref)
return ADO.Nullable_Time is
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Join_Date;
end Get_Join_Date;
procedure Set_Role (Object : in out Workspace_Member_Ref;
Value : in String) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 3, Impl.Role, Value);
end Set_Role;
procedure Set_Role (Object : in out Workspace_Member_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 3, Impl.Role, Value);
end Set_Role;
function Get_Role (Object : in Workspace_Member_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Role);
end Get_Role;
function Get_Role (Object : in Workspace_Member_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Role;
end Get_Role;
procedure Set_Member (Object : in out Workspace_Member_Ref;
Value : in AWA.Users.Models.User_Ref'Class) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 4, Impl.Member, Value);
end Set_Member;
function Get_Member (Object : in Workspace_Member_Ref)
return AWA.Users.Models.User_Ref'Class is
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Member;
end Get_Member;
procedure Set_Workspace (Object : in out Workspace_Member_Ref;
Value : in AWA.Workspaces.Models.Workspace_Ref'Class) is
Impl : Workspace_Member_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 5, Impl.Workspace, Value);
end Set_Workspace;
function Get_Workspace (Object : in Workspace_Member_Ref)
return AWA.Workspaces.Models.Workspace_Ref'Class is
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Workspace;
end Get_Workspace;
-- Copy of the object.
procedure Copy (Object : in Workspace_Member_Ref;
Into : in out Workspace_Member_Ref) is
Result : Workspace_Member_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Workspace_Member_Access
:= Workspace_Member_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Workspace_Member_Access
:= new Workspace_Member_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Join_Date := Impl.Join_Date;
Copy.Role := Impl.Role;
Copy.Member := Impl.Member;
Copy.Workspace := Impl.Workspace;
end;
end if;
Into := Result;
end Copy;
procedure Find (Object : in out Workspace_Member_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Workspace_Member_Access := new Workspace_Member_Impl;
begin
Impl.Find (Session, Query, Found);
if Found then
ADO.Objects.Set_Object (Object, Impl.all'Access);
else
ADO.Objects.Set_Object (Object, null);
Destroy (Impl);
end if;
end Find;
procedure Load (Object : in out Workspace_Member_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Workspace_Member_Access := new Workspace_Member_Impl;
Found : Boolean;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
raise ADO.Objects.NOT_FOUND;
end if;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Load;
procedure Load (Object : in out Workspace_Member_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Workspace_Member_Access := new Workspace_Member_Impl;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
else
ADO.Objects.Set_Object (Object, Impl.all'Access);
end if;
end Load;
procedure Save (Object : in out Workspace_Member_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl = null then
Impl := new Workspace_Member_Impl;
ADO.Objects.Set_Object (Object, Impl);
end if;
if not ADO.Objects.Is_Created (Impl.all) then
Impl.Create (Session);
else
Impl.Save (Session);
end if;
end Save;
procedure Delete (Object : in out Workspace_Member_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl /= null then
Impl.Delete (Session);
end if;
end Delete;
-- --------------------
-- Free the object
-- --------------------
procedure Destroy (Object : access Workspace_Member_Impl) is
type Workspace_Member_Impl_Ptr is access all Workspace_Member_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Workspace_Member_Impl, Workspace_Member_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Workspace_Member_Impl_Ptr := Workspace_Member_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
procedure Find (Object : in out Workspace_Member_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, WORKSPACE_MEMBER_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Object.Load (Stmt, Session);
Stmt.Next;
Found := not Stmt.Has_Elements;
else
Found := False;
end if;
end Find;
overriding
procedure Load (Object : in out Workspace_Member_Impl;
Session : in out ADO.Sessions.Session'Class) is
Found : Boolean;
Query : ADO.SQL.Query;
Id : constant ADO.Identifier := Object.Get_Key_Value;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Object.Find (Session, Query, Found);
if not Found then
raise ADO.Objects.NOT_FOUND;
end if;
end Load;
procedure Save (Object : in out Workspace_Member_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (WORKSPACE_MEMBER_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_2_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (2) then
Stmt.Save_Field (Name => COL_1_2_NAME, -- join_date
Value => Object.Join_Date);
Object.Clear_Modified (2);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_2_NAME, -- role
Value => Object.Role);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (4) then
Stmt.Save_Field (Name => COL_3_2_NAME, -- member_id
Value => Object.Member);
Object.Clear_Modified (4);
end if;
if Object.Is_Modified (5) then
Stmt.Save_Field (Name => COL_4_2_NAME, -- workspace_id
Value => Object.Workspace);
Object.Clear_Modified (5);
end if;
if Stmt.Has_Save_Fields then
Stmt.Set_Filter (Filter => "id = ?");
Stmt.Add_Param (Value => Object.Get_Key);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
end if;
end if;
end;
end if;
end Save;
procedure Create (Object : in out Workspace_Member_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (WORKSPACE_MEMBER_DEF'Access);
Result : Integer;
begin
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_0_2_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_1_2_NAME, -- join_date
Value => Object.Join_Date);
Query.Save_Field (Name => COL_2_2_NAME, -- role
Value => Object.Role);
Query.Save_Field (Name => COL_3_2_NAME, -- member_id
Value => Object.Member);
Query.Save_Field (Name => COL_4_2_NAME, -- workspace_id
Value => Object.Workspace);
Query.Execute (Result);
if Result /= 1 then
raise ADO.Objects.INSERT_ERROR;
end if;
ADO.Objects.Set_Created (Object);
end Create;
procedure Delete (Object : in out Workspace_Member_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (WORKSPACE_MEMBER_DEF'Access);
begin
Stmt.Set_Filter (Filter => "id = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Execute;
end Delete;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Workspace_Member_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Workspace_Member_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Workspace_Member_Impl (Obj.all)'Access;
if Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "join_date" then
if Impl.Join_Date.Is_Null then
return Util.Beans.Objects.Null_Object;
else
return Util.Beans.Objects.Time.To_Object (Impl.Join_Date.Value);
end if;
elsif Name = "role" then
return Util.Beans.Objects.To_Object (Impl.Role);
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out Workspace_Member_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Set_Key_Value (Stmt.Get_Identifier (0));
Object.Join_Date := Stmt.Get_Nullable_Time (1);
Object.Role := Stmt.Get_Unbounded_String (2);
if not Stmt.Is_Null (3) then
Object.Member.Set_Key_Value (Stmt.Get_Identifier (3), Session);
end if;
if not Stmt.Is_Null (4) then
Object.Workspace.Set_Key_Value (Stmt.Get_Identifier (4), Session);
end if;
ADO.Objects.Set_Created (Object);
end Load;
function Invitation_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => INVITATION_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Invitation_Key;
function Invitation_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => INVITATION_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Invitation_Key;
function "=" (Left, Right : Invitation_Ref'Class) return Boolean is
begin
return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right);
end "=";
procedure Set_Field (Object : in out Invitation_Ref'Class;
Impl : out Invitation_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Invitation_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
procedure Allocate (Object : in out Invitation_Ref) is
Impl : Invitation_Access;
begin
Impl := new Invitation_Impl;
Impl.Version := 0;
Impl.Create_Date := ADO.DEFAULT_TIME;
Impl.Acceptance_Date.Is_Null := True;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Invitation
-- ----------------------------------------
procedure Set_Id (Object : in out Invitation_Ref;
Value : in ADO.Identifier) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value);
end Set_Id;
function Get_Id (Object : in Invitation_Ref)
return ADO.Identifier is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
function Get_Version (Object : in Invitation_Ref)
return Integer is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Version;
end Get_Version;
procedure Set_Create_Date (Object : in out Invitation_Ref;
Value : in Ada.Calendar.Time) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 3, Impl.Create_Date, Value);
end Set_Create_Date;
function Get_Create_Date (Object : in Invitation_Ref)
return Ada.Calendar.Time is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Create_Date;
end Get_Create_Date;
procedure Set_Email (Object : in out Invitation_Ref;
Value : in String) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 4, Impl.Email, Value);
end Set_Email;
procedure Set_Email (Object : in out Invitation_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 4, Impl.Email, Value);
end Set_Email;
function Get_Email (Object : in Invitation_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Email);
end Get_Email;
function Get_Email (Object : in Invitation_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Email;
end Get_Email;
procedure Set_Message (Object : in out Invitation_Ref;
Value : in String) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 5, Impl.Message, Value);
end Set_Message;
procedure Set_Message (Object : in out Invitation_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 5, Impl.Message, Value);
end Set_Message;
function Get_Message (Object : in Invitation_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Message);
end Get_Message;
function Get_Message (Object : in Invitation_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Message;
end Get_Message;
procedure Set_Acceptance_Date (Object : in out Invitation_Ref;
Value : in ADO.Nullable_Time) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 6, Impl.Acceptance_Date, Value);
end Set_Acceptance_Date;
function Get_Acceptance_Date (Object : in Invitation_Ref)
return ADO.Nullable_Time is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Acceptance_Date;
end Get_Acceptance_Date;
procedure Set_Workspace (Object : in out Invitation_Ref;
Value : in AWA.Workspaces.Models.Workspace_Ref'Class) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 7, Impl.Workspace, Value);
end Set_Workspace;
function Get_Workspace (Object : in Invitation_Ref)
return AWA.Workspaces.Models.Workspace_Ref'Class is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Workspace;
end Get_Workspace;
procedure Set_Access_Key (Object : in out Invitation_Ref;
Value : in AWA.Users.Models.Access_Key_Ref'Class) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 8, Impl.Access_Key, Value);
end Set_Access_Key;
function Get_Access_Key (Object : in Invitation_Ref)
return AWA.Users.Models.Access_Key_Ref'Class is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Access_Key;
end Get_Access_Key;
procedure Set_Invitee (Object : in out Invitation_Ref;
Value : in AWA.Users.Models.User_Ref'Class) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 9, Impl.Invitee, Value);
end Set_Invitee;
function Get_Invitee (Object : in Invitation_Ref)
return AWA.Users.Models.User_Ref'Class is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Invitee;
end Get_Invitee;
procedure Set_Inviter (Object : in out Invitation_Ref;
Value : in AWA.Users.Models.User_Ref'Class) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 10, Impl.Inviter, Value);
end Set_Inviter;
function Get_Inviter (Object : in Invitation_Ref)
return AWA.Users.Models.User_Ref'Class is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Inviter;
end Get_Inviter;
procedure Set_Member (Object : in out Invitation_Ref;
Value : in AWA.Workspaces.Models.Workspace_Member_Ref'Class) is
Impl : Invitation_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 11, Impl.Member, Value);
end Set_Member;
function Get_Member (Object : in Invitation_Ref)
return AWA.Workspaces.Models.Workspace_Member_Ref'Class is
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Member;
end Get_Member;
-- Copy of the object.
procedure Copy (Object : in Invitation_Ref;
Into : in out Invitation_Ref) is
Result : Invitation_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Invitation_Access
:= Invitation_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Invitation_Access
:= new Invitation_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Version := Impl.Version;
Copy.Create_Date := Impl.Create_Date;
Copy.Email := Impl.Email;
Copy.Message := Impl.Message;
Copy.Acceptance_Date := Impl.Acceptance_Date;
Copy.Workspace := Impl.Workspace;
Copy.Access_Key := Impl.Access_Key;
Copy.Invitee := Impl.Invitee;
Copy.Inviter := Impl.Inviter;
Copy.Member := Impl.Member;
end;
end if;
Into := Result;
end Copy;
procedure Find (Object : in out Invitation_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Invitation_Access := new Invitation_Impl;
begin
Impl.Find (Session, Query, Found);
if Found then
ADO.Objects.Set_Object (Object, Impl.all'Access);
else
ADO.Objects.Set_Object (Object, null);
Destroy (Impl);
end if;
end Find;
procedure Load (Object : in out Invitation_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Invitation_Access := new Invitation_Impl;
Found : Boolean;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
raise ADO.Objects.NOT_FOUND;
end if;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Load;
procedure Load (Object : in out Invitation_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Invitation_Access := new Invitation_Impl;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
else
ADO.Objects.Set_Object (Object, Impl.all'Access);
end if;
end Load;
procedure Save (Object : in out Invitation_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl = null then
Impl := new Invitation_Impl;
ADO.Objects.Set_Object (Object, Impl);
end if;
if not ADO.Objects.Is_Created (Impl.all) then
Impl.Create (Session);
else
Impl.Save (Session);
end if;
end Save;
procedure Delete (Object : in out Invitation_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl /= null then
Impl.Delete (Session);
end if;
end Delete;
-- --------------------
-- Free the object
-- --------------------
procedure Destroy (Object : access Invitation_Impl) is
type Invitation_Impl_Ptr is access all Invitation_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Invitation_Impl, Invitation_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Invitation_Impl_Ptr := Invitation_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
procedure Find (Object : in out Invitation_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, INVITATION_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Object.Load (Stmt, Session);
Stmt.Next;
Found := not Stmt.Has_Elements;
else
Found := False;
end if;
end Find;
overriding
procedure Load (Object : in out Invitation_Impl;
Session : in out ADO.Sessions.Session'Class) is
Found : Boolean;
Query : ADO.SQL.Query;
Id : constant ADO.Identifier := Object.Get_Key_Value;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Object.Find (Session, Query, Found);
if not Found then
raise ADO.Objects.NOT_FOUND;
end if;
end Load;
procedure Save (Object : in out Invitation_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (INVITATION_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_3_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_3_NAME, -- create_date
Value => Object.Create_Date);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (4) then
Stmt.Save_Field (Name => COL_3_3_NAME, -- email
Value => Object.Email);
Object.Clear_Modified (4);
end if;
if Object.Is_Modified (5) then
Stmt.Save_Field (Name => COL_4_3_NAME, -- message
Value => Object.Message);
Object.Clear_Modified (5);
end if;
if Object.Is_Modified (6) then
Stmt.Save_Field (Name => COL_5_3_NAME, -- acceptance_date
Value => Object.Acceptance_Date);
Object.Clear_Modified (6);
end if;
if Object.Is_Modified (7) then
Stmt.Save_Field (Name => COL_6_3_NAME, -- workspace_id
Value => Object.Workspace);
Object.Clear_Modified (7);
end if;
if Object.Is_Modified (8) then
Stmt.Save_Field (Name => COL_7_3_NAME, -- access_key_id
Value => Object.Access_Key);
Object.Clear_Modified (8);
end if;
if Object.Is_Modified (9) then
Stmt.Save_Field (Name => COL_8_3_NAME, -- invitee_id
Value => Object.Invitee);
Object.Clear_Modified (9);
end if;
if Object.Is_Modified (10) then
Stmt.Save_Field (Name => COL_9_3_NAME, -- inviter_id
Value => Object.Inviter);
Object.Clear_Modified (10);
end if;
if Object.Is_Modified (11) then
Stmt.Save_Field (Name => COL_10_3_NAME, -- member_id
Value => Object.Member);
Object.Clear_Modified (11);
end if;
if Stmt.Has_Save_Fields then
Object.Version := Object.Version + 1;
Stmt.Save_Field (Name => "version",
Value => Object.Version);
Stmt.Set_Filter (Filter => "id = ? and version = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Version - 1);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
else
raise ADO.Objects.LAZY_LOCK;
end if;
end if;
end;
end if;
end Save;
procedure Create (Object : in out Invitation_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (INVITATION_DEF'Access);
Result : Integer;
begin
Object.Version := 1;
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_0_3_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_1_3_NAME, -- version
Value => Object.Version);
Query.Save_Field (Name => COL_2_3_NAME, -- create_date
Value => Object.Create_Date);
Query.Save_Field (Name => COL_3_3_NAME, -- email
Value => Object.Email);
Query.Save_Field (Name => COL_4_3_NAME, -- message
Value => Object.Message);
Query.Save_Field (Name => COL_5_3_NAME, -- acceptance_date
Value => Object.Acceptance_Date);
Query.Save_Field (Name => COL_6_3_NAME, -- workspace_id
Value => Object.Workspace);
Query.Save_Field (Name => COL_7_3_NAME, -- access_key_id
Value => Object.Access_Key);
Query.Save_Field (Name => COL_8_3_NAME, -- invitee_id
Value => Object.Invitee);
Query.Save_Field (Name => COL_9_3_NAME, -- inviter_id
Value => Object.Inviter);
Query.Save_Field (Name => COL_10_3_NAME, -- member_id
Value => Object.Member);
Query.Execute (Result);
if Result /= 1 then
raise ADO.Objects.INSERT_ERROR;
end if;
ADO.Objects.Set_Created (Object);
end Create;
procedure Delete (Object : in out Invitation_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (INVITATION_DEF'Access);
begin
Stmt.Set_Filter (Filter => "id = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Execute;
end Delete;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Invitation_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Invitation_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Invitation_Impl (Obj.all)'Access;
if Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "create_date" then
return Util.Beans.Objects.Time.To_Object (Impl.Create_Date);
elsif Name = "email" then
return Util.Beans.Objects.To_Object (Impl.Email);
elsif Name = "message" then
return Util.Beans.Objects.To_Object (Impl.Message);
elsif Name = "acceptance_date" then
if Impl.Acceptance_Date.Is_Null then
return Util.Beans.Objects.Null_Object;
else
return Util.Beans.Objects.Time.To_Object (Impl.Acceptance_Date.Value);
end if;
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out Invitation_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Set_Key_Value (Stmt.Get_Identifier (0));
Object.Create_Date := Stmt.Get_Time (2);
Object.Email := Stmt.Get_Unbounded_String (3);
Object.Message := Stmt.Get_Unbounded_String (4);
Object.Acceptance_Date := Stmt.Get_Nullable_Time (5);
if not Stmt.Is_Null (6) then
Object.Workspace.Set_Key_Value (Stmt.Get_Identifier (6), Session);
end if;
if not Stmt.Is_Null (7) then
Object.Access_Key.Set_Key_Value (Stmt.Get_Identifier (7), Session);
end if;
if not Stmt.Is_Null (8) then
Object.Invitee.Set_Key_Value (Stmt.Get_Identifier (8), Session);
end if;
if not Stmt.Is_Null (9) then
Object.Inviter.Set_Key_Value (Stmt.Get_Identifier (9), Session);
end if;
if not Stmt.Is_Null (10) then
Object.Member.Set_Key_Value (Stmt.Get_Identifier (10), Session);
end if;
Object.Version := Stmt.Get_Integer (1);
ADO.Objects.Set_Created (Object);
end Load;
function Workspace_Feature_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_FEATURE_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Feature_Key;
function Workspace_Feature_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => WORKSPACE_FEATURE_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Workspace_Feature_Key;
function "=" (Left, Right : Workspace_Feature_Ref'Class) return Boolean is
begin
return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right);
end "=";
procedure Set_Field (Object : in out Workspace_Feature_Ref'Class;
Impl : out Workspace_Feature_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Workspace_Feature_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
procedure Allocate (Object : in out Workspace_Feature_Ref) is
Impl : Workspace_Feature_Access;
begin
Impl := new Workspace_Feature_Impl;
Impl.Limit := 0;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Workspace_Feature
-- ----------------------------------------
procedure Set_Id (Object : in out Workspace_Feature_Ref;
Value : in ADO.Identifier) is
Impl : Workspace_Feature_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value);
end Set_Id;
function Get_Id (Object : in Workspace_Feature_Ref)
return ADO.Identifier is
Impl : constant Workspace_Feature_Access
:= Workspace_Feature_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
procedure Set_Limit (Object : in out Workspace_Feature_Ref;
Value : in Integer) is
Impl : Workspace_Feature_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Integer (Impl.all, 2, Impl.Limit, Value);
end Set_Limit;
function Get_Limit (Object : in Workspace_Feature_Ref)
return Integer is
Impl : constant Workspace_Feature_Access
:= Workspace_Feature_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Limit;
end Get_Limit;
procedure Set_Workspace (Object : in out Workspace_Feature_Ref;
Value : in AWA.Workspaces.Models.Workspace_Ref'Class) is
Impl : Workspace_Feature_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 3, Impl.Workspace, Value);
end Set_Workspace;
function Get_Workspace (Object : in Workspace_Feature_Ref)
return AWA.Workspaces.Models.Workspace_Ref'Class is
Impl : constant Workspace_Feature_Access
:= Workspace_Feature_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Workspace;
end Get_Workspace;
-- Copy of the object.
procedure Copy (Object : in Workspace_Feature_Ref;
Into : in out Workspace_Feature_Ref) is
Result : Workspace_Feature_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Workspace_Feature_Access
:= Workspace_Feature_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Workspace_Feature_Access
:= new Workspace_Feature_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Limit := Impl.Limit;
Copy.Workspace := Impl.Workspace;
end;
end if;
Into := Result;
end Copy;
procedure Find (Object : in out Workspace_Feature_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Workspace_Feature_Access := new Workspace_Feature_Impl;
begin
Impl.Find (Session, Query, Found);
if Found then
ADO.Objects.Set_Object (Object, Impl.all'Access);
else
ADO.Objects.Set_Object (Object, null);
Destroy (Impl);
end if;
end Find;
procedure Load (Object : in out Workspace_Feature_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Workspace_Feature_Access := new Workspace_Feature_Impl;
Found : Boolean;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
raise ADO.Objects.NOT_FOUND;
end if;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Load;
procedure Load (Object : in out Workspace_Feature_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Workspace_Feature_Access := new Workspace_Feature_Impl;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
else
ADO.Objects.Set_Object (Object, Impl.all'Access);
end if;
end Load;
procedure Save (Object : in out Workspace_Feature_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl = null then
Impl := new Workspace_Feature_Impl;
ADO.Objects.Set_Object (Object, Impl);
end if;
if not ADO.Objects.Is_Created (Impl.all) then
Impl.Create (Session);
else
Impl.Save (Session);
end if;
end Save;
procedure Delete (Object : in out Workspace_Feature_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl /= null then
Impl.Delete (Session);
end if;
end Delete;
-- --------------------
-- Free the object
-- --------------------
procedure Destroy (Object : access Workspace_Feature_Impl) is
type Workspace_Feature_Impl_Ptr is access all Workspace_Feature_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Workspace_Feature_Impl, Workspace_Feature_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Workspace_Feature_Impl_Ptr := Workspace_Feature_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
procedure Find (Object : in out Workspace_Feature_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, WORKSPACE_FEATURE_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Object.Load (Stmt, Session);
Stmt.Next;
Found := not Stmt.Has_Elements;
else
Found := False;
end if;
end Find;
overriding
procedure Load (Object : in out Workspace_Feature_Impl;
Session : in out ADO.Sessions.Session'Class) is
Found : Boolean;
Query : ADO.SQL.Query;
Id : constant ADO.Identifier := Object.Get_Key_Value;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Object.Find (Session, Query, Found);
if not Found then
raise ADO.Objects.NOT_FOUND;
end if;
end Load;
procedure Save (Object : in out Workspace_Feature_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (WORKSPACE_FEATURE_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_4_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (2) then
Stmt.Save_Field (Name => COL_1_4_NAME, -- limit
Value => Object.Limit);
Object.Clear_Modified (2);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_4_NAME, -- workspace_id
Value => Object.Workspace);
Object.Clear_Modified (3);
end if;
if Stmt.Has_Save_Fields then
Stmt.Set_Filter (Filter => "id = ?");
Stmt.Add_Param (Value => Object.Get_Key);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
end if;
end if;
end;
end if;
end Save;
procedure Create (Object : in out Workspace_Feature_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (WORKSPACE_FEATURE_DEF'Access);
Result : Integer;
begin
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_0_4_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_1_4_NAME, -- limit
Value => Object.Limit);
Query.Save_Field (Name => COL_2_4_NAME, -- workspace_id
Value => Object.Workspace);
Query.Execute (Result);
if Result /= 1 then
raise ADO.Objects.INSERT_ERROR;
end if;
ADO.Objects.Set_Created (Object);
end Create;
procedure Delete (Object : in out Workspace_Feature_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (WORKSPACE_FEATURE_DEF'Access);
begin
Stmt.Set_Filter (Filter => "id = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Execute;
end Delete;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Workspace_Feature_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Workspace_Feature_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Workspace_Feature_Impl (Obj.all)'Access;
if Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "limit" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Limit));
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out Workspace_Feature_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Set_Key_Value (Stmt.Get_Identifier (0));
Object.Limit := Stmt.Get_Integer (1);
if not Stmt.Is_Null (2) then
Object.Workspace.Set_Key_Value (Stmt.Get_Identifier (2), Session);
end if;
ADO.Objects.Set_Created (Object);
end Load;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Member_Info;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Id));
elsif Name = "user_id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.User_Id));
elsif Name = "name" then
return Util.Beans.Objects.To_Object (From.Name);
elsif Name = "email" then
return Util.Beans.Objects.To_Object (From.Email);
elsif Name = "role" then
return Util.Beans.Objects.To_Object (From.Role);
elsif Name = "join_date" then
if From.Join_Date.Is_Null then
return Util.Beans.Objects.Null_Object;
else
return Util.Beans.Objects.Time.To_Object (From.Join_Date.Value);
end if;
elsif Name = "invite_date" then
if From.Invite_Date.Is_Null then
return Util.Beans.Objects.Null_Object;
else
return Util.Beans.Objects.Time.To_Object (From.Invite_Date.Value);
end if;
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Member_Info;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "id" then
Item.Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value));
elsif Name = "user_id" then
Item.User_Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value));
elsif Name = "name" then
Item.Name := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "email" then
Item.Email := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "role" then
Item.Role := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "join_date" then
Item.Join_Date.Is_Null := Util.Beans.Objects.Is_Null (Value);
if not Item.Join_Date.Is_Null then
Item.Join_Date.Value := Util.Beans.Objects.Time.To_Time (Value);
end if;
elsif Name = "invite_date" then
Item.Invite_Date.Is_Null := Util.Beans.Objects.Is_Null (Value);
if not Item.Invite_Date.Is_Null then
Item.Invite_Date.Value := Util.Beans.Objects.Time.To_Time (Value);
end if;
end if;
end Set_Value;
-- --------------------
-- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>.
-- --------------------
procedure List (Object : in out Member_Info_List_Bean'Class;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
begin
List (Object.List, Session, Context);
end List;
-- --------------------
-- The Member_Info describes a member of the workspace.
-- --------------------
procedure List (Object : in out Member_Info_Vector;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
procedure Read (Into : in out Member_Info);
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Context);
Pos : Positive := 1;
procedure Read (Into : in out Member_Info) is
begin
Into.Id := Stmt.Get_Identifier (0);
Into.User_Id := Stmt.Get_Identifier (1);
Into.Name := Stmt.Get_Unbounded_String (2);
Into.Email := Stmt.Get_Unbounded_String (3);
Into.Role := Stmt.Get_Unbounded_String (4);
Into.Join_Date := Stmt.Get_Nullable_Time (5);
Into.Invite_Date := Stmt.Get_Nullable_Time (6);
end Read;
begin
Stmt.Execute;
Member_Info_Vectors.Clear (Object);
while Stmt.Has_Elements loop
Object.Insert_Space (Before => Pos);
Object.Update_Element (Index => Pos, Process => Read'Access);
Pos := Pos + 1;
Stmt.Next;
end loop;
end List;
procedure Op_Load (Bean : in out Invitation_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load (Bean : in out Invitation_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Invitation_Bean'Class (Bean).Load (Outcome);
end Op_Load;
package Binding_Invitation_Bean_1 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Invitation_Bean,
Method => Op_Load,
Name => "load");
procedure Op_Accept_Invitation (Bean : in out Invitation_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Accept_Invitation (Bean : in out Invitation_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Invitation_Bean'Class (Bean).Accept_Invitation (Outcome);
end Op_Accept_Invitation;
package Binding_Invitation_Bean_2 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Invitation_Bean,
Method => Op_Accept_Invitation,
Name => "accept_invitation");
procedure Op_Send (Bean : in out Invitation_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Send (Bean : in out Invitation_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Invitation_Bean'Class (Bean).Send (Outcome);
end Op_Send;
package Binding_Invitation_Bean_3 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Invitation_Bean,
Method => Op_Send,
Name => "send");
Binding_Invitation_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (1 => Binding_Invitation_Bean_1.Proxy'Access,
2 => Binding_Invitation_Bean_2.Proxy'Access,
3 => Binding_Invitation_Bean_3.Proxy'Access
);
-- ------------------------------
-- This bean provides some methods that can be used in a Method_Expression.
-- ------------------------------
overriding
function Get_Method_Bindings (From : in Invitation_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Binding_Invitation_Bean_Array'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Invitation_Bean;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "key" then
return Util.Beans.Objects.To_Object (From.Key);
end if;
return Awa.Workspaces.Models.Invitation_Ref (From).Get_Value (Name);
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Invitation_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "key" then
Item.Key := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "create_date" then
Item.Set_Create_Date (Util.Beans.Objects.Time.To_Time (Value));
elsif Name = "email" then
Item.Set_Email (Util.Beans.Objects.To_String (Value));
elsif Name = "message" then
Item.Set_Message (Util.Beans.Objects.To_String (Value));
elsif Name = "acceptance_date" then
if Util.Beans.Objects.Is_Null (Value) then
Item.Set_Acceptance_Date (ADO.Nullable_Time '(Is_Null => True, others => <>));
else
Item.Set_Acceptance_Date (ADO.Nullable_Time '(Is_Null => False,
Value => Util.Beans.Objects.Time.To_Time (Value)));
end if;
end if;
end Set_Value;
procedure Op_Load (Bean : in out Member_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load (Bean : in out Member_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Member_List_Bean'Class (Bean).Load (Outcome);
end Op_Load;
package Binding_Member_List_Bean_1 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Member_List_Bean,
Method => Op_Load,
Name => "load");
Binding_Member_List_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (1 => Binding_Member_List_Bean_1.Proxy'Access
);
-- ------------------------------
-- This bean provides some methods that can be used in a Method_Expression.
-- ------------------------------
overriding
function Get_Method_Bindings (From : in Member_List_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Binding_Member_List_Bean_Array'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Member_List_Bean;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "page_size" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Page_Size));
elsif Name = "count" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Count));
elsif Name = "page" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Page));
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Member_List_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "page_size" then
Item.Page_Size := Util.Beans.Objects.To_Integer (Value);
elsif Name = "count" then
Item.Count := Util.Beans.Objects.To_Integer (Value);
elsif Name = "page" then
Item.Page := Util.Beans.Objects.To_Integer (Value);
end if;
end Set_Value;
procedure Op_Load (Bean : in out Member_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load (Bean : in out Member_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Member_Bean'Class (Bean).Load (Outcome);
end Op_Load;
package Binding_Member_Bean_1 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Member_Bean,
Method => Op_Load,
Name => "load");
procedure Op_Delete (Bean : in out Member_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Delete (Bean : in out Member_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Member_Bean'Class (Bean).Delete (Outcome);
end Op_Delete;
package Binding_Member_Bean_2 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Member_Bean,
Method => Op_Delete,
Name => "delete");
Binding_Member_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (1 => Binding_Member_Bean_1.Proxy'Access,
2 => Binding_Member_Bean_2.Proxy'Access
);
-- ------------------------------
-- This bean provides some methods that can be used in a Method_Expression.
-- ------------------------------
overriding
function Get_Method_Bindings (From : in Member_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Binding_Member_Bean_Array'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Member_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "join_date" then
if Util.Beans.Objects.Is_Null (Value) then
Item.Set_Join_Date (ADO.Nullable_Time '(Is_Null => True, others => <>));
else
Item.Set_Join_Date (ADO.Nullable_Time '(Is_Null => False,
Value => Util.Beans.Objects.Time.To_Time (Value)));
end if;
elsif Name = "role" then
Item.Set_Role (Util.Beans.Objects.To_String (Value));
end if;
end Set_Value;
end AWA.Workspaces.Models;
| 37.455436 | 94 | 0.597458 |
1015568b90c2cfed37e1634720854f33ba70d921 | 9,356 | adb | Ada | linear_algebra/hess_tst_1.adb | jscparker/math_packages | b112a90338014d5c2dfae3f7265ee30841fb6cfd | [
"ISC",
"MIT"
] | 30 | 2018-12-09T01:15:04.000Z | 2022-03-20T16:14:54.000Z | linear_algebra/hess_tst_1.adb | jscparker/math_packages | b112a90338014d5c2dfae3f7265ee30841fb6cfd | [
"ISC",
"MIT"
] | null | null | null | linear_algebra/hess_tst_1.adb | jscparker/math_packages | b112a90338014d5c2dfae3f7265ee30841fb6cfd | [
"ISC",
"MIT"
] | null | null | null |
-- Test hessenberg decomposition of real valued square matrices.
with Ada.Numerics.Generic_elementary_functions;
with Hessenberg;
with Test_Matrices;
with Text_IO; use Text_IO;
procedure hess_tst_1 is
type Real is digits 15;
--type Real is digits 18;
--Desired_Size_Of_Matrix : constant := 2291;
--Desired_Size_Of_Matrix : constant := 1024;
--Desired_Size_Of_Matrix : constant := 478;
--Desired_Size_Of_Matrix : constant := 254;
--Desired_Size_Of_Matrix : constant := 160;
Desired_Size_Of_Matrix : constant := 137;
--Desired_Size_Of_Matrix : constant := 87;
--Desired_Size_Of_Matrix : constant := 95;
pragma Assert (Desired_Size_Of_Matrix < 2**24 and Desired_Size_Of_Matrix > 1);
-- Next: make sure Matrix_Storage_Size is never odd, and never a power of 2.
--
-- This doesn't help for small matrices (Size < 128 on some machines).
--
-- But odd sizes and power of 2 sizes are a performance disaster on more
-- than one Intel processor if matrix is too large for certain Cache sizes.
-- Lapack, compiled by gfortran, seems to have similar problems.
type Unsigned_32 is mod 2**32;
Padding_0 : constant Unsigned_32 := 2 + Desired_Size_Of_Matrix mod 2;
Storage_0 : constant Unsigned_32 := Padding_0 + Desired_Size_Of_Matrix;
Power_of_2_Tst : constant Unsigned_32 := Storage_0 and (Storage_0 - 1);
More_Padding : constant Unsigned_32 := 2 * (1 / (1 + Power_of_2_Tst));
-- Power_of_2_Tst = 0 iff Storage = 2**n. More_Padding = 2 iff Storage = 2**n
Matrix_Storage_Size : constant Integer := Integer (Storage_0 + More_Padding);
-- the test matrix is square-shaped matrix on: Index x Index.
-- eg Hilbert's matrix is a square matrix with unique elements on the range
-- Index'First .. Index'Last. However, you have the option or using any
-- diagonal sub-block of the matrix defined by Index x Index
subtype Index is Integer range 0 .. Matrix_Storage_Size-1;
Starting_Col : constant Index := Index'First;
Final_Col : constant Index := Starting_Col + Desired_Size_Of_Matrix - 1;
-- You have the option or using any diagonal sub-block
-- of the matrix defined by Index x Index. Since it's square, the
-- corners of this diagonal sub-block are defined by the 2 numbers
-- defined above, Starting_Col and Final_Col.
type Matrix is array(Index, Index) of Real;
pragma Convention (Fortran, Matrix);
-- use Convention Fortran. Can be twice as fast as Ada convention.
-- package math is new Ada.Numerics.Generic_Elementary_Functions (Real);
-- use math;
package Hessen is new Hessenberg (Real, Index, Matrix);
-- use Hessen;
-- Create a package of test matrices:
package Square_Matrices is new Test_Matrices (Real, Index, Matrix);
use Square_Matrices;
package rio is new Float_IO(Real);
use rio;
--subtype Real_e is Real; -- general case, works fine
type Real_e is digits 18; -- 18 ok on intel
package Math_e is new Ada.Numerics.Generic_Elementary_Functions (Real_e);
use Math_e;
type Matrix_e is array(Index, Index) of Real_e;
Min_Exp_e : constant Integer := Real_e'Machine_Emin;
Min_Allowed_Real_e : constant Real_e := 2.0**(Min_Exp_e - Min_Exp_e/16);
-- Q * H * Q'
function Product
(Q, H : in Matrix;
Starting_Col : in Index;
Final_Col : in Index)
return Matrix_e
is
E, Result : Matrix_e := (others => (others => 0.0));
Sum : Real_e;
begin
for Row in Starting_Col .. Final_Col loop
for Col in Starting_Col .. Final_Col loop
Sum := +0.0;
for k in Starting_Col .. Final_Col loop
Sum := Sum + Real_e (Q(Row, k)) * Real_e (H(k, Col));
end loop;
E (Row, Col) := Sum;
end loop;
end loop;
for Row in Starting_Col .. Final_Col loop
for Col in Starting_Col .. Final_Col loop
Sum := +0.0;
for k in Starting_Col .. Final_Col loop
Sum := Sum + E(Row, k) * Real_e (Q(Col, k)); -- Q_transpose
end loop;
Result (Row, Col) := Sum;
if Sum'valid = false then put ("!!!!"); end if;
end loop;
end loop;
return Result;
end Product;
--------------------
-- Frobenius_Norm --
--------------------
function Frobenius_Norm
(A : in Matrix_e;
Starting_Col : in Index;
Final_Col : in Index)
return Real_e
is
Max_A_Val : Real_e := +0.0;
Sum, Scaling, tmp : Real_e := +0.0;
begin
Max_A_Val := +0.0;
for Row in Starting_Col .. Final_Col loop
for Col in Starting_Col .. Final_Col loop
if Max_A_Val < Abs A(Row, Col) then Max_A_Val := Abs A(Row, Col); end if;
end loop;
end loop;
Max_A_Val := Max_A_Val + Min_Allowed_Real_e;
Scaling := +1.0 / Max_A_Val;
Sum := +0.0;
for Row in Starting_Col .. Final_Col loop
for Col in Starting_Col .. Final_Col loop
tmp := Scaling * A(Row, Col);
Sum := Sum + tmp * tmp;
end loop;
end loop;
return Sqrt (Sum) * Max_A_Val;
end Frobenius_Norm;
----------------------------
-- Error_in_Decomposition --
----------------------------
-- rough estimate, relative err.
procedure Error_in_Decomposition
(A : in Matrix; -- A_true
U, H : in Matrix;
Starting_Col : in Index;
Final_Col : in Index;
Max_Error : out Real)
is
Err : Real_e := 0.0;
eA, D : Matrix_e;
begin
D := Product (U, H, Starting_Col, Final_Col); -- D = U * H * U'
-- reuse D as D = A - U * H * U'
for r in Starting_Col .. Final_Col loop
for c in Starting_Col .. Final_Col loop
eA(r, c) := Real_e (A(r, c));
D(r, c) := D(r, c) - eA(r, c);
end loop;
end loop;
-- Want Err = ||A - U * H * U'|| / ||A||:
Err := Frobenius_Norm (D, Starting_Col, Final_Col) /
(Frobenius_Norm (eA, Starting_Col, Final_Col) + Min_Allowed_Real_e);
Max_Error := Real (Err);
end Error_in_Decomposition;
-----------
-- Pause --
-----------
procedure Pause (s0,s1,s2,s3,s4,s5,s6,s7,s8,s9 : string := "") is
Continue : Character := ' ';
begin
new_line;
if S0 /= "" then put_line (S0); end if;
if S1 /= "" then put_line (S1); end if;
if S2 /= "" then put_line (S2); end if;
if S3 /= "" then put_line (S3); end if;
if S4 /= "" then put_line (S4); end if;
if S5 /= "" then put_line (S5); end if;
if S6 /= "" then put_line (S6); end if;
if S7 /= "" then put_line (S7); end if;
if S8 /= "" then put_line (S8); end if;
if S9 /= "" then put_line (S9); end if;
new_line;
begin
put ("Type a character to continue: ");
get_immediate (Continue);
exception
when others => null;
end;
end pause;
x, Max_Error : Real := 0.0;
A_true, A : Matrix := (others => (others => 0.0));
U : Matrix := (others => (others => 0.0));
N : constant Integer := Integer(Final_Col) - Integer(Starting_Col) + 1;
begin
Pause(
"Testing Hessenberg decomposition of matrix A.",
"Error is estimated by measuring",
" ",
" ||Q * A_hessenberg * Q' - A|| / ||A||",
" ",
"where ||M|| is the norm of matrix M. If 15 digit Reals are used and if",
"all goes well, then expect the error to be a few parts per 10**15."
);
new_line(2);
put ("More padding = "); put (Unsigned_32'Image(more_padding));
new_line(2);
put ("Testing Hessenberg on the following");
put (Integer'Image (N)); put (" x"); put (Integer'Image (N));
put (" matrices:");
new_line(1);
for Chosen_Matrix in Matrix_Id loop
--for Chosen_Matrix in pas_fib .. pas_fib loop
--for Chosen_Matrix in vandermonde .. companion_0 loop
--for Chosen_Matrix in vandermonde .. vandermonde loop
--for Chosen_Matrix in companion_1 .. companion_1 loop
--for Chosen_Matrix in clustered .. clustered loop
--for Chosen_Matrix in fiedler_1 .. fiedler_1 loop
--for Chosen_Matrix in laguerre .. laguerre loop
Square_Matrices.Init_Matrix (A, Chosen_Matrix, Starting_Col, Final_Col);
--Transpose (A);
for r in Starting_Col .. Final_Col loop
for c in Starting_Col .. Final_Col loop
A(r, c) := A(r, c) + 1.123e-7;
end loop;
end loop;
A_true := A; -- Save original A
-- A_hess = Q_tr * A_true * Q.
--
-- A_true = Q * A_hess * Q_tr.
Hessen.Upper_Hessenberg
(A => A, -- A is replaced with: A_hessenberg
Q => U, -- A_true = U * A_hessenberg * U_transpose
Starting_Col => Starting_Col,
Final_Col => Final_Col,
Initial_Q => Hessen.Identity);
x := x + A(1,1) + U(1,1);
Error_in_Decomposition
(A_true,
U, A, -- A should be hess by now
Starting_Col, Final_Col,
Max_Error);
new_line;
put ("Error in decomposition ~");
put (Max_Error);
put (" for matrix ");
put (Matrix_id'Image(Chosen_Matrix));
end loop;
new_line; put (x);
end hess_tst_1;
| 31.083056 | 82 | 0.590958 |
235b422fb4ade045dc878406bab448d489fbf57c | 582 | adb | Ada | src/ada/src/services/spark/afrl-cmasi-automationresponse-spark_boundary.adb | VVCAS-Sean/OpenUxAS | dcd7be29d182d278a5387908f568d6f8a06b79ee | [
"NASA-1.3"
] | 88 | 2017-08-24T07:02:01.000Z | 2022-03-18T04:34:17.000Z | src/ada/src/services/spark/afrl-cmasi-automationresponse-spark_boundary.adb | VVCAS-Sean/OpenUxAS | dcd7be29d182d278a5387908f568d6f8a06b79ee | [
"NASA-1.3"
] | 46 | 2017-06-08T18:18:08.000Z | 2022-03-15T18:24:43.000Z | src/ada/src/services/spark/afrl-cmasi-automationresponse-spark_boundary.adb | VVCAS-Sean/OpenUxAS | dcd7be29d182d278a5387908f568d6f8a06b79ee | [
"NASA-1.3"
] | 53 | 2017-06-22T14:48:05.000Z | 2022-02-15T16:59:38.000Z | package body AFRL.CMASI.AutomationResponse.SPARK_Boundary with SPARK_Mode => Off is
--------------------
-- Get_WaypointEntity_Set --
--------------------
function Get_WaypointEntity_Set
(Response : AutomationResponse) return Int64_Set
is
L : constant Vect_MissionCommand_Acc_Acc := Response.getMissionCommandList;
begin
return R : Int64_Set do
for E of L.all loop
Int64_Sets.Include (R, E.getVehicleID);
end loop;
end return;
end Get_WaypointEntity_Set;
end AFRL.CMASI.AutomationResponse.SPARK_Boundary;
| 29.1 | 83 | 0.659794 |
dc8506ebfac95a261f6ba1f91282a1bf0f84e74b | 5,700 | adb | Ada | llvm-gcc-4.2-2.9/gcc/ada/s-imgllb.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | 1 | 2016-04-09T02:58:13.000Z | 2016-04-09T02:58:13.000Z | llvm-gcc-4.2-2.9/gcc/ada/s-imgllb.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | llvm-gcc-4.2-2.9/gcc/ada/s-imgllb.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I M G _ L L B --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Unsigned_Types; use System.Unsigned_Types;
package body System.Img_LLB is
---------------------------------------
-- Set_Image_Based_Long_Long_Integer --
---------------------------------------
procedure Set_Image_Based_Long_Long_Integer
(V : Long_Long_Integer;
B : Natural;
W : Integer;
S : out String;
P : in out Natural)
is
Start : Natural;
begin
-- Positive case can just use the unsigned circuit directly
if V >= 0 then
Set_Image_Based_Long_Long_Unsigned
(Long_Long_Unsigned (V), B, W, S, P);
-- Negative case has to set a minus sign. Note also that we have to be
-- careful not to generate overflow with the largest negative number.
else
P := P + 1;
S (P) := ' ';
Start := P;
declare
pragma Suppress (Overflow_Check);
pragma Suppress (Range_Check);
begin
Set_Image_Based_Long_Long_Unsigned
(Long_Long_Unsigned (-V), B, W - 1, S, P);
end;
-- Set minus sign in last leading blank location. Because of the
-- code above, there must be at least one such location.
while S (Start + 1) = ' ' loop
Start := Start + 1;
end loop;
S (Start) := '-';
end if;
end Set_Image_Based_Long_Long_Integer;
----------------------------------------
-- Set_Image_Based_Long_Long_Unsigned --
----------------------------------------
procedure Set_Image_Based_Long_Long_Unsigned
(V : Long_Long_Unsigned;
B : Natural;
W : Integer;
S : out String;
P : in out Natural)
is
Start : constant Natural := P;
F, T : Natural;
BU : constant Long_Long_Unsigned := Long_Long_Unsigned (B);
Hex : constant array
(Long_Long_Unsigned range 0 .. 15) of Character :=
"0123456789ABCDEF";
procedure Set_Digits (T : Long_Long_Unsigned);
-- Set digits of absolute value of T
procedure Set_Digits (T : Long_Long_Unsigned) is
begin
if T >= BU then
Set_Digits (T / BU);
P := P + 1;
S (P) := Hex (T mod BU);
else
P := P + 1;
S (P) := Hex (T);
end if;
end Set_Digits;
-- Start of processing for Set_Image_Based_Long_Long_Unsigned
begin
if B >= 10 then
P := P + 1;
S (P) := '1';
end if;
P := P + 1;
S (P) := Character'Val (Character'Pos ('0') + B mod 10);
P := P + 1;
S (P) := '#';
Set_Digits (V);
P := P + 1;
S (P) := '#';
-- Add leading spaces if required by width parameter
if P - Start < W then
F := P;
P := Start + W;
T := P;
while F > Start loop
S (T) := S (F);
T := T - 1;
F := F - 1;
end loop;
for J in Start + 1 .. T loop
S (J) := ' ';
end loop;
end if;
end Set_Image_Based_Long_Long_Unsigned;
end System.Img_LLB;
| 35.625 | 78 | 0.450526 |
200ea5b3f2a48a0fc3d418ce664a1c845647b60e | 2,568 | adb | Ada | maps_g_array/maps_g.adb | cborao/Ada-P3 | a099243531f259158eb30450868c31e81783174c | [
"MIT"
] | null | null | null | maps_g_array/maps_g.adb | cborao/Ada-P3 | a099243531f259158eb30450868c31e81783174c | [
"MIT"
] | null | null | null | maps_g_array/maps_g.adb | cborao/Ada-P3 | a099243531f259158eb30450868c31e81783174c | [
"MIT"
] | null | null | null |
--PRÁCTICA 3: CÉSAR BORAO MORATINOS (Maps_G_Array.adb)
with Ada.Text_IO;
with Ada.Strings.Unbounded;
package body Maps_G is
package ASU renames Ada.Strings.Unbounded;
procedure Put (M: in out Map;
Key: Key_Type;
Value: Value_Type) is
Position: Natural := 1;
Found: Boolean;
begin
Found := False;
if M.P_Array = null then
M.P_Array := new Cell_Array;
M.P_Array(1) := (Key,Value,True);
M.Length := 1;
Found := True;
else
while not Found and Position <= M.Length loop
if M.P_Array(Position).Key = Key then
M.P_Array(Position).Value := Value;
Found := True;
end if;
Position := Position+1;
end loop;
if not Found then
if M.Length >= Max_Clients then
raise Full_Map;
end if;
M.P_Array(Position) := (Key,Value,True);
M.Length := M.Length + 1;
end if;
end if;
end Put;
procedure Get (M: Map;
Key: in Key_Type;
Value: out Value_Type;
Success: out Boolean) is
Position: Natural := 1;
begin
if M.P_Array = null then
Success := False;
else
Success := False;
while not Success and Position <= M.Length loop
if M.P_Array(Position).Key = Key then
Value := M.P_Array(Position).Value;
Success := True;
end if;
Position := Position + 1;
end loop;
end if;
end Get;
procedure Delete (M: in out Map;
Key: in Key_Type;
Success: out Boolean) is
Position: Natural := 1;
begin
Success := False;
while not Success and Position <= M.Length loop
if M.P_Array(Position).Key = Key then
Success := True;
for I in Position..M.Length-1 loop
M.P_Array(I) := M.P_Array(I+1);
end loop;
end if;
Position := Position + 1;
end loop;
M.Length := M.Length - 1;
end Delete;
function Map_Length (M: Map) return Natural is
begin
return M.Length;
end Map_Length;
function First (M: Map) return Cursor is
C: Cursor;
begin
C.M := M;
C.Position := 1;
return C;
end First;
procedure Next (C: in out Cursor) is
begin
C.Position := C.Position + 1;
end;
function Has_Element (C: Cursor) return Boolean is
begin
if C.Position > C.M.Length then
return False;
else
return C.M.P_Array(C.Position).Full;
end if;
end Has_Element;
function Element (C: Cursor) return Element_Type is
Element: Element_Type;
begin
if Has_Element (C) then
Element.Key := C.M.P_Array(C.Position).Key;
Element.Value := C.M.P_Array(C.Position).Value;
else
raise No_Element;
end if;
return Element;
end Element;
end Maps_G;
| 19.603053 | 55 | 0.632788 |
18741be7917dfe9be570d9ce03101ad5b9f228a3 | 76,197 | adb | Ada | gcc-gcc-7_3_0-release/gcc/ada/prj-env.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/ada/prj-env.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/ada/prj-env.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P R J . E N V --
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-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 Fmap;
with Makeutl; use Makeutl;
with Opt;
with Osint; use Osint;
with Output; use Output;
with Prj.Com; use Prj.Com;
with Sdefault;
with Tempdir;
with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
package body Prj.Env is
Buffer_Initial : constant := 1_000;
-- Initial arbitrary size of buffers
Uninitialized_Prefix : constant String := '#' & Path_Separator;
-- Prefix to indicate that the project path has not been initialized yet.
-- Must be two characters long
No_Project_Default_Dir : constant String := "-";
-- Indicator in the project path to indicate that the default search
-- directories should not be added to the path
-----------------------
-- Local Subprograms --
-----------------------
package Source_Path_Table is new GNAT.Dynamic_Tables
(Table_Component_Type => Name_Id,
Table_Index_Type => Natural,
Table_Low_Bound => 1,
Table_Initial => 50,
Table_Increment => 100);
-- A table to store the source dirs before creating the source path file
package Object_Path_Table is new GNAT.Dynamic_Tables
(Table_Component_Type => Path_Name_Type,
Table_Index_Type => Natural,
Table_Low_Bound => 1,
Table_Initial => 50,
Table_Increment => 100);
-- A table to store the object dirs, before creating the object path file
procedure Add_To_Buffer
(S : String;
Buffer : in out String_Access;
Buffer_Last : in out Natural);
-- Add a string to Buffer, extending Buffer if needed
procedure Add_To_Path
(Source_Dirs : String_List_Id;
Shared : Shared_Project_Tree_Data_Access;
Buffer : in out String_Access;
Buffer_Last : in out Natural);
-- Add to Ada_Path_Buffer all the source directories in string list
-- Source_Dirs, if any.
procedure Add_To_Path
(Dir : String;
Buffer : in out String_Access;
Buffer_Last : in out Natural);
-- If Dir is not already in the global variable Ada_Path_Buffer, add it.
-- If Buffer_Last /= 0, prepend a Path_Separator character to Path.
procedure Add_To_Source_Path
(Source_Dirs : String_List_Id;
Shared : Shared_Project_Tree_Data_Access;
Source_Paths : in out Source_Path_Table.Instance);
-- Add to Ada_Path_B all the source directories in string list
-- Source_Dirs, if any. Increment Ada_Path_Length.
procedure Add_To_Object_Path
(Object_Dir : Path_Name_Type;
Object_Paths : in out Object_Path_Table.Instance);
-- Add Object_Dir to object path table. Make sure it is not duplicate
-- and it is the last one in the current table.
----------------------
-- Ada_Include_Path --
----------------------
function Ada_Include_Path
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Recursive : Boolean := False) return String
is
Buffer : String_Access;
Buffer_Last : Natural := 0;
procedure Add
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Dummy : in out Boolean);
-- Add source dirs of Project to the path
---------
-- Add --
---------
procedure Add
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Dummy : in out Boolean)
is
begin
Add_To_Path
(Project.Source_Dirs, In_Tree.Shared, Buffer, Buffer_Last);
end Add;
procedure For_All_Projects is
new For_Every_Project_Imported (Boolean, Add);
Dummy : Boolean := False;
-- Start of processing for Ada_Include_Path
begin
if Recursive then
-- If it is the first time we call this function for this project,
-- compute the source path.
if Project.Ada_Include_Path = null then
Buffer := new String (1 .. Buffer_Initial);
For_All_Projects
(Project, In_Tree, Dummy, Include_Aggregated => True);
Project.Ada_Include_Path := new String'(Buffer (1 .. Buffer_Last));
Free (Buffer);
end if;
return Project.Ada_Include_Path.all;
else
Buffer := new String (1 .. Buffer_Initial);
Add_To_Path
(Project.Source_Dirs, In_Tree.Shared, Buffer, Buffer_Last);
declare
Result : constant String := Buffer (1 .. Buffer_Last);
begin
Free (Buffer);
return Result;
end;
end if;
end Ada_Include_Path;
----------------------
-- Ada_Objects_Path --
----------------------
function Ada_Objects_Path
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Including_Libraries : Boolean := True) return String_Access
is
Buffer : String_Access;
Buffer_Last : Natural := 0;
procedure Add
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Dummy : in out Boolean);
-- Add all the object directories of a project to the path
---------
-- Add --
---------
procedure Add
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Dummy : in out Boolean)
is
pragma Unreferenced (In_Tree);
Path : constant Path_Name_Type :=
Get_Object_Directory
(Project,
Including_Libraries => Including_Libraries,
Only_If_Ada => False);
begin
if Path /= No_Path then
Add_To_Path (Get_Name_String (Path), Buffer, Buffer_Last);
end if;
end Add;
procedure For_All_Projects is
new For_Every_Project_Imported (Boolean, Add);
Dummy : Boolean := False;
Result : String_Access;
-- Start of processing for Ada_Objects_Path
begin
-- If it is the first time we call this function for
-- this project, compute the objects path
if Including_Libraries and then Project.Ada_Objects_Path /= null then
return Project.Ada_Objects_Path;
elsif not Including_Libraries
and then Project.Ada_Objects_Path_No_Libs /= null
then
return Project.Ada_Objects_Path_No_Libs;
else
Buffer := new String (1 .. Buffer_Initial);
For_All_Projects (Project, In_Tree, Dummy);
Result := new String'(Buffer (1 .. Buffer_Last));
Free (Buffer);
if Including_Libraries then
Project.Ada_Objects_Path := Result;
else
Project.Ada_Objects_Path_No_Libs := Result;
end if;
return Result;
end if;
end Ada_Objects_Path;
-------------------
-- Add_To_Buffer --
-------------------
procedure Add_To_Buffer
(S : String;
Buffer : in out String_Access;
Buffer_Last : in out Natural)
is
Last : constant Natural := Buffer_Last + S'Length;
begin
while Last > Buffer'Last loop
declare
New_Buffer : constant String_Access :=
new String (1 .. 2 * Buffer'Last);
begin
New_Buffer (1 .. Buffer_Last) := Buffer (1 .. Buffer_Last);
Free (Buffer);
Buffer := New_Buffer;
end;
end loop;
Buffer (Buffer_Last + 1 .. Last) := S;
Buffer_Last := Last;
end Add_To_Buffer;
------------------------
-- Add_To_Object_Path --
------------------------
procedure Add_To_Object_Path
(Object_Dir : Path_Name_Type;
Object_Paths : in out Object_Path_Table.Instance)
is
begin
-- Check if the directory is already in the table
for Index in
Object_Path_Table.First .. Object_Path_Table.Last (Object_Paths)
loop
-- If it is, remove it, and add it as the last one
if Object_Paths.Table (Index) = Object_Dir then
for Index2 in
Index + 1 .. Object_Path_Table.Last (Object_Paths)
loop
Object_Paths.Table (Index2 - 1) := Object_Paths.Table (Index2);
end loop;
Object_Paths.Table
(Object_Path_Table.Last (Object_Paths)) := Object_Dir;
return;
end if;
end loop;
-- The directory is not already in the table, add it
Object_Path_Table.Append (Object_Paths, Object_Dir);
end Add_To_Object_Path;
-----------------
-- Add_To_Path --
-----------------
procedure Add_To_Path
(Source_Dirs : String_List_Id;
Shared : Shared_Project_Tree_Data_Access;
Buffer : in out String_Access;
Buffer_Last : in out Natural)
is
Current : String_List_Id;
Source_Dir : String_Element;
begin
Current := Source_Dirs;
while Current /= Nil_String loop
Source_Dir := Shared.String_Elements.Table (Current);
Add_To_Path (Get_Name_String (Source_Dir.Display_Value),
Buffer, Buffer_Last);
Current := Source_Dir.Next;
end loop;
end Add_To_Path;
procedure Add_To_Path
(Dir : String;
Buffer : in out String_Access;
Buffer_Last : in out Natural)
is
Len : Natural;
New_Buffer : String_Access;
Min_Len : Natural;
function Is_Present (Path : String; Dir : String) return Boolean;
-- Return True if Dir is part of Path
----------------
-- Is_Present --
----------------
function Is_Present (Path : String; Dir : String) return Boolean is
Last : constant Integer := Path'Last - Dir'Length + 1;
begin
for J in Path'First .. Last loop
-- Note: the order of the conditions below is important, since
-- it ensures a minimal number of string comparisons.
if (J = Path'First or else Path (J - 1) = Path_Separator)
and then
(J + Dir'Length > Path'Last
or else Path (J + Dir'Length) = Path_Separator)
and then Dir = Path (J .. J + Dir'Length - 1)
then
return True;
end if;
end loop;
return False;
end Is_Present;
-- Start of processing for Add_To_Path
begin
if Is_Present (Buffer (1 .. Buffer_Last), Dir) then
-- Dir is already in the path, nothing to do
return;
end if;
Min_Len := Buffer_Last + Dir'Length;
if Buffer_Last > 0 then
-- Add 1 for the Path_Separator character
Min_Len := Min_Len + 1;
end if;
-- If Ada_Path_Buffer is too small, increase it
Len := Buffer'Last;
if Len < Min_Len then
loop
Len := Len * 2;
exit when Len >= Min_Len;
end loop;
New_Buffer := new String (1 .. Len);
New_Buffer (1 .. Buffer_Last) := Buffer (1 .. Buffer_Last);
Free (Buffer);
Buffer := New_Buffer;
end if;
if Buffer_Last > 0 then
Buffer_Last := Buffer_Last + 1;
Buffer (Buffer_Last) := Path_Separator;
end if;
Buffer (Buffer_Last + 1 .. Buffer_Last + Dir'Length) := Dir;
Buffer_Last := Buffer_Last + Dir'Length;
end Add_To_Path;
------------------------
-- Add_To_Source_Path --
------------------------
procedure Add_To_Source_Path
(Source_Dirs : String_List_Id;
Shared : Shared_Project_Tree_Data_Access;
Source_Paths : in out Source_Path_Table.Instance)
is
Current : String_List_Id;
Source_Dir : String_Element;
Add_It : Boolean;
begin
-- Add each source directory
Current := Source_Dirs;
while Current /= Nil_String loop
Source_Dir := Shared.String_Elements.Table (Current);
Add_It := True;
-- Check if the source directory is already in the table
for Index in
Source_Path_Table.First .. Source_Path_Table.Last (Source_Paths)
loop
-- If it is already, no need to add it
if Source_Paths.Table (Index) = Source_Dir.Value then
Add_It := False;
exit;
end if;
end loop;
if Add_It then
Source_Path_Table.Append (Source_Paths, Source_Dir.Display_Value);
end if;
-- Next source directory
Current := Source_Dir.Next;
end loop;
end Add_To_Source_Path;
--------------------------------
-- Create_Config_Pragmas_File --
--------------------------------
procedure Create_Config_Pragmas_File
(For_Project : Project_Id;
In_Tree : Project_Tree_Ref)
is
type Naming_Id is new Nat;
package Naming_Table is new GNAT.Dynamic_Tables
(Table_Component_Type => Lang_Naming_Data,
Table_Index_Type => Naming_Id,
Table_Low_Bound => 1,
Table_Initial => 5,
Table_Increment => 100);
Default_Naming : constant Naming_Id := Naming_Table.First;
Namings : Naming_Table.Instance;
-- Table storing the naming data for gnatmake/gprmake
Buffer : String_Access := new String (1 .. Buffer_Initial);
Buffer_Last : Natural := 0;
File_Name : Path_Name_Type := No_Path;
File : File_Descriptor := Invalid_FD;
Current_Naming : Naming_Id;
procedure Check
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
State : in out Integer);
-- Recursive procedure that put in the config pragmas file any non
-- standard naming schemes, if it is not already in the file, then call
-- itself for any imported project.
procedure Put (Source : Source_Id);
-- Put an SFN pragma in the temporary file
procedure Put (S : String);
procedure Put_Line (S : String);
-- Output procedures, analogous to normal Text_IO procs of same name.
-- The text is put in Buffer, then it will be written into a temporary
-- file with procedure Write_Temp_File below.
procedure Write_Temp_File;
-- Create a temporary file and put the content of the buffer in it
-----------
-- Check --
-----------
procedure Check
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
State : in out Integer)
is
pragma Unreferenced (State);
Lang : constant Language_Ptr :=
Get_Language_From_Name (Project, "ada");
Naming : Lang_Naming_Data;
Iter : Source_Iterator;
Source : Source_Id;
begin
if Current_Verbosity = High then
Debug_Output ("Checking project file:", Project.Name);
end if;
if Lang = null then
if Current_Verbosity = High then
Debug_Output ("Languages does not contain Ada, nothing to do");
end if;
return;
end if;
-- Visit all the files and process those that need an SFN pragma
Iter := For_Each_Source (In_Tree, Project);
while Element (Iter) /= No_Source loop
Source := Element (Iter);
if not Source.Locally_Removed
and then Source.Unit /= null
and then
(Source.Index >= 1 or else Source.Naming_Exception /= No)
then
Put (Source);
end if;
Next (Iter);
end loop;
Naming := Lang.Config.Naming_Data;
-- Is the naming scheme of this project one that we know?
Current_Naming := Default_Naming;
while Current_Naming <= Naming_Table.Last (Namings)
and then Namings.Table (Current_Naming).Dot_Replacement =
Naming.Dot_Replacement
and then Namings.Table (Current_Naming).Casing =
Naming.Casing
and then Namings.Table (Current_Naming).Separate_Suffix =
Naming.Separate_Suffix
loop
Current_Naming := Current_Naming + 1;
end loop;
-- If we don't know it, add it
if Current_Naming > Naming_Table.Last (Namings) then
Naming_Table.Increment_Last (Namings);
Namings.Table (Naming_Table.Last (Namings)) := Naming;
-- Put the SFN pragmas for the naming scheme
-- Spec
Put_Line
("pragma Source_File_Name_Project");
Put_Line
(" (Spec_File_Name => ""*" &
Get_Name_String (Naming.Spec_Suffix) & """,");
Put_Line
(" Casing => " &
Image (Naming.Casing) & ",");
Put_Line
(" Dot_Replacement => """ &
Get_Name_String (Naming.Dot_Replacement) & """);");
-- and body
Put_Line
("pragma Source_File_Name_Project");
Put_Line
(" (Body_File_Name => ""*" &
Get_Name_String (Naming.Body_Suffix) & """,");
Put_Line
(" Casing => " &
Image (Naming.Casing) & ",");
Put_Line
(" Dot_Replacement => """ &
Get_Name_String (Naming.Dot_Replacement) &
""");");
-- and maybe separate
if Naming.Body_Suffix /= Naming.Separate_Suffix then
Put_Line ("pragma Source_File_Name_Project");
Put_Line
(" (Subunit_File_Name => ""*" &
Get_Name_String (Naming.Separate_Suffix) & """,");
Put_Line
(" Casing => " &
Image (Naming.Casing) & ",");
Put_Line
(" Dot_Replacement => """ &
Get_Name_String (Naming.Dot_Replacement) &
""");");
end if;
end if;
end Check;
---------
-- Put --
---------
procedure Put (Source : Source_Id) is
begin
-- Put the pragma SFN for the unit kind (spec or body)
Put ("pragma Source_File_Name_Project (");
Put (Namet.Get_Name_String (Source.Unit.Name));
if Source.Kind = Spec then
Put (", Spec_File_Name => """);
else
Put (", Body_File_Name => """);
end if;
Put (Namet.Get_Name_String (Source.File));
Put ("""");
if Source.Index /= 0 then
Put (", Index =>");
Put (Source.Index'Img);
end if;
Put_Line (");");
end Put;
procedure Put (S : String) is
begin
Add_To_Buffer (S, Buffer, Buffer_Last);
if Current_Verbosity = High then
Write_Str (S);
end if;
end Put;
--------------
-- Put_Line --
--------------
procedure Put_Line (S : String) is
begin
-- Add an ASCII.LF to the string. As this config file is supposed to
-- be used only by the compiler, we don't care about the characters
-- for the end of line. In fact we could have put a space, but
-- it is more convenient to be able to read gnat.adc during
-- development, for which the ASCII.LF is fine.
Put (S);
Put (S => (1 => ASCII.LF));
end Put_Line;
---------------------
-- Write_Temp_File --
---------------------
procedure Write_Temp_File is
Status : Boolean := False;
Last : Natural;
begin
Tempdir.Create_Temp_File (File, File_Name);
if File /= Invalid_FD then
Last := Write (File, Buffer (1)'Address, Buffer_Last);
if Last = Buffer_Last then
Close (File, Status);
end if;
end if;
if not Status then
Prj.Com.Fail ("unable to create temporary file");
end if;
end Write_Temp_File;
procedure Check_Imported_Projects is
new For_Every_Project_Imported (Integer, Check);
Dummy : Integer := 0;
-- Start of processing for Create_Config_Pragmas_File
begin
if not For_Project.Config_Checked then
Naming_Table.Init (Namings);
-- Check the naming schemes
Check_Imported_Projects
(For_Project, In_Tree, Dummy, Imported_First => False);
-- If there are no non standard naming scheme, issue the GNAT
-- standard naming scheme. This will tell the compiler that
-- a project file is used and will forbid any pragma SFN.
if Buffer_Last = 0 then
Put_Line ("pragma Source_File_Name_Project");
Put_Line (" (Spec_File_Name => ""*.ads"",");
Put_Line (" Dot_Replacement => ""-"",");
Put_Line (" Casing => lowercase);");
Put_Line ("pragma Source_File_Name_Project");
Put_Line (" (Body_File_Name => ""*.adb"",");
Put_Line (" Dot_Replacement => ""-"",");
Put_Line (" Casing => lowercase);");
end if;
-- Close the temporary file
Write_Temp_File;
if Opt.Verbose_Mode then
Write_Str ("Created configuration file """);
Write_Str (Get_Name_String (File_Name));
Write_Line ("""");
end if;
For_Project.Config_File_Name := File_Name;
For_Project.Config_File_Temp := True;
For_Project.Config_Checked := True;
end if;
Free (Buffer);
end Create_Config_Pragmas_File;
--------------------
-- Create_Mapping --
--------------------
procedure Create_Mapping (In_Tree : Project_Tree_Ref) is
Data : Source_Id;
Iter : Source_Iterator;
begin
Fmap.Reset_Tables;
Iter := For_Each_Source (In_Tree);
loop
Data := Element (Iter);
exit when Data = No_Source;
if Data.Unit /= No_Unit_Index then
if Data.Locally_Removed and then not Data.Suppressed then
Fmap.Add_Forbidden_File_Name (Data.File);
else
Fmap.Add_To_File_Map
(Unit_Name => Unit_Name_Type (Data.Unit.Name),
File_Name => Data.File,
Path_Name => File_Name_Type (Data.Path.Display_Name));
end if;
end if;
Next (Iter);
end loop;
end Create_Mapping;
-------------------------
-- Create_Mapping_File --
-------------------------
procedure Create_Mapping_File
(Project : Project_Id;
Language : Name_Id;
In_Tree : Project_Tree_Ref;
Name : out Path_Name_Type)
is
File : File_Descriptor := Invalid_FD;
Buffer : String_Access := new String (1 .. Buffer_Initial);
Buffer_Last : Natural := 0;
procedure Put_Name_Buffer;
-- Put the line contained in the Name_Buffer in the global buffer
procedure Process
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
State : in out Integer);
-- Generate the mapping file for Project (not recursively)
---------------------
-- Put_Name_Buffer --
---------------------
procedure Put_Name_Buffer is
begin
if Current_Verbosity = High then
Debug_Output (Name_Buffer (1 .. Name_Len));
end if;
Name_Len := Name_Len + 1;
Name_Buffer (Name_Len) := ASCII.LF;
Add_To_Buffer (Name_Buffer (1 .. Name_Len), Buffer, Buffer_Last);
end Put_Name_Buffer;
-------------
-- Process --
-------------
procedure Process
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
State : in out Integer)
is
pragma Unreferenced (State);
Source : Source_Id;
Suffix : File_Name_Type;
Iter : Source_Iterator;
begin
Debug_Output ("Add mapping for project", Project.Name);
Iter := For_Each_Source (In_Tree, Project, Language => Language);
loop
Source := Prj.Element (Iter);
exit when Source = No_Source;
if not Source.Suppressed
and then Source.Replaced_By = No_Source
and then Source.Path.Name /= No_Path
and then (Source.Language.Config.Kind = File_Based
or else Source.Unit /= No_Unit_Index)
then
if Source.Unit /= No_Unit_Index then
-- Put the encoded unit name in the name buffer
declare
Uname : constant String :=
Get_Name_String (Source.Unit.Name);
begin
Name_Len := 0;
for J in Uname'Range loop
if Uname (J) in Upper_Half_Character then
Store_Encoded_Character (Get_Char_Code (Uname (J)));
else
Add_Char_To_Name_Buffer (Uname (J));
end if;
end loop;
end;
if Source.Language.Config.Kind = Unit_Based then
-- ??? Mapping_Spec_Suffix could be set in the case of
-- gnatmake as well
Add_Char_To_Name_Buffer ('%');
if Source.Kind = Spec then
Add_Char_To_Name_Buffer ('s');
else
Add_Char_To_Name_Buffer ('b');
end if;
else
case Source.Kind is
when Spec =>
Suffix :=
Source.Language.Config.Mapping_Spec_Suffix;
when Impl
| Sep
=>
Suffix :=
Source.Language.Config.Mapping_Body_Suffix;
end case;
if Suffix /= No_File then
Add_Str_To_Name_Buffer (Get_Name_String (Suffix));
end if;
end if;
Put_Name_Buffer;
end if;
Get_Name_String (Source.Display_File);
Put_Name_Buffer;
if Source.Locally_Removed then
Name_Len := 1;
Name_Buffer (1) := '/';
else
Get_Name_String (Source.Path.Display_Name);
end if;
Put_Name_Buffer;
end if;
Next (Iter);
end loop;
end Process;
procedure For_Every_Imported_Project is new
For_Every_Project_Imported (State => Integer, Action => Process);
-- Local variables
Dummy : Integer := 0;
-- Start of processing for Create_Mapping_File
begin
if Current_Verbosity = High then
Debug_Output ("Create mapping file for", Debug_Name (In_Tree));
end if;
Create_Temp_File (In_Tree.Shared, File, Name, "mapping");
if Current_Verbosity = High then
Debug_Increase_Indent ("Create mapping file ", Name_Id (Name));
end if;
For_Every_Imported_Project
(Project, In_Tree, Dummy, Include_Aggregated => False);
declare
Last : Natural;
Status : Boolean := False;
begin
if File /= Invalid_FD then
Last := Write (File, Buffer (1)'Address, Buffer_Last);
if Last = Buffer_Last then
GNAT.OS_Lib.Close (File, Status);
end if;
end if;
if not Status then
Prj.Com.Fail ("could not write mapping file");
end if;
end;
Free (Buffer);
Debug_Decrease_Indent ("Done create mapping file");
end Create_Mapping_File;
----------------------
-- Create_Temp_File --
----------------------
procedure Create_Temp_File
(Shared : Shared_Project_Tree_Data_Access;
Path_FD : out File_Descriptor;
Path_Name : out Path_Name_Type;
File_Use : String)
is
begin
Tempdir.Create_Temp_File (Path_FD, Path_Name);
if Path_Name /= No_Path then
if Current_Verbosity = High then
Write_Line ("Create temp file (" & File_Use & ") "
& Get_Name_String (Path_Name));
end if;
Record_Temp_File (Shared, Path_Name);
else
Prj.Com.Fail
("unable to create temporary " & File_Use & " file");
end if;
end Create_Temp_File;
--------------------------
-- Create_New_Path_File --
--------------------------
procedure Create_New_Path_File
(Shared : Shared_Project_Tree_Data_Access;
Path_FD : out File_Descriptor;
Path_Name : out Path_Name_Type)
is
begin
Create_Temp_File (Shared, Path_FD, Path_Name, "path file");
end Create_New_Path_File;
------------------------------------
-- File_Name_Of_Library_Unit_Body --
------------------------------------
function File_Name_Of_Library_Unit_Body
(Name : String;
Project : Project_Id;
In_Tree : Project_Tree_Ref;
Main_Project_Only : Boolean := True;
Full_Path : Boolean := False) return String
is
Lang : constant Language_Ptr :=
Get_Language_From_Name (Project, "ada");
The_Project : Project_Id := Project;
Original_Name : String := Name;
Unit : Unit_Index;
The_Original_Name : Name_Id;
The_Spec_Name : Name_Id;
The_Body_Name : Name_Id;
begin
-- ??? Same block in Project_Of
Canonical_Case_File_Name (Original_Name);
Name_Len := Original_Name'Length;
Name_Buffer (1 .. Name_Len) := Original_Name;
The_Original_Name := Name_Find;
if Lang /= null then
declare
Naming : constant Lang_Naming_Data := Lang.Config.Naming_Data;
Extended_Spec_Name : String :=
Name & Namet.Get_Name_String
(Naming.Spec_Suffix);
Extended_Body_Name : String :=
Name & Namet.Get_Name_String
(Naming.Body_Suffix);
begin
Canonical_Case_File_Name (Extended_Spec_Name);
Name_Len := Extended_Spec_Name'Length;
Name_Buffer (1 .. Name_Len) := Extended_Spec_Name;
The_Spec_Name := Name_Find;
Canonical_Case_File_Name (Extended_Body_Name);
Name_Len := Extended_Body_Name'Length;
Name_Buffer (1 .. Name_Len) := Extended_Body_Name;
The_Body_Name := Name_Find;
end;
else
Name_Len := Name'Length;
Name_Buffer (1 .. Name_Len) := Name;
Canonical_Case_File_Name (Name_Buffer);
The_Spec_Name := Name_Find;
The_Body_Name := The_Spec_Name;
end if;
if Current_Verbosity = High then
Write_Str ("Looking for file name of """);
Write_Str (Name);
Write_Char ('"');
Write_Eol;
Write_Str (" Extended Spec Name = """);
Write_Str (Get_Name_String (The_Spec_Name));
Write_Char ('"');
Write_Eol;
Write_Str (" Extended Body Name = """);
Write_Str (Get_Name_String (The_Body_Name));
Write_Char ('"');
Write_Eol;
end if;
-- For extending project, search in the extended project if the source
-- is not found. For non extending projects, this loop will be run only
-- once.
loop
-- Loop through units
Unit := Units_Htable.Get_First (In_Tree.Units_HT);
while Unit /= null loop
-- Check for body
if not Main_Project_Only
or else
(Unit.File_Names (Impl) /= null
and then Unit.File_Names (Impl).Project = The_Project)
then
declare
Current_Name : File_Name_Type;
begin
-- Case of a body present
if Unit.File_Names (Impl) /= null then
Current_Name := Unit.File_Names (Impl).File;
if Current_Verbosity = High then
Write_Str (" Comparing with """);
Write_Str (Get_Name_String (Current_Name));
Write_Char ('"');
Write_Eol;
end if;
-- If it has the name of the original name, return the
-- original name.
if Unit.Name = The_Original_Name
or else
Current_Name = File_Name_Type (The_Original_Name)
then
if Current_Verbosity = High then
Write_Line (" OK");
end if;
if Full_Path then
return Get_Name_String
(Unit.File_Names (Impl).Path.Name);
else
return Get_Name_String (Current_Name);
end if;
-- If it has the name of the extended body name,
-- return the extended body name
elsif Current_Name = File_Name_Type (The_Body_Name) then
if Current_Verbosity = High then
Write_Line (" OK");
end if;
if Full_Path then
return Get_Name_String
(Unit.File_Names (Impl).Path.Name);
else
return Get_Name_String (The_Body_Name);
end if;
else
if Current_Verbosity = High then
Write_Line (" not good");
end if;
end if;
end if;
end;
end if;
-- Check for spec
if not Main_Project_Only
or else (Unit.File_Names (Spec) /= null
and then Unit.File_Names (Spec).Project = The_Project)
then
declare
Current_Name : File_Name_Type;
begin
-- Case of spec present
if Unit.File_Names (Spec) /= null then
Current_Name := Unit.File_Names (Spec).File;
if Current_Verbosity = High then
Write_Str (" Comparing with """);
Write_Str (Get_Name_String (Current_Name));
Write_Char ('"');
Write_Eol;
end if;
-- If name same as original name, return original name
if Unit.Name = The_Original_Name
or else
Current_Name = File_Name_Type (The_Original_Name)
then
if Current_Verbosity = High then
Write_Line (" OK");
end if;
if Full_Path then
return Get_Name_String
(Unit.File_Names (Spec).Path.Name);
else
return Get_Name_String (Current_Name);
end if;
-- If it has the same name as the extended spec name,
-- return the extended spec name.
elsif Current_Name = File_Name_Type (The_Spec_Name) then
if Current_Verbosity = High then
Write_Line (" OK");
end if;
if Full_Path then
return Get_Name_String
(Unit.File_Names (Spec).Path.Name);
else
return Get_Name_String (The_Spec_Name);
end if;
else
if Current_Verbosity = High then
Write_Line (" not good");
end if;
end if;
end if;
end;
end if;
Unit := Units_Htable.Get_Next (In_Tree.Units_HT);
end loop;
-- If we are not in an extending project, give up
exit when not Main_Project_Only
or else The_Project.Extends = No_Project;
-- Otherwise, look in the project we are extending
The_Project := The_Project.Extends;
end loop;
-- We don't know this file name, return an empty string
return "";
end File_Name_Of_Library_Unit_Body;
-------------------------
-- For_All_Object_Dirs --
-------------------------
procedure For_All_Object_Dirs
(Project : Project_Id;
Tree : Project_Tree_Ref)
is
procedure For_Project
(Prj : Project_Id;
Tree : Project_Tree_Ref;
Dummy : in out Integer);
-- Get all object directories of Prj
-----------------
-- For_Project --
-----------------
procedure For_Project
(Prj : Project_Id;
Tree : Project_Tree_Ref;
Dummy : in out Integer)
is
pragma Unreferenced (Tree);
begin
-- ??? Set_Ada_Paths has a different behavior for library project
-- files, should we have the same ?
if Prj.Object_Directory /= No_Path_Information then
Get_Name_String (Prj.Object_Directory.Display_Name);
Action (Name_Buffer (1 .. Name_Len));
end if;
end For_Project;
procedure Get_Object_Dirs is
new For_Every_Project_Imported (Integer, For_Project);
Dummy : Integer := 1;
-- Start of processing for For_All_Object_Dirs
begin
Get_Object_Dirs (Project, Tree, Dummy);
end For_All_Object_Dirs;
-------------------------
-- For_All_Source_Dirs --
-------------------------
procedure For_All_Source_Dirs
(Project : Project_Id;
In_Tree : Project_Tree_Ref)
is
procedure For_Project
(Prj : Project_Id;
In_Tree : Project_Tree_Ref;
Dummy : in out Integer);
-- Get all object directories of Prj
-----------------
-- For_Project --
-----------------
procedure For_Project
(Prj : Project_Id;
In_Tree : Project_Tree_Ref;
Dummy : in out Integer)
is
Current : String_List_Id := Prj.Source_Dirs;
The_String : String_Element;
begin
-- If there are Ada sources, call action with the name of every
-- source directory.
if Has_Ada_Sources (Prj) then
while Current /= Nil_String loop
The_String := In_Tree.Shared.String_Elements.Table (Current);
Action (Get_Name_String (The_String.Display_Value));
Current := The_String.Next;
end loop;
end if;
end For_Project;
procedure Get_Source_Dirs is
new For_Every_Project_Imported (Integer, For_Project);
Dummy : Integer := 1;
-- Start of processing for For_All_Source_Dirs
begin
Get_Source_Dirs (Project, In_Tree, Dummy);
end For_All_Source_Dirs;
-------------------
-- Get_Reference --
-------------------
procedure Get_Reference
(Source_File_Name : String;
In_Tree : Project_Tree_Ref;
Project : out Project_Id;
Path : out Path_Name_Type)
is
begin
-- Body below could use some comments ???
if Current_Verbosity > Default then
Write_Str ("Getting Reference_Of (""");
Write_Str (Source_File_Name);
Write_Str (""") ... ");
end if;
declare
Original_Name : String := Source_File_Name;
Unit : Unit_Index;
begin
Canonical_Case_File_Name (Original_Name);
Unit := Units_Htable.Get_First (In_Tree.Units_HT);
while Unit /= null loop
if Unit.File_Names (Spec) /= null
and then not Unit.File_Names (Spec).Locally_Removed
and then Unit.File_Names (Spec).File /= No_File
and then
(Namet.Get_Name_String
(Unit.File_Names (Spec).File) = Original_Name
or else (Unit.File_Names (Spec).Path /= No_Path_Information
and then
Namet.Get_Name_String
(Unit.File_Names (Spec).Path.Name) =
Original_Name))
then
Project :=
Ultimate_Extending_Project_Of
(Unit.File_Names (Spec).Project);
Path := Unit.File_Names (Spec).Path.Display_Name;
if Current_Verbosity > Default then
Write_Str ("Done: Spec.");
Write_Eol;
end if;
return;
elsif Unit.File_Names (Impl) /= null
and then Unit.File_Names (Impl).File /= No_File
and then not Unit.File_Names (Impl).Locally_Removed
and then
(Namet.Get_Name_String
(Unit.File_Names (Impl).File) = Original_Name
or else (Unit.File_Names (Impl).Path /= No_Path_Information
and then Namet.Get_Name_String
(Unit.File_Names (Impl).Path.Name) =
Original_Name))
then
Project :=
Ultimate_Extending_Project_Of
(Unit.File_Names (Impl).Project);
Path := Unit.File_Names (Impl).Path.Display_Name;
if Current_Verbosity > Default then
Write_Str ("Done: Body.");
Write_Eol;
end if;
return;
end if;
Unit := Units_Htable.Get_Next (In_Tree.Units_HT);
end loop;
end;
Project := No_Project;
Path := No_Path;
if Current_Verbosity > Default then
Write_Str ("Cannot be found.");
Write_Eol;
end if;
end Get_Reference;
----------------------
-- Get_Runtime_Path --
----------------------
function Get_Runtime_Path
(Self : Project_Search_Path;
Name : String) return String_Access
is
function Find_Rts_In_Path is
new Prj.Env.Find_Name_In_Path (Check_Filename => Is_Directory);
begin
return Find_Rts_In_Path (Self, Name);
end Get_Runtime_Path;
----------------
-- Initialize --
----------------
procedure Initialize (In_Tree : Project_Tree_Ref) is
begin
In_Tree.Shared.Private_Part.Current_Source_Path_File := No_Path;
In_Tree.Shared.Private_Part.Current_Object_Path_File := No_Path;
end Initialize;
-------------------
-- Print_Sources --
-------------------
-- Could use some comments in this body ???
procedure Print_Sources (In_Tree : Project_Tree_Ref) is
Unit : Unit_Index;
begin
Write_Line ("List of Sources:");
Unit := Units_Htable.Get_First (In_Tree.Units_HT);
while Unit /= No_Unit_Index loop
Write_Str (" ");
Write_Line (Namet.Get_Name_String (Unit.Name));
if Unit.File_Names (Spec).File /= No_File then
if Unit.File_Names (Spec).Project = No_Project then
Write_Line (" No project");
else
Write_Str (" Project: ");
Get_Name_String
(Unit.File_Names (Spec).Project.Path.Name);
Write_Line (Name_Buffer (1 .. Name_Len));
end if;
Write_Str (" spec: ");
Write_Line
(Namet.Get_Name_String
(Unit.File_Names (Spec).File));
end if;
if Unit.File_Names (Impl).File /= No_File then
if Unit.File_Names (Impl).Project = No_Project then
Write_Line (" No project");
else
Write_Str (" Project: ");
Get_Name_String
(Unit.File_Names (Impl).Project.Path.Name);
Write_Line (Name_Buffer (1 .. Name_Len));
end if;
Write_Str (" body: ");
Write_Line
(Namet.Get_Name_String (Unit.File_Names (Impl).File));
end if;
Unit := Units_Htable.Get_Next (In_Tree.Units_HT);
end loop;
Write_Line ("end of List of Sources.");
end Print_Sources;
----------------
-- Project_Of --
----------------
function Project_Of
(Name : String;
Main_Project : Project_Id;
In_Tree : Project_Tree_Ref) return Project_Id
is
Result : Project_Id := No_Project;
Original_Name : String := Name;
Lang : constant Language_Ptr :=
Get_Language_From_Name (Main_Project, "ada");
Unit : Unit_Index;
Current_Name : File_Name_Type;
The_Original_Name : File_Name_Type;
The_Spec_Name : File_Name_Type;
The_Body_Name : File_Name_Type;
begin
-- ??? Same block in File_Name_Of_Library_Unit_Body
Canonical_Case_File_Name (Original_Name);
Name_Len := Original_Name'Length;
Name_Buffer (1 .. Name_Len) := Original_Name;
The_Original_Name := Name_Find;
if Lang /= null then
declare
Naming : Lang_Naming_Data renames Lang.Config.Naming_Data;
Extended_Spec_Name : String :=
Name & Namet.Get_Name_String
(Naming.Spec_Suffix);
Extended_Body_Name : String :=
Name & Namet.Get_Name_String
(Naming.Body_Suffix);
begin
Canonical_Case_File_Name (Extended_Spec_Name);
Name_Len := Extended_Spec_Name'Length;
Name_Buffer (1 .. Name_Len) := Extended_Spec_Name;
The_Spec_Name := Name_Find;
Canonical_Case_File_Name (Extended_Body_Name);
Name_Len := Extended_Body_Name'Length;
Name_Buffer (1 .. Name_Len) := Extended_Body_Name;
The_Body_Name := Name_Find;
end;
else
The_Spec_Name := The_Original_Name;
The_Body_Name := The_Original_Name;
end if;
Unit := Units_Htable.Get_First (In_Tree.Units_HT);
while Unit /= null loop
-- Case of a body present
if Unit.File_Names (Impl) /= null then
Current_Name := Unit.File_Names (Impl).File;
-- If it has the name of the original name or the body name,
-- we have found the project.
if Unit.Name = Name_Id (The_Original_Name)
or else Current_Name = The_Original_Name
or else Current_Name = The_Body_Name
then
Result := Unit.File_Names (Impl).Project;
exit;
end if;
end if;
-- Check for spec
if Unit.File_Names (Spec) /= null then
Current_Name := Unit.File_Names (Spec).File;
-- If name same as the original name, or the spec name, we have
-- found the project.
if Unit.Name = Name_Id (The_Original_Name)
or else Current_Name = The_Original_Name
or else Current_Name = The_Spec_Name
then
Result := Unit.File_Names (Spec).Project;
exit;
end if;
end if;
Unit := Units_Htable.Get_Next (In_Tree.Units_HT);
end loop;
return Ultimate_Extending_Project_Of (Result);
end Project_Of;
-------------------
-- Set_Ada_Paths --
-------------------
procedure Set_Ada_Paths
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Including_Libraries : Boolean;
Include_Path : Boolean := True;
Objects_Path : Boolean := True)
is
Shared : constant Shared_Project_Tree_Data_Access := In_Tree.Shared;
Source_Paths : Source_Path_Table.Instance;
Object_Paths : Object_Path_Table.Instance;
-- List of source or object dirs. Only computed the first time this
-- procedure is called (since Source_FD is then reused)
Source_FD : File_Descriptor := Invalid_FD;
Object_FD : File_Descriptor := Invalid_FD;
-- The temporary files to store the paths. These are only created the
-- first time this procedure is called, and reused from then on.
Process_Source_Dirs : Boolean := False;
Process_Object_Dirs : Boolean := False;
Status : Boolean;
-- For calls to Close
Last : Natural;
Buffer : String_Access := new String (1 .. Buffer_Initial);
Buffer_Last : Natural := 0;
procedure Recursive_Add
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Dummy : in out Boolean);
-- Recursive procedure to add the source/object paths of extended/
-- imported projects.
-------------------
-- Recursive_Add --
-------------------
procedure Recursive_Add
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Dummy : in out Boolean)
is
pragma Unreferenced (In_Tree);
Path : Path_Name_Type;
begin
if Process_Source_Dirs then
-- Add to path all source directories of this project if there are
-- Ada sources.
if Has_Ada_Sources (Project) then
Add_To_Source_Path (Project.Source_Dirs, Shared, Source_Paths);
end if;
end if;
if Process_Object_Dirs then
Path := Get_Object_Directory
(Project,
Including_Libraries => Including_Libraries,
Only_If_Ada => True);
if Path /= No_Path then
Add_To_Object_Path (Path, Object_Paths);
end if;
end if;
end Recursive_Add;
procedure For_All_Projects is
new For_Every_Project_Imported (Boolean, Recursive_Add);
Dummy : Boolean := False;
-- Start of processing for Set_Ada_Paths
begin
-- If it is the first time we call this procedure for this project,
-- compute the source path and/or the object path.
if Include_Path and then Project.Include_Path_File = No_Path then
Source_Path_Table.Init (Source_Paths);
Process_Source_Dirs := True;
Create_New_Path_File (Shared, Source_FD, Project.Include_Path_File);
end if;
-- For the object path, we make a distinction depending on
-- Including_Libraries.
if Objects_Path and Including_Libraries then
if Project.Objects_Path_File_With_Libs = No_Path then
Object_Path_Table.Init (Object_Paths);
Process_Object_Dirs := True;
Create_New_Path_File
(Shared, Object_FD, Project.Objects_Path_File_With_Libs);
end if;
elsif Objects_Path then
if Project.Objects_Path_File_Without_Libs = No_Path then
Object_Path_Table.Init (Object_Paths);
Process_Object_Dirs := True;
Create_New_Path_File
(Shared, Object_FD, Project.Objects_Path_File_Without_Libs);
end if;
end if;
-- If there is something to do, set Seen to False for all projects,
-- then call the recursive procedure Add for Project.
if Process_Source_Dirs or Process_Object_Dirs then
For_All_Projects (Project, In_Tree, Dummy);
end if;
-- Write and close any file that has been created. Source_FD is not set
-- when this subprogram is called a second time or more, since we reuse
-- the previous version of the file.
if Source_FD /= Invalid_FD then
Buffer_Last := 0;
for Index in
Source_Path_Table.First .. Source_Path_Table.Last (Source_Paths)
loop
Get_Name_String (Source_Paths.Table (Index));
Name_Len := Name_Len + 1;
Name_Buffer (Name_Len) := ASCII.LF;
Add_To_Buffer (Name_Buffer (1 .. Name_Len), Buffer, Buffer_Last);
end loop;
Last := Write (Source_FD, Buffer (1)'Address, Buffer_Last);
if Last = Buffer_Last then
Close (Source_FD, Status);
else
Status := False;
end if;
if not Status then
Prj.Com.Fail ("could not write temporary file");
end if;
end if;
if Object_FD /= Invalid_FD then
Buffer_Last := 0;
for Index in
Object_Path_Table.First .. Object_Path_Table.Last (Object_Paths)
loop
Get_Name_String (Object_Paths.Table (Index));
Name_Len := Name_Len + 1;
Name_Buffer (Name_Len) := ASCII.LF;
Add_To_Buffer (Name_Buffer (1 .. Name_Len), Buffer, Buffer_Last);
end loop;
Last := Write (Object_FD, Buffer (1)'Address, Buffer_Last);
if Last = Buffer_Last then
Close (Object_FD, Status);
else
Status := False;
end if;
if not Status then
Prj.Com.Fail ("could not write temporary file");
end if;
end if;
-- Set the env vars, if they need to be changed, and set the
-- corresponding flags.
if Include_Path
and then
Shared.Private_Part.Current_Source_Path_File /=
Project.Include_Path_File
then
Shared.Private_Part.Current_Source_Path_File :=
Project.Include_Path_File;
Set_Path_File_Var
(Project_Include_Path_File,
Get_Name_String (Shared.Private_Part.Current_Source_Path_File));
end if;
if Objects_Path then
if Including_Libraries then
if Shared.Private_Part.Current_Object_Path_File /=
Project.Objects_Path_File_With_Libs
then
Shared.Private_Part.Current_Object_Path_File :=
Project.Objects_Path_File_With_Libs;
Set_Path_File_Var
(Project_Objects_Path_File,
Get_Name_String
(Shared.Private_Part.Current_Object_Path_File));
end if;
else
if Shared.Private_Part.Current_Object_Path_File /=
Project.Objects_Path_File_Without_Libs
then
Shared.Private_Part.Current_Object_Path_File :=
Project.Objects_Path_File_Without_Libs;
Set_Path_File_Var
(Project_Objects_Path_File,
Get_Name_String
(Shared.Private_Part.Current_Object_Path_File));
end if;
end if;
end if;
Free (Buffer);
end Set_Ada_Paths;
---------------------
-- Add_Directories --
---------------------
procedure Add_Directories
(Self : in out Project_Search_Path;
Path : String;
Prepend : Boolean := False)
is
Tmp : String_Access;
begin
if Self.Path = null then
Self.Path := new String'(Uninitialized_Prefix & Path);
else
Tmp := Self.Path;
if Prepend then
Self.Path := new String'(Path & Path_Separator & Tmp.all);
else
Self.Path := new String'(Tmp.all & Path_Separator & Path);
end if;
Free (Tmp);
end if;
if Current_Verbosity = High then
Debug_Output ("Adding directories to Project_Path: """
& Path & '"');
end if;
end Add_Directories;
--------------------
-- Is_Initialized --
--------------------
function Is_Initialized (Self : Project_Search_Path) return Boolean is
begin
return Self.Path /= null
and then (Self.Path'Length = 0
or else Self.Path (Self.Path'First) /= '#');
end Is_Initialized;
----------------------
-- Initialize_Empty --
----------------------
procedure Initialize_Empty (Self : in out Project_Search_Path) is
begin
Free (Self.Path);
Self.Path := new String'("");
end Initialize_Empty;
-------------------------------------
-- Initialize_Default_Project_Path --
-------------------------------------
procedure Initialize_Default_Project_Path
(Self : in out Project_Search_Path;
Target_Name : String;
Runtime_Name : String := "")
is
Add_Default_Dir : Boolean := Target_Name /= "-";
First : Positive;
Last : Positive;
Ada_Project_Path : constant String := "ADA_PROJECT_PATH";
Gpr_Project_Path : constant String := "GPR_PROJECT_PATH";
Gpr_Project_Path_File : constant String := "GPR_PROJECT_PATH_FILE";
-- Names of alternate env. variable that contain path name(s) of
-- directories where project files may reside. They are taken into
-- account in this order: GPR_PROJECT_PATH_FILE, GPR_PROJECT_PATH,
-- ADA_PROJECT_PATH.
Gpr_Prj_Path_File : String_Access;
Gpr_Prj_Path : String_Access;
Ada_Prj_Path : String_Access;
-- The path name(s) of directories where project files may reside.
-- May be empty.
Prefix : String_Ptr;
Runtime : String_Ptr;
procedure Add_Target;
-- Add :<prefix>/<target> to the project path
----------------
-- Add_Target --
----------------
procedure Add_Target is
begin
Add_Str_To_Name_Buffer
(Path_Separator & Prefix.all & Target_Name);
-- Note: Target_Name has a trailing / when it comes from Sdefault
if Name_Buffer (Name_Len) /= '/' then
Add_Char_To_Name_Buffer (Directory_Separator);
end if;
end Add_Target;
-- Start of processing for Initialize_Default_Project_Path
begin
if Is_Initialized (Self) then
return;
end if;
-- The current directory is always first in the search path. Since the
-- Project_Path currently starts with '#:' as a sign that it isn't
-- initialized, we simply replace '#' with '.'
if Self.Path = null then
Self.Path := new String'('.' & Path_Separator);
else
Self.Path (Self.Path'First) := '.';
end if;
-- Then the reset of the project path (if any) currently contains the
-- directories added through Add_Search_Project_Directory
-- If environment variables are defined and not empty, add their content
Gpr_Prj_Path_File := Getenv (Gpr_Project_Path_File);
Gpr_Prj_Path := Getenv (Gpr_Project_Path);
Ada_Prj_Path := Getenv (Ada_Project_Path);
if Gpr_Prj_Path_File.all /= "" then
declare
File : Ada.Text_IO.File_Type;
Line : String (1 .. 10_000);
Last : Natural;
Tmp : String_Access;
begin
Open (File, In_File, Gpr_Prj_Path_File.all);
while not End_Of_File (File) loop
Get_Line (File, Line, Last);
if Last /= 0
and then (Last = 1 or else Line (1 .. 2) /= "--")
then
Tmp := Self.Path;
Self.Path :=
new String'
(Tmp.all & Path_Separator & Line (1 .. Last));
Free (Tmp);
end if;
if Current_Verbosity = High then
Debug_Output ("Adding directory to Project_Path: """
& Line (1 .. Last) & '"');
end if;
end loop;
Close (File);
exception
when others =>
Write_Str ("warning: could not read project path file """);
Write_Str (Gpr_Prj_Path_File.all);
Write_Line ("""");
end;
end if;
if Gpr_Prj_Path.all /= "" then
Add_Directories (Self, Gpr_Prj_Path.all);
end if;
Free (Gpr_Prj_Path);
if Ada_Prj_Path.all /= "" then
Add_Directories (Self, Ada_Prj_Path.all);
end if;
Free (Ada_Prj_Path);
-- Copy to Name_Buffer, since we will need to manipulate the path
Name_Len := Self.Path'Length;
Name_Buffer (1 .. Name_Len) := Self.Path.all;
-- Scan the directory path to see if "-" is one of the directories.
-- Remove each occurrence of "-" and set Add_Default_Dir to False.
-- Also resolve relative paths and symbolic links.
First := 3;
loop
while First <= Name_Len
and then (Name_Buffer (First) = Path_Separator)
loop
First := First + 1;
end loop;
exit when First > Name_Len;
Last := First;
while Last < Name_Len
and then Name_Buffer (Last + 1) /= Path_Separator
loop
Last := Last + 1;
end loop;
-- If the directory is "-", set Add_Default_Dir to False and
-- remove from path.
if Name_Buffer (First .. Last) = No_Project_Default_Dir then
Add_Default_Dir := False;
for J in Last + 1 .. Name_Len loop
Name_Buffer (J - No_Project_Default_Dir'Length - 1) :=
Name_Buffer (J);
end loop;
Name_Len := Name_Len - No_Project_Default_Dir'Length - 1;
-- After removing the '-', go back one character to get the next
-- directory correctly.
Last := Last - 1;
else
declare
New_Dir : constant String :=
Normalize_Pathname
(Name_Buffer (First .. Last),
Resolve_Links => Opt.Follow_Links_For_Dirs);
New_Len : Positive;
New_Last : Positive;
begin
-- If the absolute path was resolved and is different from
-- the original, replace original with the resolved path.
if New_Dir /= Name_Buffer (First .. Last)
and then New_Dir'Length /= 0
then
New_Len := Name_Len + New_Dir'Length - (Last - First + 1);
New_Last := First + New_Dir'Length - 1;
Name_Buffer (New_Last + 1 .. New_Len) :=
Name_Buffer (Last + 1 .. Name_Len);
Name_Buffer (First .. New_Last) := New_Dir;
Name_Len := New_Len;
Last := New_Last;
end if;
end;
end if;
First := Last + 1;
end loop;
Free (Self.Path);
-- Set the initial value of Current_Project_Path
if Add_Default_Dir then
if Sdefault.Search_Dir_Prefix = null then
-- gprbuild case
Prefix := new String'(Executable_Prefix_Path);
else
Prefix := new String'(Sdefault.Search_Dir_Prefix.all
& ".." & Dir_Separator
& ".." & Dir_Separator
& ".." & Dir_Separator
& ".." & Dir_Separator);
end if;
if Prefix.all /= "" then
if Target_Name /= "" then
if Runtime_Name /= "" then
if Base_Name (Runtime_Name) = Runtime_Name then
-- $prefix/$target/$runtime/lib/gnat
Add_Target;
Add_Str_To_Name_Buffer
(Runtime_Name & Directory_Separator &
"lib" & Directory_Separator & "gnat");
-- $prefix/$target/$runtime/share/gpr
Add_Target;
Add_Str_To_Name_Buffer
(Runtime_Name & Directory_Separator &
"share" & Directory_Separator & "gpr");
else
Runtime :=
new String'(Normalize_Pathname (Runtime_Name));
-- $runtime_dir/lib/gnat
Add_Str_To_Name_Buffer
(Path_Separator & Runtime.all & Directory_Separator &
"lib" & Directory_Separator & "gnat");
-- $runtime_dir/share/gpr
Add_Str_To_Name_Buffer
(Path_Separator & Runtime.all & Directory_Separator &
"share" & Directory_Separator & "gpr");
end if;
end if;
-- $prefix/$target/lib/gnat
Add_Target;
Add_Str_To_Name_Buffer
("lib" & Directory_Separator & "gnat");
-- $prefix/$target/share/gpr
Add_Target;
Add_Str_To_Name_Buffer
("share" & Directory_Separator & "gpr");
end if;
-- $prefix/share/gpr
Add_Str_To_Name_Buffer
(Path_Separator & Prefix.all & "share"
& Directory_Separator & "gpr");
-- $prefix/lib/gnat
Add_Str_To_Name_Buffer
(Path_Separator & Prefix.all & "lib"
& Directory_Separator & "gnat");
end if;
Free (Prefix);
end if;
Self.Path := new String'(Name_Buffer (1 .. Name_Len));
end Initialize_Default_Project_Path;
--------------
-- Get_Path --
--------------
procedure Get_Path (Self : Project_Search_Path; Path : out String_Access) is
begin
pragma Assert (Is_Initialized (Self));
Path := Self.Path;
end Get_Path;
--------------
-- Set_Path --
--------------
procedure Set_Path (Self : in out Project_Search_Path; Path : String) is
begin
Free (Self.Path);
Self.Path := new String'(Path);
Projects_Paths.Reset (Self.Cache);
end Set_Path;
-----------------------
-- Find_Name_In_Path --
-----------------------
function Find_Name_In_Path
(Self : Project_Search_Path;
Path : String) return String_Access
is
First : Natural;
Last : Natural;
begin
if Current_Verbosity = High then
Debug_Output ("Trying " & Path);
end if;
if Is_Absolute_Path (Path) then
if Check_Filename (Path) then
return new String'(Path);
else
return null;
end if;
else
-- Because we don't want to resolve symbolic links, we cannot use
-- Locate_Regular_File. So, we try each possible path successively.
First := Self.Path'First;
while First <= Self.Path'Last loop
while First <= Self.Path'Last
and then Self.Path (First) = Path_Separator
loop
First := First + 1;
end loop;
exit when First > Self.Path'Last;
Last := First;
while Last < Self.Path'Last
and then Self.Path (Last + 1) /= Path_Separator
loop
Last := Last + 1;
end loop;
Name_Len := 0;
if not Is_Absolute_Path (Self.Path (First .. Last)) then
Add_Str_To_Name_Buffer (Get_Current_Dir); -- ??? System call
Add_Char_To_Name_Buffer (Directory_Separator);
end if;
Add_Str_To_Name_Buffer (Self.Path (First .. Last));
Add_Char_To_Name_Buffer (Directory_Separator);
Add_Str_To_Name_Buffer (Path);
if Current_Verbosity = High then
Debug_Output ("Testing file " & Name_Buffer (1 .. Name_Len));
end if;
if Check_Filename (Name_Buffer (1 .. Name_Len)) then
return new String'(Name_Buffer (1 .. Name_Len));
end if;
First := Last + 1;
end loop;
end if;
return null;
end Find_Name_In_Path;
------------------
-- Find_Project --
------------------
procedure Find_Project
(Self : in out Project_Search_Path;
Project_File_Name : String;
Directory : String;
Path : out Namet.Path_Name_Type)
is
Result : String_Access;
Has_Dot : Boolean := False;
Key : Name_Id;
File : constant String := Project_File_Name;
-- Have to do a copy, in case the parameter is Name_Buffer, which we
-- modify below.
Cached_Path : Namet.Path_Name_Type;
-- This should be commented rather than making us guess from the name???
function Try_Path_Name is new
Find_Name_In_Path (Check_Filename => Is_Regular_File);
-- Find a file in the project search path
-- Start of processing for Find_Project
begin
pragma Assert (Is_Initialized (Self));
if Current_Verbosity = High then
Debug_Increase_Indent
("Searching for project """ & File & """ in """
& Directory & '"');
end if;
-- Check the project cache
Name_Len := File'Length;
Name_Buffer (1 .. Name_Len) := File;
Key := Name_Find;
Cached_Path := Projects_Paths.Get (Self.Cache, Key);
-- Check if File contains an extension (a dot before a
-- directory separator). If it is the case we do not try project file
-- with an added extension as it is not possible to have multiple dots
-- on a project file name.
Check_Dot : for K in reverse File'Range loop
if File (K) = '.' then
Has_Dot := True;
exit Check_Dot;
end if;
exit Check_Dot when Is_Directory_Separator (File (K));
end loop Check_Dot;
if not Is_Absolute_Path (File) then
-- If we have found project in the cache, check if in the directory
if Cached_Path /= No_Path then
declare
Cached : constant String := Get_Name_String (Cached_Path);
begin
if (not Has_Dot
and then Cached =
GNAT.OS_Lib.Normalize_Pathname
(File & Project_File_Extension,
Directory => Directory,
Resolve_Links => Opt.Follow_Links_For_Files,
Case_Sensitive => True))
or else
Cached =
GNAT.OS_Lib.Normalize_Pathname
(File,
Directory => Directory,
Resolve_Links => Opt.Follow_Links_For_Files,
Case_Sensitive => True)
then
Path := Cached_Path;
Debug_Decrease_Indent;
return;
end if;
end;
end if;
-- First we try <directory>/<file_name>.<extension>
if not Has_Dot then
Result :=
Try_Path_Name
(Self,
Directory & Directory_Separator
& File & Project_File_Extension);
end if;
-- Then we try <directory>/<file_name>
if Result = null then
Result :=
Try_Path_Name (Self, Directory & Directory_Separator & File);
end if;
end if;
-- If we found the path in the cache, this is the one
if Result = null and then Cached_Path /= No_Path then
Path := Cached_Path;
Debug_Decrease_Indent;
return;
end if;
-- Then we try <file_name>.<extension>
if Result = null and then not Has_Dot then
Result := Try_Path_Name (Self, File & Project_File_Extension);
end if;
-- Then we try <file_name>
if Result = null then
Result := Try_Path_Name (Self, File);
end if;
-- If we cannot find the project file, we return an empty string
if Result = null then
Path := Namet.No_Path;
return;
else
declare
Final_Result : constant String :=
GNAT.OS_Lib.Normalize_Pathname
(Result.all,
Directory => Directory,
Resolve_Links => Opt.Follow_Links_For_Files,
Case_Sensitive => True);
begin
Free (Result);
Name_Len := Final_Result'Length;
Name_Buffer (1 .. Name_Len) := Final_Result;
Path := Name_Find;
Projects_Paths.Set (Self.Cache, Key, Path);
end;
end if;
Debug_Decrease_Indent;
end Find_Project;
----------
-- Free --
----------
procedure Free (Self : in out Project_Search_Path) is
begin
Free (Self.Path);
Projects_Paths.Reset (Self.Cache);
end Free;
----------
-- Copy --
----------
procedure Copy (From : Project_Search_Path; To : out Project_Search_Path) is
begin
Free (To);
if From.Path /= null then
To.Path := new String'(From.Path.all);
end if;
-- No need to copy the Cache, it will be recomputed as needed
end Copy;
end Prj.Env;
| 31.35679 | 79 | 0.527055 |
dca8686d2e01d4b19ca062dba6480ed6d0639e8b | 12,942 | adb | Ada | tools/uaflex/symbols.adb | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | 4 | 2016-02-05T15:51:56.000Z | 2022-03-25T20:38:32.000Z | tools/uaflex/symbols.adb | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | null | null | null | tools/uaflex/symbols.adb | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- G E L A A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of this file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
with Ada.Unchecked_Deallocation;
with Ada.Strings.Unbounded;
package body Symbols is
function Min (Left, Right : Symbol) return Symbol
renames Symbol'Min;
function Max (Left, Right : Symbol) return Symbol
renames Symbol'Max;
---------
-- "*" --
---------
function "*" (Left, Right : Symbol_Set) return Boolean is
L : Symbol_Ranges renames Left.Node.Ranges;
R : Symbol_Ranges renames Right.Node.Ranges;
begin
if L'Length > R'Length then
return Right * Left;
elsif L'Length = 0 then
return False;
end if;
declare
L_Wide : constant Symbol_Range :=
(L (L'First).Lower, L (L'Last).Upper);
R_Wide : constant Symbol_Range :=
(R (R'First).Lower, R (R'Last).Upper);
begin
if not (L_Wide * R_Wide) then
return False;
end if;
end;
for I in L'Range loop
declare
F : Positive := R'First;
T : Natural := R'Last;
J : Natural;
begin
while F <= T loop
J := (F + T) / 2;
if R (J).Lower > L (I).Upper then
T := J - 1;
elsif R (J).Upper < L (I).Lower then
F := J + 1;
else
return True;
end if;
end loop;
end;
end loop;
return False;
end "*";
---------
-- "*" --
---------
function "*" (Left, Right : Symbol_Range) return Boolean is
begin
if Left.Upper < Right.Lower or Left.Lower > Right.Upper then
return False; -- no intersect
else
return True; -- intersect
end if;
end "*";
----------
-- "or" --
----------
function "or" (Left, Right : Symbol_Range) return Symbol_Range is
begin
return (Min (Left.Lower, Right.Lower), Max (Left.Upper, Right.Upper));
end "or";
-----------
-- "and" --
-----------
function "and" (Left, Right : Symbol_Range) return Symbol_Range is
begin
return (Max (Left.Lower, Right.Lower), Min (Left.Upper, Right.Upper));
end "and";
---------
-- "-" --
---------
function "-" (Left, Right : Symbol_Set) return Symbol_Set is
L : Symbol_Ranges renames Left.Node.Ranges;
R : Symbol_Ranges renames Right.Node.Ranges;
Max_Len : constant Natural := L'Length + 2 * R'Length;
Result : Symbol_Ranges (1 .. Max_Len);
Last : Natural := 0;
Index : Positive;
Start : Symbol;
procedure New_Range (Lower, Upper : Symbol) is
begin
if Lower <= Upper then
Last := Last + 1;
Result (Last) := (Lower, Upper);
end if;
end New_Range;
begin
for I in L'Range loop
Start := L (I).Lower;
-- Binary search max Index of range less then Start
declare
F : Positive := R'First;
T : Natural := R'Last;
J : Natural;
begin
while F <= T loop
J := (F + T) / 2;
if R (J).Lower > Start then
T := J - 1;
elsif R (J).Upper < Start then
F := J + 1;
else
T := J;
exit;
end if;
end loop;
Index := Positive'Max (T, R'First);
end;
-- End of binary search
while Index in R'Range and then R (Index).Lower <= L (I).Upper loop
if R (Index) * L (I) then
if R (Index).Lower /= 0 then
New_Range (Start, R (Index).Lower - 1);
end if;
Start := R (Index).Upper + 1;
end if;
Index := Index + 1;
end loop;
if Start /= 0 then
New_Range (Start, L (I).Upper);
end if;
end loop;
return (F.Controlled with new Set_Node'(Last, 1, Result (1 .. Last)));
end "-";
-----------
-- "and" --
-----------
function "and" (Left, Right : Symbol_Set) return Symbol_Set is
L : Symbol_Ranges renames Left.Node.Ranges;
R : Symbol_Ranges renames Right.Node.Ranges;
Max_Len : constant Natural := L'Length + R'Length; -- actual Max (R,L)
Result : Symbol_Ranges (1 .. Max_Len);
Last : Natural := 0;
begin
for I in L'Range loop
for J in R'Range loop
if R (J) * L (I) then
Last := Last + 1;
Result (Last) := R (J) and L (I);
end if;
end loop;
end loop;
return (F.Controlled with new Set_Node'(Last, 1, Result (1 .. Last)));
end "and";
----------
-- "or" --
----------
function "or" (Left, Right : Symbol_Set) return Symbol_Set is
L : Symbol_Ranges renames Left.Node.Ranges;
R : Symbol_Ranges renames Right.Node.Ranges;
Max_Len : constant Natural := L'Length + R'Length;
Result : Symbol_Ranges (1 .. Max_Len);
Last : Positive := 1;
I, J : Positive := 1;
procedure New_Range (R : Symbol_Range) is
begin
if Result (Last) * R then
Result (Last) := Result (Last) or R;
else
Last := Last + 1;
Result (Last) := R;
end if;
end New_Range;
begin
if L'Length = 0 then
return Right;
elsif R'Length = 0 then
return Left;
end if;
Result (Last) := (Min (R (J).Lower, L (I).Lower),
Min (R (J).Lower, L (I).Lower));
while I in L'Range or J in R'Range loop
if I in L'Range then
if J in R'Range then
if R (J).Lower < L (I).Lower then
New_Range (R (J));
J := J + 1;
else
New_Range (L (I));
I := I + 1;
end if;
else
New_Range (L (I));
I := I + 1;
end if;
else
New_Range (R (J));
J := J + 1;
end if;
end loop;
return (F.Controlled with new Set_Node'(Last, 1, Result (1 .. Last)));
end "or";
------------
-- Adjust --
------------
procedure Adjust (Object : in out Symbol_Set) is
begin
if Object.Node /= null then
Object.Node.Count := Object.Node.Count + 1;
end if;
end Adjust;
--------------------------
-- Distinct_Symbol_Sets --
--------------------------
function Distinct_Symbol_Sets
(Next : in Symbol_Set_Array) return Symbol_Set_Array is
begin
for I in Next'Range loop
for J in I + 1 .. Next'Last loop
if not Is_Empty (Next (I))
and then not Is_Empty (Next (J))
and then Next (I) * Next (J)
then
declare
A : constant Symbol_Set := Next (I) - Next (J);
B : constant Symbol_Set := Next (J) - Next (I);
C : constant Symbol_Set := Next (J) and Next (I);
Index: Natural := 1;
Sets : Symbol_Set_Array (1 .. Next'Length + 1);
procedure Append (S : Symbol_Set_Array) is
begin
Sets (Index .. Index + S'Length - 1) := S;
Index := Index + S'Length;
end Append;
begin
Append (Next (Next'First .. I - 1));
if not Is_Empty (A) then
Append ((1 => A));
end if;
Append (Next (I + 1 .. J - 1));
if not Is_Empty (B) then
Append ((1 => B));
end if;
Append (Next (J + 1 .. Next'Last));
Append ((1 => C));
Index := Index - 1;
return Distinct_Symbol_Sets (Sets (1 .. Index));
end;
end if;
end loop;
end loop;
return Next;
end Distinct_Symbol_Sets;
--------------
-- Finalize --
--------------
procedure Finalize (Object : in out Symbol_Set) is
procedure Free is
new Ada.Unchecked_Deallocation (Set_Node, Node_Access);
begin
if Object.Node /= null then
Object.Node.Count := Object.Node.Count - 1;
if Object.Node.Count = 0 then
Free (Object.Node);
end if;
end if;
end Finalize;
--------------
-- Is_Empty --
--------------
function Is_Empty (Left : Symbol_Set) return Boolean is
begin
return Left.Node.Length = 0;
end Is_Empty;
--------------
-- Is_Equal --
--------------
function Is_Equal (Left, Right : Symbol_Set) return Boolean is
begin
return Left.Node.Ranges = Right.Node.Ranges;
end Is_Equal;
-----------------
-- Range_Image --
-----------------
function Range_Image
(Left : Symbol_Set;
Indent : String) return String
is
use Ada.Strings.Unbounded;
L : Symbol_Ranges renames Left.Node.Ranges;
NL : constant Character := ASCII.LF;
Result : Unbounded_String;
begin
Result := Indent & To_Unbounded_String ("when ");
for I in L'Range loop
if I /= L'First then
Result := Result & NL & Indent & " | ";
end if;
if L (I).Lower = L (I).Upper then
Result := Result & Symbol'Image (L (I).Lower);
else
Result := Result
& Symbol'Image (L (I).Lower) & " .."
& Symbol'Image (L (I).Upper);
end if;
end loop;
return To_String (Result);
end Range_Image;
--------------
-- To_Range --
--------------
function To_Range (Single : Symbol) return Symbol_Set is
begin
return (F.Controlled with new Set_Node'(1, 1, (1 => (Single, Single))));
end To_Range;
--------------
-- To_Range --
--------------
function To_Range (Sequence : Symbol_Array) return Symbol_Set is
Result : Symbol_Set;
begin
for I in Sequence'Range loop
Result := Result or To_Range (Sequence (I));
end loop;
return Result;
end To_Range;
--------------
-- To_Range --
--------------
function To_Range (Lower, Upper : Symbol) return Symbol_Set is
begin
return (F.Controlled with new Set_Node'(1, 1, (1 => (Lower, Upper))));
end To_Range;
end Symbols;
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, Maxim Reznik
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of the Maxim Reznik, IE nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
| 29.547945 | 79 | 0.486092 |
0eaff00509d93b4ce874eecb4d73332ce26a52f4 | 5,261 | ads | Ada | source/amf/ocl/amf-ocl-invalid_literal_exps-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/amf/ocl/amf-ocl-invalid_literal_exps-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/amf/ocl/amf-ocl-invalid_literal_exps-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.OCL.Invalid_Literal_Exps.Collections is
pragma Preelaborate;
package OCL_Invalid_Literal_Exp_Collections is
new AMF.Generic_Collections
(OCL_Invalid_Literal_Exp,
OCL_Invalid_Literal_Exp_Access);
type Set_Of_OCL_Invalid_Literal_Exp is
new OCL_Invalid_Literal_Exp_Collections.Set with null record;
Empty_Set_Of_OCL_Invalid_Literal_Exp : constant Set_Of_OCL_Invalid_Literal_Exp;
type Ordered_Set_Of_OCL_Invalid_Literal_Exp is
new OCL_Invalid_Literal_Exp_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_OCL_Invalid_Literal_Exp : constant Ordered_Set_Of_OCL_Invalid_Literal_Exp;
type Bag_Of_OCL_Invalid_Literal_Exp is
new OCL_Invalid_Literal_Exp_Collections.Bag with null record;
Empty_Bag_Of_OCL_Invalid_Literal_Exp : constant Bag_Of_OCL_Invalid_Literal_Exp;
type Sequence_Of_OCL_Invalid_Literal_Exp is
new OCL_Invalid_Literal_Exp_Collections.Sequence with null record;
Empty_Sequence_Of_OCL_Invalid_Literal_Exp : constant Sequence_Of_OCL_Invalid_Literal_Exp;
private
Empty_Set_Of_OCL_Invalid_Literal_Exp : constant Set_Of_OCL_Invalid_Literal_Exp
:= (OCL_Invalid_Literal_Exp_Collections.Set with null record);
Empty_Ordered_Set_Of_OCL_Invalid_Literal_Exp : constant Ordered_Set_Of_OCL_Invalid_Literal_Exp
:= (OCL_Invalid_Literal_Exp_Collections.Ordered_Set with null record);
Empty_Bag_Of_OCL_Invalid_Literal_Exp : constant Bag_Of_OCL_Invalid_Literal_Exp
:= (OCL_Invalid_Literal_Exp_Collections.Bag with null record);
Empty_Sequence_Of_OCL_Invalid_Literal_Exp : constant Sequence_Of_OCL_Invalid_Literal_Exp
:= (OCL_Invalid_Literal_Exp_Collections.Sequence with null record);
end AMF.OCL.Invalid_Literal_Exps.Collections;
| 57.184783 | 98 | 0.540201 |
201a75c94cce6482cd2c734811a4054f7c829a56 | 560 | adb | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/controlled6_pkg-iterators.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/controlled6_pkg-iterators.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/controlled6_pkg-iterators.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | package body Controlled6_Pkg.Iterators is
function Find return Iterator_Type is
Iterator : Iterator_Type;
begin
return Iterator;
end Find;
function Current (Iterator : in Iterator_Type) return T is begin
return Iterator.Current.Item;
end Current;
procedure Find_Next (Iterator : in out Iterator_Type) is begin
Iterator.Current := null;
end Find_Next;
function Is_Null (Iterator : in Iterator_Type) return Boolean is begin
return Iterator.Current = null;
end Is_Null;
end Controlled6_Pkg.Iterators;
| 25.454545 | 73 | 0.725 |
1093d0ab3ff6a9c18596ee1cd5fc5158ae6107c4 | 1,050 | ads | Ada | contrib/gnu/gdb/dist/gdb/testsuite/gdb.ada/array_return/pck.ads | TheSledgeHammer/2.11BSD | fe61f0b9aaa273783cd027c7b5ec77e95ead2153 | [
"BSD-3-Clause"
] | 3 | 2021-05-04T17:09:06.000Z | 2021-10-04T07:19:26.000Z | contrib/gnu/gdb/dist/gdb/testsuite/gdb.ada/array_return/pck.ads | TheSledgeHammer/2.11BSD | fe61f0b9aaa273783cd027c7b5ec77e95ead2153 | [
"BSD-3-Clause"
] | null | null | null | contrib/gnu/gdb/dist/gdb/testsuite/gdb.ada/array_return/pck.ads | TheSledgeHammer/2.11BSD | fe61f0b9aaa273783cd027c7b5ec77e95ead2153 | [
"BSD-3-Clause"
] | null | null | null | -- Copyright 2006-2020 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package Pck is
type Data_Small is array (1 .. 2) of Integer;
type Data_Large is array (1 .. 4) of Integer;
type Small_Float_Vector is array (1 .. 2) of Float;
function Create_Small return Data_Small;
function Create_Large return Data_Large;
function Create_Small_Float_Vector return Small_Float_Vector;
end Pck;
| 36.206897 | 73 | 0.74 |
dcdbeae7ff8eddb63faff3213b3c4f05e3cdb02a | 33 | ads | Ada | tests/src/missing.ads | TNO/Rejuvenation-Ada | 8113ec28da3923ccde40d76cbab70e0e614f4b75 | [
"BSD-3-Clause"
] | null | null | null | tests/src/missing.ads | TNO/Rejuvenation-Ada | 8113ec28da3923ccde40d76cbab70e0e614f4b75 | [
"BSD-3-Clause"
] | null | null | null | tests/src/missing.ads | TNO/Rejuvenation-Ada | 8113ec28da3923ccde40d76cbab70e0e614f4b75 | [
"BSD-3-Clause"
] | null | null | null | package Missing is
end Missing;
| 8.25 | 18 | 0.787879 |
20317fee5e1b131c13fb9b678c26ea51446996cd | 3,621 | adb | Ada | sdk/clients/ada/src/model/-models.adb | databuzzword/ai-api-marketplace | f4cd993c19d52d8ff2613bf073316ec137e3fbd2 | [
"MIT"
] | null | null | null | sdk/clients/ada/src/model/-models.adb | databuzzword/ai-api-marketplace | f4cd993c19d52d8ff2613bf073316ec137e3fbd2 | [
"MIT"
] | null | null | null | sdk/clients/ada/src/model/-models.adb | databuzzword/ai-api-marketplace | f4cd993c19d52d8ff2613bf073316ec137e3fbd2 | [
"MIT"
] | null | null | null | -- FastAPI
-- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
--
-- The version of the OpenAPI document: 0.1.0
--
--
-- NOTE: This package is auto generated by OpenAPI-Generator 4.0.0.
-- https://openapi-generator.tech
-- Do not edit the class manually.
package body .Models is
use Swagger.Streams;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in ValidationErrorType) is
begin
Into.Start_Entity (Name);
Serialize (Into, "loc", Value.Loc);
Into.Write_Entity ("msg", Value.Msg);
Into.Write_Entity ("type", Value.P_Type);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in ValidationErrorType_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out ValidationErrorType) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "loc", Value.Loc);
Swagger.Streams.Deserialize (Object, "msg", Value.Msg);
Swagger.Streams.Deserialize (Object, "type", Value.P_Type);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out ValidationErrorType_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : ValidationErrorType;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in HTTPValidationErrorType) is
begin
Into.Start_Entity (Name);
Serialize (Into, "detail", Value.Detail);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in HTTPValidationErrorType_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out HTTPValidationErrorType) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "detail", Value.Detail);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out HTTPValidationErrorType_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : HTTPValidationErrorType;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
end .Models;
| 31.763158 | 110 | 0.603148 |
df67059b56c78b83bf185d03165f10e2ef1f95bc | 2,294 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c87b04c.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c87b04c.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c87b04c.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- C87B04C.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 OVERLOADING RESOLUTION USES THE RULE THAT:
--
-- IN A RANGE CONSTRAINT OF A SUBTYPE INDICATION, THE EXPRESSIONS
-- FOR THE LOWER AND UPPER BOUNDS MUST BE COMPATIBLE WITH THE SUBTYPE'S
-- EXPLICIT TYPEMARK.
-- TRH 29 JUNE 82
WITH REPORT; USE REPORT;
PROCEDURE C87B04C IS
TYPE DAY IS (MON, TUE, WED, THU, FRI, SAT, SUN);
TYPE ORB IS (SUN, MOON, MARS, EARTH);
TYPE GRADE IS ('A', 'B', 'C', 'D', 'F');
TYPE VOWEL IS ('C', 'E', 'A', 'O', 'I', 'U', 'Y');
BEGIN
TEST ("C87B04C","OVERLOADED EXPRESSIONS IN RANGE CONSTRAINTS" &
" OF ENUMERATION SUBTYPE INDICATIONS");
DECLARE
SUBTYPE PASSING IS GRADE RANGE 'A' .. 'C';
SUBTYPE DISTANT IS ORB RANGE SUN .. MARS;
BEGIN
IF DISTANT'POS (DISTANT'FIRST) /= 0 OR
PASSING'POS (PASSING'FIRST) /= 0 THEN
FAILED ("RESOLUTION INCORRECT FOR OVERLOADED " &
" ENUMERATION LITERALS");
END IF;
END;
RESULT;
END C87B04C;
| 37.606557 | 79 | 0.63252 |
18963d5048cb64cd73c5bc1c772667ac477390b1 | 7,783 | ads | Ada | llvm-gcc-4.2-2.9/gcc/ada/a-cihama.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | 1 | 2016-04-09T02:58:13.000Z | 2016-04-09T02:58:13.000Z | llvm-gcc-4.2-2.9/gcc/ada/a-cihama.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | llvm-gcc-4.2-2.9/gcc/ada/a-cihama.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- 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 _ H A S H E D _ M A P S --
-- --
-- S p e c --
-- --
-- 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.Hash_Tables;
with Ada.Streams;
with Ada.Finalization;
generic
type Key_Type (<>) is private;
type Element_Type (<>) is private;
with function Hash (Key : Key_Type) return Hash_Type;
with function Equivalent_Keys (Left, Right : Key_Type) return Boolean;
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Hashed_Maps is
pragma Preelaborate;
type Map is tagged private;
type Cursor is private;
Empty_Map : constant Map;
No_Element : constant Cursor;
function "=" (Left, Right : Map) return Boolean;
function Capacity (Container : Map) return Count_Type;
procedure Reserve_Capacity
(Container : in out Map;
Capacity : Count_Type);
function Length (Container : Map) return Count_Type;
function Is_Empty (Container : Map) return Boolean;
procedure Clear (Container : in out Map);
function Key (Position : Cursor) return Key_Type;
function Element (Position : Cursor) return Element_Type;
procedure Replace_Element
(Container : in out Map;
Position : Cursor;
New_Item : Element_Type);
procedure Query_Element
(Position : Cursor;
Process : not null access procedure (Key : Key_Type;
Element : Element_Type));
procedure Update_Element
(Container : in out Map;
Position : Cursor;
Process : not null access procedure (Key : Key_Type;
Element : in out Element_Type));
procedure Move (Target : in out Map; Source : in out Map);
procedure Insert
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type;
Position : out Cursor;
Inserted : out Boolean);
procedure Insert
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type);
procedure Include
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type);
procedure Replace
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type);
procedure Exclude (Container : in out Map; Key : Key_Type);
procedure Delete (Container : in out Map; Key : Key_Type);
procedure Delete (Container : in out Map; Position : in out Cursor);
function First (Container : Map) return Cursor;
function Next (Position : Cursor) return Cursor;
procedure Next (Position : in out Cursor);
function Find (Container : Map; Key : Key_Type) return Cursor;
function Contains (Container : Map; Key : Key_Type) return Boolean;
function Element (Container : Map; Key : Key_Type) return Element_Type;
function Has_Element (Position : Cursor) return Boolean;
function Equivalent_Keys (Left, Right : Cursor) return Boolean;
function Equivalent_Keys (Left : Cursor; Right : Key_Type) return Boolean;
function Equivalent_Keys (Left : Key_Type; Right : Cursor) return Boolean;
procedure Iterate
(Container : Map;
Process : not null access procedure (Position : Cursor));
private
pragma Inline ("=");
pragma Inline (Length);
pragma Inline (Is_Empty);
pragma Inline (Clear);
pragma Inline (Key);
pragma Inline (Element);
pragma Inline (Move);
pragma Inline (Contains);
pragma Inline (Capacity);
pragma Inline (Reserve_Capacity);
pragma Inline (Has_Element);
pragma Inline (Equivalent_Keys);
type Node_Type;
type Node_Access is access Node_Type;
type Key_Access is access Key_Type;
type Element_Access is access Element_Type;
type Node_Type is limited record
Key : Key_Access;
Element : Element_Access;
Next : Node_Access;
end record;
package HT_Types is new Hash_Tables.Generic_Hash_Table_Types
(Node_Type,
Node_Access);
type Map is new Ada.Finalization.Controlled with record
HT : HT_Types.Hash_Table_Type;
end record;
use HT_Types;
use Ada.Finalization;
use Ada.Streams;
procedure Adjust (Container : in out Map);
procedure Finalize (Container : in out Map);
type Map_Access is access constant Map;
for Map_Access'Storage_Size use 0;
type Cursor is
record
Container : Map_Access;
Node : Node_Access;
end record;
procedure Write
(Stream : access Root_Stream_Type'Class;
Item : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
Item : out Cursor);
for Cursor'Read use Read;
No_Element : constant Cursor :=
(Container => null,
Node => null);
procedure Write
(Stream : access Root_Stream_Type'Class;
Container : Map);
for Map'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
Container : out Map);
for Map'Read use Read;
Empty_Map : constant Map := (Controlled with HT => (null, 0, 0, 0));
end Ada.Containers.Indefinite_Hashed_Maps;
| 34.135965 | 78 | 0.575614 |
4a3eefce920d1f488dc99d5a7f36ecd08fb24ec9 | 23,350 | ads | Ada | tools-src/gnu/gcc/gcc/ada/5vosinte.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 80 | 2015-01-02T10:14:04.000Z | 2021-06-07T06:29:49.000Z | tools-src/gnu/gcc/gcc/ada/5vosinte.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 9 | 2015-05-14T11:03:12.000Z | 2018-01-04T07:12:58.000Z | tools-src/gnu/gcc/gcc/ada/5vosinte.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 69 | 2015-01-02T10:45:56.000Z | 2021-09-06T07:52:13.000Z | ------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . O S _ I N T E R F A C E --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1991-2001 Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This is a OpenVMS/Alpha version of this package.
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package
-- or remove the pragma Elaborate_Body.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C;
package System.OS_Interface is
pragma Preelaborate;
pragma Linker_Options ("--for-linker=sys$library:pthread$rtl.exe");
-- Link in the DEC threads library.
-- pragma Linker_Options ("--for-linker=/threads_enable");
-- Enable upcalls and multiple kernel threads.
subtype int is Interfaces.C.int;
subtype short is Interfaces.C.short;
subtype long is Interfaces.C.long;
subtype unsigned is Interfaces.C.unsigned;
subtype unsigned_short is Interfaces.C.unsigned_short;
subtype unsigned_long is Interfaces.C.unsigned_long;
subtype unsigned_char is Interfaces.C.unsigned_char;
subtype plain_char is Interfaces.C.plain_char;
subtype size_t is Interfaces.C.size_t;
-----------------------------
-- Signals (Interrupt IDs) --
-----------------------------
-- Type signal has an arbitrary limit of 31
Max_Interrupt : constant := 31;
type Signal is new unsigned range 0 .. Max_Interrupt;
for Signal'Size use unsigned'Size;
type sigset_t is array (Signal) of Boolean;
pragma Pack (sigset_t);
-- Interrupt_Number_Type
-- Unsigned long integer denoting the number of an interrupt
subtype Interrupt_Number_Type is unsigned_long;
-- OpenVMS system services return values of type Cond_Value_Type.
subtype Cond_Value_Type is unsigned_long;
subtype Short_Cond_Value_Type is unsigned_short;
type IO_Status_Block_Type is record
Status : Short_Cond_Value_Type;
Count : unsigned_short;
Dev_Info : unsigned_long;
end record;
type AST_Handler is access procedure (Param : Address);
No_AST_Handler : constant AST_Handler := null;
CMB_M_READONLY : constant := 16#00000001#;
CMB_M_WRITEONLY : constant := 16#00000002#;
AGN_M_READONLY : constant := 16#00000001#;
AGN_M_WRITEONLY : constant := 16#00000002#;
IO_WRITEVBLK : constant := 48; -- WRITE VIRTUAL BLOCK
IO_READVBLK : constant := 49; -- READ VIRTUAL BLOCK
----------------
-- Sys_Assign --
----------------
--
-- Assign I/O Channel
--
-- Status = returned status
-- Devnam = address of device name or logical name string
-- descriptor
-- Chan = address of word to receive channel number assigned
-- Acmode = access mode associated with channel
-- Mbxnam = address of mailbox logical name string descriptor, if
-- mailbox associated with device
-- Flags = optional channel flags longword for specifying options
-- for the $ASSIGN operation
--
procedure Sys_Assign
(Status : out Cond_Value_Type;
Devnam : in String;
Chan : out unsigned_short;
Acmode : in unsigned_short := 0;
Mbxnam : in String := String'Null_Parameter;
Flags : in unsigned_long := 0);
pragma Interface (External, Sys_Assign);
pragma Import_Valued_Procedure
(Sys_Assign, "SYS$ASSIGN",
(Cond_Value_Type, String, unsigned_short,
unsigned_short, String, unsigned_long),
(Value, Descriptor (s), Reference,
Value, Descriptor (s), Value),
Flags);
----------------
-- Sys_Cantim --
----------------
--
-- Cancel Timer
--
-- Status = returned status
-- Reqidt = ID of timer to be cancelled
-- Acmode = Access mode
--
procedure Sys_Cantim
(Status : out Cond_Value_Type;
Reqidt : in Address;
Acmode : in unsigned);
pragma Interface (External, Sys_Cantim);
pragma Import_Valued_Procedure
(Sys_Cantim, "SYS$CANTIM",
(Cond_Value_Type, Address, unsigned),
(Value, Value, Value));
----------------
-- Sys_Crembx --
----------------
--
-- Create mailbox
--
-- Status = returned status
-- Prmflg = permanent flag
-- Chan = channel
-- Maxmsg = maximum message
-- Bufquo = buufer quote
-- Promsk = protection mast
-- Acmode = access mode
-- Lognam = logical name
-- Flags = flags
--
procedure Sys_Crembx
(Status : out Cond_Value_Type;
Prmflg : in Boolean;
Chan : out unsigned_short;
Maxmsg : in unsigned_long := 0;
Bufquo : in unsigned_long := 0;
Promsk : in unsigned_short := 0;
Acmode : in unsigned_short := 0;
Lognam : in String;
Flags : in unsigned_long := 0);
pragma Interface (External, Sys_Crembx);
pragma Import_Valued_Procedure
(Sys_Crembx, "SYS$CREMBX",
(Cond_Value_Type, Boolean, unsigned_short,
unsigned_long, unsigned_long, unsigned_short,
unsigned_short, String, unsigned_long),
(Value, Value, Reference,
Value, Value, Value,
Value, Descriptor (s), Value));
-------------
-- Sys_QIO --
-------------
--
-- Queue I/O
--
-- Status = Returned status of call
-- EFN = event flag to be set when I/O completes
-- Chan = channel
-- Func = function
-- Iosb = I/O status block
-- Astadr = system trap to be generated when I/O completes
-- Astprm = AST parameter
-- P1-6 = optional parameters
procedure Sys_QIO
(Status : out Cond_Value_Type;
EFN : in unsigned_long := 0;
Chan : in unsigned_short;
Func : in unsigned_long := 0;
Iosb : out IO_Status_Block_Type;
Astadr : in AST_Handler := No_AST_Handler;
Astprm : in Address := Null_Address;
P1 : in unsigned_long := 0;
P2 : in unsigned_long := 0;
P3 : in unsigned_long := 0;
P4 : in unsigned_long := 0;
P5 : in unsigned_long := 0;
P6 : in unsigned_long := 0);
procedure Sys_QIO
(Status : out Cond_Value_Type;
EFN : in unsigned_long := 0;
Chan : in unsigned_short;
Func : in unsigned_long := 0;
Iosb : in Address := Null_Address;
Astadr : in AST_Handler := No_AST_Handler;
Astprm : in Address := Null_Address;
P1 : in unsigned_long := 0;
P2 : in unsigned_long := 0;
P3 : in unsigned_long := 0;
P4 : in unsigned_long := 0;
P5 : in unsigned_long := 0;
P6 : in unsigned_long := 0);
pragma Interface (External, Sys_QIO);
pragma Import_Valued_Procedure
(Sys_QIO, "SYS$QIO",
(Cond_Value_Type, unsigned_long, unsigned_short, unsigned_long,
IO_Status_Block_Type, AST_Handler, Address,
unsigned_long, unsigned_long, unsigned_long,
unsigned_long, unsigned_long, unsigned_long),
(Value, Value, Value, Value,
Reference, Value, Value,
Value, Value, Value,
Value, Value, Value));
pragma Import_Valued_Procedure
(Sys_QIO, "SYS$QIO",
(Cond_Value_Type, unsigned_long, unsigned_short, unsigned_long,
Address, AST_Handler, Address,
unsigned_long, unsigned_long, unsigned_long,
unsigned_long, unsigned_long, unsigned_long),
(Value, Value, Value, Value,
Value, Value, Value,
Value, Value, Value,
Value, Value, Value));
----------------
-- Sys_Setimr --
----------------
--
-- Set Timer
--
-- Status = Returned status of call
-- EFN = event flag to be set when timer expires
-- Tim = expiration time
-- AST = system trap to be generated when timer expires
-- Redidt = returned ID of timer (e.g. to cancel timer)
-- Flags = flags
--
procedure Sys_Setimr
(Status : out Cond_Value_Type;
EFN : in unsigned_long;
Tim : in Long_Integer;
AST : in AST_Handler;
Reqidt : in Address;
Flags : in unsigned_long);
pragma Interface (External, Sys_Setimr);
pragma Import_Valued_Procedure
(Sys_Setimr, "SYS$SETIMR",
(Cond_Value_Type, unsigned_long, Long_Integer,
AST_Handler, Address, unsigned_long),
(Value, Value, Reference,
Value, Value, Value));
Interrupt_ID_0 : constant := 0;
Interrupt_ID_1 : constant := 1;
Interrupt_ID_2 : constant := 2;
Interrupt_ID_3 : constant := 3;
Interrupt_ID_4 : constant := 4;
Interrupt_ID_5 : constant := 5;
Interrupt_ID_6 : constant := 6;
Interrupt_ID_7 : constant := 7;
Interrupt_ID_8 : constant := 8;
Interrupt_ID_9 : constant := 9;
Interrupt_ID_10 : constant := 10;
Interrupt_ID_11 : constant := 11;
Interrupt_ID_12 : constant := 12;
Interrupt_ID_13 : constant := 13;
Interrupt_ID_14 : constant := 14;
Interrupt_ID_15 : constant := 15;
Interrupt_ID_16 : constant := 16;
Interrupt_ID_17 : constant := 17;
Interrupt_ID_18 : constant := 18;
Interrupt_ID_19 : constant := 19;
Interrupt_ID_20 : constant := 20;
Interrupt_ID_21 : constant := 21;
Interrupt_ID_22 : constant := 22;
Interrupt_ID_23 : constant := 23;
Interrupt_ID_24 : constant := 24;
Interrupt_ID_25 : constant := 25;
Interrupt_ID_26 : constant := 26;
Interrupt_ID_27 : constant := 27;
Interrupt_ID_28 : constant := 28;
Interrupt_ID_29 : constant := 29;
Interrupt_ID_30 : constant := 30;
Interrupt_ID_31 : constant := 31;
-----------
-- Errno --
-----------
function errno return int;
pragma Import (C, errno, "__get_errno");
EINTR : constant := 4; -- Interrupted system call
EAGAIN : constant := 11; -- No more processes
ENOMEM : constant := 12; -- Not enough core
-------------------------
-- Priority Scheduling --
-------------------------
SCHED_FIFO : constant := 1;
SCHED_RR : constant := 2;
SCHED_OTHER : constant := 3;
SCHED_BG : constant := 4;
SCHED_LFI : constant := 5;
SCHED_LRR : constant := 6;
-------------
-- Process --
-------------
type pid_t is private;
function kill (pid : pid_t; sig : Signal) return int;
pragma Import (C, kill);
function getpid return pid_t;
pragma Import (C, getpid);
-------------
-- Threads --
-------------
type Thread_Body is access
function (arg : System.Address) return System.Address;
type pthread_t is private;
subtype Thread_Id is pthread_t;
type pthread_mutex_t is limited private;
type pthread_cond_t is limited private;
type pthread_attr_t is limited private;
type pthread_mutexattr_t is limited private;
type pthread_condattr_t is limited private;
type pthread_key_t is private;
PTHREAD_CREATE_JOINABLE : constant := 0;
PTHREAD_CREATE_DETACHED : constant := 1;
PTHREAD_CANCEL_DISABLE : constant := 0;
PTHREAD_CANCEL_ENABLE : constant := 1;
PTHREAD_CANCEL_DEFERRED : constant := 0;
PTHREAD_CANCEL_ASYNCHRONOUS : constant := 1;
-- Don't use ERRORCHECK mutexes, they don't work when a thread is not
-- the owner. AST's, at least, unlock others threads mutexes. Even
-- if the error is ignored, they don't work.
PTHREAD_MUTEX_NORMAL_NP : constant := 0;
PTHREAD_MUTEX_RECURSIVE_NP : constant := 1;
PTHREAD_MUTEX_ERRORCHECK_NP : constant := 2;
PTHREAD_INHERIT_SCHED : constant := 0;
PTHREAD_EXPLICIT_SCHED : constant := 1;
function pthread_cancel (thread : pthread_t) return int;
pragma Import (C, pthread_cancel, "PTHREAD_CANCEL");
procedure pthread_testcancel;
pragma Import (C, pthread_testcancel, "PTHREAD_TESTCANCEL");
function pthread_setcancelstate
(newstate : int; oldstate : access int) return int;
pragma Import (C, pthread_setcancelstate, "PTHREAD_SETCANCELSTATE");
function pthread_setcanceltype
(newtype : int; oldtype : access int) return int;
pragma Import (C, pthread_setcanceltype, "PTHREAD_SETCANCELTYPE");
---------------------------
-- POSIX.1c Section 3 --
---------------------------
function pthread_lock_global_np return int;
pragma Import (C, pthread_lock_global_np, "PTHREAD_LOCK_GLOBAL_NP");
function pthread_unlock_global_np return int;
pragma Import (C, pthread_unlock_global_np, "PTHREAD_UNLOCK_GLOBAL_NP");
----------------------------
-- POSIX.1c Section 11 --
----------------------------
function pthread_mutexattr_init
(attr : access pthread_mutexattr_t) return int;
pragma Import (C, pthread_mutexattr_init, "PTHREAD_MUTEXATTR_INIT");
function pthread_mutexattr_destroy
(attr : access pthread_mutexattr_t) return int;
pragma Import (C, pthread_mutexattr_destroy, "PTHREAD_MUTEXATTR_DESTROY");
function pthread_mutexattr_settype_np
(attr : access pthread_mutexattr_t;
mutextype : int) return int;
pragma Import (C, pthread_mutexattr_settype_np,
"PTHREAD_MUTEXATTR_SETTYPE_NP");
function pthread_mutex_init
(mutex : access pthread_mutex_t;
attr : access pthread_mutexattr_t) return int;
pragma Import (C, pthread_mutex_init, "PTHREAD_MUTEX_INIT");
function pthread_mutex_destroy (mutex : access pthread_mutex_t) return int;
pragma Import (C, pthread_mutex_destroy, "PTHREAD_MUTEX_DESTROY");
function pthread_mutex_lock (mutex : access pthread_mutex_t) return int;
pragma Import (C, pthread_mutex_lock, "PTHREAD_MUTEX_LOCK");
function pthread_mutex_unlock (mutex : access pthread_mutex_t) return int;
pragma Import (C, pthread_mutex_unlock, "PTHREAD_MUTEX_UNLOCK");
function pthread_condattr_init
(attr : access pthread_condattr_t) return int;
pragma Import (C, pthread_condattr_init, "PTHREAD_CONDATTR_INIT");
function pthread_condattr_destroy
(attr : access pthread_condattr_t) return int;
pragma Import (C, pthread_condattr_destroy, "PTHREAD_CONDATTR_DESTROY");
function pthread_cond_init
(cond : access pthread_cond_t;
attr : access pthread_condattr_t) return int;
pragma Import (C, pthread_cond_init, "PTHREAD_COND_INIT");
function pthread_cond_destroy (cond : access pthread_cond_t) return int;
pragma Import (C, pthread_cond_destroy, "PTHREAD_COND_DESTROY");
function pthread_cond_signal (cond : access pthread_cond_t) return int;
pragma Import (C, pthread_cond_signal, "PTHREAD_COND_SIGNAL");
function pthread_cond_signal_int_np
(cond : access pthread_cond_t) return int;
pragma Import (C, pthread_cond_signal_int_np,
"PTHREAD_COND_SIGNAL_INT_NP");
function pthread_cond_wait
(cond : access pthread_cond_t;
mutex : access pthread_mutex_t) return int;
pragma Import (C, pthread_cond_wait, "PTHREAD_COND_WAIT");
--------------------------
-- POSIX.1c Section 13 --
--------------------------
function pthread_mutexattr_setprotocol
(attr : access pthread_mutexattr_t; protocol : int) return int;
pragma Import (C, pthread_mutexattr_setprotocol,
"PTHREAD_MUTEXATTR_SETPROTOCOL");
type struct_sched_param is record
sched_priority : int; -- scheduling priority
end record;
for struct_sched_param'Size use 8*4;
pragma Convention (C, struct_sched_param);
function pthread_setschedparam
(thread : pthread_t;
policy : int;
param : access struct_sched_param) return int;
pragma Import (C, pthread_setschedparam, "PTHREAD_SETSCHEDPARAM");
function pthread_attr_setscope
(attr : access pthread_attr_t;
contentionscope : int) return int;
pragma Import (C, pthread_attr_setscope, "PTHREAD_ATTR_SETSCOPE");
function pthread_attr_setinheritsched
(attr : access pthread_attr_t;
inheritsched : int) return int;
pragma Import (C, pthread_attr_setinheritsched,
"PTHREAD_ATTR_SETINHERITSCHED");
function pthread_attr_setschedpolicy
(attr : access pthread_attr_t; policy : int) return int;
pragma Import (C, pthread_attr_setschedpolicy,
"PTHREAD_ATTR_SETSCHEDPOLICY");
function pthread_attr_setschedparam
(attr : access pthread_attr_t;
sched_param : int) return int;
pragma Import (C, pthread_attr_setschedparam, "PTHREAD_ATTR_SETSCHEDPARAM");
function sched_yield return int;
-----------------------------
-- P1003.1c - Section 16 --
-----------------------------
function pthread_attr_init (attributes : access pthread_attr_t) return int;
pragma Import (C, pthread_attr_init, "PTHREAD_ATTR_INIT");
function pthread_attr_destroy
(attributes : access pthread_attr_t) return int;
pragma Import (C, pthread_attr_destroy, "PTHREAD_ATTR_DESTROY");
function pthread_attr_setdetachstate
(attr : access pthread_attr_t;
detachstate : int) return int;
pragma Import (C, pthread_attr_setdetachstate,
"PTHREAD_ATTR_SETDETACHSTATE");
function pthread_attr_setstacksize
(attr : access pthread_attr_t;
stacksize : size_t) return int;
pragma Import (C, pthread_attr_setstacksize, "PTHREAD_ATTR_SETSTACKSIZE");
function pthread_create
(thread : access pthread_t;
attributes : access pthread_attr_t;
start_routine : Thread_Body;
arg : System.Address) return int;
pragma Import (C, pthread_create, "PTHREAD_CREATE");
procedure pthread_exit (status : System.Address);
pragma Import (C, pthread_exit, "PTHREAD_EXIT");
function pthread_self return pthread_t;
pragma Import (C, pthread_self, "PTHREAD_SELF");
--------------------------
-- POSIX.1c Section 17 --
--------------------------
function pthread_setspecific
(key : pthread_key_t;
value : System.Address) return int;
pragma Import (C, pthread_setspecific, "PTHREAD_SETSPECIFIC");
function pthread_getspecific (key : pthread_key_t) return System.Address;
pragma Import (C, pthread_getspecific, "PTHREAD_GETSPECIFIC");
type destructor_pointer is access procedure (arg : System.Address);
function pthread_key_create
(key : access pthread_key_t;
destructor : destructor_pointer) return int;
pragma Import (C, pthread_key_create, "PTHREAD_KEY_CREATE");
private
type pid_t is new int;
type pthreadLongAddr_p is mod 2 ** Long_Integer'Size;
type pthreadLongAddr_t is mod 2 ** Long_Integer'Size;
type pthreadLongAddr_t_ptr is mod 2 ** Long_Integer'Size;
type pthreadLongString_t is mod 2 ** Long_Integer'Size;
type pthreadLongUint_t is mod 2 ** Long_Integer'Size;
type pthreadLongUint_array is array (Natural range <>)
of pthreadLongUint_t;
type pthread_t is mod 2 ** Long_Integer'Size;
type pthread_cond_t is record
state : unsigned;
valid : unsigned;
name : pthreadLongString_t;
arg : unsigned;
sequence : unsigned;
block : pthreadLongAddr_t_ptr;
end record;
for pthread_cond_t'Size use 8*32;
pragma Convention (C, pthread_cond_t);
type pthread_attr_t is record
valid : long;
name : pthreadLongString_t;
arg : pthreadLongUint_t;
reserved : pthreadLongUint_array (0 .. 18);
end record;
for pthread_attr_t'Size use 8*176;
pragma Convention (C, pthread_attr_t);
type pthread_mutex_t is record
lock : unsigned;
valid : unsigned;
name : pthreadLongString_t;
arg : unsigned;
sequence : unsigned;
block : pthreadLongAddr_p;
owner : unsigned;
depth : unsigned;
end record;
for pthread_mutex_t'Size use 8*40;
pragma Convention (C, pthread_mutex_t);
type pthread_mutexattr_t is record
valid : long;
reserved : pthreadLongUint_array (0 .. 14);
end record;
for pthread_mutexattr_t'Size use 8*128;
pragma Convention (C, pthread_mutexattr_t);
type pthread_condattr_t is record
valid : long;
reserved : pthreadLongUint_array (0 .. 12);
end record;
for pthread_condattr_t'Size use 8*112;
pragma Convention (C, pthread_condattr_t);
type pthread_key_t is new unsigned;
end System.OS_Interface;
| 36.370717 | 79 | 0.607238 |
cb91adf83e13682c802cdaaae9522f0d6e4fb2a3 | 41,202 | adb | Ada | .emacs.d/elpa/wisi-3.1.3/wisitoken_grammar_main.adb | caqg/linux-home | eed631aae6f5e59e4f46e14f1dff443abca5fa28 | [
"Linux-OpenIB"
] | null | null | null | .emacs.d/elpa/wisi-3.1.3/wisitoken_grammar_main.adb | caqg/linux-home | eed631aae6f5e59e4f46e14f1dff443abca5fa28 | [
"Linux-OpenIB"
] | null | null | null | .emacs.d/elpa/wisi-3.1.3/wisitoken_grammar_main.adb | caqg/linux-home | eed631aae6f5e59e4f46e14f1dff443abca5fa28 | [
"Linux-OpenIB"
] | null | null | null | -- generated parser support file.
-- command line: wisitoken-bnf-generate.exe --generate LALR Ada re2c wisitoken_grammar.wy
--
-- Copyright (C) 2017 - 2019 Free Software Foundation, Inc.
--
-- Author: Stephen Leake <stephe-leake@stephe-leake.org>
--
-- This file is part of GNU Emacs.
--
-- GNU Emacs 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.
--
-- GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
with Wisitoken_Grammar_Actions; use Wisitoken_Grammar_Actions;
with WisiToken.Lexer.re2c;
with wisitoken_grammar_re2c_c;
package body Wisitoken_Grammar_Main is
package Lexer is new WisiToken.Lexer.re2c
(wisitoken_grammar_re2c_c.New_Lexer,
wisitoken_grammar_re2c_c.Free_Lexer,
wisitoken_grammar_re2c_c.Reset_Lexer,
wisitoken_grammar_re2c_c.Next_Token);
procedure Create_Parser
(Parser : out WisiToken.Parse.LR.Parser_No_Recover.Parser;
Trace : not null access WisiToken.Trace'Class;
User_Data : in WisiToken.Syntax_Trees.User_Data_Access)
is
use WisiToken.Parse.LR;
Table : constant Parse_Table_Ptr := new Parse_Table
(State_First => 0,
State_Last => 102,
First_Terminal => 3,
Last_Terminal => 36,
First_Nonterminal => 37,
Last_Nonterminal => 56);
begin
declare
procedure Subr_1
is begin
Table.States (0).Action_List.Set_Capacity (2);
Add_Action (Table.States (0), 23, (38, 0), 1);
Add_Action (Table.States (0), 33, (43, 0), 2);
Table.States (0).Goto_List.Set_Capacity (4);
Add_Goto (Table.States (0), 38, 3);
Add_Goto (Table.States (0), 43, 4);
Add_Goto (Table.States (0), 55, 5);
Add_Goto (Table.States (0), 56, 6);
Table.States (1).Action_List.Set_Capacity (7);
Add_Action (Table.States (1), 3, (38, 1), 7);
Add_Action (Table.States (1), 4, (38, 5), 8);
Add_Action (Table.States (1), 5, (38, 4), 9);
Add_Action (Table.States (1), 6, (39, 0), 10);
Add_Action (Table.States (1), 7, (39, 1), 11);
Add_Action (Table.States (1), 8, (39, 2), 12);
Add_Action (Table.States (1), 33, (38, 2), 13);
Table.States (1).Goto_List.Set_Capacity (1);
Add_Goto (Table.States (1), 39, 14);
Table.States (2).Action_List.Set_Capacity (2);
Add_Action (Table.States (2), 13, (43, 0), 15);
Add_Action (Table.States (2), 14, (43, 1), 16);
Table.States (3).Action_List.Set_Capacity (3);
Add_Action (Table.States (3), (23, 33, 36), (55, 0), 1, null, null);
Table.States (4).Action_List.Set_Capacity (3);
Add_Action (Table.States (4), (23, 33, 36), (55, 1), 1, null, null);
Table.States (5).Action_List.Set_Capacity (3);
Add_Action (Table.States (5), (23, 33, 36), (56, 0), 1, null, null);
Table.States (6).Action_List.Set_Capacity (3);
Add_Action (Table.States (6), 23, (38, 0), 1);
Add_Action (Table.States (6), 33, (43, 0), 2);
Add_Action (Table.States (6), 36, Accept_It, (37, 0), 1, null, null);
Table.States (6).Goto_List.Set_Capacity (3);
Add_Goto (Table.States (6), 38, 3);
Add_Goto (Table.States (6), 43, 4);
Add_Goto (Table.States (6), 55, 17);
Table.States (7).Action_List.Set_Capacity (1);
Add_Action (Table.States (7), 33, (40, 0), 18);
Table.States (7).Goto_List.Set_Capacity (1);
Add_Goto (Table.States (7), 40, 19);
Table.States (8).Action_List.Set_Capacity (1);
Add_Action (Table.States (8), 5, (38, 5), 20);
Table.States (9).Action_List.Set_Capacity (1);
Add_Action (Table.States (9), 33, (38, 4), 21);
Table.States (10).Action_List.Set_Capacity (1);
Add_Action (Table.States (10), (1 => 33), (39, 0), 1, null, null);
Table.States (11).Action_List.Set_Capacity (1);
Add_Action (Table.States (11), 21, (39, 1), 22);
Table.States (12).Action_List.Set_Capacity (1);
Add_Action (Table.States (12), 21, (39, 2), 23);
Table.States (13).Action_List.Set_Capacity (13);
Add_Action (Table.States (13), 8, (42, 10), 24);
Add_Action (Table.States (13), 10, (42, 5), 25);
Add_Action (Table.States (13), 15, (42, 0), 26);
Add_Action (Table.States (13), 16, (42, 2), 27);
Add_Action (Table.States (13), 20, (42, 3), 28);
Add_Action (Table.States (13), 23, Reduce, (38, 3), 2, declaration_3'Access, null);
Add_Action (Table.States (13), 28, (42, 6), 29);
Add_Action (Table.States (13), 30, (42, 7), 30);
Add_Action (Table.States (13), 32, (42, 4), 31);
Add_Action (Table.States (13), 33, (42, 1), 32);
Add_Conflict (Table.States (13), 33, (38, 3), 2, declaration_3'Access, null);
Add_Action (Table.States (13), 34, (42, 8), 33);
Add_Action (Table.States (13), 35, (42, 9), 34);
Add_Action (Table.States (13), 36, Reduce, (38, 3), 2, declaration_3'Access, null);
Table.States (13).Goto_List.Set_Capacity (2);
Add_Goto (Table.States (13), 41, 35);
Add_Goto (Table.States (13), 42, 36);
Table.States (14).Action_List.Set_Capacity (1);
Add_Action (Table.States (14), 33, (38, 0), 37);
Table.States (15).Action_List.Set_Capacity (10);
Add_Action (Table.States (15), 12, Reduce, (46, 0), 0, null, null);
Add_Action (Table.States (15), 18, (53, 0), 38);
Add_Action (Table.States (15), 19, (52, 0), 39);
Add_Action (Table.States (15), 20, (51, 0), 40);
Add_Action (Table.States (15), 21, (47, 0), 41);
Add_Action (Table.States (15), 23, Reduce, (46, 0), 0, null, null);
Add_Action (Table.States (15), 29, Reduce, (46, 0), 0, null, null);
Add_Action (Table.States (15), 33, (48, 1), 42);
Add_Conflict (Table.States (15), 33, (46, 0), 0, null, null);
Add_Action (Table.States (15), 35, (50, 1), 43);
Add_Action (Table.States (15), 36, Reduce, (46, 0), 0, null, null);
Table.States (15).Goto_List.Set_Capacity (9);
Add_Goto (Table.States (15), 45, 44);
Add_Goto (Table.States (15), 46, 45);
Add_Goto (Table.States (15), 47, 46);
Add_Goto (Table.States (15), 48, 47);
Add_Goto (Table.States (15), 49, 48);
Add_Goto (Table.States (15), 50, 49);
Add_Goto (Table.States (15), 51, 50);
Add_Goto (Table.States (15), 52, 51);
Add_Goto (Table.States (15), 53, 52);
Table.States (16).Action_List.Set_Capacity (10);
Add_Action (Table.States (16), 12, Reduce, (46, 0), 0, null, null);
Add_Action (Table.States (16), 18, (53, 0), 38);
Add_Action (Table.States (16), 19, (52, 0), 39);
Add_Action (Table.States (16), 20, (51, 0), 40);
Add_Action (Table.States (16), 21, (47, 0), 41);
Add_Action (Table.States (16), 23, Reduce, (46, 0), 0, null, null);
Add_Action (Table.States (16), 29, Reduce, (46, 0), 0, null, null);
Add_Action (Table.States (16), 33, (48, 1), 42);
Add_Conflict (Table.States (16), 33, (46, 0), 0, null, null);
Add_Action (Table.States (16), 35, (50, 1), 43);
Add_Action (Table.States (16), 36, Reduce, (46, 0), 0, null, null);
Table.States (16).Goto_List.Set_Capacity (9);
Add_Goto (Table.States (16), 45, 53);
Add_Goto (Table.States (16), 46, 45);
Add_Goto (Table.States (16), 47, 46);
Add_Goto (Table.States (16), 48, 47);
Add_Goto (Table.States (16), 49, 48);
Add_Goto (Table.States (16), 50, 49);
Add_Goto (Table.States (16), 51, 50);
Add_Goto (Table.States (16), 52, 51);
Add_Goto (Table.States (16), 53, 52);
Table.States (17).Action_List.Set_Capacity (3);
Add_Action (Table.States (17), (23, 33, 36), (56, 1), 2, null, null);
Table.States (18).Action_List.Set_Capacity (2);
Add_Action (Table.States (18), (9, 33), (40, 0), 1, null, null);
Table.States (19).Action_List.Set_Capacity (2);
Add_Action (Table.States (19), 9, (38, 1), 54);
Add_Action (Table.States (19), 33, (40, 1), 55);
Table.States (20).Action_List.Set_Capacity (3);
Add_Action (Table.States (20), (23, 33, 36), (38, 5), 3, declaration_5'Access, null);
Table.States (21).Action_List.Set_Capacity (1);
Add_Action (Table.States (21), 16, (38, 4), 56);
Table.States (22).Action_List.Set_Capacity (1);
Add_Action (Table.States (22), 33, (39, 1), 57);
Table.States (23).Action_List.Set_Capacity (1);
Add_Action (Table.States (23), 33, (39, 2), 58);
Table.States (24).Action_List.Set_Capacity (13);
Add_Action (Table.States (24), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (42, 10), 1, null,
null);
Table.States (25).Action_List.Set_Capacity (13);
Add_Action (Table.States (25), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (42, 5), 1, null,
null);
Table.States (26).Action_List.Set_Capacity (13);
Add_Action (Table.States (26), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (42, 0), 1, null,
null);
Table.States (27).Action_List.Set_Capacity (13);
Add_Action (Table.States (27), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (42, 2), 1, null,
null);
Table.States (28).Action_List.Set_Capacity (13);
Add_Action (Table.States (28), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (42, 3), 1, null,
null);
Table.States (29).Action_List.Set_Capacity (13);
Add_Action (Table.States (29), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (42, 6), 1, null,
null);
Table.States (30).Action_List.Set_Capacity (13);
Add_Action (Table.States (30), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (42, 7), 1, null,
null);
Table.States (31).Action_List.Set_Capacity (13);
Add_Action (Table.States (31), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (42, 4), 1, null,
null);
Table.States (32).Action_List.Set_Capacity (13);
Add_Action (Table.States (32), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (42, 1), 1, null,
null);
Table.States (33).Action_List.Set_Capacity (13);
Add_Action (Table.States (33), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (42, 8), 1, null,
null);
Table.States (34).Action_List.Set_Capacity (13);
Add_Action (Table.States (34), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (42, 9), 1, null,
null);
Table.States (35).Action_List.Set_Capacity (13);
Add_Action (Table.States (35), 8, (42, 10), 24);
Add_Action (Table.States (35), 10, (42, 5), 25);
Add_Action (Table.States (35), 15, (42, 0), 26);
Add_Action (Table.States (35), 16, (42, 2), 27);
Add_Action (Table.States (35), 20, (42, 3), 28);
Add_Action (Table.States (35), 23, Reduce, (38, 2), 3, declaration_2'Access, null);
Add_Action (Table.States (35), 28, (42, 6), 29);
Add_Action (Table.States (35), 30, (42, 7), 30);
Add_Action (Table.States (35), 32, (42, 4), 31);
Add_Action (Table.States (35), 33, (42, 1), 32);
Add_Conflict (Table.States (35), 33, (38, 2), 3, declaration_2'Access, null);
Add_Action (Table.States (35), 34, (42, 8), 33);
Add_Action (Table.States (35), 35, (42, 9), 34);
Add_Action (Table.States (35), 36, Reduce, (38, 2), 3, declaration_2'Access, null);
Table.States (35).Goto_List.Set_Capacity (1);
Add_Goto (Table.States (35), 42, 59);
Table.States (36).Action_List.Set_Capacity (13);
Add_Action (Table.States (36), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (41, 0), 1, null,
null);
Table.States (37).Action_List.Set_Capacity (11);
Add_Action (Table.States (37), 8, (42, 10), 24);
Add_Action (Table.States (37), 10, (42, 5), 25);
Add_Action (Table.States (37), 15, (42, 0), 26);
Add_Action (Table.States (37), 16, (42, 2), 27);
Add_Action (Table.States (37), 20, (42, 3), 28);
Add_Action (Table.States (37), 28, (42, 6), 29);
Add_Action (Table.States (37), 30, (42, 7), 30);
Add_Action (Table.States (37), 32, (42, 4), 31);
Add_Action (Table.States (37), 33, (42, 1), 32);
Add_Action (Table.States (37), 34, (42, 8), 33);
Add_Action (Table.States (37), 35, (42, 9), 34);
Table.States (37).Goto_List.Set_Capacity (2);
Add_Goto (Table.States (37), 41, 60);
Add_Goto (Table.States (37), 42, 36);
Table.States (38).Action_List.Set_Capacity (6);
Add_Action (Table.States (38), 18, (53, 0), 38);
Add_Action (Table.States (38), 19, (52, 0), 39);
Add_Action (Table.States (38), 20, (51, 0), 40);
Add_Action (Table.States (38), 21, (47, 0), 41);
Add_Action (Table.States (38), 33, (48, 1), 42);
Add_Action (Table.States (38), 35, (50, 1), 43);
Table.States (38).Goto_List.Set_Capacity (8);
Add_Goto (Table.States (38), 47, 46);
Add_Goto (Table.States (38), 48, 47);
Add_Goto (Table.States (38), 49, 61);
Add_Goto (Table.States (38), 50, 49);
Add_Goto (Table.States (38), 51, 50);
Add_Goto (Table.States (38), 52, 51);
Add_Goto (Table.States (38), 53, 52);
Add_Goto (Table.States (38), 54, 62);
Table.States (39).Action_List.Set_Capacity (6);
Add_Action (Table.States (39), 18, (53, 0), 38);
Add_Action (Table.States (39), 19, (52, 0), 39);
Add_Action (Table.States (39), 20, (51, 0), 40);
Add_Action (Table.States (39), 21, (47, 0), 41);
Add_Action (Table.States (39), 33, (48, 1), 42);
Add_Action (Table.States (39), 35, (50, 1), 43);
Table.States (39).Goto_List.Set_Capacity (8);
Add_Goto (Table.States (39), 47, 46);
Add_Goto (Table.States (39), 48, 47);
Add_Goto (Table.States (39), 49, 61);
Add_Goto (Table.States (39), 50, 49);
Add_Goto (Table.States (39), 51, 50);
Add_Goto (Table.States (39), 52, 51);
Add_Goto (Table.States (39), 53, 52);
Add_Goto (Table.States (39), 54, 63);
Table.States (40).Action_List.Set_Capacity (6);
Add_Action (Table.States (40), 18, (53, 0), 38);
Add_Action (Table.States (40), 19, (52, 0), 39);
Add_Action (Table.States (40), 20, (51, 0), 40);
Add_Action (Table.States (40), 21, (47, 0), 41);
Add_Action (Table.States (40), 33, (48, 1), 42);
Add_Action (Table.States (40), 35, (50, 1), 43);
Table.States (40).Goto_List.Set_Capacity (8);
Add_Goto (Table.States (40), 47, 46);
Add_Goto (Table.States (40), 48, 47);
Add_Goto (Table.States (40), 49, 61);
Add_Goto (Table.States (40), 50, 49);
Add_Goto (Table.States (40), 51, 50);
Add_Goto (Table.States (40), 52, 51);
Add_Goto (Table.States (40), 53, 52);
Add_Goto (Table.States (40), 54, 64);
Table.States (41).Action_List.Set_Capacity (1);
Add_Action (Table.States (41), 33, (47, 0), 65);
Table.States (42).Action_List.Set_Capacity (18);
Add_Action (Table.States (42), 11, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 12, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 16, (48, 1), 66);
Add_Action (Table.States (42), 18, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 19, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 20, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 21, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 23, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 24, (53, 4), 67);
Add_Action (Table.States (42), 25, (52, 2), 68);
Add_Action (Table.States (42), 26, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 27, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 28, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 29, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 31, (53, 5), 69);
Add_Action (Table.States (42), 33, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 35, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (42), 36, Reduce, (50, 0), 1, null, null);
Table.States (43).Action_List.Set_Capacity (15);
Add_Action (Table.States (43), 11, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 12, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 18, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 19, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 20, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 21, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 23, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 25, (52, 3), 70);
Add_Action (Table.States (43), 26, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 27, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 28, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 29, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 33, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 35, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Add_Action (Table.States (43), 36, Reduce, (50, 1), 1, rhs_item_1'Access, null);
Table.States (44).Action_List.Set_Capacity (5);
Add_Action (Table.States (44), 12, (45, 1), 71);
Add_Action (Table.States (44), 23, (45, 2), 72);
Add_Conflict (Table.States (44), 23, (44, 1), 0, null, null);
Add_Action (Table.States (44), 29, (44, 0), 73);
Add_Action (Table.States (44), 33, Reduce, (44, 1), 0, null, null);
Add_Action (Table.States (44), 36, Reduce, (44, 1), 0, null, null);
Table.States (44).Goto_List.Set_Capacity (1);
Add_Goto (Table.States (44), 44, 74);
Table.States (45).Action_List.Set_Capacity (5);
Add_Action (Table.States (45), (12, 23, 29, 33, 36), (45, 0), 1, null, null);
Table.States (46).Action_List.Set_Capacity (14);
Add_Action (Table.States (46), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (50, 2), 1,
rhs_item_2'Access, null);
Table.States (47).Action_List.Set_Capacity (14);
Add_Action (Table.States (47), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (49, 0), 1, null,
null);
Table.States (48).Action_List.Set_Capacity (11);
Add_Action (Table.States (48), 11, (46, 2), 75);
Add_Action (Table.States (48), 12, Reduce, (46, 1), 1, null, null);
Add_Action (Table.States (48), 18, (53, 0), 38);
Add_Action (Table.States (48), 19, (52, 0), 39);
Add_Action (Table.States (48), 20, (51, 0), 40);
Add_Action (Table.States (48), 21, (47, 0), 41);
Add_Action (Table.States (48), 23, Reduce, (46, 1), 1, null, null);
Add_Action (Table.States (48), 29, Reduce, (46, 1), 1, null, null);
Add_Action (Table.States (48), 33, (48, 1), 42);
Add_Conflict (Table.States (48), 33, (46, 1), 1, null, null);
Add_Action (Table.States (48), 35, (50, 1), 43);
Add_Action (Table.States (48), 36, Reduce, (46, 1), 1, null, null);
Table.States (48).Goto_List.Set_Capacity (6);
Add_Goto (Table.States (48), 47, 46);
Add_Goto (Table.States (48), 48, 76);
Add_Goto (Table.States (48), 50, 49);
Add_Goto (Table.States (48), 51, 50);
Add_Goto (Table.States (48), 52, 51);
Add_Goto (Table.States (48), 53, 52);
Table.States (49).Action_List.Set_Capacity (14);
Add_Action (Table.States (49), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (48, 0), 1, null,
null);
Table.States (50).Action_List.Set_Capacity (14);
Add_Action (Table.States (50), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (50, 5), 1,
rhs_item_5'Access, null);
Table.States (51).Action_List.Set_Capacity (14);
Add_Action (Table.States (51), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (50, 3), 1,
rhs_item_3'Access, null);
Table.States (52).Action_List.Set_Capacity (14);
Add_Action (Table.States (52), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (50, 4), 1,
rhs_item_4'Access, null);
Table.States (53).Action_List.Set_Capacity (5);
Add_Action (Table.States (53), 12, (45, 1), 71);
Add_Action (Table.States (53), 23, (45, 2), 72);
Add_Conflict (Table.States (53), 23, (44, 1), 0, null, null);
Add_Action (Table.States (53), 29, (44, 0), 73);
Add_Action (Table.States (53), 33, Reduce, (44, 1), 0, null, null);
Add_Action (Table.States (53), 36, Reduce, (44, 1), 0, null, null);
Table.States (53).Goto_List.Set_Capacity (1);
Add_Goto (Table.States (53), 44, 77);
Table.States (54).Action_List.Set_Capacity (3);
Add_Action (Table.States (54), (23, 33, 36), (38, 1), 4, declaration_1'Access, null);
Table.States (55).Action_List.Set_Capacity (2);
Add_Action (Table.States (55), (9, 33), (40, 1), 2, null, null);
Table.States (56).Action_List.Set_Capacity (1);
Add_Action (Table.States (56), 33, (38, 4), 78);
Table.States (57).Action_List.Set_Capacity (1);
Add_Action (Table.States (57), 17, (39, 1), 79);
Table.States (58).Action_List.Set_Capacity (1);
Add_Action (Table.States (58), 17, (39, 2), 80);
Table.States (59).Action_List.Set_Capacity (13);
Add_Action (Table.States (59), (8, 10, 15, 16, 20, 23, 28, 30, 32, 33, 34, 35, 36), (41, 1), 2, null,
null);
Table.States (60).Action_List.Set_Capacity (13);
Add_Action (Table.States (60), 8, (42, 10), 24);
Add_Action (Table.States (60), 10, (42, 5), 25);
Add_Action (Table.States (60), 15, (42, 0), 26);
Add_Action (Table.States (60), 16, (42, 2), 27);
Add_Action (Table.States (60), 20, (42, 3), 28);
Add_Action (Table.States (60), 23, Reduce, (38, 0), 4, declaration_0'Access, null);
Add_Action (Table.States (60), 28, (42, 6), 29);
Add_Action (Table.States (60), 30, (42, 7), 30);
Add_Action (Table.States (60), 32, (42, 4), 31);
Add_Action (Table.States (60), 33, (42, 1), 32);
Add_Conflict (Table.States (60), 33, (38, 0), 4, declaration_0'Access, null);
Add_Action (Table.States (60), 34, (42, 8), 33);
Add_Action (Table.States (60), 35, (42, 9), 34);
Add_Action (Table.States (60), 36, Reduce, (38, 0), 4, declaration_0'Access, null);
Table.States (60).Goto_List.Set_Capacity (1);
Add_Goto (Table.States (60), 42, 59);
Table.States (61).Action_List.Set_Capacity (10);
Add_Action (Table.States (61), 12, Reduce, (54, 0), 1, null, null);
Add_Action (Table.States (61), 18, (53, 0), 38);
Add_Action (Table.States (61), 19, (52, 0), 39);
Add_Action (Table.States (61), 20, (51, 0), 40);
Add_Action (Table.States (61), 21, (47, 0), 41);
Add_Action (Table.States (61), 26, Reduce, (54, 0), 1, null, null);
Add_Action (Table.States (61), 27, Reduce, (54, 0), 1, null, null);
Add_Action (Table.States (61), 28, Reduce, (54, 0), 1, null, null);
Add_Action (Table.States (61), 33, (48, 1), 42);
Add_Action (Table.States (61), 35, (50, 1), 43);
Table.States (61).Goto_List.Set_Capacity (6);
Add_Goto (Table.States (61), 47, 46);
Add_Goto (Table.States (61), 48, 76);
Add_Goto (Table.States (61), 50, 49);
Add_Goto (Table.States (61), 51, 50);
Add_Goto (Table.States (61), 52, 51);
Add_Goto (Table.States (61), 53, 52);
Table.States (62).Action_List.Set_Capacity (2);
Add_Action (Table.States (62), 12, (54, 1), 81);
Add_Action (Table.States (62), 26, (53, 0), 82);
Table.States (63).Action_List.Set_Capacity (2);
Add_Action (Table.States (63), 12, (54, 1), 81);
Add_Action (Table.States (63), 27, (52, 0), 83);
Table.States (64).Action_List.Set_Capacity (2);
Add_Action (Table.States (64), 12, (54, 1), 81);
Add_Action (Table.States (64), 28, (51, 0), 84);
Table.States (65).Action_List.Set_Capacity (1);
Add_Action (Table.States (65), 16, (47, 0), 85);
Table.States (66).Action_List.Set_Capacity (6);
Add_Action (Table.States (66), 18, (53, 0), 38);
Add_Action (Table.States (66), 19, (52, 0), 39);
Add_Action (Table.States (66), 20, (51, 0), 40);
Add_Action (Table.States (66), 21, (47, 0), 41);
Add_Action (Table.States (66), 33, (50, 0), 86);
Add_Action (Table.States (66), 35, (50, 1), 43);
Table.States (66).Goto_List.Set_Capacity (5);
Add_Goto (Table.States (66), 47, 46);
Add_Goto (Table.States (66), 50, 87);
Add_Goto (Table.States (66), 51, 50);
Add_Goto (Table.States (66), 52, 51);
Add_Goto (Table.States (66), 53, 52);
Table.States (67).Action_List.Set_Capacity (14);
Add_Action (Table.States (67), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (53, 4), 2, null,
null);
Table.States (68).Action_List.Set_Capacity (14);
Add_Action (Table.States (68), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (52, 2), 2, null,
null);
Table.States (69).Action_List.Set_Capacity (14);
Add_Action (Table.States (69), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (53, 5), 2, null,
null);
Table.States (70).Action_List.Set_Capacity (14);
Add_Action (Table.States (70), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (52, 3), 2,
rhs_optional_item_3'Access, null);
Table.States (71).Action_List.Set_Capacity (10);
Add_Action (Table.States (71), 12, Reduce, (46, 0), 0, null, null);
Add_Action (Table.States (71), 18, (53, 0), 38);
Add_Action (Table.States (71), 19, (52, 0), 39);
Add_Action (Table.States (71), 20, (51, 0), 40);
Add_Action (Table.States (71), 21, (47, 0), 41);
Add_Action (Table.States (71), 23, Reduce, (46, 0), 0, null, null);
Add_Action (Table.States (71), 29, Reduce, (46, 0), 0, null, null);
Add_Action (Table.States (71), 33, (48, 1), 42);
Add_Conflict (Table.States (71), 33, (46, 0), 0, null, null);
Add_Action (Table.States (71), 35, (50, 1), 43);
Add_Action (Table.States (71), 36, Reduce, (46, 0), 0, null, null);
Table.States (71).Goto_List.Set_Capacity (8);
Add_Goto (Table.States (71), 46, 88);
Add_Goto (Table.States (71), 47, 46);
Add_Goto (Table.States (71), 48, 47);
Add_Goto (Table.States (71), 49, 48);
Add_Goto (Table.States (71), 50, 49);
Add_Goto (Table.States (71), 51, 50);
Add_Goto (Table.States (71), 52, 51);
Add_Goto (Table.States (71), 53, 52);
Table.States (72).Action_List.Set_Capacity (2);
Add_Action (Table.States (72), 4, (45, 3), 89);
Add_Action (Table.States (72), 5, (45, 2), 90);
Table.States (73).Action_List.Set_Capacity (3);
Add_Action (Table.States (73), (23, 33, 36), (44, 0), 1, null, null);
Table.States (74).Action_List.Set_Capacity (3);
Add_Action (Table.States (74), (23, 33, 36), (43, 0), 4, nonterminal_0'Access, null);
Table.States (75).Action_List.Set_Capacity (6);
Add_Action (Table.States (75), 11, (46, 3), 91);
Add_Action (Table.States (75), 12, Reduce, (46, 2), 2, null, null);
Add_Action (Table.States (75), 23, Reduce, (46, 2), 2, null, null);
Add_Action (Table.States (75), 29, Reduce, (46, 2), 2, null, null);
Add_Action (Table.States (75), 33, Reduce, (46, 2), 2, null, null);
Add_Action (Table.States (75), 36, Reduce, (46, 2), 2, null, null);
Table.States (76).Action_List.Set_Capacity (14);
Add_Action (Table.States (76), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (49, 1), 2, null,
null);
Table.States (77).Action_List.Set_Capacity (3);
Add_Action (Table.States (77), (23, 33, 36), (43, 1), 4, nonterminal_1'Access, null);
Table.States (78).Action_List.Set_Capacity (3);
Add_Action (Table.States (78), (23, 33, 36), (38, 4), 5, declaration_4'Access, null);
Table.States (79).Action_List.Set_Capacity (1);
Add_Action (Table.States (79), (1 => 33), (39, 1), 4, null, null);
Table.States (80).Action_List.Set_Capacity (1);
Add_Action (Table.States (80), (1 => 33), (39, 2), 4, null, null);
Table.States (81).Action_List.Set_Capacity (6);
Add_Action (Table.States (81), 18, (53, 0), 38);
Add_Action (Table.States (81), 19, (52, 0), 39);
Add_Action (Table.States (81), 20, (51, 0), 40);
Add_Action (Table.States (81), 21, (47, 0), 41);
Add_Action (Table.States (81), 33, (48, 1), 42);
Add_Action (Table.States (81), 35, (50, 1), 43);
Table.States (81).Goto_List.Set_Capacity (7);
Add_Goto (Table.States (81), 47, 46);
Add_Goto (Table.States (81), 48, 47);
Add_Goto (Table.States (81), 49, 92);
Add_Goto (Table.States (81), 50, 49);
Add_Goto (Table.States (81), 51, 50);
Add_Goto (Table.States (81), 52, 51);
Add_Goto (Table.States (81), 53, 52);
Table.States (82).Action_List.Set_Capacity (15);
Add_Action (Table.States (82), 11, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 12, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 18, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 19, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 20, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 21, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 22, (53, 1), 93);
Add_Action (Table.States (82), 23, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 26, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 27, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 28, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 29, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 33, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 35, Reduce, (53, 0), 3, null, null);
Add_Action (Table.States (82), 36, Reduce, (53, 0), 3, null, null);
Table.States (83).Action_List.Set_Capacity (14);
Add_Action (Table.States (83), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (52, 0), 3, null,
null);
Table.States (84).Action_List.Set_Capacity (17);
Add_Action (Table.States (84), 11, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 12, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 18, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 19, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 20, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 21, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 23, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 24, (53, 2), 94);
Add_Action (Table.States (84), 25, (52, 1), 95);
Add_Action (Table.States (84), 26, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 27, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 28, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 29, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 31, (53, 3), 96);
Add_Action (Table.States (84), 33, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 35, Reduce, (51, 0), 3, null, null);
Add_Action (Table.States (84), 36, Reduce, (51, 0), 3, null, null);
Table.States (85).Action_List.Set_Capacity (1);
Add_Action (Table.States (85), 33, (47, 0), 97);
Table.States (86).Action_List.Set_Capacity (17);
Add_Action (Table.States (86), 11, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 12, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 18, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 19, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 20, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 21, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 23, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 24, (53, 4), 67);
Add_Action (Table.States (86), 25, (52, 2), 68);
Add_Action (Table.States (86), 26, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 27, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 28, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 29, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 31, (53, 5), 69);
Add_Action (Table.States (86), 33, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 35, Reduce, (50, 0), 1, null, null);
Add_Action (Table.States (86), 36, Reduce, (50, 0), 1, null, null);
Table.States (87).Action_List.Set_Capacity (14);
Add_Action (Table.States (87), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (48, 1), 3, null,
null);
Table.States (88).Action_List.Set_Capacity (5);
Add_Action (Table.States (88), (12, 23, 29, 33, 36), (45, 1), 3, null, null);
Table.States (89).Action_List.Set_Capacity (1);
Add_Action (Table.States (89), 5, (45, 3), 98);
Table.States (90).Action_List.Set_Capacity (1);
Add_Action (Table.States (90), 33, (45, 2), 99);
Table.States (91).Action_List.Set_Capacity (5);
Add_Action (Table.States (91), (12, 23, 29, 33, 36), (46, 3), 3, null, null);
Table.States (92).Action_List.Set_Capacity (10);
Add_Action (Table.States (92), 12, Reduce, (54, 1), 3, null, null);
Add_Action (Table.States (92), 18, (53, 0), 38);
Add_Action (Table.States (92), 19, (52, 0), 39);
Add_Action (Table.States (92), 20, (51, 0), 40);
Add_Action (Table.States (92), 21, (47, 0), 41);
Add_Action (Table.States (92), 26, Reduce, (54, 1), 3, null, null);
Add_Action (Table.States (92), 27, Reduce, (54, 1), 3, null, null);
Add_Action (Table.States (92), 28, Reduce, (54, 1), 3, null, null);
Add_Action (Table.States (92), 33, (48, 1), 42);
Add_Action (Table.States (92), 35, (50, 1), 43);
Table.States (92).Goto_List.Set_Capacity (6);
Add_Goto (Table.States (92), 47, 46);
Add_Goto (Table.States (92), 48, 76);
Add_Goto (Table.States (92), 50, 49);
Add_Goto (Table.States (92), 51, 50);
Add_Goto (Table.States (92), 52, 51);
Add_Goto (Table.States (92), 53, 52);
Table.States (93).Action_List.Set_Capacity (14);
Add_Action (Table.States (93), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (53, 1), 4, null,
null);
Table.States (94).Action_List.Set_Capacity (14);
Add_Action (Table.States (94), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (53, 2), 4, null,
null);
Table.States (95).Action_List.Set_Capacity (14);
Add_Action (Table.States (95), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (52, 1), 4, null,
null);
Table.States (96).Action_List.Set_Capacity (14);
Add_Action (Table.States (96), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (53, 3), 4, null,
null);
Table.States (97).Action_List.Set_Capacity (1);
Add_Action (Table.States (97), 17, (47, 0), 100);
Table.States (98).Action_List.Set_Capacity (5);
Add_Action (Table.States (98), (12, 23, 29, 33, 36), (45, 3), 4, null, null);
Table.States (99).Action_List.Set_Capacity (1);
Add_Action (Table.States (99), 16, (45, 2), 101);
Table.States (100).Action_List.Set_Capacity (14);
Add_Action (Table.States (100), (11, 12, 18, 19, 20, 21, 23, 26, 27, 28, 29, 33, 35, 36), (47, 0), 5,
null, null);
Table.States (101).Action_List.Set_Capacity (1);
Add_Action (Table.States (101), 33, (45, 2), 102);
Table.States (102).Action_List.Set_Capacity (5);
Add_Action (Table.States (102), (12, 23, 29, 33, 36), (45, 2), 6, null, null);
end Subr_1;
begin
Subr_1;
Table.Error_Action := new Parse_Action_Node'((Verb => Error, others => <>), null);
end;
WisiToken.Parse.LR.Parser_No_Recover.New_Parser
(Parser,
Trace,
Lexer.New_Lexer (Trace.Descriptor),
Table,
User_Data,
Max_Parallel => 15,
Terminate_Same_State => True);
end Create_Parser;
end Wisitoken_Grammar_Main;
| 62.144796 | 119 | 0.534367 |
d0a07474662a0c8d92674ebef48d43cf615ebe0a | 13,870 | ads | Ada | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/i-cexten.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/i-cexten.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/i-cexten.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- I N T E R F A C E S . C . E X T E N S I O 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 package contains additional C-related definitions, intended for use
-- with either manually or automatically generated bindings to C libraries.
with System;
package Interfaces.C.Extensions is
pragma Pure;
-- Definitions for C "void" and "void *" types
subtype void is System.Address;
subtype void_ptr is System.Address;
-- Definitions for C incomplete/unknown structs
subtype opaque_structure_def is System.Address;
type opaque_structure_def_ptr is access opaque_structure_def;
for opaque_structure_def_ptr'Storage_Size use 0;
-- Definitions for C++ incomplete/unknown classes
subtype incomplete_class_def is System.Address;
type incomplete_class_def_ptr is access incomplete_class_def;
for incomplete_class_def_ptr'Storage_Size use 0;
-- C bool
type bool is new Boolean;
pragma Convention (C, bool);
-- 64-bit integer types
subtype long_long is Long_Long_Integer;
type unsigned_long_long is mod 2 ** 64;
-- 128-bit integer type available on 64-bit platforms:
-- typedef int signed_128 __attribute__ ((mode (TI)));
type Signed_128 is record
low, high : unsigned_long_long;
end record;
pragma Convention (C_Pass_By_Copy, Signed_128);
for Signed_128'Alignment use unsigned_long_long'Alignment * 2;
-- 128-bit floating-point type available on x86:
-- typedef float float_128 __attribute__ ((mode (TF)));
type Float_128 is record
low, high : unsigned_long_long;
end record;
pragma Convention (C_Pass_By_Copy, Float_128);
for Float_128'Alignment use unsigned_long_long'Alignment * 2;
-- 128-bit complex floating-point type available on x86:
-- typedef _Complex float cfloat_128 __attribute__ ((mode (TC)));
type CFloat_128 is record
re, im : Float_128;
end record;
pragma Convention (C_Pass_By_Copy, CFloat_128);
-- Types for bitfields
type Unsigned_1 is mod 2 ** 1;
for Unsigned_1'Size use 1;
type Unsigned_2 is mod 2 ** 2;
for Unsigned_2'Size use 2;
type Unsigned_3 is mod 2 ** 3;
for Unsigned_3'Size use 3;
type Unsigned_4 is mod 2 ** 4;
for Unsigned_4'Size use 4;
type Unsigned_5 is mod 2 ** 5;
for Unsigned_5'Size use 5;
type Unsigned_6 is mod 2 ** 6;
for Unsigned_6'Size use 6;
type Unsigned_7 is mod 2 ** 7;
for Unsigned_7'Size use 7;
type Unsigned_8 is mod 2 ** 8;
for Unsigned_8'Size use 8;
type Unsigned_9 is mod 2 ** 9;
for Unsigned_9'Size use 9;
type Unsigned_10 is mod 2 ** 10;
for Unsigned_10'Size use 10;
type Unsigned_11 is mod 2 ** 11;
for Unsigned_11'Size use 11;
type Unsigned_12 is mod 2 ** 12;
for Unsigned_12'Size use 12;
type Unsigned_13 is mod 2 ** 13;
for Unsigned_13'Size use 13;
type Unsigned_14 is mod 2 ** 14;
for Unsigned_14'Size use 14;
type Unsigned_15 is mod 2 ** 15;
for Unsigned_15'Size use 15;
type Unsigned_16 is mod 2 ** 16;
for Unsigned_16'Size use 16;
type Unsigned_17 is mod 2 ** 17;
for Unsigned_17'Size use 17;
type Unsigned_18 is mod 2 ** 18;
for Unsigned_18'Size use 18;
type Unsigned_19 is mod 2 ** 19;
for Unsigned_19'Size use 19;
type Unsigned_20 is mod 2 ** 20;
for Unsigned_20'Size use 20;
type Unsigned_21 is mod 2 ** 21;
for Unsigned_21'Size use 21;
type Unsigned_22 is mod 2 ** 22;
for Unsigned_22'Size use 22;
type Unsigned_23 is mod 2 ** 23;
for Unsigned_23'Size use 23;
type Unsigned_24 is mod 2 ** 24;
for Unsigned_24'Size use 24;
type Unsigned_25 is mod 2 ** 25;
for Unsigned_25'Size use 25;
type Unsigned_26 is mod 2 ** 26;
for Unsigned_26'Size use 26;
type Unsigned_27 is mod 2 ** 27;
for Unsigned_27'Size use 27;
type Unsigned_28 is mod 2 ** 28;
for Unsigned_28'Size use 28;
type Unsigned_29 is mod 2 ** 29;
for Unsigned_29'Size use 29;
type Unsigned_30 is mod 2 ** 30;
for Unsigned_30'Size use 30;
type Unsigned_31 is mod 2 ** 31;
for Unsigned_31'Size use 31;
type Unsigned_32 is mod 2 ** 32;
for Unsigned_32'Size use 32;
type Unsigned_33 is mod 2 ** 33;
for Unsigned_33'Size use 33;
type Unsigned_34 is mod 2 ** 34;
for Unsigned_34'Size use 34;
type Unsigned_35 is mod 2 ** 35;
for Unsigned_35'Size use 35;
type Unsigned_36 is mod 2 ** 36;
for Unsigned_36'Size use 36;
type Unsigned_37 is mod 2 ** 37;
for Unsigned_37'Size use 37;
type Unsigned_38 is mod 2 ** 38;
for Unsigned_38'Size use 38;
type Unsigned_39 is mod 2 ** 39;
for Unsigned_39'Size use 39;
type Unsigned_40 is mod 2 ** 40;
for Unsigned_40'Size use 40;
type Unsigned_41 is mod 2 ** 41;
for Unsigned_41'Size use 41;
type Unsigned_42 is mod 2 ** 42;
for Unsigned_42'Size use 42;
type Unsigned_43 is mod 2 ** 43;
for Unsigned_43'Size use 43;
type Unsigned_44 is mod 2 ** 44;
for Unsigned_44'Size use 44;
type Unsigned_45 is mod 2 ** 45;
for Unsigned_45'Size use 45;
type Unsigned_46 is mod 2 ** 46;
for Unsigned_46'Size use 46;
type Unsigned_47 is mod 2 ** 47;
for Unsigned_47'Size use 47;
type Unsigned_48 is mod 2 ** 48;
for Unsigned_48'Size use 48;
type Unsigned_49 is mod 2 ** 49;
for Unsigned_49'Size use 49;
type Unsigned_50 is mod 2 ** 50;
for Unsigned_50'Size use 50;
type Unsigned_51 is mod 2 ** 51;
for Unsigned_51'Size use 51;
type Unsigned_52 is mod 2 ** 52;
for Unsigned_52'Size use 52;
type Unsigned_53 is mod 2 ** 53;
for Unsigned_53'Size use 53;
type Unsigned_54 is mod 2 ** 54;
for Unsigned_54'Size use 54;
type Unsigned_55 is mod 2 ** 55;
for Unsigned_55'Size use 55;
type Unsigned_56 is mod 2 ** 56;
for Unsigned_56'Size use 56;
type Unsigned_57 is mod 2 ** 57;
for Unsigned_57'Size use 57;
type Unsigned_58 is mod 2 ** 58;
for Unsigned_58'Size use 58;
type Unsigned_59 is mod 2 ** 59;
for Unsigned_59'Size use 59;
type Unsigned_60 is mod 2 ** 60;
for Unsigned_60'Size use 60;
type Unsigned_61 is mod 2 ** 61;
for Unsigned_61'Size use 61;
type Unsigned_62 is mod 2 ** 62;
for Unsigned_62'Size use 62;
type Unsigned_63 is mod 2 ** 63;
for Unsigned_63'Size use 63;
type Unsigned_64 is mod 2 ** 64;
for Unsigned_64'Size use 64;
type Signed_2 is range -2 ** 1 .. 2 ** 1 - 1;
for Signed_2'Size use 2;
type Signed_3 is range -2 ** 2 .. 2 ** 2 - 1;
for Signed_3'Size use 3;
type Signed_4 is range -2 ** 3 .. 2 ** 3 - 1;
for Signed_4'Size use 4;
type Signed_5 is range -2 ** 4 .. 2 ** 4 - 1;
for Signed_5'Size use 5;
type Signed_6 is range -2 ** 5 .. 2 ** 5 - 1;
for Signed_6'Size use 6;
type Signed_7 is range -2 ** 6 .. 2 ** 6 - 1;
for Signed_7'Size use 7;
type Signed_8 is range -2 ** 7 .. 2 ** 7 - 1;
for Signed_8'Size use 8;
type Signed_9 is range -2 ** 8 .. 2 ** 8 - 1;
for Signed_9'Size use 9;
type Signed_10 is range -2 ** 9 .. 2 ** 9 - 1;
for Signed_10'Size use 10;
type Signed_11 is range -2 ** 10 .. 2 ** 10 - 1;
for Signed_11'Size use 11;
type Signed_12 is range -2 ** 11 .. 2 ** 11 - 1;
for Signed_12'Size use 12;
type Signed_13 is range -2 ** 12 .. 2 ** 12 - 1;
for Signed_13'Size use 13;
type Signed_14 is range -2 ** 13 .. 2 ** 13 - 1;
for Signed_14'Size use 14;
type Signed_15 is range -2 ** 14 .. 2 ** 14 - 1;
for Signed_15'Size use 15;
type Signed_16 is range -2 ** 15 .. 2 ** 15 - 1;
for Signed_16'Size use 16;
type Signed_17 is range -2 ** 16 .. 2 ** 16 - 1;
for Signed_17'Size use 17;
type Signed_18 is range -2 ** 17 .. 2 ** 17 - 1;
for Signed_18'Size use 18;
type Signed_19 is range -2 ** 18 .. 2 ** 18 - 1;
for Signed_19'Size use 19;
type Signed_20 is range -2 ** 19 .. 2 ** 19 - 1;
for Signed_20'Size use 20;
type Signed_21 is range -2 ** 20 .. 2 ** 20 - 1;
for Signed_21'Size use 21;
type Signed_22 is range -2 ** 21 .. 2 ** 21 - 1;
for Signed_22'Size use 22;
type Signed_23 is range -2 ** 22 .. 2 ** 22 - 1;
for Signed_23'Size use 23;
type Signed_24 is range -2 ** 23 .. 2 ** 23 - 1;
for Signed_24'Size use 24;
type Signed_25 is range -2 ** 24 .. 2 ** 24 - 1;
for Signed_25'Size use 25;
type Signed_26 is range -2 ** 25 .. 2 ** 25 - 1;
for Signed_26'Size use 26;
type Signed_27 is range -2 ** 26 .. 2 ** 26 - 1;
for Signed_27'Size use 27;
type Signed_28 is range -2 ** 27 .. 2 ** 27 - 1;
for Signed_28'Size use 28;
type Signed_29 is range -2 ** 28 .. 2 ** 28 - 1;
for Signed_29'Size use 29;
type Signed_30 is range -2 ** 29 .. 2 ** 29 - 1;
for Signed_30'Size use 30;
type Signed_31 is range -2 ** 30 .. 2 ** 30 - 1;
for Signed_31'Size use 31;
type Signed_32 is range -2 ** 31 .. 2 ** 31 - 1;
for Signed_32'Size use 32;
type Signed_33 is range -2 ** 32 .. 2 ** 32 - 1;
for Signed_33'Size use 33;
type Signed_34 is range -2 ** 33 .. 2 ** 33 - 1;
for Signed_34'Size use 34;
type Signed_35 is range -2 ** 34 .. 2 ** 34 - 1;
for Signed_35'Size use 35;
type Signed_36 is range -2 ** 35 .. 2 ** 35 - 1;
for Signed_36'Size use 36;
type Signed_37 is range -2 ** 36 .. 2 ** 36 - 1;
for Signed_37'Size use 37;
type Signed_38 is range -2 ** 37 .. 2 ** 37 - 1;
for Signed_38'Size use 38;
type Signed_39 is range -2 ** 38 .. 2 ** 38 - 1;
for Signed_39'Size use 39;
type Signed_40 is range -2 ** 39 .. 2 ** 39 - 1;
for Signed_40'Size use 40;
type Signed_41 is range -2 ** 40 .. 2 ** 40 - 1;
for Signed_41'Size use 41;
type Signed_42 is range -2 ** 41 .. 2 ** 41 - 1;
for Signed_42'Size use 42;
type Signed_43 is range -2 ** 42 .. 2 ** 42 - 1;
for Signed_43'Size use 43;
type Signed_44 is range -2 ** 43 .. 2 ** 43 - 1;
for Signed_44'Size use 44;
type Signed_45 is range -2 ** 44 .. 2 ** 44 - 1;
for Signed_45'Size use 45;
type Signed_46 is range -2 ** 45 .. 2 ** 45 - 1;
for Signed_46'Size use 46;
type Signed_47 is range -2 ** 46 .. 2 ** 46 - 1;
for Signed_47'Size use 47;
type Signed_48 is range -2 ** 47 .. 2 ** 47 - 1;
for Signed_48'Size use 48;
type Signed_49 is range -2 ** 48 .. 2 ** 48 - 1;
for Signed_49'Size use 49;
type Signed_50 is range -2 ** 49 .. 2 ** 49 - 1;
for Signed_50'Size use 50;
type Signed_51 is range -2 ** 50 .. 2 ** 50 - 1;
for Signed_51'Size use 51;
type Signed_52 is range -2 ** 51 .. 2 ** 51 - 1;
for Signed_52'Size use 52;
type Signed_53 is range -2 ** 52 .. 2 ** 52 - 1;
for Signed_53'Size use 53;
type Signed_54 is range -2 ** 53 .. 2 ** 53 - 1;
for Signed_54'Size use 54;
type Signed_55 is range -2 ** 54 .. 2 ** 54 - 1;
for Signed_55'Size use 55;
type Signed_56 is range -2 ** 55 .. 2 ** 55 - 1;
for Signed_56'Size use 56;
type Signed_57 is range -2 ** 56 .. 2 ** 56 - 1;
for Signed_57'Size use 57;
type Signed_58 is range -2 ** 57 .. 2 ** 57 - 1;
for Signed_58'Size use 58;
type Signed_59 is range -2 ** 58 .. 2 ** 58 - 1;
for Signed_59'Size use 59;
type Signed_60 is range -2 ** 59 .. 2 ** 59 - 1;
for Signed_60'Size use 60;
type Signed_61 is range -2 ** 60 .. 2 ** 60 - 1;
for Signed_61'Size use 61;
type Signed_62 is range -2 ** 61 .. 2 ** 61 - 1;
for Signed_62'Size use 62;
type Signed_63 is range -2 ** 62 .. 2 ** 62 - 1;
for Signed_63'Size use 63;
type Signed_64 is range -2 ** 63 .. 2 ** 63 - 1;
for Signed_64'Size use 64;
end Interfaces.C.Extensions;
| 29.077568 | 78 | 0.589978 |
df1e35fd020ed900c018ca2cf4e2fce48662f4c5 | 1,734 | adb | Ada | gdb/testsuite/gdb.ada/same_component_name/pck.adb | greyblue9/binutils-gdb | 05377632b124fe7600eea7f4ee0e9a35d1b0cbdc | [
"BSD-3-Clause"
] | 1 | 2020-10-14T03:24:35.000Z | 2020-10-14T03:24:35.000Z | gdb/testsuite/gdb.ada/same_component_name/pck.adb | greyblue9/binutils-gdb | 05377632b124fe7600eea7f4ee0e9a35d1b0cbdc | [
"BSD-3-Clause"
] | null | null | null | gdb/testsuite/gdb.ada/same_component_name/pck.adb | greyblue9/binutils-gdb | 05377632b124fe7600eea7f4ee0e9a35d1b0cbdc | [
"BSD-3-Clause"
] | null | null | null | -- Copyright 2010-2021 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with System;
package body Pck is
package body Top is
procedure Assign (Obj: in out Top_T; TV : Integer) is
begin
Do_Nothing (Obj'Address); -- BREAK_TOP
end Assign;
end Top;
package body Middle is
procedure Assign (Obj: in out Middle_T; MV : Character) is
begin
Do_Nothing (Obj'Address); -- BREAK_MIDDLE
end Assign;
end Middle;
procedure Assign (Obj: in out Bottom_T; BV : Float) is
begin
Do_Nothing (Obj'Address); -- BREAK_BOTTOM
end Assign;
procedure Do_Nothing (A : System.Address) is
begin
null;
end Do_Nothing;
package body Dyn_Top is
procedure Assign (Obj: in out Dyn_Top_T; TV : Integer) is
begin
Do_Nothing (Obj'Address); -- BREAK_DYN_TOP
end Assign;
end Dyn_Top;
package body Dyn_Middle is
procedure Assign (Obj: in out Dyn_Middle_T; MV : Character) is
begin
Do_Nothing (Obj'Address); -- BREAK_DYN_MIDDLE
end Assign;
end Dyn_Middle;
end Pck;
| 29.896552 | 73 | 0.679931 |
4a9f3581c5cdfde3394c95c3fb2696e843d1cec6 | 945 | adb | Ada | build_gnu/binutils/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | 1 | 2017-05-31T21:42:12.000Z | 2017-05-31T21:42:12.000Z | build_gnu/binutils/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | null | null | null | build_gnu/binutils/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | 1 | 2019-12-17T22:04:07.000Z | 2019-12-17T22:04:07.000Z | -- Copyright 2014 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck; use Pck;
procedure Foo is
-- The goal here is to have an array whose bounds are not
-- known at compile time.
BT : Bounded := New_Bounded (Low => 1, High => 3);
begin
Do_Nothing (BT'Address); -- STOP
end Foo;
| 37.8 | 73 | 0.714286 |
1811be605cfc1609f1652d8a098bdaef7897ff8e | 751 | adb | Ada | tests/thread/main.adb | danva994/ASFML-1.6 | bd74ae700843338a15aef295f99297b866aa0c93 | [
"Zlib"
] | 1 | 2017-10-07T06:20:38.000Z | 2017-10-07T06:20:38.000Z | tests/thread/main.adb | danva994/ASFML-1.6 | bd74ae700843338a15aef295f99297b866aa0c93 | [
"Zlib"
] | 3 | 2020-09-15T21:19:34.000Z | 2022-03-02T23:13:46.000Z | tests/thread/main.adb | danva994/ASFML-1.6 | bd74ae700843338a15aef295f99297b866aa0c93 | [
"Zlib"
] | 2 | 2020-09-26T21:16:43.000Z | 2022-01-16T19:36:48.000Z | with Ada.Text_IO; use Ada.Text_IO;
with Sf.Config; use Sf.Config;
with Sf.System.Thread; use Sf.System.Thread;
with Sf.System.Sleep; use Sf.System.Sleep;
with Sf.System.Types; use Sf.System.Types;
procedure Main is
procedure Thread_Func (Arg : sfVoid_Ptr) is
begin
for I in 1 .. 10 loop
Put_Line ("I'm thread 1");
sfSleep (0.001);
end loop;
end Thread_Func;
Thread : sfThread_Ptr;
TFunc : sfThreadFunc_Ptr := Thread_Func'UNRESTRICTED_ACCESS;
UData : sfVoid_Ptr;
begin
Thread := sfThread_Create (TFunc, UData);
sfThread_Launch (Thread);
for I in 1 .. 10 loop
Put_Line ("I'm main thread");
sfSleep (0.001);
end loop;
sfThread_Destroy (Thread);
end Main;
| 22.088235 | 64 | 0.651132 |
4ac0e114f7d546e9f8de124094eed850385aeddd | 231 | ads | Ada | tools/gen/gen.ads | reznikmm/ada_lsp | b0e2666f758d6e46b973b5d7e4b9a7ba66c46157 | [
"MIT"
] | 11 | 2017-10-18T18:22:04.000Z | 2022-01-01T12:22:23.000Z | tools/gen/gen.ads | reznikmm/ada_lsp | b0e2666f758d6e46b973b5d7e4b9a7ba66c46157 | [
"MIT"
] | null | null | null | tools/gen/gen.ads | reznikmm/ada_lsp | b0e2666f758d6e46b973b5d7e4b9a7ba66c46157 | [
"MIT"
] | 1 | 2019-09-14T23:13:33.000Z | 2019-09-14T23:13:33.000Z | -- Copyright (c) 2015-2017 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package Gen is
pragma Pure;
end Gen;
| 23.1 | 61 | 0.515152 |
103d9b779f001082d15f5282665cca4ebff802d3 | 721 | ads | Ada | source/asis/spec/ada-integer_text_io.ads | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | 4 | 2016-02-05T15:51:56.000Z | 2022-03-25T20:38:32.000Z | source/asis/spec/ada-integer_text_io.ads | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | null | null | null | source/asis/spec/ada-integer_text_io.ads | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- 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) $
with Ada.Text_IO;
package Ada.Integer_Text_IO is new Ada.Text_IO.Integer_IO (Integer);
| 48.066667 | 78 | 0.346741 |
23b61eb555001c71d2096b3343896c437931b30c | 106 | ads | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/loop_optimization14_pkg.ads | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/loop_optimization14_pkg.ads | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/loop_optimization14_pkg.ads | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | package Loop_Optimization14_Pkg is
procedure Proc (B : in out Boolean);
end Loop_Optimization14_Pkg;
| 17.666667 | 39 | 0.792453 |
cb9c9fa7d0bdd66ddf55276f678058a41b5612c1 | 1,152 | adb | Ada | src/base/events/util-events.adb | yrashk/ada-util | 2aaa1d87e92a7137e1c63dce90f0722c549dfafd | [
"Apache-2.0"
] | 60 | 2015-01-18T23:05:34.000Z | 2022-03-20T18:56:30.000Z | src/base/events/util-events.adb | yrashk/ada-util | 2aaa1d87e92a7137e1c63dce90f0722c549dfafd | [
"Apache-2.0"
] | 20 | 2016-09-15T16:41:30.000Z | 2022-03-29T22:02:32.000Z | src/base/events/util-events.adb | yrashk/ada-util | 2aaa1d87e92a7137e1c63dce90f0722c549dfafd | [
"Apache-2.0"
] | 10 | 2015-02-13T04:00:45.000Z | 2022-03-20T18:57:54.000Z | -----------------------------------------------------------------------
-- util-events -- Events
-- Copyright (C) 2001, 2002, 2003, 2009, 2010 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
package body Util.Events is
-- ------------------------------
-- Get the time identifying when the event was created.
-- ------------------------------
function Get_Time (Ev : Event) return Ada.Calendar.Time is
begin
return Ev.Date;
end Get_Time;
end Util.Events;
| 39.724138 | 76 | 0.585069 |
4a40231c74333e60ab62778f5a3058a6fa209f33 | 14,555 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c67002c.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c67002c.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c67002c.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- C67002C.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 ALL OPERATOR SYMBOLS CAN BE USED IN (OVERLOADED)
-- FUNCTION SPECIFICATIONS WITH THE REQUIRED NUMBER OF PARAMETERS.
-- THIS TEST CHECKS FORMAL SUBPROGRAM PARAMETERS.
-- SUBTESTS ARE:
-- (A) THROUGH (P): "=", "AND", "OR", "XOR", "<", "<=",
-- ">", ">=", "&", "*", "/", "MOD", "REM", "**", "+", "-",
-- RESPECTIVELY. ALL OF THESE HAVE TWO PARAMETERS.
-- (Q), (R), (S), AND (T): "+", "-", "NOT", "ABS", RESPECTIVELY,
-- WITH ONE PARAMETER.
-- CPP 6/26/84
WITH REPORT; USE REPORT;
PROCEDURE C67002C IS
FUNCTION TWO_PARAMS (I1, I2 : INTEGER) RETURN CHARACTER IS
BEGIN
IF I1 > I2 THEN
RETURN 'G';
ELSE RETURN 'L';
END IF;
END TWO_PARAMS;
FUNCTION ONE_PARAM (I1 : INTEGER) RETURN CHARACTER IS
BEGIN
IF I1 < IDENT_INT(0) THEN
RETURN 'N';
ELSE RETURN 'P';
END IF;
END ONE_PARAM;
BEGIN
TEST ("C67002C", "USE OF OPERATOR SYMBOLS IN " &
"(OVERLOADED) FUNCTION SPECIFICATIONS");
-------------------------------------------------
DECLARE -- (A)
PACKAGE EQU IS
TYPE LP IS LIMITED PRIVATE;
FUNCTION "=" (LPA, LPB : LP) RETURN BOOLEAN;
PRIVATE
TYPE LP IS NEW INTEGER;
END EQU;
USE EQU;
LP1, LP2 : LP;
PACKAGE BODY EQU IS
FUNCTION "=" (LPA, LPB : LP) RETURN BOOLEAN IS
BEGIN
RETURN LPA > LPB;
END "=";
BEGIN
LP1 := LP (IDENT_INT (7));
LP2 := LP (IDENT_INT (8));
END EQU;
GENERIC
WITH FUNCTION "=" (LPA, LPB : LP) RETURN BOOLEAN;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (LP1 = LP2) OR NOT (LP2 = LP1) OR
(LP1 = LP1) OR (LP2 /= LP1) THEN
FAILED ("OVERLOADING OF ""="" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE EQUAL IS NEW PKG ("=" => EQU."=");
BEGIN -- (A)
NULL;
END; -- (A)
-------------------------------------------------
DECLARE -- (B)
GENERIC
WITH FUNCTION "AND" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) AND 1) /= 'G' OR
(5 AND 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""AND"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("AND" => TWO_PARAMS);
BEGIN -- (B)
NULL;
END; -- (B)
-------------------------------------------------
DECLARE -- (C)
GENERIC
WITH FUNCTION "OR" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) OR 1) /= 'G' OR
(5 OR 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""OR"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("OR" => TWO_PARAMS);
BEGIN -- (C)
NULL;
END; -- (C)
-------------------------------------------------
DECLARE -- (D)
GENERIC
WITH FUNCTION "XOR" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) XOR 1) /= 'G' OR
(5 XOR 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""XOR"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("XOR" => TWO_PARAMS);
BEGIN -- (D)
NULL;
END; -- (D)
-------------------------------------------------
DECLARE -- (E)
GENERIC
WITH FUNCTION "<" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) < 1) /= 'G' OR
(5 < 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""<"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("<" => TWO_PARAMS);
BEGIN -- (E)
NULL;
END; -- (E)
-------------------------------------------------
DECLARE -- (F)
GENERIC
WITH FUNCTION "<=" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) <= 1) /= 'G' OR
(5 <= 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""<="" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("<=" => TWO_PARAMS);
BEGIN -- (F)
NULL;
END; -- (F)
-------------------------------------------------
DECLARE -- (G)
GENERIC
WITH FUNCTION ">" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) > 1) /= 'G' OR
(5 > 10) /= 'L' THEN
FAILED ("OVERLOADING OF "">"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG (">" => TWO_PARAMS);
BEGIN -- (G)
NULL;
END; -- (G)
-------------------------------------------------
DECLARE -- (H)
GENERIC
WITH FUNCTION ">=" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) >= 1) /= 'G' OR
(5 >= 10) /= 'L' THEN
FAILED ("OVERLOADING OF "">="" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG (">=" => TWO_PARAMS);
BEGIN -- (H)
NULL;
END; -- (H)
-------------------------------------------------
DECLARE -- (I)
GENERIC
WITH FUNCTION "&" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) & 1) /= 'G' OR
(5 & 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""&"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("&" => TWO_PARAMS);
BEGIN -- (I)
NULL;
END; -- (I)
-------------------------------------------------
DECLARE -- (J)
GENERIC
WITH FUNCTION "*" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) * 1) /= 'G' OR
(5 * 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""*"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("*" => TWO_PARAMS);
BEGIN -- (J)
NULL;
END; -- (J)
-------------------------------------------------
DECLARE -- (K)
GENERIC
WITH FUNCTION "/" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) / 1) /= 'G' OR
(5 / 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""/"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("/" => TWO_PARAMS);
BEGIN -- (K)
NULL;
END; -- (K)
-------------------------------------------------
DECLARE -- (L)
GENERIC
WITH FUNCTION "MOD" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) MOD 1) /= 'G' OR
(5 MOD 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""MOD"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("MOD" => TWO_PARAMS);
BEGIN -- (L)
NULL;
END; -- (L)
-------------------------------------------------
DECLARE -- (M)
GENERIC
WITH FUNCTION "REM" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) REM 1) /= 'G' OR
(5 REM 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""REM"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("REM" => TWO_PARAMS);
BEGIN -- (M)
NULL;
END; -- (M)
-------------------------------------------------
DECLARE -- (N)
GENERIC
WITH FUNCTION "**" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) ** 1) /= 'G' OR
(5 ** 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""**"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("**" => TWO_PARAMS);
BEGIN -- (N)
NULL;
END; -- (N)
-------------------------------------------------
DECLARE -- (O)
GENERIC
WITH FUNCTION "+" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) + 1) /= 'G' OR
(5 + 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""+"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("+" => TWO_PARAMS);
BEGIN -- (O)
NULL;
END; -- (O)
-------------------------------------------------
DECLARE -- (P)
GENERIC
WITH FUNCTION "-" (I1, I2 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (IDENT_INT (10) - 1) /= 'G' OR
(5 - 10) /= 'L' THEN
FAILED ("OVERLOADING OF ""-"" OPERATOR DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("-" => TWO_PARAMS);
BEGIN -- (P)
NULL;
END; -- (P)
-------------------------------------------------
DECLARE -- (Q)
GENERIC
WITH FUNCTION "+" (I1 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (+ IDENT_INT(25) /= 'P') OR
(+ (0-25) /= 'N') THEN
FAILED ("OVERLOADING OF ""+"" " &
"OPERATOR (ONE OPERAND) DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("+" => ONE_PARAM);
BEGIN -- (Q)
NULL;
END; -- (Q)
-------------------------------------------------
DECLARE -- (R)
GENERIC
WITH FUNCTION "-" (I1 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (- IDENT_INT(25) /= 'P') OR
(- (0-25) /= 'N') THEN
FAILED ("OVERLOADING OF ""-"" " &
"OPERATOR (ONE OPERAND) DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("-" => ONE_PARAM);
BEGIN -- (R)
NULL;
END; -- (R)
-------------------------------------------------
DECLARE -- (S)
GENERIC
WITH FUNCTION "NOT" (I1 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (NOT IDENT_INT(25) /= 'P') OR
(NOT (0-25) /= 'N') THEN
FAILED ("OVERLOADING OF ""NOT"" " &
"OPERATOR (ONE OPERAND) DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("NOT" => ONE_PARAM);
BEGIN -- (S)
NULL;
END; -- (S)
-------------------------------------------------
DECLARE -- (T)
GENERIC
WITH FUNCTION "ABS" (I1 : INTEGER) RETURN CHARACTER;
PACKAGE PKG IS
END PKG;
PACKAGE BODY PKG IS
BEGIN
IF (ABS IDENT_INT(25) /= 'P') OR
(ABS (0-25) /= 'N') THEN
FAILED ("OVERLOADING OF ""ABS"" " &
"OPERATOR (ONE OPERAND) DEFECTIVE");
END IF;
END PKG;
PACKAGE PACK IS NEW PKG ("ABS" => ONE_PARAM);
BEGIN -- (T)
NULL;
END; -- (T)
-------------------------------------------------
RESULT;
END C67002C;
| 26.51184 | 79 | 0.40687 |
d0e8c076398828978e6293f5cc946312a2be603a | 841 | adb | Ada | Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/str_uninit/parse.adb | samyvic/OS-Project | 1622bc1641876584964effd91d65ef02e92728e1 | [
"Apache-2.0"
] | null | null | null | Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/str_uninit/parse.adb | samyvic/OS-Project | 1622bc1641876584964effd91d65ef02e92728e1 | [
"Apache-2.0"
] | null | null | null | Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/str_uninit/parse.adb | samyvic/OS-Project | 1622bc1641876584964effd91d65ef02e92728e1 | [
"Apache-2.0"
] | null | null | null | -- Copyright 2014-2017 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck; use Pck;
procedure Parse is
My_Str : String := Foos; -- START
begin
Do_Nothing (My_Str'Address);
end Parse;
| 36.565217 | 73 | 0.730083 |
0ef10835b6043441e51866183b27a74afb46474c | 620 | ads | Ada | tests/combat-test_data-tests.ads | thindil/steamsky | d5d7fea622f7994c91017c4cd7ba5e188153556c | [
"TCL",
"MIT"
] | 80 | 2017-04-08T23:14:07.000Z | 2022-02-10T22:30:51.000Z | tests/combat-test_data-tests.ads | thindil/steamsky | d5d7fea622f7994c91017c4cd7ba5e188153556c | [
"TCL",
"MIT"
] | 89 | 2017-06-24T08:18:26.000Z | 2021-11-12T04:37:36.000Z | tests/combat-test_data-tests.ads | thindil/steamsky | d5d7fea622f7994c91017c4cd7ba5e188153556c | [
"TCL",
"MIT"
] | 9 | 2018-04-14T16:37:25.000Z | 2020-03-21T14:33:49.000Z | -- This package has been generated automatically by GNATtest.
-- Do not edit any part of it, see GNATtest documentation for more details.
-- begin read only
with Gnattest_Generated;
package Combat.Test_Data.Tests is
type Test is new GNATtest_Generated.GNATtest_Standard.Combat.Test_Data
.Test with
null record;
procedure Test_StartCombat_523cd4_1d4469(Gnattest_T: in out Test);
-- combat.ads:154:4:StartCombat:Test_StartCombat
procedure Test_CombatTurn_4b34b0_e12d30(Gnattest_T: in out Test);
-- combat.ads:165:4:CombatTurn:Test_CombatTurn
end Combat.Test_Data.Tests;
-- end read only
| 29.52381 | 76 | 0.774194 |
dcd1f7210bae1da81e568fd8778363aa93b24487 | 640 | ads | Ada | src/tests/gpucomponentlabelingtests.ads | sebsgit/textproc | 2f12d6a030425e937ee0c6a67dcff6828fc1331f | [
"MIT"
] | null | null | null | src/tests/gpucomponentlabelingtests.ads | sebsgit/textproc | 2f12d6a030425e937ee0c6a67dcff6828fc1331f | [
"MIT"
] | null | null | null | src/tests/gpucomponentlabelingtests.ads | sebsgit/textproc | 2f12d6a030425e937ee0c6a67dcff6828fc1331f | [
"MIT"
] | null | null | null | with AUnit; use AUnit;
with AUnit.Test_Cases; use AUnit.Test_Cases;
package GpuComponentLabelingTests is
type TestCase is new AUnit.Test_Cases.Test_Case with null record;
procedure Register_Tests(T: in out TestCase);
function Name(T: TestCase) return Message_String;
procedure initOpenCL(T: in out Test_Cases.Test_Case'Class);
procedure testCreateContext(T: in out Test_Cases.Test_Case'Class);
procedure testDetection(T: in out Test_Cases.Test_Case'Class);
procedure testFullPipeline(T: in out Test_Cases.Test_Case'Class);
procedure cleanup(T: in out Test_Cases.Test_Case'Class);
end GpuComponentLabelingTests;
| 35.555556 | 69 | 0.792188 |
0e93649d7af6838e1ea4cc088a3cd5872a721593 | 2,470 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c87b07d.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c87b07d.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c87b07d.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- C87B07D.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 OVERLOADING RESOLUTION USES THE RULE THAT:
--
-- THE ATTRIBUTES OF THE FORM T'SUCC (X) AND T'PRED (X) TAKE AN
-- OPERAND X OF TYPE T AND RETURN A VALUE OF TYPE T.
-- TRH 15 SEPT 82
WITH REPORT; USE REPORT;
PROCEDURE C87B07D IS
TYPE NEW_INT IS NEW INTEGER;
TYPE WHOLE IS NEW INTEGER RANGE 0 .. INTEGER'LAST;
FUNCTION "+" (X, Y : WHOLE) RETURN WHOLE
RENAMES "*";
FUNCTION "+" (X, Y : NEW_INT) RETURN NEW_INT
RENAMES "-";
BEGIN
TEST ("C87B07D","OVERLOADED OPERANDS TO THE ATTRIBUTES " &
"'PRED' AND 'SUCC'");
IF INTEGER'SUCC (1 + 1) /= 3 OR INTEGER'SUCC (3 + 3) + 1 /= 8 OR
NEW_INT'SUCC (1 + 1) /= 1 OR NEW_INT'SUCC (3 + 3) + 1 /= 0 OR
WHOLE'SUCC (1 + 1) /= 2 OR WHOLE'SUCC (3 + 3) + 1 /= 10 OR
INTEGER'PRED (1 + 1) /= 1 OR INTEGER'PRED (3 + 3) + 1 /= 6 OR
NEW_INT'PRED (1 + 1) /= -1 OR NEW_INT'PRED (3 + 3) + 1 /= -2 OR
WHOLE'PRED (1 + 1) /= 0 OR WHOLE'PRED (3 + 3) + 1 /= 8
THEN FAILED ("RESOLUTION INCORRECT FOR OPERAND OR RESULT OF" &
" THE 'PRED' OR 'SUCC' ATTRIBUTE");
END IF;
RESULT;
END C87B07D;
| 41.166667 | 79 | 0.607287 |
10cd4cea6aba7b92657262137aed18e52cb10936 | 220 | adb | Ada | Pruebas/test.adb | Arles96/PCompiladores | e435b9f5169589badf289b44a62f76d03438fa6e | [
"MIT"
] | null | null | null | Pruebas/test.adb | Arles96/PCompiladores | e435b9f5169589badf289b44a62f76d03438fa6e | [
"MIT"
] | null | null | null | Pruebas/test.adb | Arles96/PCompiladores | e435b9f5169589badf289b44a62f76d03438fa6e | [
"MIT"
] | 1 | 2021-03-28T22:41:49.000Z | 2021-03-28T22:41:49.000Z | procedure Numbers is
Mike, Alice: Integer;
John_Smith: Integer;
F: Float := 1.0;
procedure x2 (x3:Integer) is
x: Integer := 1;
begin
Mike := 1;
end x2;
begin
x2(Alice, 2, 3);
end Numbers; | 18.333333 | 32 | 0.586364 |
180dab077672b174e1e09ea7b38a5bf06df5ce27 | 6,725 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c64103d.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c64103d.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c64103d.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- C64103D.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT THE APPROPRIATE EXCEPTION IS RAISED FOR TYPE CONVERSIONS
-- ON OUT ARRAY PARAMETERS. IN PARTICULAR:
-- (A) CONSTRAINT_ERROR IS RAISED BEFORE THE CALL WHEN THE ACTUAL
-- COMPONENT'S CONSTRAINTS DIFFER FROM THE FORMAL COMPONENT'S
-- CONSTRAINTS.
-- (B) CONSTRAINT_ERROR IS RAISED BEFORE THE CALL WHEN CONVERSION TO
-- AN UNCONSTRAINED ARRAY TYPE CAUSES AN ACTUAL INDEX BOUND TO LIE
-- OUTSIDE OF A FORMAL INDEX SUBTYPE.
-- (C) CONSTRAINT_ERROR IS RAISED BEFORE THE CALL FOR CONVERSION TO A
-- CONSTRAINED ARRAY TYPE WHEN THE NUMBER OF COMPONENTS PER
-- DIMENSION OF THE ACTUAL DIFFERS FROM THAT OF THE FORMAL.
-- (D) CONSTRAINT_ERROR IS RAISED BEFORE THE CALL WHEN CONVERSION TO AN
-- UNCONSTRAINED ARRAY TYPE CAUSES AN ACTUAL INDEX BOUND TO LIE
-- OUTSIDE OF THE BASE INDEX TYPE OF THE FORMAL.
-- *** NOTE: This test has been modified since ACVC version 1.11 to -- 9X
-- *** remove incompatibilities associated with the transition -- 9X
-- *** to Ada 9X. -- 9X
-- *** -- 9X
-- CPP 07/19/84
-- EG 10/29/85 FIX NUMERIC_ERROR/CONSTRAINT_ERROR ACCORDING TO
-- AI-00387.
-- MRM 03/30/93 REMOVED NUMERIC_ERROR FOR 9X COMPATIBILITY
-- PWN 01/31/95 REMOVED INCONSISTENCIES WITH ADA 9X.
WITH SYSTEM;
WITH REPORT; USE REPORT;
PROCEDURE C64103D IS
BEGIN
TEST ("C64103D", "CHECK THAT APPROPRIATE EXCEPTION IS RAISED ON " &
"TYPE CONVERSIONS OF OUT ARRAY PARAMETERS");
-----------------------------------------------
DECLARE -- (A)
BEGIN -- (A)
DECLARE
TYPE SUBINT IS RANGE 0..8;
TYPE ARRAY_TYPE IS ARRAY (SUBINT RANGE <>) OF BOOLEAN;
A0 : ARRAY_TYPE (0..3) := (0..3 => TRUE);
PROCEDURE P2 (X : OUT ARRAY_TYPE) IS
BEGIN
NULL;
END P2;
BEGIN
P2 (ARRAY_TYPE (A0)); -- OK.
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED -P2 (A)");
END;
END; -- (A)
-----------------------------------------------
DECLARE -- (B)
TYPE SUBINT IS RANGE 0..8;
TYPE ARRAY_TYPE IS ARRAY (SUBINT RANGE <>) OF BOOLEAN;
TYPE AR1 IS ARRAY (INTEGER RANGE <>) OF BOOLEAN;
A1 : AR1 (-1..7) := (-1..7 => TRUE);
A2 : AR1 (1..9) := (1..9 => TRUE);
PROCEDURE P1 (X : OUT ARRAY_TYPE) IS
BEGIN
FAILED ("EXCEPTION NOT RAISED BEFORE CALL -P1 (B)");
END P1;
BEGIN -- (B)
BEGIN
COMMENT ("CALL TO P1 (B) ON A1");
P1 (ARRAY_TYPE (A1));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED -P1 (B)");
END;
BEGIN
COMMENT ("CALL TO P1 (B) ON A2");
P1 (ARRAY_TYPE (A2));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED -P1 (B)");
END;
END; -- (B)
-----------------------------------------------
DECLARE -- (C)
BEGIN -- (C)
DECLARE
TYPE INDEX1 IS RANGE 1..3;
TYPE INDEX2 IS RANGE 1..4;
TYPE AR_TYPE IS ARRAY (INDEX1, INDEX2) OF BOOLEAN;
A0 : AR_TYPE := (1..3 => (1..4 => FALSE));
TYPE I1 IS RANGE 1..4;
TYPE I2 IS RANGE 1..3;
TYPE ARRAY_TYPE IS ARRAY (I1, I2) OF BOOLEAN;
PROCEDURE P1 (X : OUT ARRAY_TYPE) IS
BEGIN
FAILED ("EXCEPTION NOT RAISED BEFORE CALL -P1 (C)");
END P1;
BEGIN
P1 (ARRAY_TYPE (A0));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED -P1 (C)");
END;
END; -- (C)
-----------------------------------------------
DECLARE -- (D)
BEGIN -- (D)
DECLARE
TYPE SM_INT IS RANGE 0..2;
TYPE LG_INT IS RANGE SYSTEM.MIN_INT..SYSTEM.MAX_INT;
TYPE AR_SMALL IS ARRAY (SM_INT RANGE <>) OF BOOLEAN;
TYPE AR_LARGE IS ARRAY (LG_INT RANGE <>) OF BOOLEAN;
A0 : AR_LARGE (SYSTEM.MAX_INT - 2..SYSTEM.MAX_INT) :=
(SYSTEM.MAX_INT - 2..SYSTEM.MAX_INT => TRUE);
PROCEDURE P1 (X : OUT AR_SMALL) IS
BEGIN
FAILED ("EXCEPTION NOT RAISED BEFORE CALL -P1 (D)");
END P1;
BEGIN
IF LG_INT (SM_INT'BASE'LAST) < LG_INT'BASE'LAST THEN
P1 (AR_SMALL (A0));
ELSE
COMMENT ("NOT APPLICABLE -P1 (D)");
END IF;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
COMMENT ("CONSTRAINT_ERROR RAISED - P1 (D)");
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - P1 (D)");
END;
END; -- (D)
-----------------------------------------------
RESULT;
END C64103D;
| 35.771277 | 79 | 0.506171 |
dffa1aa2b349520d59a16b24a45ccd9995eff5da | 2,274 | adb | Ada | 3-mid/opengl/applet/demo/models/render_arrows/launch_render_arrows.adb | charlie5/lace | e9b7dc751d500ff3f559617a6fc3089ace9dc134 | [
"0BSD"
] | 20 | 2015-11-04T09:23:59.000Z | 2022-01-14T10:21:42.000Z | 3-mid/opengl/applet/demo/models/render_arrows/launch_render_arrows.adb | charlie5/lace | e9b7dc751d500ff3f559617a6fc3089ace9dc134 | [
"0BSD"
] | 2 | 2015-11-04T17:05:56.000Z | 2015-12-08T03:16:13.000Z | 3-mid/opengl/applet/demo/models/render_arrows/launch_render_arrows.adb | charlie5/lace | e9b7dc751d500ff3f559617a6fc3089ace9dc134 | [
"0BSD"
] | 1 | 2015-12-07T12:53:52.000Z | 2015-12-07T12:53:52.000Z | with
openGL.Visual,
openGL.Model.Arrow.colored,
openGL.Demo;
procedure launch_render_Arrows
--
-- Exercise the render of arrow models.
--
is
use openGL,
openGL.Model,
openGL.Math,
openGL.linear_Algebra_3d;
begin
Demo.print_Usage;
Demo.define ("openGL 'Render Arrows' Demo");
Demo.Camera.Position_is ((0.0, 0.0, 10.0),
y_Rotation_from (to_Radians (0.0)));
declare
-- The Models.
--
the_Arrow_Model : constant Model.Arrow.colored.view
:= Model.Arrow.colored.new_Arrow (End_2 => (0.0, 5.0, 0.0));
the_spinner_Arrow_Model : constant Model.Arrow.colored.view
:= Model.Arrow.colored.new_Arrow (End_1 => (0.0, -2.5, 0.0),
End_2 => (0.0, 2.5, 0.0));
-- The Sprites.
--
use openGL.Visual.Forge;
the_Sprites : constant openGL.Visual.views := (new_Visual ( the_Arrow_Model.all'Access),
new_Visual (the_spinner_Arrow_Model.all'Access));
Angle : Radians := 0.0;
Site : openGL.Vector_2;
use openGL.Geometry_2d;
begin
-- Main loop.
--
while not Demo.Done
loop
Site := to_Site (polar_Site' (Angle => Angle,
Extent => 5.0));
the_Arrow_Model.End_Site_is (Now => math.Vector_3 (Site & 0.0),
for_End => 2);
the_Sprites (2).Spin_is (to_Rotation (Axis => (0.0, 0.0, 1.0),
Angle => Angle));
-- Handle user commands.
--
Demo.Dolly.evolve;
Demo.Done := Demo.Dolly.quit_Requested;
-- Render the sprites.
--
Demo.Camera.render (the_Sprites);
while not Demo.Camera.cull_Completed
loop
delay Duration'Small;
end loop;
Demo.Renderer.render;
Demo.FPS_Counter.increment; -- Frames per second display.
Angle := Angle + 0.001;
if Angle >= to_Radians (Degrees' (360.0))
then
Angle := 0.0;
end if;
end loop;
end;
Demo.destroy;
end launch_render_Arrows;
| 28.425 | 102 | 0.515391 |
Subsets and Splits