CombinedText
stringlengths 4
3.42M
|
|---|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- G N A T . S E C O N D A R Y _ S T A C K _ I N F O --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-2020, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package provides facilities for obtaining information on secondary
-- stack usage. See System.Secondary_Stack for documentation.
with System.Secondary_Stack;
package GNAT.Secondary_Stack_Info is
function SS_Get_Max return Long_Long_Integer
renames System.Secondary_Stack.SS_Get_Max;
end GNAT.Secondary_Stack_Info;
|
pragma Ada_2012;
pragma Style_Checks (Off);
pragma Warnings ("U");
with Interfaces.C; use Interfaces.C;
with arm_math_types_h;
with sys_ustdint_h;
package quaternion_math_functions_h is
procedure arm_quaternion_norm_f32
(pInputQuaternions : access arm_math_types_h.float32_t;
pNorms : access arm_math_types_h.float32_t;
nbQuaternions : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/quaternion_math_functions.h:60
with Import => True,
Convention => C,
External_Name => "arm_quaternion_norm_f32";
procedure arm_quaternion_inverse_f32
(pInputQuaternions : access arm_math_types_h.float32_t;
pInverseQuaternions : access arm_math_types_h.float32_t;
nbQuaternions : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/quaternion_math_functions.h:73
with Import => True,
Convention => C,
External_Name => "arm_quaternion_inverse_f32";
procedure arm_quaternion_conjugate_f32
(inputQuaternions : access arm_math_types_h.float32_t;
pConjugateQuaternions : access arm_math_types_h.float32_t;
nbQuaternions : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/quaternion_math_functions.h:84
with Import => True,
Convention => C,
External_Name => "arm_quaternion_conjugate_f32";
procedure arm_quaternion_normalize_f32
(inputQuaternions : access arm_math_types_h.float32_t;
pNormalizedQuaternions : access arm_math_types_h.float32_t;
nbQuaternions : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/quaternion_math_functions.h:95
with Import => True,
Convention => C,
External_Name => "arm_quaternion_normalize_f32";
procedure arm_quaternion_product_single_f32
(qa : access arm_math_types_h.float32_t;
qb : access arm_math_types_h.float32_t;
r : access arm_math_types_h.float32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/quaternion_math_functions.h:107
with Import => True,
Convention => C,
External_Name => "arm_quaternion_product_single_f32";
procedure arm_quaternion_product_f32
(qa : access arm_math_types_h.float32_t;
qb : access arm_math_types_h.float32_t;
r : access arm_math_types_h.float32_t;
nbQuaternions : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/quaternion_math_functions.h:119
with Import => True,
Convention => C,
External_Name => "arm_quaternion_product_f32";
procedure arm_quaternion2rotation_f32
(pInputQuaternions : access arm_math_types_h.float32_t;
pOutputRotations : access arm_math_types_h.float32_t;
nbQuaternions : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/quaternion_math_functions.h:140
with Import => True,
Convention => C,
External_Name => "arm_quaternion2rotation_f32";
procedure arm_rotation2quaternion_f32
(pInputRotations : access arm_math_types_h.float32_t;
pOutputQuaternions : access arm_math_types_h.float32_t;
nbQuaternions : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/quaternion_math_functions.h:151
with Import => True,
Convention => C,
External_Name => "arm_rotation2quaternion_f32";
end quaternion_math_functions_h;
|
with GESTE;
with GESTE.Text;
with Ada.Text_IO;
with Console_Char_Screen;
with GESTE_Fonts.FreeMono8pt7b;
procedure Text_Dirty is
package Font_A renames GESTE_Fonts.FreeMono8pt7b;
package Console_Screen is new Console_Char_Screen
(Width => 45,
Height => 20,
Buffer_Size => 45,
Init_Char => ' ');
Text_A : aliased GESTE.Text.Instance
(Font_A.Font, 4, 1, '#', ' ');
procedure Update is
begin
GESTE.Render_Dirty
(Screen_Rect => Console_Screen.Screen_Rect,
Background => ' ',
Buffer => Console_Screen.Buffer,
Push_Pixels => Console_Screen.Push_Pixels'Unrestricted_Access,
Set_Drawing_Area => Console_Screen.Set_Drawing_Area'Unrestricted_Access);
Console_Screen.Print;
Ada.Text_IO.New_Line;
end Update;
begin
Console_Screen.Verbose;
Text_A.Put ("test");
Text_A.Move ((0, 0));
GESTE.Add (Text_A'Unrestricted_Access, 0);
GESTE.Render_Window
(Window => Console_Screen.Screen_Rect,
Background => ' ',
Buffer => Console_Screen.Buffer,
Push_Pixels => Console_Screen.Push_Pixels'Unrestricted_Access,
Set_Drawing_Area => Console_Screen.Set_Drawing_Area'Unrestricted_Access);
Console_Screen.Print;
Ada.Text_IO.New_Line;
Update;
-- Check that inverting a char triggers a re-draw
Text_A.Invert (2, 1);
Update;
-- Check that changing a char triggers a re-draw
Text_A.Cursor (3, 1);
Text_A.Put ('O');
Update;
-- Check that changing colors triggers a re-draw
Text_A.Set_Colors (4, 1, '_', ' ');
Update;
-- Check that clearing text triggers a re-draw
Text_A.Clear;
Update;
end Text_Dirty;
|
-----------------------------------------------------------------------
-- ado-schemas-databases -- Database creation
-- Copyright (C) 2018, 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with ADO.Connections;
package body ADO.Schemas.Databases is
-- ------------------------------
-- Create the database and initialize it with the schema SQL file.
-- ------------------------------
procedure Create_Database (Admin : in ADO.Sessions.Sources.Data_Source'Class;
Config : in ADO.Sessions.Sources.Data_Source'Class;
Schema_Path : in String;
Messages : out Util.Strings.Vectors.Vector) is
Name : constant String := Config.Get_Driver;
Driver : constant Connections.Driver_Access := Connections.Get_Driver (Name);
begin
Messages.Clear;
Driver.Create_Database (Admin => Admin,
Config => Config,
Schema_Path => Schema_Path,
Messages => Messages);
end Create_Database;
end ADO.Schemas.Databases;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . P O O L _ L O C A L --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2011, 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. --
-- --
------------------------------------------------------------------------------
-- Storage pool for use with local objects with automatic reclaim
with System.Storage_Elements;
with System.Pool_Global;
package System.Pool_Local is
pragma Elaborate_Body;
-- Needed to ensure that library routines can execute allocators
----------------------------
-- Unbounded_Reclaim_Pool --
----------------------------
-- Allocation strategy:
-- Call to malloc/free for each Allocate/Deallocate
-- No user specifiable size
-- Space of allocated objects is reclaimed at pool finalization
-- Manages a list of allocated objects
type Unbounded_Reclaim_Pool is new
System.Pool_Global.Unbounded_No_Reclaim_Pool with
record
First : System.Address := Null_Address;
end record;
-- function Storage_Size is inherited
procedure Allocate
(Pool : in out Unbounded_Reclaim_Pool;
Address : out System.Address;
Storage_Size : System.Storage_Elements.Storage_Count;
Alignment : System.Storage_Elements.Storage_Count);
procedure Deallocate
(Pool : in out Unbounded_Reclaim_Pool;
Address : System.Address;
Storage_Size : System.Storage_Elements.Storage_Count;
Alignment : System.Storage_Elements.Storage_Count);
procedure Finalize (Pool : in out Unbounded_Reclaim_Pool);
end System.Pool_Local;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- T R E E _ G E N --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-1999, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Atree;
with Elists;
with Fname;
with Lib;
with Namet;
with Nlists;
with Opt;
with Osint;
with Repinfo;
with Sinput;
with Stand;
with Stringt;
with Uintp;
with Urealp;
procedure Tree_Gen is
begin
if Opt.Tree_Output then
Osint.Tree_Create;
Opt.Tree_Write;
Atree.Tree_Write;
Elists.Tree_Write;
Fname.Tree_Write;
Lib.Tree_Write;
Namet.Tree_Write;
Nlists.Tree_Write;
Sinput.Tree_Write;
Stand.Tree_Write;
Stringt.Tree_Write;
Uintp.Tree_Write;
Urealp.Tree_Write;
Repinfo.Tree_Write;
Osint.Tree_Close;
end if;
end Tree_Gen;
|
-- This spec has been automatically generated from STM32L4x1.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.I2C is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR1_DNF_Field is HAL.UInt4;
-- Control register 1
type CR1_Register is record
-- Peripheral enable
PE : Boolean := False;
-- TX Interrupt enable
TXIE : Boolean := False;
-- RX Interrupt enable
RXIE : Boolean := False;
-- Address match interrupt enable (slave only)
ADDRIE : Boolean := False;
-- Not acknowledge received interrupt enable
NACKIE : Boolean := False;
-- STOP detection Interrupt enable
STOPIE : Boolean := False;
-- Transfer Complete interrupt enable
TCIE : Boolean := False;
-- Error interrupts enable
ERRIE : Boolean := False;
-- Digital noise filter
DNF : CR1_DNF_Field := 16#0#;
-- Analog noise filter OFF
ANFOFF : Boolean := False;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- DMA transmission requests enable
TXDMAEN : Boolean := False;
-- DMA reception requests enable
RXDMAEN : Boolean := False;
-- Slave byte control
SBC : Boolean := False;
-- Clock stretching disable
NOSTRETCH : Boolean := False;
-- Wakeup from STOP enable
WUPEN : Boolean := False;
-- General call enable
GCEN : Boolean := False;
-- SMBus Host address enable
SMBHEN : Boolean := False;
-- SMBus Device Default address enable
SMBDEN : Boolean := False;
-- SMBUS alert enable
ALERTEN : Boolean := False;
-- PEC enable
PECEN : Boolean := False;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register use record
PE at 0 range 0 .. 0;
TXIE at 0 range 1 .. 1;
RXIE at 0 range 2 .. 2;
ADDRIE at 0 range 3 .. 3;
NACKIE at 0 range 4 .. 4;
STOPIE at 0 range 5 .. 5;
TCIE at 0 range 6 .. 6;
ERRIE at 0 range 7 .. 7;
DNF at 0 range 8 .. 11;
ANFOFF at 0 range 12 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
TXDMAEN at 0 range 14 .. 14;
RXDMAEN at 0 range 15 .. 15;
SBC at 0 range 16 .. 16;
NOSTRETCH at 0 range 17 .. 17;
WUPEN at 0 range 18 .. 18;
GCEN at 0 range 19 .. 19;
SMBHEN at 0 range 20 .. 20;
SMBDEN at 0 range 21 .. 21;
ALERTEN at 0 range 22 .. 22;
PECEN at 0 range 23 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype CR2_SADD_Field is HAL.UInt10;
subtype CR2_NBYTES_Field is HAL.UInt8;
-- Control register 2
type CR2_Register is record
-- Slave address bit (master mode)
SADD : CR2_SADD_Field := 16#0#;
-- Transfer direction (master mode)
RD_WRN : Boolean := False;
-- 10-bit addressing mode (master mode)
ADD10 : Boolean := False;
-- 10-bit address header only read direction (master receiver mode)
HEAD10R : Boolean := False;
-- Start generation
START : Boolean := False;
-- Stop generation (master mode)
STOP : Boolean := False;
-- NACK generation (slave mode)
NACK : Boolean := False;
-- Number of bytes
NBYTES : CR2_NBYTES_Field := 16#0#;
-- NBYTES reload mode
RELOAD : Boolean := False;
-- Automatic end mode (master mode)
AUTOEND : Boolean := False;
-- Packet error checking byte
PECBYTE : Boolean := False;
-- unspecified
Reserved_27_31 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register use record
SADD at 0 range 0 .. 9;
RD_WRN at 0 range 10 .. 10;
ADD10 at 0 range 11 .. 11;
HEAD10R at 0 range 12 .. 12;
START at 0 range 13 .. 13;
STOP at 0 range 14 .. 14;
NACK at 0 range 15 .. 15;
NBYTES at 0 range 16 .. 23;
RELOAD at 0 range 24 .. 24;
AUTOEND at 0 range 25 .. 25;
PECBYTE at 0 range 26 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
subtype OAR1_OA1_Field is HAL.UInt10;
-- Own address register 1
type OAR1_Register is record
-- Interface address
OA1 : OAR1_OA1_Field := 16#0#;
-- Own Address 1 10-bit mode
OA1MODE : Boolean := False;
-- unspecified
Reserved_11_14 : HAL.UInt4 := 16#0#;
-- Own Address 1 enable
OA1EN : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OAR1_Register use record
OA1 at 0 range 0 .. 9;
OA1MODE at 0 range 10 .. 10;
Reserved_11_14 at 0 range 11 .. 14;
OA1EN at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype OAR2_OA2_Field is HAL.UInt7;
subtype OAR2_OA2MSK_Field is HAL.UInt3;
-- Own address register 2
type OAR2_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Interface address
OA2 : OAR2_OA2_Field := 16#0#;
-- Own Address 2 masks
OA2MSK : OAR2_OA2MSK_Field := 16#0#;
-- unspecified
Reserved_11_14 : HAL.UInt4 := 16#0#;
-- Own Address 2 enable
OA2EN : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OAR2_Register use record
Reserved_0_0 at 0 range 0 .. 0;
OA2 at 0 range 1 .. 7;
OA2MSK at 0 range 8 .. 10;
Reserved_11_14 at 0 range 11 .. 14;
OA2EN at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype TIMINGR_SCLL_Field is HAL.UInt8;
subtype TIMINGR_SCLH_Field is HAL.UInt8;
subtype TIMINGR_SDADEL_Field is HAL.UInt4;
subtype TIMINGR_SCLDEL_Field is HAL.UInt4;
subtype TIMINGR_PRESC_Field is HAL.UInt4;
-- Timing register
type TIMINGR_Register is record
-- SCL low period (master mode)
SCLL : TIMINGR_SCLL_Field := 16#0#;
-- SCL high period (master mode)
SCLH : TIMINGR_SCLH_Field := 16#0#;
-- Data hold time
SDADEL : TIMINGR_SDADEL_Field := 16#0#;
-- Data setup time
SCLDEL : TIMINGR_SCLDEL_Field := 16#0#;
-- unspecified
Reserved_24_27 : HAL.UInt4 := 16#0#;
-- Timing prescaler
PRESC : TIMINGR_PRESC_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TIMINGR_Register use record
SCLL at 0 range 0 .. 7;
SCLH at 0 range 8 .. 15;
SDADEL at 0 range 16 .. 19;
SCLDEL at 0 range 20 .. 23;
Reserved_24_27 at 0 range 24 .. 27;
PRESC at 0 range 28 .. 31;
end record;
subtype TIMEOUTR_TIMEOUTA_Field is HAL.UInt12;
subtype TIMEOUTR_TIMEOUTB_Field is HAL.UInt12;
-- Status register 1
type TIMEOUTR_Register is record
-- Bus timeout A
TIMEOUTA : TIMEOUTR_TIMEOUTA_Field := 16#0#;
-- Idle clock timeout detection
TIDLE : Boolean := False;
-- unspecified
Reserved_13_14 : HAL.UInt2 := 16#0#;
-- Clock timeout enable
TIMOUTEN : Boolean := False;
-- Bus timeout B
TIMEOUTB : TIMEOUTR_TIMEOUTB_Field := 16#0#;
-- unspecified
Reserved_28_30 : HAL.UInt3 := 16#0#;
-- Extended clock timeout enable
TEXTEN : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TIMEOUTR_Register use record
TIMEOUTA at 0 range 0 .. 11;
TIDLE at 0 range 12 .. 12;
Reserved_13_14 at 0 range 13 .. 14;
TIMOUTEN at 0 range 15 .. 15;
TIMEOUTB at 0 range 16 .. 27;
Reserved_28_30 at 0 range 28 .. 30;
TEXTEN at 0 range 31 .. 31;
end record;
subtype ISR_ADDCODE_Field is HAL.UInt7;
-- Interrupt and Status register
type ISR_Register is record
-- Transmit data register empty (transmitters)
TXE : Boolean := True;
-- Transmit interrupt status (transmitters)
TXIS : Boolean := False;
-- Read-only. Receive data register not empty (receivers)
RXNE : Boolean := False;
-- Read-only. Address matched (slave mode)
ADDR : Boolean := False;
-- Read-only. Not acknowledge received flag
NACKF : Boolean := False;
-- Read-only. Stop detection flag
STOPF : Boolean := False;
-- Read-only. Transfer Complete (master mode)
TC : Boolean := False;
-- Read-only. Transfer Complete Reload
TCR : Boolean := False;
-- Read-only. Bus error
BERR : Boolean := False;
-- Read-only. Arbitration lost
ARLO : Boolean := False;
-- Read-only. Overrun/Underrun (slave mode)
OVR : Boolean := False;
-- Read-only. PEC Error in reception
PECERR : Boolean := False;
-- Read-only. Timeout or t_low detection flag
TIMEOUT : Boolean := False;
-- Read-only. SMBus alert
ALERT : Boolean := False;
-- unspecified
Reserved_14_14 : HAL.Bit := 16#0#;
-- Read-only. Bus busy
BUSY : Boolean := False;
-- Read-only. Transfer direction (Slave mode)
DIR : Boolean := False;
-- Read-only. Address match code (Slave mode)
ADDCODE : ISR_ADDCODE_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ISR_Register use record
TXE at 0 range 0 .. 0;
TXIS at 0 range 1 .. 1;
RXNE at 0 range 2 .. 2;
ADDR at 0 range 3 .. 3;
NACKF at 0 range 4 .. 4;
STOPF at 0 range 5 .. 5;
TC at 0 range 6 .. 6;
TCR at 0 range 7 .. 7;
BERR at 0 range 8 .. 8;
ARLO at 0 range 9 .. 9;
OVR at 0 range 10 .. 10;
PECERR at 0 range 11 .. 11;
TIMEOUT at 0 range 12 .. 12;
ALERT at 0 range 13 .. 13;
Reserved_14_14 at 0 range 14 .. 14;
BUSY at 0 range 15 .. 15;
DIR at 0 range 16 .. 16;
ADDCODE at 0 range 17 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- Interrupt clear register
type ICR_Register is record
-- unspecified
Reserved_0_2 : HAL.UInt3 := 16#0#;
-- Write-only. Address Matched flag clear
ADDRCF : Boolean := False;
-- Write-only. Not Acknowledge flag clear
NACKCF : Boolean := False;
-- Write-only. Stop detection flag clear
STOPCF : Boolean := False;
-- unspecified
Reserved_6_7 : HAL.UInt2 := 16#0#;
-- Write-only. Bus error flag clear
BERRCF : Boolean := False;
-- Write-only. Arbitration lost flag clear
ARLOCF : Boolean := False;
-- Write-only. Overrun/Underrun flag clear
OVRCF : Boolean := False;
-- Write-only. PEC Error flag clear
PECCF : Boolean := False;
-- Write-only. Timeout detection flag clear
TIMOUTCF : Boolean := False;
-- Write-only. Alert flag clear
ALERTCF : Boolean := False;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ICR_Register use record
Reserved_0_2 at 0 range 0 .. 2;
ADDRCF at 0 range 3 .. 3;
NACKCF at 0 range 4 .. 4;
STOPCF at 0 range 5 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
BERRCF at 0 range 8 .. 8;
ARLOCF at 0 range 9 .. 9;
OVRCF at 0 range 10 .. 10;
PECCF at 0 range 11 .. 11;
TIMOUTCF at 0 range 12 .. 12;
ALERTCF at 0 range 13 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
subtype PECR_PEC_Field is HAL.UInt8;
-- PEC register
type PECR_Register is record
-- Read-only. Packet error checking register
PEC : PECR_PEC_Field;
-- unspecified
Reserved_8_31 : HAL.UInt24;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PECR_Register use record
PEC at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype RXDR_RXDATA_Field is HAL.UInt8;
-- Receive data register
type RXDR_Register is record
-- Read-only. 8-bit receive data
RXDATA : RXDR_RXDATA_Field;
-- unspecified
Reserved_8_31 : HAL.UInt24;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RXDR_Register use record
RXDATA at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype TXDR_TXDATA_Field is HAL.UInt8;
-- Transmit data register
type TXDR_Register is record
-- 8-bit transmit data
TXDATA : TXDR_TXDATA_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TXDR_Register use record
TXDATA at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Inter-integrated circuit
type I2C_Peripheral is record
-- Control register 1
CR1 : aliased CR1_Register;
-- Control register 2
CR2 : aliased CR2_Register;
-- Own address register 1
OAR1 : aliased OAR1_Register;
-- Own address register 2
OAR2 : aliased OAR2_Register;
-- Timing register
TIMINGR : aliased TIMINGR_Register;
-- Status register 1
TIMEOUTR : aliased TIMEOUTR_Register;
-- Interrupt and Status register
ISR : aliased ISR_Register;
-- Interrupt clear register
ICR : aliased ICR_Register;
-- PEC register
PECR : aliased PECR_Register;
-- Receive data register
RXDR : aliased RXDR_Register;
-- Transmit data register
TXDR : aliased TXDR_Register;
end record
with Volatile;
for I2C_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
OAR1 at 16#8# range 0 .. 31;
OAR2 at 16#C# range 0 .. 31;
TIMINGR at 16#10# range 0 .. 31;
TIMEOUTR at 16#14# range 0 .. 31;
ISR at 16#18# range 0 .. 31;
ICR at 16#1C# range 0 .. 31;
PECR at 16#20# range 0 .. 31;
RXDR at 16#24# range 0 .. 31;
TXDR at 16#28# range 0 .. 31;
end record;
-- Inter-integrated circuit
I2C1_Periph : aliased I2C_Peripheral
with Import, Address => System'To_Address (16#40005400#);
-- Inter-integrated circuit
I2C2_Periph : aliased I2C_Peripheral
with Import, Address => System'To_Address (16#40005800#);
-- Inter-integrated circuit
I2C3_Periph : aliased I2C_Peripheral
with Import, Address => System'To_Address (16#40005C00#);
-- Inter-integrated circuit
I2C4_Periph : aliased I2C_Peripheral
with Import, Address => System'To_Address (16#40008400#);
end STM32_SVD.I2C;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Internals.UML_Classifiers;
with AMF.String_Collections;
with AMF.UML.Artifacts.Collections;
with AMF.UML.Classifier_Template_Parameters;
with AMF.UML.Classifiers.Collections;
with AMF.UML.Collaboration_Uses.Collections;
with AMF.UML.Constraints.Collections;
with AMF.UML.Dependencies.Collections;
with AMF.UML.Element_Imports.Collections;
with AMF.UML.Features.Collections;
with AMF.UML.Generalization_Sets.Collections;
with AMF.UML.Generalizations.Collections;
with AMF.UML.Manifestations.Collections;
with AMF.UML.Named_Elements.Collections;
with AMF.UML.Namespaces;
with AMF.UML.Operations.Collections;
with AMF.UML.Package_Imports.Collections;
with AMF.UML.Packageable_Elements.Collections;
with AMF.UML.Packages.Collections;
with AMF.UML.Parameterable_Elements.Collections;
with AMF.UML.Properties.Collections;
with AMF.UML.Redefinable_Elements.Collections;
with AMF.UML.Redefinable_Template_Signatures;
with AMF.UML.String_Expressions;
with AMF.UML.Substitutions.Collections;
with AMF.UML.Template_Bindings.Collections;
with AMF.UML.Template_Parameters;
with AMF.UML.Template_Signatures;
with AMF.UML.Types;
with AMF.UML.Use_Cases.Collections;
with AMF.Visitors;
package AMF.Internals.UML_Artifacts is
type UML_Artifact_Proxy is
limited new AMF.Internals.UML_Classifiers.UML_Classifier_Proxy
and AMF.UML.Artifacts.UML_Artifact with null record;
overriding function Get_File_Name
(Self : not null access constant UML_Artifact_Proxy)
return AMF.Optional_String;
-- Getter of Artifact::fileName.
--
-- A concrete name that is used to refer to the Artifact in a physical
-- context. Example: file system name, universal resource locator.
overriding procedure Set_File_Name
(Self : not null access UML_Artifact_Proxy;
To : AMF.Optional_String);
-- Setter of Artifact::fileName.
--
-- A concrete name that is used to refer to the Artifact in a physical
-- context. Example: file system name, universal resource locator.
overriding function Get_Manifestation
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Manifestations.Collections.Set_Of_UML_Manifestation;
-- Getter of Artifact::manifestation.
--
-- The set of model elements that are manifested in the Artifact. That is,
-- these model elements are utilized in the construction (or generation)
-- of the artifact.
overriding function Get_Nested_Artifact
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Artifacts.Collections.Set_Of_UML_Artifact;
-- Getter of Artifact::nestedArtifact.
--
-- The Artifacts that are defined (nested) within the Artifact. The
-- association is a specialization of the ownedMember association from
-- Namespace to NamedElement.
overriding function Get_Owned_Attribute
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Properties.Collections.Ordered_Set_Of_UML_Property;
-- Getter of Artifact::ownedAttribute.
--
-- The attributes or association ends defined for the Artifact. The
-- association is a specialization of the ownedMember association.
overriding function Get_Owned_Operation
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Operations.Collections.Ordered_Set_Of_UML_Operation;
-- Getter of Artifact::ownedOperation.
--
-- The Operations defined for the Artifact. The association is a
-- specialization of the ownedMember association.
overriding function Get_Attribute
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Properties.Collections.Set_Of_UML_Property;
-- Getter of Classifier::attribute.
--
-- Refers to all of the Properties that are direct (i.e. not inherited or
-- imported) attributes of the classifier.
overriding function Get_Collaboration_Use
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Collaboration_Uses.Collections.Set_Of_UML_Collaboration_Use;
-- Getter of Classifier::collaborationUse.
--
-- References the collaboration uses owned by the classifier.
overriding function Get_Feature
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Features.Collections.Set_Of_UML_Feature;
-- Getter of Classifier::feature.
--
-- Specifies each feature defined in the classifier.
-- Note that there may be members of the Classifier that are of the type
-- Feature but are not included in this association, e.g. inherited
-- features.
overriding function Get_General
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Getter of Classifier::general.
--
-- Specifies the general Classifiers for this Classifier.
-- References the general classifier in the Generalization relationship.
overriding function Get_Generalization
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Generalizations.Collections.Set_Of_UML_Generalization;
-- Getter of Classifier::generalization.
--
-- Specifies the Generalization relationships for this Classifier. These
-- Generalizations navigaten to more general classifiers in the
-- generalization hierarchy.
overriding function Get_Inherited_Member
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Classifier::inheritedMember.
--
-- Specifies all elements inherited by this classifier from the general
-- classifiers.
overriding function Get_Is_Abstract
(Self : not null access constant UML_Artifact_Proxy)
return Boolean;
-- Getter of Classifier::isAbstract.
--
-- If true, the Classifier does not provide a complete declaration and can
-- typically not be instantiated. An abstract classifier is intended to be
-- used by other classifiers e.g. as the target of general
-- metarelationships or generalization relationships.
overriding function Get_Is_Final_Specialization
(Self : not null access constant UML_Artifact_Proxy)
return Boolean;
-- Getter of Classifier::isFinalSpecialization.
--
-- If true, the Classifier cannot be specialized by generalization. Note
-- that this property is preserved through package merge operations; that
-- is, the capability to specialize a Classifier (i.e.,
-- isFinalSpecialization =false) must be preserved in the resulting
-- Classifier of a package merge operation where a Classifier with
-- isFinalSpecialization =false is merged with a matching Classifier with
-- isFinalSpecialization =true: the resulting Classifier will have
-- isFinalSpecialization =false.
overriding procedure Set_Is_Final_Specialization
(Self : not null access UML_Artifact_Proxy;
To : Boolean);
-- Setter of Classifier::isFinalSpecialization.
--
-- If true, the Classifier cannot be specialized by generalization. Note
-- that this property is preserved through package merge operations; that
-- is, the capability to specialize a Classifier (i.e.,
-- isFinalSpecialization =false) must be preserved in the resulting
-- Classifier of a package merge operation where a Classifier with
-- isFinalSpecialization =false is merged with a matching Classifier with
-- isFinalSpecialization =true: the resulting Classifier will have
-- isFinalSpecialization =false.
overriding function Get_Owned_Template_Signature
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access;
-- Getter of Classifier::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding procedure Set_Owned_Template_Signature
(Self : not null access UML_Artifact_Proxy;
To : AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access);
-- Setter of Classifier::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding function Get_Owned_Use_Case
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case;
-- Getter of Classifier::ownedUseCase.
--
-- References the use cases owned by this classifier.
overriding function Get_Powertype_Extent
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Generalization_Sets.Collections.Set_Of_UML_Generalization_Set;
-- Getter of Classifier::powertypeExtent.
--
-- Designates the GeneralizationSet of which the associated Classifier is
-- a power type.
overriding function Get_Redefined_Classifier
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Getter of Classifier::redefinedClassifier.
--
-- References the Classifiers that are redefined by this Classifier.
overriding function Get_Representation
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access;
-- Getter of Classifier::representation.
--
-- References a collaboration use which indicates the collaboration that
-- represents this classifier.
overriding procedure Set_Representation
(Self : not null access UML_Artifact_Proxy;
To : AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access);
-- Setter of Classifier::representation.
--
-- References a collaboration use which indicates the collaboration that
-- represents this classifier.
overriding function Get_Substitution
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Substitutions.Collections.Set_Of_UML_Substitution;
-- Getter of Classifier::substitution.
--
-- References the substitutions that are owned by this Classifier.
overriding function Get_Template_Parameter
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access;
-- Getter of Classifier::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding procedure Set_Template_Parameter
(Self : not null access UML_Artifact_Proxy;
To : AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access);
-- Setter of Classifier::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding function Get_Use_Case
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case;
-- Getter of Classifier::useCase.
--
-- The set of use cases for which this Classifier is the subject.
overriding function Get_Element_Import
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Element_Imports.Collections.Set_Of_UML_Element_Import;
-- Getter of Namespace::elementImport.
--
-- References the ElementImports owned by the Namespace.
overriding function Get_Imported_Member
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Getter of Namespace::importedMember.
--
-- References the PackageableElements that are members of this Namespace
-- as a result of either PackageImports or ElementImports.
overriding function Get_Member
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Namespace::member.
--
-- A collection of NamedElements identifiable within the Namespace, either
-- by being owned or by being introduced by importing or inheritance.
overriding function Get_Owned_Member
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Namespace::ownedMember.
--
-- A collection of NamedElements owned by the Namespace.
overriding function Get_Owned_Rule
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
-- Getter of Namespace::ownedRule.
--
-- Specifies a set of Constraints owned by this Namespace.
overriding function Get_Package_Import
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Package_Imports.Collections.Set_Of_UML_Package_Import;
-- Getter of Namespace::packageImport.
--
-- References the PackageImports owned by the Namespace.
overriding function Get_Client_Dependency
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
-- Getter of NamedElement::clientDependency.
--
-- Indicates the dependencies that reference the client.
overriding function Get_Name_Expression
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access;
-- Getter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding procedure Set_Name_Expression
(Self : not null access UML_Artifact_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access);
-- Setter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding function Get_Namespace
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Getter of NamedElement::namespace.
--
-- Specifies the namespace that owns the NamedElement.
overriding function Get_Qualified_Name
(Self : not null access constant UML_Artifact_Proxy)
return AMF.Optional_String;
-- Getter of NamedElement::qualifiedName.
--
-- A name which allows the NamedElement to be identified within a
-- hierarchy of nested Namespaces. It is constructed from the names of the
-- containing namespaces starting at the root of the hierarchy and ending
-- with the name of the NamedElement itself.
overriding function Get_Package
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Packages.UML_Package_Access;
-- Getter of Type::package.
--
-- Specifies the owning package of this classifier, if any.
overriding procedure Set_Package
(Self : not null access UML_Artifact_Proxy;
To : AMF.UML.Packages.UML_Package_Access);
-- Setter of Type::package.
--
-- Specifies the owning package of this classifier, if any.
overriding function Get_Owning_Template_Parameter
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
-- Getter of ParameterableElement::owningTemplateParameter.
--
-- The formal template parameter that owns this element.
overriding procedure Set_Owning_Template_Parameter
(Self : not null access UML_Artifact_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
-- Setter of ParameterableElement::owningTemplateParameter.
--
-- The formal template parameter that owns this element.
overriding function Get_Template_Parameter
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
-- Getter of ParameterableElement::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding procedure Set_Template_Parameter
(Self : not null access UML_Artifact_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
-- Setter of ParameterableElement::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding function Get_Owned_Template_Signature
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Template_Signatures.UML_Template_Signature_Access;
-- Getter of TemplateableElement::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding procedure Set_Owned_Template_Signature
(Self : not null access UML_Artifact_Proxy;
To : AMF.UML.Template_Signatures.UML_Template_Signature_Access);
-- Setter of TemplateableElement::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding function Get_Template_Binding
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Template_Bindings.Collections.Set_Of_UML_Template_Binding;
-- Getter of TemplateableElement::templateBinding.
--
-- The optional bindings from this element to templates.
overriding function Get_Is_Leaf
(Self : not null access constant UML_Artifact_Proxy)
return Boolean;
-- Getter of RedefinableElement::isLeaf.
--
-- Indicates whether it is possible to further redefine a
-- RedefinableElement. If the value is true, then it is not possible to
-- further redefine the RedefinableElement. Note that this property is
-- preserved through package merge operations; that is, the capability to
-- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
-- the resulting RedefinableElement of a package merge operation where a
-- RedefinableElement with isLeaf=false is merged with a matching
-- RedefinableElement with isLeaf=true: the resulting RedefinableElement
-- will have isLeaf=false. Default value is false.
overriding procedure Set_Is_Leaf
(Self : not null access UML_Artifact_Proxy;
To : Boolean);
-- Setter of RedefinableElement::isLeaf.
--
-- Indicates whether it is possible to further redefine a
-- RedefinableElement. If the value is true, then it is not possible to
-- further redefine the RedefinableElement. Note that this property is
-- preserved through package merge operations; that is, the capability to
-- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
-- the resulting RedefinableElement of a package merge operation where a
-- RedefinableElement with isLeaf=false is merged with a matching
-- RedefinableElement with isLeaf=true: the resulting RedefinableElement
-- will have isLeaf=false. Default value is false.
overriding function Get_Redefined_Element
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element;
-- Getter of RedefinableElement::redefinedElement.
--
-- The redefinable element that is being redefined by this element.
overriding function Get_Redefinition_Context
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Getter of RedefinableElement::redefinitionContext.
--
-- References the contexts that this element may be redefined from.
overriding function All_Features
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Features.Collections.Set_Of_UML_Feature;
-- Operation Classifier::allFeatures.
--
-- The query allFeatures() gives all of the features in the namespace of
-- the classifier. In general, through mechanisms such as inheritance,
-- this will be a larger set than feature.
overriding function Conforms_To
(Self : not null access constant UML_Artifact_Proxy;
Other : AMF.UML.Classifiers.UML_Classifier_Access)
return Boolean;
-- Operation Classifier::conformsTo.
--
-- The query conformsTo() gives true for a classifier that defines a type
-- that conforms to another. This is used, for example, in the
-- specification of signature conformance for operations.
overriding function General
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Operation Classifier::general.
--
-- The general classifiers are the classifiers referenced by the
-- generalization relationships.
overriding function Has_Visibility_Of
(Self : not null access constant UML_Artifact_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access)
return Boolean;
-- Operation Classifier::hasVisibilityOf.
--
-- The query hasVisibilityOf() determines whether a named element is
-- visible in the classifier. By default all are visible. It is only
-- called when the argument is something owned by a parent.
overriding function Inherit
(Self : not null access constant UML_Artifact_Proxy;
Inhs : AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Classifier::inherit.
--
-- The query inherit() defines how to inherit a set of elements. Here the
-- operation is defined to inherit them all. It is intended to be
-- redefined in circumstances where inheritance is affected by
-- redefinition.
-- The inherit operation is overridden to exclude redefined properties.
overriding function Inheritable_Members
(Self : not null access constant UML_Artifact_Proxy;
C : AMF.UML.Classifiers.UML_Classifier_Access)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Classifier::inheritableMembers.
--
-- The query inheritableMembers() gives all of the members of a classifier
-- that may be inherited in one of its descendants, subject to whatever
-- visibility restrictions apply.
overriding function Inherited_Member
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Classifier::inheritedMember.
--
-- The inheritedMember association is derived by inheriting the
-- inheritable members of the parents.
-- The inheritedMember association is derived by inheriting the
-- inheritable members of the parents.
overriding function Is_Template
(Self : not null access constant UML_Artifact_Proxy)
return Boolean;
-- Operation Classifier::isTemplate.
--
-- The query isTemplate() returns whether this templateable element is
-- actually a template.
overriding function May_Specialize_Type
(Self : not null access constant UML_Artifact_Proxy;
C : AMF.UML.Classifiers.UML_Classifier_Access)
return Boolean;
-- Operation Classifier::maySpecializeType.
--
-- The query maySpecializeType() determines whether this classifier may
-- have a generalization relationship to classifiers of the specified
-- type. By default a classifier may specialize classifiers of the same or
-- a more general type. It is intended to be redefined by classifiers that
-- have different specialization constraints.
overriding function Exclude_Collisions
(Self : not null access constant UML_Artifact_Proxy;
Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Operation Namespace::excludeCollisions.
--
-- The query excludeCollisions() excludes from a set of
-- PackageableElements any that would not be distinguishable from each
-- other in this namespace.
overriding function Get_Names_Of_Member
(Self : not null access constant UML_Artifact_Proxy;
Element : AMF.UML.Named_Elements.UML_Named_Element_Access)
return AMF.String_Collections.Set_Of_String;
-- Operation Namespace::getNamesOfMember.
--
-- The query getNamesOfMember() takes importing into account. It gives
-- back the set of names that an element would have in an importing
-- namespace, either because it is owned, or if not owned then imported
-- individually, or if not individually then from a package.
-- The query getNamesOfMember() gives a set of all of the names that a
-- member would have in a Namespace. In general a member can have multiple
-- names in a Namespace if it is imported more than once with different
-- aliases. The query takes account of importing. It gives back the set of
-- names that an element would have in an importing namespace, either
-- because it is owned, or if not owned then imported individually, or if
-- not individually then from a package.
overriding function Import_Members
(Self : not null access constant UML_Artifact_Proxy;
Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Operation Namespace::importMembers.
--
-- The query importMembers() defines which of a set of PackageableElements
-- are actually imported into the namespace. This excludes hidden ones,
-- i.e., those which have names that conflict with names of owned members,
-- and also excludes elements which would have the same name when imported.
overriding function Imported_Member
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Operation Namespace::importedMember.
--
-- The importedMember property is derived from the ElementImports and the
-- PackageImports. References the PackageableElements that are members of
-- this Namespace as a result of either PackageImports or ElementImports.
overriding function Members_Are_Distinguishable
(Self : not null access constant UML_Artifact_Proxy)
return Boolean;
-- Operation Namespace::membersAreDistinguishable.
--
-- The Boolean query membersAreDistinguishable() determines whether all of
-- the namespace's members are distinguishable within it.
overriding function Owned_Member
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Namespace::ownedMember.
--
-- Missing derivation for Namespace::/ownedMember : NamedElement
overriding function All_Owning_Packages
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package;
-- Operation NamedElement::allOwningPackages.
--
-- The query allOwningPackages() returns all the directly or indirectly
-- owning packages.
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Artifact_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean;
-- Operation NamedElement::isDistinguishableFrom.
--
-- The query isDistinguishableFrom() determines whether two NamedElements
-- may logically co-exist within a Namespace. By default, two named
-- elements are distinguishable if (a) they have unrelated types or (b)
-- they have related types but different names.
overriding function Namespace
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Operation NamedElement::namespace.
--
-- Missing derivation for NamedElement::/namespace : Namespace
overriding function Conforms_To
(Self : not null access constant UML_Artifact_Proxy;
Other : AMF.UML.Types.UML_Type_Access)
return Boolean;
-- Operation Type::conformsTo.
--
-- The query conformsTo() gives true for a type that conforms to another.
-- By default, two types do not conform to each other. This query is
-- intended to be redefined for specific conformance situations.
overriding function Is_Compatible_With
(Self : not null access constant UML_Artifact_Proxy;
P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
return Boolean;
-- Operation ParameterableElement::isCompatibleWith.
--
-- The query isCompatibleWith() determines if this parameterable element
-- is compatible with the specified parameterable element. By default
-- parameterable element P is compatible with parameterable element Q if
-- the kind of P is the same or a subtype as the kind of Q. Subclasses
-- should override this operation to specify different compatibility
-- constraints.
overriding function Is_Template_Parameter
(Self : not null access constant UML_Artifact_Proxy)
return Boolean;
-- Operation ParameterableElement::isTemplateParameter.
--
-- The query isTemplateParameter() determines if this parameterable
-- element is exposed as a formal template parameter.
overriding function Parameterable_Elements
(Self : not null access constant UML_Artifact_Proxy)
return AMF.UML.Parameterable_Elements.Collections.Set_Of_UML_Parameterable_Element;
-- Operation TemplateableElement::parameterableElements.
--
-- The query parameterableElements() returns the set of elements that may
-- be used as the parametered elements for a template parameter of this
-- templateable element. By default, this set includes all the owned
-- elements. Subclasses may override this operation if they choose to
-- restrict the set of parameterable elements.
overriding function Is_Consistent_With
(Self : not null access constant UML_Artifact_Proxy;
Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean;
-- Operation RedefinableElement::isConsistentWith.
--
-- The query isConsistentWith() specifies, for any two RedefinableElements
-- in a context in which redefinition is possible, whether redefinition
-- would be logically consistent. By default, this is false; this
-- operation must be overridden for subclasses of RedefinableElement to
-- define the consistency conditions.
overriding function Is_Redefinition_Context_Valid
(Self : not null access constant UML_Artifact_Proxy;
Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean;
-- Operation RedefinableElement::isRedefinitionContextValid.
--
-- The query isRedefinitionContextValid() specifies whether the
-- redefinition contexts of this RedefinableElement are properly related
-- to the redefinition contexts of the specified RedefinableElement to
-- allow this element to redefine the other. By default at least one of
-- the redefinition contexts of this element must be a specialization of
-- at least one of the redefinition contexts of the specified element.
overriding procedure Enter_Element
(Self : not null access constant UML_Artifact_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Leave_Element
(Self : not null access constant UML_Artifact_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Visit_Element
(Self : not null access constant UML_Artifact_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of iterator interface.
end AMF.Internals.UML_Artifacts;
|
-----------------------------------------------------------------------
-- asf-parts-web -- ASF Parts on top of AWS attachments
-- Copyright (C) 2011, 2012 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with AWS.Attachments.Extend;
package body ASF.Parts.Web is
-- ------------------------------
-- Get the size of the mime part.
-- ------------------------------
overriding
function Get_Size (Data : in AWS_Part) return Natural is
begin
return AWS.Attachments.Extend.Get_Length (Data.Element);
end Get_Size;
-- ------------------------------
-- Get the content name submitted in the mime part.
-- ------------------------------
overriding
function Get_Name (Data : in AWS_Part) return String is
begin
return AWS.Attachments.Filename (Data.Element);
end Get_Name;
-- ------------------------------
-- Get the path of the local file which contains the part.
-- ------------------------------
overriding
function Get_Local_Filename (Data : in AWS_Part) return String is
begin
return AWS.Attachments.Local_Filename (Data.Element);
end Get_Local_Filename;
-- ------------------------------
-- Get the content type of the part.
-- ------------------------------
overriding
function Get_Content_Type (Data : in AWS_Part) return String is
begin
return AWS.Attachments.Content_Type (Data.Element);
end Get_Content_Type;
-- ------------------------------
-- Build a part instance from the AWS attachment and execute the <b>Process</b> operation.
-- ------------------------------
procedure Process_Part (Part : in AWS.Attachments.Element;
Process : not null access procedure (Part : in ASF.Parts.Part'Class)) is
P : AWS_Part;
begin
P.Element := Part;
Process (P);
end Process_Part;
end ASF.Parts.Web;
|
-----------------------------------------------------------------------
-- Regtests.Images.Model -- Regtests.Images.Model
-----------------------------------------------------------------------
-- File generated by ada-gen DO NOT MODIFY
-- Template used: templates/model/package-spec.xhtml
-- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 166
-----------------------------------------------------------------------
-- Copyright (C) 2011 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
pragma Warnings (Off, "unit * is not referenced");
with ADO.Sessions;
with ADO.Objects;
with ADO.Statements;
with ADO.SQL;
with ADO.Schemas;
with Ada.Calendar;
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded;
with Util.Beans.Objects;
with Util.Beans.Basic.Lists;
pragma Warnings (On, "unit * is not referenced");
package Regtests.Images.Model is
-- Create an object key for Image.
function Image_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Image from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Image_Key (Id : in String) return ADO.Objects.Object_Key;
type Image_Ref is new ADO.Objects.Object_Ref with null record;
Null_Image : constant Image_Ref;
function "=" (Left, Right : Image_Ref'Class) return Boolean;
-- Set the image identifier
procedure Set_Id (Object : in out Image_Ref;
Value : in ADO.Identifier);
-- Get the image identifier
function Get_Id (Object : in Image_Ref)
return ADO.Identifier;
-- Get the image version.
function Get_Version (Object : in Image_Ref)
return Integer;
-- Set the message creation date
procedure Set_Create_Date (Object : in out Image_Ref;
Value : in Ada.Calendar.Time);
-- Get the message creation date
function Get_Create_Date (Object : in Image_Ref)
return Ada.Calendar.Time;
-- Set the image data
procedure Set_Image (Object : in out Image_Ref;
Value : in ADO.Blob_Ref);
-- Get the image data
function Get_Image (Object : in Image_Ref)
return ADO.Blob_Ref;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Image_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier);
-- Load the entity identified by 'Id'.
-- Returns True in <b>Found</b> if the object was found and False if it does not exist.
procedure Load (Object : in out Image_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean);
-- Find and load the entity.
overriding
procedure Find (Object : in out Image_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
-- Save the entity. If the entity does not have an identifier, an identifier is allocated
-- and it is inserted in the table. Otherwise, only data fields which have been changed
-- are updated.
overriding
procedure Save (Object : in out Image_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Image_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (Item : in Image_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
IMAGE_TABLE : aliased constant ADO.Schemas.Class_Mapping;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Image_Ref);
-- Copy of the object.
procedure Copy (Object : in Image_Ref;
Into : in out Image_Ref);
package Image_Vectors is
new Ada.Containers.Vectors (Index_Type => Natural,
Element_Type => Image_Ref,
"=" => "=");
subtype Image_Vector is Image_Vectors.Vector;
procedure List (Object : in out Image_Vector;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class);
private
IMAGE_NAME : aliased constant String := "test_image";
COL_0_1_NAME : aliased constant String := "id";
COL_1_1_NAME : aliased constant String := "version";
COL_2_1_NAME : aliased constant String := "create_date";
COL_3_1_NAME : aliased constant String := "image";
IMAGE_TABLE : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 4,
Table => IMAGE_NAME'Access,
Members => (
COL_0_1_NAME'Access,
COL_1_1_NAME'Access,
COL_2_1_NAME'Access,
COL_3_1_NAME'Access
)
);
Null_Image : constant Image_Ref
:= Image_Ref'(ADO.Objects.Object_Ref with others => <>);
type Image_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER,
Of_Class => IMAGE_TABLE'Access)
with record
Version : Integer;
Create_Date : Ada.Calendar.Time;
Image : ADO.Blob_Ref;
end record;
type Image_Access is access all Image_Impl;
overriding
procedure Destroy (Object : access Image_Impl);
overriding
procedure Find (Object : in out Image_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Image_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Image_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Image_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Create (Object : in out Image_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Image_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Image_Ref'Class;
Impl : out Image_Access);
end Regtests.Images.Model;
|
with
openGL.Buffer.general;
package openGL.Buffer.texture_coords is new openGL.Buffer.general (base_Object => Buffer.array_Object,
Index => Index_t,
Element => Coordinate_2D,
Element_Array => Coordinates_2D);
|
----------------------------------------------------------------
-- ZLib for Ada thick binding. --
-- --
-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
-- --
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: read.adb,v 1.7 2003/08/12 12:12:35 vagul Exp $
-- Test/demo program for the generic read interface.
with Ada.Numerics.Discrete_Random;
with Ada.Streams;
with Ada.Text_IO;
with ZLib;
procedure Read is
use Ada.Streams;
------------------------------------
-- Test configuration parameters --
------------------------------------
File_Size : Stream_Element_Offset := 100_000;
Continuous : constant Boolean := False;
-- If this constant is True, the test would be repeated again and again,
-- with increment File_Size for every iteration.
Header : constant ZLib.Header_Type := ZLib.Default;
-- Do not use Header other than Default in ZLib versions 1.1.4 and older.
Init_Random : constant := 8;
-- We are using the same random sequence, in case of we catch bug,
-- so we would be able to reproduce it.
-- End --
Pack_Size : Stream_Element_Offset;
Offset : Stream_Element_Offset;
Filter : ZLib.Filter_Type;
subtype Visible_Symbols
is Stream_Element range 16#20# .. 16#7E#;
package Random_Elements is new
Ada.Numerics.Discrete_Random (Visible_Symbols);
Gen : Random_Elements.Generator;
Period : constant Stream_Element_Offset := 200;
-- Period constant variable for random generator not to be very random.
-- Bigger period, harder random.
Read_Buffer : Stream_Element_Array (1 .. 2048);
Read_First : Stream_Element_Offset;
Read_Last : Stream_Element_Offset;
procedure Reset;
procedure Read
(Item : out Stream_Element_Array;
Last : out Stream_Element_Offset);
-- this procedure is for generic instantiation of
-- ZLib.Read
-- reading data from the File_In.
procedure Read is new ZLib.Read (Read, Read_Buffer, Read_First, Read_Last);
----------
-- Read --
----------
procedure Read
(Item : out Stream_Element_Array;
Last : out Stream_Element_Offset) is
begin
Last := Stream_Element_Offset'Min
(Item'Last,
Item'First + File_Size - Offset);
for J in Item'First .. Last loop
if J < Item'First + Period then
Item (J) := Random_Elements.Random (Gen);
else
Item (J) := Item (J - Period);
end if;
Offset := Offset + 1;
end loop;
end Read;
-----------
-- Reset --
-----------
procedure Reset is
begin
Random_Elements.Reset (Gen, Init_Random);
Pack_Size := 0;
Offset := 1;
Read_First := Read_Buffer'Last + 1;
end Reset;
begin
Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version);
loop
for Level in ZLib.Compression_Level'Range loop
Ada.Text_IO.Put ("Level ="
& ZLib.Compression_Level'Image (Level));
-- Deflate using generic instantiation.
ZLib.Deflate_Init
(Filter,
Level,
Header => Header);
Reset;
Ada.Text_IO.Put
(Stream_Element_Offset'Image (File_Size) & " ->");
loop
declare
Buffer : Stream_Element_Array (1 .. 1024);
Last : Stream_Element_Offset;
begin
Read (Filter, Buffer, Last);
Pack_Size := Pack_Size + Last - Buffer'First + 1;
exit when Last < Buffer'Last;
end;
end loop;
Ada.Text_IO.Put_Line (Stream_Element_Offset'Image (Pack_Size));
ZLib.Close (Filter);
end loop;
exit when not Continuous;
File_Size := File_Size + 1;
end loop;
end Read;
|
--//////////////////////////////////////////////////////////
-- SFML - Simple and Fast Multimedia Library
-- Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
-- This software is provided 'as-is', without any express or implied warranty.
-- In no event will the authors be held liable for any damages arising from the use of this software.
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it freely,
-- subject to the following restrictions:
-- 1. The origin of this software must not be misrepresented;
-- you must not claim that you wrote the original software.
-- If you use this software in a product, an acknowledgment
-- in the product documentation would be appreciated but is not required.
-- 2. Altered source versions must be plainly marked as such,
-- and must not be misrepresented as being the original software.
-- 3. This notice may not be removed or altered from any source distribution.
--//////////////////////////////////////////////////////////
with Sf.System.Vector2;
with Sf.Graphics.Transform;
with Sf.Graphics.Rect;
with Sf.Graphics.Color;
package Sf.Graphics.Shape is
--/< Type of the callback used to get the number of points in a shape
type sfShapeGetPointCountCallback is access function
(userData : Standard.System.Address) return sfSize_t;
pragma Convention (C, sfShapeGetPointCountCallback);
--/< Type of the callback used to get a point of a shape
type sfShapeGetPointCallback is access function
(size : sfSize_t; userData : Standard.System.Address) return Sf.System.Vector2.sfVector2f;
pragma Convention (C, sfShapeGetPointCallback);
--//////////////////////////////////////////////////////////
--/ @brief Create a new shape
--/
--/ @param getPointCount Callback that provides the point count of the shape
--/ @param getPoint Callback that provides the points of the shape
--/ @param userData Data to pass to the callback functions
--/
--/ @return A new sfShape object
--/
--//////////////////////////////////////////////////////////
function create
(getPointCount : sfShapeGetPointCountCallback;
getPoint : sfShapeGetPointCallback;
userData : Standard.System.Address) return sfShape_Ptr;
--//////////////////////////////////////////////////////////
--/ @brief Destroy an existing shape
--/
--/ @param shape Shape to delete
--/
--//////////////////////////////////////////////////////////
procedure destroy (shape : sfShape_Ptr);
--//////////////////////////////////////////////////////////
--/ @brief Set the position of a shape
--/
--/ This function completely overwrites the previous position.
--/ See sfShape_move to apply an offset based on the previous position instead.
--/ The default position of a circle Shape object is (0, 0).
--/
--/ @param shape Shape object
--/ @param position New position
--/
--//////////////////////////////////////////////////////////
procedure setPosition (shape : sfShape_Ptr; position : Sf.System.Vector2.sfVector2f);
--//////////////////////////////////////////////////////////
--/ @brief Set the orientation of a shape
--/
--/ This function completely overwrites the previous rotation.
--/ See sfShape_rotate to add an angle based on the previous rotation instead.
--/ The default rotation of a circle Shape object is 0.
--/
--/ @param shape Shape object
--/ @param angle New rotation, in degrees
--/
--//////////////////////////////////////////////////////////
procedure setRotation (shape : sfShape_Ptr; angle : float);
--//////////////////////////////////////////////////////////
--/ @brief Set the scale factors of a shape
--/
--/ This function completely overwrites the previous scale.
--/ See sfShape_scale to add a factor based on the previous scale instead.
--/ The default scale of a circle Shape object is (1, 1).
--/
--/ @param shape Shape object
--/ @param scale New scale factors
--/
--//////////////////////////////////////////////////////////
procedure setScale (shape : sfShape_Ptr; scale : Sf.System.Vector2.sfVector2f);
--//////////////////////////////////////////////////////////
--/ @brief Set the local origin of a shape
--/
--/ The origin of an object defines the center point for
--/ all transformations (position, scale, rotation).
--/ The coordinates of this point must be relative to the
--/ top-left corner of the object, and ignore all
--/ transformations (position, scale, rotation).
--/ The default origin of a circle Shape object is (0, 0).
--/
--/ @param shape Shape object
--/ @param origin New origin
--/
--//////////////////////////////////////////////////////////
procedure setOrigin (shape : sfShape_Ptr; origin : Sf.System.Vector2.sfVector2f);
--//////////////////////////////////////////////////////////
--/ @brief Get the position of a shape
--/
--/ @param shape Shape object
--/
--/ @return Current position
--/
--//////////////////////////////////////////////////////////
function getPosition (shape : sfShape_Ptr) return Sf.System.Vector2.sfVector2f;
--//////////////////////////////////////////////////////////
--/ @brief Get the orientation of a shape
--/
--/ The rotation is always in the range [0, 360].
--/
--/ @param shape Shape object
--/
--/ @return Current rotation, in degrees
--/
--//////////////////////////////////////////////////////////
function getRotation (shape : sfShape_Ptr) return float;
--//////////////////////////////////////////////////////////
--/ @brief Get the current scale of a shape
--/
--/ @param shape Shape object
--/
--/ @return Current scale factors
--/
--//////////////////////////////////////////////////////////
function getScale (shape : sfShape_Ptr) return Sf.System.Vector2.sfVector2f;
--//////////////////////////////////////////////////////////
--/ @brief Get the local origin of a shape
--/
--/ @param shape Shape object
--/
--/ @return Current origin
--/
--//////////////////////////////////////////////////////////
function getOrigin (shape : sfShape_Ptr) return Sf.System.Vector2.sfVector2f;
--//////////////////////////////////////////////////////////
--/ @brief Move a shape by a given offset
--/
--/ This function adds to the current position of the object,
--/ unlike sfShape_setPosition which overwrites it.
--/
--/ @param shape Shape object
--/ @param offset Offset
--/
--//////////////////////////////////////////////////////////
procedure move (shape : sfShape_Ptr; offset : Sf.System.Vector2.sfVector2f);
--//////////////////////////////////////////////////////////
--/ @brief Rotate a shape
--/
--/ This function adds to the current rotation of the object,
--/ unlike sfShape_setRotation which overwrites it.
--/
--/ @param shape Shape object
--/ @param angle Angle of rotation, in degrees
--/
--//////////////////////////////////////////////////////////
procedure rotate (shape : sfShape_Ptr; angle : float);
--//////////////////////////////////////////////////////////
--/ @brief Scale a shape
--/
--/ This function multiplies the current scale of the object,
--/ unlike sfShape_setScale which overwrites it.
--/
--/ @param shape Shape object
--/ @param factors Scale factors
--/
--//////////////////////////////////////////////////////////
procedure scale (shape : sfShape_Ptr; factors : Sf.System.Vector2.sfVector2f);
--//////////////////////////////////////////////////////////
--/ @brief Get the combined transform of a shape
--/
--/ @param shape shape object
--/
--/ @return Transform combining the position/rotation/scale/origin of the object
--/
--//////////////////////////////////////////////////////////
function getTransform (shape : sfShape_Ptr) return Sf.Graphics.Transform.sfTransform;
--//////////////////////////////////////////////////////////
--/ @brief Get the inverse of the combined transform of a shape
--/
--/ @param shape shape object
--/
--/ @return Inverse of the combined transformations applied to the object
--/
--//////////////////////////////////////////////////////////
function getInverseTransform (shape : sfShape_Ptr) return Sf.Graphics.Transform.sfTransform;
--//////////////////////////////////////////////////////////
--/ @brief Change the source texture of a shape
--/
--/ The @a texture argument refers to a texture that must
--/ exist as long as the shape uses it. Indeed, the shape
--/ doesn't store its own copy of the texture, but rather keeps
--/ a pointer to the one that you passed to this function.
--/ If the source texture is destroyed and the shape tries to
--/ use it, the behaviour is undefined.
--/ @a texture can be NULL to disable texturing.
--/ If @a resetRect is true, the TextureRect property of
--/ the shape is automatically adjusted to the size of the new
--/ texture. If it is false, the texture rect is left unchanged.
--/
--/ @param shape Shape object
--/ @param texture New texture
--/ @param resetRect Should the texture rect be reset to the size of the new texture?
--/
--//////////////////////////////////////////////////////////
procedure setTexture
(shape : sfShape_Ptr;
texture : sfTexture_Ptr;
resetRect : sfBool);
--//////////////////////////////////////////////////////////
--/ @brief Set the sub-rectangle of the texture that a shape will display
--/
--/ The texture rect is useful when you don't want to display
--/ the whole texture, but rather a part of it.
--/ By default, the texture rect covers the entire texture.
--/
--/ @param shape Shape object
--/ @param rect Rectangle defining the region of the texture to display
--/
--//////////////////////////////////////////////////////////
procedure setTextureRect (shape : sfShape_Ptr; rect : Sf.Graphics.Rect.sfIntRect);
--//////////////////////////////////////////////////////////
--/ @brief Set the fill color of a shape
--/
--/ This color is modulated (multiplied) with the shape's
--/ texture if any. It can be used to colorize the shape,
--/ or change its global opacity.
--/ You can use sfTransparent to make the inside of
--/ the shape transparent, and have the outline alone.
--/ By default, the shape's fill color is opaque white.
--/
--/ @param shape Shape object
--/ @param color New color of the shape
--/
--//////////////////////////////////////////////////////////
procedure setFillColor (shape : sfShape_Ptr; color : Sf.Graphics.Color.sfColor);
--//////////////////////////////////////////////////////////
--/ @brief Set the outline color of a shape
--/
--/ You can use sfTransparent to disable the outline.
--/ By default, the shape's outline color is opaque white.
--/
--/ @param shape Shape object
--/ @param color New outline color of the shape
--/
--//////////////////////////////////////////////////////////
procedure setOutlineColor (shape : sfShape_Ptr; color : Sf.Graphics.Color.sfColor);
--//////////////////////////////////////////////////////////
--/ @brief Set the thickness of a shape's outline
--/
--/ This number cannot be negative. Using zero disables
--/ the outline.
--/ By default, the outline thickness is 0.
--/
--/ @param shape Shape object
--/ @param thickness New outline thickness
--/
--//////////////////////////////////////////////////////////
procedure setOutlineThickness (shape : sfShape_Ptr; thickness : float);
--//////////////////////////////////////////////////////////
--/ @brief Get the source texture of a shape
--/
--/ If the shape has no source texture, a NULL pointer is returned.
--/ The returned pointer is const, which means that you can't
--/ modify the texture when you retrieve it with this function.
--/
--/ @param shape Shape object
--/
--/ @return Pointer to the shape's texture
--/
--//////////////////////////////////////////////////////////
function getTexture (shape : sfShape_Ptr) return sfTexture_Ptr;
--//////////////////////////////////////////////////////////
--/ @brief Get the sub-rectangle of the texture displayed by a shape
--/
--/ @param shape Shape object
--/
--/ @return Texture rectangle of the shape
--/
--//////////////////////////////////////////////////////////
function getTextureRect (shape : sfShape_Ptr) return Sf.Graphics.Rect.sfIntRect;
--//////////////////////////////////////////////////////////
--/ @brief Get the fill color of a shape
--/
--/ @param shape Shape object
--/
--/ @return Fill color of the shape
--/
--//////////////////////////////////////////////////////////
function getFillColor (shape : sfShape_Ptr) return Sf.Graphics.Color.sfColor;
--//////////////////////////////////////////////////////////
--/ @brief Get the outline color of a shape
--/
--/ @param shape Shape object
--/
--/ @return Outline color of the shape
--/
--//////////////////////////////////////////////////////////
function getOutlineColor (shape : sfShape_Ptr) return Sf.Graphics.Color.sfColor;
--//////////////////////////////////////////////////////////
--/ @brief Get the outline thickness of a shape
--/
--/ @param shape Shape object
--/
--/ @return Outline thickness of the shape
--/
--//////////////////////////////////////////////////////////
function getOutlineThickness (shape : sfShape_Ptr) return float;
--//////////////////////////////////////////////////////////
--/ @brief Get the total number of points of a shape
--/
--/ @param shape Shape object
--/
--/ @return Number of points of the shape
--/
--//////////////////////////////////////////////////////////
function getPointCount (shape : sfShape_Ptr) return sfSize_t;
--//////////////////////////////////////////////////////////
--/ @brief Get a point of a shape
--/
--/ The result is undefined if @a index is out of the valid range.
--/
--/ @param shape Shape object
--/ @param index Index of the point to get, in range [0 .. getPointCount() - 1]
--/
--/ @return Index-th point of the shape
--/
--//////////////////////////////////////////////////////////
function getPoint (shape : sfShape_Ptr; index : sfSize_t) return Sf.System.Vector2.sfVector2f;
--//////////////////////////////////////////////////////////
--/ @brief Get the local bounding rectangle of a shape
--/
--/ The returned rectangle is in local coordinates, which means
--/ that it ignores the transformations (translation, rotation,
--/ scale, ...) that are applied to the entity.
--/ In other words, this function returns the bounds of the
--/ entity in the entity's coordinate system.
--/
--/ @param shape Shape object
--/
--/ @return Local bounding rectangle of the entity
--/
--//////////////////////////////////////////////////////////
function getLocalBounds (shape : sfShape_Ptr) return Sf.Graphics.Rect.sfFloatRect;
--//////////////////////////////////////////////////////////
--/ @brief Get the global bounding rectangle of a shape
--/
--/ The returned rectangle is in global coordinates, which means
--/ that it takes in account the transformations (translation,
--/ rotation, scale, ...) that are applied to the entity.
--/ In other words, this function returns the bounds of the
--/ sprite in the global 2D world's coordinate system.
--/
--/ @param shape Shape object
--/
--/ @return Global bounding rectangle of the entity
--/
--//////////////////////////////////////////////////////////
function getGlobalBounds (shape : sfShape_Ptr) return Sf.Graphics.Rect.sfFloatRect;
--//////////////////////////////////////////////////////////
--/ @brief Recompute the internal geometry of a shape
--/
--/ This function must be called by specialized shape objects
--/ everytime their points change (ie. the result of either
--/ the getPointCount or getPoint callbacks is different).
--/
--//////////////////////////////////////////////////////////
procedure update (shape : sfShape_Ptr);
private
pragma Import (C, create, "sfShape_create");
pragma Import (C, destroy, "sfShape_destroy");
pragma Import (C, setPosition, "sfShape_setPosition");
pragma Import (C, setRotation, "sfShape_setRotation");
pragma Import (C, setScale, "sfShape_setScale");
pragma Import (C, setOrigin, "sfShape_setOrigin");
pragma Import (C, getPosition, "sfShape_getPosition");
pragma Import (C, getRotation, "sfShape_getRotation");
pragma Import (C, getScale, "sfShape_getScale");
pragma Import (C, getOrigin, "sfShape_getOrigin");
pragma Import (C, move, "sfShape_move");
pragma Import (C, rotate, "sfShape_rotate");
pragma Import (C, scale, "sfShape_scale");
pragma Import (C, getTransform, "sfShape_getTransform");
pragma Import (C, getInverseTransform, "sfShape_getInverseTransform");
pragma Import (C, setTexture, "sfShape_setTexture");
pragma Import (C, setTextureRect, "sfShape_setTextureRect");
pragma Import (C, setFillColor, "sfShape_setFillColor");
pragma Import (C, setOutlineColor, "sfShape_setOutlineColor");
pragma Import (C, setOutlineThickness, "sfShape_setOutlineThickness");
pragma Import (C, getTexture, "sfShape_getTexture");
pragma Import (C, getTextureRect, "sfShape_getTextureRect");
pragma Import (C, getFillColor, "sfShape_getFillColor");
pragma Import (C, getOutlineColor, "sfShape_getOutlineColor");
pragma Import (C, getOutlineThickness, "sfShape_getOutlineThickness");
pragma Import (C, getPointCount, "sfShape_getPointCount");
pragma Import (C, getPoint, "sfShape_getPoint");
pragma Import (C, getLocalBounds, "sfShape_getLocalBounds");
pragma Import (C, getGlobalBounds, "sfShape_getGlobalBounds");
pragma Import (C, update, "sfShape_update");
end Sf.Graphics.Shape;
|
-----------------------------------------------------------------------
-- akt-commands -- Ada Keystore Tool commands
-- Copyright (C) 2019 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 Keystore.Passwords;
with Keystore.Passwords.GPG;
with Util.Commands;
with Keystore;
private with Util.Log.Loggers;
private with Keystore.Files;
private with Keystore.Passwords.Keys;
private with Ada.Finalization;
private with GNAT.Command_Line;
private with GNAT.Strings;
package AKT.Commands is
Error : exception;
subtype Argument_List is Util.Commands.Argument_List;
type Context_Type is limited private;
-- Print the command usage.
procedure Usage (Args : in Argument_List'Class;
Context : in out Context_Type;
Name : in String := "");
-- Open the keystore file using the password password.
-- When `Use_Worker` is set, a workers of N tasks is created and assigned to the keystore
-- for the decryption and encryption process.
procedure Open_Keystore (Context : in out Context_Type;
Args : in Argument_List'Class;
Use_Worker : in Boolean := False);
-- Open the keystore file and change the password.
procedure Change_Password (Context : in out Context_Type;
Args : in Argument_List'Class;
New_Password : in out Keystore.Passwords.Provider'Class;
Config : in Keystore.Wallet_Config;
Mode : in Keystore.Mode_Type);
-- Execute the command with its arguments.
procedure Execute (Name : in String;
Args : in Argument_List'Class;
Context : in out Context_Type);
procedure Parse (Context : in out Context_Type;
Arguments : out Util.Commands.Dynamic_Argument_List);
procedure Parse_Range (Value : in String;
Config : in out Keystore.Wallet_Config);
-- Get the keystore file path.
function Get_Keystore_Path (Context : in out Context_Type;
Args : in Argument_List'Class) return String;
private
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("AKT.Commands");
package GC renames GNAT.Command_Line;
procedure Initialize (Context : in out Keystore.Passwords.GPG.Context_Type);
type Context_Type is limited new Ada.Finalization.Limited_Controlled with record
Wallet : Keystore.Files.Wallet_File;
Info : Keystore.Wallet_Info;
Config : Keystore.Wallet_Config := Keystore.Secure_Config;
Workers : Keystore.Task_Manager_Access;
Provider : Keystore.Passwords.Provider_Access;
Key_Provider : Keystore.Passwords.Keys.Key_Provider_Access;
Slot : Keystore.Key_Slot;
Worker_Count : aliased Integer := 1;
Version : aliased Boolean := False;
Verbose : aliased Boolean := False;
Debug : aliased Boolean := False;
Dump : aliased Boolean := False;
Zero : aliased Boolean := False;
Config_File : aliased GNAT.Strings.String_Access;
Wallet_File : aliased GNAT.Strings.String_Access;
Data_Path : aliased GNAT.Strings.String_Access;
Wallet_Key_File : aliased GNAT.Strings.String_Access;
Password_File : aliased GNAT.Strings.String_Access;
Password_Env : aliased GNAT.Strings.String_Access;
Unsafe_Password : aliased GNAT.Strings.String_Access;
Password_Socket : aliased GNAT.Strings.String_Access;
Password_Command : aliased GNAT.Strings.String_Access;
Password_Askpass : aliased Boolean := False;
No_Password_Opt : Boolean := False;
Command_Config : GC.Command_Line_Configuration;
First_Arg : Positive := 1;
GPG : Keystore.Passwords.GPG.Context_Type;
end record;
-- Initialize the commands.
overriding
procedure Initialize (Context : in out Context_Type);
overriding
procedure Finalize (Context : in out Context_Type);
procedure Setup_Password_Provider (Context : in out Context_Type);
procedure Setup_Key_Provider (Context : in out Context_Type);
-- Setup the command before parsing the arguments and executing it.
procedure Setup (Config : in out GC.Command_Line_Configuration;
Context : in out Context_Type);
end AKT.Commands;
|
-- Copyright 2013-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/>.
with IO; use IO;
with Callee; use Callee;
package body Caller is
procedure Verbose_Increment (Val : in out Float; Msg : String) is
begin
Put_Line ("DEBUG: " & Msg);
Increment (Val, "Verbose_Increment");
end Verbose_Increment;
end Caller;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Elements;
with AMF.Internals.Element_Collections;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.UML_Attributes;
with AMF.Visitors.UML_Iterators;
with AMF.Visitors.UML_Visitors;
with League.Strings.Internals;
with Matreshka.Internals.Strings;
package body AMF.Internals.UML_Combined_Fragments is
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant UML_Combined_Fragment_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
AMF.Visitors.UML_Visitors.UML_Visitor'Class
(Visitor).Enter_Combined_Fragment
(AMF.UML.Combined_Fragments.UML_Combined_Fragment_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant UML_Combined_Fragment_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
AMF.Visitors.UML_Visitors.UML_Visitor'Class
(Visitor).Leave_Combined_Fragment
(AMF.UML.Combined_Fragments.UML_Combined_Fragment_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant UML_Combined_Fragment_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then
AMF.Visitors.UML_Iterators.UML_Iterator'Class
(Iterator).Visit_Combined_Fragment
(Visitor,
AMF.UML.Combined_Fragments.UML_Combined_Fragment_Access (Self),
Control);
end if;
end Visit_Element;
------------------------
-- Get_Cfragment_Gate --
------------------------
overriding function Get_Cfragment_Gate
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Gates.Collections.Set_Of_UML_Gate is
begin
return
AMF.UML.Gates.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Cfragment_Gate
(Self.Element)));
end Get_Cfragment_Gate;
------------------------------
-- Get_Interaction_Operator --
------------------------------
overriding function Get_Interaction_Operator
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.UML_Interaction_Operator_Kind is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Interaction_Operator
(Self.Element);
end Get_Interaction_Operator;
------------------------------
-- Set_Interaction_Operator --
------------------------------
overriding procedure Set_Interaction_Operator
(Self : not null access UML_Combined_Fragment_Proxy;
To : AMF.UML.UML_Interaction_Operator_Kind) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Interaction_Operator
(Self.Element, To);
end Set_Interaction_Operator;
-----------------
-- Get_Operand --
-----------------
overriding function Get_Operand
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Interaction_Operands.Collections.Ordered_Set_Of_UML_Interaction_Operand is
begin
return
AMF.UML.Interaction_Operands.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Operand
(Self.Element)));
end Get_Operand;
-----------------
-- Get_Covered --
-----------------
overriding function Get_Covered
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Lifelines.Collections.Set_Of_UML_Lifeline is
begin
return
AMF.UML.Lifelines.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Covered
(Self.Element)));
end Get_Covered;
-------------------------------
-- Get_Enclosing_Interaction --
-------------------------------
overriding function Get_Enclosing_Interaction
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Interactions.UML_Interaction_Access is
begin
return
AMF.UML.Interactions.UML_Interaction_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Enclosing_Interaction
(Self.Element)));
end Get_Enclosing_Interaction;
-------------------------------
-- Set_Enclosing_Interaction --
-------------------------------
overriding procedure Set_Enclosing_Interaction
(Self : not null access UML_Combined_Fragment_Proxy;
To : AMF.UML.Interactions.UML_Interaction_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Enclosing_Interaction
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Enclosing_Interaction;
---------------------------
-- Get_Enclosing_Operand --
---------------------------
overriding function Get_Enclosing_Operand
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access is
begin
return
AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Enclosing_Operand
(Self.Element)));
end Get_Enclosing_Operand;
---------------------------
-- Set_Enclosing_Operand --
---------------------------
overriding procedure Set_Enclosing_Operand
(Self : not null access UML_Combined_Fragment_Proxy;
To : AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Enclosing_Operand
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Enclosing_Operand;
--------------------------
-- Get_General_Ordering --
--------------------------
overriding function Get_General_Ordering
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.General_Orderings.Collections.Set_Of_UML_General_Ordering is
begin
return
AMF.UML.General_Orderings.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_General_Ordering
(Self.Element)));
end Get_General_Ordering;
---------------------------
-- Get_Client_Dependency --
---------------------------
overriding function Get_Client_Dependency
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is
begin
return
AMF.UML.Dependencies.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency
(Self.Element)));
end Get_Client_Dependency;
-------------------------
-- Get_Name_Expression --
-------------------------
overriding function Get_Name_Expression
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access is
begin
return
AMF.UML.String_Expressions.UML_String_Expression_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression
(Self.Element)));
end Get_Name_Expression;
-------------------------
-- Set_Name_Expression --
-------------------------
overriding procedure Set_Name_Expression
(Self : not null access UML_Combined_Fragment_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Name_Expression;
-------------------
-- Get_Namespace --
-------------------
overriding function Get_Namespace
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access is
begin
return
AMF.UML.Namespaces.UML_Namespace_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace
(Self.Element)));
end Get_Namespace;
------------------------
-- Get_Qualified_Name --
------------------------
overriding function Get_Qualified_Name
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.Optional_String is
begin
declare
use type Matreshka.Internals.Strings.Shared_String_Access;
Aux : constant Matreshka.Internals.Strings.Shared_String_Access
:= AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element);
begin
if Aux = null then
return (Is_Empty => True);
else
return (False, League.Strings.Internals.Create (Aux));
end if;
end;
end Get_Qualified_Name;
-------------------------
-- All_Owning_Packages --
-------------------------
overriding function All_Owning_Packages
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented");
raise Program_Error with "Unimplemented procedure UML_Combined_Fragment_Proxy.All_Owning_Packages";
return All_Owning_Packages (Self);
end All_Owning_Packages;
-----------------------------
-- Is_Distinguishable_From --
-----------------------------
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Combined_Fragment_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented");
raise Program_Error with "Unimplemented procedure UML_Combined_Fragment_Proxy.Is_Distinguishable_From";
return Is_Distinguishable_From (Self, N, Ns);
end Is_Distinguishable_From;
---------------
-- Namespace --
---------------
overriding function Namespace
(Self : not null access constant UML_Combined_Fragment_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented");
raise Program_Error with "Unimplemented procedure UML_Combined_Fragment_Proxy.Namespace";
return Namespace (Self);
end Namespace;
end AMF.Internals.UML_Combined_Fragments;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- G N A T . C A S E _ U T I L --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1995-1998 Ada Core Technologies, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT is maintained by Ada Core Technologies Inc (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
-- Simple casing functions
-- This package provides simple casing functions that do not require the
-- overhead of the full casing tables found in Ada.Characters.Handling.
package GNAT.Case_Util is
pragma Pure (Case_Util);
-- Note: all the following functions handle the full Latin-1 set
function To_Upper (A : Character) return Character;
-- Converts A to upper case if it is a lower case letter, otherwise
-- returns the input argument unchanged.
procedure To_Upper (A : in out String);
-- Folds all characters of string A to upper csae
function To_Lower (A : Character) return Character;
-- Converts A to lower case if it is an upper case letter, otherwise
-- returns the input argument unchanged.
procedure To_Lower (A : in out String);
-- Folds all characters of string A to lower case
procedure To_Mixed (A : in out String);
-- Converts A to mixed case (i.e. lower case, except for initial
-- character and any character after an underscore, which are
-- converted to upper case.
end GNAT.Case_Util;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- A D A . W I D E _ T E X T _ I O . C O M P L E X _ A U X --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992,1993,1994,1995,1996 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Wide_Text_IO.Generic_Aux; use Ada.Wide_Text_IO.Generic_Aux;
with Ada.Wide_Text_IO.Float_Aux;
with System.Img_Real; use System.Img_Real;
package body Ada.Wide_Text_IO.Complex_Aux is
package Aux renames Ada.Wide_Text_IO.Float_Aux;
---------
-- Get --
---------
procedure Get
(File : in File_Type;
ItemR : out Long_Long_Float;
ItemI : out Long_Long_Float;
Width : Field)
is
Buf : String (1 .. Field'Last);
Stop : Integer := 0;
Ptr : aliased Integer;
Paren : Boolean := False;
begin
-- General note for following code, exceptions from the calls
-- to Get for components of the complex value are propagated.
if Width /= 0 then
Load_Width (File, Width, Buf, Stop);
Gets (Buf (1 .. Stop), ItemR, ItemI, Ptr);
for J in Ptr + 1 .. Stop loop
if not Is_Blank (Buf (J)) then
raise Data_Error;
end if;
end loop;
-- Case of width = 0
else
Load_Skip (File);
Ptr := 0;
Load (File, Buf, Ptr, '(', Paren);
Aux.Get (File, ItemR, 0);
Load_Skip (File);
Load (File, Buf, Ptr, ',');
Aux.Get (File, ItemI, 0);
if Paren then
Load_Skip (File);
Load (File, Buf, Ptr, ')', Paren);
if not Paren then
raise Data_Error;
end if;
end if;
end if;
end Get;
----------
-- Gets --
----------
procedure Gets
(From : in String;
ItemR : out Long_Long_Float;
ItemI : out Long_Long_Float;
Last : out Positive)
is
Paren : Boolean;
Pos : Integer;
begin
String_Skip (From, Pos);
if From (Pos) = '(' then
Pos := Pos + 1;
Paren := True;
else
Paren := False;
end if;
Aux.Gets (From (Pos .. From'Last), ItemR, Pos);
String_Skip (From (Pos + 1 .. From'Last), Pos);
if From (Pos) = ',' then
Pos := Pos + 1;
end if;
Aux.Gets (From (Pos .. From'Last), ItemI, Pos);
if Paren then
String_Skip (From (Pos + 1 .. From'Last), Pos);
if From (Pos) /= ')' then
raise Data_Error;
end if;
end if;
Last := Pos;
end Gets;
---------
-- Put --
---------
procedure Put
(File : File_Type;
ItemR : Long_Long_Float;
ItemI : Long_Long_Float;
Fore : Field;
Aft : Field;
Exp : Field)
is
begin
Put (File, '(');
Aux.Put (File, ItemR, Fore, Aft, Exp);
Put (File, ',');
Aux.Put (File, ItemI, Fore, Aft, Exp);
Put (File, ')');
end Put;
----------
-- Puts --
----------
procedure Puts
(To : out String;
ItemR : Long_Long_Float;
ItemI : Long_Long_Float;
Aft : in Field;
Exp : in Field)
is
I_String : String (1 .. 3 * Field'Last);
R_String : String (1 .. 3 * Field'Last);
Iptr : Natural;
Rptr : Natural;
begin
-- Both parts are initially converted with a Fore of 0
Rptr := 0;
Set_Image_Real (ItemR, R_String, Rptr, 0, Aft, Exp);
Iptr := 0;
Set_Image_Real (ItemI, I_String, Iptr, 0, Aft, Exp);
-- Check room for both parts plus parens plus comma (RM G.1.3(34))
if Rptr + Iptr + 3 > To'Length then
raise Layout_Error;
end if;
-- If there is room, layout result according to (RM G.1.3(31-33))
To (To'First) := '(';
To (To'First + 1 .. To'First + Rptr) := R_String (1 .. Rptr);
To (To'First + Rptr + 1) := ',';
To (To'Last) := ')';
To (To'Last - Iptr .. To'Last - 1) := I_String (1 .. Iptr);
for J in To'First + Rptr + 2 .. To'Last - Iptr - 1 loop
To (J) := ' ';
end loop;
end Puts;
end Ada.Wide_Text_IO.Complex_Aux;
|
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with ewok.tasks_shared; use ewok.tasks_shared;
package ewok.syscalls.yield
with spark_mode => off
is
procedure sys_yield
(caller_id : in ewok.tasks_shared.t_task_id;
mode : in ewok.tasks_shared.t_task_mode);
end ewok.syscalls.yield;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- XML Processor --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2010-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$
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
with League.Strings.Internals;
package body Matreshka.Internals.XML.Entity_Tables is
procedure Free is
new Ada.Unchecked_Deallocation (Entity_Array, Entity_Array_Access);
procedure New_Entity
(Self : in out Entity_Table;
Entity : out Entity_Identifier);
-- Allocates new entity and returns its identifier. Reallocates internal
-- memory when needed.
------------------------
-- Enclosing_Base_URI --
------------------------
function Enclosing_Base_URI
(Self : Entity_Table;
Entity : Entity_Identifier)
return not null Matreshka.Internals.Strings.Shared_String_Access is
begin
return Self.Data (Entity).Enclosing_Base_URI;
end Enclosing_Base_URI;
----------------------
-- Enclosing_Entity --
----------------------
function Enclosing_Entity
(Self : Entity_Table;
Entity : Entity_Identifier)
return Matreshka.Internals.XML.Entity_Identifier is
begin
return Self.Data (Entity).Enclosing;
end Enclosing_Entity;
---------------------
-- Entity_Base_URI --
---------------------
function Entity_Base_URI
(Self : Entity_Table;
Entity : Entity_Identifier)
return not null Matreshka.Internals.Strings.Shared_String_Access is
begin
return Self.Data (Entity).Entity_Base_URI;
end Entity_Base_URI;
--------------
-- Finalize --
--------------
procedure Finalize (Self : in out Entity_Table) is
begin
for J in Self.Data'First .. Self.Last loop
Matreshka.Internals.Strings.Dereference
(Self.Data (J).Replacement_Text);
Matreshka.Internals.Strings.Dereference (Self.Data (J).Public_Id);
Matreshka.Internals.Strings.Dereference (Self.Data (J).System_Id);
Matreshka.Internals.Strings.Dereference (Self.Data (J).Enclosing_Base_URI);
Matreshka.Internals.Strings.Dereference (Self.Data (J).Entity_Base_URI);
end loop;
Free (Self.Data);
end Finalize;
------------------
-- First_Entity --
------------------
function First_Entity (Self : Entity_Table) return Entity_Identifier is
pragma Unreferenced (Self);
begin
return No_Entity + 1;
end First_Entity;
--------------------
-- First_Position --
--------------------
function First_Position
(Self : Entity_Table;
Entity : Entity_Identifier)
return Matreshka.Internals.Utf16.Utf16_String_Index is
begin
return Self.Data (Entity).First_Position;
end First_Position;
----------------
-- Initialize --
----------------
procedure Initialize (Self : in out Entity_Table) is
procedure Register_Predefined_Entity
(Name : Matreshka.Internals.XML.Symbol_Identifier;
Text : League.Strings.Universal_String);
-- Creates predefined entity.
--------------------------------
-- Register_Predefined_Entity --
--------------------------------
procedure Register_Predefined_Entity
(Name : Matreshka.Internals.XML.Symbol_Identifier;
Text : League.Strings.Universal_String)
is
T : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Text);
E : Entity_Identifier;
begin
Matreshka.Internals.Strings.Reference (T);
New_Internal_General_Entity (Self, No_Entity, Name, T, E);
end Register_Predefined_Entity;
begin
Self.Data := new Entity_Array (1 .. 16);
Self.Last := 0;
Register_Predefined_Entity
(Symbol_lt, League.Strings.To_Universal_String ("<"));
Register_Predefined_Entity
(Symbol_gt, League.Strings.To_Universal_String (">"));
Register_Predefined_Entity
(Symbol_amp, League.Strings.To_Universal_String ("&"));
Register_Predefined_Entity
(Symbol_apos, League.Strings.To_Universal_String ("'"));
Register_Predefined_Entity
(Symbol_quot, League.Strings.To_Universal_String (""""));
end Initialize;
------------------------
-- Is_Document_Entity --
------------------------
function Is_Document_Entity
(Self : Entity_Table;
Entity : Entity_Identifier) return Boolean is
begin
return Self.Data (Entity).Kind = Document_Entity;
end Is_Document_Entity;
---------------------------------------
-- Is_External_Parsed_General_Entity --
---------------------------------------
function Is_External_Parsed_General_Entity
(Self : Entity_Table;
Entity : Entity_Identifier) return Boolean is
begin
return Self.Data (Entity).Kind = External_Parsed_General_Entity;
end Is_External_Parsed_General_Entity;
------------------------
-- Is_External_Subset --
------------------------
function Is_External_Subset
(Self : Entity_Table;
Entity : Entity_Identifier) return Boolean is
begin
return Self.Data (Entity).Kind = External_Subset_Entity;
end Is_External_Subset;
-----------------------------------------
-- Is_External_Unparsed_General_Entity --
-----------------------------------------
function Is_External_Unparsed_General_Entity
(Self : Entity_Table;
Entity : Entity_Identifier) return Boolean is
begin
return Self.Data (Entity).Kind = External_Unparsed_General_Entity;
end Is_External_Unparsed_General_Entity;
--------------------------------
-- Is_Internal_General_Entity --
--------------------------------
function Is_Internal_General_Entity
(Self : Entity_Table;
Entity : Entity_Identifier) return Boolean is
begin
return Self.Data (Entity).Kind = Internal_General_Entity;
end Is_Internal_General_Entity;
-------------------------
-- Is_Parameter_Entity --
-------------------------
function Is_Parameter_Entity
(Self : Entity_Table;
Entity : Entity_Identifier) return Boolean is
begin
return
Self.Data (Entity).Kind = Internal_Parameter_Entity
or Self.Data (Entity).Kind = External_Parameter_Entity;
end Is_Parameter_Entity;
------------------------------
-- Is_Parsed_General_Entity --
------------------------------
function Is_Parsed_General_Entity
(Self : Entity_Table;
Entity : Entity_Identifier) return Boolean is
begin
return
Self.Data (Entity).Kind = Internal_General_Entity
or Self.Data (Entity).Kind = External_Parsed_General_Entity;
end Is_Parsed_General_Entity;
-----------------
-- Is_Resolved --
-----------------
function Is_Resolved
(Self : Entity_Table;
Entity : Entity_Identifier) return Boolean is
begin
return Self.Data (Entity).Is_Resolved;
end Is_Resolved;
----------
-- Name --
----------
function Name
(Self : Entity_Table;
Entity : Entity_Identifier)
return Matreshka.Internals.XML.Symbol_Identifier is
begin
return Self.Data (Entity).Name;
end Name;
-------------------------
-- New_Document_Entity --
-------------------------
procedure New_Document_Entity
(Self : in out Entity_Table;
Public_Id : League.Strings.Universal_String;
System_Id : League.Strings.Universal_String;
Entity_Base_URI : League.Strings.Universal_String;
Entity : out Entity_Identifier)
is
P : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Public_Id);
S : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (System_Id);
B : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Entity_Base_URI);
begin
New_Entity (Self, Entity);
Matreshka.Internals.Strings.Reference (P);
Matreshka.Internals.Strings.Reference (S);
Matreshka.Internals.Strings.Reference (B);
Self.Data (Entity) :=
(Kind => Document_Entity,
Enclosing => No_Entity,
Name => No_Symbol,
Notation => No_Symbol,
Public_Id => P,
System_Id => S,
Enclosing_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access,
Entity_Base_URI => B,
Is_Resolved => False,
Replacement_Text => Matreshka.Internals.Strings.Shared_Empty'Access,
First_Position => 0);
end New_Document_Entity;
----------------
-- New_Entity --
----------------
procedure New_Entity
(Self : in out Entity_Table;
Entity : out Entity_Identifier)
is
Aux : Entity_Array_Access := Self.Data;
begin
Self.Last := Self.Last + 1;
Entity := Self.Last;
if Self.Last > Self.Data'Last then
Self.Data :=
new Entity_Array (Self.Data'First .. Self.Data'Last + 16);
Self.Data (Aux'Range) := Aux.all;
Free (Aux);
end if;
end New_Entity;
-----------------------------------
-- New_External_Parameter_Entity --
-----------------------------------
procedure New_External_Parameter_Entity
(Self : in out Entity_Table;
Enclosing_Entity : Entity_Identifier;
Name : Matreshka.Internals.XML.Symbol_Identifier;
Public_Id : League.Strings.Universal_String;
System_Id : League.Strings.Universal_String;
Enclosing_Base_URI : League.Strings.Universal_String;
Entity : out Entity_Identifier)
is
P : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Public_Id);
S : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (System_Id);
B : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Enclosing_Base_URI);
begin
New_Entity (Self, Entity);
Matreshka.Internals.Strings.Reference (P);
Matreshka.Internals.Strings.Reference (S);
Matreshka.Internals.Strings.Reference (B);
Self.Data (Entity) :=
(Kind => External_Parameter_Entity,
Enclosing => Enclosing_Entity,
Name => Name,
Notation => No_Symbol,
Public_Id => P,
System_Id => S,
Enclosing_Base_URI => B,
Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access,
Is_Resolved => False,
Replacement_Text => Matreshka.Internals.Strings.Shared_Empty'Access,
First_Position => 0);
end New_External_Parameter_Entity;
----------------------------------------
-- New_External_Parsed_General_Entity --
----------------------------------------
procedure New_External_Parsed_General_Entity
(Self : in out Entity_Table;
Enclosing_Entity : Entity_Identifier;
Name : Matreshka.Internals.XML.Symbol_Identifier;
Public_Id : League.Strings.Universal_String;
System_Id : League.Strings.Universal_String;
Enclosing_Base_URI : League.Strings.Universal_String;
Entity : out Entity_Identifier)
is
P : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Public_Id);
S : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (System_Id);
B : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Enclosing_Base_URI);
begin
New_Entity (Self, Entity);
Matreshka.Internals.Strings.Reference (P);
Matreshka.Internals.Strings.Reference (S);
Matreshka.Internals.Strings.Reference (B);
Self.Data (Entity) :=
(Kind => External_Parsed_General_Entity,
Enclosing => Enclosing_Entity,
Name => Name,
Notation => No_Symbol,
Public_Id => P,
System_Id => S,
Enclosing_Base_URI => B,
Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access,
Is_Resolved => False,
Replacement_Text => Matreshka.Internals.Strings.Shared_Empty'Access,
First_Position => 0);
end New_External_Parsed_General_Entity;
--------------------------------
-- New_External_Subset_Entity --
--------------------------------
procedure New_External_Subset_Entity
(Self : in out Entity_Table;
Enclosing_Entity : Entity_Identifier;
Public_Id : League.Strings.Universal_String;
System_Id : League.Strings.Universal_String;
Enclosing_Base_URI : League.Strings.Universal_String;
Entity : out Entity_Identifier)
is
P : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Public_Id);
S : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (System_Id);
B : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Enclosing_Base_URI);
begin
New_Entity (Self, Entity);
Matreshka.Internals.Strings.Reference (P);
Matreshka.Internals.Strings.Reference (S);
Matreshka.Internals.Strings.Reference (B);
Self.Data (Entity) :=
(Kind => External_Subset_Entity,
Enclosing => Enclosing_Entity,
Name => No_Symbol,
Notation => No_Symbol,
Public_Id => P,
System_Id => S,
Enclosing_Base_URI => B,
Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access,
Is_Resolved => False,
Replacement_Text => Matreshka.Internals.Strings.Shared_Empty'Access,
First_Position => 0);
end New_External_Subset_Entity;
------------------------------------------
-- New_External_Unparsed_General_Entity --
------------------------------------------
procedure New_External_Unparsed_General_Entity
(Self : in out Entity_Table;
Enclosing_Entity : Entity_Identifier;
Name : Matreshka.Internals.XML.Symbol_Identifier;
Notation : Symbol_Identifier;
Entity : out Entity_Identifier) is
begin
New_Entity (Self, Entity);
Self.Data (Entity) :=
(Kind => External_Unparsed_General_Entity,
Enclosing => Enclosing_Entity,
Name => Name,
Notation => Notation,
Public_Id => Matreshka.Internals.Strings.Shared_Empty'Access,
System_Id => Matreshka.Internals.Strings.Shared_Empty'Access,
Enclosing_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access,
Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access,
Is_Resolved => False,
Replacement_Text => Matreshka.Internals.Strings.Shared_Empty'Access,
First_Position => 0);
end New_External_Unparsed_General_Entity;
---------------------------------
-- New_Internal_General_Entity --
---------------------------------
procedure New_Internal_General_Entity
(Self : in out Entity_Table;
Enclosing_Entity : Entity_Identifier;
Name : Matreshka.Internals.XML.Symbol_Identifier;
Replacement_Text :
not null Matreshka.Internals.Strings.Shared_String_Access;
Entity : out Entity_Identifier) is
begin
New_Entity (Self, Entity);
Self.Data (Entity) :=
(Kind => Internal_General_Entity,
Enclosing => Enclosing_Entity,
Name => Name,
Notation => No_Symbol,
Public_Id => Matreshka.Internals.Strings.Shared_Empty'Access,
System_Id => Matreshka.Internals.Strings.Shared_Empty'Access,
Enclosing_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access,
Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access,
Is_Resolved => True,
Replacement_Text => Replacement_Text,
First_Position => 0);
end New_Internal_General_Entity;
-----------------------------------
-- New_Internal_Parameter_Entity --
-----------------------------------
procedure New_Internal_Parameter_Entity
(Self : in out Entity_Table;
Enclosing_Entity : Entity_Identifier;
Name : Matreshka.Internals.XML.Symbol_Identifier;
Replacement_Text :
not null Matreshka.Internals.Strings.Shared_String_Access;
Entity : out Entity_Identifier) is
begin
New_Entity (Self, Entity);
Self.Data (Entity) :=
(Kind => Internal_Parameter_Entity,
Enclosing => Enclosing_Entity,
Name => Name,
Notation => No_Symbol,
Public_Id => Matreshka.Internals.Strings.Shared_Empty'Access,
System_Id => Matreshka.Internals.Strings.Shared_Empty'Access,
Enclosing_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access,
Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access,
Is_Resolved => True,
Replacement_Text => Replacement_Text,
First_Position => 0);
end New_Internal_Parameter_Entity;
-----------------
-- Next_Entity --
-----------------
procedure Next_Entity
(Self : Entity_Table;
Entity : in out Entity_Identifier) is
begin
if Entity = Self.Last then
Entity := No_Entity;
else
Entity := Entity + 1;
end if;
end Next_Entity;
--------------
-- Notation --
--------------
function Notation
(Self : Entity_Table;
Entity : Entity_Identifier)
return Matreshka.Internals.XML.Symbol_Identifier is
begin
return Self.Data (Entity).Notation;
end Notation;
---------------
-- Public_Id --
---------------
function Public_Id
(Self : Entity_Table;
Entity : Entity_Identifier)
return not null Matreshka.Internals.Strings.Shared_String_Access is
begin
return Self.Data (Entity).Public_Id;
end Public_Id;
----------------------
-- Replacement_Text --
----------------------
function Replacement_Text
(Self : Entity_Table;
Entity : Entity_Identifier)
return Matreshka.Internals.Strings.Shared_String_Access is
begin
return Self.Data (Entity).Replacement_Text;
end Replacement_Text;
-----------
-- Reset --
-----------
procedure Reset (Self : in out Entity_Table) is
begin
Finalize (Self);
Initialize (Self);
end Reset;
-------------------------
-- Set_Entity_Base_URI --
-------------------------
procedure Set_Entity_Base_URI
(Self : in out Entity_Table;
Entity : Entity_Identifier;
Entity_Base_URI : League.Strings.Universal_String)
is
B : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Entity_Base_URI);
begin
Matreshka.Internals.Strings.Dereference
(Self.Data (Entity).Entity_Base_URI);
Self.Data (Entity).Entity_Base_URI := B;
Matreshka.Internals.Strings.Reference
(Self.Data (Entity).Entity_Base_URI);
end Set_Entity_Base_URI;
------------------------
-- Set_First_Position --
------------------------
procedure Set_First_Position
(Self : in out Entity_Table;
Entity : Entity_Identifier;
Position : Matreshka.Internals.Utf16.Utf16_String_Index) is
begin
Self.Data (Entity).First_Position := Position;
end Set_First_Position;
---------------------
-- Set_Is_Resolved --
---------------------
procedure Set_Is_Resolved
(Self : in out Entity_Table;
Entity : Entity_Identifier;
To : Boolean) is
begin
Self.Data (Entity).Is_Resolved := To;
end Set_Is_Resolved;
--------------------------
-- Set_Replacement_Text --
--------------------------
procedure Set_Replacement_Text
(Self : in out Entity_Table;
Entity : Entity_Identifier;
Replacement_Text :
not null Matreshka.Internals.Strings.Shared_String_Access) is
begin
Self.Data (Entity).Replacement_Text := Replacement_Text;
end Set_Replacement_Text;
---------------
-- System_Id --
---------------
function System_Id
(Self : Entity_Table;
Entity : Entity_Identifier)
return not null Matreshka.Internals.Strings.Shared_String_Access is
begin
return Self.Data (Entity).System_Id;
end System_Id;
end Matreshka.Internals.XML.Entity_Tables;
|
package Vulkan.Test is
end Vulkan.Test;
|
with impact.d2.orbs.Collision,
impact.d2.Math;
package impact.d2.orbs.dynamic_Tree
--
-- A dynamic AABB tree broad-phase, inspired by Nathanael Presson's btDbvt.
--
is
use impact.d2.Math;
b2_nullNode : constant := 0;
-- A node in the dynamic tree. The client does not interact with this directly.
--
type b2DynamicTreeNode_Kind is (with_Parent_index, with_Next_index);
type b2DynamicTreeNode (Kind : b2DynamicTreeNode_Kind := with_parent_index) is
record
aabb : collision.b2AABB; -- This is the fattened AABB.
userData : access Any'Class;
child1 : aliased int32;
child2 : int32;
case Kind is
when with_Parent_index => parent : int32;
when with_Next_index => next : int32;
end case;
end record;
pragma Unchecked_Union (b2DynamicTreeNode);
type b2DynamicTreeNodes is array (int32 range <>) of b2DynamicTreeNode;
function isLeaf (Self : in b2DynamicTreeNode) return Boolean;
-- A dynamic tree arranges data in a binary tree to accelerate
-- queries such as volume queries and ray casts. Leafs are proxies
-- with an AABB. In the tree we expand the proxy AABB by b2_fatAABBFactor
-- so that the proxy AABB is bigger than the client object. This allows the client
-- object to move by small amounts without triggering a tree update.
--
-- Nodes are pooled and relocatable, so we use node indices rather than pointers.
--
type b2DynamicTree is tagged private;
function to_b2DynamicTree return b2DynamicTree; -- Constructing the tree initializes the node pool.
procedure destruct (Self : in out b2DynamicTree); -- Destroy the tree, freeing the node pool.
-- Create a proxy. Provide a tight fitting AABB and a userData pointer.
--
function createProxy (Self : access b2DynamicTree; aabb : in collision.b2AABB;
userData : access Any'Class) return int32;
-- Destroy a proxy. This asserts if the id is invalid.
--
procedure destroyProxy (Self : in out b2DynamicTree; proxyId : int32);
-- Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB,
-- then the proxy is removed from the tree and re-inserted. Otherwise
-- the function returns immediately.
-- Return True if the proxy was re-inserted.
--
function MoveProxy (Self : access b2DynamicTree; proxyId : in int32;
aabb : in collision.b2AABB;
displacement : in b2Vec2) return Boolean;
-- Perform some iterations to re-balance the tree.
--
procedure Rebalance (Self : in out b2DynamicTree; iterations : in int32);
-- Get proxy user data.
-- Return the proxy user data or 0 if the id is invalid.
--
function getUserData (Self : in b2DynamicTree; proxyId : in int32) return access Any'Class;
-- Get the fat AABB for a proxy.
--
function GetFatAABB (Self : in b2DynamicTree; proxyId : int32) return collision.b2AABB;
-- Compute the height of the tree.
--
function ComputeHeight (Self : in b2DynamicTree) return int32;
-- Query an AABB for overlapping proxies. The callback class
-- is called for each proxy that overlaps the supplied AABB.
--
generic
type callback_t is private;
with function QueryCallback (the_Callback : access callback_t ;
nodeId : in int32 ) return Boolean;
procedure Query (Self : in b2DynamicTree; the_Callback : access callback_t;
aabb : in collision.b2AABB);
-- template <typename T>
-- void Query(T* callback, const b2AABB& aabb) const;
-- Ray-cast against the proxies in the tree. This relies on the callback
-- to perform a exact ray-cast in the case were the proxy contains a shape.
-- The callback also performs the any collision filtering. This has performance
-- roughly equal to k * log(n), where k is the number of collisions and n is the
-- number of proxies in the tree.
--
-- 'input' the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).
-- 'callback' a callback class that is called for each proxy that is hit by the ray.
--
generic
type callback_t is private;
with function RayCastCallback (the_Callback : access callback_t;
Input : in collision.b2RayCastInput;
nodeId : in int32 ) return float32;
procedure Raycast (Self : in b2DynamicTree; the_Callback : access callback_t;
input : in collision.b2RayCastInput);
-- template <typename T>
-- void RayCast(T* callback, const b2RayCastInput& input) const;
--
-- float32 value = callback->RayCastCallback(subInput, nodeId);
private
type b2DynamicTreeNodes_view is access all b2DynamicTreeNodes;
type b2DynamicTree is tagged
record
m_root : int32;
m_nodes : b2DynamicTreeNodes_view;
m_nodeCount : int32;
m_nodeCapacity : int32;
m_freeList : int32;
m_path : uint32; -- This is used incrementally traverse the tree for re-balancing.
m_insertionCount : int32;
end record;
function AllocateNode (Self : access b2DynamicTree) return int32;
procedure FreeNode (Self : in out b2DynamicTree; nodeId : in int32);
procedure InsertLeaf (Self : in out b2DynamicTree; leafId : in int32);
procedure RemoveLeaf (Self : in out b2DynamicTree; leafId : in int32);
function ComputeHeight (Self : in b2DynamicTree; nodeId : in int32) return int32;
end impact.d2.orbs.dynamic_Tree;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- G N A T . B U B B L E _ S O R T _ G --
-- --
-- S p e c --
-- --
-- Copyright (C) 1995-2005, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Bubblesort generic package using formal procedures
-- This package provides a generic bubble sort routine that can be used with
-- different types of data.
-- See also GNAT.Bubble_Sort, a version that works with subprogram access
-- parameters, allowing code sharing. The generic version is slightly more
-- efficient but does not allow code sharing and has an interface that is
-- more awkward to use. The generic version is also Pure, while the access
-- subprograqm version can only be Preelaborate.
-- There is also GNAT.Bubble_Sort_A, which is now considered obsolete, but
-- was an older version working with subprogram parameters. This version
-- is retained for baccwards compatibility with old versions of GNAT.
generic
-- The data to be sorted is assumed to be indexed by integer values from
-- 1 to N, where N is the number of items to be sorted. In addition, the
-- index value zero is used for a temporary location used during the sort.
with procedure Move (From : Natural; To : Natural);
-- A procedure that moves the data item with index value From to the data
-- item with index value To (the old value in To being lost). An index
-- value of zero is used for moves from and to a single temporary location
-- used by the sort.
with function Lt (Op1, Op2 : Natural) return Boolean;
-- A function that compares two items and returns True if the item with
-- index Op1 is less than the item with Index Op2, and False if the Op2
-- item is greater than or equal to the Op1 item.
package GNAT.Bubble_Sort_G is
pragma Pure;
procedure Sort (N : Natural);
-- This procedures sorts items in the range from 1 to N into ascending
-- order making calls to Lt to do required comparisons, and Move to move
-- items around. Note that, as described above, both Move and Lt use a
-- single temporary location with index value zero. This sort is stable,
-- that is the order of equal elements in the input is preserved.
end GNAT.Bubble_Sort_G;
|
with Ada.Text_IO; use Ada.Text_IO;
with Vecteurs_Creux; use Vecteurs_Creux;
-- Exemple d'utilisation des vecteurs creux.
procedure Exemple_Vecteurs_Creux is
V : T_Vecteur_Creux;
begin
Put_Line ("Début du scénario");
New_Line;
Initialiser (V); -- Initialiser un vecteur creux. Il est nul.
Afficher (V); -- Afficher le vecteur creux à des fins de mise au point.
Put_Line ("Est-ce que le vecteur V est nul : " & Boolean'Image(Est_Nul (V)));
Put ("Version récursive : la composante du vecteur V à l'indice Indice 18 : ");
Put_Line (Float'Image(Composante_Recursif (V, 18)));
Put ("Version itérative : la composante du vecteur V à l'indice Indice 18 : ");
Put_Line (Float'Image(Composante_Iteratif (V, 18)));
Modifier (V, 2, 5.9); -- Modifier la composante (2, 5.9).
Put_Line ("Modifier la composante (2, 5.9)");
Afficher (V); -- Afficher le vecteur creux à des fins de mise au point.
Modifier (V, 3, 1.3); -- Modifier la composante (2, 1.93).
Put_Line ("Modifier la composante (3, 1.3)");
Afficher (V); -- Afficher le vecteur creux à des fins de mise au point.
Modifier (V, 1, 99.15); -- Modifier la composante (1, 99.15).
Put_Line ("Modifier la composante (1, 99.15)");
Afficher (V); -- Afficher le vecteur creux à des fins de mise au point.
Modifier (V, 1, 10.0); -- Modifier la composante (1, 99.15).
Put_Line ("Modifier la composante (1, 99.15)");
Afficher (V); -- Afficher le vecteur creux à des fins de mise au point.
Detruire (V); -- Détruire le vecteur V.
New_Line;
Put_Line ("Fin du scénario");
end Exemple_Vecteurs_Creux;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 1 3 --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Handling of packed arrays with Component_Size = 13
package System.Pack_13 is
pragma Preelaborate;
Bits : constant := 13;
type Bits_13 is mod 2 ** Bits;
for Bits_13'Size use Bits;
function Get_13 (Arr : System.Address; N : Natural) return Bits_13;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is extracted and returned.
procedure Set_13 (Arr : System.Address; N : Natural; E : Bits_13);
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is set to the given value.
end System.Pack_13;
|
-- C95011A.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 A TASK NEED NOT CONTAIN ANY ACCEPT_STATEMENTS FOR AN
-- ENTRY.
-- THIS TEST CONTAINS SHARED VARIABLES.
-- JRK 11/5/81
-- JWC 6/28/85 RENAMED TO -AB
WITH REPORT; USE REPORT;
PROCEDURE C95011A IS
V : INTEGER := 0;
BEGIN
TEST ("C95011A", "CHECK THAT A TASK NEED NOT CONTAIN ANY " &
"ACCEPT_STATEMENTS FOR AN ENTRY");
DECLARE
SUBTYPE INT IS INTEGER RANGE 1..5;
TASK T IS
ENTRY E;
ENTRY EF (INT) (I : INTEGER);
END T;
TASK BODY T IS
BEGIN
V := 1;
END T;
BEGIN
NULL;
END;
IF V /= 1 THEN
FAILED ("WRONG CONTROL FLOW VALUE");
END IF;
RESULT;
END C95011A;
|
pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with glib;
with glib.Values;
with System;
with glib;
with System;
-- with GStreamer.GST_Low_Level.glib_2_0_gobject_gparam_h;
with Interfaces.C.Strings;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstminiobject_h is
-- unsupported macro: GST_TYPE_MINI_OBJECT (gst_mini_object_get_type())
-- arg-macro: function GST_IS_MINI_OBJECT (obj)
-- return G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MINI_OBJECT);
-- arg-macro: function GST_IS_MINI_OBJECT_CLASS (klass)
-- return G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MINI_OBJECT);
-- arg-macro: function GST_MINI_OBJECT_GET_CLASS (obj)
-- return G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_MINI_OBJECT, GstMiniObjectClass);
-- arg-macro: function GST_MINI_OBJECT (obj)
-- return G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MINI_OBJECT, GstMiniObject);
-- arg-macro: function GST_MINI_OBJECT_CLASS (klass)
-- return G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MINI_OBJECT, GstMiniObjectClass);
-- arg-macro: function GST_MINI_OBJECT_CAST (obj)
-- return (GstMiniObject*)(obj);
-- arg-macro: function GST_MINI_OBJECT_CONST_CAST (obj)
-- return (const GstMiniObject*)(obj);
-- arg-macro: function GST_MINI_OBJECT_FLAGS (obj)
-- return GST_MINI_OBJECT_CAST(obj).flags;
-- arg-macro: procedure GST_MINI_OBJECT_FLAG_IS_SET (obj, flag)
-- notnot(GST_MINI_OBJECT_FLAGS (obj) and (flag))
-- arg-macro: function GST_MINI_OBJECT_FLAG_SET (obj, flag)
-- return GST_MINI_OBJECT_FLAGS (obj) |= (flag);
-- arg-macro: function GST_MINI_OBJECT_FLAG_UNSET (obj, flag)
-- return GST_MINI_OBJECT_FLAGS (obj) &= ~(flag);
-- arg-macro: function GST_VALUE_HOLDS_MINI_OBJECT (value)
-- return G_VALUE_HOLDS(value, GST_TYPE_MINI_OBJECT);
-- arg-macro: function GST_MINI_OBJECT_REFCOUNT (obj)
-- return (GST_MINI_OBJECT_CAST(obj)).refcount;
-- arg-macro: function GST_MINI_OBJECT_REFCOUNT_VALUE (obj)
-- return g_atomic_int_get (and(GST_MINI_OBJECT_CAST(obj)).refcount);
-- unsupported macro: GST_TYPE_PARAM_MINI_OBJECT (gst_param_spec_mini_object_get_type())
-- arg-macro: function GST_IS_PARAM_SPEC_MINI_OBJECT (pspec)
-- return G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GST_TYPE_PARAM_MINI_OBJECT);
-- arg-macro: function GST_PARAM_SPEC_MINI_OBJECT (pspec)
-- return G_TYPE_CHECK_INSTANCE_CAST ((pspec), GST_TYPE_PARAM_MINI_OBJECT, GstParamSpecMiniObject);
-- GStreamer
-- * Copyright (C) 2005 David Schleef <ds@schleef.org>
-- *
-- * gstminiobject.h: Header for GstMiniObject
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library 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.
--
type GstMiniObject;
--subtype GstMiniObject is u_GstMiniObject; -- gst/gstminiobject.h:41
type GstMiniObjectClass;
--subtype GstMiniObjectClass is u_GstMiniObjectClass; -- gst/gstminiobject.h:42
--*
-- * GstMiniObjectCopyFunction:
-- * @obj: MiniObject to copy
-- *
-- * Virtual function prototype for methods to create copies of instances.
-- *
-- * Returns: reference to cloned instance.
--
type GstMiniObjectCopyFunction is access function (arg1 : access constant GstMiniObject) return access GstMiniObject;
pragma Convention (C, GstMiniObjectCopyFunction); -- gst/gstminiobject.h:52
--*
-- * GstMiniObjectFinalizeFunction:
-- * @obj: MiniObject to finalize
-- *
-- * Virtual function prototype for methods to free ressources used by
-- * mini-objects. Subclasses of the mini object are allowed to revive the
-- * passed object by doing a gst_mini_object_ref(). If the object is not
-- * revived after the finalize function, the memory associated with the
-- * object is freed.
--
type GstMiniObjectFinalizeFunction is access procedure (arg1 : access GstMiniObject);
pragma Convention (C, GstMiniObjectFinalizeFunction); -- gst/gstminiobject.h:63
--*
-- * GST_MINI_OBJECT_FLAGS:
-- * @obj: MiniObject to return flags for.
-- *
-- * This macro returns the entire set of flags for the mini-object.
--
--*
-- * GST_MINI_OBJECT_FLAG_IS_SET:
-- * @obj: MiniObject to check for flags.
-- * @flag: Flag to check for
-- *
-- * This macro checks to see if the given flag is set.
--
--*
-- * GST_MINI_OBJECT_FLAG_SET:
-- * @obj: MiniObject to set flag in.
-- * @flag: Flag to set, can by any number of bits in guint32.
-- *
-- * This macro sets the given bits.
--
--*
-- * GST_MINI_OBJECT_FLAG_UNSET:
-- * @obj: MiniObject to unset flag in.
-- * @flag: Flag to set, must be a single bit in guint32.
-- *
-- * This macro usets the given bits.
--
--*
-- * GST_VALUE_HOLDS_MINI_OBJECT:
-- * @value: the #GValue to check
-- *
-- * Checks if the given #GValue contains a #GST_TYPE_MINI_OBJECT value.
--
--*
-- * GstMiniObjectFlags:
-- * @GST_MINI_OBJECT_FLAG_READONLY: is the miniobject readonly or writable
-- * @GST_MINI_OBJECT_FLAG_RESERVED1: a flag reserved for internal use e.g. as
-- * GST_BUFFER_FLAG_MEDIA4. Since: 0.10.33.
-- * @GST_MINI_OBJECT_FLAG_LAST: first flag that can be used by subclasses.
-- *
-- * Flags for the mini object
--
-- padding
subtype GstMiniObjectFlags is unsigned;
GST_MINI_OBJECT_FLAG_READONLY : constant GstMiniObjectFlags := 1;
GST_MINI_OBJECT_FLAG_RESERVED1 : constant GstMiniObjectFlags := 2;
GST_MINI_OBJECT_FLAG_LAST : constant GstMiniObjectFlags := 16; -- gst/gstminiobject.h:121
--*
-- * GST_MINI_OBJECT_REFCOUNT:
-- * @obj: a #GstMiniObject
-- *
-- * Get access to the reference count field of the mini-object.
--
--*
-- * GST_MINI_OBJECT_REFCOUNT_VALUE:
-- * @obj: a #GstMiniObject
-- *
-- * Get the reference count value of the mini-object.
--
--*
-- * GstMiniObjectWeakNotify:
-- * @data: data that was provided when the weak reference was established
-- * @where_the_mini_object_was: the mini object being finalized
-- *
-- * A #GstMiniObjectWeakNotify function can be added to a mini object as a
-- * callback that gets triggered when the mini object is finalized. Since the
-- * mini object is already being finalized when the #GstMiniObjectWeakNotify is
-- * called, there's not much you could do with the object, apart from e.g. using
-- * its adress as hash-index or the like.
-- *
-- * Since: 0.10.35
-- *
--
type GstMiniObjectWeakNotify is access procedure (arg1 : System.Address; arg2 : access GstMiniObject);
pragma Convention (C, GstMiniObjectWeakNotify); -- gst/gstminiobject.h:152
-- skipped empty struct u_GstMiniObjectPrivate
-- skipped empty struct GstMiniObjectPrivate
--*
-- * GstMiniObject:
-- * @instance: type instance
-- * @refcount: atomic refcount
-- * @flags: extra flags.
-- *
-- * Base class for refcounted lightweight objects.
-- * Ref Func: gst_mini_object_ref
-- * Unref Func: gst_mini_object_unref
-- * Set Value Func: gst_value_set_mini_object
-- * Get Value Func: gst_value_get_mini_object
--
type GstMiniObject is record
instance : aliased GStreamer.GST_Low_Level.glib_2_0_gobject_gtype_h.GTypeInstance; -- gst/gstminiobject.h:170
refcount : aliased GLIB.gint; -- gst/gstminiobject.h:172
flags : aliased GLIB.guint; -- gst/gstminiobject.h:173
priv : System.Address; -- gst/gstminiobject.h:176
end record;
pragma Convention (C_Pass_By_Copy, GstMiniObject); -- gst/gstminiobject.h:169
--< public >
-- with COW
--< private >
type GstMiniObjectClass is record
type_class : aliased GStreamer.GST_Low_Level.glib_2_0_gobject_gtype_h.GTypeClass; -- gst/gstminiobject.h:180
copy : GstMiniObjectCopyFunction; -- gst/gstminiobject.h:182
finalize : GstMiniObjectFinalizeFunction; -- gst/gstminiobject.h:183
u_gst_reserved : System.Address; -- gst/gstminiobject.h:186
end record;
pragma Convention (C_Pass_By_Copy, GstMiniObjectClass); -- gst/gstminiobject.h:179
--< private >
function gst_mini_object_get_type return GLIB.GType; -- gst/gstminiobject.h:189
pragma Import (C, gst_mini_object_get_type, "gst_mini_object_get_type");
function gst_mini_object_new (c_type : GLIB.GType) return access GstMiniObject; -- gst/gstminiobject.h:191
pragma Import (C, gst_mini_object_new, "gst_mini_object_new");
function gst_mini_object_copy (mini_object : access constant GstMiniObject) return access GstMiniObject; -- gst/gstminiobject.h:192
pragma Import (C, gst_mini_object_copy, "gst_mini_object_copy");
function gst_mini_object_is_writable (mini_object : access constant GstMiniObject) return GLIB.gboolean; -- gst/gstminiobject.h:193
pragma Import (C, gst_mini_object_is_writable, "gst_mini_object_is_writable");
function gst_mini_object_make_writable (mini_object : access GstMiniObject) return access GstMiniObject; -- gst/gstminiobject.h:194
pragma Import (C, gst_mini_object_make_writable, "gst_mini_object_make_writable");
-- refcounting
function gst_mini_object_ref (mini_object : access GstMiniObject) return access GstMiniObject; -- gst/gstminiobject.h:197
pragma Import (C, gst_mini_object_ref, "gst_mini_object_ref");
procedure gst_mini_object_unref (mini_object : access GstMiniObject); -- gst/gstminiobject.h:198
pragma Import (C, gst_mini_object_unref, "gst_mini_object_unref");
procedure gst_mini_object_weak_ref
(object : access GstMiniObject;
notify : GstMiniObjectWeakNotify;
data : System.Address); -- gst/gstminiobject.h:199
pragma Import (C, gst_mini_object_weak_ref, "gst_mini_object_weak_ref");
procedure gst_mini_object_weak_unref
(object : access GstMiniObject;
notify : GstMiniObjectWeakNotify;
data : System.Address); -- gst/gstminiobject.h:202
pragma Import (C, gst_mini_object_weak_unref, "gst_mini_object_weak_unref");
procedure gst_mini_object_replace (olddata : System.Address; newdata : access GstMiniObject); -- gst/gstminiobject.h:205
pragma Import (C, gst_mini_object_replace, "gst_mini_object_replace");
-- GParamSpec
type GstParamSpecMiniObject;
--subtype GstParamSpecMiniObject is u_GstParamSpecMiniObject; -- gst/gstminiobject.h:216
--*
-- * GstParamSpecMiniObject:
-- * @parent_instance: private %GParamSpec portion
-- *
-- * A %GParamSpec derived structure that contains the meta data
-- * for %GstMiniObject properties.
--
type GstParamSpecMiniObject is record
parent_instance : aliased GStreamer.GST_Low_Level.glib_2_0_gobject_gparam_h.GParamSpec; -- gst/gstminiobject.h:227
end record;
pragma Convention (C_Pass_By_Copy, GstParamSpecMiniObject); -- gst/gstminiobject.h:225
function gst_param_spec_mini_object_get_type return GLIB.GType; -- gst/gstminiobject.h:231
pragma Import (C, gst_param_spec_mini_object_get_type, "gst_param_spec_mini_object_get_type");
function gst_param_spec_mini_object
(name : Interfaces.C.Strings.chars_ptr;
nick : Interfaces.C.Strings.chars_ptr;
blurb : Interfaces.C.Strings.chars_ptr;
object_type : GLIB.GType;
flags : GStreamer.GST_Low_Level.glib_2_0_gobject_gparam_h.GParamFlags) return access GStreamer.GST_Low_Level.glib_2_0_gobject_gparam_h.GParamSpec; -- gst/gstminiobject.h:233
pragma Import (C, gst_param_spec_mini_object, "gst_param_spec_mini_object");
-- GValue stuff
procedure gst_value_set_mini_object (value : access Glib.Values.GValue; mini_object : access GstMiniObject); -- gst/gstminiobject.h:239
pragma Import (C, gst_value_set_mini_object, "gst_value_set_mini_object");
procedure gst_value_take_mini_object (value : access Glib.Values.GValue; mini_object : access GstMiniObject); -- gst/gstminiobject.h:240
pragma Import (C, gst_value_take_mini_object, "gst_value_take_mini_object");
function gst_value_get_mini_object (value : access constant Glib.Values.GValue) return access GstMiniObject; -- gst/gstminiobject.h:241
pragma Import (C, gst_value_get_mini_object, "gst_value_get_mini_object");
function gst_value_dup_mini_object (value : access constant Glib.Values.GValue) return access GstMiniObject; -- gst/gstminiobject.h:242
pragma Import (C, gst_value_dup_mini_object, "gst_value_dup_mini_object");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstminiobject_h;
|
------------------------------------------------------------------------------
-- --
-- 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.Null_Literal_Exps.Collections is
pragma Preelaborate;
package OCL_Null_Literal_Exp_Collections is
new AMF.Generic_Collections
(OCL_Null_Literal_Exp,
OCL_Null_Literal_Exp_Access);
type Set_Of_OCL_Null_Literal_Exp is
new OCL_Null_Literal_Exp_Collections.Set with null record;
Empty_Set_Of_OCL_Null_Literal_Exp : constant Set_Of_OCL_Null_Literal_Exp;
type Ordered_Set_Of_OCL_Null_Literal_Exp is
new OCL_Null_Literal_Exp_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_OCL_Null_Literal_Exp : constant Ordered_Set_Of_OCL_Null_Literal_Exp;
type Bag_Of_OCL_Null_Literal_Exp is
new OCL_Null_Literal_Exp_Collections.Bag with null record;
Empty_Bag_Of_OCL_Null_Literal_Exp : constant Bag_Of_OCL_Null_Literal_Exp;
type Sequence_Of_OCL_Null_Literal_Exp is
new OCL_Null_Literal_Exp_Collections.Sequence with null record;
Empty_Sequence_Of_OCL_Null_Literal_Exp : constant Sequence_Of_OCL_Null_Literal_Exp;
private
Empty_Set_Of_OCL_Null_Literal_Exp : constant Set_Of_OCL_Null_Literal_Exp
:= (OCL_Null_Literal_Exp_Collections.Set with null record);
Empty_Ordered_Set_Of_OCL_Null_Literal_Exp : constant Ordered_Set_Of_OCL_Null_Literal_Exp
:= (OCL_Null_Literal_Exp_Collections.Ordered_Set with null record);
Empty_Bag_Of_OCL_Null_Literal_Exp : constant Bag_Of_OCL_Null_Literal_Exp
:= (OCL_Null_Literal_Exp_Collections.Bag with null record);
Empty_Sequence_Of_OCL_Null_Literal_Exp : constant Sequence_Of_OCL_Null_Literal_Exp
:= (OCL_Null_Literal_Exp_Collections.Sequence with null record);
end AMF.OCL.Null_Literal_Exps.Collections;
|
-- { dg-do run }
with Init12; use Init12;
with Text_IO; use Text_IO;
with Dump;
procedure P12 is
Local_A1 : Arr1;
Local_A11 : Arr11;
Local_A2 : Arr2;
Local_A22 : Arr22;
begin
Put ("My_A1 :");
Dump (My_A1'Address, Arr1'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "My_A1 : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
Put ("My_A11 :");
Dump (My_A11'Address, Arr11'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "My_A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" }
Put ("My_A2 :");
Dump (My_A2'Address, Arr2'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "My_A2 : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
Put ("My_A22 :");
Dump (My_A22'Address, Arr22'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "My_A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" }
Local_A1 := My_A1;
Put ("Local_A1 :");
Dump (Local_A1'Address, Arr1'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A1 : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
Local_A11 := My_A11;
Put ("Local_A11 :");
Dump (Local_A11'Address, Arr11'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" }
Local_A2 := My_A2;
Put ("Local_A2 :");
Dump (Local_A2'Address, Arr2'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A2 : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
Local_A22 := My_A22;
Put ("Local_A22 :");
Dump (Local_A22'Address, Arr22'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" }
Local_A1 := (16#AB0012#, 16#CD0034#, 16#EF0056#);
Put ("Local_A1 :");
Dump (Local_A1'Address, Arr1'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A1 : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
Local_A11 := (1 => (16#AB0012#, 16#CD0034#),
2 => (16#AB0012#, 16#CD0034#));
Put ("Local_A11 :");
Dump (Local_A11'Address, Arr11'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" }
Local_A2 := (16#AB0012#, 16#CD0034#, 16#EF0056#);
Put ("Local_A2 :");
Dump (Local_A2'Address, Arr2'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A2 : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
Local_A22 := (1 => (16#AB0012#, 16#CD0034#),
2 => (16#AB0012#, 16#CD0034#));
Put ("Local_A22 :");
Dump (Local_A22'Address, Arr22'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" }
Local_A1(1) := Local_A2(1);
Local_A1(2) := Local_A2(2);
Local_A1(3) := Local_A2(3);
Put ("Local_A1 :");
Dump (Local_A1'Address, Arr1'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A1 : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
Local_A11(1,1) := Local_A22(1,1);
Local_A11(1,2) := Local_A22(1,2);
Local_A11(2,1) := Local_A22(2,1);
Local_A11(2,2) := Local_A22(2,2);
Put ("Local_A11 :");
Dump (Local_A11'Address, Arr11'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" }
Local_A2(1) := Local_A1(1);
Local_A2(2) := Local_A1(2);
Local_A2(3) := Local_A1(3);
Put ("Local_A2 :");
Dump (Local_A2'Address, Arr2'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A2 : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
Local_A22(1,1) := Local_A11(1,1);
Local_A22(1,2) := Local_A11(1,2);
Local_A22(2,1) := Local_A11(2,1);
Local_A22(2,2) := Local_A11(2,2);
Put ("Local_A22 :");
Dump (Local_A22'Address, Arr22'Max_Size_In_Storage_Elements);
New_Line;
-- { dg-output "Local_A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" }
end;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 4 9 --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2021, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
with System.Unsigned_Types;
package body System.Pack_49 is
subtype Bit_Order is System.Bit_Order;
Reverse_Bit_Order : constant Bit_Order :=
Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order));
subtype Ofs is System.Storage_Elements.Storage_Offset;
subtype Uns is System.Unsigned_Types.Unsigned;
subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7;
use type System.Storage_Elements.Storage_Offset;
use type System.Unsigned_Types.Unsigned;
type Cluster is record
E0, E1, E2, E3, E4, E5, E6, E7 : Bits_49;
end record;
for Cluster use record
E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1;
E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1;
E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1;
E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1;
E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1;
E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1;
E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1;
E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1;
end record;
for Cluster'Size use Bits * 8;
for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment,
1 +
1 * Boolean'Pos (Bits mod 2 = 0) +
2 * Boolean'Pos (Bits mod 4 = 0));
-- Use maximum possible alignment, given the bit field size, since this
-- will result in the most efficient code possible for the field.
type Cluster_Ref is access Cluster;
type Rev_Cluster is new Cluster
with Bit_Order => Reverse_Bit_Order,
Scalar_Storage_Order => Reverse_Bit_Order;
type Rev_Cluster_Ref is access Rev_Cluster;
------------
-- Get_49 --
------------
function Get_49
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_49
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => return RC.E0;
when 1 => return RC.E1;
when 2 => return RC.E2;
when 3 => return RC.E3;
when 4 => return RC.E4;
when 5 => return RC.E5;
when 6 => return RC.E6;
when 7 => return RC.E7;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => return C.E0;
when 1 => return C.E1;
when 2 => return C.E2;
when 3 => return C.E3;
when 4 => return C.E4;
when 5 => return C.E5;
when 6 => return C.E6;
when 7 => return C.E7;
end case;
end if;
end Get_49;
------------
-- Set_49 --
------------
procedure Set_49
(Arr : System.Address;
N : Natural;
E : Bits_49;
Rev_SSO : Boolean)
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => RC.E0 := E;
when 1 => RC.E1 := E;
when 2 => RC.E2 := E;
when 3 => RC.E3 := E;
when 4 => RC.E4 := E;
when 5 => RC.E5 := E;
when 6 => RC.E6 := E;
when 7 => RC.E7 := E;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => C.E0 := E;
when 1 => C.E1 := E;
when 2 => C.E2 := E;
when 3 => C.E3 := E;
when 4 => C.E4 := E;
when 5 => C.E5 := E;
when 6 => C.E6 := E;
when 7 => C.E7 := E;
end case;
end if;
end Set_49;
end System.Pack_49;
|
-- { dg-do compile }
-- { dg-final { scan-assembler-not "elabs" } }
package body OCONST1 is
procedure check (arg : R) is
begin
if arg.u /= 1
or else arg.b.i1 /= 2
or else arg.b.i2 /= 3
or else arg.b.i3 /= 4
then
raise Program_Error;
end if;
end;
end;
|
-- 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.
with AUnit.Test_Fixtures;
package DG_Types.Test_Data is
-- begin read only
type Test is new AUnit.Test_Fixtures.Test_Fixture
-- end read only
with null record;
procedure Set_Up (Gnattest_T : in out Test);
procedure Tear_Down (Gnattest_T : in out Test);
end DG_Types.Test_Data;
|
pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with glib;
with glib;
with glib.Values;
with System;
limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h;
-- limited with GStreamer.GST_Low_Level.glib_2_0_glib_glist_h;
limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h;
with GLIB; -- with GStreamer.GST_Low_Level.glibconfig_h;
with System;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_tag_tag_h is
GST_TAG_MUSICBRAINZ_TRACKID : aliased constant String := "musicbrainz-trackid" & ASCII.NUL; -- gst/tag/tag.h:36
GST_TAG_MUSICBRAINZ_ARTISTID : aliased constant String := "musicbrainz-artistid" & ASCII.NUL; -- gst/tag/tag.h:42
GST_TAG_MUSICBRAINZ_ALBUMID : aliased constant String := "musicbrainz-albumid" & ASCII.NUL; -- gst/tag/tag.h:48
GST_TAG_MUSICBRAINZ_ALBUMARTISTID : aliased constant String := "musicbrainz-albumartistid" & ASCII.NUL; -- gst/tag/tag.h:54
GST_TAG_MUSICBRAINZ_TRMID : aliased constant String := "musicbrainz-trmid" & ASCII.NUL; -- gst/tag/tag.h:60
-- unsupported macro: GST_TAG_MUSICBRAINZ_SORTNAME GST_TAG_ARTIST_SORTNAME
GST_TAG_CMML_STREAM : aliased constant String := "cmml-stream" & ASCII.NUL; -- gst/tag/tag.h:79
GST_TAG_CMML_HEAD : aliased constant String := "cmml-head" & ASCII.NUL; -- gst/tag/tag.h:86
GST_TAG_CMML_CLIP : aliased constant String := "cmml-clip" & ASCII.NUL; -- gst/tag/tag.h:92
GST_TAG_CDDA_CDDB_DISCID : aliased constant String := "discid" & ASCII.NUL; -- gst/tag/tag.h:101
GST_TAG_CDDA_CDDB_DISCID_FULL : aliased constant String := "discid-full" & ASCII.NUL; -- gst/tag/tag.h:108
GST_TAG_CDDA_MUSICBRAINZ_DISCID : aliased constant String := "musicbrainz-discid" & ASCII.NUL; -- gst/tag/tag.h:115
GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL : aliased constant String := "musicbrainz-discid-full" & ASCII.NUL; -- gst/tag/tag.h:122
GST_TAG_CAPTURING_SHUTTER_SPEED : aliased constant String := "capturing-shutter-speed" & ASCII.NUL; -- gst/tag/tag.h:131
GST_TAG_CAPTURING_FOCAL_RATIO : aliased constant String := "capturing-focal-ratio" & ASCII.NUL; -- gst/tag/tag.h:143
GST_TAG_CAPTURING_FOCAL_LENGTH : aliased constant String := "capturing-focal-length" & ASCII.NUL; -- gst/tag/tag.h:152
GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO : aliased constant String := "capturing-digital-zoom-ratio" & ASCII.NUL; -- gst/tag/tag.h:161
GST_TAG_CAPTURING_ISO_SPEED : aliased constant String := "capturing-iso-speed" & ASCII.NUL; -- gst/tag/tag.h:170
GST_TAG_CAPTURING_EXPOSURE_PROGRAM : aliased constant String := "capturing-exposure-program" & ASCII.NUL; -- gst/tag/tag.h:190
GST_TAG_CAPTURING_EXPOSURE_MODE : aliased constant String := "capturing-exposure-mode" & ASCII.NUL; -- gst/tag/tag.h:204
GST_TAG_CAPTURING_EXPOSURE_COMPENSATION : aliased constant String := "capturing-exposure-compensation" & ASCII.NUL; -- gst/tag/tag.h:213
GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE : aliased constant String := "capturing-scene-capture-type" & ASCII.NUL; -- gst/tag/tag.h:228
GST_TAG_CAPTURING_GAIN_ADJUSTMENT : aliased constant String := "capturing-gain-adjustment" & ASCII.NUL; -- gst/tag/tag.h:244
GST_TAG_CAPTURING_WHITE_BALANCE : aliased constant String := "capturing-white-balance" & ASCII.NUL; -- gst/tag/tag.h:263
GST_TAG_CAPTURING_CONTRAST : aliased constant String := "capturing-contrast" & ASCII.NUL; -- gst/tag/tag.h:277
GST_TAG_CAPTURING_SATURATION : aliased constant String := "capturing-saturation" & ASCII.NUL; -- gst/tag/tag.h:291
GST_TAG_CAPTURING_SHARPNESS : aliased constant String := "capturing-sharpness" & ASCII.NUL; -- gst/tag/tag.h:305
GST_TAG_CAPTURING_FLASH_FIRED : aliased constant String := "capturing-flash-fired" & ASCII.NUL; -- gst/tag/tag.h:317
GST_TAG_CAPTURING_FLASH_MODE : aliased constant String := "capturing-flash-mode" & ASCII.NUL; -- gst/tag/tag.h:331
GST_TAG_CAPTURING_METERING_MODE : aliased constant String := "capturing-metering-mode" & ASCII.NUL; -- gst/tag/tag.h:350
GST_TAG_CAPTURING_SOURCE : aliased constant String := "capturing-source" & ASCII.NUL; -- gst/tag/tag.h:366
GST_TAG_IMAGE_HORIZONTAL_PPI : aliased constant String := "image-horizontal-ppi" & ASCII.NUL; -- gst/tag/tag.h:375
GST_TAG_IMAGE_VERTICAL_PPI : aliased constant String := "image-vertical-ppi" & ASCII.NUL; -- gst/tag/tag.h:383
-- unsupported macro: GST_TYPE_TAG_IMAGE_TYPE (gst_tag_image_type_get_type ())
GST_TAG_ID3V2_HEADER_SIZE : constant := 10; -- gst/tag/tag.h:453
-- arg-macro: procedure gst_tag_get_language_code (lang_code)
-- gst_tag_get_language_code_iso_639_1(lang_code)
-- GStreamer
-- * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
-- * Copyright (C) 2006-2011 Tim-Philipp Müller <tim centricular net>
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library 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.
--
-- Tag names
--*
-- * GST_TAG_MUSICBRAINZ_TRACKID
-- *
-- * MusicBrainz track ID
--
--*
-- * GST_TAG_MUSICBRAINZ_ARTISTID
-- *
-- * MusicBrainz artist ID
--
--*
-- * GST_TAG_MUSICBRAINZ_ALBUMID
-- *
-- * MusicBrainz album ID
--
--*
-- * GST_TAG_MUSICBRAINZ_ALBUMARTISTID
-- *
-- * MusicBrainz album artist ID
--
--*
-- * GST_TAG_MUSICBRAINZ_TRMID
-- *
-- * MusicBrainz track TRM ID
--
-- FIXME 0.11: remove GST_TAG_MUSICBRAINZ_SORTNAME
--*
-- * GST_TAG_MUSICBRAINZ_SORTNAME
-- *
-- * MusicBrainz artist sort name
-- *
-- * Deprecated. Use GST_TAG_ARTIST_SORTNAME instead.
--
--*
-- * GST_TAG_CMML_STREAM
-- *
-- * Annodex CMML stream element tag
--
--*
-- * GST_TAG_CMML_HEAD
-- *
-- * Annodex CMML head element tag
--
--*
-- * GST_TAG_CMML_CLIP
-- *
-- * Annodex CMML clip element tag
--
-- CDDA tags
--*
-- * GST_TAG_CDDA_CDDB_DISCID:
-- *
-- * CDDB disc id in its short form (e.g. 'aa063d0f')
--
--*
-- * GST_TAG_CDDA_CDDB_DISCID_FULL:
-- *
-- * CDDB disc id including all details
--
--*
-- * GST_TAG_CDDA_MUSICBRAINZ_DISCID:
-- *
-- * Musicbrainz disc id (e.g. 'ahg7JUcfR3vCYBphSDIogOOWrr0-')
--
--*
-- * GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL:
-- *
-- * Musicbrainz disc id details
--
--*
-- * GST_TAG_CAPTURING_SHUTTER_SPEED:
-- *
-- * Shutter speed used when capturing an image, in seconds. (fraction)
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_FOCAL_RATIO:
-- *
-- * Focal ratio (f-number) used when capturing an image. (double)
-- *
-- * The value stored is the denominator of the focal ratio (f-number).
-- * For example, if this tag value is 2, the focal ratio is f/2.
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_FOCAL_LENGTH:
-- *
-- * Focal length used when capturing an image, in mm. (double)
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO:
-- *
-- * Digital zoom ratio used when capturing an image. (double)
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_ISO_SPEED:
-- *
-- * ISO speed used when capturing an image. (integer)
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_EXPOSURE_PROGRAM:
-- *
-- * Type of exposure control used when capturing an image. (string)
-- *
-- * The allowed values are:
-- * "undefined"
-- * "manual"
-- * "normal" - automatically controlled
-- * "aperture-priority" - user selects aperture value
-- * "shutter-priority" - user selects shutter speed
-- * "creative" - biased towards depth of field
-- * "action" - biased towards fast shutter speed
-- * "portrait" - closeup, leaving background out of focus
-- * "landscape" - landscape photos, background in focus
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_EXPOSURE_MODE:
-- *
-- * Exposure mode used when capturing an image. (string)
-- *
-- * The allowed values are:
-- * "auto-exposure"
-- * "manual-exposure"
-- * "auto-bracket"
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_EXPOSURE_COMPENSATION:
-- *
-- * Exposure compensation using when capturing an image in EV. (double)
-- *
-- * Since: 0.10.33
--
--*
-- * GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE:
-- *
-- * Scene mode used when capturing an image. (string)
-- *
-- * The allowed values are:
-- * "standard"
-- * "landscape"
-- * "portrait"
-- * "night-scene"
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_GAIN_ADJUSTMENT:
-- *
-- * Gain adjustment applied to an image. (string)
-- *
-- * The allowed values are:
-- * "none"
-- * "low-gain-up"
-- * "high-gain-up"
-- * "low-gain-down"
-- * "high-gain-down"
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_WHITE_BALANCE:
-- *
-- * White balance mode used when capturing an image. (string)
-- *
-- * The allowed values are:
-- * "auto"
-- * "manual"
-- * "daylight"
-- * "cloudy"
-- * "tungsten"
-- * "fluorescent"
-- * "fluorescent h" (newer daylight-calibrated fluorescents)
-- * "flash"
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_CONTRAST:
-- *
-- * Direction of contrast processing applied when capturing an image. (string)
-- *
-- * The allowed values are:
-- * "normal"
-- * "soft"
-- * "hard"
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_SATURATION:
-- *
-- * Direction of saturation processing applied when capturing an image. (string)
-- *
-- * The allowed values are:
-- * "normal"
-- * "low-saturation"
-- * "high-saturation"
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_SHARPNESS:
-- *
-- * Direction of sharpness processing applied when capturing an image. (string)
-- *
-- * The allowed values are:
-- * "normal"
-- * "soft"
-- * "hard"
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_FLASH_FIRED:
-- *
-- * If flash was fired during the capture of an image. (boolean)
-- *
-- * Note that if this tag isn't present, it should not be assumed that
-- * the flash did not fire. It should be treated as unknown.
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_FLASH_MODE:
-- *
-- * The flash mode selected during the capture of an image. (string)
-- *
-- * The allowed values are:
-- * "auto"
-- * "always"
-- * "never"
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_METERING_MODE:
-- *
-- * Defines the way a camera determines the exposure. (string)
-- *
-- * The allowed values are:
-- * "unknown"
-- * "average"
-- * "center-weighted-average"
-- * "spot"
-- * "multi-spot"
-- * "pattern"
-- * "partial"
-- * "other"
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_CAPTURING_SOURCE:
-- *
-- * Indicates the source of capture. The device/medium used to do the
-- * capture. (string)
-- *
-- * Allowed values are:
-- * "dsc" (= digital still camera)
-- * "transparent-scanner"
-- * "reflex-scanner"
-- * "other"
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_IMAGE_HORIZONTAL_PPI:
-- *
-- * Media (image/video) intended horizontal pixel density in ppi. (double)
-- *
-- * Since: 0.10.31
--
--*
-- * GST_TAG_IMAGE_VERTICAL_PPI:
-- *
-- * Media (image/video) intended vertical pixel density in ppi. (double)
-- *
-- * Since: 0.10.31
--
-- additional information for image tags
--*
-- * GstTagImageType:
-- * @GST_TAG_IMAGE_TYPE_NONE : No image type. Can be used to
-- * tell functions such as gst_tag_image_data_to_image_buffer() that no
-- * image type should be set. (Since: 0.10.20)
-- * @GST_TAG_IMAGE_TYPE_UNDEFINED : Undefined/other image type
-- * @GST_TAG_IMAGE_TYPE_FRONT_COVER : Cover (front)
-- * @GST_TAG_IMAGE_TYPE_BACK_COVER : Cover (back)
-- * @GST_TAG_IMAGE_TYPE_LEAFLET_PAGE : Leaflet page
-- * @GST_TAG_IMAGE_TYPE_MEDIUM : Medium (e.g. label side of CD)
-- * @GST_TAG_IMAGE_TYPE_LEAD_ARTIST : Lead artist/lead performer/soloist
-- * @GST_TAG_IMAGE_TYPE_ARTIST : Artist/performer
-- * @GST_TAG_IMAGE_TYPE_CONDUCTOR : Conductor
-- * @GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA : Band/orchestra
-- * @GST_TAG_IMAGE_TYPE_COMPOSER : Composer
-- * @GST_TAG_IMAGE_TYPE_LYRICIST : Lyricist/text writer
-- * @GST_TAG_IMAGE_TYPE_RECORDING_LOCATION : Recording location
-- * @GST_TAG_IMAGE_TYPE_DURING_RECORDING : During recording
-- * @GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE : During performance
-- * @GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE : Movie/video screen capture
-- * @GST_TAG_IMAGE_TYPE_FISH : A fish as funny as the ID3v2 spec
-- * @GST_TAG_IMAGE_TYPE_ILLUSTRATION : Illustration
-- * @GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO : Band/artist logotype
-- * @GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO : Publisher/studio logotype
-- *
-- * Type of image contained in an image tag (specified as field in
-- * the image buffer's caps structure)
-- *
-- * Since: 0.10.9
--
-- Note: keep in sync with register_tag_image_type_enum()
subtype GstTagImageType is int;
GST_TAG_IMAGE_TYPE_NONE : constant GstTagImageType := -1;
GST_TAG_IMAGE_TYPE_UNDEFINED : constant GstTagImageType := 0;
GST_TAG_IMAGE_TYPE_FRONT_COVER : constant GstTagImageType := 1;
GST_TAG_IMAGE_TYPE_BACK_COVER : constant GstTagImageType := 2;
GST_TAG_IMAGE_TYPE_LEAFLET_PAGE : constant GstTagImageType := 3;
GST_TAG_IMAGE_TYPE_MEDIUM : constant GstTagImageType := 4;
GST_TAG_IMAGE_TYPE_LEAD_ARTIST : constant GstTagImageType := 5;
GST_TAG_IMAGE_TYPE_ARTIST : constant GstTagImageType := 6;
GST_TAG_IMAGE_TYPE_CONDUCTOR : constant GstTagImageType := 7;
GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA : constant GstTagImageType := 8;
GST_TAG_IMAGE_TYPE_COMPOSER : constant GstTagImageType := 9;
GST_TAG_IMAGE_TYPE_LYRICIST : constant GstTagImageType := 10;
GST_TAG_IMAGE_TYPE_RECORDING_LOCATION : constant GstTagImageType := 11;
GST_TAG_IMAGE_TYPE_DURING_RECORDING : constant GstTagImageType := 12;
GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE : constant GstTagImageType := 13;
GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE : constant GstTagImageType := 14;
GST_TAG_IMAGE_TYPE_FISH : constant GstTagImageType := 15;
GST_TAG_IMAGE_TYPE_ILLUSTRATION : constant GstTagImageType := 16;
GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO : constant GstTagImageType := 17;
GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO : constant GstTagImageType := 18; -- gst/tag/tag.h:440
function gst_tag_image_type_get_type return GLIB.GType; -- gst/tag/tag.h:443
pragma Import (C, gst_tag_image_type_get_type, "gst_tag_image_type_get_type");
--*
-- * GST_TAG_ID3V2_HEADER_SIZE:
-- *
-- * ID3V2 header size considered minimum input for some functions such as
-- * gst_tag_list_from_id3v2_tag() and gst_tag_get_id3v2_tag_size() for example.
-- *
-- * Since: 0.10.36
--
-- functions for vorbis comment manipulation
function gst_tag_from_vorbis_tag (vorbis_tag : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:457
pragma Import (C, gst_tag_from_vorbis_tag, "gst_tag_from_vorbis_tag");
function gst_tag_to_vorbis_tag (gst_tag : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:458
pragma Import (C, gst_tag_to_vorbis_tag, "gst_tag_to_vorbis_tag");
procedure gst_vorbis_tag_add
(list : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList;
tag : access GLIB.gchar;
value : access GLIB.gchar); -- gst/tag/tag.h:459
pragma Import (C, gst_vorbis_tag_add, "gst_vorbis_tag_add");
function gst_tag_to_vorbis_comments (list : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; tag : access GLIB.gchar) return access GStreamer.GST_Low_Level.glib_2_0_glib_glist_h.GList; -- gst/tag/tag.h:463
pragma Import (C, gst_tag_to_vorbis_comments, "gst_tag_to_vorbis_comments");
-- functions to convert GstBuffers with vorbiscomment contents to GstTagLists and back
function gst_tag_list_from_vorbiscomment_buffer
(buffer : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer;
id_data : access GLIB.guint8;
id_data_length : GLIB.guint;
vendor_string : System.Address) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:467
pragma Import (C, gst_tag_list_from_vorbiscomment_buffer, "gst_tag_list_from_vorbiscomment_buffer");
function gst_tag_list_to_vorbiscomment_buffer
(list : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList;
id_data : access GLIB.guint8;
id_data_length : GLIB.guint;
vendor_string : access GLIB.gchar) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:471
pragma Import (C, gst_tag_list_to_vorbiscomment_buffer, "gst_tag_list_to_vorbiscomment_buffer");
-- functions for ID3 tag manipulation
-- FIXME 0.11: inconsistent API naming: gst_tag_list_new_from_id3v1(), gst_tag_list_from_*_buffer(),
-- * gst_tag_list_from_id3v2_tag(). Also, note gst.tag.list_xyz() namespace vs. gst.tag_list_xyz(),
-- * which is a bit confusing and possibly doesn't map too well
function gst_tag_id3_genre_count return GLIB.guint; -- gst/tag/tag.h:482
pragma Import (C, gst_tag_id3_genre_count, "gst_tag_id3_genre_count");
function gst_tag_id3_genre_get (id : GLIB.guint) return access GLIB.gchar; -- gst/tag/tag.h:483
pragma Import (C, gst_tag_id3_genre_get, "gst_tag_id3_genre_get");
function gst_tag_list_new_from_id3v1 (data : access GLIB.guint8) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:484
pragma Import (C, gst_tag_list_new_from_id3v1, "gst_tag_list_new_from_id3v1");
function gst_tag_from_id3_tag (id3_tag : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:486
pragma Import (C, gst_tag_from_id3_tag, "gst_tag_from_id3_tag");
function gst_tag_from_id3_user_tag (c_type : access GLIB.gchar; id3_user_tag : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:487
pragma Import (C, gst_tag_from_id3_user_tag, "gst_tag_from_id3_user_tag");
function gst_tag_to_id3_tag (gst_tag : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:489
pragma Import (C, gst_tag_to_id3_tag, "gst_tag_to_id3_tag");
function gst_tag_list_add_id3_image
(tag_list : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList;
image_data : access GLIB.guint8;
image_data_len : GLIB.guint;
id3_picture_type : GLIB.guint) return GLIB.gboolean; -- gst/tag/tag.h:491
pragma Import (C, gst_tag_list_add_id3_image, "gst_tag_list_add_id3_image");
function gst_tag_list_from_id3v2_tag (buffer : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:496
pragma Import (C, gst_tag_list_from_id3v2_tag, "gst_tag_list_from_id3v2_tag");
function gst_tag_get_id3v2_tag_size (buffer : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer) return GLIB.guint; -- gst/tag/tag.h:498
pragma Import (C, gst_tag_get_id3v2_tag_size, "gst_tag_get_id3v2_tag_size");
-- functions to convert GstBuffers with xmp packets contents to GstTagLists and back
function gst_tag_list_from_xmp_buffer (buffer : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:501
pragma Import (C, gst_tag_list_from_xmp_buffer, "gst_tag_list_from_xmp_buffer");
function gst_tag_list_to_xmp_buffer (list : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; read_only : GLIB.gboolean) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:502
pragma Import (C, gst_tag_list_to_xmp_buffer, "gst_tag_list_to_xmp_buffer");
function gst_tag_list_to_xmp_buffer_full
(list : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList;
read_only : GLIB.gboolean;
schemas : System.Address) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:504
pragma Import (C, gst_tag_list_to_xmp_buffer_full, "gst_tag_list_to_xmp_buffer_full");
function gst_tag_xmp_list_schemas return System.Address; -- gst/tag/tag.h:506
pragma Import (C, gst_tag_xmp_list_schemas, "gst_tag_xmp_list_schemas");
-- functions related to exif
function gst_tag_list_to_exif_buffer
(taglist : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList;
byte_order : GLIB.gint;
base_offset : GLIB.guint32) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:509
pragma Import (C, gst_tag_list_to_exif_buffer, "gst_tag_list_to_exif_buffer");
function gst_tag_list_to_exif_buffer_with_tiff_header (taglist : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:513
pragma Import (C, gst_tag_list_to_exif_buffer_with_tiff_header, "gst_tag_list_to_exif_buffer_with_tiff_header");
function gst_tag_list_from_exif_buffer
(buffer : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer;
byte_order : GLIB.gint;
base_offset : GLIB.guint32) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:515
pragma Import (C, gst_tag_list_from_exif_buffer, "gst_tag_list_from_exif_buffer");
function gst_tag_list_from_exif_buffer_with_tiff_header (buffer : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:519
pragma Import (C, gst_tag_list_from_exif_buffer_with_tiff_header, "gst_tag_list_from_exif_buffer_with_tiff_header");
-- other tag-related functions
function gst_tag_parse_extended_comment
(ext_comment : access GLIB.gchar;
key : System.Address;
lang : System.Address;
value : System.Address;
fail_if_no_key : GLIB.gboolean) return GLIB.gboolean; -- gst/tag/tag.h:524
pragma Import (C, gst_tag_parse_extended_comment, "gst_tag_parse_extended_comment");
function gst_tag_freeform_string_to_utf8
(data : access GLIB.gchar;
size : GLIB.gint;
env_vars : System.Address) return access GLIB.gchar; -- gst/tag/tag.h:530
pragma Import (C, gst_tag_freeform_string_to_utf8, "gst_tag_freeform_string_to_utf8");
function gst_tag_image_data_to_image_buffer
(image_data : access GLIB.guint8;
image_data_len : GLIB.guint;
image_type : GstTagImageType) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:534
pragma Import (C, gst_tag_image_data_to_image_buffer, "gst_tag_image_data_to_image_buffer");
-- FIXME 0.11: get rid of this awkward register/init function, see tags.c
procedure gst_tag_register_musicbrainz_tags; -- gst/tag/tag.h:539
pragma Import (C, gst_tag_register_musicbrainz_tags, "gst_tag_register_musicbrainz_tags");
-- language tag related functions
function gst_tag_get_language_codes return System.Address; -- gst/tag/tag.h:544
pragma Import (C, gst_tag_get_language_codes, "gst_tag_get_language_codes");
function gst_tag_get_language_name (language_code : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:546
pragma Import (C, gst_tag_get_language_name, "gst_tag_get_language_name");
function gst_tag_get_language_code_iso_639_1 (lang_code : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:548
pragma Import (C, gst_tag_get_language_code_iso_639_1, "gst_tag_get_language_code_iso_639_1");
function gst_tag_get_language_code_iso_639_2B (lang_code : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:550
pragma Import (C, gst_tag_get_language_code_iso_639_2B, "gst_tag_get_language_code_iso_639_2B");
function gst_tag_get_language_code_iso_639_2T (lang_code : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:552
pragma Import (C, gst_tag_get_language_code_iso_639_2T, "gst_tag_get_language_code_iso_639_2T");
--*
-- * gst_tag_get_language_code:
-- * @lang_code: ISO-639 language code (e.g. "deu" or "ger" or "de")
-- *
-- * Convenience macro wrapping gst_tag_get_language_code_iso_639_1().
-- *
-- * Since: 0.10.26
--
-- functions to deal with (mostly) Creative Commons licenses
--*
-- * GstTagLicenseFlags:
-- * @GST_TAG_LICENSE_PERMITS_REPRODUCTION: making multiple copies
-- * is allowed
-- * @GST_TAG_LICENSE_PERMITS_DISTRIBUTION: distribution, public display
-- * and public performance are allowed
-- * @GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS: distribution of derivative
-- * works is allowed
-- * @GST_TAG_LICENSE_PERMITS_SHARING: commercial derivatives are allowed,
-- * but only non-commercial distribution is allowed
-- * @GST_TAG_LICENSE_REQUIRES_NOTICE: copyright and license notices
-- * must be kept intact
-- * @GST_TAG_LICENSE_REQUIRES_ATTRIBUTION: credit must be given to
-- * copyright holder and/or author
-- * @GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE: derivative works must be
-- * licensed under the same terms or compatible terms as the original work
-- * @GST_TAG_LICENSE_REQUIRES_SOURCE_CODE: source code (the preferred
-- * form for making modifications) must be provided when exercising some
-- * rights granted by the license
-- * @GST_TAG_LICENSE_REQUIRES_COPYLEFT: derivative and combined works
-- * must be licensed under specified terms, similar to those of the original
-- * work
-- * @GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT: derivative works must be
-- * licensed under specified terms, with at least the same conditions as
-- * the original work; combinations with the work may be licensed under
-- * different terms
-- * @GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE: exercising rights for
-- * commercial purposes is prohibited
-- * @GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE: use in a
-- * non-developing country is prohibited
-- * @GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE: this license was created
-- * by the Creative Commons project
-- * @GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE: this license was
-- * created by the Free Software Foundation (FSF)
-- *
-- * See http://creativecommons.org/ns for more information.
-- *
-- * Since: 0.10.36
--
subtype GstTagLicenseFlags is unsigned;
GST_TAG_LICENSE_PERMITS_REPRODUCTION : constant GstTagLicenseFlags := 1;
GST_TAG_LICENSE_PERMITS_DISTRIBUTION : constant GstTagLicenseFlags := 2;
GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS : constant GstTagLicenseFlags := 4;
GST_TAG_LICENSE_PERMITS_SHARING : constant GstTagLicenseFlags := 8;
GST_TAG_LICENSE_REQUIRES_NOTICE : constant GstTagLicenseFlags := 256;
GST_TAG_LICENSE_REQUIRES_ATTRIBUTION : constant GstTagLicenseFlags := 512;
GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE : constant GstTagLicenseFlags := 1024;
GST_TAG_LICENSE_REQUIRES_SOURCE_CODE : constant GstTagLicenseFlags := 2048;
GST_TAG_LICENSE_REQUIRES_COPYLEFT : constant GstTagLicenseFlags := 4096;
GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT : constant GstTagLicenseFlags := 8192;
GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE : constant GstTagLicenseFlags := 65536;
GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE : constant GstTagLicenseFlags := 131072;
GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE : constant GstTagLicenseFlags := 16777216;
GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE : constant GstTagLicenseFlags := 33554432; -- gst/tag/tag.h:625
function gst_tag_get_licenses return System.Address; -- gst/tag/tag.h:627
pragma Import (C, gst_tag_get_licenses, "gst_tag_get_licenses");
function gst_tag_get_license_flags (license_ref : access GLIB.gchar) return GstTagLicenseFlags; -- gst/tag/tag.h:629
pragma Import (C, gst_tag_get_license_flags, "gst_tag_get_license_flags");
function gst_tag_get_license_nick (license_ref : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:631
pragma Import (C, gst_tag_get_license_nick, "gst_tag_get_license_nick");
function gst_tag_get_license_title (license_ref : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:633
pragma Import (C, gst_tag_get_license_title, "gst_tag_get_license_title");
function gst_tag_get_license_version (license_ref : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:635
pragma Import (C, gst_tag_get_license_version, "gst_tag_get_license_version");
function gst_tag_get_license_description (license_ref : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:637
pragma Import (C, gst_tag_get_license_description, "gst_tag_get_license_description");
function gst_tag_get_license_jurisdiction (license_ref : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:639
pragma Import (C, gst_tag_get_license_jurisdiction, "gst_tag_get_license_jurisdiction");
function gst_tag_license_flags_get_type return GLIB.GType; -- gst/tag/tag.h:641
pragma Import (C, gst_tag_license_flags_get_type, "gst_tag_license_flags_get_type");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_tag_tag_h;
|
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C;
use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C;
procedure prologin_template_2charline2 is
type stringptr is access all char_array;
procedure PString(s : stringptr) is
begin
String'Write (Text_Streams.Stream (Current_Output), To_Ada(s.all));
end;
procedure PChar(c : in Character) is
begin
Character'Write (Text_Streams.Stream (Current_Output), c);
end;
procedure PInt(i : in Integer) is
begin
String'Write (Text_Streams.Stream (Current_Output), Trim(Integer'Image(i), Left));
end;
procedure SkipSpaces is
C : Character;
Eol : Boolean;
begin
loop
Look_Ahead(C, Eol);
exit when Eol or C /= ' ';
Get(C);
end loop;
end;
type c is Array (Integer range <>) of Character;
type c_PTR is access c;
function programme_candidat(tableau1 : in c_PTR; taille1 : in Integer; tableau2 : in c_PTR; taille2 : in Integer) return Integer is
out0 : Integer;
begin
out0 := 0;
for i in integer range 0..taille1 - 1 loop
out0 := out0 + Character'Pos(tableau1(i)) * i;
PChar(tableau1(i));
end loop;
PString(new char_array'( To_C("--" & Character'Val(10))));
for j in integer range 0..taille2 - 1 loop
out0 := out0 + Character'Pos(tableau2(j)) * j * 100;
PChar(tableau2(j));
end loop;
PString(new char_array'( To_C("--" & Character'Val(10))));
return out0;
end;
taille2 : Integer;
taille1 : Integer;
tableau2 : c_PTR;
tableau1 : c_PTR;
begin
Get(taille1);
SkipSpaces;
Get(taille2);
SkipSpaces;
tableau1 := new c (0..taille1 - 1);
for a in integer range 0..taille1 - 1 loop
Get(tableau1(a));
end loop;
SkipSpaces;
tableau2 := new c (0..taille2 - 1);
for b in integer range 0..taille2 - 1 loop
Get(tableau2(b));
end loop;
SkipSpaces;
PInt(programme_candidat(tableau1, taille1, tableau2, taille2));
PString(new char_array'( To_C("" & Character'Val(10))));
end;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of STMicroelectronics nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
-- --
-- This file is based on: --
-- --
-- @file stm32f4xx_hal_i2c.c --
-- @author MCD Application Team --
-- @version V1.1.0 --
-- @date 19-June-2014 --
-- @brief I2C HAL module driver. --
-- --
-- COPYRIGHT(c) 2014 STMicroelectronics --
------------------------------------------------------------------------------
with Ada.Real_Time; use Ada.Real_Time;
with STM32_SVD.I2C; use STM32_SVD.I2C;
with STM32.Device; use STM32.Device;
package body STM32.I2C is
use type HAL.I2C.I2C_Status;
type I2C_Status_Flag is
(Start_Bit,
Address_Sent,
Byte_Transfer_Finished,
Address_Sent_10bit,
Stop_Detection,
Rx_Data_Register_Not_Empty,
Tx_Data_Register_Empty,
Bus_Error,
Arbitration_Lost,
Ack_Failure,
UnderOverrun,
Packet_Error,
Timeout,
SMB_Alert,
Master_Slave_Mode,
Busy,
Transmitter_Receiver_Mode,
General_Call,
SMB_Default,
SMB_Host,
Dual_Flag);
-- Low level flag handling
function Flag_Status (This : I2C_Port;
Flag : I2C_Status_Flag)
return Boolean;
procedure Clear_Address_Sent_Status (This : I2C_Port);
-- Higher level flag handling
procedure Wait_Flag
(This : in out I2C_Port;
Flag : I2C_Status_Flag;
F_State : Boolean;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status);
procedure Wait_Master_Flag
(This : in out I2C_Port;
Flag : I2C_Status_Flag;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status);
procedure Master_Request_Write
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status);
procedure Master_Request_Read
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status);
procedure Mem_Request_Write
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Mem_Addr : UInt16;
Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status);
procedure Mem_Request_Read
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Mem_Addr : UInt16;
Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status);
---------------
-- Configure --
---------------
procedure Configure
(This : in out I2C_Port;
Conf : I2C_Configuration)
is
CR1 : CR1_Register;
CCR : CCR_Register;
OAR1 : OAR1_Register;
PCLK1 : constant UInt32 := System_Clock_Frequencies.PCLK1;
Freq_Range : constant UInt16 := UInt16 (PCLK1 / 1_000_000);
begin
if This.State /= Reset then
return;
end if;
This.Config := Conf;
-- Disable the I2C port
if Freq_Range < 2 or else Freq_Range > 45 then
raise Program_Error with
"PCLK1 too high or too low: expected 2-45 MHz, current" &
Freq_Range'Img & " MHz";
end if;
Set_State (This, False);
-- Load CR2 and clear FREQ
This.Periph.CR2 :=
(LAST => False,
DMAEN => False,
ITBUFEN => False,
ITEVTEN => False,
ITERREN => False,
FREQ => UInt6 (Freq_Range),
others => <>);
-- Set the port timing
if Conf.Clock_Speed <= 100_000 then
-- Mode selection to Standard Mode
CCR.F_S := False;
CCR.CCR := UInt12 (PCLK1 / (Conf.Clock_Speed * 2));
if CCR.CCR < 4 then
CCR.CCR := 4;
end if;
This.Periph.TRISE.TRISE := UInt6 (Freq_Range + 1);
else
-- Fast mode
CCR.F_S := True;
if Conf.Duty_Cycle = DutyCycle_2 then
CCR.CCR := UInt12 (PCLK1 / (Conf.Clock_Speed * 3));
else
CCR.CCR := UInt12 (PCLK1 / (Conf.Clock_Speed * 25));
CCR.DUTY := True;
end if;
if CCR.CCR = 0 then
CCR.CCR := 1;
end if;
This.Periph.TRISE.TRISE :=
UInt6 ((UInt32 (Freq_Range) * 300) / 1000 + 1);
end if;
This.Periph.CCR := CCR;
-- CR1 configuration
case Conf.Mode is
when I2C_Mode =>
CR1.SMBUS := False;
CR1.SMBTYPE := False;
when SMBusDevice_Mode =>
CR1.SMBUS := True;
CR1.SMBTYPE := False;
when SMBusHost_Mode =>
CR1.SMBUS := True;
CR1.SMBTYPE := True;
end case;
CR1.ENGC := Conf.General_Call_Enabled;
CR1.NOSTRETCH := not Conf.Clock_Stretching_Enabled;
This.Periph.CR1 := CR1;
-- Address mode (slave mode) configuration
OAR1.ADDMODE := Conf.Addressing_Mode = Addressing_Mode_10bit;
case Conf.Addressing_Mode is
when Addressing_Mode_7bit =>
OAR1.ADD0 := False;
OAR1.ADD7 := UInt7 (Conf.Own_Address / 2);
OAR1.ADD10 := 0;
when Addressing_Mode_10bit =>
OAR1.ADD0 := (Conf.Own_Address and 2#1#) /= 0;
OAR1.ADD7 := UInt7 ((Conf.Own_Address / 2) and 2#1111111#);
OAR1.ADD10 := UInt2 (Conf.Own_Address / 2 ** 8);
end case;
This.Periph.OAR1 := OAR1;
Set_State (This, True);
This.State := Ready;
end Configure;
-----------------
-- Flag_Status --
-----------------
function Flag_Status
(This : I2C_Port; Flag : I2C_Status_Flag) return Boolean
is
begin
case Flag is
when Start_Bit =>
return This.Periph.SR1.SB;
when Address_Sent =>
return This.Periph.SR1.ADDR;
when Byte_Transfer_Finished =>
return This.Periph.SR1.BTF;
when Address_Sent_10bit =>
return This.Periph.SR1.ADD10;
when Stop_Detection =>
return This.Periph.SR1.STOPF;
when Rx_Data_Register_Not_Empty =>
return This.Periph.SR1.RxNE;
when Tx_Data_Register_Empty =>
return This.Periph.SR1.TxE;
when Bus_Error =>
return This.Periph.SR1.BERR;
when Arbitration_Lost =>
return This.Periph.SR1.ARLO;
when Ack_Failure =>
return This.Periph.SR1.AF;
when UnderOverrun =>
return This.Periph.SR1.OVR;
when Packet_Error =>
return This.Periph.SR1.PECERR;
when Timeout =>
return This.Periph.SR1.TIMEOUT;
when SMB_Alert =>
return This.Periph.SR1.SMBALERT;
when Master_Slave_Mode =>
return This.Periph.SR2.MSL;
when Busy =>
return This.Periph.SR2.BUSY;
when Transmitter_Receiver_Mode =>
return This.Periph.SR2.TRA;
when General_Call =>
return This.Periph.SR2.GENCALL;
when SMB_Default =>
return This.Periph.SR2.SMBDEFAULT;
when SMB_Host =>
return This.Periph.SR2.SMBHOST;
when Dual_Flag =>
return This.Periph.SR2.DUALF;
end case;
end Flag_Status;
-- ----------------
-- -- Clear_Flag --
-- ----------------
--
-- procedure Clear_Flag
-- (Port : in out I2C_Port;
-- Target : Clearable_I2C_Status_Flag)
-- is
-- Unref : Bit with Unreferenced;
-- begin
-- case Target is
-- when Bus_Error =>
-- Port.SR1.BERR := 0;
-- when Arbitration_Lost =>
-- Port.SR1.ARLO := 0;
-- when Ack_Failure =>
-- Port.SR1.AF := 0;
-- when UnderOverrun =>
-- Port.SR1.OVR := 0;
-- when Packet_Error =>
-- Port.SR1.PECERR := 0;
-- when Timeout =>
-- Port.SR1.TIMEOUT := 0;
-- when SMB_Alert =>
-- Port.SR1.SMBALERT := 0;
-- end case;
-- end Clear_Flag;
-------------------------------
-- Clear_Address_Sent_Status --
-------------------------------
procedure Clear_Address_Sent_Status (This : I2C_Port)
is
Unref : Boolean with Volatile, Unreferenced;
begin
-- ADDR is cleared after reading both SR1 and SR2
Unref := This.Periph.SR1.ADDR;
Unref := This.Periph.SR2.MSL;
end Clear_Address_Sent_Status;
-- ---------------------------------
-- -- Clear_Stop_Detection_Status --
-- ---------------------------------
--
-- procedure Clear_Stop_Detection_Status (Port : in out I2C_Port) is
-- Unref : Bit with Volatile, Unreferenced;
-- begin
-- Unref := Port.SR1.STOPF;
-- Port.CR1.PE := True;
-- end Clear_Stop_Detection_Status;
---------------
-- Wait_Flag --
---------------
procedure Wait_Flag
(This : in out I2C_Port;
Flag : I2C_Status_Flag;
F_State : Boolean;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status)
is
Start : constant Time := Clock;
begin
while Flag_Status (This, Flag) = F_State loop
if Clock - Start > Milliseconds (Timeout) then
This.State := Ready;
Status := HAL.I2C.Err_Timeout;
return;
end if;
end loop;
Status := HAL.I2C.Ok;
end Wait_Flag;
----------------------
-- Wait_Master_Flag --
----------------------
procedure Wait_Master_Flag
(This : in out I2C_Port;
Flag : I2C_Status_Flag;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status)
is
Start : constant Time := Clock;
begin
while not Flag_Status (This, Flag) loop
if This.Periph.SR1.AF then
-- Generate STOP
This.Periph.CR1.STOP := True;
-- Clear the AF flag
This.Periph.SR1.AF := False;
This.State := Ready;
Status := HAL.I2C.Err_Error;
return;
end if;
if Clock - Start > Milliseconds (Timeout) then
This.State := Ready;
Status := HAL.I2C.Err_Timeout;
return;
end if;
end loop;
Status := HAL.I2C.Ok;
end Wait_Master_Flag;
--------------------------
-- Master_Request_Write --
--------------------------
procedure Master_Request_Write
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status)
is
begin
This.Periph.CR1.START := True;
Wait_Flag (This, Start_Bit, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
if This.Config.Addressing_Mode = Addressing_Mode_7bit then
This.Periph.DR.DR := UInt8 (Addr) and not 2#1#;
else
declare
MSB : constant UInt8 :=
UInt8 (Shift_Right (UInt16 (Addr) and 16#300#, 7));
LSB : constant UInt8 :=
UInt8 (Addr and 16#FF#);
begin
-- We need to send 2#1111_MSB0# when MSB are the 3 most
-- significant bits of the address
This.Periph.DR.DR := MSB or 16#F0#;
Wait_Master_Flag (This, Address_Sent_10bit, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.DR.DR := LSB;
end;
end if;
Wait_Master_Flag (This, Address_Sent, Timeout, Status);
end Master_Request_Write;
--------------------------
-- Master_Request_Write --
--------------------------
procedure Master_Request_Read
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status)
is
begin
This.Periph.CR1.ACK := True;
This.Periph.CR1.START := True;
Wait_Flag (This, Start_Bit, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
if This.Config.Addressing_Mode = Addressing_Mode_7bit then
This.Periph.DR.DR := UInt8 (Addr) or 2#1#;
else
declare
MSB : constant UInt8 :=
UInt8 (Shift_Right (UInt16 (Addr) and 16#300#, 7));
LSB : constant UInt8 :=
UInt8 (Addr and 16#FF#);
begin
-- We need to write the address bit. So let's start with a
-- write header
-- We need to send 2#1111_MSB0# when MSB are the 3 most
-- significant bits of the address
This.Periph.DR.DR := MSB or 16#F0#;
Wait_Master_Flag (This, Address_Sent_10bit, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.DR.DR := LSB;
Wait_Master_Flag (This, Address_Sent, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
Clear_Address_Sent_Status (This);
-- Generate a re-start
This.Periph.CR1.START := True;
Wait_Flag (This, Start_Bit, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
-- resend the MSB with the read bit set.
This.Periph.DR.DR := MSB or 16#F1#;
end;
end if;
Wait_Master_Flag (This, Address_Sent, Timeout, Status);
end Master_Request_Read;
-----------------------
-- Mem_Request_Write --
-----------------------
procedure Mem_Request_Write
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Mem_Addr : UInt16;
Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status)
is
begin
This.Periph.CR1.START := True;
Wait_Flag (This, Start_Bit, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
-- Send slave address
This.Periph.DR.DR := UInt8 (Addr) and not 2#1#;
Wait_Master_Flag (This, Address_Sent, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
Clear_Address_Sent_Status (This);
-- Wait until TXE flag is set
Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
case Mem_Addr_Size is
when HAL.I2C.Memory_Size_8b =>
This.Periph.DR.DR := UInt8 (Mem_Addr);
when HAL.I2C.Memory_Size_16b =>
This.Periph.DR.DR := UInt8 (Shift_Right (Mem_Addr, 8));
Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.DR.DR := UInt8 (Mem_Addr and 16#FF#);
end case;
-- Wait until TXE flag is set
Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status);
end Mem_Request_Write;
----------------------
-- Mem_Request_Read --
----------------------
procedure Mem_Request_Read
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Mem_Addr : UInt16;
Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size;
Timeout : Natural;
Status : out HAL.I2C.I2C_Status)
is
begin
This.Periph.CR1.ACK := True;
This.Periph.CR1.START := True;
Wait_Flag (This, Start_Bit, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
-- Send slave address in write mode
This.Periph.DR.DR := UInt8 (Addr) and not 16#1#;
Wait_Master_Flag (This, Address_Sent, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
Clear_Address_Sent_Status (This);
-- Wait until TXE flag is set
Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
case Mem_Addr_Size is
when HAL.I2C.Memory_Size_8b =>
This.Periph.DR.DR := UInt8 (Mem_Addr);
when HAL.I2C.Memory_Size_16b =>
This.Periph.DR.DR := UInt8 (Shift_Right (Mem_Addr, 8));
Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.DR.DR := UInt8 (Mem_Addr and 16#FF#);
end case;
-- Wait until TXE flag is set
Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
-- We now need to reset and send the slave address in read mode
This.Periph.CR1.START := True;
Wait_Flag (This, Start_Bit, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
-- Send slave address in read mode
This.Periph.DR.DR := UInt8 (Addr) or 16#1#;
Wait_Master_Flag (This, Address_Sent, Timeout, Status);
end Mem_Request_Read;
---------------------
-- Master_Transmit --
---------------------
overriding
procedure Master_Transmit
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Data : HAL.I2C.I2C_Data;
Status : out HAL.I2C.I2C_Status;
Timeout : Natural := 1000)
is
Idx : Natural := Data'First;
begin
if This.State = Reset then
Status := HAL.I2C.Err_Error;
return;
elsif Data'Length = 0 then
Status := HAL.I2C.Err_Error;
return;
end if;
Wait_Flag (This, Busy, True, Timeout, Status);
if Status /= HAL.I2C.Ok then
Status := HAL.I2C.Busy;
return;
end if;
if This.State /= Ready then
Status := HAL.I2C.Busy;
return;
end if;
This.State := Master_Busy_Tx;
This.Periph.CR1.POS := False;
Master_Request_Write (This, Addr, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
Clear_Address_Sent_Status (This);
while Idx <= Data'Last loop
Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.DR.DR := Data (Idx);
Idx := Idx + 1;
if Flag_Status (This, Byte_Transfer_Finished)
and then
Idx <= Data'Last
and then
Status = HAL.I2C.Ok
then
This.Periph.DR.DR := Data (Idx);
Idx := Idx + 1;
end if;
end loop;
Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
-- Generate STOP
This.Periph.CR1.STOP := True;
This.State := Ready;
end Master_Transmit;
--------------------
-- Master_Receive --
--------------------
overriding
procedure Master_Receive
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Data : out HAL.I2C.I2C_Data;
Status : out HAL.I2C.I2C_Status;
Timeout : Natural := 1000)
is
Idx : Natural := Data'First;
begin
if This.State = Reset then
Status := HAL.I2C.Err_Error;
return;
elsif Data'Length = 0 then
Status := HAL.I2C.Err_Error;
return;
end if;
Wait_Flag (This, Busy, True, Timeout, Status);
if Status /= HAL.I2C.Ok then
Status := HAL.I2C.Busy;
return;
end if;
if This.State /= Ready then
Status := HAL.I2C.Busy;
return;
end if;
This.State := Master_Busy_Rx;
This.Periph.CR1.POS := False;
Master_Request_Read (This, Addr, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
if Data'Length = 1 then
-- Disable acknowledge
This.Periph.CR1.ACK := False;
Clear_Address_Sent_Status (This);
This.Periph.CR1.STOP := True;
elsif Data'Length = 2 then
-- Disable acknowledge
This.Periph.CR1.ACK := False;
This.Periph.CR1.POS := True;
Clear_Address_Sent_Status (This);
else
-- Automatic acknowledge
This.Periph.CR1.ACK := True;
Clear_Address_Sent_Status (This);
end if;
while Idx <= Data'Last loop
if Idx = Data'Last then
-- One UInt8 to read
Wait_Flag
(This,
Rx_Data_Register_Not_Empty,
False,
Timeout,
Status);
if Status /= HAL.I2C.Ok then
return;
end if;
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
elsif Idx + 1 = Data'Last then
-- Two bytes to read
This.Periph.CR1.ACK := False;
Wait_Flag (This,
Byte_Transfer_Finished,
False,
Timeout,
Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.CR1.STOP := True;
-- read the data from DR
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
elsif Idx + 2 = Data'Last then
-- Three bytes to read
Wait_Flag (This,
Byte_Transfer_Finished,
False,
Timeout,
Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.CR1.ACK := False;
-- read the data from DR
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
Wait_Flag (This,
Byte_Transfer_Finished,
False,
Timeout,
Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.CR1.STOP := True;
-- read the data from DR
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
else
-- One byte to read
Wait_Flag
(This,
Rx_Data_Register_Not_Empty,
False,
Timeout,
Status);
if Status /= HAL.I2C.Ok then
return;
end if;
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
Wait_Flag (This,
Byte_Transfer_Finished,
False,
Timeout,
Status);
if Status = HAL.I2C.Ok then
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
end if;
end if;
end loop;
This.State := Ready;
end Master_Receive;
---------------
-- Mem_Write --
---------------
overriding
procedure Mem_Write
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Mem_Addr : UInt16;
Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size;
Data : HAL.I2C.I2C_Data;
Status : out HAL.I2C.I2C_Status;
Timeout : Natural := 1000)
is
Idx : Natural := Data'First;
begin
if This.State = Reset then
Status := HAL.I2C.Err_Error;
return;
elsif Data'Length = 0 then
Status := HAL.I2C.Err_Error;
return;
end if;
Wait_Flag (This, Busy, True, Timeout, Status);
if Status /= HAL.I2C.Ok then
Status := HAL.I2C.Busy;
return;
end if;
if This.State /= Ready then
Status := HAL.I2C.Busy;
return;
end if;
This.State := Mem_Busy_Tx;
This.Periph.CR1.POS := False;
Mem_Request_Write
(This, Addr, Mem_Addr, Mem_Addr_Size, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
while Idx <= Data'Last loop
Wait_Flag (This,
Tx_Data_Register_Empty,
False,
Timeout,
Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.DR.DR := Data (Idx);
Idx := Idx + 1;
if Flag_Status (This, Byte_Transfer_Finished)
and then
Idx <= Data'Last
and then
Status = HAL.I2C.Ok
then
This.Periph.DR.DR := Data (Idx);
Idx := Idx + 1;
end if;
end loop;
Wait_Flag (This,
Tx_Data_Register_Empty,
False,
Timeout,
Status);
if Status /= HAL.I2C.Ok then
return;
end if;
-- Generate STOP
This.Periph.CR1.STOP := True;
This.State := Ready;
end Mem_Write;
--------------
-- Mem_Read --
--------------
overriding
procedure Mem_Read
(This : in out I2C_Port;
Addr : HAL.I2C.I2C_Address;
Mem_Addr : UInt16;
Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size;
Data : out HAL.I2C.I2C_Data;
Status : out HAL.I2C.I2C_Status;
Timeout : Natural := 1000)
is
Idx : Natural := Data'First;
begin
if This.State = Reset then
Status := HAL.I2C.Err_Error;
return;
elsif Data'Length = 0 then
Status := HAL.I2C.Err_Error;
return;
end if;
Wait_Flag (This, Busy, True, Timeout, Status);
if Status /= HAL.I2C.Ok then
Status := HAL.I2C.Busy;
return;
end if;
if This.State /= Ready then
Status := HAL.I2C.Busy;
return;
end if;
This.State := Mem_Busy_Rx;
This.Periph.CR1.POS := False;
Mem_Request_Read
(This, Addr, Mem_Addr, Mem_Addr_Size, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
if Data'Length = 1 then
This.Periph.CR1.ACK := False;
Clear_Address_Sent_Status (This);
This.Periph.CR1.STOP := True;
elsif Data'Length = 2 then
This.Periph.CR1.ACK := False;
This.Periph.CR1.POS := True;
Clear_Address_Sent_Status (This);
else
-- Automatic acknowledge
This.Periph.CR1.ACK := True;
Clear_Address_Sent_Status (This);
end if;
while Idx <= Data'Last loop
if Idx = Data'Last then
-- One byte to read
Wait_Flag
(This, Rx_Data_Register_Not_Empty, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
elsif Idx + 1 = Data'Last then
-- Two bytes to read
This.Periph.CR1.ACK := False;
Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.CR1.STOP := True;
-- read the data from DR
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
elsif Idx + 2 = Data'Last then
-- Three bytes to read
Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.CR1.ACK := False;
-- read the data from DR
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
This.Periph.CR1.STOP := True;
-- read the data from DR
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
else
-- One byte to read
Wait_Flag
(This, Rx_Data_Register_Not_Empty, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status);
if Status = HAL.I2C.Ok then
Data (Idx) := This.Periph.DR.DR;
Idx := Idx + 1;
end if;
end if;
end loop;
This.State := Ready;
end Mem_Read;
---------------
-- Set_State --
---------------
procedure Set_State (This : in out I2C_Port; Enabled : Boolean)
is
begin
This.Periph.CR1.PE := Enabled;
end Set_State;
------------------
-- Port_Enabled --
------------------
function Port_Enabled (This : I2C_Port) return Boolean
is
begin
return This.Periph.CR1.PE;
end Port_Enabled;
----------------------
-- Enable_Interrupt --
----------------------
procedure Enable_Interrupt
(This : in out I2C_Port;
Source : I2C_Interrupt)
is
begin
case Source is
when Error_Interrupt =>
This.Periph.CR2.ITERREN := True;
when Event_Interrupt =>
This.Periph.CR2.ITEVTEN := True;
when Buffer_Interrupt =>
This.Periph.CR2.ITBUFEN := True;
end case;
end Enable_Interrupt;
-----------------------
-- Disable_Interrupt --
-----------------------
procedure Disable_Interrupt
(This : in out I2C_Port;
Source : I2C_Interrupt)
is
begin
case Source is
when Error_Interrupt =>
This.Periph.CR2.ITERREN := False;
when Event_Interrupt =>
This.Periph.CR2.ITEVTEN := False;
when Buffer_Interrupt =>
This.Periph.CR2.ITBUFEN := False;
end case;
end Disable_Interrupt;
-------------
-- Enabled --
-------------
function Enabled
(This : I2C_Port;
Source : I2C_Interrupt)
return Boolean
is
begin
case Source is
when Error_Interrupt =>
return This.Periph.CR2.ITERREN;
when Event_Interrupt =>
return This.Periph.CR2.ITEVTEN;
when Buffer_Interrupt =>
return This.Periph.CR2.ITBUFEN;
end case;
end Enabled;
end STM32.I2C;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Examples Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2016-2019, 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 Servlet.Container_Initializers;
with Servlet.Contexts;
package Startup is
type Servlet_Container_Initializer is limited
new Servlet.Container_Initializers.Servlet_Container_Initializer with
null record;
overriding procedure On_Startup
(Self : in out Servlet_Container_Initializer;
Context : in out Servlet.Contexts.Servlet_Context'Class);
end Startup;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ D I S P --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains routines involved in tagged types and dynamic
-- dispatching.
with Types; use Types;
package Sem_Disp is
procedure Check_Controlling_Formals (Typ : Entity_Id; Subp : Entity_Id);
-- Check that all controlling parameters of Subp are of type Typ,
-- that defaults for controlling parameters are tag-indeterminate,
-- and that the nominal subtype of the parameters and result
-- statically match the first subtype of the controlling type.
procedure Check_Dispatching_Call (N : Node_Id);
-- Check if a call is a dispatching call. The subprogram is known to
-- be a dispatching operation. The call is dispatching if all the
-- controlling actuals are dynamically tagged. This procedure is called
-- after overload resolution, so the call is known to be unambiguous.
procedure Check_Dispatching_Operation (Subp, Old_Subp : Entity_Id);
-- Add "Subp" to the list of primitive operations of the corresponding type
-- if it has a parameter of this type and is defined at a proper place for
-- primitive operations (new primitives are only defined in package spec,
-- overridden operation can be defined in any scope). If Old_Subp is not
-- Empty we are in the overriding case.
procedure Check_Operation_From_Incomplete_Type
(Subp : Entity_Id;
Typ : Entity_Id);
-- If a primitive operation was defined for the incomplete view of the
-- type, and the full type declaration is a derived type definition,
-- the operation may override an inherited one.
procedure Check_Operation_From_Private_View (Subp, Old_Subp : Entity_Id);
-- Add "Old_Subp" to the list of primitive operations of the corresponding
-- tagged type if it is the full view of a private tagged type. The Alias
-- of "OldSubp" is adjusted to point to the inherited procedure of the
-- full view because it is always this one which has to be called.
function Find_Controlling_Arg (N : Node_Id) return Node_Id;
-- Returns the actual controlling argument if N is dynamically tagged,
-- and Empty if it is not dynamically tagged.
function Find_Dispatching_Type (Subp : Entity_Id) return Entity_Id;
-- Check whether a subprogram is dispatching, and find the tagged
-- type of the controlling argument or arguments.
function Is_Dynamically_Tagged (N : Node_Id) return Boolean;
-- Used to determine whether a call is dispatching, i.e. if is an
-- an expression of a class_Wide type, or a call to a function with
-- controlling result where at least one operand is dynamically tagged.
function Is_Tag_Indeterminate (N : Node_Id) return Boolean;
-- An expression is tag-indeterminate if it is a call that dispatches
-- on result, and all controlling operands are also indeterminate.
-- Such a function call may inherit a tag from an enclosing call.
procedure Override_Dispatching_Operation
(Tagged_Type : Entity_Id;
Prev_Op : Entity_Id;
New_Op : Entity_Id);
-- Replace an implicit dispatching operation with an explicit one.
-- Prev_Op is an inherited primitive operation which is overridden
-- by the explicit declaration of New_Op.
procedure Propagate_Tag (Control : Node_Id; Actual : Node_Id);
-- If a function call is tag-indeterminate, its controlling argument is
-- found in the context; either an enclosing call, or the left-hand side
-- of the enclosing assignment statement. The tag must be propagated
-- recursively to the tag-indeterminate actuals of the call.
end Sem_Disp;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
package HAL.Touch_Panel is
type TP_Touch_State is record
X : Natural;
Y : Natural;
Weight : Natural;
end record;
Null_Touch_State : constant TP_Touch_State := (0, 0, 0);
type Swap_State is new UInt3;
Invert_X : constant Swap_State;
Invert_Y : constant Swap_State;
Swap_XY : constant Swap_State;
subtype Touch_Identifier is Natural range 0 .. 10;
type TP_State is array (Touch_Identifier range <>) of TP_Touch_State;
type Touch_Panel_Device is limited interface;
type Any_Touch_Panel is access all Touch_Panel_Device'Class;
procedure Set_Bounds (This : in out Touch_Panel_Device;
Width : Natural;
Height : Natural;
Swap : Swap_State) is abstract;
-- Set screen bounds. Touch_State must should stay within screen bounds
function Active_Touch_Points (This : in out Touch_Panel_Device)
return Touch_Identifier is abstract;
-- Retrieve the number of active touch points
function Get_Touch_Point (This : in out Touch_Panel_Device;
Touch_Id : Touch_Identifier)
return TP_Touch_State is abstract;
-- Retrieves the position and pressure information of the specified
-- touch
function Get_All_Touch_Points
(This : in out Touch_Panel_Device)
return TP_State is abstract;
-- Retrieves the position and pressure information of every active touch
-- points
private
Invert_X : constant Swap_State := 2#001#;
Invert_Y : constant Swap_State := 2#010#;
Swap_XY : constant Swap_State := 2#100#;
end HAL.Touch_Panel;
|
-- Copyright 2012-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
Full : Full_Table := (False, True, False, True, False);
begin
Do_Nothing (Full'Address); -- STOP
end Foo;
|
------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
-- --
-- A S I S . E X T E N S I O N S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1995-2012, Free Software Foundation, Inc. --
-- --
-- ASIS-for-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 --
-- Software Foundation; either version 2, or (at your option) any later --
-- version. ASIS-for-GNAT is distributed in the hope that it will be use- --
-- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- --
-- CHANTABILITY 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 ASIS-for-GNAT; see file --
-- COPYING. If not, write to the Free Software Foundation, 51 Franklin --
-- Street, Fifth Floor, Boston, MA 02110-1301, USA. --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the --
-- Software Engineering Laboratory of the Swiss Federal Institute of --
-- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the --
-- Scientific Research Computer Center of Moscow State University (SRCC --
-- MSU), Russia, with funding partially provided by grants from the Swiss --
-- National Science Foundation and the Swiss Academy of Engineering --
-- Sciences. ASIS-for-GNAT is now maintained by AdaCore --
-- (http://www.adacore.com). --
-- --
------------------------------------------------------------------------------
with Ada.Characters.Handling; use Ada.Characters.Handling;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
with Asis.Compilation_Units; use Asis.Compilation_Units;
with Asis.Declarations; use Asis.Declarations;
with Asis.Definitions; use Asis.Definitions;
with Asis.Errors; use Asis.Errors;
with Asis.Exceptions; use Asis.Exceptions;
with Asis.Expressions; use Asis.Expressions;
with Asis.Statements; use Asis.Statements;
with Asis.Set_Get; use Asis.Set_Get;
with A4G.A_Debug; use A4G.A_Debug;
with A4G.A_Opt; use A4G.A_Opt;
with A4G.A_Sem; use A4G.A_Sem;
with A4G.A_Sinput; use A4G.A_Sinput;
with A4G.Contt; use A4G.Contt;
with A4G.Contt.TT; use A4G.Contt.TT;
with A4G.Contt.UT; use A4G.Contt.UT;
with A4G.DDA_Aux; use A4G.DDA_Aux;
with A4G.Decl_Sem; use A4G.Decl_Sem;
with A4G.Asis_Tables; use A4G.Asis_Tables;
with A4G.Expr_Sem; use A4G.Expr_Sem;
with A4G.GNAT_Int; use A4G.GNAT_Int;
with A4G.Mapping; use A4G.Mapping;
with A4G.Queries; use A4G.Queries;
with A4G.Vcheck; use A4G.Vcheck;
with Atree; use Atree;
with Einfo; use Einfo;
with Elists; use Elists;
with Namet; use Namet;
with Nlists; use Nlists;
with Output; use Output;
with Sinfo; use Sinfo;
with Sinput; use Sinput;
with Snames; use Snames;
with Stand; use Stand;
with Stringt; use Stringt;
with Uintp; use Uintp;
with Urealp; use Urealp;
package body Asis.Extensions is
Package_Name : constant String := "Asis.Extensions.";
-----------------------
-- Local subprograms --
-----------------------
function Is_Typeless_Subaggregate (Aggr : Node_Id) return Boolean;
-- Checks if Aggr represents an inner typeless subaggregate of
-- multi-dimensional array aggregate. A caller is responsible for providing
-- only nodes that represents components of array aggregates as actuals.
function Is_Expanded_Subprogram (N : Node_Id) return Boolean;
-- Checks if N corresponds to the spec of an expanded generic
-- subprogram. Is needed because Comes_From_Source in this case is
-- set OFF (opposite to expanded packages)
function Is_Type_Operator
(Op_Decl : Asis.Element;
Type_Decl : Asis.Element)
return Boolean;
-- Checks if Op_Decl declares an operator function having a parameter
-- or a result of the type Type_Decl (Type_Decl is supposed to be a type
-- declaration name). Returns False for a function body if the body has
-- the separate spec
function Overrides_Type_Operator
(Op_Decl : Asis.Element;
Type_Decl : Asis.Element)
return Boolean;
-- Provided that Is_Type_Operator (Op_Decl, Type_Decl) is True (note,
-- that this function does not check this, it should be checked by the
-- caller), checks if Op_Decl overrides a predefined or inherited
-- operator function that exists for Type_Decl
function Is_From_Import_Procedure_Pragma (N : Node_Id) return Boolean;
-- Checks a specific situation for an identifier specific to a pragma for
-- GNAT-specific pragmas Import_Procedure and Import_Valued_Procedure -
-- for components of MECHANISM_NAME having the form of A (B).
function Get_LF_From_Ureal (U : Ureal) return Long_Long_Float;
-- Converts universal real into Long_Float. This is a quick-and-dirty
-- solution for extending Static_Expression_Value_Image for real image,
-- it may blow up in case if numerator or denominator is too big. The
-- conversion does some arbitrary rounding (I believe this rounding is
-- reasonable, but I have no proof of this)
pragma Unreferenced (Get_LF_From_Ureal);
function Get_Implemented_Op
(Op_Decl : Asis.Element;
Type_Def : Asis.Element)
return Asis.Element;
pragma Unreferenced (Get_Implemented_Op);
-- Op_Decl is supposed to be a declaration of a dispatching operation for
-- that Is_Overriding_Operation is true. Type_Def is supposed to be an
-- interface type definition for some interface type that is included in
-- the interface list of the definition of the type that is the type
-- of dispatching operand(s) of Op_Decl. This function checks if Op_Decl
-- may implement some operation of this interface, and if it may returns
-- the declaration of this interface operation as a result, otherwise it
-- returns Nil_Element.
function Is_Procedure (Decl : Asis.Element) return Boolean;
pragma Unreferenced (Is_Procedure);
-- Checks that Decl declares a procedure
------------------
-- Acts_As_Spec --
------------------
function Acts_As_Spec (Declaration : Asis.Element) return Boolean is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration);
Arg_Node : Node_Id;
Name_Node : Node_Id;
Spec_Node : Node_Id;
Arg_Ekind : Entity_Kind;
Result : Boolean := False;
begin
Check_Validity (Declaration, Package_Name & "Acts_As_Spec");
Arg_Node := Node (Declaration);
case Arg_Kind is
when A_Procedure_Body_Declaration |
A_Function_Body_Declaration =>
Result := Acts_As_Spec (Arg_Node);
-- The problem here is that for some subprogram bodies the
-- front-end creates artificial specs and sets OFF the
-- Acts_As_Spec flag for the body. At the moment we have detected
-- two such situations (and we exclude the case of expanded
-- subprogram body not to mix up with the similar situation in
-- the tree, see :
if not Result
and then
Special_Case (Declaration) /= Expanded_Subprogram_Instantiation
then
-- (1) Bodies declared immediately within protected bodies
if Nkind (Parent (Arg_Node)) = N_Protected_Body then
Spec_Node := Corresponding_Spec (Arg_Node);
if Is_Artificial_Protected_Op_Item_Spec (Spec_Node) then
Result := True;
end if;
else
-- (2) child subprogram bodies with no separate spec
Name_Node := Defining_Unit_Name (Specification (Arg_Node));
if Nkind (Name_Node) = N_Defining_Program_Unit_Name then
Arg_Node := Corresponding_Spec (Arg_Node);
if Present (Arg_Node) then
while not
(Nkind (Arg_Node) = N_Subprogram_Declaration or else
Nkind (Arg_Node) = N_Generic_Subprogram_Declaration)
loop
Arg_Node := Parent (Arg_Node);
end loop;
Result := not Comes_From_Source (Arg_Node);
end if;
end if;
end if;
end if;
when A_Procedure_Body_Stub |
A_Function_Body_Stub =>
Arg_Ekind := Ekind (Defining_Unit_Name (Specification (Arg_Node)));
Result := Arg_Ekind = E_Function
or else Arg_Ekind = E_Procedure;
when An_Expression_Function_Declaration =>
if Is_Part_Of_Inherited (Declaration) then
Result := True;
else
Result :=
Nkind (R_Node (Declaration)) = N_Subprogram_Declaration;
end if;
when others => null;
end case;
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Declaration,
Outer_Call => Package_Name & "Acts_As_Spec");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Acts_As_Spec",
Ex => Ex,
Arg_Element => Declaration);
end Acts_As_Spec;
------------------------------
-- Compilation_Dependencies --
------------------------------
function Compilation_Dependencies
(Main_Unit : Asis.Compilation_Unit)
return Asis.Compilation_Unit_List
is
Arg_Kind : constant Asis.Unit_Kinds := Kind (Main_Unit);
Arg_Unit_Id : Unit_Id;
Res_Cont_Id : Context_Id;
begin
Check_Validity (Main_Unit, Package_Name & "Compilation_Dependencies");
if Arg_Kind not in A_Procedure .. A_Protected_Body_Subunit then
Raise_ASIS_Inappropriate_Compilation_Unit
(Diagnosis => Package_Name & "Compilation_Dependencies");
end if;
Res_Cont_Id := Encl_Cont_Id (Main_Unit);
Reset_Context (Res_Cont_Id);
Arg_Unit_Id := Get_Unit_Id (Main_Unit);
declare
Result_Id_List : constant Unit_Id_List :=
GNAT_Compilation_Dependencies (Arg_Unit_Id);
Result_List : constant Compilation_Unit_List :=
Get_Comp_Unit_List (Result_Id_List, Res_Cont_Id);
begin
if Is_Nil (Result_List) then
Raise_ASIS_Inappropriate_Compilation_Unit
(Diagnosis => Package_Name & "Compilation_Dependencies");
else
return Result_List;
end if;
end;
exception
when ASIS_Inappropriate_Compilation_Unit =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Outer_Call => Package_Name & "Compilation_Dependencies");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Compilation_Dependencies",
Ex => Ex,
Arg_CU => Main_Unit);
end Compilation_Dependencies;
-------------
-- Compile --
-------------
procedure Compile
(Source_File : String_Access;
Args : Argument_List;
Success : out Boolean;
GCC : String_Access := null;
Use_GNATMAKE : Boolean := False;
Use_Temp_Prj : Boolean := False;
Compiler_Out : String := "";
All_Warnings_Off : Boolean := True;
Display_Call : Boolean := False)
is
Comp_Args : Argument_List (Args'First .. Args'Last + 12 + 1);
First_Idx : constant Integer := Comp_Args'First;
Last_Idx : Integer := First_Idx;
Obj_Name : String_Access;
Dot_Idx : Natural;
Is_GNAAMP_Call : Boolean := False;
-- In case of the call to GNAAMP we should not set '-x ada' flags
Is_GNATMAKE_Call : Boolean := Use_GNATMAKE;
begin
if Is_GNATMAKE_Call and then GCC = null then
-- We can not set gnatmake-specific parameters in this case
Is_GNATMAKE_Call := False;
end if;
if GCC /= null then
declare -- ??? What an awful code!
Name : constant String := To_Lower (Base_Name (GCC.all));
Dot_Idx : Positive := Name'Last;
begin
for J in reverse Name'Range loop
if Name (J) = '.' then
Dot_Idx := J - 1;
exit;
end if;
end loop;
if Name (Name'First .. Dot_Idx) = "gnaamp" then
Is_GNAAMP_Call := True;
end if;
end;
end if;
Comp_Args (Last_Idx) := Comp_Flag;
Last_Idx := Last_Idx + 1;
Comp_Args (Last_Idx) := GNAT_Flag_ct;
Last_Idx := Last_Idx + 1;
if Is_GNATMAKE_Call then
Comp_Args (Last_Idx) := GNATMAKE_Flag_u;
Last_Idx := Last_Idx + 1;
Comp_Args (Last_Idx) := GNATMAKE_Flag_f;
Last_Idx := Last_Idx + 1;
Comp_Args (Last_Idx) := GNATMAKE_Flag_q;
Last_Idx := Last_Idx + 1;
elsif not Is_GNAAMP_Call then
Comp_Args (Last_Idx) := GCC_Flag_X;
Last_Idx := Last_Idx + 1;
Comp_Args (Last_Idx) := GCC_Par_Ada;
Last_Idx := Last_Idx + 1;
end if;
for J in Args'Range loop
Comp_Args (Last_Idx) := Args (J);
Last_Idx := Last_Idx + 1;
end loop;
if All_Warnings_Off then
Comp_Args (Last_Idx) := GNAT_Flag_ws;
Last_Idx := Last_Idx + 1;
Comp_Args (Last_Idx) := GNAT_Flag_yN;
Last_Idx := Last_Idx + 1;
end if;
Comp_Args (Last_Idx) := Source_File;
if Is_GNATMAKE_Call
and then
not Use_Temp_Prj
then
Last_Idx := Last_Idx + 1;
Comp_Args (Last_Idx) := GNATMAKE_Flag_cargs;
Last_Idx := Last_Idx + 1;
Comp_Args (Last_Idx) := GCC_Flag_o;
Last_Idx := Last_Idx + 1;
Obj_Name := new String'(Base_Name (Source_File.all));
Dot_Idx := Obj_Name'Last;
for J in reverse Obj_Name'Range loop
if Obj_Name (J) = '.' then
Dot_Idx := J - 1;
exit;
end if;
end loop;
Comp_Args (Last_Idx) := new String'
(Get_Current_Dir &
Directory_Separator &
Obj_Name (Obj_Name'First .. Dot_Idx) &
".o");
end if;
Success :=
Execute
(GCC, Comp_Args (Args'First .. Last_Idx), Compiler_Out,
Display_Call => Display_Call);
end Compile;
----------------
-- Components --
----------------
function Components (E : Asis.Element) return Asis.Element_List is
Child_Access : constant Query_Array := Appropriate_Queries (E);
Result_Length : Integer := 0;
begin
Check_Validity (E, Package_Name & "Components");
if Is_Nil (E) then
return Nil_Element_List;
end if;
-- first, we compute the result's length:
for Each_Query in Child_Access'Range loop
case Child_Access (Each_Query).Query_Kind is
when Bug =>
null;
when Single_Element_Query =>
if not Is_Nil (Child_Access (Each_Query).Func_Simple (E)) then
Result_Length := Result_Length + 1;
end if;
when Element_List_Query =>
declare
Child_List : constant Asis.Element_List :=
Child_Access (Each_Query).Func_List (E);
begin
Result_Length := Result_Length + Child_List'Length;
end;
when Element_List_Query_With_Boolean =>
declare
Child_List : constant Asis.Element_List :=
Child_Access (Each_Query).Func_List_Boolean
(E, Child_Access (Each_Query).Bool);
begin
Result_Length := Result_Length + Child_List'Length;
end;
end case;
end loop;
-- and now, we define the result element list of Result_Length
-- length and fill it in by repeating the same loop. This is
-- not effective, and this will have to be revised.
if Result_Length = 0 then
return Nil_Element_List;
end if;
declare
Result_List : Asis.Element_List (1 .. Result_Length);
Next_Element : Integer := 1;
begin
for Each_Query in Child_Access'Range loop
case Child_Access (Each_Query).Query_Kind is
when Bug =>
null;
when Single_Element_Query =>
if not Is_Nil
(Child_Access (Each_Query).Func_Simple (E)) then
Result_List (Next_Element) :=
Child_Access (Each_Query).Func_Simple (E);
Next_Element := Next_Element + 1;
end if;
when Element_List_Query =>
declare
Child_List : constant Asis.Element_List :=
Child_Access (Each_Query).Func_List (E);
begin
for I in Child_List'First .. Child_List'Last loop
Result_List (Next_Element) := Child_List (I);
Next_Element := Next_Element + 1;
end loop;
end;
when Element_List_Query_With_Boolean =>
declare
Child_List : constant Asis.Element_List :=
Child_Access (Each_Query).Func_List_Boolean
(E, Child_Access (Each_Query).Bool);
begin
for I in Child_List'First .. Child_List'Last loop
Result_List (Next_Element) := Child_List (I);
Next_Element := Next_Element + 1;
end loop;
end;
end case;
end loop;
return Result_List;
end;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => E,
Outer_Call => Package_Name & "Components");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Components",
Ex => Ex,
Arg_Element => E);
end Components;
-----------------------------------------------
-- Corresponding_Body_Parameter_Definition --
-----------------------------------------------
function Corresponding_Body_Parameter_Definition
(Defining_Name : Asis.Defining_Name)
return Asis.Defining_Name
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Defining_Name);
Encl_Constr : Asis.Element;
Encl_Constr_Kind : Internal_Element_Kinds;
Result : Asis.Element := Nil_Element;
begin
Check_Validity
(Defining_Name,
Package_Name & "Corresponding_Body_Parameter_Definition");
if Arg_Kind /= A_Defining_Identifier then
Raise_ASIS_Inappropriate_Element
(Package_Name & "Corresponding_Body_Parameter_Definition",
Wrong_Kind => Arg_Kind);
end if;
Encl_Constr := Enclosing_Element (Defining_Name);
if Declaration_Kind (Encl_Constr) not in A_Formal_Declaration then
Encl_Constr := (Enclosing_Element (Encl_Constr));
end if;
Encl_Constr_Kind := Int_Kind (Encl_Constr);
case Encl_Constr_Kind is
when A_Procedure_Body_Declaration |
A_Function_Body_Declaration =>
Result := Defining_Name;
when A_Procedure_Body_Stub |
A_Function_Body_Stub =>
Encl_Constr := Corresponding_Subunit (Encl_Constr);
when A_Procedure_Declaration |
A_Function_Declaration |
A_Generic_Function_Declaration |
A_Generic_Procedure_Declaration =>
Encl_Constr := Corresponding_Body (Encl_Constr);
Encl_Constr_Kind := Int_Kind (Encl_Constr);
if Encl_Constr_Kind = A_Procedure_Body_Stub or else
Encl_Constr_Kind = A_Function_Body_Stub
then
Encl_Constr := Corresponding_Subunit (Encl_Constr);
elsif Encl_Constr_Kind = An_Import_Pragma then
Encl_Constr := Nil_Element;
end if;
when others =>
-- For all the other situations we can not return a parameter
-- definition in the body
Encl_Constr := Nil_Element;
end case;
if not Is_Nil (Result)
or else
Is_Nil (Encl_Constr)
or else
Declaration_Kind (Encl_Constr) = Not_A_Declaration
then
return Result;
end if;
Process_Parameter_Specifications : declare
Def_Name_Image : constant String
:= To_Lower (To_String (Defining_Name_Image (Defining_Name)));
Param_Specs : constant Asis.Element_List
:= Parameter_Profile (Encl_Constr);
begin
Through_Parameter_Specs : for I in Param_Specs'Range loop
Process_Parameter_Names : declare
Par_Names : constant Asis.Element_List :=
Names (Param_Specs (I));
begin
Through_Parameter_Names : for J in Par_Names'Range loop
if Def_Name_Image =
To_Lower (To_String (Defining_Name_Image
(Par_Names (J))))
then
Result := Par_Names (J);
exit Through_Parameter_Specs;
end if;
end loop Through_Parameter_Names;
end Process_Parameter_Names;
end loop Through_Parameter_Specs;
end Process_Parameter_Specifications;
pragma Assert (not Is_Nil (Result));
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Defining_Name,
Outer_Call => Package_Name &
"Corresponding_Body_Parameter_Definition");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name &
"Corresponding_Body_Parameter_Definition",
Ex => Ex,
Arg_Element => Defining_Name);
end Corresponding_Body_Parameter_Definition;
-----------------------------------------
-- Corresponding_Called_Entity_Unwound --
-----------------------------------------
function Corresponding_Called_Entity_Unwound
(Statement : Asis.Statement)
return Asis.Declaration
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Statement);
Arg_Node : Node_Id;
Arg_Node_Kind : Node_Kind;
Result_Node : Node_Id;
Result_Unit : Compilation_Unit;
Res_Spec_Case : Special_Cases := Not_A_Special_Case;
begin
Check_Validity
(Statement, Package_Name & "Corresponding_Called_Entity_Unwound");
if not (Arg_Kind = An_Entry_Call_Statement or else
Arg_Kind = A_Procedure_Call_Statement)
then
Raise_ASIS_Inappropriate_Element
(Package_Name & "Corresponding_Called_Entity_Unwound",
Wrong_Kind => Arg_Kind);
end if;
-- the implementation approach is similar to the approach taken for
-- Asis.Expressions.Corresponding_Called_Function
Arg_Node := R_Node (Statement);
-- To be on the safe side, we use R_Node instead of Node, but it looks
-- like in this case R_Node and Node should be the same
Arg_Node_Kind := Nkind (Arg_Node);
case Arg_Node_Kind is
when N_Attribute_Reference =>
return Nil_Element;
-- call to a procedure-attribute
when N_Entry_Call_Statement | N_Procedure_Call_Statement =>
-- here we have to filter out the case when Nil_Element
-- should be returned for a call through access-to-function:
if Nkind (Sinfo.Name (Arg_Node)) = N_Explicit_Dereference then
return Nil_Element;
end if;
-- ??? <tree problem 4>
-- this fragment should be revised when the problem is fixed (as it should)
if Arg_Node_Kind = N_Entry_Call_Statement then
Result_Node := Sinfo.Name (Arg_Node);
-- Result_Node points to the name of the called entry
if Nkind (Result_Node) = N_Indexed_Component then
-- this is the case for a call to an entry from an
-- entry family
Result_Node := Prefix (Result_Node);
end if;
Result_Node := Entity (Selector_Name (Result_Node));
else
Result_Node := Entity (Sinfo.Name (Arg_Node));
-- only this assignment is needed if tree problem 4 is
-- fixed
end if;
-- ??? <tree problem 4> - end
when others =>
pragma Assert (False);
null;
end case;
Result_Node := Unwind_Renaming (Result_Node);
if No (Result_Node) then
-- renaming of a procedure-attribute
return Nil_Element;
end if;
if not Comes_From_Source (Result_Node) then
return Nil_Element;
end if;
Result_Unit := Enclosing_Unit (Encl_Cont_Id (Statement), Result_Node);
-- if not Is_Consistent (Result_Unit, Encl_Unit (Statement)) then
-- return Nil_Element;
-- end if;
-- And now - from a defining name to a declaration itself
Result_Node := Parent (Result_Node);
if Nkind (Result_Node) in
N_Function_Specification .. N_Procedure_Specification
then
Result_Node := Parent (Result_Node);
end if;
if Is_Expanded_Subprogram (Result_Node) then
Res_Spec_Case := Expanded_Subprogram_Instantiation;
end if;
return Node_To_Element_New
(Node => Result_Node,
Spec_Case => Res_Spec_Case,
In_Unit => Result_Unit);
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Statement,
Outer_Call => Package_Name &
"Corresponding_Called_Entity_Unwound");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name &
"Corresponding_Called_Entity_Unwound",
Ex => Ex,
Arg_Element => Statement);
end Corresponding_Called_Entity_Unwound;
-------------------------------------------
-- Corresponding_Called_Function_Unwound --
-------------------------------------------
function Corresponding_Called_Function_Unwound
(Expression : Asis.Expression)
return Asis.Declaration
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Expression);
Arg_Node : Node_Id;
Arg_Node_Kind : Node_Kind;
Result_Node : Node_Id;
Result_Unit : Compilation_Unit;
Res_Spec_Case : Special_Cases := Not_A_Special_Case;
begin
Check_Validity
(Expression, Package_Name & "Corresponding_Called_Function_Unwound");
if not (Arg_Kind = A_Function_Call) then
Raise_ASIS_Inappropriate_Element
(Package_Name & "Corresponding_Called_Function_Unwound",
Wrong_Kind => Arg_Kind);
end if;
-- first, we have to filter out the cases when a Nil_Element
-- should be returned. For now, these cases include:
--
-- - calls to functions-attributes;
-- - all forms of calls to predefined operators;
-- - all forms of calls to inherited functions
--
-- We hope to implement the last case in future...
-- First, we try the simplest approach, and then we will add patches
-- if needed:
Arg_Node := R_Node (Expression);
Arg_Node_Kind := Nkind (Arg_Node);
-- Rewritten node should know everything. But if this node is the
-- result of compile-time optimization, we have to work with
-- original node only:
if Arg_Node_Kind = N_String_Literal or else
Arg_Node_Kind = N_Integer_Literal or else
Arg_Node_Kind = N_Real_Literal or else
Arg_Node_Kind = N_Character_Literal or else
Arg_Node_Kind = N_Raise_Constraint_Error or else
Arg_Node_Kind = N_Identifier
then
Arg_Node := Node (Expression);
Arg_Node_Kind := Nkind (Arg_Node);
elsif Arg_Node_Kind = N_Explicit_Dereference then
-- See F727-023
Arg_Node := Sinfo.Prefix (Arg_Node);
Arg_Node_Kind := Nkind (Arg_Node);
end if;
case Arg_Node_Kind is
when N_Attribute_Reference =>
return Nil_Element;
when N_Function_Call |
N_Procedure_Call_Statement =>
-- The second choice here corresponds to a procedure that is an
-- argument of Debug pragma
-- here we have to filter out the case when Nil_Element
-- should be returned for a call through access-to-function:
if Nkind (Sinfo.Name (Arg_Node)) = N_Explicit_Dereference then
return Nil_Element;
else
Result_Node := Entity (Sinfo.Name (Arg_Node));
end if;
when N_Op =>
-- all the predefined operations (??)
Result_Node := Entity (Arg_Node);
when others =>
pragma Assert (False);
null;
end case;
-- here we have Result_Node pointed to the defining occurrence of
-- the corresponding called function. Three things should be done:
-- 1. If Result_Node is defined in a renaming definition, we have
-- to unwind all the renamings till the defining occurrence of
-- the corresponding callable entity will be reached;
-- 2. If a given callable entity is implicitly defined, Nil_Element
-- should be returned;
-- 3. We have to come from a defining name to the corresponding
-- declaration and then we should return the Element
-- corresponding to this declaration
Result_Node := Unwind_Renaming (Result_Node);
if No (Result_Node) then
-- renaming of a function-attribute
return Nil_Element;
end if;
-- here we have Result_Node pointing to the defining occurrence of the
-- name of the corresponding called function. First, we have to
-- filter out implicitly declared functions:
if not Comes_From_Source (Result_Node) then
return Nil_Element;
end if;
Result_Unit := Enclosing_Unit (Encl_Cont_Id (Expression), Result_Node);
Result_Node := Parent (Result_Node);
if Nkind (Result_Node) = N_Defining_Program_Unit_Name then
Result_Node := Parent (Result_Node);
end if;
Result_Node := Parent (Result_Node);
-- to go from a defining name to a declaration itself
if Is_Expanded_Subprogram (Result_Node) then
Res_Spec_Case := Expanded_Subprogram_Instantiation;
end if;
return Node_To_Element_New
(Node => Result_Node,
Spec_Case => Res_Spec_Case,
In_Unit => Result_Unit);
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Expression,
Outer_Call => Package_Name &
"Corresponding_Called_Function_Unwound");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name &
"Corresponding_Called_Function_Unwound",
Ex => Ex,
Arg_Element => Expression);
end Corresponding_Called_Function_Unwound;
------------------------------------
-- Corresponding_First_Definition --
------------------------------------
function Corresponding_First_Definition
(Defining_Name : Asis.Defining_Name)
return Asis.Defining_Name
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Defining_Name);
Is_Parameter : Boolean := False;
Encl_Constr : Asis.Element;
Encl_Constr_Kind : Internal_Element_Kinds;
First_Declaration : Asis.Element;
Result : Asis.Element := Nil_Element;
begin
Check_Validity
(Defining_Name, Package_Name & "Corresponding_First_Definition");
if Arg_Kind not in Internal_Defining_Name_Kinds then
Raise_ASIS_Inappropriate_Element
(Package_Name & "Corresponding_First_Definition",
Wrong_Kind => Arg_Kind);
end if;
Encl_Constr := Enclosing_Element (Defining_Name);
if Int_Kind (Encl_Constr) = A_Parameter_Specification then
Encl_Constr := Enclosing_Element (Encl_Constr);
Is_Parameter := True;
end if;
if Is_Subunit (Encl_Constr) then
Encl_Constr := Corresponding_Body_Stub (Encl_Constr);
end if;
Encl_Constr_Kind := Int_Kind (Encl_Constr);
case Encl_Constr_Kind is
when A_Procedure_Body_Declaration |
A_Function_Body_Declaration |
A_Function_Renaming_Declaration |
A_Procedure_Renaming_Declaration |
A_Procedure_Body_Stub |
A_Function_Body_Stub =>
if ((Encl_Constr_Kind = A_Procedure_Body_Declaration or else
Encl_Constr_Kind = A_Function_Body_Declaration or else
Encl_Constr_Kind = A_Procedure_Body_Stub or else
Encl_Constr_Kind = A_Function_Body_Stub)
and then (not (Acts_As_Spec (Encl_Constr))))
or else
((Encl_Constr_Kind = A_Function_Renaming_Declaration or else
Encl_Constr_Kind = A_Procedure_Renaming_Declaration)
and then Is_Renaming_As_Body (Encl_Constr))
then
-- there should be a corresponding spec where the first
-- definition should be:
if Is_Subunit (Encl_Constr) then
Encl_Constr := Corresponding_Body_Stub (Encl_Constr);
end if;
First_Declaration := Corresponding_Declaration (Encl_Constr);
if not Is_Parameter then
-- just returning a defining name from a declaration,
-- otherwise Result will remain nil, and we will have
-- to process the case of a formal parameter after this
-- case statement
Result := Names (First_Declaration) (1);
end if;
else
Result := Defining_Name;
end if;
when A_Package_Body_Declaration |
A_Task_Body_Declaration |
A_Protected_Body_Declaration |
A_Package_Body_Stub |
A_Task_Body_Stub |
A_Protected_Body_Stub |
An_Entry_Body_Declaration =>
First_Declaration := Corresponding_Declaration (Encl_Constr);
if not Is_Parameter then
Result := Names (First_Declaration) (1);
end if;
when An_Accept_Statement =>
First_Declaration := Corresponding_Entry (Encl_Constr);
when An_Ordinary_Type_Declaration =>
Result := Corresponding_Type_Declaration (Encl_Constr);
if Is_Nil (Result) then
-- Encl_Constr is not a completion of an incomplete or
-- private type declaration
Result := Defining_Name;
else
Result := Names (Result) (1);
end if;
when others =>
Result := Defining_Name;
end case;
if Is_Nil (Result) then
-- here we have to compute the first definition of the formal
-- parameter in a subprogram spec/entry declaration
Process_Parameter_Specifications : declare
Def_Name_Image : constant String
:= To_Lower (To_String (Defining_Name_Image (Defining_Name)));
Param_Specs : constant Asis.Element_List
:= Parameter_Profile (First_Declaration);
begin
Through_Parameter_Specs : for I in Param_Specs'Range loop
Process_Parameter_Names : declare
Par_Names : constant Asis.Element_List :=
Names (Param_Specs (I));
begin
Through_Parameter_Names : for J in Par_Names'Range loop
if Def_Name_Image =
To_Lower (To_String (Defining_Name_Image
(Par_Names (J))))
then
Result := Par_Names (J);
exit Through_Parameter_Specs;
end if;
end loop Through_Parameter_Names;
end Process_Parameter_Names;
end loop Through_Parameter_Specs;
end Process_Parameter_Specifications;
end if;
pragma Assert (not Is_Nil (Result));
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Defining_Name,
Outer_Call => Package_Name & "Corresponding_First_Definition");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Corresponding_First_Definition",
Ex => Ex,
Arg_Element => Defining_Name);
end Corresponding_First_Definition;
----------------------------------------
-- Corresponding_Overridden_Operation --
----------------------------------------
function Corresponding_Overridden_Operation
(Declaration : Asis.Declaration)
return Asis.Declaration
is
Result : Asis.Element := Nil_Element;
Result_Unit : Compilation_Unit;
Result_Node : Node_Id;
Inherited : Boolean := False;
Association_Type : Node_Id;
begin
Check_Validity (Declaration,
Package_Name & "Corresponding_Overridden_Operation");
case Declaration_Kind (Declaration) is
when A_Procedure_Declaration |
A_Function_Declaration |
A_Procedure_Instantiation |
A_Function_Instantiation |
A_Procedure_Body_Declaration |
A_Null_Procedure_Declaration |
A_Function_Body_Declaration |
A_Procedure_Renaming_Declaration |
A_Function_Renaming_Declaration =>
null;
when others =>
Raise_ASIS_Inappropriate_Element
(Diagnosis => Package_Name &
"Corresponding_Overridden_Operation",
Wrong_Kind => Int_Kind (Declaration));
end case;
if Is_Overriding_Operation (Declaration) then
if Declaration_Kind (Declaration) in
A_Procedure_Instantiation .. A_Function_Instantiation
then
Result_Node := Specification (Instance_Spec (Node (Declaration)));
Result_Node :=
Related_Instance (Defining_Unit_Name (Result_Node));
else
Result_Node :=
Defining_Unit_Name (Specification (Node (Declaration)));
end if;
Result_Node := Overridden_Operation (Result_Node);
Inherited := not Comes_From_Source (Result_Node);
if Inherited then
Association_Type := Result_Node;
Result_Node := Explicit_Parent_Subprogram (Result_Node);
Result_Unit :=
Enclosing_Unit (Encl_Cont_Id (Declaration), Association_Type);
Result := Node_To_Element_New (Node => Result_Node,
Node_Field_1 => Association_Type,
Inherited => True,
In_Unit => Result_Unit);
if Is_From_Instance (Association_Type) then
Set_From_Instance (Result, True);
else
Set_From_Instance (Result, False);
end if;
else
Result_Unit :=
Enclosing_Unit (Encl_Cont_Id (Declaration), Result_Node);
Result := Node_To_Element_New (Node => Result_Node,
In_Unit => Result_Unit);
end if;
Result := Enclosing_Element (Result);
if Special_Case (Result) = Expanded_Subprogram_Instantiation then
Result := Enclosing_Element (Result);
end if;
end if;
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Declaration,
Outer_Call => Package_Name &
"Corresponding_Overridden_Operation");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name &
"Corresponding_Overridden_Operation",
Ex => Ex,
Arg_Element => Declaration);
end Corresponding_Overridden_Operation;
-----------------------------------------
-- Corresponding_Overridden_Operations --
-----------------------------------------
-- UNDER CONSTRUCTION!!!
pragma Warnings (Off);
function Corresponding_Overridden_Operations
(Declaration : Asis.Declaration)
return Asis.Element_List
is
Type_Def : Asis.Element;
Tmp_El : Asis.Element;
Result : Asis.Element := Nil_Element;
Arg_Node : Entity_Id;
Prim_Elmt : Elmt_Id;
Prim_Node : Entity_Id;
Res_Node : Node_Id;
begin
Check_Validity (Declaration,
Package_Name & "Corresponding_Overridden_Operations");
case Declaration_Kind (Declaration) is
when A_Procedure_Declaration |
A_Function_Declaration |
A_Procedure_Instantiation |
A_Function_Instantiation |
A_Procedure_Body_Declaration |
A_Function_Body_Declaration |
A_Null_Procedure_Declaration |
A_Procedure_Renaming_Declaration |
A_Function_Renaming_Declaration =>
null;
when others =>
Raise_ASIS_Inappropriate_Element
(Diagnosis => Package_Name &
"Corresponding_Overridden_Operations",
Wrong_Kind => Int_Kind (Declaration));
end case;
if not Is_Overriding_Operation (Declaration) then
return Nil_Element_List;
end if;
-- Simple case: single inheritance:
Type_Def := Primitive_Owner (Declaration);
if Is_Nil (Definition_Interface_List (Type_Def)) then
return (1 => Corresponding_Overridden_Operation (Declaration));
end if;
-- General case - multiple inheritance
Asis_Element_Table.Init;
Tmp_El := First_Name (Declaration);
Arg_Node := R_Node (Tmp_El);
Tmp_El := First_Name (Enclosing_Element (Type_Def));
Prim_Elmt := First_Elmt (Primitive_Operations (R_Node (Tmp_El)));
Prim_Node := Node (Prim_Elmt);
while Present (Prim_Elmt) loop
-- Check if Prim_Node corresponds to overridden primitive:
if Present (Interface_Alias (Prim_Node))
and then
Alias (Prim_Node) = Arg_Node
then
Res_Node := Interface_Alias (Prim_Node);
-- ???
-- !!! Here we have to form the element representing overridden
-- subprogram and to add it to Asis_Element_Table
end if;
Prim_Elmt := Next_Elmt (Prim_Elmt);
Prim_Node := Node (Prim_Elmt);
end loop;
-- ???
Asis_Element_Table.Append
(Corresponding_Overridden_Operation (Declaration));
return Asis.Declaration_List
(Asis_Element_Table.Table (1 .. Asis_Element_Table.Last));
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Declaration,
Outer_Call => Package_Name &
"Corresponding_Overridden_Operations");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name &
"Corresponding_Overridden_Operations",
Ex => Ex,
Arg_Element => Declaration);
end Corresponding_Overridden_Operations;
pragma Warnings (On);
-- function Corresponding_Overridden_Operations
-- (Declaration : Asis.Declaration)
-- return Asis.Element_List
-- is
-- Type_Def : Asis.Element;
-- Result : Asis.Element := Nil_Element;
-- begin
-- Check_Validity (Declaration,
-- Package_Name & "Corresponding_Overridden_Operations");
-- case Declaration_Kind (Declaration) is
-- when A_Procedure_Declaration |
-- A_Function_Declaration |
-- A_Procedure_Instantiation |
-- A_Function_Instantiation |
-- A_Procedure_Body_Declaration |
-- A_Function_Body_Declaration |
-- A_Procedure_Renaming_Declaration |
-- A_Function_Renaming_Declaration =>
-- null;
-- when others =>
-- Raise_ASIS_Inappropriate_Element
-- (Diagnosis => Package_Name &
-- "Corresponding_Overridden_Operations");
-- end case;
-- if not Is_Overriding_Operation (Declaration) then
-- return Nil_Element_List;
-- end if;
-- -- Simple case: single inheritance:
-- Type_Def := Primitive_Owner (Declaration);
-- if Is_Nil (Definition_Interface_List (Type_Def)) then
-- return (1 => Corresponding_Overridden_Operation (Declaration));
-- end if;
-- -- General case - multiple inheritance
-- declare
-- Interfaces : Asis.Element_List :=
-- Definition_Interface_List (Type_Def);
-- Start_From : Positive := Interfaces'First;
-- begin
-- Asis_Element_Table.Init;
-- Result := Corresponding_Overridden_Operation (Declaration);
-- Asis_Element_Table.Append (Result);
-- Type_Def := Primitive_Owner (Declaration);
-- -- First, replace each interface name in Interfaces with the
-- -- corresponding type definition and check if we may start further
-- -- processing not from the first interface in the list
-- for J in Interfaces'Range loop
-- Interfaces (J) :=
-- Type_Declaration_View
-- (Corresponding_Name_Definition
-- (Normalize_Reference (Interfaces (J))));
-- if Is_Equal (Interfaces (J), Type_Def) then
-- Start_From := J + 1;
-- end if;
-- end loop;
-- for J in Start_From .. Interfaces'Last loop
-- Result := Get_Implemented_Op (Declaration, Interfaces (J));
-- if not Is_Nil (Result) then
-- Asis_Element_Table.Append (Result);
-- end if;
-- end loop;
-- return Asis.Declaration_List
-- (Asis_Element_Table.Table (1 .. Asis_Element_Table.Last));
-- end;
-- exception
-- when ASIS_Inappropriate_Element =>
-- raise;
-- when ASIS_Failed =>
-- if Status_Indicator = Unhandled_Exception_Error then
-- Add_Call_Information
-- (Argument => Declaration,
-- Outer_Call => Package_Name &
-- "Corresponding_Overridden_Operations");
-- end if;
-- raise;
-- when Ex : others =>
-- Report_ASIS_Bug
-- (Query_Name => Package_Name &
-- "Corresponding_Overridden_Operations",
-- Ex => Ex,
-- Arg_Element => Declaration);
-- end Corresponding_Overridden_Operations;
----------------------------------------------
-- Corresponding_Parent_Subtype_Unwind_Base --
----------------------------------------------
function Corresponding_Parent_Subtype_Unwind_Base
(Type_Definition : Asis.Type_Definition)
return Asis.Declaration
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Type_Definition);
Arg_Elem : Asis.Element := Type_Definition;
Result : Asis.Element := Nil_Element;
begin
Check_Validity (Type_Definition,
Package_Name &
"Corresponding_Parent_Subtype_Unwind_Base");
if not (Arg_Kind = A_Derived_Type_Definition or else
Arg_Kind = A_Derived_Record_Extension_Definition)
then
Raise_ASIS_Inappropriate_Element
(Diagnosis => Package_Name &
"Corresponding_Parent_Subtype_Unwind_Base",
Wrong_Kind => Arg_Kind);
end if;
Result := Corresponding_Parent_Subtype (Arg_Elem);
if Is_Nil (Result) then
-- The only possible case for this - we have a 'Base attribute
-- reference as a parent subtype mark
Arg_Elem := Parent_Subtype_Indication (Arg_Elem);
Arg_Elem := Asis.Definitions.Subtype_Mark (Arg_Elem);
while Attribute_Kind (Arg_Elem) = A_Base_Attribute loop
Arg_Elem := Prefix (Arg_Elem);
end loop;
if Expression_Kind (Arg_Elem) = A_Selected_Component then
Arg_Elem := Selector (Arg_Elem);
end if;
Arg_Elem := Corresponding_Name_Declaration (Arg_Elem);
if Declaration_Kind (Result) = A_Subtype_Declaration then
Result := Corresponding_First_Subtype (Arg_Elem);
else
Result := Arg_Elem;
end if;
end if;
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Type_Definition,
Outer_Call => Package_Name &
"Corresponding_Parent_Subtype_Unwind_Base");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name &
"Corresponding_Parent_Subtype_Unwind_Base",
Ex => Ex,
Arg_Element => Type_Definition);
end Corresponding_Parent_Subtype_Unwind_Base;
----------------------
-- CU_Requires_Body --
----------------------
function CU_Requires_Body (Right : Asis.Compilation_Unit) return Boolean is
Unit_Kind : constant Asis.Unit_Kinds := Kind (Right);
Result : Boolean := False;
begin
Check_Validity (Right, Package_Name & "CU_Requires_Body");
Reset_Context (Encl_Cont_Id (Right));
case Unit_Kind is
when A_Generic_Procedure |
A_Generic_Function |
A_Procedure |
A_Function |
A_Package |
A_Generic_Package =>
Result := Asis.Set_Get.Is_Body_Required (Right);
when others =>
null;
end case;
return Result;
end CU_Requires_Body;
---------------------------
-- Elements_Hash_Wrapper --
---------------------------
function Elements_Hash_Wrapper
(E : Asis.Element)
return Ada.Containers.Hash_Type
is
use Ada.Containers;
Asis_Hash : constant Asis.ASIS_Integer := abs Asis.Elements.Hash (E);
Result : Ada.Containers.Hash_Type;
begin
Result := Ada.Containers.Hash_Type (Asis_Hash);
return Result;
exception
when Constraint_Error =>
return 0;
end Elements_Hash_Wrapper;
-------------------------------
-- Element_Image_In_Template --
-------------------------------
function Element_Image_In_Template
(Element : Asis.Element)
return Program_Text
is
Tmp_Element : Asis.Element := Element;
begin
Check_Validity (Element, Package_Name & "Element_Image_In_Template");
if Is_Part_Of_Implicit (Element) or else
not Is_Part_Of_Instance (Element)
then
return "";
else
-- What we are doing is tricky, but it gives the fast and
-- easy-to-maintain solution: we consider the argument as if it is
-- NOT from the expanded template, and we use the normal ASIS
-- Element_Span function for it. The idea is to use Sloc fields
-- from the element node which point to the corresponding positions
-- in the template.
Set_From_Instance (Tmp_Element, False);
return Element_Image (Tmp_Element);
end if;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Element,
Outer_Call => Package_Name & "Element_Image_In_Template");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Element_Image_In_Template",
Ex => Ex,
Arg_Element => Element);
end Element_Image_In_Template;
------------------------------
-- Element_Span_In_Template --
------------------------------
function Element_Span_In_Template
(Element : Asis.Element)
return Asis.Text.Span
is
Tmp_Element : Asis.Element := Element;
begin
Check_Validity (Element, Package_Name & "Element_Span_In_Template");
if Is_Part_Of_Implicit (Element) or else
not Is_Part_Of_Instance (Element)
then
return Nil_Span;
else
-- What we are doing is tricky, but it gives the fast and
-- easy-to-maintain solution: we consider the argument as if it is
-- NOT from the expanded template, and we use the normal ASIS
-- Element_Span function for it. The idea is to use Sloc fields
-- from the element node which point to the corresponding positions
-- in the template.
Set_From_Instance (Tmp_Element, False);
return Element_Span (Tmp_Element);
end if;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Element,
Outer_Call => Package_Name & "Element_Span_In_Template");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Element_Span_In_Template",
Ex => Ex,
Arg_Element => Element);
end Element_Span_In_Template;
-----------------------------
-- Explicit_Type_Operators --
-----------------------------
function Explicit_Type_Operators
(Type_Definition : Asis.Type_Definition)
return Asis.Declaration_List
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Type_Definition);
Parent_El : Asis.Element;
-- The construct where the argument type is defined
Type_Decl : Asis.Element;
-- Declaration of the argument type
In_Package_Spec : Boolean;
-- If the argument type is declared not in a package spec, but it is
-- a derived type, we have to count all the explicit overridings of
-- inherited operators, but if we are in the package spec, we just
-- collect all the explicitly declared type operators
Is_Formal_Type : Boolean;
begin
Check_Validity (Type_Definition,
Package_Name & "Explicit_Type_Operators");
if not (Arg_Kind in Internal_Type_Kinds or else
Arg_Kind in Internal_Formal_Type_Kinds or else
Arg_Kind in A_Private_Type_Definition ..
A_Protected_Definition)
then
Raise_ASIS_Inappropriate_Element
(Diagnosis => Package_Name & "Explicit_Type_Operators",
Wrong_Kind => Arg_Kind);
end if;
Type_Decl := Enclosing_Element (Type_Definition);
Parent_El := Enclosing_Element (Type_Decl);
Is_Formal_Type := Arg_Kind in Internal_Formal_Type_Kinds;
In_Package_Spec :=
Declaration_Kind (Parent_El) = A_Package_Declaration or else
(not Is_Formal_Type and then
Declaration_Kind (Parent_El) = A_Formal_Package_Declaration);
declare
All_Comp : constant Asis.Element_List := Components (Parent_El);
Start_From : Natural;
Result : Asis.Element_List (All_Comp'Range);
Res_First : constant Natural := Result'First;
Res_Last : Natural := Res_First - 1;
begin
for J in All_Comp'Range loop
if Is_Equal (Type_Decl, All_Comp (J)) then
Start_From := J + 1;
exit;
end if;
end loop;
for J in Start_From .. All_Comp'Last loop
if Is_Formal_Type
and then
Declaration_Kind (All_Comp (J)) not in A_Formal_Declaration
then
exit;
end if;
if Is_Type_Operator (All_Comp (J), Type_Decl)
and then
(In_Package_Spec
or else
Overrides_Type_Operator (All_Comp (J), Type_Decl))
then
Res_Last := Res_Last + 1;
Result (Res_Last) := All_Comp (J);
if Is_Bool_Eq_Declaration (All_Comp (J)) then
Res_Last := Res_Last + 1;
Result (Res_Last) :=
Corresponding_Equality_Operator (All_Comp (J));
end if;
end if;
end loop;
return Result (Res_First .. Res_Last);
end;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Type_Definition,
Outer_Call => Package_Name & "Explicit_Type_Operators");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Explicit_Type_Operators",
Ex => Ex,
Arg_Element => Type_Definition);
end Explicit_Type_Operators;
----------------
-- First_Name --
----------------
function First_Name (Dcl : Asis.Element) return Asis.Element is
Name_List : constant Asis.Element_List := Names (Dcl);
begin
return Name_List (Name_List'First);
end First_Name;
-------------------------------
-- Formal_Subprogram_Default --
-------------------------------
function Formal_Subprogram_Default
(Declaration : Asis.Generic_Formal_Parameter)
return Asis.Expression
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration);
Arg_Node : Node_Id;
begin
Arg_Node := Node (Declaration);
Check_Validity (Declaration, Package_Name & "Formal_Subprogram_Default");
if not (Arg_Kind = A_Formal_Procedure_Declaration or else
Arg_Kind = A_Formal_Function_Declaration)
then
Raise_ASIS_Inappropriate_Element
(Package_Name & "Formal_Subprogram_Default",
Wrong_Kind => Arg_Kind);
end if;
if not Present (Default_Name (Arg_Node)) then
return Nil_Element;
end if;
return Node_To_Element_New (Node => Default_Name (Arg_Node),
Starting_Element => Declaration);
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Declaration,
Outer_Call => Package_Name & "Formal_Subprogram_Default");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Formal_Subprogram_Default",
Ex => Ex,
Arg_Element => Declaration);
end Formal_Subprogram_Default;
---------------------
-- Full_Name_Image --
---------------------
function Full_Name_Image
(Expression : Asis.Expression)
return Program_Text
is
begin
case Expression_Kind (Expression) is
when An_Identifier .. An_Enumeration_Literal =>
return Asis.Expressions.Name_Image (Expression);
when A_Selected_Component =>
return Full_Name_Image (Prefix (Expression)) & '.' &
Asis.Expressions.Name_Image (Selector (Expression));
when others =>
Raise_ASIS_Inappropriate_Element
(Package_Name & "Full_Name_Image",
Wrong_Kind => Int_Kind (Expression));
end case;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Expression,
Outer_Call => Package_Name & "Full_Name_Image");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Full_Name_Image",
Ex => Ex,
Arg_Element => Expression);
end Full_Name_Image;
-------------------------
-- Get_Call_Parameters --
-------------------------
function Get_Call_Parameters
(Call : Asis.Element;
Normalized : Boolean := False)
return Asis.Element_List
is
begin
if Expression_Kind (Call) = A_Function_Call then
return Function_Call_Parameters (Call, Normalized);
else
return Call_Statement_Parameters (Call, Normalized);
end if;
end Get_Call_Parameters;
------------------------
-- Get_Implemented_Op --
------------------------
-- Under construction!
function Get_Implemented_Op
(Op_Decl : Asis.Element;
Type_Def : Asis.Element)
return Asis.Element
is
pragma Unreferenced (Op_Decl, Type_Def);
begin
return Nil_Element;
end Get_Implemented_Op;
-- function Get_Implemented_Op
-- (Op_Decl : Asis.Element;
-- Type_Def : Asis.Element)
-- return Asis.Element
-- is
-- Result : Asis.Element := Nil_Element;
-- Look_For_Proc : constant Boolean := Is_Procedure (Op_Decl);
-- Primitives : constant Asis.Element_List := Get_Primitives (Type_Def);
-- Arg_Chars : Name_Id;
-- Res_Chars : Name_Id;
-- Tmp_Node : Node_Id;
-- Tmp_El1 : Asis.Element;
-- Tmp_El2 : Asis.Element;
-- Success : Boolean;
-- Is_Controlling : Boolean;
-- Arg_Params : constant Asis.Element_List := Parameter_Profile (Op_Decl);
-- begin
-- Tmp_El := First_Name (Decl);
-- Arg_Chars := Chars (R_Node (Tmp_El));
-- Scan_Primitives : for J in Primitives'Range loop
-- if Look_For_Proc xor Is_Procedure (Primitives (J)) then
-- Res_Chars := Chars (R_Node (First_Name (Primitives (J))));
-- if Res_Chars = Arg_Chars
-- and then
-- Arg_Params'Length = Parameter_Profile (Primitives (J))'Length
-- then
-- -- Check parameter profiles:
-- Success := True;
-- if not Look_For_Proc then
-- -- Check for the result type
-- Tmp_El1 := First_Name (Op_Decl);
-- Tmp_El2 := First_Name (Primitives (J));
-- if Has_Controlling_Result (R_Node (Tmp_El1)) xor
-- Has_Controlling_Result (R_Node (Tmp_El2))
-- then
-- Success := False;
-- else
-- Is_Controlling :=
-- Has_Controlling_Result (R_Node (Tmp_El1));
-- Tmp_El1 := Result_Profile (Op_Decl);
-- Tmp_El2 := Result_Profile (Primitives (J));
-- if Definition_Kind (Tmp_El1) = An_Access_Definition
-- xor
-- Definition_Kind (Tmp_El2) = An_Access_Definition
-- then
-- Success := False;
-- elsif not Is_Controlling then
-- Succes := Are_Type_Conforming (Tmp_El1, Tmp_El2);
-- end if;
-- end if;
-- end if;
-- end if;
-- if Success then
-- declare
-- Res_Params : constant Asis.Element_List :=
-- Parameter_Profile (Primitives (J));
-- begin
-- Scan_Params : for P in Arg_Params'Range loop
-- if not Are_Conformant
-- (Arg_Params (P), Res_Params (P))
-- then
-- Success := False;
-- exit Scan_Params;
-- end if;
-- end loop;
-- end;
-- end if;
-- if Success then
-- Result := Primitives (J)
-- exit Scan_Primitives;
-- end if;
-- end if;
-- end if;
-- end loop Scan_Primitives;
-- return Result;
-- end Get_Implemented_Op;
------------------------
-- Get_Last_Component --
------------------------
function Get_Last_Component (E : Asis.Element) return Asis.Element is
Child_Access : constant Query_Array := Appropriate_Queries (E);
Child : Asis.Element := Asis.Nil_Element;
begin
Check_Validity (E, Package_Name & "Get_Last_Component");
if Is_Nil (E) then
Raise_ASIS_Inappropriate_Element
(Package_Name & "Get_Last_Component",
Wrong_Kind => Not_An_Element);
end if;
if Debug_Flag_X then
Write_Str (" Get_Last_Component - called for ");
Write_Str (Internal_Element_Kinds'Image (Int_Kind (E)));
Write_Eol;
end if;
for Each_Query in reverse Child_Access'Range loop
case Child_Access (Each_Query).Query_Kind is
when Bug =>
null;
when Single_Element_Query =>
Child := Child_Access (Each_Query).Func_Simple (E);
when Element_List_Query =>
declare
Child_List : constant Asis.Element_List :=
Child_Access (Each_Query).Func_List (E);
begin
if not Is_Nil (Child_List) then
Child := Child_List (Child_List'Last);
end if;
end;
when Element_List_Query_With_Boolean =>
declare
Child_List : constant Asis.Element_List :=
Child_Access (Each_Query).Func_List_Boolean
(E, Child_Access (Each_Query).Bool);
begin
if not Is_Nil (Child_List) then
Child := Child_List (Child_List'Last);
end if;
end;
end case;
exit when not Is_Nil (Child);
end loop;
if Debug_Flag_X then
Write_Str (" Get_Last_Component - returns ");
Write_Str (Internal_Element_Kinds'Image (Int_Kind (Child)));
Write_Eol;
end if;
return Child;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => E,
Outer_Call => Package_Name & "Get_Last_Component");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Get_Last_Component",
Ex => Ex,
Arg_Element => E);
end Get_Last_Component;
-----------------------
-- Get_LF_From_Ureal --
-----------------------
function Get_LF_From_Ureal (U : Ureal) return Long_Long_Float is
Result : Long_Long_Float;
Base : constant Nat := Rbase (U);
U_Num : constant Uint := Numerator (U);
U_Denum : constant Uint := Denominator (U);
Num : Long_Long_Integer;
Denum : Long_Long_Integer;
begin
UI_Image (U_Num, Format => Decimal);
Num := Long_Long_Integer'Value (UI_Image_Buffer (1 .. UI_Image_Length));
UI_Image (U_Denum, Format => Decimal);
Denum :=
Long_Long_Integer'Value (UI_Image_Buffer (1 .. UI_Image_Length));
if Base /= 0 then
Denum := Long_Long_Integer (2 ** Natural (Denum));
end if;
Result := Long_Long_Float (Num) / Long_Long_Float (Denum);
if UR_Is_Negative (U) then
Result := -Result;
end if;
return Result;
end Get_LF_From_Ureal;
--------------------------
-- Has_Enumeration_Type --
--------------------------
function Has_Enumeration_Type
(Expression : Asis.Expression)
return Boolean
is
Result : Boolean := False;
begin
Check_Validity (Expression, Package_Name & "Has_Enumeration_Type");
if Ekind (Etype (R_Node (Expression))) in Enumeration_Kind then
Result := True;
end if;
return Result;
end Has_Enumeration_Type;
----------------------
-- Has_Integer_Type --
----------------------
function Has_Integer_Type (Expression : Asis.Expression) return Boolean is
Result : Boolean := False;
begin
Check_Validity (Expression, Package_Name & "Has_Integer_Type");
if Ekind (Etype (R_Node (Expression))) in Integer_Kind then
Result := True;
end if;
return Result;
end Has_Integer_Type;
------------------------------
-- Inherited_Type_Operators --
------------------------------
function Inherited_Type_Operators
(Type_Definition : Asis.Type_Definition)
return Asis.Declaration_List
is
Arg_Kind : constant Internal_Element_Kinds :=
Int_Kind (Type_Definition);
Type_Decl : Asis.Element;
begin
Check_Validity (Type_Definition,
Package_Name & "Inherited_Type_Operators");
if not (Arg_Kind in Internal_Type_Kinds or else
Arg_Kind in Internal_Formal_Type_Kinds or else
Arg_Kind in A_Private_Type_Definition ..
A_Protected_Definition)
then
Raise_ASIS_Inappropriate_Element
(Diagnosis => Package_Name & "Inherited_Type_Operators",
Wrong_Kind => Arg_Kind);
end if;
if not (Arg_Kind = A_Private_Extension_Definition or else
Arg_Kind = A_Derived_Type_Definition or else
Arg_Kind = A_Derived_Record_Extension_Definition or else
Arg_Kind = A_Formal_Derived_Type_Definition)
then
return Nil_Element_List;
end if;
declare
All_Inherited_Ops : constant Asis.Declaration_List :=
Implicit_Inherited_Subprograms (Type_Definition);
Result : Asis.Declaration_List (All_Inherited_Ops'Range);
Res_First : constant Natural := Result'First;
Res_Last : Natural := Res_First - 1;
begin
Type_Decl := Enclosing_Element (Type_Definition);
for J in All_Inherited_Ops'Range loop
if Is_Type_Operator (All_Inherited_Ops (J), Type_Decl) then
Res_Last := Res_Last + 1;
Result (Res_Last) := All_Inherited_Ops (J);
end if;
end loop;
return Result (Res_First .. Res_Last);
end;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Type_Definition,
Outer_Call => Package_Name & "Inherited_Type_Operators");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Inherited_Type_Operators",
Ex => Ex,
Arg_Element => Type_Definition);
end Inherited_Type_Operators;
--------------------
-- Is_Aspect_Mark --
--------------------
function Is_Aspect_Mark (Element : Asis.Element) return Boolean is
Result : Boolean := False;
Tmp : Node_Id;
begin
if Expression_Kind (Element) = An_Identifier or else
Attribute_Kind (Element) = A_Class_Attribute
then
Tmp := R_Node (Element);
Result := Nkind (Parent (Tmp)) = N_Aspect_Specification and then
Tmp = Sinfo.Identifier (Parent (Tmp));
end if;
return Result;
end Is_Aspect_Mark;
-----------------------------------
-- Is_Aspect_Specific_Identifier --
-----------------------------------
function Is_Aspect_Specific_Identifier
(Element : Asis.Element)
return Boolean
is
Result : Boolean := False;
Tmp : Node_Id;
begin
if Expression_Kind (Element) = An_Identifier then
Tmp := R_Node (Element);
if Nkind (Tmp) = N_Identifier
and then
not Present (Entity (Tmp))
then
Tmp := Parent (Tmp);
if Present (Tmp) then
case Nkind (Tmp) is
when N_Component_Association =>
if Nkind (Parent (Parent (Tmp))) =
N_Aspect_Specification
then
Result := True;
end if;
when N_Aspect_Specification =>
Result := R_Node (Element) /= Sinfo.Identifier (Tmp);
-- ... to be continued...
when others =>
null;
end case;
end if;
end if;
end if;
return Result;
end Is_Aspect_Specific_Identifier;
----------------------------
-- Is_Bool_Eq_Declaration --
----------------------------
function Is_Bool_Eq_Declaration
(Declaration : Asis.Element)
return Boolean
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration);
Result : Boolean := False;
Op_Node : Node_Id;
Op_Etype : Node_Id;
begin
Check_Validity (Declaration, Package_Name & "Is_Bool_Eq_Declaration");
if Arg_Kind = A_Function_Declaration
or else
(Arg_Kind = A_Function_Body_Declaration
and then
Acts_As_Spec (Declaration))
or else
Arg_Kind = A_Function_Renaming_Declaration
then
Op_Node := Defining_Unit_Name (Specification (Node (Declaration)));
Op_Etype := Etype (Op_Node);
if Is_Generic_Instance (Op_Node) then
Op_Node :=
Defining_Unit_Name (Node (Enclosing_Element (Declaration)));
end if;
if Nkind (Op_Node) = N_Defining_Program_Unit_Name then
Op_Node := Defining_Identifier (Op_Node);
end if;
if Nkind (Op_Node) = N_Defining_Operator_Symbol
and then
Chars (Op_Node) = Name_Op_Eq
and then
Op_Etype = Standard_Boolean
then
Result := True;
end if;
end if;
return Result;
end Is_Bool_Eq_Declaration;
-------------------
-- Is_Class_Wide --
-------------------
function Is_Class_Wide
(Declaration : Asis.Declaration)
return Boolean
is
Result : Boolean := False;
Subtype_Entity : Entity_Id;
begin
if Declaration_Kind (Declaration) = A_Subtype_Declaration then
Subtype_Entity := R_Node (Declaration);
Subtype_Entity := Defining_Identifier (Subtype_Entity);
Result := Ekind (Subtype_Entity) = E_Class_Wide_Subtype;
end if;
return Result;
end Is_Class_Wide;
------------------
-- Is_Completed --
------------------
function Is_Completed (Declaration : Asis.Element) return Boolean is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration);
Arg_Node : Node_Id;
Result : Boolean := False;
begin
Check_Validity (Declaration, Package_Name & "Is_Completed");
-- JUNK IMPLEMENTATION!!!
if not (Arg_Kind = A_Procedure_Declaration or else
Arg_Kind = A_Function_Declaration)
or else
Is_Part_Of_Inherited (Declaration)
then
return False;
end if;
Arg_Node := Defining_Unit_Name (Specification (Node (Declaration)));
Result := Has_Completion (Arg_Node);
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Declaration,
Outer_Call => Package_Name & "Is_Completed");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Is_Completed",
Ex => Ex,
Arg_Element => Declaration);
end Is_Completed;
-----------------------------------
-- Is_Default_For_Null_Procedure --
-----------------------------------
function Is_Default_For_Null_Procedure
(Reference : Asis.Element)
return Boolean
is
Result : Boolean := False;
Tmp : Node_Id;
begin
if Expression_Kind (Reference) = An_Identifier
and then
Is_Part_Of_Instance (Reference)
then
Tmp := R_Node (Reference);
if Nkind (Tmp) in N_Has_Entity then
Tmp := Entity (Tmp);
if Present (Tmp) and then Ekind (Tmp) = E_Procedure then
Tmp := Parent (Parent (Tmp));
Result :=
Nkind (Tmp) = N_Subprogram_Body
and then
Nkind (Parent (Tmp)) = N_Package_Specification;
end if;
end if;
end if;
return Result;
end Is_Default_For_Null_Procedure;
----------------------------
-- Is_Expanded_Subprogram --
----------------------------
function Is_Expanded_Subprogram (N : Node_Id) return Boolean is
Result : Boolean := False;
Tmp : Node_Id;
begin
if Nkind (N) = N_Subprogram_Declaration then
Tmp := Defining_Unit_Name (Specification (N));
if Nkind (Tmp) = N_Defining_Program_Unit_Name then
Tmp := Defining_Identifier (Tmp);
end if;
if Is_Generic_Instance (Tmp) then
Result := True;
end if;
end if;
return Result;
end Is_Expanded_Subprogram;
-----------------
-- Is_Exported --
-----------------
function Is_Exported (Defining_Name : Asis.Defining_Name) return Boolean is
Arg_Node : Node_Id;
Tmp : Node_Id;
Result : Boolean := False;
begin
Check_Validity (Defining_Name, Package_Name & "Is_Exported");
if Int_Kind (Defining_Name) not in Internal_Defining_Name_Kinds then
return False;
end if;
Arg_Node := R_Node (Defining_Name);
if Nkind (Arg_Node) = N_Defining_Program_Unit_Name then
Arg_Node := Defining_Identifier (Arg_Node);
end if;
if Ekind (Arg_Node) = E_Subprogram_Body then
-- Go to the corresponding spec entity
Tmp := Parent (Arg_Node);
while Nkind (Tmp) not in N_Subprogram_Specification loop
Tmp := Parent (Tmp);
end loop;
Tmp := Parent (Tmp);
Tmp := Corresponding_Decl_Node (Tmp);
Arg_Node := Defining_Unit_Name (Specification (Tmp));
if Nkind (Arg_Node) = N_Defining_Program_Unit_Name then
Arg_Node := Defining_Identifier (Arg_Node);
end if;
end if;
Result := Is_Exported (Arg_Node);
return Result;
end Is_Exported;
-------------------------------------
-- Is_From_Import_Procedure_Pragma --
-------------------------------------
function Is_From_Import_Procedure_Pragma (N : Node_Id) return Boolean is
Tmp : Node_Id := Parent (N);
Result : Boolean := False;
begin
if Nkind (Tmp) = N_Indexed_Component then
Tmp := Parent (Tmp);
if Nkind (Tmp) = N_Aggregate then
Tmp := Parent (Tmp);
if Nkind (Tmp) = N_Pragma_Argument_Association then
Tmp := Pragma_Identifier (Parent (Tmp));
Result := Chars (Tmp) = Name_Import_Procedure
or else
Chars (Tmp) = Name_Import_Valued_Procedure;
end if;
end if;
end if;
return Result;
end Is_From_Import_Procedure_Pragma;
---------------------------------
-- Is_Implicit_Neq_Declaration --
---------------------------------
function Is_Implicit_Neq_Declaration
(Declaration : Asis.Element)
return Boolean
is
begin
return
Declaration_Kind (Declaration) = A_Function_Declaration
and then
Special_Case (Declaration) = Is_From_Imp_Neq_Declaration;
end Is_Implicit_Neq_Declaration;
--------------
-- Is_Label --
--------------
function Is_Label (Defining_Name : Asis.Defining_Name) return Boolean is
N : constant Node_Id := Node (Defining_Name);
Result : Boolean := False;
begin
if Int_Kind (Defining_Name) = A_Defining_Identifier then
if Nkind (N) = N_Label then
Result := True;
elsif Nkind (N) = N_Identifier
and then
Nkind (Parent (N)) = N_Loop_Statement
and then
Nkind (Original_Node (Parent (N))) = N_Goto_Statement
then
-- An infinite loop is implemented with goto statement
Result := True;
end if;
end if;
return Result;
end Is_Label;
--------------------------
-- Is_Main_Unit_In_Tree --
--------------------------
function Is_Main_Unit_In_Tree
(Right : Asis.Compilation_Unit)
return Boolean
is
Arg_Kind : constant Unit_Kinds := Kind (Right);
Arg_Unit_Id : Unit_Id;
Arg_Cont_Id : Context_Id;
begin
Check_Validity (Right, Package_Name & "Is_Main_Unit_In_Tree");
Arg_Cont_Id := Encl_Cont_Id (Right);
Reset_Context (Arg_Cont_Id);
Arg_Unit_Id := Get_Unit_Id (Right);
if Arg_Kind in A_Procedure .. A_Protected_Body_Subunit then
return GNAT_Compilation_Dependencies (Arg_Unit_Id) /=
Nil_Unit_Id_List;
else
return False;
end if;
exception
when ASIS_Inappropriate_Compilation_Unit =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Outer_Call => Package_Name & "Is_Main_Unit_In_Tree");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Is_Main_Unit_In_Tree",
Ex => Ex,
Arg_CU => Right);
end Is_Main_Unit_In_Tree;
-----------------
-- Is_Obsolete --
-----------------
function Is_Obsolete (Right : Asis.Compilation_Unit) return Boolean is
Arg_Kind : constant Unit_Kinds := Kind (Right);
Arg_Id : Unit_Id;
Result : Boolean := True;
begin
Check_Validity (Right, Package_Name & "Is_Obsolete");
case Arg_Kind is
when Not_A_Unit |
A_Nonexistent_Declaration |
A_Nonexistent_Body |
An_Unknown_Unit =>
null;
when others =>
Arg_Id := Get_Unit_Id (Right);
if Arg_Id = Standard_Id then
Result := False;
else
Result := not (Source_Status (Right) = Up_To_Date);
end if;
end case;
return Result;
exception
when ASIS_Inappropriate_Compilation_Unit =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Outer_Call => Package_Name & "Is_Obsolete");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Is_Obsolete",
Ex => Ex,
Arg_CU => Right);
end Is_Obsolete;
-----------------------------
-- Is_Overriding_Operation --
-----------------------------
function Is_Overriding_Operation
(Declaration : Asis.Element)
return Boolean
is
Result : Boolean := False;
Entity_N : Entity_Id := Empty;
begin
case Declaration_Kind (Declaration) is
when A_Procedure_Instantiation |
A_Function_Instantiation =>
Entity_N := Specification (Instance_Spec (Node (Declaration)));
Entity_N := Related_Instance (Defining_Unit_Name (Entity_N));
when A_Procedure_Declaration |
A_Function_Declaration |
A_Procedure_Body_Declaration |
A_Function_Body_Declaration |
A_Null_Procedure_Declaration |
A_Procedure_Renaming_Declaration |
A_Function_Renaming_Declaration =>
if not Is_Part_Of_Implicit (Declaration) then
Entity_N := Specification (Node (Declaration));
Entity_N := Defining_Unit_Name (Entity_N);
end if;
when others =>
null;
end case;
if Present (Entity_N)
and then
Nkind (Entity_N) in
N_Defining_Identifier .. N_Defining_Operator_Symbol
then
Result := Present (Overridden_Operation (Entity_N));
end if;
return Result;
end Is_Overriding_Operation;
----------------------------
-- Is_Predefined_Operator --
----------------------------
function Is_Predefined_Operator
(Operator : Asis.Element)
return Boolean
is
Result : Boolean := False;
Entity_N : Entity_Id;
begin
if Expression_Kind (Operator) = An_Operator_Symbol then
Entity_N := Entity (Node (Operator));
Result := Present (Entity_N) and then Is_Predefined (Entity_N);
end if;
return Result;
end Is_Predefined_Operator;
----------------
-- Is_Private --
----------------
function Is_Private (Declaration : Asis.Element) return Boolean is
Arg_Element : Element := Declaration;
Result : Boolean := False;
Next_Node : Node_Id;
Enclosing_List : List_Id;
Enclosing_Node : Node_Id;
begin
Check_Validity (Declaration, Package_Name & "Is_Private");
if Declaration_Kind (Declaration) = Not_A_Declaration or else
Declaration_Kind (Declaration) in
A_Loop_Parameter_Specification .. An_Element_Iterator_Specification
then
return False;
end if;
-- In case of an implicit Element we go to the "enclosing" explicit
-- Element to get the node stored in R_Node field which can safely be
-- used for tree traversal (for implicit Elements R_Node may be of
-- special use and it may have the Parent field set to Empty
while Is_Part_Of_Implicit (Arg_Element)
and then
Special_Case (Arg_Element) /= From_Limited_View
loop
Arg_Element := Enclosing_Element (Arg_Element);
end loop;
Next_Node := R_Node (Arg_Element);
while Nkind (Next_Node) /= N_Compilation_Unit and then
not Is_List_Member (Next_Node)
loop
Next_Node := Parent (Next_Node);
end loop;
while Nkind (Next_Node) /= N_Compilation_Unit loop
-- If we are here, we have Next_Node being a list member
Enclosing_List := List_Containing (Next_Node);
Enclosing_Node := Parent (Enclosing_List);
case Nkind (Enclosing_Node) is
when N_Statement_Other_Than_Procedure_Call =>
-- We can not be in any private part
exit;
when N_Package_Specification |
N_Task_Definition |
N_Protected_Definition =>
if Enclosing_List = Private_Declarations (Enclosing_Node) then
Result := True;
exit;
end if;
when others =>
null;
end case;
Next_Node := Parent (Next_Node);
while Nkind (Next_Node) /= N_Compilation_Unit and then
not Is_List_Member (Next_Node)
loop
Next_Node := Parent (Next_Node);
end loop;
end loop;
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Declaration,
Outer_Call => Package_Name & "Is_Private");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Is_Private",
Ex => Ex,
Arg_Element => Declaration);
end Is_Private;
------------------
-- Is_Procedure --
------------------
function Is_Procedure (Decl : Asis.Element) return Boolean is
Result : Boolean := False;
begin
case Declaration_Kind (Decl) is
when A_Procedure_Declaration |
A_Procedure_Instantiation |
A_Procedure_Body_Declaration |
A_Null_Procedure_Declaration |
A_Procedure_Renaming_Declaration =>
Result := True;
when others =>
null;
end case;
return Result;
end Is_Procedure;
-----------------
-- Is_RCI_Unit --
-----------------
function Is_RCI_Unit (C : Asis.Compilation_Unit) return Boolean is
Arg_Node : Node_Id;
Result : Boolean := False;
begin
if Is_Standard (C) then
return False;
end if;
case Unit_Kind (C) is
when A_Package |
A_Procedure_Body |
A_Function_Body |
A_Generic_Package =>
Arg_Node := Unit (Top (C));
Arg_Node := Defining_Unit_Name (Specification (Arg_Node));
if Nkind (Arg_Node) = N_Defining_Program_Unit_Name then
Arg_Node := Defining_Identifier (Arg_Node);
end if;
Result := Is_Remote_Call_Interface (Arg_Node);
when others => null;
end case;
return Result;
end Is_RCI_Unit;
-------------------------
-- Is_Renaming_As_Body --
-------------------------
function Is_Renaming_As_Body (Declaration : Asis.Element) return Boolean is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration);
Arg_Node : Node_Id;
Result : Boolean := False;
begin
Check_Validity (Declaration, Package_Name & "Is_Renaming_As_Body");
if Arg_Kind = A_Procedure_Renaming_Declaration or else
Arg_Kind = A_Function_Renaming_Declaration
then
Arg_Node := R_Node (Declaration);
if Nkind (Arg_Node) /= N_Subprogram_Declaration then
Result := Present (Corresponding_Spec (Arg_Node));
end if;
end if;
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Declaration,
Outer_Call => Package_Name & "Is_Renaming_As_Body");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Is_Renaming_As_Body",
Ex => Ex,
Arg_Element => Declaration);
end Is_Renaming_As_Body;
---------------
-- Is_Static --
---------------
function Is_Static (Element : Asis.Element) return Boolean is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Element);
Arg_Node : Node_Id;
Result : Boolean := False;
begin
Check_Validity (Element, Package_Name & "Is_Static");
if Arg_Kind in Internal_Expression_Kinds and then
Is_True_Expression (Element)
then
Result := Sinfo.Is_Static_Expression (R_Node (Element));
elsif Arg_Kind = A_Range_Attribute_Reference or else
Arg_Kind =
A_Discrete_Range_Attribute_Reference_As_Subtype_Definition
or else
Arg_Kind = A_Discrete_Range_Attribute_Reference
then
Arg_Node := R_Node (Element);
if Nkind (Arg_Node) = N_Range_Constraint then
Arg_Node := Range_Expression (Arg_Node);
end if;
if Nkind (Arg_Node) = N_Range and then
Is_Static_Expression (Low_Bound (Arg_Node)) and then
Is_Static_Expression (High_Bound (Arg_Node))
then
Result := True;
end if;
end if;
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Element,
Outer_Call => Package_Name & "Is_Static");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Is_Static",
Ex => Ex,
Arg_Element => Element);
end Is_Static;
------------------------
-- Is_True_Expression --
------------------------
function Is_True_Expression
(Expression : Asis.Expression)
return Boolean
is
Arg_Node : Node_Id := Node (Expression);
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Expression);
Expr_Chars : Name_Id;
Entity_Node : Entity_Id;
Result : Boolean := True;
-- the idea of the implementation is to find out the cases when
-- Expression is NOT a true exception, so we initialize Result
-- as True
begin
Check_Validity (Expression, Package_Name & "Is_True_Expression");
if Arg_Kind not in Internal_Expression_Kinds then
return False;
end if;
if Nkind (Arg_Node) = N_Identifier and then
Nkind (Parent (Arg_Node)) = N_Expanded_Name and then
Arg_Node = Selector_Name (Parent (Arg_Node))
then
-- selector in an expanded name - all the semantic fields
-- are set for the whole name, but not for this selector.
-- So:
Arg_Node := Parent (Arg_Node);
end if;
if Nkind (Arg_Node) not in N_Has_Etype or else
No (Etype (Arg_Node)) or else
Is_Anonymous (Ekind (Etype (Arg_Node))) or else
Ekind (Etype (Arg_Node)) = E_Subprogram_Type
then
-- Expression may be a true expression, but it may have a type which
-- cannot be represented in ASIS (such as an anonymous access type),
-- in such cases we also classify it as being not true expression
Result := False;
else
-- in some cases more detailed analysis is required.
-- ??? This part may require some more analysis - it may be
-- somewhat redundant
case Arg_Kind is
when An_Identifier | A_Selected_Component =>
-- and here we have to investigate whether or not this
-- Expression is a "naming expression"
if Special_Case (Expression) = Rewritten_Named_Number then
return True;
end if;
-- ??? <tree problem 1>
-- this fragment should be revised when the problem is fixed (as it should)
if Nkind (Arg_Node) = N_Selected_Component and then
Etype (Arg_Node) = Any_Type
-- for now (GNAT 3.05) this means, that Expression is an
-- expanded name of the character literal of ether a
-- predefined character type or of the type derived from a
-- predefined character type; the problem is that the
-- Entity field is not set for such a node
then
return True;
end if;
-- ??? <tree problem 1> - end
-- now taking the Entity field (if any) and looking,
-- what we have:
if Nkind (Arg_Node) = N_Selected_Component then
Entity_Node := Entity (Selector_Name (Arg_Node));
elsif Nkind (Arg_Node) = N_Attribute_Definition_Clause then
-- the attribute designator in an attribute definition
-- clause
Entity_Node := Empty;
else
Entity_Node := Entity (Arg_Node);
end if;
if No (Entity_Node) then
Result := False;
elsif Ekind (Entity_Node) = E_Enumeration_Literal then
null;
else
case Ekind (Entity_Node) is
-- the first choice in this case statement should
-- filter in entities which *ARE* expressions in Ada
-- sense
when E_Variable =>
-- tasks and protected objects declared by _single_
-- task/protected declarations do not have
-- corresponding type declarations which can be
-- represented in ASIS
Result := Comes_From_Source (Parent (Entity_Node));
when E_Component |
E_Constant |
E_Discriminant |
E_Loop_Parameter |
E_In_Out_Parameter |
E_In_Parameter |
E_Out_Parameter |
E_Generic_In_Out_Parameter |
E_Generic_In_Parameter |
E_Named_Integer |
E_Named_Real |
E_Enumeration_Literal |
-- ??? (see elsif path)
-- enumeration literals are not treated as
-- functions in ASIS
E_Entry_Index_Parameter |
E_Protected_Object =>
null;
-- simply keeping the initialization of Result
when others =>
Result := False;
end case;
end if;
when Internal_Operator_Symbol_Kinds =>
Result := False;
when Internal_Attribute_Reference_Kinds =>
case Internal_Attribute_Reference_Kinds (Arg_Kind) is
when An_Adjacent_Attribute |
A_Base_Attribute |
A_Ceiling_Attribute |
A_Class_Attribute |
A_Compose_Attribute |
A_Copy_Sign_Attribute |
An_Exponent_Attribute |
A_Floor_Attribute |
A_Fraction_Attribute |
An_Image_Attribute |
An_Input_Attribute |
A_Leading_Part_Attribute |
A_Machine_Attribute |
A_Max_Attribute |
A_Min_Attribute |
A_Model_Attribute |
An_Output_Attribute |
A_Pos_Attribute |
A_Pred_Attribute |
A_Range_Attribute |
A_Read_Attribute |
A_Remainder_Attribute |
A_Round_Attribute |
A_Rounding_Attribute |
A_Scaling_Attribute |
A_Succ_Attribute |
A_Truncation_Attribute |
An_Unbiased_Rounding_Attribute |
A_Val_Attribute |
A_Value_Attribute |
A_Wide_Image_Attribute |
A_Wide_Value_Attribute |
A_Write_Attribute =>
Result := False;
when An_Implementation_Defined_Attribute =>
Expr_Chars := Attribute_Name (Arg_Node);
if Expr_Chars = Name_Abort_Signal or else
Expr_Chars = Name_Elab_Body or else
Expr_Chars = Name_Elab_Spec
then
Result := False;
end if;
when others =>
null;
end case;
when A_Positional_Array_Aggregate | A_Named_Array_Aggregate =>
if Nkind (Parent (Arg_Node)) =
N_Enumeration_Representation_Clause
or else
Is_Typeless_Subaggregate (Arg_Node)
then
Result := False;
end if;
when others =>
null;
end case;
end if;
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Expression,
Outer_Call => Package_Name & "Is_True_Expression");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Is_True_Expression",
Ex => Ex,
Arg_Element => Expression);
end Is_True_Expression;
----------------------
-- Is_Type_Operator --
----------------------
function Is_Type_Operator
(Op_Decl : Asis.Element;
Type_Decl : Asis.Element)
return Boolean
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Op_Decl);
Result : Boolean := False;
Next_Type : Asis.Element;
begin
if (Arg_Kind = A_Function_Declaration
or else
((Arg_Kind = A_Function_Body_Declaration
or else
Arg_Kind = A_Function_Body_Stub
or else
Arg_Kind = A_Function_Renaming_Declaration)
and then
not (Is_Equal (Corresponding_Declaration (Op_Decl), Op_Decl)))
or else
Arg_Kind = A_Function_Instantiation
or else
Arg_Kind = A_Formal_Function_Declaration)
and then
Int_Kind (Names (Op_Decl) (1)) in Internal_Defining_Operator_Kinds
then
-- First, check the result type
Next_Type := Result_Profile (Op_Decl);
if Int_Kind (Next_Type) = A_Selected_Component then
Next_Type := Selector (Next_Type);
end if;
if Int_Kind (Next_Type) = An_Identifier then
Next_Type := Corresponding_Name_Declaration (Next_Type);
Next_Type := Corresponding_First_Subtype (Next_Type);
if Is_Equal (Next_Type, Type_Decl) then
Result := True;
end if;
end if;
if not Result then
-- check parameter types
declare
Params : constant Asis.Element_List :=
Parameter_Profile (Op_Decl);
begin
for J in Params'Range loop
Next_Type := Object_Declaration_View (Params (J));
if Int_Kind (Next_Type) = A_Selected_Component then
Next_Type := Selector (Next_Type);
end if;
if Int_Kind (Next_Type) = An_Identifier then
Next_Type := Corresponding_Name_Declaration (Next_Type);
Next_Type := Corresponding_First_Subtype (Next_Type);
if Is_Equal (Next_Type, Type_Decl) then
Result := True;
exit;
end if;
end if;
end loop;
end;
end if;
end if;
return Result;
end Is_Type_Operator;
------------------------------
-- Is_Typeless_Subaggregate --
------------------------------
function Is_Typeless_Subaggregate (Aggr : Node_Id) return Boolean is
Parent_Node : Node_Id := Parent (Aggr);
Result : Boolean := False;
Arg_Type : Entity_Id;
Parent_Type : Entity_Id;
begin
if Nkind (Parent_Node) = N_Component_Association then
Parent_Node := Parent (Parent_Node);
end if;
if Nkind (Parent_Node) = N_Aggregate then
Arg_Type := Etype (Aggr);
while Present (Arg_Type) and then Etype (Arg_Type) /= Arg_Type loop
Arg_Type := Etype (Arg_Type);
end loop;
Parent_Type := Etype (Parent_Node);
while Present (Parent_Type)
and then Etype (Parent_Type) /= Parent_Type
loop
Parent_Type := Etype (Parent_Type);
end loop;
Result := Arg_Type = Parent_Type;
end if;
return Result;
end Is_Typeless_Subaggregate;
-------------------------
-- Is_Uniquely_Defined --
-------------------------
function Is_Uniquely_Defined (Reference : Asis.Expression) return Boolean is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Reference);
Arg_Node : Node_Id;
Result : Boolean := False;
begin
Check_Validity (Reference, Package_Name & "Is_Uniquely_Defined");
if Arg_Kind = An_Identifier or else
Arg_Kind in Internal_Operator_Symbol_Kinds or else
Arg_Kind = A_Character_Literal or else
Arg_Kind = An_Enumeration_Literal
then
Result := True;
-- We suppose, that in general case we have a unique declaration,
-- and now let's try to detect if we have a special case:
Arg_Node := Node (Reference);
-- first, the situation when "passed a portion of a pragma that
-- was "ignored" by the compiler", it relates to pragma arguments
-- only, but not to pragma element identifiers:
-- GNAT rewrites the tree structure for non-recognized pragma as
-- if it is a null statement, so:
if Nkind (Parent (Parent (Arg_Node))) = N_Null_Statement then
Result := False;
end if;
if Arg_Kind = An_Identifier then
-- There are three checks specific to arguments of An_Identifier
-- kind only: a pragma_argument_identifier, an identifier specific
-- to a pragma and a reference to an attribute_designator:
if Nkind (Arg_Node) = N_Pragma_Argument_Association
-- a reference to a pragma_argument_identifier
or else
(Nkind (Arg_Node) in N_Has_Entity
and then
No (Entity (Arg_Node))
and then
(Nkind (Parent (Arg_Node)) = N_Pragma_Argument_Association
or else
Is_From_Import_Procedure_Pragma (Arg_Node)))
-- an identifier specific to a pragma, we make a guess that
-- any identifier on the place of a pragma argument is
-- specific to the pragma, if the Entity field is not set
-- for this identifier. Is it really true???
or else
Nkind (Arg_Node) = N_Attribute_Reference
or else
Special_Case (Reference) = Dummy_Class_Attribute_Designator
-- a reference to an attribute_designator
or else
Nkind (Arg_Node) = N_Attribute_Definition_Clause
-- attribute designator from an attribute definition clause
then
Result := False;
end if;
end if;
-- One more check for pragma argument. It corresponds to the
-- situation when the identifier is specific for a pragma, but in
-- the same time it is a part of other expression. This check is
-- specific to extended Import and Export pragmas applying to
-- subprograms.
if Result and then
Special_Case (Reference) = Not_A_Special_Case and then
Arg_Kind = An_Identifier and then
No (Entity (Arg_Node))
then
-- The first possibility:
--
-- pragma Import_Function (Internal => Unix_Code_Mappings,
-- External => "unix_code_mappings",
-- Result_Type => Integer,
-- Mechanism => (Value));
--
-- Value is rewritten into N_Aggregate
--
-- The second possibility:
--
-- pragma Import_Procedure (Internal => Ignore_Signal,
-- External => "ignore_signal",
-- Mechanism => (Value, Value));
--
-- Value is not rewritten and it is represented as a "normal"
-- aggregate component
--
-- And the third possibility:
--
-- pragma Export_Procedure
-- (Internal => Reset,
-- External => "",
-- Parameter_Types => (File_Type, File_Mode),
-- Mechanism => (File => Reference));
--
-- Here we have an aggregate with named associations:
if (Nkind (R_Node (Reference)) = N_Aggregate and then
(Nkind (Parent (R_Node (Reference)))) =
N_Pragma_Argument_Association)
or else
(Nkind (R_Node (Reference)) = N_Identifier
and then
not (Is_Rewrite_Substitution (R_Node (Reference)))
and then
((Nkind (Parent (R_Node (Reference))) = N_Aggregate
and then
Nkind (Parent (Parent (R_Node (Reference)))) =
N_Pragma_Argument_Association)
or else
(Nkind (Parent (R_Node (Reference))) =
N_Component_Association
and then
Nkind (Parent (Parent (R_Node (Reference)))) =
N_Aggregate
and then
Nkind (Parent (Parent (Parent ((R_Node (Reference)))))) =
N_Pragma_Argument_Association)
)
)
then
Result := False;
end if;
end if;
-- Then check for the situation when if passed a portion of a pragma
-- that may be an ambiguous reference to more than one entity.
if Result and then
Nkind (Parent (Arg_Node)) = N_Pragma_Argument_Association and then
Needs_List (Reference)
then
declare
Res_List : constant Asis.Element_List :=
Corresponding_Name_Definition_List (Reference);
begin
if Res_List'Length /= 1 then
Result := False;
end if;
end;
end if;
end if;
-- Case when the argument is a parameter of Source_File_Name pragma or
-- component thereof
if Result then
while not Is_List_Member (Arg_Node) and then
Present (Arg_Node)
loop
Arg_Node := Parent (Arg_Node);
end loop;
if Nkind (Arg_Node) = N_Pragma_Argument_Association
and then
Pragma_Name (Parent (Arg_Node)) = Name_Source_File_Name
then
Result := False;
end if;
end if;
-- Case when the argument is the (component of the) prefix of the
-- GNAT-specific attribute 'Elab_Body or 'Elab_Spec
if Result then
Arg_Node := Parent (R_Node (Reference));
while Nkind (Arg_Node) = N_Selected_Component loop
Arg_Node := Parent (Arg_Node);
end loop;
if Nkind (Arg_Node) = N_Attribute_Reference
and then
Attribute_Name (Arg_Node) in Name_Elab_Body .. Name_Elab_Spec
then
Result := False;
end if;
end if;
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Reference,
Outer_Call => Package_Name & "Is_Uniquely_Defined");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Is_Uniquely_Defined",
Ex => Ex,
Arg_Element => Reference);
end Is_Uniquely_Defined;
-------------------------------
-- Main_Unit_In_Current_Tree --
-------------------------------
function Main_Unit_In_Current_Tree
(The_Context : Asis.Context)
return Asis.Compilation_Unit
is
Curr_Tree_Id : Tree_Id;
Curr_Cont_Id : Context_Id;
Res_Unit_Id : Unit_Id := Nil_Unit;
begin
Check_Validity (The_Context, Package_Name & "Main_Unit_In_Current_Tree");
Curr_Cont_Id := Get_Current_Cont;
Curr_Tree_Id := Get_Current_Tree;
if Tree_Processing_Mode (Get_Cont_Id (The_Context)) = GNSA then
-- Note, that for GNSA Context no check is made! This works correctly
-- only for -GNSA -C1 Context and if only this Context Is_Open
-- at the moment
Res_Unit_Id := Config_Comp_Id + 1; -- ???
-- Not a good approach!!!
elsif Get_Cont_Id (The_Context) = Curr_Cont_Id and then
Curr_Cont_Id /= Nil_Context_Id and then
Present (Curr_Tree_Id)
then
Res_Unit_Id := Main_Unit_Id;
elsif Get_Cont_Id (The_Context) /= Nil_Context_Id then
Reset_Context (Get_Cont_Id (The_Context));
if Tree_Processing_Mode (Get_Cont_Id (The_Context)) = GNSA then
-- Note, that for GNSA Context no check is made! This works
-- correctly only for -GNSA -C1 Context and if only this Context
-- Is_Open at the moment
Res_Unit_Id := Config_Comp_Id + 1; -- ???
-- Not a good approach!!!
elsif Last_Tree (Get_Cont_Id (The_Context)) >= First_Tree_Id then
Res_Unit_Id := Main_Unit_Id (First_Tree_Id);
end if;
end if;
if Present (Res_Unit_Id) then
return Get_Comp_Unit (Res_Unit_Id, Get_Cont_Id (The_Context));
else
return Nil_Compilation_Unit;
end if;
exception
when ASIS_Inappropriate_Context =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Outer_Call => Package_Name & "Main_Unit_In_Current_Tree");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Main_Unit_In_Current_Tree",
Ex => Ex);
end Main_Unit_In_Current_Tree;
-----------
-- No_Op --
-----------
procedure No_Op
(Element : Asis.Element;
Control : in out Traverse_Control;
State : in out No_State)
is
begin
pragma Unreferenced (Element);
pragma Unreferenced (Control);
pragma Unreferenced (State);
null;
end No_Op;
-------------------------
-- Normalize_Reference --
-------------------------
function Normalize_Reference (Ref : Asis.Element) return Asis.Element is
Result : Asis.Element := Ref;
begin
case Expression_Kind (Ref) is
when A_Selected_Component =>
Result := Selector (Ref);
when An_Attribute_Reference =>
Result := Normalize_Reference (Prefix (Ref));
when others =>
null;
end case;
return Result;
end Normalize_Reference;
--------------------------
-- Original_Line_Number --
--------------------------
function Original_Line_Number
(Element : Asis.Element;
Compiled_Line : Line_Number_Positive)
return Line_Number
is
SFI : Source_File_Index;
Result : Line_Number := 0;
begin
Check_Validity (Element, Package_Name & "Original_Line_Number");
if Is_Text_Available (Element) then
if Compiled_Line > Line_Number (Number_Of_Lines (Element)) then
Raise_ASIS_Inappropriate_Line_Number
(Package_Name & "Original_Line_Number");
end if;
SFI := Get_Source_File_Index (Location (Element));
Result :=
Line_Number (Sinput.Physical_To_Logical
(Physical_Line_Number (Compiled_Line), SFI));
end if;
return Result;
exception
when ASIS_Inappropriate_Element | ASIS_Inappropriate_Line_Number =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Element,
Outer_Call => Package_Name & "Original_Line_Number");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Original_Line_Number",
Ex => Ex,
Arg_Element => Element);
end Original_Line_Number;
------------------------
-- Original_Text_Name --
------------------------
function Original_Text_Name
(Compilation_Unit : Asis.Compilation_Unit)
return Wide_String
is
begin
Check_Validity (Compilation_Unit, Package_Name & "Original_Text_Name");
if not Exists (Compilation_Unit) then
return Nil_Asis_Wide_String;
else
-- Exists resets the Context!
return To_Program_Text (Ref_File (Compilation_Unit));
end if;
exception
when ASIS_Inappropriate_Compilation_Unit =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Outer_Call => Package_Name & "Original_Text_Name");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Original_Text_Name",
Ex => Ex,
Arg_CU => Compilation_Unit);
end Original_Text_Name;
-----------------------------
-- Overrides_Type_Operator --
-----------------------------
function Overrides_Type_Operator
(Op_Decl : Asis.Element;
Type_Decl : Asis.Element)
return Boolean
is
pragma Unreferenced (Type_Decl);
Op_Entity : Entity_Id;
Result : Boolean := False;
begin
-- We assume that Is_Type_Operator (Op_Decl, Type_Decl) is True
-- !!! The implementation is incomplete!!!
Op_Entity := Node (Names (Op_Decl) (1));
if Present (Overridden_Operation (Op_Entity)) then
Result := True;
end if;
return Result;
end Overrides_Type_Operator;
---------------------
-- Primitive_Owner --
---------------------
function Primitive_Owner
(Declaration : Asis.Declaration)
return Asis.Type_Definition
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration);
Arg_Node : Node_Id := Empty;
Par_Node : Node_Id := Empty;
Res_Node : Node_Id := Empty;
Result : Element := Nil_Element;
Res_Kind : Internal_Element_Kinds := Not_An_Element;
begin
Check_Validity (Declaration, Package_Name & "Primitive_Owner");
if not (Arg_Kind = A_Procedure_Declaration or else
Arg_Kind = A_Null_Procedure_Declaration or else
Arg_Kind = A_Function_Declaration or else
Arg_Kind = A_Procedure_Renaming_Declaration or else
Arg_Kind = A_Function_Renaming_Declaration or else
Arg_Kind = A_Procedure_Body_Declaration or else
Arg_Kind = A_Function_Body_Declaration or else
Arg_Kind = A_Procedure_Body_Stub or else
Arg_Kind = A_Function_Body_Stub)
then
Raise_ASIS_Inappropriate_Element
(Package_Name & "Primitive_Owner",
Wrong_Kind => Arg_Kind);
end if;
if not Is_From_Implicit (Declaration) and then
Asis.Declarations.Is_Dispatching_Operation (Declaration)
then
Arg_Node := Specification (Node (Declaration));
if Nkind (Arg_Node) = N_Function_Specification then
if Has_Controlling_Result (Defining_Unit_Name (Arg_Node)) then
Res_Node := Defining_Unit_Name (Arg_Node);
Res_Node := Parent (Res_Node);
Res_Node := Sinfo.Result_Definition (Res_Node);
if Nkind (Res_Node) = N_Access_Definition then
Res_Node := Sinfo.Subtype_Mark (Res_Node);
end if;
Res_Node := Entity (Res_Node);
end if;
end if;
if No (Res_Node) then
-- This means that we do not have a function with controlling
-- result, so we have to go through the formal parameter list,
-- and it can not be No_List or empty
Par_Node := First (Parameter_Specifications (Arg_Node));
while Present (Par_Node) loop
if Is_Controlling_Formal
(Defining_Identifier (Par_Node))
then
if Nkind (Parameter_Type (Par_Node)) =
N_Access_Definition
then
Res_Node :=
Sinfo.Subtype_Mark (Parameter_Type (Par_Node));
else
Res_Node := Defining_Identifier (Par_Node);
end if;
Res_Node := Etype (Res_Node);
exit;
end if;
Par_Node := Next (Par_Node);
end loop;
end if;
pragma Assert (Present (Res_Node));
if Nkind (Parent (Res_Node)) = N_Subtype_Declaration then
Res_Node := Etype (Res_Node);
end if;
Res_Node := Parent (Res_Node);
case Nkind (Res_Node) is
when N_Private_Type_Declaration =>
if Tagged_Present (Res_Node) then
Res_Kind := A_Tagged_Private_Type_Definition;
else
-- It can be non-tagged, if the full view is tagged
Res_Kind := A_Private_Type_Definition;
end if;
when N_Private_Extension_Declaration =>
Res_Kind := A_Private_Extension_Definition;
when N_Full_Type_Declaration =>
Res_Node := Sinfo.Type_Definition (Res_Node);
when others =>
pragma Assert (False);
null;
end case;
Result := Node_To_Element_New (Node => Res_Node,
Internal_Kind => Res_Kind,
Starting_Element => Declaration);
end if;
return Result;
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Declaration,
Outer_Call => Package_Name & "Primitive_Owner");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Primitive_Owner",
Ex => Ex,
Arg_Element => Declaration);
end Primitive_Owner;
------------------------
-- Source_File_Status --
------------------------
function Source_File_Status
(Right : Asis.Compilation_Unit)
return Source_File_Statuses
is
Arg_Kind : constant Unit_Kinds := Kind (Right);
Result : Source_File_Statuses;
begin
Check_Validity (Right, Package_Name & "Source_File_Status");
case Arg_Kind is
when Not_A_Unit |
A_Nonexistent_Declaration |
A_Nonexistent_Body |
An_Unknown_Unit =>
Result := Absent;
when others =>
Result := Source_Status (Right);
end case;
return Result;
exception
when ASIS_Inappropriate_Compilation_Unit =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Outer_Call => Package_Name & "Source_File_Status");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Source_File_Status",
Ex => Ex,
Arg_CU => Right);
end Source_File_Status;
-----------------------------------
-- Static_Expression_Value_Image --
-----------------------------------
function Static_Expression_Value_Image
(Expression : Asis.Expression)
return Wide_String
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Expression);
Arg_Node : Node_Id := Empty;
Result : Uint;
Tmp_El : Asis.Element;
begin
Check_Validity
(Expression, Package_Name & "Static_Expression_Value_Image");
if Arg_Kind not in Internal_Expression_Kinds then
Raise_ASIS_Inappropriate_Element
(Package_Name & "Static_Expression_Value_Image",
Wrong_Kind => Arg_Kind);
end if;
if not (Is_True_Expression (Expression) and then
Is_Static (Expression))
then
return "";
end if;
Arg_Node := R_Node (Expression);
if Nkind (Arg_Node) = N_String_Literal then
String_To_Name_Buffer (Strval (Arg_Node));
return To_Wide_String (Name_Buffer (1 .. Name_Len));
-- elsif Nkind (Arg_Node) = N_Real_Literal then
-- begin
-- return Long_Long_Float'Wide_Image
-- (Get_LF_From_Ureal (Realval (Arg_Node)));
-- exception
-- when others => return "";
-- end;
elsif Has_Enumeration_Type (Expression) or else
Has_Integer_Type (Expression)
then
Result := Eval_Scalar_Node (Arg_Node);
UI_Image (Result, Format => Decimal);
return To_Wide_String (UI_Image_Buffer (1 .. UI_Image_Length));
else
if Expression_Kind (Expression) = A_Selected_Component then
Tmp_El := Selector (Expression);
else
Tmp_El := Expression;
end if;
if Expression_Kind (Tmp_El) = An_Identifier then
begin
Tmp_El := Corresponding_Name_Declaration (Tmp_El);
exception
when ASIS_Inappropriate_Element =>
Tmp_El := Nil_Element;
end;
if Declaration_Kind (Tmp_El) = A_Constant_Declaration then
Tmp_El := Initialization_Expression (Tmp_El);
return Static_Expression_Value_Image (Tmp_El);
end if;
end if;
end if;
return "";
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Expression,
Outer_Call => Package_Name & "Static_Expression_Value_Image");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name & "Static_Expression_Value_Image",
Ex => Ex,
Arg_Element => Expression);
end Static_Expression_Value_Image;
-----------------------------------------
-- Static_Range_High_Bound_Value_Image --
-----------------------------------------
function Static_Range_High_Bound_Value_Image
(Range_Element : Asis.Range_Constraint)
return Wide_String
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Range_Element);
Arg_Node : Node_Id := Empty;
Arg_Ekind : Entity_Kind;
Result : Uint;
begin
Check_Validity
(Range_Element, Package_Name & "Static_Range_High_Bound_Value_Image");
if not (Arg_Kind = A_Range_Attribute_Reference or else
Arg_Kind =
A_Discrete_Range_Attribute_Reference_As_Subtype_Definition
or else
Arg_Kind = A_Discrete_Range_Attribute_Reference)
then
Raise_ASIS_Inappropriate_Element
(Package_Name & "Static_Range_High_Bound_Value_Image",
Wrong_Kind => Arg_Kind);
end if;
if not (Is_Static (Range_Element)) then
return "";
end if;
Arg_Node := R_Node (Range_Element);
if Nkind (Arg_Node) = N_Range_Constraint then
Arg_Node := Range_Expression (Arg_Node);
end if;
Arg_Ekind := Ekind (Etype (Arg_Node));
if not (Arg_Ekind in Discrete_Kind) then
-- Implementation limitation!!!
return "";
end if;
Result := Eval_Scalar_Node (High_Bound (Arg_Node));
UI_Image (Result, Format => Decimal);
return To_Wide_String (UI_Image_Buffer (1 .. UI_Image_Length));
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Range_Element,
Outer_Call => Package_Name &
"Static_Range_High_Bound_Value_Image");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name &
"Static_Range_High_Bound_Value_Image",
Ex => Ex,
Arg_Element => Range_Element);
end Static_Range_High_Bound_Value_Image;
----------------------------------------
-- Static_Range_Low_Bound_Value_Image --
----------------------------------------
function Static_Range_Low_Bound_Value_Image
(Range_Element : Asis.Range_Constraint)
return Wide_String
is
Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Range_Element);
Arg_Node : Node_Id := Empty;
Arg_Ekind : Entity_Kind;
Result : Uint;
begin
Check_Validity
(Range_Element, Package_Name & "Static_Range_Low_Bound_Value_Image");
if not (Arg_Kind = A_Range_Attribute_Reference or else
Arg_Kind =
A_Discrete_Range_Attribute_Reference_As_Subtype_Definition
or else
Arg_Kind = A_Discrete_Range_Attribute_Reference)
then
Raise_ASIS_Inappropriate_Element
(Diagnosis => Package_Name & "Static_Range_Low_Bound_Value_Image",
Wrong_Kind => Arg_Kind);
end if;
if not (Is_Static (Range_Element)) then
return "";
end if;
Arg_Node := R_Node (Range_Element);
if Nkind (Arg_Node) = N_Range_Constraint then
Arg_Node := Range_Expression (Arg_Node);
end if;
Arg_Ekind := Ekind (Etype (Arg_Node));
if not (Arg_Ekind in Discrete_Kind) then
-- Implementation limitation!!!
return "";
end if;
Result := Eval_Scalar_Node (Low_Bound (Arg_Node));
UI_Image (Result, Format => Decimal);
return To_Wide_String (UI_Image_Buffer (1 .. UI_Image_Length));
exception
when ASIS_Inappropriate_Element =>
raise;
when ASIS_Failed =>
if Status_Indicator = Unhandled_Exception_Error then
Add_Call_Information
(Argument => Range_Element,
Outer_Call => Package_Name &
"Static_Range_Low_Bound_Value_Image");
end if;
raise;
when Ex : others =>
Report_ASIS_Bug
(Query_Name => Package_Name &
"Static_Range_Low_Bound_Value_Image",
Ex => Ex,
Arg_Element => Range_Element);
end Static_Range_Low_Bound_Value_Image;
end Asis.Extensions;
|
-------------------------------------------------------------------------------
-- Copyright (c) 2019, Daniel King
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code must retain the above copyright
-- notice, this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * The name of the copyright holder may not be used to endorse or promote
-- Products derived from this software without specific prior written
-- permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
with Interfaces; use Interfaces;
package body Keccak.Padding
with SPARK_Mode => On
is
---------------------------
-- Pad101_Single_Block --
---------------------------
procedure Pad101_Single_Block (Block : in out Keccak.Types.Byte_Array;
Num_Used_Bits : in Natural;
Max_Bit_Length : in Natural)
is
Last_Bit : Keccak.Types.Byte;
begin
-- Append first 1 bit
Block (Block'First + (Num_Used_Bits / 8))
:= (Block (Block'First + (Num_Used_Bits / 8)) and (2**(Num_Used_Bits mod 8) - 1))
or Shift_Left (1, Num_Used_Bits mod 8);
-- Append zeroes
Block (Block'First + (Num_Used_Bits / 8) + 1 .. Block'Last) := (others => 0);
-- Append last 1 bit
if Max_Bit_Length mod 8 = 0 then
Last_Bit := 2#1000_0000#;
else
Last_Bit := Shift_Right (2#1000_0000#, 8 - (Max_Bit_Length mod 8));
end if;
Block (Block'Last) := Block (Block'Last) or Last_Bit;
end Pad101_Single_Block;
---------------------------
-- Pad101_Multi_Blocks --
---------------------------
procedure Pad101_Multi_Blocks (First_Block : in out Keccak.Types.Byte_Array;
Num_Used_Bits : in Natural;
Max_Bit_Length : in Natural;
Next_Block : out Keccak.Types.Byte_Array;
Spilled : out Boolean)
is
Num_Free_Bits : constant Natural := Max_Bit_Length - Num_Used_Bits;
Last_Bit : Keccak.Types.Byte;
First_Bit : Keccak.Types.Byte;
begin
Next_Block := (others => 0);
if Max_Bit_Length mod 8 = 0 then
Last_Bit := 2#1000_0000#;
else
Last_Bit := Shift_Right (2#1000_0000#, 8 - (Max_Bit_Length mod 8));
end if;
First_Bit := Shift_Left (1, Num_Used_Bits mod 8);
if Num_Free_Bits >= 2 then
-- This is the case where there are at least 2 bits free in the first
-- block. In this case, there's enough space for all the padding bits.
--
-- +---------------------+---------------------+
-- | first block | next block |
-- +---------------------+---------------------+
-- |<-total len->|<-pad->|
Spilled := False;
-- Append first 1 bit
First_Block (First_Block'First + (Num_Used_Bits / 8))
:= (First_Block (First_Block'First + (Num_Used_Bits / 8)) and (First_Bit - 1))
or First_Bit;
-- Append zeroes
First_Block (First_Block'First + (Num_Used_Bits / 8) + 1 .. First_Block'Last)
:= (others => 0);
-- Append last 1 bit
First_Block (First_Block'Last) := First_Block (First_Block'Last) or Last_Bit;
else
-- This is the case where there is only 1 bit free in the first block.
-- In this case, the padding spills into another block.
--
-- +----------------+----------------+
-- | first block | next block |
-- +----------------+----------------+
-- |<--total len-->|<-------pad----->|
Spilled := True;
pragma Assert (Num_Free_Bits = 1);
-- First 1 bit
First_Block (First_Block'Last)
:= (First_Block (First_Block'Last) and (First_Bit - 1)) or First_Bit;
-- Next_Block is already padded with zeroes (see above).
-- Append last 1 bit
Next_Block (Next_Block'Last) := Last_Bit;
end if;
end Pad101_Multi_Blocks;
-----------------------------
-- XOR_Pad101_Into_State --
-----------------------------
procedure XOR_Pad101_Into_State (State : in out State_Type;
First_Bit : in Natural;
Last_Bit : in Natural) is
begin
XOR_Byte_Into_State (State => State,
Offset => First_Bit / 8,
Value => Shift_Left (1, First_Bit mod 8));
XOR_Byte_Into_State (State => State,
Offset => Last_Bit / 8,
Value => Shift_Left (1, Last_Bit mod 8));
end XOR_Pad101_Into_State;
-------------------------------------
-- Pad10_Multi_Blocks_Big_Endian --
-------------------------------------
procedure Pad10_Multi_Blocks_Big_Endian (First_Block : in out Keccak.Types.Byte_Array;
Num_Used_Bits : in Natural;
Max_Bit_Length : in Natural;
Next_Block : out Keccak.Types.Byte_Array;
Spilled : out Boolean)
is
Num_Free_Bits : constant Natural := Max_Bit_Length - Num_Used_Bits;
Pos : Keccak.Types.Index_Number;
First_Bit : Keccak.Types.Byte;
begin
Next_Block := (others => 0);
First_Bit := Shift_Right (16#80#, Num_Used_Bits mod 8);
if Num_Free_Bits >= 2 then
-- This is the case where there are at least 2 bits free in the first
-- block. In this case, there's enough space for all the padding bits.
--
-- +---------------------+---------------------+
-- | first block | next block |
-- +---------------------+---------------------+
-- |<-total len->|<-pad->|
Spilled := False;
-- Append first 1 bit
Pos := First_Block'First + (Num_Used_Bits / 8);
if Num_Used_Bits mod 8 = 0 then
First_Block (Pos) := First_Bit;
else
-- Align last bits to the MSB.
-- E.g. move 2#0000_0011# --> 2#1100_0000#
First_Block (Pos) := Shift_Left (First_Block (Pos), 8 - (Num_Used_Bits mod 8));
First_Block (Pos) := First_Block (Pos) or First_Bit;
end if;
-- Append zeroes
First_Block (First_Block'First + (Num_Used_Bits / 8) + 1 .. First_Block'Last)
:= (others => 0);
else
-- This is the case where there is only 1 bit free in the first block.
-- In this case, the padding spills into another block.
--
-- +----------------+----------------+
-- | first block | next block |
-- +----------------+----------------+
-- |<--total len-->|<-------pad----->|
Spilled := True;
pragma Assert (Num_Free_Bits = 1);
-- First 1 bit
Pos := First_Block'First + (Num_Used_Bits / 8);
if Num_Used_Bits mod 8 = 0 then
First_Block (Pos) := First_Bit;
else
-- Align last bits to the MSB.
-- E.g. move 2#0000_0011# --> 2#1100_0000#
First_Block (Pos) := Shift_Left (First_Block (Pos), 8 - (Num_Used_Bits mod 8));
First_Block (Pos) := First_Block (Pos) or First_Bit;
end if;
-- Next_Block is already padded with zeroes (see above).
end if;
end Pad10_Multi_Blocks_Big_Endian;
end Keccak.Padding;
|
------------------------------------------------------------------------------
-- --
-- Copyright (c) 2016 Vitalij Bondarenko <vibondare@gmail.com> --
-- --
------------------------------------------------------------------------------
-- --
-- The MIT License (MIT) --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, sublicense, and/or sell copies of the Software, and to --
-- permit persons to whom the Software is furnished to do so, subject to --
-- the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY --
-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, --
-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE --
-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
------------------------------------------------------------------------------
with Formatted_Output.Integer_Output;
package Formatted_Output_Natural is
new Formatted_Output.Integer_Output (Natural);
|
------------------------------------------------------------------------------
-- Copyright (c) 2013-2014, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
with Natools.S_Expressions.Encodings;
package body Natools.S_Expressions.Parsers is
----------------------
-- Parser Interface --
----------------------
procedure Reset (Self : in out Parser; Hard : in Boolean := False) is
Null_Stack : Lockable.Lock_Stack;
begin
Self.Internal := (State => Waiting);
Self.Next_Event := Events.End_Of_Input;
Self.Latest := Events.Error;
Self.Level := 0;
Self.Lock_Stack := Null_Stack;
Self.Locked := False;
if Hard then
Self.Pending.Hard_Reset;
Self.Buffer.Hard_Reset;
else
Self.Pending.Soft_Reset;
Self.Buffer.Soft_Reset;
end if;
end Reset;
overriding function Current_Event (Self : in Parser) return Events.Event is
begin
if Self.Locked then
return Events.End_Of_Input;
else
return Self.Latest;
end if;
end Current_Event;
overriding function Current_Atom (Self : in Parser) return Atom is
begin
if Self.Locked or Self.Latest /= Events.Add_Atom then
raise Program_Error;
end if;
return Self.Buffer.Data;
end Current_Atom;
overriding function Current_Level (Self : in Parser) return Natural is
begin
if Self.Locked then
return 0;
else
return Self.Level - Lockable.Current_Level (Self.Lock_Stack);
end if;
end Current_Level;
overriding procedure Query_Atom
(Self : in Parser;
Process : not null access procedure (Data : in Atom)) is
begin
if Self.Locked or Self.Latest /= Events.Add_Atom then
raise Program_Error;
end if;
Self.Buffer.Query (Process);
end Query_Atom;
overriding procedure Read_Atom
(Self : in Parser;
Data : out Atom;
Length : out Count) is
begin
if Self.Locked or Self.Latest /= Events.Add_Atom then
raise Program_Error;
end if;
Self.Buffer.Peek (Data, Length);
end Read_Atom;
overriding procedure Next
(Self : in out Parser;
Event : out Events.Event)
is
O : Octet;
begin
if Self.Locked then
Event := Events.End_Of_Input;
return;
end if;
Self.Latest := Events.Error;
loop
-- Process pending events
if Self.Next_Event /= Events.End_Of_Input then
Self.Latest := Self.Next_Event;
Self.Next_Event := Events.End_Of_Input;
case Self.Latest is
when Events.Open_List =>
Self.Level := Self.Level + 1;
when Events.Close_List =>
if Self.Level > 0 then
Self.Level := Self.Level - 1;
end if;
when others => null;
end case;
exit;
end if;
-- Read a single octet from source
if Self.Pending.Length = 0 then
Read_More (Parser'Class (Self), Self.Pending);
if Self.Pending.Length = 0 then
Self.Latest := Events.End_Of_Input;
exit;
end if;
Self.Pending.Invert;
end if;
Self.Pending.Pop (O);
-- Process octet
case Self.Internal.State is
when Waiting =>
Self.Buffer.Soft_Reset;
case O is
when 0 | Encodings.Space | Encodings.HT
| Encodings.CR | Encodings.LF
| Encodings.VT | Encodings.FF =>
null;
when Encodings.List_Begin =>
Self.Latest := Events.Open_List;
Self.Level := Self.Level + 1;
when Encodings.List_End =>
Self.Latest := Events.Close_List;
if Self.Level > 0 then
Self.Level := Self.Level - 1;
end if;
when Encodings.Base64_Atom_Begin =>
Self.Internal
:= (State => Base64_Atom,
Chunk => (Data => <>, Length => 0));
when Encodings.Base64_Expr_Begin =>
Self.Internal
:= (State => Base64_Expr,
Chunk => (Data => <>, Length => 0));
when Encodings.Hex_Atom_Begin =>
Self.Internal := (State => Hex_Atom, Nibble_Buffer => 0);
when Encodings.Quoted_Atom_Begin =>
Self.Internal :=
(State => Quoted_Atom,
Escape => (Data => <>, Length => 0));
when Encodings.Digit_0 .. Encodings.Digit_9 =>
Self.Internal := (State => Number);
Atom_Buffers.Append (Self.Buffer, O);
when others =>
Self.Internal := (State => Token);
Atom_Buffers.Append (Self.Buffer, O);
end case;
when Base64_Atom | Base64_Expr =>
if Encodings.Is_Base64_Digit (O) then
Self.Internal.Chunk.Data (Self.Internal.Chunk.Length) := O;
Self.Internal.Chunk.Length := Self.Internal.Chunk.Length + 1;
if Self.Internal.Chunk.Length = 4 then
Self.Buffer.Append
(Encodings.Decode_Base64 (Self.Internal.Chunk.Data));
Self.Internal.Chunk.Length := 0;
end if;
elsif (O = Encodings.Base64_Atom_End
and Self.Internal.State = Base64_Atom)
or (O = Encodings.Base64_Expr_End
and Self.Internal.State = Base64_Expr)
then
Self.Buffer.Append (Encodings.Decode_Base64
(Self.Internal.Chunk.Data
(0 .. Self.Internal.Chunk.Length - 1)));
if Self.Internal.State = Base64_Atom then
Self.Latest := Events.Add_Atom;
else
Self.Pending.Append_Reverse (Self.Buffer.Data);
Self.Buffer.Soft_Reset;
end if;
Self.Internal := (State => Waiting);
end if;
when Hex_Atom =>
if Encodings.Is_Hex_Digit (O) then
if Encodings.Is_Hex_Digit (Self.Internal.Nibble_Buffer) then
Self.Buffer.Append
(Encodings.Decode_Hex (Self.Internal.Nibble_Buffer, O));
Self.Internal.Nibble_Buffer := 0;
else
Self.Internal.Nibble_Buffer := O;
end if;
elsif O = Encodings.Hex_Atom_End then
Self.Latest := Events.Add_Atom;
Self.Internal := (State => Waiting);
end if;
when Number =>
case O is
when Encodings.Digit_0 .. Encodings.Digit_9 =>
Self.Buffer.Append (O);
when Encodings.Verbatim_Begin =>
Self.Internal := (State => Verbatim_Atom, Size => 0);
for I in 1 .. Self.Buffer.Length loop
Self.Internal.Size := Self.Internal.Size * 10
+ Count (Self.Buffer.Element (I)
- Encodings.Digit_0);
end loop;
Self.Buffer.Soft_Reset;
if Self.Internal.Size = 0 then
Self.Latest := Events.Add_Atom;
Self.Internal := (State => Waiting);
else
Self.Buffer.Preallocate (Self.Internal.Size);
end if;
when 0 | Encodings.Space | Encodings.HT
| Encodings.CR | Encodings.LF
| Encodings.VT | Encodings.FF =>
Self.Latest := Events.Add_Atom;
Self.Internal := (State => Waiting);
when Encodings.List_Begin =>
Self.Internal := (State => Waiting);
Self.Next_Event := Events.Open_List;
Self.Latest := Events.Add_Atom;
when Encodings.List_End =>
Self.Internal := (State => Waiting);
Self.Next_Event := Events.Close_List;
Self.Latest := Events.Add_Atom;
when Encodings.Base64_Atom_Begin =>
Self.Internal
:= (State => Base64_Atom,
Chunk => (Data => <>, Length => 0));
Self.Buffer.Soft_Reset;
when Encodings.Base64_Expr_Begin =>
Self.Internal
:= (State => Base64_Expr,
Chunk => (Data => <>, Length => 0));
Self.Buffer.Soft_Reset;
when Encodings.Hex_Atom_Begin =>
Self.Internal := (State => Hex_Atom, Nibble_Buffer => 0);
Self.Buffer.Soft_Reset;
when Encodings.Quoted_Atom_Begin =>
Self.Internal
:= (State => Quoted_Atom,
Escape => (Data => <>, Length => 0));
Self.Buffer.Soft_Reset;
when others =>
Self.Buffer.Append (O);
Self.Internal := (State => Token);
end case;
when Quoted_Atom =>
case Self.Internal.Escape.Length is
when 0 =>
case O is
when Encodings.Escape =>
Self.Internal.Escape.Data (0) := O;
Self.Internal.Escape.Length := 1;
when Encodings.Quoted_Atom_End =>
Self.Internal := (State => Waiting);
Self.Latest := Events.Add_Atom;
when others =>
Self.Buffer.Append (O);
end case;
when 1 =>
case O is
when Character'Pos ('b') =>
Self.Buffer.Append (8);
Self.Internal.Escape.Length := 0;
when Character'Pos ('t') =>
Self.Buffer.Append (9);
Self.Internal.Escape.Length := 0;
when Character'Pos ('n') =>
Self.Buffer.Append (10);
Self.Internal.Escape.Length := 0;
when Character'Pos ('v') =>
Self.Buffer.Append (11);
Self.Internal.Escape.Length := 0;
when Character'Pos ('f') =>
Self.Buffer.Append (12);
Self.Internal.Escape.Length := 0;
when Character'Pos ('r') =>
Self.Buffer.Append (13);
Self.Internal.Escape.Length := 0;
when Character'Pos (''') | Encodings.Escape
| Encodings.Quoted_Atom_End =>
Self.Buffer.Append (O);
Self.Internal.Escape.Length := 0;
when Encodings.Digit_0 .. Encodings.Digit_0 + 3
| Character'Pos ('x')
| Encodings.CR | Encodings.LF =>
Self.Internal.Escape.Data (1) := O;
Self.Internal.Escape.Length := 2;
when others =>
Self.Buffer.Append (Self.Internal.Escape.Data (0));
Self.Pending.Append (O);
Self.Internal.Escape.Length := 0;
end case;
when 2 =>
if (Self.Internal.Escape.Data (1)
in Encodings.Digit_0 .. Encodings.Digit_0 + 3
and O in Encodings.Digit_0 .. Encodings.Digit_0 + 7)
or (Self.Internal.Escape.Data (1) = Character'Pos ('x')
and then Encodings.Is_Hex_Digit (O))
then
Self.Internal.Escape.Data (2) := O;
Self.Internal.Escape.Length := 3;
elsif Self.Internal.Escape.Data (1) = Encodings.CR
or Self.Internal.Escape.Data (1) = Encodings.LF
then
Self.Internal.Escape.Length := 0;
if not ((O = Encodings.CR or O = Encodings.LF)
and O /= Self.Internal.Escape.Data (1))
then
Self.Pending.Append (O);
end if;
else
Self.Buffer.Append
((Self.Internal.Escape.Data (0),
Self.Internal.Escape.Data (1)));
Self.Pending.Append (O);
Self.Internal.Escape.Length := 0;
end if;
when 3 =>
if Self.Internal.Escape.Data (1)
= Character'Pos ('x')
then
if Encodings.Is_Hex_Digit (O) then
Self.Buffer.Append
(Encodings.Decode_Hex
(Self.Internal.Escape.Data (2), O));
else
Self.Buffer.Append
((Self.Internal.Escape.Data (0),
Self.Internal.Escape.Data (1),
Self.Internal.Escape.Data (2)));
Self.Pending.Append (O);
end if;
else
pragma Assert (Self.Internal.Escape.Data (1)
in Encodings.Digit_0 .. Encodings.Digit_0 + 3);
if O in Encodings.Digit_0 .. Encodings.Digit_0 + 7 then
Atom_Buffers.Append
(Self.Buffer,
(Self.Internal.Escape.Data (1)
- Encodings.Digit_0)
* 2**6 +
(Self.Internal.Escape.Data (2)
- Encodings.Digit_0)
* 2**3 +
(O - Encodings.Digit_0));
else
Self.Buffer.Append
((Self.Internal.Escape.Data (0),
Self.Internal.Escape.Data (1),
Self.Internal.Escape.Data (2)));
Self.Pending.Append (O);
end if;
end if;
Self.Internal.Escape.Length := 0;
when 4 =>
raise Program_Error;
end case;
when Token =>
case O is
when 0 | Encodings.Space | Encodings.HT
| Encodings.CR | Encodings.LF
| Encodings.VT | Encodings.FF =>
Self.Internal := (State => Waiting);
Self.Latest := Events.Add_Atom;
when Encodings.List_Begin =>
Self.Internal := (State => Waiting);
Self.Next_Event := Events.Open_List;
Self.Latest := Events.Add_Atom;
when Encodings.List_End =>
Self.Internal := (State => Waiting);
Self.Next_Event := Events.Close_List;
Self.Latest := Events.Add_Atom;
when others =>
Self.Buffer.Append (O);
end case;
when Verbatim_Atom =>
Self.Buffer.Append (O);
pragma Assert (Self.Buffer.Length <= Self.Internal.Size);
if Self.Buffer.Length = Self.Internal.Size then
Self.Internal := (State => Waiting);
Self.Latest := Events.Add_Atom;
end if;
end case;
exit when Self.Latest /= Events.Error;
end loop;
if Self.Latest = Events.Close_List
and then Self.Level < Lockable.Current_Level (Self.Lock_Stack)
then
Self.Locked := True;
Event := Events.End_Of_Input;
else
Event := Self.Latest;
end if;
end Next;
overriding procedure Lock
(Self : in out Parser;
State : out Lockable.Lock_State) is
begin
Lockable.Push_Level (Self.Lock_Stack, Self.Level, State);
end Lock;
overriding procedure Unlock
(Self : in out Parser;
State : in out Lockable.Lock_State;
Finish : in Boolean := True)
is
Previous_Level : constant Natural
:= Lockable.Current_Level (Self.Lock_Stack);
Event : Events.Event;
begin
Lockable.Pop_Level (Self.Lock_Stack, State);
State := Lockable.Null_State;
if Finish then
Event := Self.Current_Event;
loop
case Event is
when Events.Open_List | Events.Add_Atom =>
null;
when Events.Close_List =>
exit when Self.Level < Previous_Level;
when Events.Error | Events.End_Of_Input =>
exit;
end case;
Self.Next (Event);
end loop;
end if;
Self.Locked := Self.Level < Lockable.Current_Level (Self.Lock_Stack);
end Unlock;
-------------------
-- Stream Parser --
-------------------
overriding procedure Read_More
(Self : in out Stream_Parser;
Buffer : out Atom_Buffers.Atom_Buffer)
is
Item : Ada.Streams.Stream_Element_Array (1 .. 128);
Last : Ada.Streams.Stream_Element_Offset;
begin
Self.Input.Read (Item, Last);
if Last in Item'Range then
Buffer.Append (Item (Item'First .. Last));
end if;
end Read_More;
-------------------
-- Memory Parser --
-------------------
not overriding function Create
(Data : in Ada.Streams.Stream_Element_Array)
return Memory_Parser is
begin
return P : Memory_Parser do
P.Pending.Append (Data);
P.Pending.Invert;
end return;
end Create;
not overriding function Create_From_String
(Data : in String) return Memory_Parser is
begin
return Create (To_Atom (Data));
end Create_From_String;
end Natools.S_Expressions.Parsers;
|
package TREE_STATIC_Def is
type Int is record
Value : Integer;
end record;
procedure check (I : Int; v : integer);
One : constant Int := (Value => 1);
end;
|
<?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>rgb2yuv11</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>16</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_channels_ch1</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>in.channels.ch1</originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>2457600</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>in_channels_ch2</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>in.channels.ch2</originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>2457600</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>in_channels_ch3</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>in.channels.ch3</originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>2457600</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>in_width</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>in.width</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="_5">
<Value>
<Obj>
<type>1</type>
<id>5</id>
<name>in_height</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>in.height</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="_6">
<Value>
<Obj>
<type>1</type>
<id>6</id>
<name>out_channels_ch1</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>out.channels.ch1</originalName>
<rtlName></rtlName>
<coreName>FIFO_LUTRAM</coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_7">
<Value>
<Obj>
<type>1</type>
<id>7</id>
<name>out_channels_ch2</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>out.channels.ch2</originalName>
<rtlName></rtlName>
<coreName>FIFO_LUTRAM</coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_8">
<Value>
<Obj>
<type>1</type>
<id>8</id>
<name>out_channels_ch3</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>out.channels.ch3</originalName>
<rtlName></rtlName>
<coreName>FIFO_LUTRAM</coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_9">
<Value>
<Obj>
<type>1</type>
<id>9</id>
<name>out_width</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>out.width</originalName>
<rtlName></rtlName>
<coreName>FIFO_LUTRAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_10">
<Value>
<Obj>
<type>1</type>
<id>10</id>
<name>out_height</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>out.height</originalName>
<rtlName></rtlName>
<coreName>FIFO_LUTRAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_11">
<Value>
<Obj>
<type>1</type>
<id>11</id>
<name>Y_scale</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>8</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="_12">
<Value>
<Obj>
<type>1</type>
<id>12</id>
<name>U_scale</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>8</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="_13">
<Value>
<Obj>
<type>1</type>
<id>13</id>
<name>V_scale</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>8</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="_14">
<Value>
<Obj>
<type>1</type>
<id>14</id>
<name>Y_scale_out</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_LUTRAM</coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_15">
<Value>
<Obj>
<type>1</type>
<id>15</id>
<name>U_scale_out</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_LUTRAM</coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_16">
<Value>
<Obj>
<type>1</type>
<id>16</id>
<name>V_scale_out</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_LUTRAM</coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>93</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name>V_scale_read</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>8</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>129</item>
<item>130</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>U_scale_read</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>8</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>131</item>
<item>132</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>Y_scale_read</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>8</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>133</item>
<item>134</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>26</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>3</count>
<item_version>0</item_version>
<item>136</item>
<item>137</item>
<item>138</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>28</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>3</count>
<item_version>0</item_version>
<item>139</item>
<item>140</item>
<item>141</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>30</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>3</count>
<item_version>0</item_version>
<item>142</item>
<item>143</item>
<item>144</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>31</id>
<name>width</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>43</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second class_id="12" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="13" tracking_level="0" version="0">
<first class_id="14" tracking_level="0" version="0">
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>43</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>width</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>146</item>
<item>147</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>32</id>
<name>height</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>44</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>44</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>height</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</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>33</id>
<name></name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>45</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>45</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>151</item>
<item>152</item>
<item>153</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>34</id>
<name></name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>46</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>46</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>154</item>
<item>155</item>
<item>156</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name>cast</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>43</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>43</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>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>cast1</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>44</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>44</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>158</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>37</id>
<name>bound</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>44</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>44</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>159</item>
<item>160</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name></name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>49</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>49</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>161</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>40</id>
<name>indvar_flatten</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>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>163</item>
<item>164</item>
<item>165</item>
<item>166</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>41</id>
<name>x_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>168</item>
<item>169</item>
<item>170</item>
<item>171</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>42</id>
<name>y_i_i</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>y</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>172</item>
<item>173</item>
<item>174</item>
<item>175</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>43</id>
<name>exitcond_flatten</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>44</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>44</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>176</item>
<item>177</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>44</id>
<name>indvar_flatten_next</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>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>178</item>
<item>180</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>45</id>
<name></name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>44</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</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>181</item>
<item>182</item>
<item>183</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>47</id>
<name>x</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>49</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>49</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>x</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>185</item>
<item>186</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>50</id>
<name>exitcond_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>52</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>52</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>187</item>
<item>188</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>51</id>
<name>y_i_i_mid2</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>52</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>52</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>189</item>
<item>190</item>
<item>191</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>52</id>
<name>tmp_i_i_mid2_v</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>192</item>
<item>193</item>
<item>194</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>53</id>
<name>tmp_22</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>13</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>195</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</type>
<id>54</id>
<name>p_shl_cast</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>23</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>197</item>
<item>198</item>
<item>200</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>55</id>
<name>tmp_23</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>201</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>56</id>
<name>p_shl1_cast</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>23</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>203</item>
<item>204</item>
<item>206</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>57</id>
<name>tmp_s</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>23</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>207</item>
<item>208</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_46">
<Value>
<Obj>
<type>0</type>
<id>61</id>
<name>tmp_i_i_cast</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>23</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>209</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_47">
<Value>
<Obj>
<type>0</type>
<id>62</id>
<name>tmp_24</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>23</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>210</item>
<item>211</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_48">
<Value>
<Obj>
<type>0</type>
<id>63</id>
<name>tmp_26_cast</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</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>212</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_49">
<Value>
<Obj>
<type>0</type>
<id>64</id>
<name>in_channels_ch1_addr</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>22</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>213</item>
<item>215</item>
<item>216</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_50">
<Value>
<Obj>
<type>0</type>
<id>65</id>
<name>in_channels_ch2_addr</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>55</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>22</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>217</item>
<item>218</item>
<item>219</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_51">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name>in_channels_ch3_addr</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>56</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>56</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>22</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>220</item>
<item>221</item>
<item>222</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_52">
<Value>
<Obj>
<type>0</type>
<id>67</id>
<name>R</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>54</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>54</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>R</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>223</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_53">
<Value>
<Obj>
<type>0</type>
<id>68</id>
<name>G</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>55</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>G</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>224</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_54">
<Value>
<Obj>
<type>0</type>
<id>69</id>
<name>B</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>56</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>56</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>B</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>225</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_55">
<Value>
<Obj>
<type>0</type>
<id>70</id>
<name>tmp_40_cast14_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>226</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_56">
<Value>
<Obj>
<type>0</type>
<id>71</id>
<name>p_shl5_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>228</item>
<item>229</item>
<item>231</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_57">
<Value>
<Obj>
<type>0</type>
<id>72</id>
<name>p_shl5_cast_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>232</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_58">
<Value>
<Obj>
<type>0</type>
<id>73</id>
<name>p_shl6_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>234</item>
<item>235</item>
<item>237</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_59">
<Value>
<Obj>
<type>0</type>
<id>74</id>
<name>p_shl6_cast_i_i_cast</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>10</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>238</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_60">
<Value>
<Obj>
<type>0</type>
<id>75</id>
<name>tmp_42_cast11_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>239</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_61">
<Value>
<Obj>
<type>0</type>
<id>76</id>
<name>tmp_42_cast11_i_i_ca</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>13</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>240</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_62">
<Value>
<Obj>
<type>0</type>
<id>77</id>
<name>p_shl4_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>242</item>
<item>243</item>
<item>245</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_63">
<Value>
<Obj>
<type>0</type>
<id>78</id>
<name>p_shl4_cast_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>246</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_64">
<Value>
<Obj>
<type>0</type>
<id>79</id>
<name>tmp_44_cast10_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>13</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>247</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_65">
<Value>
<Obj>
<type>0</type>
<id>80</id>
<name>tmp_45_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>13</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>249</item>
<item>250</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_66">
<Value>
<Obj>
<type>0</type>
<id>81</id>
<name>tmp</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>10</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>252</item>
<item>253</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_67">
<Value>
<Obj>
<type>0</type>
<id>82</id>
<name>tmp_cast</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>254</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_68">
<Value>
<Obj>
<type>0</type>
<id>83</id>
<name>tmp_46_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>255</item>
<item>256</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_69">
<Value>
<Obj>
<type>0</type>
<id>84</id>
<name>tmp_46_cast_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>257</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_70">
<Value>
<Obj>
<type>0</type>
<id>85</id>
<name>tmp1</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>258</item>
<item>259</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_71">
<Value>
<Obj>
<type>0</type>
<id>86</id>
<name>tmp2</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>13</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>260</item>
<item>261</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_72">
<Value>
<Obj>
<type>0</type>
<id>87</id>
<name>tmp2_cast</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>262</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_73">
<Value>
<Obj>
<type>0</type>
<id>88</id>
<name>tmp_48_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>263</item>
<item>264</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_74">
<Value>
<Obj>
<type>0</type>
<id>89</id>
<name>tmp_50_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>266</item>
<item>267</item>
<item>269</item>
<item>271</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_75">
<Value>
<Obj>
<type>0</type>
<id>90</id>
<name>Y</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>57</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>57</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>Y</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>273</item>
<item>274</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_76">
<Value>
<Obj>
<type>0</type>
<id>91</id>
<name>tmp_51_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>276</item>
<item>277</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_77">
<Value>
<Obj>
<type>0</type>
<id>92</id>
<name>tmp_52_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>279</item>
<item>280</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_78">
<Value>
<Obj>
<type>0</type>
<id>93</id>
<name>p_shl2_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>281</item>
<item>282</item>
<item>283</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_79">
<Value>
<Obj>
<type>0</type>
<id>94</id>
<name>p_shl2_cast_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>284</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_80">
<Value>
<Obj>
<type>0</type>
<id>95</id>
<name>p_shl3_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>12</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>286</item>
<item>287</item>
<item>289</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_81">
<Value>
<Obj>
<type>0</type>
<id>96</id>
<name>p_shl3_cast7_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>13</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>290</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_82">
<Value>
<Obj>
<type>0</type>
<id>97</id>
<name>p_shl3_cast_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>291</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_83">
<Value>
<Obj>
<type>0</type>
<id>98</id>
<name>tmp_53_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>292</item>
<item>293</item>
</oprand_edges>
<opcode>sub</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_84">
<Value>
<Obj>
<type>0</type>
<id>99</id>
<name>tmp_54_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>295</item>
<item>296</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_85">
<Value>
<Obj>
<type>0</type>
<id>100</id>
<name>tmp_54_cast_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>297</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_86">
<Value>
<Obj>
<type>0</type>
<id>101</id>
<name>tmp3</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>298</item>
<item>299</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_87">
<Value>
<Obj>
<type>0</type>
<id>102</id>
<name>tmp_56_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>300</item>
<item>301</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_88">
<Value>
<Obj>
<type>0</type>
<id>103</id>
<name>tmp_58_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>302</item>
<item>303</item>
<item>304</item>
<item>305</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_89">
<Value>
<Obj>
<type>0</type>
<id>104</id>
<name>U</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>U</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>306</item>
<item>308</item>
</oprand_edges>
<opcode>xor</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_90">
<Value>
<Obj>
<type>0</type>
<id>105</id>
<name>tmp_59_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>310</item>
<item>311</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_91">
<Value>
<Obj>
<type>0</type>
<id>106</id>
<name>tmp_60_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>313</item>
<item>314</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_92">
<Value>
<Obj>
<type>0</type>
<id>107</id>
<name>p_neg_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>13</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>316</item>
<item>317</item>
</oprand_edges>
<opcode>sub</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_93">
<Value>
<Obj>
<type>0</type>
<id>108</id>
<name>p_neg_cast_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>58</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>58</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>318</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_94">
<Value>
<Obj>
<type>0</type>
<id>109</id>
<name>p_shl1_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>9</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>319</item>
<item>320</item>
<item>321</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_95">
<Value>
<Obj>
<type>0</type>
<id>110</id>
<name>p_shl1_cast_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>322</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_96">
<Value>
<Obj>
<type>0</type>
<id>111</id>
<name>tmp_61_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>323</item>
<item>324</item>
</oprand_edges>
<opcode>sub</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_97">
<Value>
<Obj>
<type>0</type>
<id>112</id>
<name>tmp_61_cast_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>325</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_98">
<Value>
<Obj>
<type>0</type>
<id>113</id>
<name>tmp_62_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>326</item>
<item>327</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_99">
<Value>
<Obj>
<type>0</type>
<id>114</id>
<name>tmp_62_cast_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>328</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_100">
<Value>
<Obj>
<type>0</type>
<id>115</id>
<name>tmp4</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>329</item>
<item>330</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_101">
<Value>
<Obj>
<type>0</type>
<id>116</id>
<name>tmp_64_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>331</item>
<item>332</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_102">
<Value>
<Obj>
<type>0</type>
<id>117</id>
<name>tmp_66_i_i</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>333</item>
<item>334</item>
<item>335</item>
<item>336</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_103">
<Value>
<Obj>
<type>0</type>
<id>118</id>
<name>V</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>59</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>59</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>337</item>
<item>338</item>
</oprand_edges>
<opcode>xor</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_104">
<Value>
<Obj>
<type>0</type>
<id>119</id>
<name></name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>60</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>340</item>
<item>341</item>
<item>342</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_105">
<Value>
<Obj>
<type>0</type>
<id>120</id>
<name></name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>343</item>
<item>344</item>
<item>345</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_106">
<Value>
<Obj>
<type>0</type>
<id>121</id>
<name></name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>62</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>62</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>346</item>
<item>347</item>
<item>348</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_107">
<Value>
<Obj>
<type>0</type>
<id>123</id>
<name>y</name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>52</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>52</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>y</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>349</item>
<item>350</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_108">
<Value>
<Obj>
<type>0</type>
<id>124</id>
<name></name>
<fileName>yuv_filter.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory>
<lineNumber>52</lineNumber>
<contextFuncName>rgb2yuv</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>yuv_filter.c</first>
<second>rgb2yuv</second>
</first>
<second>52</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>351</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_109">
<Value>
<Obj>
<type>0</type>
<id>126</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>23</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_110">
<Value>
<Obj>
<type>2</type>
<id>162</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>0</content>
</item>
<item class_id_reference="16" object_id="_111">
<Value>
<Obj>
<type>2</type>
<id>167</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>16</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_112">
<Value>
<Obj>
<type>2</type>
<id>179</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="_113">
<Value>
<Obj>
<type>2</type>
<id>184</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>16</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_114">
<Value>
<Obj>
<type>2</type>
<id>199</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>10</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_115">
<Value>
<Obj>
<type>2</type>
<id>205</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>8</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_116">
<Value>
<Obj>
<type>2</type>
<id>214</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="_117">
<Value>
<Obj>
<type>2</type>
<id>230</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="_118">
<Value>
<Obj>
<type>2</type>
<id>236</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="_119">
<Value>
<Obj>
<type>2</type>
<id>244</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>7</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_120">
<Value>
<Obj>
<type>2</type>
<id>248</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>13</bitwidth>
</Value>
<const_type>0</const_type>
<content>25</content>
</item>
<item class_id_reference="16" object_id="_121">
<Value>
<Obj>
<type>2</type>
<id>251</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>128</content>
</item>
<item class_id_reference="16" object_id="_122">
<Value>
<Obj>
<type>2</type>
<id>268</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>8</content>
</item>
<item class_id_reference="16" object_id="_123">
<Value>
<Obj>
<type>2</type>
<id>270</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>15</content>
</item>
<item class_id_reference="16" object_id="_124">
<Value>
<Obj>
<type>2</type>
<id>272</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>8</bitwidth>
</Value>
<const_type>0</const_type>
<content>16</content>
</item>
<item class_id_reference="16" object_id="_125">
<Value>
<Obj>
<type>2</type>
<id>275</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>15</bitwidth>
</Value>
<const_type>0</const_type>
<content>32730</content>
</item>
<item class_id_reference="16" object_id="_126">
<Value>
<Obj>
<type>2</type>
<id>278</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>16</bitwidth>
</Value>
<const_type>0</const_type>
<content>65462</content>
</item>
<item class_id_reference="16" object_id="_127">
<Value>
<Obj>
<type>2</type>
<id>288</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>4</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_128">
<Value>
<Obj>
<type>2</type>
<id>294</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>15</bitwidth>
</Value>
<const_type>0</const_type>
<content>128</content>
</item>
<item class_id_reference="16" object_id="_129">
<Value>
<Obj>
<type>2</type>
<id>307</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>8</bitwidth>
</Value>
<const_type>0</const_type>
<content>128</content>
</item>
<item class_id_reference="16" object_id="_130">
<Value>
<Obj>
<type>2</type>
<id>309</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>15</bitwidth>
</Value>
<const_type>0</const_type>
<content>122</content>
</item>
<item class_id_reference="16" object_id="_131">
<Value>
<Obj>
<type>2</type>
<id>312</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>16</bitwidth>
</Value>
<const_type>0</const_type>
<content>65442</content>
</item>
<item class_id_reference="16" object_id="_132">
<Value>
<Obj>
<type>2</type>
<id>315</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>13</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_133">
<Obj>
<type>3</type>
<id>39</id>
<name>entry</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>14</count>
<item_version>0</item_version>
<item>23</item>
<item>24</item>
<item>25</item>
<item>26</item>
<item>28</item>
<item>30</item>
<item>31</item>
<item>32</item>
<item>33</item>
<item>34</item>
<item>35</item>
<item>36</item>
<item>37</item>
<item>38</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_134">
<Obj>
<type>3</type>
<id>46</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>6</count>
<item_version>0</item_version>
<item>40</item>
<item>41</item>
<item>42</item>
<item>43</item>
<item>44</item>
<item>45</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_135">
<Obj>
<type>3</type>
<id>125</id>
<name>.reset</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>72</count>
<item_version>0</item_version>
<item>47</item>
<item>50</item>
<item>51</item>
<item>52</item>
<item>53</item>
<item>54</item>
<item>55</item>
<item>56</item>
<item>57</item>
<item>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>
<item>82</item>
<item>83</item>
<item>84</item>
<item>85</item>
<item>86</item>
<item>87</item>
<item>88</item>
<item>89</item>
<item>90</item>
<item>91</item>
<item>92</item>
<item>93</item>
<item>94</item>
<item>95</item>
<item>96</item>
<item>97</item>
<item>98</item>
<item>99</item>
<item>100</item>
<item>101</item>
<item>102</item>
<item>103</item>
<item>104</item>
<item>105</item>
<item>106</item>
<item>107</item>
<item>108</item>
<item>109</item>
<item>110</item>
<item>111</item>
<item>112</item>
<item>113</item>
<item>114</item>
<item>115</item>
<item>116</item>
<item>117</item>
<item>118</item>
<item>119</item>
<item>120</item>
<item>121</item>
<item>123</item>
<item>124</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_136">
<Obj>
<type>3</type>
<id>127</id>
<name>.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>1</count>
<item_version>0</item_version>
<item>126</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>169</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_137">
<id>130</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_138">
<id>132</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_139">
<id>134</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_140">
<id>137</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_141">
<id>138</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_142">
<id>140</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_143">
<id>141</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_144">
<id>143</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_145">
<id>144</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_146">
<id>147</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>31</sink_obj>
</item>
<item class_id_reference="20" object_id="_147">
<id>149</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>32</sink_obj>
</item>
<item class_id_reference="20" object_id="_148">
<id>152</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>33</sink_obj>
</item>
<item class_id_reference="20" object_id="_149">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>33</sink_obj>
</item>
<item class_id_reference="20" object_id="_150">
<id>155</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_151">
<id>156</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_152">
<id>157</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_153">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_154">
<id>159</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_155">
<id>160</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_156">
<id>161</id>
<edge_type>2</edge_type>
<source_obj>46</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_157">
<id>163</id>
<edge_type>1</edge_type>
<source_obj>162</source_obj>
<sink_obj>40</sink_obj>
</item>
<item class_id_reference="20" object_id="_158">
<id>164</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>40</sink_obj>
</item>
<item class_id_reference="20" object_id="_159">
<id>165</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>40</sink_obj>
</item>
<item class_id_reference="20" object_id="_160">
<id>166</id>
<edge_type>2</edge_type>
<source_obj>125</source_obj>
<sink_obj>40</sink_obj>
</item>
<item class_id_reference="20" object_id="_161">
<id>168</id>
<edge_type>1</edge_type>
<source_obj>167</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_162">
<id>169</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_163">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_164">
<id>171</id>
<edge_type>2</edge_type>
<source_obj>125</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_165">
<id>172</id>
<edge_type>1</edge_type>
<source_obj>167</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_166">
<id>173</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_167">
<id>174</id>
<edge_type>1</edge_type>
<source_obj>123</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_168">
<id>175</id>
<edge_type>2</edge_type>
<source_obj>125</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_169">
<id>176</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>43</sink_obj>
</item>
<item class_id_reference="20" object_id="_170">
<id>177</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>43</sink_obj>
</item>
<item class_id_reference="20" object_id="_171">
<id>178</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>44</sink_obj>
</item>
<item class_id_reference="20" object_id="_172">
<id>180</id>
<edge_type>1</edge_type>
<source_obj>179</source_obj>
<sink_obj>44</sink_obj>
</item>
<item class_id_reference="20" object_id="_173">
<id>181</id>
<edge_type>1</edge_type>
<source_obj>43</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_174">
<id>182</id>
<edge_type>2</edge_type>
<source_obj>125</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_175">
<id>183</id>
<edge_type>2</edge_type>
<source_obj>127</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_176">
<id>185</id>
<edge_type>1</edge_type>
<source_obj>184</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_177">
<id>186</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_178">
<id>187</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_179">
<id>188</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_180">
<id>189</id>
<edge_type>1</edge_type>
<source_obj>50</source_obj>
<sink_obj>51</sink_obj>
</item>
<item class_id_reference="20" object_id="_181">
<id>190</id>
<edge_type>1</edge_type>
<source_obj>167</source_obj>
<sink_obj>51</sink_obj>
</item>
<item class_id_reference="20" object_id="_182">
<id>191</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>51</sink_obj>
</item>
<item class_id_reference="20" object_id="_183">
<id>192</id>
<edge_type>1</edge_type>
<source_obj>50</source_obj>
<sink_obj>52</sink_obj>
</item>
<item class_id_reference="20" object_id="_184">
<id>193</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>52</sink_obj>
</item>
<item class_id_reference="20" object_id="_185">
<id>194</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>52</sink_obj>
</item>
<item class_id_reference="20" object_id="_186">
<id>195</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_187">
<id>198</id>
<edge_type>1</edge_type>
<source_obj>53</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_188">
<id>200</id>
<edge_type>1</edge_type>
<source_obj>199</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_189">
<id>201</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_190">
<id>204</id>
<edge_type>1</edge_type>
<source_obj>55</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_191">
<id>206</id>
<edge_type>1</edge_type>
<source_obj>205</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_192">
<id>207</id>
<edge_type>1</edge_type>
<source_obj>54</source_obj>
<sink_obj>57</sink_obj>
</item>
<item class_id_reference="20" object_id="_193">
<id>208</id>
<edge_type>1</edge_type>
<source_obj>56</source_obj>
<sink_obj>57</sink_obj>
</item>
<item class_id_reference="20" object_id="_194">
<id>209</id>
<edge_type>1</edge_type>
<source_obj>51</source_obj>
<sink_obj>61</sink_obj>
</item>
<item class_id_reference="20" object_id="_195">
<id>210</id>
<edge_type>1</edge_type>
<source_obj>61</source_obj>
<sink_obj>62</sink_obj>
</item>
<item class_id_reference="20" object_id="_196">
<id>211</id>
<edge_type>1</edge_type>
<source_obj>57</source_obj>
<sink_obj>62</sink_obj>
</item>
<item class_id_reference="20" object_id="_197">
<id>212</id>
<edge_type>1</edge_type>
<source_obj>62</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_198">
<id>213</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>64</sink_obj>
</item>
<item class_id_reference="20" object_id="_199">
<id>215</id>
<edge_type>1</edge_type>
<source_obj>214</source_obj>
<sink_obj>64</sink_obj>
</item>
<item class_id_reference="20" object_id="_200">
<id>216</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>64</sink_obj>
</item>
<item class_id_reference="20" object_id="_201">
<id>217</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>65</sink_obj>
</item>
<item class_id_reference="20" object_id="_202">
<id>218</id>
<edge_type>1</edge_type>
<source_obj>214</source_obj>
<sink_obj>65</sink_obj>
</item>
<item class_id_reference="20" object_id="_203">
<id>219</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>65</sink_obj>
</item>
<item class_id_reference="20" object_id="_204">
<id>220</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_205">
<id>221</id>
<edge_type>1</edge_type>
<source_obj>214</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_206">
<id>222</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_207">
<id>223</id>
<edge_type>1</edge_type>
<source_obj>64</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_208">
<id>224</id>
<edge_type>1</edge_type>
<source_obj>65</source_obj>
<sink_obj>68</sink_obj>
</item>
<item class_id_reference="20" object_id="_209">
<id>225</id>
<edge_type>1</edge_type>
<source_obj>66</source_obj>
<sink_obj>69</sink_obj>
</item>
<item class_id_reference="20" object_id="_210">
<id>226</id>
<edge_type>1</edge_type>
<source_obj>67</source_obj>
<sink_obj>70</sink_obj>
</item>
<item class_id_reference="20" object_id="_211">
<id>229</id>
<edge_type>1</edge_type>
<source_obj>67</source_obj>
<sink_obj>71</sink_obj>
</item>
<item class_id_reference="20" object_id="_212">
<id>231</id>
<edge_type>1</edge_type>
<source_obj>230</source_obj>
<sink_obj>71</sink_obj>
</item>
<item class_id_reference="20" object_id="_213">
<id>232</id>
<edge_type>1</edge_type>
<source_obj>71</source_obj>
<sink_obj>72</sink_obj>
</item>
<item class_id_reference="20" object_id="_214">
<id>235</id>
<edge_type>1</edge_type>
<source_obj>67</source_obj>
<sink_obj>73</sink_obj>
</item>
<item class_id_reference="20" object_id="_215">
<id>237</id>
<edge_type>1</edge_type>
<source_obj>236</source_obj>
<sink_obj>73</sink_obj>
</item>
<item class_id_reference="20" object_id="_216">
<id>238</id>
<edge_type>1</edge_type>
<source_obj>73</source_obj>
<sink_obj>74</sink_obj>
</item>
<item class_id_reference="20" object_id="_217">
<id>239</id>
<edge_type>1</edge_type>
<source_obj>68</source_obj>
<sink_obj>75</sink_obj>
</item>
<item class_id_reference="20" object_id="_218">
<id>240</id>
<edge_type>1</edge_type>
<source_obj>68</source_obj>
<sink_obj>76</sink_obj>
</item>
<item class_id_reference="20" object_id="_219">
<id>243</id>
<edge_type>1</edge_type>
<source_obj>68</source_obj>
<sink_obj>77</sink_obj>
</item>
<item class_id_reference="20" object_id="_220">
<id>245</id>
<edge_type>1</edge_type>
<source_obj>244</source_obj>
<sink_obj>77</sink_obj>
</item>
<item class_id_reference="20" object_id="_221">
<id>246</id>
<edge_type>1</edge_type>
<source_obj>77</source_obj>
<sink_obj>78</sink_obj>
</item>
<item class_id_reference="20" object_id="_222">
<id>247</id>
<edge_type>1</edge_type>
<source_obj>69</source_obj>
<sink_obj>79</sink_obj>
</item>
<item class_id_reference="20" object_id="_223">
<id>249</id>
<edge_type>1</edge_type>
<source_obj>248</source_obj>
<sink_obj>80</sink_obj>
</item>
<item class_id_reference="20" object_id="_224">
<id>250</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>80</sink_obj>
</item>
<item class_id_reference="20" object_id="_225">
<id>252</id>
<edge_type>1</edge_type>
<source_obj>251</source_obj>
<sink_obj>81</sink_obj>
</item>
<item class_id_reference="20" object_id="_226">
<id>253</id>
<edge_type>1</edge_type>
<source_obj>74</source_obj>
<sink_obj>81</sink_obj>
</item>
<item class_id_reference="20" object_id="_227">
<id>254</id>
<edge_type>1</edge_type>
<source_obj>81</source_obj>
<sink_obj>82</sink_obj>
</item>
<item class_id_reference="20" object_id="_228">
<id>255</id>
<edge_type>1</edge_type>
<source_obj>82</source_obj>
<sink_obj>83</sink_obj>
</item>
<item class_id_reference="20" object_id="_229">
<id>256</id>
<edge_type>1</edge_type>
<source_obj>72</source_obj>
<sink_obj>83</sink_obj>
</item>
<item class_id_reference="20" object_id="_230">
<id>257</id>
<edge_type>1</edge_type>
<source_obj>83</source_obj>
<sink_obj>84</sink_obj>
</item>
<item class_id_reference="20" object_id="_231">
<id>258</id>
<edge_type>1</edge_type>
<source_obj>78</source_obj>
<sink_obj>85</sink_obj>
</item>
<item class_id_reference="20" object_id="_232">
<id>259</id>
<edge_type>1</edge_type>
<source_obj>84</source_obj>
<sink_obj>85</sink_obj>
</item>
<item class_id_reference="20" object_id="_233">
<id>260</id>
<edge_type>1</edge_type>
<source_obj>80</source_obj>
<sink_obj>86</sink_obj>
</item>
<item class_id_reference="20" object_id="_234">
<id>261</id>
<edge_type>1</edge_type>
<source_obj>76</source_obj>
<sink_obj>86</sink_obj>
</item>
<item class_id_reference="20" object_id="_235">
<id>262</id>
<edge_type>1</edge_type>
<source_obj>86</source_obj>
<sink_obj>87</sink_obj>
</item>
<item class_id_reference="20" object_id="_236">
<id>263</id>
<edge_type>1</edge_type>
<source_obj>87</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_237">
<id>264</id>
<edge_type>1</edge_type>
<source_obj>85</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_238">
<id>267</id>
<edge_type>1</edge_type>
<source_obj>88</source_obj>
<sink_obj>89</sink_obj>
</item>
<item class_id_reference="20" object_id="_239">
<id>269</id>
<edge_type>1</edge_type>
<source_obj>268</source_obj>
<sink_obj>89</sink_obj>
</item>
<item class_id_reference="20" object_id="_240">
<id>271</id>
<edge_type>1</edge_type>
<source_obj>270</source_obj>
<sink_obj>89</sink_obj>
</item>
<item class_id_reference="20" object_id="_241">
<id>273</id>
<edge_type>1</edge_type>
<source_obj>272</source_obj>
<sink_obj>90</sink_obj>
</item>
<item class_id_reference="20" object_id="_242">
<id>274</id>
<edge_type>1</edge_type>
<source_obj>89</source_obj>
<sink_obj>90</sink_obj>
</item>
<item class_id_reference="20" object_id="_243">
<id>276</id>
<edge_type>1</edge_type>
<source_obj>275</source_obj>
<sink_obj>91</sink_obj>
</item>
<item class_id_reference="20" object_id="_244">
<id>277</id>
<edge_type>1</edge_type>
<source_obj>70</source_obj>
<sink_obj>91</sink_obj>
</item>
<item class_id_reference="20" object_id="_245">
<id>279</id>
<edge_type>1</edge_type>
<source_obj>278</source_obj>
<sink_obj>92</sink_obj>
</item>
<item class_id_reference="20" object_id="_246">
<id>280</id>
<edge_type>1</edge_type>
<source_obj>75</source_obj>
<sink_obj>92</sink_obj>
</item>
<item class_id_reference="20" object_id="_247">
<id>282</id>
<edge_type>1</edge_type>
<source_obj>69</source_obj>
<sink_obj>93</sink_obj>
</item>
<item class_id_reference="20" object_id="_248">
<id>283</id>
<edge_type>1</edge_type>
<source_obj>244</source_obj>
<sink_obj>93</sink_obj>
</item>
<item class_id_reference="20" object_id="_249">
<id>284</id>
<edge_type>1</edge_type>
<source_obj>93</source_obj>
<sink_obj>94</sink_obj>
</item>
<item class_id_reference="20" object_id="_250">
<id>287</id>
<edge_type>1</edge_type>
<source_obj>69</source_obj>
<sink_obj>95</sink_obj>
</item>
<item class_id_reference="20" object_id="_251">
<id>289</id>
<edge_type>1</edge_type>
<source_obj>288</source_obj>
<sink_obj>95</sink_obj>
</item>
<item class_id_reference="20" object_id="_252">
<id>290</id>
<edge_type>1</edge_type>
<source_obj>95</source_obj>
<sink_obj>96</sink_obj>
</item>
<item class_id_reference="20" object_id="_253">
<id>291</id>
<edge_type>1</edge_type>
<source_obj>95</source_obj>
<sink_obj>97</sink_obj>
</item>
<item class_id_reference="20" object_id="_254">
<id>292</id>
<edge_type>1</edge_type>
<source_obj>94</source_obj>
<sink_obj>98</sink_obj>
</item>
<item class_id_reference="20" object_id="_255">
<id>293</id>
<edge_type>1</edge_type>
<source_obj>97</source_obj>
<sink_obj>98</sink_obj>
</item>
<item class_id_reference="20" object_id="_256">
<id>295</id>
<edge_type>1</edge_type>
<source_obj>294</source_obj>
<sink_obj>99</sink_obj>
</item>
<item class_id_reference="20" object_id="_257">
<id>296</id>
<edge_type>1</edge_type>
<source_obj>91</source_obj>
<sink_obj>99</sink_obj>
</item>
<item class_id_reference="20" object_id="_258">
<id>297</id>
<edge_type>1</edge_type>
<source_obj>99</source_obj>
<sink_obj>100</sink_obj>
</item>
<item class_id_reference="20" object_id="_259">
<id>298</id>
<edge_type>1</edge_type>
<source_obj>98</source_obj>
<sink_obj>101</sink_obj>
</item>
<item class_id_reference="20" object_id="_260">
<id>299</id>
<edge_type>1</edge_type>
<source_obj>100</source_obj>
<sink_obj>101</sink_obj>
</item>
<item class_id_reference="20" object_id="_261">
<id>300</id>
<edge_type>1</edge_type>
<source_obj>101</source_obj>
<sink_obj>102</sink_obj>
</item>
<item class_id_reference="20" object_id="_262">
<id>301</id>
<edge_type>1</edge_type>
<source_obj>92</source_obj>
<sink_obj>102</sink_obj>
</item>
<item class_id_reference="20" object_id="_263">
<id>303</id>
<edge_type>1</edge_type>
<source_obj>102</source_obj>
<sink_obj>103</sink_obj>
</item>
<item class_id_reference="20" object_id="_264">
<id>304</id>
<edge_type>1</edge_type>
<source_obj>268</source_obj>
<sink_obj>103</sink_obj>
</item>
<item class_id_reference="20" object_id="_265">
<id>305</id>
<edge_type>1</edge_type>
<source_obj>270</source_obj>
<sink_obj>103</sink_obj>
</item>
<item class_id_reference="20" object_id="_266">
<id>306</id>
<edge_type>1</edge_type>
<source_obj>103</source_obj>
<sink_obj>104</sink_obj>
</item>
<item class_id_reference="20" object_id="_267">
<id>308</id>
<edge_type>1</edge_type>
<source_obj>307</source_obj>
<sink_obj>104</sink_obj>
</item>
<item class_id_reference="20" object_id="_268">
<id>310</id>
<edge_type>1</edge_type>
<source_obj>309</source_obj>
<sink_obj>105</sink_obj>
</item>
<item class_id_reference="20" object_id="_269">
<id>311</id>
<edge_type>1</edge_type>
<source_obj>70</source_obj>
<sink_obj>105</sink_obj>
</item>
<item class_id_reference="20" object_id="_270">
<id>313</id>
<edge_type>1</edge_type>
<source_obj>312</source_obj>
<sink_obj>106</sink_obj>
</item>
<item class_id_reference="20" object_id="_271">
<id>314</id>
<edge_type>1</edge_type>
<source_obj>75</source_obj>
<sink_obj>106</sink_obj>
</item>
<item class_id_reference="20" object_id="_272">
<id>316</id>
<edge_type>1</edge_type>
<source_obj>315</source_obj>
<sink_obj>107</sink_obj>
</item>
<item class_id_reference="20" object_id="_273">
<id>317</id>
<edge_type>1</edge_type>
<source_obj>96</source_obj>
<sink_obj>107</sink_obj>
</item>
<item class_id_reference="20" object_id="_274">
<id>318</id>
<edge_type>1</edge_type>
<source_obj>107</source_obj>
<sink_obj>108</sink_obj>
</item>
<item class_id_reference="20" object_id="_275">
<id>320</id>
<edge_type>1</edge_type>
<source_obj>69</source_obj>
<sink_obj>109</sink_obj>
</item>
<item class_id_reference="20" object_id="_276">
<id>321</id>
<edge_type>1</edge_type>
<source_obj>236</source_obj>
<sink_obj>109</sink_obj>
</item>
<item class_id_reference="20" object_id="_277">
<id>322</id>
<edge_type>1</edge_type>
<source_obj>109</source_obj>
<sink_obj>110</sink_obj>
</item>
<item class_id_reference="20" object_id="_278">
<id>323</id>
<edge_type>1</edge_type>
<source_obj>108</source_obj>
<sink_obj>111</sink_obj>
</item>
<item class_id_reference="20" object_id="_279">
<id>324</id>
<edge_type>1</edge_type>
<source_obj>110</source_obj>
<sink_obj>111</sink_obj>
</item>
<item class_id_reference="20" object_id="_280">
<id>325</id>
<edge_type>1</edge_type>
<source_obj>111</source_obj>
<sink_obj>112</sink_obj>
</item>
<item class_id_reference="20" object_id="_281">
<id>326</id>
<edge_type>1</edge_type>
<source_obj>294</source_obj>
<sink_obj>113</sink_obj>
</item>
<item class_id_reference="20" object_id="_282">
<id>327</id>
<edge_type>1</edge_type>
<source_obj>105</source_obj>
<sink_obj>113</sink_obj>
</item>
<item class_id_reference="20" object_id="_283">
<id>328</id>
<edge_type>1</edge_type>
<source_obj>113</source_obj>
<sink_obj>114</sink_obj>
</item>
<item class_id_reference="20" object_id="_284">
<id>329</id>
<edge_type>1</edge_type>
<source_obj>114</source_obj>
<sink_obj>115</sink_obj>
</item>
<item class_id_reference="20" object_id="_285">
<id>330</id>
<edge_type>1</edge_type>
<source_obj>112</source_obj>
<sink_obj>115</sink_obj>
</item>
<item class_id_reference="20" object_id="_286">
<id>331</id>
<edge_type>1</edge_type>
<source_obj>115</source_obj>
<sink_obj>116</sink_obj>
</item>
<item class_id_reference="20" object_id="_287">
<id>332</id>
<edge_type>1</edge_type>
<source_obj>106</source_obj>
<sink_obj>116</sink_obj>
</item>
<item class_id_reference="20" object_id="_288">
<id>334</id>
<edge_type>1</edge_type>
<source_obj>116</source_obj>
<sink_obj>117</sink_obj>
</item>
<item class_id_reference="20" object_id="_289">
<id>335</id>
<edge_type>1</edge_type>
<source_obj>268</source_obj>
<sink_obj>117</sink_obj>
</item>
<item class_id_reference="20" object_id="_290">
<id>336</id>
<edge_type>1</edge_type>
<source_obj>270</source_obj>
<sink_obj>117</sink_obj>
</item>
<item class_id_reference="20" object_id="_291">
<id>337</id>
<edge_type>1</edge_type>
<source_obj>117</source_obj>
<sink_obj>118</sink_obj>
</item>
<item class_id_reference="20" object_id="_292">
<id>338</id>
<edge_type>1</edge_type>
<source_obj>307</source_obj>
<sink_obj>118</sink_obj>
</item>
<item class_id_reference="20" object_id="_293">
<id>341</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>119</sink_obj>
</item>
<item class_id_reference="20" object_id="_294">
<id>342</id>
<edge_type>1</edge_type>
<source_obj>90</source_obj>
<sink_obj>119</sink_obj>
</item>
<item class_id_reference="20" object_id="_295">
<id>344</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>120</sink_obj>
</item>
<item class_id_reference="20" object_id="_296">
<id>345</id>
<edge_type>1</edge_type>
<source_obj>104</source_obj>
<sink_obj>120</sink_obj>
</item>
<item class_id_reference="20" object_id="_297">
<id>347</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>121</sink_obj>
</item>
<item class_id_reference="20" object_id="_298">
<id>348</id>
<edge_type>1</edge_type>
<source_obj>118</source_obj>
<sink_obj>121</sink_obj>
</item>
<item class_id_reference="20" object_id="_299">
<id>349</id>
<edge_type>1</edge_type>
<source_obj>184</source_obj>
<sink_obj>123</sink_obj>
</item>
<item class_id_reference="20" object_id="_300">
<id>350</id>
<edge_type>1</edge_type>
<source_obj>51</source_obj>
<sink_obj>123</sink_obj>
</item>
<item class_id_reference="20" object_id="_301">
<id>351</id>
<edge_type>2</edge_type>
<source_obj>46</source_obj>
<sink_obj>124</sink_obj>
</item>
<item class_id_reference="20" object_id="_302">
<id>523</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_303">
<id>524</id>
<edge_type>2</edge_type>
<source_obj>46</source_obj>
<sink_obj>127</sink_obj>
</item>
<item class_id_reference="20" object_id="_304">
<id>525</id>
<edge_type>2</edge_type>
<source_obj>46</source_obj>
<sink_obj>125</sink_obj>
</item>
<item class_id_reference="20" object_id="_305">
<id>526</id>
<edge_type>2</edge_type>
<source_obj>125</source_obj>
<sink_obj>46</sink_obj>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_306">
<mId>1</mId>
<mTag>rgb2yuv11</mTag>
<mType>0</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>4</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>2457609</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_307">
<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>39</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="_308">
<mId>3</mId>
<mTag>RGB2YUV_LOOP_X_RGB2YUV_LOOP_Y</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>46</item>
<item>125</item>
</basic_blocks>
<mII>1</mII>
<mDepth>9</mDepth>
<mMinTripCount>40000</mMinTripCount>
<mMaxTripCount>2457600</mMaxTripCount>
<mMinLatency>2457607</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_309">
<mId>4</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>127</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="_310">
<states class_id="25" tracking_level="0" version="0">
<count>11</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_311">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>22</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_312">
<id>17</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_313">
<id>18</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_314">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_315">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_316">
<id>21</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_317">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_318">
<id>23</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_319">
<id>24</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_320">
<id>25</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_321">
<id>26</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_322">
<id>27</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_323">
<id>28</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_324">
<id>29</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_325">
<id>30</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_326">
<id>31</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_327">
<id>32</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_328">
<id>33</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_329">
<id>34</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_330">
<id>35</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_331">
<id>36</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_332">
<id>37</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_333">
<id>38</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_334">
<id>2</id>
<operations>
<count>12</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_335">
<id>40</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_336">
<id>41</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_337">
<id>42</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_338">
<id>43</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_339">
<id>44</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_340">
<id>45</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_341">
<id>47</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_342">
<id>50</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_343">
<id>51</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_344">
<id>52</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_345">
<id>53</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_346">
<id>55</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_347">
<id>3</id>
<operations>
<count>6</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_348">
<id>54</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_349">
<id>56</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_350">
<id>57</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_351">
<id>61</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_352">
<id>62</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_353">
<id>123</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_354">
<id>4</id>
<operations>
<count>7</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_355">
<id>63</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_356">
<id>64</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_357">
<id>65</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_358">
<id>66</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_359">
<id>67</id>
<stage>4</stage>
<latency>4</latency>
</item>
<item class_id_reference="28" object_id="_360">
<id>68</id>
<stage>4</stage>
<latency>4</latency>
</item>
<item class_id_reference="28" object_id="_361">
<id>69</id>
<stage>4</stage>
<latency>4</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_362">
<id>5</id>
<operations>
<count>3</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_363">
<id>67</id>
<stage>3</stage>
<latency>4</latency>
</item>
<item class_id_reference="28" object_id="_364">
<id>68</id>
<stage>3</stage>
<latency>4</latency>
</item>
<item class_id_reference="28" object_id="_365">
<id>69</id>
<stage>3</stage>
<latency>4</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_366">
<id>6</id>
<operations>
<count>3</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_367">
<id>67</id>
<stage>2</stage>
<latency>4</latency>
</item>
<item class_id_reference="28" object_id="_368">
<id>68</id>
<stage>2</stage>
<latency>4</latency>
</item>
<item class_id_reference="28" object_id="_369">
<id>69</id>
<stage>2</stage>
<latency>4</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_370">
<id>7</id>
<operations>
<count>6</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_371">
<id>67</id>
<stage>1</stage>
<latency>4</latency>
</item>
<item class_id_reference="28" object_id="_372">
<id>68</id>
<stage>1</stage>
<latency>4</latency>
</item>
<item class_id_reference="28" object_id="_373">
<id>69</id>
<stage>1</stage>
<latency>4</latency>
</item>
<item class_id_reference="28" object_id="_374">
<id>73</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_375">
<id>74</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_376">
<id>81</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_377">
<id>8</id>
<operations>
<count>33</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_378">
<id>70</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_379">
<id>71</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_380">
<id>72</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_381">
<id>76</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_382">
<id>77</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_383">
<id>78</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_384">
<id>79</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_385">
<id>80</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_386">
<id>82</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_387">
<id>83</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_388">
<id>84</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_389">
<id>85</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_390">
<id>86</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_391">
<id>87</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_392">
<id>88</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_393">
<id>89</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_394">
<id>91</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_395">
<id>93</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_396">
<id>94</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_397">
<id>95</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_398">
<id>96</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_399">
<id>97</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_400">
<id>98</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_401">
<id>99</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_402">
<id>100</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_403">
<id>101</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_404">
<id>105</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_405">
<id>107</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_406">
<id>108</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_407">
<id>109</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_408">
<id>110</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_409">
<id>111</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_410">
<id>113</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_411">
<id>9</id>
<operations>
<count>10</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_412">
<id>75</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_413">
<id>92</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_414">
<id>102</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_415">
<id>103</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_416">
<id>106</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_417">
<id>112</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_418">
<id>114</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_419">
<id>115</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_420">
<id>116</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_421">
<id>117</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_422">
<id>10</id>
<operations>
<count>13</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_423">
<id>48</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_424">
<id>49</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_425">
<id>58</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_426">
<id>59</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_427">
<id>60</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_428">
<id>90</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_429">
<id>104</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_430">
<id>118</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_431">
<id>119</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_432">
<id>120</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_433">
<id>121</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_434">
<id>122</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_435">
<id>124</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_436">
<id>11</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_437">
<id>126</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>11</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_438">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>23</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="_439">
<inState>3</inState>
<outState>4</outState>
<condition>
<id>38</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="_440">
<inState>4</inState>
<outState>5</outState>
<condition>
<id>39</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="_441">
<inState>5</inState>
<outState>6</outState>
<condition>
<id>40</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="_442">
<inState>6</inState>
<outState>7</outState>
<condition>
<id>41</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="_443">
<inState>7</inState>
<outState>8</outState>
<condition>
<id>42</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="_444">
<inState>8</inState>
<outState>9</outState>
<condition>
<id>43</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="_445">
<inState>9</inState>
<outState>10</outState>
<condition>
<id>44</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="_446">
<inState>10</inState>
<outState>2</outState>
<condition>
<id>45</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="_447">
<inState>2</inState>
<outState>11</outState>
<condition>
<id>37</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>43</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_448">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>46</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>43</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>93</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>23</first>
<second class_id="39" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>31</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>32</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>33</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>34</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>37</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>38</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>41</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>42</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>43</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>44</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>47</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>52</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>53</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>55</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>56</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>61</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>64</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>65</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>67</first>
<second>
<first>3</first>
<second>3</second>
</second>
</item>
<item>
<first>68</first>
<second>
<first>3</first>
<second>3</second>
</second>
</item>
<item>
<first>69</first>
<second>
<first>3</first>
<second>3</second>
</second>
</item>
<item>
<first>70</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>71</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>72</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>73</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>74</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>75</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>76</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>77</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>78</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>79</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>80</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>81</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>82</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>83</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>84</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>85</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>86</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>87</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>88</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>89</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>90</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>91</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>92</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>93</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>94</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>95</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>96</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>97</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>98</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>99</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>100</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>101</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>102</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>103</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>104</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>105</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>106</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>107</first>
<second>
<first>7</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>8</first>
<second>0</second>
</second>
</item>
<item>
<first>113</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>114</first>
<second>
<first>8</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>9</first>
<second>0</second>
</second>
</item>
<item>
<first>121</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>123</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>124</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>126</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="40" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="41" tracking_level="0" version="0">
<first>39</first>
<second class_id="42" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>46</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>125</first>
<second>
<first>1</first>
<second>9</second>
</second>
</item>
<item>
<first>127</first>
<second>
<first>2</first>
<second>2</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="_449">
<region_name>RGB2YUV_LOOP_X_RGB2YUV_LOOP_Y</region_name>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>46</item>
<item>125</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>9</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="45" tracking_level="0" version="0">
<count>84</count>
<item_version>0</item_version>
<item class_id="46" tracking_level="0" version="0">
<first>134</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>140</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>146</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>152</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>160</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>168</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>176</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>182</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>188</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>196</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>204</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>119</item>
</second>
</item>
<item>
<first>211</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>120</item>
</second>
</item>
<item>
<first>218</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>121</item>
</second>
</item>
<item>
<first>225</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>232</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>239</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</second>
</item>
<item>
<first>246</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>67</item>
<item>67</item>
<item>67</item>
<item>67</item>
</second>
</item>
<item>
<first>251</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>68</item>
<item>68</item>
<item>68</item>
<item>68</item>
</second>
</item>
<item>
<first>256</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>69</item>
<item>69</item>
<item>69</item>
<item>69</item>
</second>
</item>
<item>
<first>265</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>276</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>287</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>42</item>
</second>
</item>
<item>
<first>294</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>298</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>302</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>307</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
<item>
<first>313</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>47</item>
</second>
</item>
<item>
<first>319</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>50</item>
</second>
</item>
<item>
<first>324</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>332</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>340</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</second>
</item>
<item>
<first>344</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>348</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>54</item>
</second>
</item>
<item>
<first>355</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>56</item>
</second>
</item>
<item>
<first>362</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>57</item>
</second>
</item>
<item>
<first>368</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>371</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>62</item>
</second>
</item>
<item>
<first>377</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>123</item>
</second>
</item>
<item>
<first>382</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>63</item>
</second>
</item>
<item>
<first>388</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</second>
</item>
<item>
<first>396</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>74</item>
</second>
</item>
<item>
<first>400</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>81</item>
</second>
</item>
<item>
<first>406</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>70</item>
</second>
</item>
<item>
<first>409</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>71</item>
</second>
</item>
<item>
<first>416</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>420</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>76</item>
</second>
</item>
<item>
<first>423</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>430</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>78</item>
</second>
</item>
<item>
<first>434</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>437</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>82</item>
</second>
</item>
<item>
<first>440</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>83</item>
</second>
</item>
<item>
<first>446</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>450</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>85</item>
</second>
</item>
<item>
<first>456</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>87</item>
</second>
</item>
<item>
<first>459</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
<item>
<first>465</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>475</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>93</item>
</second>
</item>
<item>
<first>482</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>94</item>
</second>
</item>
<item>
<first>486</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>95</item>
</second>
</item>
<item>
<first>493</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>96</item>
</second>
</item>
<item>
<first>497</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>97</item>
</second>
</item>
<item>
<first>501</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>98</item>
</second>
</item>
<item>
<first>507</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>100</item>
</second>
</item>
<item>
<first>510</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>101</item>
</second>
</item>
<item>
<first>516</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>107</item>
</second>
</item>
<item>
<first>522</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>108</item>
</second>
</item>
<item>
<first>526</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>109</item>
</second>
</item>
<item>
<first>533</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>110</item>
</second>
</item>
<item>
<first>537</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>111</item>
</second>
</item>
<item>
<first>543</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>75</item>
</second>
</item>
<item>
<first>546</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>103</item>
</second>
</item>
<item>
<first>555</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>112</item>
</second>
</item>
<item>
<first>558</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>114</item>
</second>
</item>
<item>
<first>561</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>115</item>
</second>
</item>
<item>
<first>567</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>117</item>
</second>
</item>
<item>
<first>576</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>90</item>
</second>
</item>
<item>
<first>582</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</second>
</item>
<item>
<first>588</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>118</item>
</second>
</item>
<item>
<first>594</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>600</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>80</item>
<item>86</item>
</second>
</item>
<item>
<first>609</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>91</item>
<item>99</item>
</second>
</item>
<item>
<first>618</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>105</item>
<item>113</item>
</second>
</item>
<item>
<first>626</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>92</item>
<item>102</item>
</second>
</item>
<item>
<first>634</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>106</item>
<item>116</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="48" tracking_level="0" version="0">
<count>68</count>
<item_version>0</item_version>
<item class_id="49" tracking_level="0" version="0">
<first>U_fu_582</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</second>
</item>
<item>
<first>V_fu_588</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>118</item>
</second>
</item>
<item>
<first>Y_fu_576</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>90</item>
</second>
</item>
<item>
<first>bound_fu_594</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>cast1_fu_298</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>cast_fu_294</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>exitcond_flatten_fu_302</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>exitcond_i_i_fu_319</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>50</item>
</second>
</item>
<item>
<first>grp_fu_600</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>80</item>
<item>86</item>
</second>
</item>
<item>
<first>grp_fu_609</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>91</item>
<item>99</item>
</second>
</item>
<item>
<first>grp_fu_618</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>105</item>
<item>113</item>
</second>
</item>
<item>
<first>grp_fu_626</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>92</item>
<item>102</item>
</second>
</item>
<item>
<first>grp_fu_634</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>106</item>
<item>116</item>
</second>
</item>
<item>
<first>in_channels_ch1_addr_gep_fu_225</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>in_channels_ch2_addr_gep_fu_232</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>in_channels_ch3_addr_gep_fu_239</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</second>
</item>
<item>
<first>indvar_flatten_next_fu_307</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
<item>
<first>indvar_flatten_phi_fu_265</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>p_neg_cast_i_i_fu_522</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>108</item>
</second>
</item>
<item>
<first>p_neg_i_i_fu_516</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>107</item>
</second>
</item>
<item>
<first>p_shl1_cast_fu_355</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>56</item>
</second>
</item>
<item>
<first>p_shl1_cast_i_i_fu_533</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>110</item>
</second>
</item>
<item>
<first>p_shl1_i_i_fu_526</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>109</item>
</second>
</item>
<item>
<first>p_shl2_cast_i_i_fu_482</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>94</item>
</second>
</item>
<item>
<first>p_shl2_i_i_fu_475</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>93</item>
</second>
</item>
<item>
<first>p_shl3_cast7_i_i_fu_493</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>96</item>
</second>
</item>
<item>
<first>p_shl3_cast_i_i_fu_497</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>97</item>
</second>
</item>
<item>
<first>p_shl3_i_i_fu_486</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>95</item>
</second>
</item>
<item>
<first>p_shl4_cast_i_i_fu_430</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>78</item>
</second>
</item>
<item>
<first>p_shl4_i_i_fu_423</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>p_shl5_cast_i_i_fu_416</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>p_shl5_i_i_fu_409</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>71</item>
</second>
</item>
<item>
<first>p_shl6_cast_i_i_cast_fu_396</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>74</item>
</second>
</item>
<item>
<first>p_shl6_i_i_fu_388</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</second>
</item>
<item>
<first>p_shl_cast_fu_348</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>54</item>
</second>
</item>
<item>
<first>tmp1_fu_450</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>85</item>
</second>
</item>
<item>
<first>tmp2_cast_fu_456</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>87</item>
</second>
</item>
<item>
<first>tmp3_fu_510</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>101</item>
</second>
</item>
<item>
<first>tmp4_fu_561</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>115</item>
</second>
</item>
<item>
<first>tmp_22_fu_340</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</second>
</item>
<item>
<first>tmp_23_fu_344</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>tmp_24_fu_371</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>62</item>
</second>
</item>
<item>
<first>tmp_26_cast_fu_382</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>63</item>
</second>
</item>
<item>
<first>tmp_40_cast14_i_i_fu_406</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>70</item>
</second>
</item>
<item>
<first>tmp_42_cast11_i_i_ca_fu_420</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>76</item>
</second>
</item>
<item>
<first>tmp_42_cast11_i_i_fu_543</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>75</item>
</second>
</item>
<item>
<first>tmp_44_cast10_i_i_fu_434</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>tmp_46_cast_i_i_fu_446</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>tmp_46_i_i_fu_440</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>83</item>
</second>
</item>
<item>
<first>tmp_48_i_i_fu_459</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
<item>
<first>tmp_50_i_i_fu_465</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>tmp_53_i_i_fu_501</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>98</item>
</second>
</item>
<item>
<first>tmp_54_cast_i_i_fu_507</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>100</item>
</second>
</item>
<item>
<first>tmp_58_i_i_fu_546</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>103</item>
</second>
</item>
<item>
<first>tmp_61_cast_i_i_fu_555</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>112</item>
</second>
</item>
<item>
<first>tmp_61_i_i_fu_537</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>111</item>
</second>
</item>
<item>
<first>tmp_62_cast_i_i_fu_558</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>114</item>
</second>
</item>
<item>
<first>tmp_66_i_i_fu_567</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>117</item>
</second>
</item>
<item>
<first>tmp_cast_fu_437</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>82</item>
</second>
</item>
<item>
<first>tmp_fu_400</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>81</item>
</second>
</item>
<item>
<first>tmp_i_i_cast_fu_368</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>tmp_i_i_mid2_v_fu_332</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>tmp_s_fu_362</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>57</item>
</second>
</item>
<item>
<first>x_fu_313</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>47</item>
</second>
</item>
<item>
<first>x_i_i_phi_fu_276</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>y_fu_377</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>123</item>
</second>
</item>
<item>
<first>y_i_i_mid2_fu_324</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>y_i_i_phi_fu_287</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>42</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>13</count>
<item_version>0</item_version>
<item>
<first>StgValue_122_write_fu_204</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>119</item>
</second>
</item>
<item>
<first>StgValue_123_write_fu_211</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>120</item>
</second>
</item>
<item>
<first>StgValue_124_write_fu_218</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>121</item>
</second>
</item>
<item>
<first>StgValue_21_write_fu_152</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>StgValue_23_write_fu_160</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>StgValue_25_write_fu_168</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>StgValue_28_write_fu_188</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>StgValue_29_write_fu_196</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>U_scale_read_read_fu_140</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>V_scale_read_read_fu_134</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>Y_scale_read_read_fu_146</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>height_read_fu_182</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>width_read_fu_176</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</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>3</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>in_channels_ch1</first>
<second>0</second>
</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>67</item>
<item>67</item>
<item>67</item>
<item>67</item>
</second>
</item>
<item>
<first>
<first>in_channels_ch2</first>
<second>0</second>
</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>68</item>
<item>68</item>
<item>68</item>
<item>68</item>
</second>
</item>
<item>
<first>
<first>in_channels_ch3</first>
<second>0</second>
</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>69</item>
<item>69</item>
<item>69</item>
<item>69</item>
</second>
</item>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>26</count>
<item_version>0</item_version>
<item>
<first>261</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>272</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>283</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>42</item>
</second>
</item>
<item>
<first>643</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>648</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>653</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>657</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
<item>
<first>662</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>668</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>673</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</second>
</item>
<item>
<first>678</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>683</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>62</item>
</second>
</item>
<item>
<first>688</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>123</item>
</second>
</item>
<item>
<first>693</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>698</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>703</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</second>
</item>
<item>
<first>708</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>714</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>68</item>
</second>
</item>
<item>
<first>721</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</second>
</item>
<item>
<first>729</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>81</item>
</second>
</item>
<item>
<first>734</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>739</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>101</item>
</second>
</item>
<item>
<first>744</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>111</item>
</second>
</item>
<item>
<first>749</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>113</item>
</second>
</item>
<item>
<first>754</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>103</item>
</second>
</item>
<item>
<first>759</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>117</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>26</count>
<item_version>0</item_version>
<item>
<first>B_reg_721</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</second>
</item>
<item>
<first>G_reg_714</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>68</item>
</second>
</item>
<item>
<first>R_reg_708</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>bound_reg_648</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>exitcond_flatten_reg_653</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>height_reg_643</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>in_channels_ch1_addr_reg_693</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>in_channels_ch2_addr_reg_698</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>in_channels_ch3_addr_reg_703</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</second>
</item>
<item>
<first>indvar_flatten_next_reg_657</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
<item>
<first>indvar_flatten_reg_261</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>tmp3_reg_739</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>101</item>
</second>
</item>
<item>
<first>tmp_22_reg_673</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</second>
</item>
<item>
<first>tmp_23_reg_678</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>tmp_24_reg_683</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>62</item>
</second>
</item>
<item>
<first>tmp_50_i_i_reg_734</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>tmp_58_i_i_reg_754</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>103</item>
</second>
</item>
<item>
<first>tmp_61_i_i_reg_744</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>111</item>
</second>
</item>
<item>
<first>tmp_62_i_i_reg_749</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>113</item>
</second>
</item>
<item>
<first>tmp_66_i_i_reg_759</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>117</item>
</second>
</item>
<item>
<first>tmp_i_i_mid2_v_reg_668</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>tmp_reg_729</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>81</item>
</second>
</item>
<item>
<first>x_i_i_reg_272</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>y_i_i_mid2_reg_662</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>y_i_i_reg_283</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>42</item>
</second>
</item>
<item>
<first>y_reg_688</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>123</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>3</count>
<item_version>0</item_version>
<item>
<first>261</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>272</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>283</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>42</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>3</count>
<item_version>0</item_version>
<item>
<first>indvar_flatten_reg_261</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>x_i_i_reg_272</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>y_i_i_reg_283</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>42</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="53" tracking_level="0" version="0">
<count>16</count>
<item_version>0</item_version>
<item class_id="54" tracking_level="0" version="0">
<first>U_scale</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
</second>
</item>
<item>
<first>U_scale_out</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
</second>
</item>
<item>
<first>V_scale</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
</second>
</item>
<item>
<first>V_scale_out</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
</second>
</item>
<item>
<first>Y_scale</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
</second>
</item>
<item>
<first>Y_scale_out</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
</second>
</item>
<item>
<first>in_channels_ch1(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>67</item>
<item>67</item>
<item>67</item>
<item>67</item>
</second>
</item>
</second>
</item>
<item>
<first>in_channels_ch2(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>68</item>
<item>68</item>
<item>68</item>
<item>68</item>
</second>
</item>
</second>
</item>
<item>
<first>in_channels_ch3(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>69</item>
<item>69</item>
<item>69</item>
<item>69</item>
</second>
</item>
</second>
</item>
<item>
<first>in_height</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
</second>
</item>
<item>
<first>in_width</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
</second>
</item>
<item>
<first>out_channels_ch1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>119</item>
</second>
</item>
</second>
</item>
<item>
<first>out_channels_ch2</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>120</item>
</second>
</item>
</second>
</item>
<item>
<first>out_channels_ch3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>121</item>
</second>
</item>
</second>
</item>
<item>
<first>out_height</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
</second>
</item>
<item>
<first>out_width</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="55" tracking_level="0" version="0">
<count>11</count>
<item_version>0</item_version>
<item class_id="56" tracking_level="0" version="0">
<first>1</first>
<second>RAM</second>
</item>
<item>
<first>2</first>
<second>RAM</second>
</item>
<item>
<first>3</first>
<second>RAM</second>
</item>
<item>
<first>6</first>
<second>FIFO_LUTRAM</second>
</item>
<item>
<first>7</first>
<second>FIFO_LUTRAM</second>
</item>
<item>
<first>8</first>
<second>FIFO_LUTRAM</second>
</item>
<item>
<first>9</first>
<second>FIFO_LUTRAM</second>
</item>
<item>
<first>10</first>
<second>FIFO_LUTRAM</second>
</item>
<item>
<first>14</first>
<second>FIFO_LUTRAM</second>
</item>
<item>
<first>15</first>
<second>FIFO_LUTRAM</second>
</item>
<item>
<first>16</first>
<second>FIFO_LUTRAM</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
-- Copyright 2008-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 Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
|
pragma Ada_95;
pragma Source_File_Name (ada_main, Spec_File_Name => "b__powerof.ads");
pragma Source_File_Name (ada_main, Body_File_Name => "b__powerof.adb");
pragma Suppress (Overflow_Check);
with Ada.Exceptions;
package body ada_main is
pragma Warnings (Off);
E074 : Short_Integer; pragma Import (Ada, E074, "system__os_lib_E");
E013 : Short_Integer; pragma Import (Ada, E013, "system__soft_links_E");
E023 : Short_Integer; pragma Import (Ada, E023, "system__exception_table_E");
E048 : Short_Integer; pragma Import (Ada, E048, "ada__io_exceptions_E");
E050 : Short_Integer; pragma Import (Ada, E050, "ada__tags_E");
E047 : Short_Integer; pragma Import (Ada, E047, "ada__streams_E");
E072 : Short_Integer; pragma Import (Ada, E072, "interfaces__c_E");
E025 : Short_Integer; pragma Import (Ada, E025, "system__exceptions_E");
E077 : Short_Integer; pragma Import (Ada, E077, "system__file_control_block_E");
E066 : Short_Integer; pragma Import (Ada, E066, "system__file_io_E");
E070 : Short_Integer; pragma Import (Ada, E070, "system__finalization_root_E");
E068 : Short_Integer; pragma Import (Ada, E068, "ada__finalization_E");
E017 : Short_Integer; pragma Import (Ada, E017, "system__secondary_stack_E");
E045 : Short_Integer; pragma Import (Ada, E045, "ada__text_io_E");
E099 : Short_Integer; pragma Import (Ada, E099, "mat_E");
Local_Priority_Specific_Dispatching : constant String := "";
Local_Interrupt_States : constant String := "";
Is_Elaborated : Boolean := False;
procedure finalize_library is
begin
E045 := E045 - 1;
declare
procedure F1;
pragma Import (Ada, F1, "ada__text_io__finalize_spec");
begin
F1;
end;
declare
procedure F2;
pragma Import (Ada, F2, "system__file_io__finalize_body");
begin
E066 := E066 - 1;
F2;
end;
declare
procedure Reraise_Library_Exception_If_Any;
pragma Import (Ada, Reraise_Library_Exception_If_Any, "__gnat_reraise_library_exception_if_any");
begin
Reraise_Library_Exception_If_Any;
end;
end finalize_library;
procedure adafinal is
procedure s_stalib_adafinal;
pragma Import (C, s_stalib_adafinal, "system__standard_library__adafinal");
procedure Runtime_Finalize;
pragma Import (C, Runtime_Finalize, "__gnat_runtime_finalize");
begin
if not Is_Elaborated then
return;
end if;
Is_Elaborated := False;
Runtime_Finalize;
s_stalib_adafinal;
end adafinal;
type No_Param_Proc is access procedure;
procedure adainit is
Main_Priority : Integer;
pragma Import (C, Main_Priority, "__gl_main_priority");
Time_Slice_Value : Integer;
pragma Import (C, Time_Slice_Value, "__gl_time_slice_val");
WC_Encoding : Character;
pragma Import (C, WC_Encoding, "__gl_wc_encoding");
Locking_Policy : Character;
pragma Import (C, Locking_Policy, "__gl_locking_policy");
Queuing_Policy : Character;
pragma Import (C, Queuing_Policy, "__gl_queuing_policy");
Task_Dispatching_Policy : Character;
pragma Import (C, Task_Dispatching_Policy, "__gl_task_dispatching_policy");
Priority_Specific_Dispatching : System.Address;
pragma Import (C, Priority_Specific_Dispatching, "__gl_priority_specific_dispatching");
Num_Specific_Dispatching : Integer;
pragma Import (C, Num_Specific_Dispatching, "__gl_num_specific_dispatching");
Main_CPU : Integer;
pragma Import (C, Main_CPU, "__gl_main_cpu");
Interrupt_States : System.Address;
pragma Import (C, Interrupt_States, "__gl_interrupt_states");
Num_Interrupt_States : Integer;
pragma Import (C, Num_Interrupt_States, "__gl_num_interrupt_states");
Unreserve_All_Interrupts : Integer;
pragma Import (C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
Detect_Blocking : Integer;
pragma Import (C, Detect_Blocking, "__gl_detect_blocking");
Default_Stack_Size : Integer;
pragma Import (C, Default_Stack_Size, "__gl_default_stack_size");
Leap_Seconds_Support : Integer;
pragma Import (C, Leap_Seconds_Support, "__gl_leap_seconds_support");
procedure Runtime_Initialize (Install_Handler : Integer);
pragma Import (C, Runtime_Initialize, "__gnat_runtime_initialize");
Finalize_Library_Objects : No_Param_Proc;
pragma Import (C, Finalize_Library_Objects, "__gnat_finalize_library_objects");
begin
if Is_Elaborated then
return;
end if;
Is_Elaborated := True;
Main_Priority := -1;
Time_Slice_Value := -1;
WC_Encoding := 'b';
Locking_Policy := ' ';
Queuing_Policy := ' ';
Task_Dispatching_Policy := ' ';
Priority_Specific_Dispatching :=
Local_Priority_Specific_Dispatching'Address;
Num_Specific_Dispatching := 0;
Main_CPU := -1;
Interrupt_States := Local_Interrupt_States'Address;
Num_Interrupt_States := 0;
Unreserve_All_Interrupts := 0;
Detect_Blocking := 0;
Default_Stack_Size := -1;
Leap_Seconds_Support := 0;
Runtime_Initialize (1);
Finalize_Library_Objects := finalize_library'access;
System.Soft_Links'Elab_Spec;
System.Exception_Table'Elab_Body;
E023 := E023 + 1;
Ada.Io_Exceptions'Elab_Spec;
E048 := E048 + 1;
Ada.Tags'Elab_Spec;
Ada.Streams'Elab_Spec;
E047 := E047 + 1;
Interfaces.C'Elab_Spec;
System.Exceptions'Elab_Spec;
E025 := E025 + 1;
System.File_Control_Block'Elab_Spec;
E077 := E077 + 1;
System.Finalization_Root'Elab_Spec;
E070 := E070 + 1;
Ada.Finalization'Elab_Spec;
E068 := E068 + 1;
System.File_Io'Elab_Body;
E066 := E066 + 1;
E072 := E072 + 1;
Ada.Tags'Elab_Body;
E050 := E050 + 1;
System.Soft_Links'Elab_Body;
E013 := E013 + 1;
System.Os_Lib'Elab_Body;
E074 := E074 + 1;
System.Secondary_Stack'Elab_Body;
E017 := E017 + 1;
Ada.Text_Io'Elab_Spec;
Ada.Text_Io'Elab_Body;
E045 := E045 + 1;
E099 := E099 + 1;
end adainit;
procedure Ada_Main_Program;
pragma Import (Ada, Ada_Main_Program, "_ada_powerof");
function main
(argc : Integer;
argv : System.Address;
envp : System.Address)
return Integer
is
procedure Initialize (Addr : System.Address);
pragma Import (C, Initialize, "__gnat_initialize");
procedure Finalize;
pragma Import (C, Finalize, "__gnat_finalize");
SEH : aliased array (1 .. 2) of Integer;
Ensure_Reference : aliased System.Address := Ada_Main_Program_Name'Address;
pragma Volatile (Ensure_Reference);
begin
gnat_argc := argc;
gnat_argv := argv;
gnat_envp := envp;
Initialize (SEH'Address);
adainit;
Ada_Main_Program;
adafinal;
Finalize;
return (gnat_exit_status);
end;
-- BEGIN Object file/option list
-- C:\Users\Soba95\Desktop\ada\mat.o
-- C:\Users\Soba95\Desktop\ada\powerof.o
-- -LC:\Users\Soba95\Desktop\ada\
-- -LC:\Users\Soba95\Desktop\ada\
-- -LC:/gnat/2015/lib/gcc/i686-pc-mingw32/4.9.3/adalib/
-- -static
-- -lgnat
-- -Wl,--stack=0x2000000
-- END Object file/option list
end ada_main;
|
--------------------------------------------------------------------------------
-- Copyright (c) 2013, Felix Krause <contact@flyx.org>
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--------------------------------------------------------------------------------
with CL.Platforms;
with Ada.Text_IO;
procedure CL_Test.Platform is
package IO renames Ada.Text_IO;
P_List : constant CL.Platforms.Platform_List := CL.Platforms.List;
begin
for Index in P_List'Range loop
IO.Put_Line("Platform" & Index'Img);
IO.Put_Line ("Profile: """ & P_List (Index).Profile & """");
IO.Put_Line ("Version: """ & P_List (Index).Version & """");
IO.Put_Line ("Name: """ & P_List (Index).Name & """");
IO.Put_Line ("Vendor: """ & P_List (Index).Vendor & """");
IO.Put_Line ("Extensions: """ & P_List (Index).Extensions & """");
IO.Put_Line("");
end loop;
end CL_Test.Platform;
|
-- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces.C;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_glx_float32_iterator_t is
-- Item
--
type Item is record
data : access xcb.xcb_glx_float32_t;
the_rem : aliased Interfaces.C.int;
index : aliased Interfaces.C.int;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C.size_t range <>) of aliased xcb.xcb_glx_float32_iterator_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_float32_iterator_t.Item,
Element_Array => xcb.xcb_glx_float32_iterator_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C.size_t range <>) of aliased xcb.xcb_glx_float32_iterator_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_float32_iterator_t.Pointer,
Element_Array => xcb.xcb_glx_float32_iterator_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_glx_float32_iterator_t;
|
------------------------------------------------------------------------------
-- --
-- Giza --
-- --
-- Copyright (C) 2015 Fabien Chouteau (chouteau@adacore.com) --
-- --
-- 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 Ada.Unchecked_Deallocation;
with Ada.Real_Time.Timing_Events; use Ada.Real_Time.Timing_Events;
with Giza.GUI; use Giza.GUI;
with System;
package body Giza.Timers is
type Wrapper;
type Wrapper_Access is access all Wrapper;
type Wrapper is record
Event : Timer_Event_Not_Null_Ref;
Timeout : Time;
Next : Wrapper_Access := null;
end record;
procedure Free is new Ada.Unchecked_Deallocation
(Object => Wrapper, Name => Wrapper_Access);
TE : Timing_Event;
----------
-- Sync --
----------
protected Sync is
pragma Priority (System.Interrupt_Priority'Last);
entry Wait;
procedure Wakeup (Event : in out Timing_Event);
procedure Insert (Item : Wrapper_Access);
function Next_Timeout return Time;
procedure Pop (Item : out Wrapper_Access);
private
Triggered : Boolean := False;
List : Wrapper_Access := null;
end Sync;
----------
-- Sync --
----------
protected body Sync is
entry Wait when Triggered is
begin
Triggered := False;
end Wait;
procedure Wakeup (Event : in out Timing_Event) is
pragma Unreferenced (Event);
begin
Triggered := True;
end Wakeup;
procedure Insert (Item : Wrapper_Access) is
Prev, Curr : Wrapper_Access := null;
begin
if List = null or else List.Timeout >= Item.Timeout then
Item.Next := List;
List := Item;
Set_Handler (Event => TE,
At_Time => List.Timeout,
Handler => Sync.Wakeup'Access);
else
Prev := List;
Curr := List;
while Curr /= null and then Curr.Timeout < Item.Timeout loop
Prev := Curr;
Curr := Curr.Next;
end loop;
Prev.Next := Item;
Item.Next := Curr;
end if;
end Insert;
function Next_Timeout return Time is
begin
return (if List /= null then
List.Timeout
else
Time_Last);
end Next_Timeout;
procedure Pop (Item : out Wrapper_Access) is
begin
-- Remove from list
Item := List;
List := List.Next;
end Pop;
end Sync;
---------------
-- Set_Timer --
---------------
procedure Set_Timer
(Timer : Timer_Event_Not_Null_Ref;
Timeout : Time)
is
Item : constant Wrapper_Access :=
new Wrapper'(Event => Timer, Timeout => Timeout, Next => null);
begin
Sync.Insert (Item);
end Set_Timer;
----------------
-- Timer_Task --
----------------
task Timer_Task is
end Timer_Task;
task body Timer_Task is
Now : Time;
Tmp : Wrapper_Access;
begin
loop
Sync.Wait;
-- back from timeout
Now := Clock;
while Sync.Next_Timeout < Now loop
Sync.Pop (Tmp);
if Tmp /= null then
Emit (Event_Not_Null_Ref (Tmp.Event));
-- Destroy wrapper
Free (Tmp);
end if;
end loop;
Set_Handler (Event => TE,
At_Time => Sync.Next_Timeout,
Handler => Sync.Wakeup'Access);
end loop;
end Timer_Task;
end Giza.Timers;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="15">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>erode_0_0_2160_3840_0_3_3_1_1_s</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>imgHelper1_4101</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName>FIFO_SRL</coreName>
<coreId>49</coreId>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>imgHelper2_4102</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName>FIFO_SRL</coreName>
<coreId>49</coreId>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>p_src_rows</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName>FIFO_SRL</coreName>
<coreId>52</coreId>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>p_src_cols</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName>FIFO_SRL</coreName>
<coreId>49</coreId>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>p_src_rows_read</name>
<fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>344</lineNumber>
<contextFuncName>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</contextFuncName>
<contextNormFuncName>erode_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</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>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</first>
<second>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</second>
</first>
<second>344</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control>auto</control>
<opType>fifo</opType>
<implIndex>srl</implIndex>
<coreName>FIFO_SRL</coreName>
<coreId>81</coreId>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>19</item>
<item>20</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>3.24</m_delay>
<m_topoIndex>1</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name>p_src_cols_read</name>
<fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>345</lineNumber>
<contextFuncName>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</contextFuncName>
<contextNormFuncName>erode_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</first>
<second>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</second>
</first>
<second>345</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control>auto</control>
<opType>fifo</opType>
<implIndex>srl</implIndex>
<coreName>FIFO_SRL</coreName>
<coreId>81</coreId>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>21</item>
<item>22</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>3.24</m_delay>
<m_topoIndex>2</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name>trunc_ln344</name>
<fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>344</lineNumber>
<contextFuncName>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</contextFuncName>
<contextNormFuncName>erode_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</first>
<second>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</second>
</first>
<second>344</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>trunc_ln344_fu_52_p1</rtlName>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>49</coreId>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>3</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>14</id>
<name>trunc_ln345</name>
<fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>345</lineNumber>
<contextFuncName>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</contextFuncName>
<contextNormFuncName>erode_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</first>
<second>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</second>
</first>
<second>345</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>trunc_ln345_fu_57_p1</rtlName>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>225</coreId>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>4</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>15</id>
<name>_ln365</name>
<fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>365</lineNumber>
<contextFuncName>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</contextFuncName>
<contextNormFuncName>erode_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</first>
<second>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</second>
</first>
<second>365</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42</rtlName>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>113</coreId>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>5</count>
<item_version>0</item_version>
<item>26</item>
<item>27</item>
<item>28</item>
<item>29</item>
<item>30</item>
</oprand_edges>
<opcode>call</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>5</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name>_ln0</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>113</coreId>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>6</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_11">
<Value>
<Obj>
<type>2</type>
<id>25</id>
<name>xferode_2160_3840_1_0_1_0_3841_3_3_s</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>177</coreId>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<const_type>6</const_type>
<content><constant:xferode<2160, 3840, 1, 0, 1, 0, 3841, 3, 3>></content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_12">
<Obj>
<type>3</type>
<id>17</id>
<name>erode<0, 0, 2160, 3840, 0, 3, 3, 1, 1></name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>1768189039</coreId>
</Obj>
<node_objs>
<count>6</count>
<item_version>0</item_version>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
<item>15</item>
<item>16</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_13">
<id>20</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>11</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_14">
<id>22</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>12</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_15">
<id>23</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>13</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_16">
<id>24</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>14</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_17">
<id>26</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_18">
<id>27</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_19">
<id>28</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_20">
<id>29</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_21">
<id>30</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_22">
<mId>1</mId>
<mTag>erode<0, 0, 2160, 3840, 0, 3, 3, 1, 1></mTag>
<mNormTag>erode_0_0_2160_3840_0_3_3_1_1_s</mNormTag>
<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>17</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>13</mMinLatency>
<mMaxLatency>8319373</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_23">
<states class_id="25" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_24">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_25">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_26">
<id>12</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_27">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_28">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_29">
<id>15</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_30">
<id>2</id>
<operations>
<count>8</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_31">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_32">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_33">
<id>7</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_34">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_35">
<id>9</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_36">
<id>10</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_37">
<id>15</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_38">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_39">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>-1</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>
</transitions>
</fsm>
<res class_id="34" tracking_level="1" version="0" object_id="_40">
<dp_component_resource class_id="35" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="36" tracking_level="0" version="0">
<first>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42 (xferode_2160_3840_1_0_1_0_3841_3_3_s)</first>
<second class_id="37" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>BRAM</first>
<second>6</second>
</item>
<item>
<first>FF</first>
<second>611</second>
</item>
<item>
<first>LUT</first>
<second>819</second>
</item>
</second>
</item>
</dp_component_resource>
<dp_expression_resource>
<count>1</count>
<item_version>0</item_version>
<item>
<first>ap_block_state1 ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>1</second>
</item>
</second>
</item>
</dp_expression_resource>
<dp_fifo_resource>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_resource>
<dp_memory_resource>
<count>0</count>
<item_version>0</item_version>
</dp_memory_resource>
<dp_multiplexer_resource>
<count>6</count>
<item_version>0</item_version>
<item>
<first>ap_NS_fsm</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>3</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>3</second>
</item>
<item>
<first>LUT</first>
<second>13</second>
</item>
</second>
</item>
<item>
<first>ap_done</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>imgHelper1_4101_read</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>imgHelper2_4102_write</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>p_src_cols_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>p_src_rows_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
</dp_multiplexer_resource>
<dp_register_resource>
<count>5</count>
<item_version>0</item_version>
<item>
<first>ap_CS_fsm</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>2</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_done_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42_ap_start_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>trunc_ln344_reg_62</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>16</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>16</second>
</item>
</second>
</item>
<item>
<first>trunc_ln345_reg_67</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>16</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>16</second>
</item>
</second>
</item>
</dp_register_resource>
<dp_dsp_resource>
<count>1</count>
<item_version>0</item_version>
<item>
<first>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
</dp_dsp_resource>
<dp_component_map class_id="39" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="40" tracking_level="0" version="0">
<first>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42 (xferode_2160_3840_1_0_1_0_3841_3_3_s)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
</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="41" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="42" tracking_level="0" version="0">
<first>11</first>
<second class_id="43" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>14</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>15</first>
<second>
<first>0</first>
<second>1</second>
</second>
</item>
<item>
<first>16</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="44" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="45" tracking_level="0" version="0">
<first>17</first>
<second class_id="46" tracking_level="0" version="0">
<first>0</first>
<second>1</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="47" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</regions>
<dp_fu_nodes class_id="48" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="49" tracking_level="0" version="0">
<first>30</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>36</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>42</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>15</item>
<item>15</item>
</second>
</item>
<item>
<first>52</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>57</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="51" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="52" tracking_level="0" version="0">
<first>trunc_ln344_fu_52</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>trunc_ln345_fu_57</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>1</count>
<item_version>0</item_version>
<item>
<first>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>15</item>
<item>15</item>
</second>
</item>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>2</count>
<item_version>0</item_version>
<item>
<first>p_src_cols_read_read_fu_36</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>p_src_rows_read_read_fu_30</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</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="53" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>2</count>
<item_version>0</item_version>
<item>
<first>62</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>67</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>2</count>
<item_version>0</item_version>
<item>
<first>trunc_ln344_reg_62</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>trunc_ln345_reg_67</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>0</count>
<item_version>0</item_version>
</dp_reg_phi>
<dp_regname_phi>
<count>0</count>
<item_version>0</item_version>
</dp_regname_phi>
<dp_port_io_nodes class_id="54" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="55" tracking_level="0" version="0">
<first>imgHelper1_4101</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>call</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
</second>
</item>
<item>
<first>imgHelper2_4102</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>call</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
</second>
</item>
<item>
<first>p_src_cols</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
</second>
</item>
<item>
<first>p_src_rows</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core>
<count>4</count>
<item_version>0</item_version>
<item>
<first>1</first>
<second>
<first>1150</first>
<second>10</second>
</second>
</item>
<item>
<first>2</first>
<second>
<first>1150</first>
<second>10</second>
</second>
</item>
<item>
<first>3</first>
<second>
<first>1150</first>
<second>10</second>
</second>
</item>
<item>
<first>4</first>
<second>
<first>1150</first>
<second>10</second>
</second>
</item>
</port2core>
<node2core>
<count>3</count>
<item_version>0</item_version>
<item>
<first>11</first>
<second>
<first>1150</first>
<second>10</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>1150</first>
<second>10</second>
</second>
</item>
<item>
<first>15</first>
<second>
<first>-1</first>
<second>-1</second>
</second>
</item>
</node2core>
</syndb>
</boost_serialization>
|
-----------------------------------------------------------------------
-- awa-modules-reader -- Read module configuration files
-- Copyright (C) 2011, 2012, 2015, 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Serialize.IO.XML;
with Util.Serialize.Mappers;
with AWA.Applications.Configs;
with Security.Policies;
-- The <b>AWA.Modules.Reader</b> package reads the module configuration files
-- and initializes the module.
package body AWA.Modules.Reader is
-- ------------------------------
-- Read the module configuration file and configure the components
-- ------------------------------
procedure Read_Configuration (Plugin : in out Module'Class;
File : in String;
Context : in EL.Contexts.Default.Default_Context_Access) is
Reader : Util.Serialize.IO.XML.Parser;
Mapper : Util.Serialize.Mappers.Processing;
package Config is
new AWA.Applications.Configs.Reader_Config (Mapper,
Plugin.App.all'Unchecked_Access,
Context,
False);
pragma Warnings (Off, Config);
Sec : constant Security.Policies.Policy_Manager_Access := Plugin.App.Get_Security_Manager;
begin
Log.Info ("Reading module configuration file {0}", File);
Sec.Prepare_Config (Mapper);
if AWA.Modules.Log.Get_Level >= Util.Log.DEBUG_LEVEL then
Util.Serialize.Mappers.Dump (Mapper, AWA.Modules.Log);
end if;
-- Read the configuration file and record managed beans, navigation rules.
Reader.Parse (File, Mapper);
Sec.Finish_Config (Reader);
exception
when others =>
Log.Error ("Error while reading {0}", File);
raise;
end Read_Configuration;
end AWA.Modules.Reader;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . D Y N A M I C _ T A B L E S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2000-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. --
-- --
------------------------------------------------------------------------------
pragma Compiler_Unit_Warning;
with GNAT.Heap_Sort_G;
with Ada.Unchecked_Deallocation;
with System;
package body GNAT.Dynamic_Tables is
-----------------------
-- Local Subprograms --
-----------------------
function Last_Allocated (T : Instance) return Table_Last_Type;
pragma Inline (Last_Allocated);
-- Return the index of the last allocated element
procedure Grow (T : in out Instance; New_Last : Table_Last_Type);
-- This is called when we are about to set the value of Last to a value
-- that is larger than Last_Allocated. This reallocates the table to the
-- larger size, as indicated by New_Last. At the time this is called,
-- Last (T) is still the old value, and this does not modify it.
--------------
-- Allocate --
--------------
procedure Allocate (T : in out Instance; Num : Integer := 1) is
begin
-- Note that Num can be negative
pragma Assert (not T.Locked);
Set_Last (T, Last (T) + Table_Index_Type'Base (Num));
end Allocate;
------------
-- Append --
------------
procedure Append (T : in out Instance; New_Val : Table_Component_Type) is
pragma Assert (not T.Locked);
New_Last : constant Table_Last_Type := Last (T) + 1;
begin
if New_Last <= Last_Allocated (T) then
-- Fast path
T.P.Last := New_Last;
T.Table (New_Last) := New_Val;
else
Set_Item (T, New_Last, New_Val);
end if;
end Append;
----------------
-- Append_All --
----------------
procedure Append_All (T : in out Instance; New_Vals : Table_Type) is
begin
for J in New_Vals'Range loop
Append (T, New_Vals (J));
end loop;
end Append_All;
--------------------
-- Decrement_Last --
--------------------
procedure Decrement_Last (T : in out Instance) is
begin
pragma Assert (not T.Locked);
Allocate (T, -1);
end Decrement_Last;
-----------
-- First --
-----------
function First return Table_Index_Type is
begin
return Table_Low_Bound;
end First;
--------------
-- For_Each --
--------------
procedure For_Each (Table : Instance) is
Quit : Boolean := False;
begin
for Index in First .. Last (Table) loop
Action (Index, Table.Table (Index), Quit);
exit when Quit;
end loop;
end For_Each;
----------
-- Grow --
----------
procedure Grow (T : in out Instance; New_Last : Table_Last_Type) is
-- Note: Type Alloc_Ptr below needs to be declared locally so we know
-- the bounds. That means that the collection is local, so is finalized
-- when leaving Grow. That's why this package doesn't support controlled
-- types; the table elements would be finalized prematurely. An Ada
-- implementation would also be within its rights to reclaim the
-- storage. Fortunately, GNAT doesn't do that.
pragma Assert (not T.Locked);
pragma Assert (New_Last > Last_Allocated (T));
subtype Table_Length_Type is Table_Index_Type'Base
range 0 .. Table_Index_Type'Base'Last;
Old_Last_Allocated : constant Table_Last_Type := Last_Allocated (T);
Old_Allocated_Length : constant Table_Length_Type :=
Old_Last_Allocated - First + 1;
New_Length : constant Table_Length_Type := New_Last - First + 1;
New_Allocated_Length : Table_Length_Type;
begin
if T.Table = Empty_Table_Ptr then
New_Allocated_Length := Table_Length_Type (Table_Initial);
else
New_Allocated_Length :=
Table_Length_Type
(Long_Long_Integer (Old_Allocated_Length) *
(100 + Long_Long_Integer (Table_Increment)) / 100);
end if;
-- Make sure it really did grow
if New_Allocated_Length <= Old_Allocated_Length then
New_Allocated_Length := Old_Allocated_Length + 10;
end if;
if New_Allocated_Length <= New_Length then
New_Allocated_Length := New_Length + 10;
end if;
pragma Assert (New_Allocated_Length > Old_Allocated_Length);
pragma Assert (New_Allocated_Length > New_Length);
T.P.Last_Allocated := First + New_Allocated_Length - 1;
declare
subtype Old_Alloc_Type is Table_Type (First .. Old_Last_Allocated);
type Old_Alloc_Ptr is access all Old_Alloc_Type;
procedure Free is
new Ada.Unchecked_Deallocation (Old_Alloc_Type, Old_Alloc_Ptr);
function To_Old_Alloc_Ptr is
new Ada.Unchecked_Conversion (Table_Ptr, Old_Alloc_Ptr);
subtype Alloc_Type is
Table_Type (First .. First + New_Allocated_Length - 1);
type Alloc_Ptr is access all Alloc_Type;
function To_Table_Ptr is
new Ada.Unchecked_Conversion (Alloc_Ptr, Table_Ptr);
Old_Table : Old_Alloc_Ptr := To_Old_Alloc_Ptr (T.Table);
New_Table : constant Alloc_Ptr := new Alloc_Type;
begin
if T.Table /= Empty_Table_Ptr then
New_Table (First .. Last (T)) := Old_Table (First .. Last (T));
Free (Old_Table);
end if;
T.Table := To_Table_Ptr (New_Table);
end;
pragma Assert (New_Last <= Last_Allocated (T));
pragma Assert (T.Table /= null);
pragma Assert (T.Table /= Empty_Table_Ptr);
end Grow;
--------------------
-- Increment_Last --
--------------------
procedure Increment_Last (T : in out Instance) is
begin
pragma Assert (not T.Locked);
Allocate (T, 1);
end Increment_Last;
----------
-- Init --
----------
procedure Init (T : in out Instance) is
pragma Assert (not T.Locked);
subtype Alloc_Type is Table_Type (First .. Last_Allocated (T));
type Alloc_Ptr is access all Alloc_Type;
procedure Free is new Ada.Unchecked_Deallocation (Alloc_Type, Alloc_Ptr);
function To_Alloc_Ptr is
new Ada.Unchecked_Conversion (Table_Ptr, Alloc_Ptr);
Temp : Alloc_Ptr := To_Alloc_Ptr (T.Table);
begin
if T.Table = Empty_Table_Ptr then
pragma Assert (T.P = (Last_Allocated | Last => First - 1));
null;
else
Free (Temp);
T.Table := Empty_Table_Ptr;
T.P := (Last_Allocated | Last => First - 1);
end if;
end Init;
--------------
-- Is_Empty --
--------------
function Is_Empty (T : Instance) return Boolean is
begin
return Last (T) = First - 1;
end Is_Empty;
----------
-- Last --
----------
function Last (T : Instance) return Table_Last_Type is
begin
return T.P.Last;
end Last;
--------------------
-- Last_Allocated --
--------------------
function Last_Allocated (T : Instance) return Table_Last_Type is
begin
return T.P.Last_Allocated;
end Last_Allocated;
----------
-- Move --
----------
procedure Move (From, To : in out Instance) is
begin
pragma Assert (not From.Locked);
pragma Assert (not To.Locked);
pragma Assert (Is_Empty (To));
To := From;
From.Table := Empty_Table_Ptr;
From.Locked := False;
From.P.Last_Allocated := First - 1;
From.P.Last := First - 1;
pragma Assert (Is_Empty (From));
end Move;
-------------
-- Release --
-------------
procedure Release (T : in out Instance) is
pragma Assert (not T.Locked);
Old_Last_Allocated : constant Table_Last_Type := Last_Allocated (T);
function New_Last_Allocated return Table_Last_Type;
-- Compute the new value of Last_Allocated. This is normally equal to
-- Last, but if Release_Threshold /= 0, then we need to take that into
-- account.
------------------------
-- New_Last_Allocated --
------------------------
function New_Last_Allocated return Table_Last_Type is
subtype Table_Length_Type is Table_Index_Type'Base
range 0 .. Table_Index_Type'Base'Last;
Length : constant Table_Length_Type := Last (T) - First + 1;
Comp_Size_In_Bytes : constant Table_Length_Type :=
Table_Type'Component_Size / System.Storage_Unit;
Length_Threshold : constant Table_Length_Type :=
Table_Length_Type (Release_Threshold) / Comp_Size_In_Bytes;
begin
if Release_Threshold = 0 or else Length < Length_Threshold then
return Last (T);
else
declare
Extra_Length : constant Table_Length_Type := Length / 1000;
begin
return (Length + Extra_Length) - 1 + First;
end;
end if;
end New_Last_Allocated;
-- Local variables
New_Last_Alloc : constant Table_Last_Type := New_Last_Allocated;
-- Start of processing for Release
begin
if New_Last_Alloc < Last_Allocated (T) then
pragma Assert (Last (T) < Last_Allocated (T));
pragma Assert (T.Table /= Empty_Table_Ptr);
declare
subtype Old_Alloc_Type is Table_Type (First .. Old_Last_Allocated);
type Old_Alloc_Ptr is access all Old_Alloc_Type;
procedure Free is
new Ada.Unchecked_Deallocation (Old_Alloc_Type, Old_Alloc_Ptr);
function To_Old_Alloc_Ptr is
new Ada.Unchecked_Conversion (Table_Ptr, Old_Alloc_Ptr);
subtype Alloc_Type is Table_Type (First .. New_Last_Alloc);
type Alloc_Ptr is access all Alloc_Type;
function To_Table_Ptr is
new Ada.Unchecked_Conversion (Alloc_Ptr, Table_Ptr);
Old_Table : Old_Alloc_Ptr := To_Old_Alloc_Ptr (T.Table);
New_Table : constant Alloc_Ptr := new Alloc_Type;
begin
New_Table (First .. Last (T)) := Old_Table (First .. Last (T));
T.P.Last_Allocated := New_Last_Alloc;
Free (Old_Table);
T.Table := To_Table_Ptr (New_Table);
end;
end if;
end Release;
--------------
-- Set_Item --
--------------
procedure Set_Item
(T : in out Instance;
Index : Valid_Table_Index_Type;
Item : Table_Component_Type)
is
begin
pragma Assert (not T.Locked);
-- If Set_Last is going to reallocate the table, we make a copy of Item,
-- in case the call was "Set_Item (T, X, T.Table (Y));", and Item is
-- passed by reference. Without the copy, we would deallocate the array
-- containing Item, leaving a dangling pointer.
if Index > Last_Allocated (T) then
declare
Item_Copy : constant Table_Component_Type := Item;
begin
Set_Last (T, Index);
T.Table (Index) := Item_Copy;
end;
else
if Index > Last (T) then
Set_Last (T, Index);
end if;
T.Table (Index) := Item;
end if;
end Set_Item;
--------------
-- Set_Last --
--------------
procedure Set_Last (T : in out Instance; New_Val : Table_Last_Type) is
begin
pragma Assert (not T.Locked);
if New_Val > Last_Allocated (T) then
Grow (T, New_Val);
end if;
T.P.Last := New_Val;
end Set_Last;
----------------
-- Sort_Table --
----------------
procedure Sort_Table (Table : in out Instance) is
Temp : Table_Component_Type;
-- A temporary position to simulate index 0
-- Local subprograms
function Index_Of (Idx : Natural) return Table_Index_Type'Base;
-- Return index of Idx'th element of table
function Lower_Than (Op1, Op2 : Natural) return Boolean;
-- Compare two components
procedure Move (From : Natural; To : Natural);
-- Move one component
package Heap_Sort is new GNAT.Heap_Sort_G (Move, Lower_Than);
--------------
-- Index_Of --
--------------
function Index_Of (Idx : Natural) return Table_Index_Type'Base is
J : constant Integer'Base :=
Table_Index_Type'Base'Pos (First) + Idx - 1;
begin
return Table_Index_Type'Base'Val (J);
end Index_Of;
----------
-- Move --
----------
procedure Move (From : Natural; To : Natural) is
begin
if From = 0 then
Table.Table (Index_Of (To)) := Temp;
elsif To = 0 then
Temp := Table.Table (Index_Of (From));
else
Table.Table (Index_Of (To)) :=
Table.Table (Index_Of (From));
end if;
end Move;
----------------
-- Lower_Than --
----------------
function Lower_Than (Op1, Op2 : Natural) return Boolean is
begin
if Op1 = 0 then
return Lt (Temp, Table.Table (Index_Of (Op2)));
elsif Op2 = 0 then
return Lt (Table.Table (Index_Of (Op1)), Temp);
else
return
Lt (Table.Table (Index_Of (Op1)), Table.Table (Index_Of (Op2)));
end if;
end Lower_Than;
-- Start of processing for Sort_Table
begin
Heap_Sort.Sort (Natural (Last (Table) - First) + 1);
end Sort_Table;
end GNAT.Dynamic_Tables;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . B O U N D E D _ S T R I N G S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
package body System.Bounded_Strings is
------------
-- Append --
------------
procedure Append (X : in out Bounded_String; C : Character) is
begin
-- If we have too many characters to fit, simply drop them
if X.Length < X.Max_Length then
X.Length := X.Length + 1;
X.Chars (X.Length) := C;
end if;
end Append;
procedure Append (X : in out Bounded_String; S : String) is
begin
for C of S loop
Append (X, C);
end loop;
end Append;
--------------------
-- Append_Address --
--------------------
procedure Append_Address (X : in out Bounded_String; A : Address)
is
S : String (1 .. 18);
P : Natural;
use System.Storage_Elements;
N : Integer_Address;
H : constant array (Integer range 0 .. 15) of Character :=
"0123456789abcdef";
begin
P := S'Last;
N := To_Integer (A);
loop
S (P) := H (Integer (N mod 16));
P := P - 1;
N := N / 16;
exit when N = 0;
end loop;
S (P - 1) := '0';
S (P) := 'x';
Append (X, S (P - 1 .. S'Last));
end Append_Address;
-------------
-- Is_Full --
-------------
function Is_Full (X : Bounded_String) return Boolean is
begin
return X.Length >= X.Max_Length;
end Is_Full;
---------------
-- To_String --
---------------
function To_String (X : Bounded_String) return String is
begin
return X.Chars (1 .. X.Length);
end To_String;
end System.Bounded_Strings;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Web API Definition --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2015, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with WebAPI.DOM.Event_Targets;
package WebAPI.UI_Events.Focus is
pragma Preelaborate;
type Focus_Event is limited interface and WebAPI.UI_Events.UI_Event;
not overriding function Get_Related_Target
(Self : not null access constant Focus_Event)
return WebAPI.DOM.Event_Targets.Event_Target_Access is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "relatedTarget";
-- Used to identify a secondary EventTarget related to a Focus event,
-- depending on the type of event.
end WebAPI.UI_Events.Focus;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- ADA.CONTAINERS.BOUNDED_PRIORITY_QUEUES --
-- --
-- S p e c --
-- --
-- Copyright (C) 2011-2019, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with System;
with Ada.Containers.Synchronized_Queue_Interfaces;
with Ada.Containers.Bounded_Doubly_Linked_Lists;
generic
with package Queue_Interfaces is
new Ada.Containers.Synchronized_Queue_Interfaces (<>);
type Queue_Priority is private;
with function Get_Priority
(Element : Queue_Interfaces.Element_Type) return Queue_Priority is <>;
with function Before
(Left, Right : Queue_Priority) return Boolean is <>;
Default_Capacity : Count_Type;
Default_Ceiling : System.Any_Priority := System.Priority'Last;
package Ada.Containers.Bounded_Priority_Queues is
pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
package Implementation is
-- All identifiers in this unit are implementation defined
pragma Implementation_Defined;
type List_Type (Capacity : Count_Type) is tagged limited private;
procedure Enqueue
(List : in out List_Type;
New_Item : Queue_Interfaces.Element_Type);
procedure Dequeue
(List : in out List_Type;
Element : out Queue_Interfaces.Element_Type);
procedure Dequeue
(List : in out List_Type;
At_Least : Queue_Priority;
Element : in out Queue_Interfaces.Element_Type;
Success : out Boolean);
function First_Element
(List : List_Type) return Queue_Interfaces.Element_Type;
function Length (List : List_Type) return Count_Type;
function Max_Length (List : List_Type) return Count_Type;
private
-- We need a better data structure here, such as a proper heap. ???
pragma Warnings (Off);
-- Otherwise, we get warnings for the uninitialized variable in Insert
-- in Ada.Containers.Bounded_Doubly_Linked_Lists.
package List_Types is new Bounded_Doubly_Linked_Lists
(Element_Type => Queue_Interfaces.Element_Type,
"=" => Queue_Interfaces."=");
pragma Warnings (On);
type List_Type (Capacity : Count_Type) is tagged limited record
Container : List_Types.List (Capacity);
Max_Length : Count_Type := 0;
end record;
end Implementation;
protected type Queue
(Capacity : Count_Type := Default_Capacity;
Ceiling : System.Any_Priority := Default_Ceiling)
with
Priority => Ceiling
is new Queue_Interfaces.Queue with
overriding entry Enqueue (New_Item : Queue_Interfaces.Element_Type);
overriding entry Dequeue (Element : out Queue_Interfaces.Element_Type);
-- The priority queue operation Dequeue_Only_High_Priority had been a
-- protected entry in early drafts of AI05-0159, but it was discovered
-- that that operation as specified was not in fact implementable. The
-- operation was changed from an entry to a protected procedure per the
-- ARG meeting in Edinburgh (June 2011), with a different signature and
-- semantics.
procedure Dequeue_Only_High_Priority
(At_Least : Queue_Priority;
Element : in out Queue_Interfaces.Element_Type;
Success : out Boolean);
overriding function Current_Use return Count_Type;
overriding function Peak_Use return Count_Type;
private
List : Implementation.List_Type (Capacity);
end Queue;
end Ada.Containers.Bounded_Priority_Queues;
|
--
-- Uwe R. Zimmer, Australia, 2013
--
package body Generic_Protected is
protected body Monitor is
function Read return Element is (Value);
procedure Write (E : Element) is
begin
Value := E;
Touched := True;
end Write;
entry Wait_for_Update (E : out Element) when Touched is
begin
E := Value;
Touched := Wait_for_Update'Count > 0;
end Wait_for_Update;
end Monitor;
function Allocate (Value : Element := Default_Value) return Monitor_Ptr is
New_Monitor : constant Monitor_Ptr := new Monitor;
begin
New_Monitor.all.Write (Value);
return New_Monitor;
end Allocate;
end Generic_Protected;
|
-- CE3801B.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 EACH FIXED_IO OPERATION RAISES STATUS_ERROR
-- WHEN CALLED WITH A FILE PARAMETER DESIGNATING AN UN-OPEN FILE.
-- HISTORY:
-- DWC 09/11/87 CREATED ORIGINAL TEST.
WITH REPORT;
USE REPORT;
WITH TEXT_IO;
USE TEXT_IO;
PROCEDURE CE3801B IS
BEGIN
TEST ("CE3801B", "CHECK THAT EACH FIXED_IO " &
"OPERATION RAISES STATUS_ERROR WHEN CALLED " &
"WITH A FILE PARAMETER DESIGNATING AN " &
"UN-OPEN FILE");
DECLARE
TYPE FIX IS DELTA 0.1 RANGE 1.0 .. 10.0;
PACKAGE FIX_IO IS NEW FIXED_IO (FIX);
USE FIX_IO;
X : FIX := FIX'LAST;
FT : FILE_TYPE;
BEGIN
BEGIN
GET (FT, X);
FAILED ("STATUS_ERROR NOT RAISED - GET FIXED_IO - 1");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - GET " &
"FIXED_IO - 1");
END;
BEGIN
PUT (FT, X);
FAILED ("STATUS_ERROR NOT RAISED - PUT FIXED_IO - 1");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - PUT " &
"FIXED_IO - 1");
END;
BEGIN
CREATE (FT, OUT_FILE); -- THIS IS JUST AN ATTEMPT TO
CLOSE (FT); -- CREATE A FILE. OBJECTIVE
EXCEPTION -- IS MET EITHER WAY.
WHEN USE_ERROR =>
NULL;
END;
BEGIN
GET (FT, X);
FAILED ("STATUS_ERROR NOT RAISED - GET FIXED_IO - 2");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - GET " &
"FIXED_IO - 2");
END;
BEGIN
PUT (FT, X);
FAILED ("STATUS_ERROR NOT RAISED - PUT FIXED_IO - 2");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - PUT " &
"FIXED_IO - 2");
END;
END;
RESULT;
END CE3801B;
|
-- Standard Ada library specification
-- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com>
-- Copyright (c) 2004-2016 AXE Consultants
-- Copyright (c) 2004, 2005, 2006 Ada-Europe
-- Copyright (c) 2000 The MITRE Corporation, Inc.
-- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc.
-- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual
---------------------------------------------------------------------------
with Ada.Containers;
generic
with package Bounded is
new Ada.Strings.Wide_Wide_Bounded.Generic_Bounded_Length (<>);
function Ada.Strings.Wide_Wide_Bounded.Wide_Wide_Hash
(Key : in Wide_Wide_Bounded.Bounded_Wide_Wide_String)
return Containers.Hash_Type;
pragma Preelaborate (Wide_Wide_Hash);
|
-- 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 := "Crazyflie"; -- From command line
CPU_Core : constant String := "ARM Cortex-M4F"; -- From mcu definition
Device_Family : constant String := "STM32F4"; -- From board definition
Device_Name : constant String := "STM32F405RGTx"; -- 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 := 8000000; -- 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-sfp-stm32f4"; -- From default value
Runtime_Name_Suffix : constant String := "stm32f4"; -- From board definition
Runtime_Profile : constant String := "ravenscar-sfp"; -- From command line
Use_Startup_Gen : constant Boolean := False; -- From command line
Vendor : constant String := "STMicro"; -- From board definition
end ADL_Config;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package Slim.Messages.STAT is
type STAT_Message is new Message with private;
subtype Event_Kind is String (1 .. 4);
not overriding function Event (Self : STAT_Message) return Event_Kind;
not overriding function WiFi_Level (Self : STAT_Message) return Natural;
not overriding function Elapsed_Seconds
(Self : STAT_Message) return Natural;
private
subtype Byte is Ada.Streams.Stream_Element;
type STAT_Message is new Base_Message
(Max_8 => 4 + 3,
Max_16 => 3,
Max_32 => 8,
Max_64 => 1)
with null record;
overriding function Read
(Data : not null access
League.Stream_Element_Vectors.Stream_Element_Vector)
return STAT_Message;
overriding procedure Write
(Self : STAT_Message;
Tag : out Message_Tag;
Data : out League.Stream_Element_Vectors.Stream_Element_Vector);
overriding procedure Visit
(Self : not null access STAT_Message;
Visiter : in out Slim.Message_Visiters.Visiter'Class);
end Slim.Messages.STAT;
|
with Ada.Text_IO; use Ada.Text_IO;
procedure luhn is
function luhn_test(num : String) return Boolean is
sum : Integer := 0;
odd : Boolean := True;
int : Integer;
begin
for p in reverse num'Range loop
int := Integer'Value(num(p..p));
if odd then
sum := sum + int;
else
sum := sum + (int*2 mod 10) + (int / 5);
end if;
odd := not odd;
end loop;
return (sum mod 10)=0;
end luhn_test;
begin
put_line(Boolean'Image(luhn_test("49927398716")));
put_line(Boolean'Image(luhn_test("49927398717")));
put_line(Boolean'Image(luhn_test("1234567812345678")));
put_line(Boolean'Image(luhn_test("1234567812345670")));
end luhn;
|
with u1, u3;
package u4 is
end u4;
|
-----------------------------------------------------------------------
-- AWA.Audits.Models -- AWA.Audits.Models
-----------------------------------------------------------------------
-- File generated by ada-gen DO NOT MODIFY
-- Template used: templates/model/package-spec.xhtml
-- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095
-----------------------------------------------------------------------
-- Copyright (C) 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.
-----------------------------------------------------------------------
pragma Warnings (Off);
with ADO.Sessions;
with ADO.Objects;
with ADO.Statements;
with ADO.SQL;
with ADO.Schemas;
with Ada.Calendar;
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded;
with Util.Beans.Objects;
with Util.Beans.Basic.Lists;
with AWA.Users.Models;
pragma Warnings (On);
package AWA.Audits.Models is
pragma Style_Checks ("-mr");
type Audit_Ref is new ADO.Objects.Object_Ref with null record;
type Audit_Field_Ref is new ADO.Objects.Object_Ref with null record;
-- --------------------
-- The Audit table records the changes made on database on behalf of a user.
-- The record indicates the database table and row, the field being updated,
-- the old and new value. The old and new values are converted to a string
-- and they truncated if necessary to 256 characters.
-- --------------------
-- Create an object key for Audit.
function Audit_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Audit from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Audit_Key (Id : in String) return ADO.Objects.Object_Key;
Null_Audit : constant Audit_Ref;
function "=" (Left, Right : Audit_Ref'Class) return Boolean;
-- Set the audit identifier
procedure Set_Id (Object : in out Audit_Ref;
Value : in ADO.Identifier);
-- Get the audit identifier
function Get_Id (Object : in Audit_Ref)
return ADO.Identifier;
-- Set the date when the field was modified.
procedure Set_Date (Object : in out Audit_Ref;
Value : in Ada.Calendar.Time);
-- Get the date when the field was modified.
function Get_Date (Object : in Audit_Ref)
return Ada.Calendar.Time;
-- Set the old field value.
procedure Set_Old_Value (Object : in out Audit_Ref;
Value : in ADO.Nullable_String);
procedure Set_Old_Value (Object : in out Audit_Ref;
Value : in String);
-- Get the old field value.
function Get_Old_Value (Object : in Audit_Ref)
return ADO.Nullable_String;
function Get_Old_Value (Object : in Audit_Ref)
return String;
-- Set the new field value.
procedure Set_New_Value (Object : in out Audit_Ref;
Value : in ADO.Nullable_String);
procedure Set_New_Value (Object : in out Audit_Ref;
Value : in String);
-- Get the new field value.
function Get_New_Value (Object : in Audit_Ref)
return ADO.Nullable_String;
function Get_New_Value (Object : in Audit_Ref)
return String;
-- Set the database entity identifier to which the audit is associated.
procedure Set_Entity_Id (Object : in out Audit_Ref;
Value : in ADO.Identifier);
-- Get the database entity identifier to which the audit is associated.
function Get_Entity_Id (Object : in Audit_Ref)
return ADO.Identifier;
--
procedure Set_Field (Object : in out Audit_Ref;
Value : in Integer);
--
function Get_Field (Object : in Audit_Ref)
return Integer;
-- Set the user session under which the field was modified.
procedure Set_Session (Object : in out Audit_Ref;
Value : in AWA.Users.Models.Session_Ref'Class);
-- Get the user session under which the field was modified.
function Get_Session (Object : in Audit_Ref)
return AWA.Users.Models.Session_Ref'Class;
-- Set the entity type.
procedure Set_Entity_Type (Object : in out Audit_Ref;
Value : in ADO.Entity_Type);
-- Get the entity type.
function Get_Entity_Type (Object : in Audit_Ref)
return ADO.Entity_Type;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Audit_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier);
-- Load the entity identified by 'Id'.
-- Returns True in <b>Found</b> if the object was found and False if it does not exist.
procedure Load (Object : in out Audit_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean);
-- Find and load the entity.
overriding
procedure Find (Object : in out Audit_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
-- Save the entity. If the entity does not have an identifier, an identifier is allocated
-- and it is inserted in the table. Otherwise, only data fields which have been changed
-- are updated.
overriding
procedure Save (Object : in out Audit_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Audit_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (From : in Audit_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
AUDIT_TABLE : constant ADO.Schemas.Class_Mapping_Access;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Audit_Ref);
-- Copy of the object.
procedure Copy (Object : in Audit_Ref;
Into : in out Audit_Ref);
package Audit_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => Audit_Ref,
"=" => "=");
subtype Audit_Vector is Audit_Vectors.Vector;
procedure List (Object : in out Audit_Vector;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class);
-- --------------------
-- The Audit_Field table describes
-- the database field being updated.
-- --------------------
-- Create an object key for Audit_Field.
function Audit_Field_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Audit_Field from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Audit_Field_Key (Id : in String) return ADO.Objects.Object_Key;
Null_Audit_Field : constant Audit_Field_Ref;
function "=" (Left, Right : Audit_Field_Ref'Class) return Boolean;
-- Set the audit field identifier.
procedure Set_Id (Object : in out Audit_Field_Ref;
Value : in Integer);
-- Get the audit field identifier.
function Get_Id (Object : in Audit_Field_Ref)
return Integer;
-- Set the audit field name.
procedure Set_Name (Object : in out Audit_Field_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Name (Object : in out Audit_Field_Ref;
Value : in String);
-- Get the audit field name.
function Get_Name (Object : in Audit_Field_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Name (Object : in Audit_Field_Ref)
return String;
-- Set the entity type
procedure Set_Entity_Type (Object : in out Audit_Field_Ref;
Value : in ADO.Entity_Type);
-- Get the entity type
function Get_Entity_Type (Object : in Audit_Field_Ref)
return ADO.Entity_Type;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Audit_Field_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in Integer);
-- Load the entity identified by 'Id'.
-- Returns True in <b>Found</b> if the object was found and False if it does not exist.
procedure Load (Object : in out Audit_Field_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in Integer;
Found : out Boolean);
-- Find and load the entity.
overriding
procedure Find (Object : in out Audit_Field_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
-- Save the entity. If the entity does not have an identifier, an identifier is allocated
-- and it is inserted in the table. Otherwise, only data fields which have been changed
-- are updated.
overriding
procedure Save (Object : in out Audit_Field_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Audit_Field_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (From : in Audit_Field_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
AUDIT_FIELD_TABLE : constant ADO.Schemas.Class_Mapping_Access;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Audit_Field_Ref);
-- Copy of the object.
procedure Copy (Object : in Audit_Field_Ref;
Into : in out Audit_Field_Ref);
private
AUDIT_NAME : aliased constant String := "awa_audit";
COL_0_1_NAME : aliased constant String := "id";
COL_1_1_NAME : aliased constant String := "date";
COL_2_1_NAME : aliased constant String := "old_value";
COL_3_1_NAME : aliased constant String := "new_value";
COL_4_1_NAME : aliased constant String := "entity_id";
COL_5_1_NAME : aliased constant String := "field";
COL_6_1_NAME : aliased constant String := "session_id";
COL_7_1_NAME : aliased constant String := "entity_type";
AUDIT_DEF : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 8,
Table => AUDIT_NAME'Access,
Members => (
1 => COL_0_1_NAME'Access,
2 => COL_1_1_NAME'Access,
3 => COL_2_1_NAME'Access,
4 => COL_3_1_NAME'Access,
5 => COL_4_1_NAME'Access,
6 => COL_5_1_NAME'Access,
7 => COL_6_1_NAME'Access,
8 => COL_7_1_NAME'Access)
);
AUDIT_TABLE : constant ADO.Schemas.Class_Mapping_Access
:= AUDIT_DEF'Access;
Null_Audit : constant Audit_Ref
:= Audit_Ref'(ADO.Objects.Object_Ref with null record);
type Audit_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER,
Of_Class => AUDIT_DEF'Access)
with record
Date : Ada.Calendar.Time;
Old_Value : ADO.Nullable_String;
New_Value : ADO.Nullable_String;
Entity_Id : ADO.Identifier;
Field : Integer;
Session : AWA.Users.Models.Session_Ref;
Entity_Type : ADO.Entity_Type;
end record;
type Audit_Access is access all Audit_Impl;
overriding
procedure Destroy (Object : access Audit_Impl);
overriding
procedure Find (Object : in out Audit_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Audit_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Audit_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Audit_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Create (Object : in out Audit_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Audit_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Audit_Ref'Class;
Impl : out Audit_Access);
AUDIT_FIELD_NAME : aliased constant String := "awa_audit_field";
COL_0_2_NAME : aliased constant String := "id";
COL_1_2_NAME : aliased constant String := "name";
COL_2_2_NAME : aliased constant String := "entity_type";
AUDIT_FIELD_DEF : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 3,
Table => AUDIT_FIELD_NAME'Access,
Members => (
1 => COL_0_2_NAME'Access,
2 => COL_1_2_NAME'Access,
3 => COL_2_2_NAME'Access)
);
AUDIT_FIELD_TABLE : constant ADO.Schemas.Class_Mapping_Access
:= AUDIT_FIELD_DEF'Access;
Null_Audit_Field : constant Audit_Field_Ref
:= Audit_Field_Ref'(ADO.Objects.Object_Ref with null record);
type Audit_Field_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_STRING,
Of_Class => AUDIT_FIELD_DEF'Access)
with record
Name : Ada.Strings.Unbounded.Unbounded_String;
Entity_Type : ADO.Entity_Type;
end record;
type Audit_Field_Access is access all Audit_Field_Impl;
overriding
procedure Destroy (Object : access Audit_Field_Impl);
overriding
procedure Find (Object : in out Audit_Field_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Audit_Field_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Audit_Field_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Audit_Field_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Create (Object : in out Audit_Field_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Audit_Field_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Audit_Field_Ref'Class;
Impl : out Audit_Field_Access);
end AWA.Audits.Models;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . T A S K _ A T T R I B U T E S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2014-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
with System.Tasking;
with System.Tasking.Initialization;
with System.Tasking.Task_Attributes;
pragma Elaborate_All (System.Tasking.Task_Attributes);
with System.Task_Primitives.Operations;
with Ada.Finalization; use Ada.Finalization;
with Ada.Unchecked_Conversion;
with Ada.Unchecked_Deallocation;
package body Ada.Task_Attributes is
use System,
System.Tasking.Initialization,
System.Tasking,
System.Tasking.Task_Attributes;
package STPO renames System.Task_Primitives.Operations;
type Attribute_Cleanup is new Limited_Controlled with null record;
procedure Finalize (Cleanup : in out Attribute_Cleanup);
-- Finalize all tasks' attributes for this package
Cleanup : Attribute_Cleanup;
pragma Unreferenced (Cleanup);
-- Will call Finalize when this instantiation gets out of scope
---------------------------
-- Unchecked Conversions --
---------------------------
type Real_Attribute is record
Free : Deallocator;
Value : Attribute;
end record;
type Real_Attribute_Access is access all Real_Attribute;
pragma No_Strict_Aliasing (Real_Attribute_Access);
-- Each value in the task control block's Attributes array is either
-- mapped to the attribute value directly if Fast_Path is True, or
-- is in effect a Real_Attribute_Access.
--
-- Note: the Deallocator field must be first, for compatibility with
-- System.Tasking.Task_Attributes.Attribute_Record and to allow unchecked
-- conversions between Attribute_Access and Real_Attribute_Access.
function New_Attribute (Val : Attribute) return Atomic_Address;
-- Create a new Real_Attribute using Val, and return its address. The
-- returned value can be converted via To_Real_Attribute.
procedure Deallocate (Ptr : Atomic_Address);
-- Free memory associated with Ptr, a Real_Attribute_Access in reality
function To_Real_Attribute is new
Ada.Unchecked_Conversion (Atomic_Address, Real_Attribute_Access);
pragma Warnings (Off);
-- Kill warning about possible size mismatch
function To_Address is new
Ada.Unchecked_Conversion (Attribute, Atomic_Address);
function To_Attribute is new
Ada.Unchecked_Conversion (Atomic_Address, Attribute);
function To_Address is new
Ada.Unchecked_Conversion (Attribute, System.Address);
function To_Int is new
Ada.Unchecked_Conversion (Attribute, Integer);
pragma Warnings (On);
function To_Address is new
Ada.Unchecked_Conversion (Real_Attribute_Access, Atomic_Address);
pragma Warnings (Off);
-- Kill warning about possible aliasing
function To_Handle is new
Ada.Unchecked_Conversion (System.Address, Attribute_Handle);
pragma Warnings (On);
function To_Task_Id is new
Ada.Unchecked_Conversion (Task_Identification.Task_Id, Task_Id);
-- To access TCB of identified task
procedure Free is new
Ada.Unchecked_Deallocation (Real_Attribute, Real_Attribute_Access);
Fast_Path : constant Boolean :=
(Attribute'Size = Integer'Size
and then Attribute'Alignment <= Atomic_Address'Alignment
and then To_Int (Initial_Value) = 0)
or else (Attribute'Size = System.Address'Size
and then Attribute'Alignment <= Atomic_Address'Alignment
and then To_Address (Initial_Value) = System.Null_Address);
-- If the attribute fits in an Atomic_Address (both size and alignment)
-- and Initial_Value is 0 (or null), then we will map the attribute
-- directly into ATCB.Attributes (Index), otherwise we will create
-- a level of indirection and instead use Attributes (Index) as a
-- Real_Attribute_Access.
Index : constant Integer :=
Next_Index (Require_Finalization => not Fast_Path);
-- Index in the task control block's Attributes array
--------------
-- Finalize --
--------------
procedure Finalize (Cleanup : in out Attribute_Cleanup) is
pragma Unreferenced (Cleanup);
begin
STPO.Lock_RTS;
declare
C : System.Tasking.Task_Id := System.Tasking.All_Tasks_List;
begin
while C /= null loop
STPO.Write_Lock (C);
if C.Attributes (Index) /= 0
and then Require_Finalization (Index)
then
Deallocate (C.Attributes (Index));
C.Attributes (Index) := 0;
end if;
STPO.Unlock (C);
C := C.Common.All_Tasks_Link;
end loop;
end;
Finalize (Index);
STPO.Unlock_RTS;
end Finalize;
----------------
-- Deallocate --
----------------
procedure Deallocate (Ptr : Atomic_Address) is
Obj : Real_Attribute_Access := To_Real_Attribute (Ptr);
begin
Free (Obj);
end Deallocate;
-------------------
-- New_Attribute --
-------------------
function New_Attribute (Val : Attribute) return Atomic_Address is
Tmp : Real_Attribute_Access;
begin
Tmp := new Real_Attribute'(Free => Deallocate'Unrestricted_Access,
Value => Val);
return To_Address (Tmp);
end New_Attribute;
---------------
-- Reference --
---------------
function Reference
(T : Task_Identification.Task_Id := Task_Identification.Current_Task)
return Attribute_Handle
is
Self_Id : Task_Id;
TT : constant Task_Id := To_Task_Id (T);
Error_Message : constant String := "trying to get the reference of a ";
Result : Attribute_Handle;
begin
if TT = null then
raise Program_Error with Error_Message & "null task";
end if;
if TT.Common.State = Terminated then
raise Tasking_Error with Error_Message & "terminated task";
end if;
if Fast_Path then
-- Kill warning about possible alignment mismatch. If this happens,
-- Fast_Path will be False anyway
pragma Warnings (Off);
return To_Handle (TT.Attributes (Index)'Address);
pragma Warnings (On);
else
Self_Id := STPO.Self;
Task_Lock (Self_Id);
if TT.Attributes (Index) = 0 then
TT.Attributes (Index) := New_Attribute (Initial_Value);
end if;
Result := To_Handle
(To_Real_Attribute (TT.Attributes (Index)).Value'Address);
Task_Unlock (Self_Id);
return Result;
end if;
end Reference;
------------------
-- Reinitialize --
------------------
procedure Reinitialize
(T : Task_Identification.Task_Id := Task_Identification.Current_Task)
is
Self_Id : Task_Id;
TT : constant Task_Id := To_Task_Id (T);
Error_Message : constant String := "Trying to Reinitialize a ";
begin
if TT = null then
raise Program_Error with Error_Message & "null task";
end if;
if TT.Common.State = Terminated then
raise Tasking_Error with Error_Message & "terminated task";
end if;
if Fast_Path then
-- No finalization needed, simply reset to Initial_Value
TT.Attributes (Index) := To_Address (Initial_Value);
else
Self_Id := STPO.Self;
Task_Lock (Self_Id);
declare
Attr : Atomic_Address renames TT.Attributes (Index);
begin
if Attr /= 0 then
Deallocate (Attr);
Attr := 0;
end if;
end;
Task_Unlock (Self_Id);
end if;
end Reinitialize;
---------------
-- Set_Value --
---------------
procedure Set_Value
(Val : Attribute;
T : Task_Identification.Task_Id := Task_Identification.Current_Task)
is
Self_Id : Task_Id;
TT : constant Task_Id := To_Task_Id (T);
Error_Message : constant String := "trying to set the value of a ";
begin
if TT = null then
raise Program_Error with Error_Message & "null task";
end if;
if TT.Common.State = Terminated then
raise Tasking_Error with Error_Message & "terminated task";
end if;
if Fast_Path then
-- No finalization needed, simply set to Val
TT.Attributes (Index) := To_Address (Val);
else
Self_Id := STPO.Self;
Task_Lock (Self_Id);
declare
Attr : Atomic_Address renames TT.Attributes (Index);
begin
if Attr /= 0 then
Deallocate (Attr);
end if;
Attr := New_Attribute (Val);
end;
Task_Unlock (Self_Id);
end if;
end Set_Value;
-----------
-- Value --
-----------
function Value
(T : Task_Identification.Task_Id := Task_Identification.Current_Task)
return Attribute
is
Self_Id : Task_Id;
TT : constant Task_Id := To_Task_Id (T);
Error_Message : constant String := "trying to get the value of a ";
begin
if TT = null then
raise Program_Error with Error_Message & "null task";
end if;
if TT.Common.State = Terminated then
raise Tasking_Error with Error_Message & "terminated task";
end if;
if Fast_Path then
return To_Attribute (TT.Attributes (Index));
else
Self_Id := STPO.Self;
Task_Lock (Self_Id);
declare
Attr : Atomic_Address renames TT.Attributes (Index);
begin
if Attr = 0 then
Task_Unlock (Self_Id);
return Initial_Value;
else
declare
Result : constant Attribute :=
To_Real_Attribute (Attr).Value;
begin
Task_Unlock (Self_Id);
return Result;
end;
end if;
end;
end if;
end Value;
end Ada.Task_Attributes;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- I M P U N I T --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 2000 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. --
-- --
------------------------------------------------------------------------------
-- This package contains data and functions used to determine if a given
-- unit is an internal unit intended only for use by the implementation
-- and which should not be directly WITH'ed by user code.
with Types; use Types;
package Impunit is
function Implementation_Unit (U : Unit_Number_Type) return Boolean;
-- Given the unit number of a unit, this function determines if it is a
-- unit that is intended to be used only internally by the implementation.
-- This is used for posting warnings for improper WITH's of such units
-- (such WITH's are allowed without warnings only in GNAT_Mode set by
-- the use of -gnatg). True is returned if a warning should be posted.
end Impunit;
|
-- C24003C.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 LEADING ZEROES IN INTEGRAL PARTS AND TRAILING ZEROES IN
-- FRACTIONAL PARTS OF FIXED POINT LITERALS ARE IGNORED.
-- JRK 12/12/79
-- JRK 12/16/80
-- TBN 10/21/85 RENAMED FROM C24003C.TST AND FIXED LINE LENGTH.
-- DTN 11/12/91 DELETED SUBPART (B). CHANGED EXTENSION FROM '.TST'
-- TO '.ADA'.
WITH REPORT;
PROCEDURE C24003C IS
USE REPORT;
TYPE FIXED IS DELTA 1.0 RANGE 0.0 .. 1000.0;
FX : FIXED := 69.0E1;
BEGIN
TEST ("C24003C", "LEADING/TRAILING ZEROES IN " &
"FIXED POINT LITERALS");
IF 000000000000000000000000000000000000000069.0E1 /= FX THEN
FAILED ("LEADING ZEROES IN INTEGRAL PART OF FIXED " &
"POINT LITERAL NOT IGNORED");
END IF;
IF 69.0000000000000000000000000000000000000000E1 /= FX THEN
-- MIGHT RAISE NUMERIC_ERROR AT COMPILE-TIME.
FAILED ("TRAILING ZEROES IN FRACTIONAL PART OF " &
"FIXED POINT LITERAL NOT IGNORED");
END IF;
IF 0000000000000000000000000000000000000000690.00000 /= FX THEN
FAILED ("LEADING/TRAILING ZEROES IN MANTISSA OF " &
"FIXED POINT LITERAL NOT IGNORED");
END IF;
IF 69.0E00000000000000000000000000000000000000001 /= FX THEN
FAILED ("LEADING ZEROES IN EXPONENT OF FIXED " &
"POINT LITERAL NOT IGNORED");
END IF;
IF 16#00000000000000000000000000000000000000002B.2#E1 /= FX THEN
FAILED ("LEADING ZEROES IN BASED FIXED POINT " &
"LITERAL NOT IGNORED");
END IF;
IF 16#2B.20000000000000000000000000000000000000000#E1 /= FX THEN
FAILED ("TRAILING ZEROES IN BASED FIXED POINT " &
"LITERAL NOT IGNORED");
END IF;
RESULT;
END C24003C;
|
with
openGL.Primitive.indexed,
openGL.Geometry.colored;
package body openGL.Model.box.colored
is
---------
--- Forge
--
function new_Box (Size : in Vector_3;
Faces : in colored.Faces) return View
is
Self : constant View := new Item;
begin
Self.Faces := Faces;
Self.Size := Size;
return Self;
end new_Box;
--------------
--- Attributes
--
overriding
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
Fonts : in Font.font_id_Map_of_font) return Geometry.views
is
pragma unreferenced (Textures, Fonts);
use Geometry;
the_Sites : constant box.Sites := Self.vertex_Sites;
the_Indices : aliased constant Indices := (1, 2, 3, 4);
function new_Face (Vertices : access Geometry.colored.Vertex_array) return Geometry.colored.view
is
use Geometry.colored,
Primitive;
the_Geometry : constant Geometry.colored .view := Geometry.colored.new_Geometry;
the_Primitive : constant Primitive.indexed.view := Primitive.indexed.new_Primitive (triangle_Fan,
the_Indices);
begin
the_Geometry.Vertices_are (Vertices.all);
the_Geometry.add (Primitive.view (the_Primitive));
the_Geometry.is_Transparent (now => False);
return the_Geometry;
end new_Face;
front_Face : Geometry.colored.view;
rear_Face : Geometry.colored.view;
upper_Face : Geometry.colored.view;
lower_Face : Geometry.colored.view;
left_Face : Geometry.colored.view;
right_Face : Geometry.colored.view;
begin
-- Front
--
declare
the_Vertices : aliased Geometry.colored.Vertex_array
:= (1 => (Site => the_Sites ( Left_Lower_Front), Color => +Self.Faces (Front).Colors (1)),
2 => (Site => the_Sites (Right_Lower_Front), Color => +Self.Faces (Front).Colors (2)),
3 => (Site => the_Sites (Right_Upper_Front), Color => +Self.Faces (Front).Colors (3)),
4 => (Site => the_Sites ( Left_Upper_Front), Color => +Self.Faces (Front).Colors (4)));
begin
front_Face := new_Face (Vertices => the_Vertices'Access);
end;
-- Rear
--
declare
the_Vertices : aliased Geometry.colored.Vertex_array
:= (1 => (Site => the_Sites (Right_Lower_Rear), Color => +Self.Faces (Rear).Colors (1)),
2 => (Site => the_Sites ( Left_Lower_Rear), Color => +Self.Faces (Rear).Colors (2)),
3 => (Site => the_Sites ( Left_Upper_Rear), Color => +Self.Faces (Rear).Colors (3)),
4 => (Site => the_Sites (Right_Upper_Rear), Color => +Self.Faces (Rear).Colors (4)));
begin
rear_Face := new_Face (Vertices => the_Vertices'Access);
end;
-- Upper
--
declare
the_Vertices : aliased Geometry.colored.Vertex_array
:= (1 => (Site => the_Sites ( Left_Upper_Front), Color => +Self.Faces (Upper).Colors (1)),
2 => (Site => the_Sites (Right_Upper_Front), Color => +Self.Faces (Upper).Colors (2)),
3 => (Site => the_Sites (Right_Upper_Rear), Color => +Self.Faces (Upper).Colors (3)),
4 => (Site => the_Sites ( Left_Upper_Rear), Color => +Self.Faces (Upper).Colors (4)));
begin
upper_Face := new_Face (Vertices => the_Vertices'Access);
end;
-- Lower
--
declare
the_Vertices : aliased Geometry.colored.Vertex_array
:= (1 => (Site => the_Sites (Right_Lower_Front), Color => +Self.Faces (Lower).Colors (1)),
2 => (Site => the_Sites ( Left_Lower_Front), Color => +Self.Faces (Lower).Colors (2)),
3 => (Site => the_Sites ( Left_Lower_Rear), Color => +Self.Faces (Lower).Colors (3)),
4 => (Site => the_Sites (Right_Lower_Rear), Color => +Self.Faces (Lower).Colors (4)));
begin
lower_Face := new_Face (Vertices => the_Vertices'Access);
end;
-- Left
--
declare
the_Vertices : aliased Geometry.colored.Vertex_array
:= (1 => (Site => the_Sites (Left_Lower_Rear), Color => +Self.Faces (Left).Colors (1)),
2 => (Site => the_Sites (Left_Lower_Front), Color => +Self.Faces (Left).Colors (2)),
3 => (Site => the_Sites (Left_Upper_Front), Color => +Self.Faces (Left).Colors (3)),
4 => (Site => the_Sites (Left_Upper_Rear), Color => +Self.Faces (Left).Colors (4)));
begin
left_Face := new_Face (Vertices => the_Vertices'Access);
end;
-- Right
--
declare
the_Vertices : aliased Geometry.colored.Vertex_array
:= (1 => (Site => the_Sites (Right_Lower_Front), Color => +Self.Faces (Right).Colors (1)),
2 => (Site => the_Sites (Right_Lower_Rear), Color => +Self.Faces (Right).Colors (2)),
3 => (Site => the_Sites (Right_Upper_Rear), Color => +Self.Faces (Right).Colors (3)),
4 => (Site => the_Sites (Right_Upper_Front), Color => +Self.Faces (Right).Colors (4)));
begin
right_Face := new_Face (Vertices => the_Vertices'Access);
end;
return (Geometry.view (front_Face),
Geometry.view ( rear_Face),
Geometry.view (upper_Face),
Geometry.view (lower_Face),
Geometry.view ( left_Face),
Geometry.view (right_Face));
end to_GL_Geometries;
end openGL.Model.box.colored;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . T A S K _ L O C K --
-- --
-- B o d y --
-- --
-- Copyright (C) 1997-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 System.Soft_Links;
package body System.Task_Lock is
----------
-- Lock --
----------
procedure Lock is
begin
System.Soft_Links.Lock_Task.all;
end Lock;
------------
-- Unlock --
------------
procedure Unlock is
begin
System.Soft_Links.Unlock_Task.all;
end Unlock;
end System.Task_Lock;
|
-------------------------------------------------------------------------------
-- Package : Cmd_Flags --
-- Description : Manage user provided CLI flags for the program. --
-- Author : Simon Rowe <simon@wiremoons.com> --
-- License : MIT Open Source. --
-------------------------------------------------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Command_Line; use GNAT.Command_Line;
-- local packages
with Show_Version;
package body Cmd_Flags is
function Command_Line_Flags_Exist return Boolean is
----------------------------------------------
-- Parse and manage and command line flags --
----------------------------------------------
-- GNAT.Command_Line variables and config
Help_Option : aliased Boolean := False;
Version_Option : aliased Boolean := False;
Config : Command_Line_Configuration;
begin
-- define params for the 'help' option
Define_Switch
(Config,
Help_Option'Access,
Switch => "-h",
Long_Switch => "--help",
Help => "Show command line usage for application");
-- define params for the 'version' option
Define_Switch
(Config,
Version_Option'Access,
Switch => "-v",
Long_Switch => "--version",
Help => "Show version details");
-- Additional help message as first line of 'Display_Help()'
Set_Usage
(Config,
Usage => "[switches] [arguments]",
Help => "Program to generate passwords from random three letter words.");
-- cli flags parse using config and above defined switched
Getopt (Config);
-- show program 'version' if requested
if Version_Option then
Show_Version.Show;
return True;
end if;
-- show 'help' if requested
if Help_Option then
New_Line (1);
Display_Help (Config);
return True;
end if;
-- no cli params : so just return
--Try_Help; -- alternative one line response
return False;
exception
when Invalid_Switch =>
New_Line (1);
Put_Line (Standard_Error, "Exception caught: caused by the use of an invalid command line switch.");
New_Line (1);
Display_Help (Config);
return True;
when Invalid_Parameter =>
New_Line (1);
Put_Line
(Standard_Error,
"Exception caught: caused by the use of an invalid parameter to a command line switch.");
New_Line (1);
Display_Help (Config);
return True;
when Exit_From_Command_Line =>
New_Line (1);
Put_Line (Standard_Error, "Exit following display of help message.");
return True;
end Command_Line_Flags_Exist;
end Cmd_Flags;
|
-- Copyright 2012-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 Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2017-2018, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with HAL.GPIO; use HAL.GPIO;
with Wire_Simulation; use Wire_Simulation;
with Ada.Text_IO; use Ada.Text_IO;
procedure TC_Virtual_Wire is
pragma Assertion_Policy (Assert => Check);
No_Pull_Wire : Virtual_Wire (Default_Pull => Floating,
Max_Points => 2);
Pull_Up_Wire : Virtual_Wire (Default_Pull => Pull_Up,
Max_Points => 2);
Pull_Down_Wire : Virtual_Wire (Default_Pull => Pull_Down,
Max_Points => 2);
Unref : Boolean with Unreferenced;
begin
-- Default mode --
pragma Assert (No_Pull_Wire.Point (1).Mode = Input,
"Default point mode should be input");
-- State with only inputs and a wire pull resistor --
pragma Assert (Pull_Up_Wire.Point (1).Set,
"Default state of pull up wire should be high");
pragma Assert (not Pull_Down_Wire.Point (1).Set,
"Default state of pull down wire should be low");
-- State with only inputs and a point pull resistor --
pragma Assert (No_Pull_Wire.Point (1).Support (Pull_Up),
"It should be possible to change the pull resitor");
No_Pull_Wire.Point (1).Set_Pull_Resistor (Pull_Up);
pragma Assert (No_Pull_Wire.Point (1).Set,
"State of wire with one pull up point should be high");
No_Pull_Wire.Point (1).Set_Pull_Resistor (Pull_Down);
pragma Assert (not No_Pull_Wire.Point (1).Set,
"State of wire with one pull down point should be low");
-- State with one input one output and no pull resistor --
pragma Assert (No_Pull_Wire.Point (1).Support (Input),
"It should be possible to change the mode");
No_Pull_Wire.Point (1).Set_Mode (Input);
No_Pull_Wire.Point (1).Set_Pull_Resistor (Pull_Down);
No_Pull_Wire.Point (2).Set_Mode (Output);
No_Pull_Wire.Point (2).Set_Pull_Resistor (Floating);
No_Pull_Wire.Point (2).Set;
pragma Assert (No_Pull_Wire.Point (1).Set, "Should be high");
No_Pull_Wire.Point (2).Clear;
pragma Assert (not No_Pull_Wire.Point (1).Set, "Should be low");
-- State with one input one output and point pull resistor --
No_Pull_Wire.Point (1).Set_Mode (Input);
No_Pull_Wire.Point (1).Set_Pull_Resistor (Pull_Up);
No_Pull_Wire.Point (2).Set_Mode (Output);
No_Pull_Wire.Point (2).Set_Pull_Resistor (Floating);
No_Pull_Wire.Point (2).Set;
pragma Assert (No_Pull_Wire.Point (1).Set, "Should be high");
No_Pull_Wire.Point (2).Clear;
pragma Assert (not No_Pull_Wire.Point (1).Set, "Should be low");
No_Pull_Wire.Point (1).Set_Pull_Resistor (Pull_Down);
No_Pull_Wire.Point (2).Set;
pragma Assert (No_Pull_Wire.Point (1).Set, "Should be high");
No_Pull_Wire.Point (2).Clear;
pragma Assert (not No_Pull_Wire.Point (1).Set, "Should be low");
-- Opposite pull on the same wire --
declare
begin
Pull_Down_Wire.Point (1).Set_Pull_Resistor (Pull_Up);
exception
when Invalid_Configuration =>
Put_Line ("Expected exception on oppposite pull (1)");
end;
declare
begin
Pull_Up_Wire.Point (1).Set_Pull_Resistor (Pull_Down);
exception
when Invalid_Configuration =>
Put_Line ("Expected exception on oppposite pull (2)");
end;
-- Two output point on a wire --
declare
begin
Pull_Up_Wire.Point (1).Set_Mode (Output);
Pull_Up_Wire.Point (2).Set_Mode (Output);
exception
when Invalid_Configuration =>
Put_Line ("Expected exception on multiple output points");
end;
-- Unknon state --
declare
begin
No_Pull_Wire.Point (1).Set_Mode (Input);
No_Pull_Wire.Point (1).Set_Pull_Resistor (Floating);
No_Pull_Wire.Point (2).Set_Mode (Input);
No_Pull_Wire.Point (2).Set_Pull_Resistor (Floating);
Unref := No_Pull_Wire.Point (2).Set;
exception
when Unknown_State =>
Put_Line ("Expected exception on unknown state");
end;
end TC_Virtual_Wire;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2015, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
pragma Restrictions (No_Elaboration_Code);
-- GNAT: enforce generation of preinitialized data section instead of
-- generation of elaboration code.
package Matreshka.Internals.Unicode.Ucd.Core_001E is
pragma Preelaborate;
Group_001E : aliased constant Core_Second_Stage
:= (16#00# => -- 1E00
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#02# => -- 1E02
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#04# => -- 1E04
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#06# => -- 1E06
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#08# => -- 1E08
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#0A# => -- 1E0A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#0C# => -- 1E0C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#0E# => -- 1E0E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#10# => -- 1E10
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#12# => -- 1E12
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#14# => -- 1E14
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#16# => -- 1E16
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#18# => -- 1E18
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#1A# => -- 1E1A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#1C# => -- 1E1C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#1E# => -- 1E1E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#20# => -- 1E20
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#22# => -- 1E22
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#24# => -- 1E24
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#26# => -- 1E26
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#28# => -- 1E28
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#2A# => -- 1E2A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#2C# => -- 1E2C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#2D# => -- 1E2D
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Soft_Dotted
| Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#2E# => -- 1E2E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#30# => -- 1E30
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#32# => -- 1E32
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#34# => -- 1E34
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#36# => -- 1E36
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#38# => -- 1E38
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#3A# => -- 1E3A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#3C# => -- 1E3C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#3E# => -- 1E3E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#40# => -- 1E40
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#42# => -- 1E42
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#44# => -- 1E44
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#46# => -- 1E46
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#48# => -- 1E48
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#4A# => -- 1E4A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#4C# => -- 1E4C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#4E# => -- 1E4E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#50# => -- 1E50
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#52# => -- 1E52
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#54# => -- 1E54
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#56# => -- 1E56
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#58# => -- 1E58
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#5A# => -- 1E5A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#5C# => -- 1E5C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#5E# => -- 1E5E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#60# => -- 1E60
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#62# => -- 1E62
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#64# => -- 1E64
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#66# => -- 1E66
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#68# => -- 1E68
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#6A# => -- 1E6A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#6C# => -- 1E6C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#6E# => -- 1E6E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#70# => -- 1E70
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#72# => -- 1E72
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#74# => -- 1E74
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#76# => -- 1E76
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#78# => -- 1E78
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#7A# => -- 1E7A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#7C# => -- 1E7C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#7E# => -- 1E7E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#80# => -- 1E80
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#82# => -- 1E82
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#84# => -- 1E84
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#86# => -- 1E86
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#88# => -- 1E88
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#8A# => -- 1E8A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#8C# => -- 1E8C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#8E# => -- 1E8E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#90# => -- 1E90
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#92# => -- 1E92
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#94# => -- 1E94
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#9A# .. 16#9B# => -- 1E9A .. 1E9B
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#9C# .. 16#9D# => -- 1E9C .. 1E9D
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#9E# => -- 1E9E
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#9F# => -- 1E9F
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#A0# => -- 1EA0
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#A2# => -- 1EA2
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#A4# => -- 1EA4
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#A6# => -- 1EA6
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#A8# => -- 1EA8
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#AA# => -- 1EAA
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#AC# => -- 1EAC
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#AE# => -- 1EAE
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#B0# => -- 1EB0
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#B2# => -- 1EB2
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#B4# => -- 1EB4
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#B6# => -- 1EB6
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#B8# => -- 1EB8
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#BA# => -- 1EBA
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#BC# => -- 1EBC
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#BE# => -- 1EBE
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#C0# => -- 1EC0
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#C2# => -- 1EC2
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#C4# => -- 1EC4
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#C6# => -- 1EC6
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#C8# => -- 1EC8
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#CA# => -- 1ECA
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#CB# => -- 1ECB
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Soft_Dotted
| Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#CC# => -- 1ECC
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#CE# => -- 1ECE
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D0# => -- 1ED0
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D2# => -- 1ED2
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D4# => -- 1ED4
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D6# => -- 1ED6
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D8# => -- 1ED8
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#DA# => -- 1EDA
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#DC# => -- 1EDC
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#DE# => -- 1EDE
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#E0# => -- 1EE0
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#E2# => -- 1EE2
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#E4# => -- 1EE4
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#E6# => -- 1EE6
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#E8# => -- 1EE8
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#EA# => -- 1EEA
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#EC# => -- 1EEC
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#EE# => -- 1EEE
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#F0# => -- 1EF0
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#F2# => -- 1EF2
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#F4# => -- 1EF4
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#F6# => -- 1EF6
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#F8# => -- 1EF8
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#FA# => -- 1EFA
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#FC# => -- 1EFC
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#FE# => -- 1EFE
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
others =>
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)));
end Matreshka.Internals.Unicode.Ucd.Core_001E;
|
-----------------------------------------------------------------------
-- awa-wikis-previews -- Wiki preview management
-- Copyright (C) 2015, 2018, 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.Strings.Unbounded;
with Util.Log.Loggers;
with Util.Beans.Objects;
with Util.Files;
with Util.Processes;
with Util.Streams.Pipes;
with Util.Streams.Texts;
with EL.Contexts.TLS;
with Servlet.Core;
with ASF.Requests.Mockup;
with ASF.Responses.Mockup;
with AWA.Applications;
with AWA.Modules.Get;
package body AWA.Wikis.Previews is
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("AWA.Wikis.Preview");
-- ------------------------------
-- The worker procedure that performs the preview job.
-- ------------------------------
procedure Preview_Worker (Job : in out AWA.Jobs.Services.Abstract_Job_Type'Class) is
Previewer : constant Preview_Module_Access := Get_Preview_Module;
begin
Previewer.Do_Preview_Job (Job);
end Preview_Worker;
-- ------------------------------
-- Initialize the wikis module.
-- ------------------------------
overriding
procedure Initialize (Plugin : in out Preview_Module;
App : in AWA.Modules.Application_Access;
Props : in ASF.Applications.Config) is
begin
Log.Info ("Initializing the wiki preview module");
AWA.Modules.Module (Plugin).Initialize (App, Props);
end Initialize;
-- ------------------------------
-- Configures the module after its initialization and after having read its XML configuration.
-- ------------------------------
overriding
procedure Configure (Plugin : in out Preview_Module;
Props : in ASF.Applications.Config) is
pragma Unreferenced (Props);
begin
Plugin.Template := Plugin.Get_Config (PARAM_PREVIEW_TEMPLATE);
Plugin.Command := Plugin.Get_Config (PARAM_PREVIEW_COMMAND);
Plugin.Html := Plugin.Get_Config (PARAM_PREVIEW_HTML);
Plugin.Add_Listener (AWA.Wikis.Modules.NAME, Plugin'Unchecked_Access);
Plugin.Job_Module := AWA.Jobs.Modules.Get_Job_Module;
Plugin.Job_Module.Register (Definition => Preview_Job_Definition.Factory);
end Configure;
-- ------------------------------
-- Execute the preview job and make the thumbnail preview. The page is first rendered in
-- an HTML text file and the preview is rendered by using an external command.
-- ------------------------------
procedure Do_Preview_Job (Plugin : in Preview_Module;
Job : in out AWA.Jobs.Services.Abstract_Job_Type'Class) is
pragma Unreferenced (Job);
use Util.Beans.Objects;
Ctx : constant EL.Contexts.ELContext_Access := EL.Contexts.TLS.Current;
Template : constant String := To_String (Plugin.Template.Get_Value (Ctx.all));
Command : constant String := To_String (Plugin.Command.Get_Value (Ctx.all));
Html_File : constant String := To_String (Plugin.Html.Get_Value (Ctx.all));
begin
Log.Info ("Preview {0} with {1}", Template, Command);
declare
Req : ASF.Requests.Mockup.Request;
Reply : ASF.Responses.Mockup.Response;
Dispatcher : constant Servlet.Core.Request_Dispatcher
:= Plugin.Get_Application.Get_Request_Dispatcher (Template);
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
Req.Set_Request_URI (Template);
Req.Set_Method ("GET");
Servlet.Core.Forward (Dispatcher, Req, Reply);
Reply.Read_Content (Result);
Util.Files.Write_File (Html_File, Result);
end;
declare
Pipe : aliased Util.Streams.Pipes.Pipe_Stream;
Input : Util.Streams.Texts.Reader_Stream;
begin
Log.Info ("Running preview command {0}", Command);
Pipe.Open (Command, Util.Processes.READ_ALL);
Input.Initialize (Pipe'Unchecked_Access, 1024);
while not Input.Is_Eof loop
declare
Line : Ada.Strings.Unbounded.Unbounded_String;
begin
Input.Read_Line (Line, False);
Log.Info ("Received: {0}", Line);
end;
end loop;
Pipe.Close;
if Pipe.Get_Exit_Status /= 0 then
Log.Error ("Command {0} exited with status {1}", Command,
Integer'Image (Pipe.Get_Exit_Status));
end if;
end;
end Do_Preview_Job;
-- ------------------------------
-- Create a preview job and schedule the job to generate a new thumbnail preview for the page.
-- ------------------------------
procedure Make_Preview_Job (Plugin : in Preview_Module;
Page : in AWA.Wikis.Models.Wiki_Page_Ref'Class) is
pragma Unreferenced (Plugin);
J : AWA.Jobs.Services.Job_Type;
begin
J.Set_Parameter ("wiki_space_id", Page.Get_Wiki);
J.Set_Parameter ("wiki_page_id", Page);
J.Schedule (Preview_Job_Definition.Factory.all);
end Make_Preview_Job;
-- ------------------------------
-- The `On_Create` procedure is called by `Notify_Create` to notify the creation of the page.
-- ------------------------------
overriding
procedure On_Create (Instance : in Preview_Module;
Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class) is
begin
Instance.Make_Preview_Job (Item);
end On_Create;
-- ------------------------------
-- The `On_Update` procedure is called by `Notify_Update` to notify the update of the page.
-- ------------------------------
overriding
procedure On_Update (Instance : in Preview_Module;
Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class) is
begin
Instance.Make_Preview_Job (Item);
end On_Update;
-- ------------------------------
-- The `On_Delete` procedure is called by `Notify_Delete` to notify the deletion of the page.
-- ------------------------------
overriding
procedure On_Delete (Instance : in Preview_Module;
Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class) is
begin
null;
end On_Delete;
-- ------------------------------
-- Get the preview module instance associated with the current application.
-- ------------------------------
function Get_Preview_Module return Preview_Module_Access is
function Get is new AWA.Modules.Get (Preview_Module, Preview_Module_Access, NAME);
begin
return Get;
end Get_Preview_Module;
end AWA.Wikis.Previews;
|
-----------------------------------------------------------------------
-- keystore-tools-tests -- Tests for files
-- Copyright (C) 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Directories;
with Util.Test_Caller;
with Util.Strings;
with Keystore.Files;
package body Keystore.Tools.Tests is
use Ada.Directories;
use type Interfaces.Unsigned_64;
package Caller is new Util.Test_Caller (Test, "Keystore.Tools");
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
begin
Caller.Add_Test (Suite, "Test Keystore.Files.Create+Open",
Test_Store_Directory'Access);
end Add_Tests;
-- ------------------------------
-- Test storing a directory tree
-- ------------------------------
procedure Test_Store_Directory (T : in out Test) is
function Filter (Ent : in Directory_Entry_Type) return Boolean;
function Filter (Ent : in Directory_Entry_Type) return Boolean is
Name : constant String := Ada.Directories.Simple_Name (Ent);
Kind : constant File_Kind := Ada.Directories.Kind (Ent);
begin
if Kind = Ada.Directories.Ordinary_File then
return Util.Strings.Ends_With (Name, ".ads");
else
return Name /= ".git" and Name /= "result";
end if;
end Filter;
Path : constant String := Util.Tests.Get_Test_Path ("regtests/result/test-store.akt");
Password : Keystore.Secret_Key := Keystore.Create ("mypassword");
Config : Keystore.Wallet_Config := Unsecure_Config;
begin
declare
W : Keystore.Files.Wallet_File;
begin
Config.Overwrite := True;
W.Create (Path => Path, Password => Password, Config => Config);
Keystore.Tools.Store (Wallet => W,
Path => ".",
Prefix => "store/",
Pattern => "*",
Filter => Filter'Access);
end;
declare
procedure Check (Name : in String);
W : Keystore.Files.Wallet_File;
procedure Check (Name : in String) is
Item : Keystore.Entry_Info;
begin
Item := W.Find (Name);
T.Assert (Item.Size > 8192, "Invalid item size for " & Name);
T.Assert (Item.Size < 128 * 1024, "Invalid item size for " & Name);
T.Assert (Item.Block_Count > 2, "Invalid item for " & Name);
T.Assert (Item.Kind = T_FILE, "Invalid item type for " & Name);
end Check;
begin
W.Open (Password => Password, Path => Path);
Check ("store/src/keystore.ads");
Check ("store/src/keystore-repository.ads");
Check ("store/obj/b__akt-main.ads");
end;
end Test_Store_Directory;
end Keystore.Tools.Tests;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I M G _ R E A L --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Img_LLU; use System.Img_LLU;
with System.Img_Uns; use System.Img_Uns;
with System.Powten_Table; use System.Powten_Table;
with System.Unsigned_Types; use System.Unsigned_Types;
package body System.Img_Real is
-- The following defines the maximum number of digits that we can convert
-- accurately. This is limited by the precision of Long_Long_Float, and
-- also by the number of digits we can hold in Long_Long_Unsigned, which
-- is the integer type we use as an intermediate for the result.
-- We assume that in practice, the limitation will come from the digits
-- value, rather than the integer value. This is true for typical IEEE
-- implementations, and at worst, the only loss is for some precision
-- in very high precision floating-point output.
-- Note that in the following, the "-2" accounts for the sign and one
-- extra digits, since we need the maximum number of 9's that can be
-- supported, e.g. for the normal 64 bit case, Long_Long_Integer'Width
-- is 21, since the maximum value (approx 1.6 * 10**19) has 20 digits,
-- but the maximum number of 9's that can be supported is 19.
Maxdigs : constant :=
Natural'Min
(Long_Long_Unsigned'Width - 2, Long_Long_Float'Digits);
Unsdigs : constant := Unsigned'Width - 2;
-- Number of digits that can be converted using type Unsigned
-- See above for the explanation of the -2.
Maxscaling : constant := 5000;
-- Max decimal scaling required during conversion of floating-point
-- numbers to decimal. This is used to defend against infinite
-- looping in the conversion, as can be caused by erroneous executions.
-- The largest exponent used on any current system is 2**16383, which
-- is approximately 10**4932, and the highest number of decimal digits
-- is about 35 for 128-bit floating-point formats, so 5000 leaves
-- enough room for scaling such values
function Is_Negative (V : Long_Long_Float) return Boolean;
pragma Import (Intrinsic, Is_Negative);
--------------------------
-- Image_Floating_Point --
--------------------------
function Image_Floating_Point
(V : Long_Long_Float;
Digs : Natural)
return String
is
P : Natural := 0;
S : String (1 .. Long_Long_Float'Width);
begin
if not Is_Negative (V) then
S (1) := ' ';
P := 1;
end if;
Set_Image_Real (V, S, P, 1, Digs - 1, 3);
return S (1 .. P);
end Image_Floating_Point;
--------------------------------
-- Image_Ordinary_Fixed_Point --
--------------------------------
function Image_Ordinary_Fixed_Point
(V : Long_Long_Float;
Aft : Natural)
return String
is
P : Natural := 0;
S : String (1 .. Long_Long_Float'Width);
begin
if V >= 0.0 then
S (1) := ' ';
P := 1;
end if;
Set_Image_Real (V, S, P, 1, Aft, 0);
return S (1 .. P);
end Image_Ordinary_Fixed_Point;
--------------------
-- Set_Image_Real --
--------------------
procedure Set_Image_Real
(V : Long_Long_Float;
S : out String;
P : in out Natural;
Fore : Natural;
Aft : Natural;
Exp : Natural)
is
procedure Reset;
pragma Import (C, Reset, "__gnat_init_float");
-- We import the floating-point processor reset routine so that we can
-- be sure the floating-point processor is properly set for conversion
-- calls (see description of Reset in GNAT.Float_Control (g-flocon.ads).
-- This is notably need on Windows, where calls to the operating system
-- randomly reset the processor into 64-bit mode.
NFrac : constant Natural := Natural'Max (Aft, 1);
Sign : Character;
X : aliased Long_Long_Float;
-- This is declared aliased because the expansion of X'Valid passes
-- X by access and JGNAT requires all access parameters to be aliased.
-- The Valid attribute probably needs to be handled via a different
-- expansion for JGNAT, and this use of aliased should be removed
-- once Valid is handled properly. ???
Scale : Integer;
Expon : Integer;
Field_Max : constant := 255;
-- This should be the same value as Ada.[Wide_]Text_IO.Field'Last.
-- It is not worth dragging in Ada.Text_IO to pick up this value,
-- since it really should never be necessary to change it!
Digs : String (1 .. 2 * Field_Max + 16);
-- Array used to hold digits of converted integer value. This is a
-- large enough buffer to accommodate ludicrous values of Fore and Aft.
Ndigs : Natural;
-- Number of digits stored in Digs (and also subscript of last digit)
procedure Adjust_Scale (S : Natural);
-- Adjusts the value in X by multiplying or dividing by a power of
-- ten so that it is in the range 10**(S-1) <= X < 10**S. Includes
-- adding 0.5 to round the result, readjusting if the rounding causes
-- the result to wander out of the range. Scale is adjusted to reflect
-- the power of ten used to divide the result (i.e. one is added to
-- the scale value for each division by 10.0, or one is subtracted
-- for each multiplication by 10.0).
procedure Convert_Integer;
-- Takes the value in X, outputs integer digits into Digs. On return,
-- Ndigs is set to the number of digits stored. The digits are stored
-- in Digs (1 .. Ndigs),
procedure Set (C : Character);
-- Sets character C in output buffer
procedure Set_Blanks_And_Sign (N : Integer);
-- Sets leading blanks and minus sign if needed. N is the number of
-- positions to be filled (a minus sign is output even if N is zero
-- or negative, but for a positive value, if N is non-positive, then
-- the call has no effect).
procedure Set_Digs (S, E : Natural);
-- Set digits S through E from Digs buffer. No effect if S > E
procedure Set_Special_Fill (N : Natural);
-- After outputting +Inf, -Inf or NaN, this routine fills out the
-- rest of the field with * characters. The argument is the number
-- of characters output so far (either 3 or 4)
procedure Set_Zeros (N : Integer);
-- Set N zeros, no effect if N is negative
pragma Inline (Set);
pragma Inline (Set_Digs);
pragma Inline (Set_Zeros);
------------------
-- Adjust_Scale --
------------------
procedure Adjust_Scale (S : Natural) is
Lo : Natural;
Hi : Natural;
Mid : Natural;
XP : Long_Long_Float;
begin
-- Cases where scaling up is required
if X < Powten (S - 1) then
-- What we are looking for is a power of ten to multiply X by
-- so that the result lies within the required range.
loop
XP := X * Powten (Maxpow);
exit when XP >= Powten (S - 1) or Scale < -Maxscaling;
X := XP;
Scale := Scale - Maxpow;
end loop;
-- The following exception is only raised in case of erroneous
-- execution, where a number was considered valid but still
-- fails to scale up. One situation where this can happen is
-- when a system which is supposed to be IEEE-compliant, but
-- has been reconfigured to flush denormals to zero.
if Scale < -Maxscaling then
raise Constraint_Error;
end if;
-- Here we know that we must multiply by at least 10**1 and that
-- 10**Maxpow takes us too far: binary search to find right one.
-- Because of roundoff errors, it is possible for the value
-- of XP to be just outside of the interval when Lo >= Hi. In
-- that case we adjust explicitly by a factor of 10. This
-- can only happen with a value that is very close to an
-- exact power of 10.
Lo := 1;
Hi := Maxpow;
loop
Mid := (Lo + Hi) / 2;
XP := X * Powten (Mid);
if XP < Powten (S - 1) then
if Lo >= Hi then
Mid := Mid + 1;
XP := XP * 10.0;
exit;
else
Lo := Mid + 1;
end if;
elsif XP >= Powten (S) then
if Lo >= Hi then
Mid := Mid - 1;
XP := XP / 10.0;
exit;
else
Hi := Mid - 1;
end if;
else
exit;
end if;
end loop;
X := XP;
Scale := Scale - Mid;
-- Cases where scaling down is required
elsif X >= Powten (S) then
-- What we are looking for is a power of ten to divide X by
-- so that the result lies within the required range.
loop
XP := X / Powten (Maxpow);
exit when XP < Powten (S) or Scale > Maxscaling;
X := XP;
Scale := Scale + Maxpow;
end loop;
-- The following exception is only raised in case of erroneous
-- execution, where a number was considered valid but still
-- fails to scale up. One situation where this can happen is
-- when a system which is supposed to be IEEE-compliant, but
-- has been reconfigured to flush denormals to zero.
if Scale > Maxscaling then
raise Constraint_Error;
end if;
-- Here we know that we must divide by at least 10**1 and that
-- 10**Maxpow takes us too far, binary search to find right one.
Lo := 1;
Hi := Maxpow;
loop
Mid := (Lo + Hi) / 2;
XP := X / Powten (Mid);
if XP < Powten (S - 1) then
if Lo >= Hi then
XP := XP * 10.0;
Mid := Mid - 1;
exit;
else
Hi := Mid - 1;
end if;
elsif XP >= Powten (S) then
if Lo >= Hi then
XP := XP / 10.0;
Mid := Mid + 1;
exit;
else
Lo := Mid + 1;
end if;
else
exit;
end if;
end loop;
X := XP;
Scale := Scale + Mid;
-- Here we are already scaled right
else
null;
end if;
-- Round, readjusting scale if needed. Note that if a readjustment
-- occurs, then it is never necessary to round again, because there
-- is no possibility of such a second rounding causing a change.
X := X + 0.5;
if X >= Powten (S) then
X := X / 10.0;
Scale := Scale + 1;
end if;
end Adjust_Scale;
---------------------
-- Convert_Integer --
---------------------
procedure Convert_Integer is
begin
-- Use Unsigned routine if possible, since on many machines it will
-- be significantly more efficient than the Long_Long_Unsigned one.
if X < Powten (Unsdigs) then
Ndigs := 0;
Set_Image_Unsigned
(Unsigned (Long_Long_Float'Truncation (X)),
Digs, Ndigs);
-- But if we want more digits than fit in Unsigned, we have to use
-- the Long_Long_Unsigned routine after all.
else
Ndigs := 0;
Set_Image_Long_Long_Unsigned
(Long_Long_Unsigned (Long_Long_Float'Truncation (X)),
Digs, Ndigs);
end if;
end Convert_Integer;
---------
-- Set --
---------
procedure Set (C : Character) is
begin
P := P + 1;
S (P) := C;
end Set;
-------------------------
-- Set_Blanks_And_Sign --
-------------------------
procedure Set_Blanks_And_Sign (N : Integer) is
begin
if Sign = '-' then
for J in 1 .. N - 1 loop
Set (' ');
end loop;
Set ('-');
else
for J in 1 .. N loop
Set (' ');
end loop;
end if;
end Set_Blanks_And_Sign;
--------------
-- Set_Digs --
--------------
procedure Set_Digs (S, E : Natural) is
begin
for J in S .. E loop
Set (Digs (J));
end loop;
end Set_Digs;
----------------------
-- Set_Special_Fill --
----------------------
procedure Set_Special_Fill (N : Natural) is
F : Natural;
begin
F := Fore + 1 + Aft - N;
if Exp /= 0 then
F := F + Exp + 1;
end if;
for J in 1 .. F loop
Set ('*');
end loop;
end Set_Special_Fill;
---------------
-- Set_Zeros --
---------------
procedure Set_Zeros (N : Integer) is
begin
for J in 1 .. N loop
Set ('0');
end loop;
end Set_Zeros;
-- Start of processing for Set_Image_Real
begin
Reset;
Scale := 0;
-- Positive values
if V > 0.0 then
X := V;
Sign := '+';
-- Negative values
elsif V < 0.0 then
X := -V;
Sign := '-';
-- Zero values
elsif V = 0.0 then
if Long_Long_Float'Signed_Zeros and then Is_Negative (V) then
Sign := '-';
else
Sign := '+';
end if;
Set_Blanks_And_Sign (Fore - 1);
Set ('0');
Set ('.');
Set_Zeros (NFrac);
if Exp /= 0 then
Set ('E');
Set ('+');
Set_Zeros (Natural'Max (1, Exp - 1));
end if;
return;
end if;
-- Deal with invalid values
if not X'Valid then
-- Note that we're taking our chances here, as X might be
-- an invalid bit pattern resulting from erroneous execution
-- (caused by using uninitialized variables for example).
-- No matter what, we'll at least get reasonable behaviour,
-- converting to infinity or some other value, or causing an
-- exception to be raised is fine.
-- If the following test succeeds, then we definitely have
-- an infinite value, so we print Inf.
if X > Long_Long_Float'Last then
Set (Sign);
Set ('I');
Set ('n');
Set ('f');
Set_Special_Fill (4);
-- In all other cases we print NaN
else
Set ('N');
Set ('a');
Set ('N');
Set_Special_Fill (3);
end if;
return;
-- Case of non-zero value with Exp = 0
elsif Exp = 0 then
-- First step is to multiply by 10 ** Nfrac to get an integer
-- value to be output, an then add 0.5 to round the result.
declare
NF : Natural := NFrac;
begin
loop
-- If we are larger than Powten (Maxdigs) now, then
-- we have too many significant digits, and we have
-- not even finished multiplying by NFrac (NF shows
-- the number of unaccounted-for digits).
if X >= Powten (Maxdigs) then
-- In this situation, we only to generate a reasonable
-- number of significant digits, and then zeroes after.
-- So first we rescale to get:
-- 10 ** (Maxdigs - 1) <= X < 10 ** Maxdigs
-- and then convert the resulting integer
Adjust_Scale (Maxdigs);
Convert_Integer;
-- If that caused rescaling, then add zeros to the end
-- of the number to account for this scaling. Also add
-- zeroes to account for the undone multiplications
for J in 1 .. Scale + NF loop
Ndigs := Ndigs + 1;
Digs (Ndigs) := '0';
end loop;
exit;
-- If multiplication is complete, then convert the resulting
-- integer after rounding (note that X is non-negative)
elsif NF = 0 then
X := X + 0.5;
Convert_Integer;
exit;
-- Otherwise we can go ahead with the multiplication. If it
-- can be done in one step, then do it in one step.
elsif NF < Maxpow then
X := X * Powten (NF);
NF := 0;
-- If it cannot be done in one step, then do partial scaling
else
X := X * Powten (Maxpow);
NF := NF - Maxpow;
end if;
end loop;
end;
-- If number of available digits is less or equal to NFrac,
-- then we need an extra zero before the decimal point.
if Ndigs <= NFrac then
Set_Blanks_And_Sign (Fore - 1);
Set ('0');
Set ('.');
Set_Zeros (NFrac - Ndigs);
Set_Digs (1, Ndigs);
-- Normal case with some digits before the decimal point
else
Set_Blanks_And_Sign (Fore - (Ndigs - NFrac));
Set_Digs (1, Ndigs - NFrac);
Set ('.');
Set_Digs (Ndigs - NFrac + 1, Ndigs);
end if;
-- Case of non-zero value with non-zero Exp value
else
-- If NFrac is less than Maxdigs, then all the fraction digits are
-- significant, so we can scale the resulting integer accordingly.
if NFrac < Maxdigs then
Adjust_Scale (NFrac + 1);
Convert_Integer;
-- Otherwise, we get the maximum number of digits available
else
Adjust_Scale (Maxdigs);
Convert_Integer;
for J in 1 .. NFrac - Maxdigs + 1 loop
Ndigs := Ndigs + 1;
Digs (Ndigs) := '0';
Scale := Scale - 1;
end loop;
end if;
Set_Blanks_And_Sign (Fore - 1);
Set (Digs (1));
Set ('.');
Set_Digs (2, Ndigs);
-- The exponent is the scaling factor adjusted for the digits
-- that we output after the decimal point, since these were
-- included in the scaled digits that we output.
Expon := Scale + NFrac;
Set ('E');
Ndigs := 0;
if Expon >= 0 then
Set ('+');
Set_Image_Unsigned (Unsigned (Expon), Digs, Ndigs);
else
Set ('-');
Set_Image_Unsigned (Unsigned (-Expon), Digs, Ndigs);
end if;
Set_Zeros (Exp - Ndigs - 1);
Set_Digs (1, Ndigs);
end if;
end Set_Image_Real;
end System.Img_Real;
|
with Ada.Unchecked_Conversion;
with C.stdlib;
package body System.Native_Locales is
use type C.char;
use type C.char_array;
use type C.char_ptr;
use type C.size_t;
subtype Fixed_char_array is C.char_array (C.size_t);
type char_array_const_ptr is access constant Fixed_char_array
with Convention => C;
function To_char_array_const_ptr is
new Ada.Unchecked_Conversion (C.char_ptr, char_array_const_ptr);
-- should it use CFLocaleGetValue in OSX ???
LANG : constant C.char_array := "LANG" & C.char'Val (0);
-- implementation
function Language return ISO_639_Alpha_2 is
P : C.char_ptr;
begin
P := C.stdlib.getenv (LANG (0)'Access);
if P /= null then
declare
Value : constant char_array_const_ptr :=
To_char_array_const_ptr (P);
Len : C.size_t := 0;
begin
while Value (Len) in 'a' .. 'z' loop
Len := Len + 1;
end loop;
if Len = 2 then
return (1 => Character (Value (0)), 2 => Character (Value (1)));
end if;
end;
end if;
return Ada.Locales.ISO_639_Alpha_2_Unknown;
end Language;
function Language return ISO_639_Alpha_3 is
begin
return Ada.Locales.To_Alpha_3 (Language);
end Language;
function Country return ISO_3166_1_Alpha_2 is
P : C.char_ptr;
begin
P := C.stdlib.getenv (LANG (0)'Access);
if P /= null then
declare
Value : constant char_array_const_ptr :=
To_char_array_const_ptr (P);
I : C.size_t := 0;
begin
while Value (I) /= C.char'Val (0)
and then Value (I) /= '.' -- codeset
and then Value (I) /= '@' -- modifier
loop
I := I + 1;
end loop;
if I >= 2
and then Value (I - 1) in 'A' .. 'Z'
and then Value (I - 2) in 'A' .. 'Z'
and then (I = 2 or else Value (I - 3) = '_')
then
return (
1 => Character (Value (I - 2)),
2 => Character (Value (I - 1)));
end if;
end;
end if;
return Ada.Locales.ISO_3166_1_Alpha_2_Unknown;
end Country;
end System.Native_Locales;
|
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with ewok.tasks; use ewok.tasks;
with ewok.tasks_shared; use ewok.tasks_shared;
with ewok.sched;
with ewok.sleep;
with ewok.exported.sleep; use ewok.exported.sleep;
package body ewok.syscalls.sleep
with spark_mode => off
is
procedure svc_sleep
(caller_id : in ewok.tasks_shared.t_task_id;
params : in out t_parameters;
mode : in ewok.tasks_shared.t_task_mode)
is
sleep_time : unsigned_32
with address => params(1)'address;
sleep_mode : t_sleep_mode
with address => params(2)'address;
begin
if mode = TASK_MODE_ISRTHREAD then
goto ret_denied;
end if;
if not sleep_mode'valid then
goto ret_inval;
end if;
if ewok.tasks.is_ipc_waiting (caller_id) then
goto ret_busy;
end if;
ewok.sleep.sleeping (caller_id, milliseconds (sleep_time), sleep_mode);
-- Note: state set by ewok.sleep.sleeping procedure
set_return_value (caller_id, mode, SYS_E_DONE);
ewok.sched.request_schedule;
return;
<<ret_inval>>
set_return_value (caller_id, mode, SYS_E_INVAL);
ewok.tasks.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
<<ret_busy>>
set_return_value (caller_id, mode, SYS_E_BUSY);
ewok.tasks.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
<<ret_denied>>
set_return_value (caller_id, mode, SYS_E_DENIED);
ewok.tasks.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
end svc_sleep;
end ewok.syscalls.sleep;
|
-----------------------------------------------------------------------
-- awa-workspaces-beans -- Beans for module workspaces
-- Copyright (C) 2011, 2012 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with ASF.Events.Faces.Actions;
with ADO.Sessions;
with AWA.Workspaces.Models;
with AWA.Events.Action_Method;
with AWA.Services.Contexts;
package body AWA.Workspaces.Beans is
-- ------------------------------
-- Example of action method.
-- ------------------------------
procedure Action (Bean : in out Workspaces_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
null;
end Action;
-- ------------------------------
-- Event action called to create the workspace when the given event is posted.
-- ------------------------------
procedure Create (Bean : in out Workspaces_Bean;
Event : in AWA.Events.Module_Event'Class) is
pragma Unreferenced (Bean, Event);
WS : AWA.Workspaces.Models.Workspace_Ref;
Ctx : constant AWA.Services.Contexts.Service_Context_Access := AWA.Services.Contexts.Current;
DB : ADO.Sessions.Master_Session := AWA.Services.Contexts.Get_Master_Session (Ctx);
begin
Ctx.Start;
AWA.Workspaces.Modules.Get_Workspace (Session => DB,
Context => Ctx,
Workspace => WS);
Ctx.Commit;
end Create;
package Action_Binding is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Workspaces_Bean,
Method => Action,
Name => "action");
package Create_Binding is
new AWA.Events.Action_Method.Bind (Name => "create",
Bean => Workspaces_Bean,
Method => Create);
Workspaces_Bean_Binding : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (Action_Binding.Proxy'Access, Create_Binding.Proxy'Access);
-- ------------------------------
-- Get the value identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Workspaces_Bean;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "count" then
return Util.Beans.Objects.To_Object (From.Count);
else
return Util.Beans.Objects.Null_Object;
end if;
end Get_Value;
-- ------------------------------
-- Set the value identified by the name.
-- ------------------------------
overriding
procedure Set_Value (From : in out Workspaces_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "count" then
From.Count := Util.Beans.Objects.To_Integer (Value);
end if;
end Set_Value;
-- ------------------------------
-- This bean provides some methods that can be used in a Method_Expression
-- ------------------------------
overriding
function Get_Method_Bindings (From : in Workspaces_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Workspaces_Bean_Binding'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Create the Workspaces_Bean bean instance.
-- ------------------------------
function Create_Workspaces_Bean (Module : in AWA.Workspaces.Modules.Workspace_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access is
Object : constant Workspaces_Bean_Access := new Workspaces_Bean;
begin
Object.Module := Module;
return Object.all'Access;
end Create_Workspaces_Bean;
end AWA.Workspaces.Beans;
|
-- { dg-compile }
-- { dg-options "-g" }
with Debug4_Pkg;
procedure Debug4 is
package P is new Debug4_Pkg (Natural);
begin
null;
end;
|
pragma License (Unrestricted);
-- implementation unit
with Ada.IO_Exceptions;
with Ada.IO_Modes;
with Ada.Streams.Naked_Stream_IO.Standard_Files;
with System.Native_IO;
with System.Native_Text_IO;
package Ada.Naked_Text_IO is
-- the parameter Form
Default_Form : constant System.Native_Text_IO.Packed_Form := (
Stream_Form => Streams.Naked_Stream_IO.Default_Form,
External => IO_Modes.By_Target,
New_Line => IO_Modes.By_Target);
procedure Set (
Form : in out System.Native_Text_IO.Packed_Form;
Keyword : String;
Item : String);
function Pack (Form : String) return System.Native_Text_IO.Packed_Form;
procedure Unpack (
Form : System.Native_Text_IO.Packed_Form;
Result : out Streams.Naked_Stream_IO.Form_String;
Last : out Natural);
-- non-controlled
type Text_Type (<>) is limited private;
type Non_Controlled_File_Type is access all Text_Type;
procedure Create (
File : in out Non_Controlled_File_Type;
Mode : IO_Modes.File_Mode := IO_Modes.Out_File;
Name : String := "";
Form : System.Native_Text_IO.Packed_Form := Default_Form);
procedure Open (
File : in out Non_Controlled_File_Type;
Mode : IO_Modes.File_Mode;
Name : String;
Form : System.Native_Text_IO.Packed_Form := Default_Form);
procedure Close (
File : aliased in out Non_Controlled_File_Type;
Raise_On_Error : Boolean := True);
procedure Delete (File : aliased in out Non_Controlled_File_Type);
procedure Reset (
File : aliased in out Non_Controlled_File_Type;
Mode : IO_Modes.File_Mode);
function Mode (File : Non_Controlled_File_Type) return IO_Modes.File_Mode;
function Name (File : Non_Controlled_File_Type) return String;
function Form (File : Non_Controlled_File_Type)
return System.Native_Text_IO.Packed_Form;
function External (File : Non_Controlled_File_Type)
return IO_Modes.File_External;
pragma Inline (External);
function Is_Open (File : Non_Controlled_File_Type) return Boolean;
pragma Inline (Is_Open);
procedure Flush (File : Non_Controlled_File_Type);
procedure Set_Size (
File : Non_Controlled_File_Type;
Line_Length, Page_Length : Natural);
procedure Set_Line_Length (File : Non_Controlled_File_Type; To : Natural);
procedure Set_Page_Length (File : Non_Controlled_File_Type; To : Natural);
procedure Size (
File : Non_Controlled_File_Type;
Line_Length, Page_Length : out Natural);
function Line_Length (File : Non_Controlled_File_Type) return Natural;
function Page_Length (File : Non_Controlled_File_Type) return Natural;
pragma Inline (Line_Length);
pragma Inline (Page_Length);
procedure New_Line (
File : Non_Controlled_File_Type;
Spacing : Positive := 1);
procedure Skip_Line (
File : Non_Controlled_File_Type;
Spacing : Positive := 1);
function End_Of_Line (File : Non_Controlled_File_Type) return Boolean;
procedure New_Page (File : Non_Controlled_File_Type);
procedure Skip_Page (File : Non_Controlled_File_Type);
function End_Of_Page (File : Non_Controlled_File_Type) return Boolean;
function End_Of_File (File : Non_Controlled_File_Type) return Boolean;
procedure Set_Col (File : Non_Controlled_File_Type; To : Positive);
procedure Set_Line (File : Non_Controlled_File_Type; To : Positive);
procedure Position (
File : Non_Controlled_File_Type;
Col, Line : out Positive);
function Col (File : Non_Controlled_File_Type) return Positive;
function Line (File : Non_Controlled_File_Type) return Positive;
function Page (File : Non_Controlled_File_Type) return Positive;
pragma Inline (Col);
pragma Inline (Line);
pragma Inline (Page);
procedure Get (
File : Non_Controlled_File_Type;
Item : out Character);
procedure Get (
File : Non_Controlled_File_Type;
Item : out Wide_Character);
procedure Get (
File : Non_Controlled_File_Type;
Item : out Wide_Wide_Character);
procedure Put (
File : Non_Controlled_File_Type;
Item : Character);
procedure Put (
File : Non_Controlled_File_Type;
Item : Wide_Character);
procedure Put (
File : Non_Controlled_File_Type;
Item : Wide_Wide_Character);
procedure Look_Ahead (
File : Non_Controlled_File_Type;
Item : out Character;
End_Of_Line : out Boolean);
procedure Look_Ahead (
File : Non_Controlled_File_Type;
Item : out Wide_Character;
End_Of_Line : out Boolean);
procedure Look_Ahead (
File : Non_Controlled_File_Type;
Item : out Wide_Wide_Character;
End_Of_Line : out Boolean);
procedure Skip_Ahead (File : Non_Controlled_File_Type);
procedure Get_Immediate (
File : Non_Controlled_File_Type;
Item : out Character);
procedure Get_Immediate (
File : Non_Controlled_File_Type;
Item : out Wide_Character);
procedure Get_Immediate (
File : Non_Controlled_File_Type;
Item : out Wide_Wide_Character);
procedure Get_Immediate (
File : Non_Controlled_File_Type;
Item : out Character;
Available : out Boolean);
procedure Get_Immediate (
File : Non_Controlled_File_Type;
Item : out Wide_Character;
Available : out Boolean);
procedure Get_Immediate (
File : Non_Controlled_File_Type;
Item : out Wide_Wide_Character;
Available : out Boolean);
-- handle of stream for non-controlled
procedure Open (
File : in out Non_Controlled_File_Type;
Mode : IO_Modes.File_Mode;
Stream : not null access Streams.Root_Stream_Type'Class;
Name : String := "";
Form : System.Native_Text_IO.Packed_Form := Default_Form);
function Stream (File : not null Non_Controlled_File_Type)
return not null access Streams.Root_Stream_Type'Class;
function Stream_IO (File : Non_Controlled_File_Type)
return not null
access Streams.Naked_Stream_IO.Non_Controlled_File_Type;
pragma Inline (Stream_IO);
function Terminal_Handle (File : Non_Controlled_File_Type)
return System.Native_IO.Handle_Type;
-- standard I/O
Standard_Input : constant Non_Controlled_File_Type;
Standard_Output : constant Non_Controlled_File_Type;
Standard_Error : constant Non_Controlled_File_Type;
-- exceptions
Status_Error : exception
renames IO_Exceptions.Status_Error;
Mode_Error : exception
renames IO_Exceptions.Mode_Error;
Use_Error : exception
renames IO_Exceptions.Use_Error;
Device_Error : exception
renames IO_Exceptions.Device_Error;
End_Error : exception
renames IO_Exceptions.End_Error;
Data_Error : exception
renames IO_Exceptions.Data_Error;
Layout_Error : exception
renames IO_Exceptions.Layout_Error;
private
type Virtual_Mark_Type is (None, EOP, EOP_EOF, EOF);
pragma Discard_Names (Virtual_Mark_Type);
type Text_Type is record -- "limited" prevents No_Elaboration_Code
Stream : System.Address := -- access Streams.Root_Stream_Type'Class
System.Null_Address;
File : aliased Streams.Naked_Stream_IO.Non_Controlled_File_Type;
Name : System.Native_IO.Name_Pointer; -- used when File is not assigned
Line : Natural := 1;
Page : Natural := 1;
Col : Natural := 1;
Line_Length : Natural := 0;
Page_Length : Natural := 0;
Last : Natural := 0;
Ahead_Last : Natural := 0; -- one-character Length, only In_File mode
Ahead_Col : Natural := 0; -- one-character Col
Looked_Ahead_Last : Natural := 0;
Looked_Ahead_Second : String (1 .. 3); -- second of surrogate pair
Buffer : System.Native_Text_IO.Buffer_Type;
End_Of_File : Boolean := False;
Virtual_Mark : Virtual_Mark_Type := None;
Mode : IO_Modes.File_Mode;
External : IO_Modes.File_External;
New_Line : IO_Modes.File_New_Line;
end record;
pragma Suppress_Initialization (Text_Type);
Standard_Input_Text : aliased Text_Type := (
Stream => System.Null_Address, -- be overwritten
File => Streams.Naked_Stream_IO.Standard_Files.Standard_Input,
Name => null,
Line => 1,
Page => 1,
Col => 1,
Line_Length => 0,
Page_Length => 0,
Last => 0,
Ahead_Last => 0,
Ahead_Col => 0,
Looked_Ahead_Last => 0,
Looked_Ahead_Second => (others => Character'Val (0)),
Buffer => (others => Character'Val (0)),
End_Of_File => False,
Virtual_Mark => None,
Mode => IO_Modes.In_File,
External => System.Native_Text_IO.Default_External, -- be overwritten
New_Line => System.Native_Text_IO.Default_New_Line);
Standard_Output_Text : aliased Text_Type := (
Stream => System.Null_Address, -- be overwritten
File => Streams.Naked_Stream_IO.Standard_Files.Standard_Output,
Name => null,
Line => 1,
Page => 1,
Col => 1,
Line_Length => 0,
Page_Length => 0,
Last => 0,
Ahead_Last => 0,
Ahead_Col => 0,
Looked_Ahead_Last => 0,
Looked_Ahead_Second => (others => Character'Val (0)),
Buffer => (others => Character'Val (0)),
End_Of_File => False,
Virtual_Mark => None,
Mode => IO_Modes.Out_File,
External => System.Native_Text_IO.Default_External, -- be overwritten
New_Line => System.Native_Text_IO.Default_New_Line);
Standard_Error_Text : aliased Text_Type := (
Stream => System.Null_Address, -- be overwritten
File => Streams.Naked_Stream_IO.Standard_Files.Standard_Error,
Name => null,
Line => 1,
Page => 1,
Col => 1,
Line_Length => 0,
Page_Length => 0,
Last => 0,
Ahead_Last => 0,
Ahead_Col => 0,
Looked_Ahead_Last => 0,
Looked_Ahead_Second => (others => Character'Val (0)),
Buffer => (others => Character'Val (0)),
End_Of_File => False,
Virtual_Mark => None,
Mode => IO_Modes.Out_File,
External => System.Native_Text_IO.Default_External, -- be overwritten
New_Line => System.Native_Text_IO.Default_New_Line);
Standard_Input : constant Non_Controlled_File_Type :=
Standard_Input_Text'Access;
Standard_Output : constant Non_Controlled_File_Type :=
Standard_Output_Text'Access;
Standard_Error : constant Non_Controlled_File_Type :=
Standard_Error_Text'Access;
end Ada.Naked_Text_IO;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . C O M M A N D _ L I N E --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-2001 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, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package Ada.Command_Line is
pragma Preelaborate (Command_Line);
function Argument_Count return Natural;
-- If the external execution environment supports passing arguments to a
-- program, then Argument_Count returns the number of arguments passed to
-- the program invoking the function. Otherwise it return 0.
--
-- In GNAT: Corresponds to (argc - 1) in C.
function Argument (Number : Positive) return String;
-- If the external execution environment supports passing arguments to
-- a program, then Argument returns an implementation-defined value
-- corresponding to the argument at relative position Number. If Number
-- is outside the range 1 .. Argument_Count, then Constraint_Error is
-- propagated.
--
-- in GNAT: Corresponds to argv [n] (for n > 0) in C.
function Command_Name return String;
-- If the external execution environment supports passing arguments to
-- a program, then Command_Name returns an implementation-defined value
-- corresponding to the name of the command invoking the program.
-- Otherwise Command_Name returns the null string.
--
-- in GNAT: Corresponds to argv [0] in C.
type Exit_Status is new Integer;
Success : constant Exit_Status;
Failure : constant Exit_Status;
procedure Set_Exit_Status (Code : Exit_Status);
private
Success : constant Exit_Status := 0;
Failure : constant Exit_Status := 1;
-- The following locations support the operation of the package
-- Ada.Command_Line_Remove, whih provides facilities for logically
-- removing arguments from the command line. If one of the remove
-- procedures is called in this unit, then Remove_Args/Remove_Count
-- are set to indicate which arguments are removed. If no such calls
-- have been made, then Remove_Args is null.
Remove_Count : Natural;
-- Number of arguments reflecting removals. Not defined unless
-- Remove_Args is non-null.
type Arg_Nums is array (Positive range <>) of Positive;
type Arg_Nums_Ptr is access Arg_Nums;
-- An array that maps logical argument numbers (reflecting removal)
-- to physical argument numbers (e.g. if the first argument has been
-- removed, but not the second, then Arg_Nums (1) will be set to 2.
Remove_Args : Arg_Nums_Ptr := null;
-- Left set to null if no remove calls have been made, otherwise set
-- to point to an appropriate mapping array. Only the first Remove_Count
-- elements are relevant.
pragma Import (C, Set_Exit_Status, "__gnat_set_exit_status");
end Ada.Command_Line;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- G N A T . S H A 3 8 4 --
-- --
-- S p e c --
-- --
-- Copyright (C) 2009-2021, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package implements the SHA-384 secure hash function as described in
-- FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
-- http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
-- See the declaration of GNAT.Secure_Hashes.H in g-sechas.ads for complete
-- documentation.
with GNAT.Secure_Hashes.SHA2_Common;
with GNAT.Secure_Hashes.SHA2_64;
with System;
package GNAT.SHA384 is new GNAT.Secure_Hashes.H
(Block_Words => GNAT.Secure_Hashes.SHA2_Common.Block_Words,
State_Words => 8,
Hash_Words => 6,
Hash_Bit_Order => System.High_Order_First,
Hash_State => GNAT.Secure_Hashes.SHA2_64.Hash_State,
Initial_State => GNAT.Secure_Hashes.SHA2_64.SHA384_Init_State,
Transform => GNAT.Secure_Hashes.SHA2_64.Transform);
|
-- SPDX-FileCopyrightText: 2020-2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Compilation_Units;
with Program.Cross_Reference_Updaters;
with Program.Elements.Expressions;
with Program.Interpretations;
with Program.Visibility;
private package Program.Type_Resolvers is
pragma Preelaborate;
procedure Resolve_Type
(Element : Program.Elements.Expressions.Expression_Access;
Context : not null Program.Visibility.Context_Access;
Setter : not null Program.Cross_Reference_Updaters
.Cross_Reference_Updater_Access;
Sets : not null Program.Interpretations.Context_Access;
Value : out Program.Visibility.View);
-- The Element is a subtype_mark. Resolve it and return corresponding
-- type view.
procedure Resolve_Type_Definition
(Element : Program.Elements.Element_Access;
Context : not null Program.Visibility.Context_Access;
Setter : not null
Program.Cross_Reference_Updaters.Cross_Reference_Updater_Access;
Sets : not null Program.Interpretations.Context_Access;
Value : out Program.Visibility.View);
-- The Element is a subtype_indication, access_definition or
-- array_type_definition. Resolve it and return corresponding type view.
end Program.Type_Resolvers;
|
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2016 onox <denkpadje@gmail.com>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
with AUnit.Assertions;
with AUnit.Test_Caller;
with Orka.SIMD.AVX.Doubles;
with Orka.SIMD.AVX2.Doubles.Swizzle;
package body Test_SIMD_AVX2_Swizzle is
use Orka;
use Orka.SIMD;
use Orka.SIMD.AVX.Doubles;
use Orka.SIMD.AVX2.Doubles.Swizzle;
use AUnit.Assertions;
package Caller is new AUnit.Test_Caller (Test);
Test_Suite : aliased AUnit.Test_Suites.Test_Suite;
function Suite return AUnit.Test_Suites.Access_Test_Suite is
Name : constant String := "(SIMD - AVX2 - Swizzle) ";
begin
Test_Suite.Add_Test (Caller.Create
(Name & "Test Permute function", Test_Permute'Access));
return Test_Suite'Access;
end Suite;
procedure Test_Permute (Object : in out Test) is
Elements : constant m256d := (1.0, 2.0, 3.0, 4.0);
Mask_0_0_0_0 : constant Unsigned_32 := 0 or 0 * 4 or 0 * 16 or 0 * 64;
Mask_2_2_2_2 : constant Unsigned_32 := 2 or 2 * 4 or 2 * 16 or 2 * 64;
Mask_1_0_3_2 : constant Unsigned_32 := 1 or 0 * 4 or 3 * 16 or 2 * 64;
Mask_2_3_0_1 : constant Unsigned_32 := 2 or 3 * 4 or 0 * 16 or 1 * 64;
Expected : constant array (Positive range <>) of m256d
:= ((1.0, 1.0, 1.0, 1.0),
(3.0, 3.0, 3.0, 3.0),
(2.0, 1.0, 4.0, 3.0),
(3.0, 4.0, 1.0, 2.0));
Results : array (Positive range Expected'Range) of m256d;
begin
Results (1) := Permute (Elements, Mask_0_0_0_0);
Results (2) := Permute (Elements, Mask_2_2_2_2);
Results (3) := Permute (Elements, Mask_1_0_3_2);
Results (4) := Permute (Elements, Mask_2_3_0_1);
for I in Expected'Range loop
for J in Index_Homogeneous loop
declare
Message : constant String := "Unexpected Single at " & Index_Homogeneous'Image (J);
begin
Assert (Expected (I) (J) = Results (I) (J), Message);
end;
end loop;
end loop;
end Test_Permute;
end Test_SIMD_AVX2_Swizzle;
|
with Ada.Exception_Identification.From_Here;
with Ada.Exceptions.Finally;
with System.Address_To_Named_Access_Conversions;
with System.Soft_Links;
with System.Synchronous_Objects.Abortable;
with System.Tasks;
package body System.Tasking.Protected_Objects.Operations is
use Ada.Exception_Identification.From_Here;
use type Ada.Exceptions.Exception_Id;
use type Synchronous_Objects.Queue_Node_Access;
function Filter (
The_Node : not null Synchronous_Objects.Queue_Node_Access;
Params : Address)
return Boolean;
function Filter (
The_Node : not null Synchronous_Objects.Queue_Node_Access;
Params : Address)
return Boolean is
begin
return Entries.Downcast (The_Node).E = Protected_Entry_Index (Params);
end Filter;
package Task_Id_Conv is
new Address_To_Named_Access_Conversions (
Tasks.Task_Record,
Tasks.Task_Id);
package QNA_Conv is
new Address_To_Named_Access_Conversions (
Synchronous_Objects.Queue_Node,
Synchronous_Objects.Queue_Node_Access);
function Uncall_Filter (
The_Node : not null Synchronous_Objects.Queue_Node_Access;
Params : Address)
return Boolean;
function Uncall_Filter (
The_Node : not null Synchronous_Objects.Queue_Node_Access;
Params : Address)
return Boolean is
begin
return The_Node = QNA_Conv.To_Pointer (Params);
end Uncall_Filter;
procedure Uncall (
Object : not null access Entries.Protection_Entries'Class;
Item : not null Synchronous_Objects.Queue_Node_Access;
Already_Taken : out Boolean);
procedure Uncall (
Object : not null access Entries.Protection_Entries'Class;
Item : not null Synchronous_Objects.Queue_Node_Access;
Already_Taken : out Boolean)
is
Taken : Synchronous_Objects.Queue_Node_Access;
begin
Synchronous_Objects.Take (
Object.Calling,
Taken,
QNA_Conv.To_Address (Item),
Uncall_Filter'Access);
Already_Taken := Taken = null;
pragma Assert (Taken = null or else Taken = Item);
end Uncall;
function Invoke_Filter (
The_Node : not null Synchronous_Objects.Queue_Node_Access;
Params : Address)
return Boolean;
function Invoke_Filter (
The_Node : not null Synchronous_Objects.Queue_Node_Access;
Params : Address)
return Boolean
is
-- The_Node to Entries.Node
Node : constant not null Entries.Node_Access :=
Entries.Downcast (The_Node);
-- Params to access Entries.Protection_Entries'Class
function To_Pointer (Value : Address)
return access Entries.Protection_Entries'Class
with Import, Convention => Intrinsic;
Object : constant not null access Entries.Protection_Entries'Class :=
To_Pointer (Params);
Index : constant Positive_Protected_Entry_Index :=
Object.Find_Body_Index (Object.Compiler_Info, Node.E);
Result : Boolean;
begin
-- queue is locked in filter
Node.Action := False;
Node.Requeued := False;
begin
Result :=
Object.Entry_Bodies (Index).Barrier (Object.Compiler_Info, Node.E);
Node.Action := Result; -- execute the body after removing node
exception
when others =>
Object.Raised_On_Barrier := True;
Result := True;
-- C953001
Ada.Exceptions.Save_Exception (Node.X, Program_Error'Identity);
end;
return Result;
end Invoke_Filter;
procedure Invoke (
Object : not null access Entries.Protection_Entries'Class);
procedure Invoke (
Object : not null access Entries.Protection_Entries'Class)
is
function To_Address (Value : access Entries.Protection_Entries'Class)
return Address
with Import, Convention => Intrinsic;
Taken : Synchronous_Objects.Queue_Node_Access;
begin
pragma Assert (Object.Entry_Bodies'First = 1);
loop
Synchronous_Objects.Unsynchronized_Take (
Object.Calling,
Taken,
To_Address (Object),
Invoke_Filter'Access);
exit when Taken = null;
declare
Node : constant not null Entries.Node_Access :=
Entries.Downcast (Taken);
begin
if Node.Action then
declare
Index : constant Positive_Protected_Entry_Index :=
Object.Find_Body_Index (Object.Compiler_Info, Node.E);
begin
Object.Current_Calling := Node;
begin
Object.Entry_Bodies (Index).Action (
Object.Compiler_Info,
Node.Uninterpreted_Data,
Node.E);
exception
when E : others =>
Ada.Exceptions.Save_Occurrence (Node.X, E);
end;
Object.Current_Calling := null;
end;
end if;
if Node.Requeued then
-- internal requeue is a part of a single protected operation.
declare
Canceled : Boolean;
begin
Synchronous_Objects.Unsynchronized_Prepend (
Object.Calling,
Taken,
Canceled);
if Canceled then -- it does not happen ?
Ada.Exceptions.Save_Exception (
Node.X,
Tasking_Error'Identity);
end if;
end;
else
Synchronous_Objects.Set (Node.Waiting);
if Object.Raised_On_Barrier then
-- cancel all current callers, RM 9.5.3(7/3)
Object.Raised_On_Barrier := False;
Entries.Unlock_Entries (Object);
Entries.Cancel_Calls (Object.all);
Entries.Lock_Entries (Object);
end if;
end if;
end;
end loop;
end Invoke;
-- implementation
procedure Service_Entries (
Object : not null access Entries.Protection_Entries'Class) is
begin
-- already locked
Invoke (Object);
Entries.Unlock_Entries (Object);
end Service_Entries;
procedure Complete_Entry_Body (
Object : not null access Entries.Protection_Entries'Class) is
begin
null;
end Complete_Entry_Body;
procedure Exceptional_Complete_Entry_Body (
Object : not null access Entries.Protection_Entries'Class;
Id : Ada.Exceptions.Exception_Id)
is
Current_X : constant Ada.Exceptions.Exception_Occurrence_Access :=
Soft_Links.Get_Current_Excep.all;
begin
pragma Assert (Ada.Exceptions.Exception_Identity (Current_X.all) = Id);
Ada.Exceptions.Save_Occurrence (Object.Current_Calling.X, Current_X.all);
end Exceptional_Complete_Entry_Body;
procedure Protected_Entry_Call (
Object : not null access Entries.Protection_Entries'Class;
E : Protected_Entry_Index;
Uninterpreted_Data : Address;
Mode : Call_Modes;
Block : out Communication_Block)
is
pragma Unreferenced (Block);
begin
case Mode is
when Simple_Call =>
declare
package Holder is
new Ada.Exceptions.Finally.Scoped_Holder (
Synchronous_Objects.Event,
Synchronous_Objects.Finalize);
The_Node : aliased Entries.Node := (
Super => <>,
E => E,
Uninterpreted_Data => Uninterpreted_Data,
Caller => Task_Id_Conv.To_Address (Tasks.Current_Task_Id),
Action => False,
Requeued => False,
Waiting => <>, -- default initializer
X => <>); -- default initializer
Canceled : Boolean;
Aborted : Boolean;
begin
Synchronous_Objects.Initialize (The_Node.Waiting);
Holder.Assign (The_Node.Waiting);
Synchronous_Objects.Add (
Object.Calling,
The_Node.Super'Unchecked_Access,
Canceled);
if Canceled then
Raise_Exception (Tasking_Error'Identity);
end if;
Tasks.Enable_Abort;
Entries.Lock_Entries (Object);
Invoke (Object);
Entries.Unlock_Entries (Object);
Synchronous_Objects.Abortable.Wait (
The_Node.Waiting,
Aborted => Aborted);
if Aborted then
declare
Already_Taken : Boolean;
begin
Uncall (
Object,
The_Node.Super'Unchecked_Access,
Already_Taken => Already_Taken);
if Already_Taken then
Synchronous_Objects.Wait (The_Node.Waiting);
-- without abort checking
end if;
end;
end if;
Tasks.Disable_Abort (Aborted); -- if aborted, raise here
if Ada.Exceptions.Exception_Identity (The_Node.X) /=
Ada.Exceptions.Null_Id
then
Ada.Exceptions.Reraise_Nonnull_Occurrence (The_Node.X);
end if;
end;
when Conditional_Call =>
raise Program_Error;
when Asynchronous_Call =>
raise Program_Error;
end case;
end Protected_Entry_Call;
procedure Timed_Protected_Entry_Call (
Object : not null access Entries.Protection_Entries'Class;
E : Protected_Entry_Index;
Uninterpreted_Data : Address;
Timeout : Duration;
Mode : Integer;
Entry_Call_Successful : out Boolean) is
begin
raise Program_Error;
end Timed_Protected_Entry_Call;
function Enqueued (Block : Communication_Block) return Boolean is
begin
raise Program_Error;
return Enqueued (Block);
end Enqueued;
function Cancelled (Block : Communication_Block) return Boolean is
begin
raise Program_Error;
return Cancelled (Block);
end Cancelled;
procedure Cancel_Protected_Entry_Call (
Block : in out Communication_Block) is
begin
raise Program_Error;
end Cancel_Protected_Entry_Call;
procedure Requeue_Protected_Entry (
Object : not null access Entries.Protection_Entries'Class;
New_Object : not null access Entries.Protection_Entries'Class;
E : Protected_Entry_Index;
With_Abort : Boolean) is
begin
if With_Abort then
raise Program_Error;
end if;
if Object = New_Object then
-- internal requeue
Object.Current_Calling.E := E;
Object.Current_Calling.Requeued := True;
else
raise Program_Error;
end if;
end Requeue_Protected_Entry;
procedure Requeue_Task_To_Protected_Entry (
New_Object : not null access Entries.Protection_Entries'Class;
E : Protected_Entry_Index;
With_Abort : Boolean) is
begin
raise Program_Error;
end Requeue_Task_To_Protected_Entry;
function Protected_Entry_Caller (
Object : Entries.Protection_Entries'Class)
return Task_Id is
begin
return Object.Current_Calling.Caller;
end Protected_Entry_Caller;
function Protected_Count (
Object : Entries.Protection_Entries'Class;
E : Protected_Entry_Index)
return Natural is
begin
-- locked because 'Count is called only from barriers or bodies
return Synchronous_Objects.Unsynchronized_Count (
Object.Calling,
System'To_Address (E),
Filter'Access);
end Protected_Count;
end System.Tasking.Protected_Objects.Operations;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 2 3 --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2021, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Handling of packed arrays with Component_Size = 23
package System.Pack_23 is
pragma Preelaborate;
Bits : constant := 23;
type Bits_23 is mod 2 ** Bits;
for Bits_23'Size use Bits;
-- In all subprograms below, Rev_SSO is set True if the array has the
-- non-default scalar storage order.
function Get_23
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_23 with Inline;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is extracted and returned.
procedure Set_23
(Arr : System.Address;
N : Natural;
E : Bits_23;
Rev_SSO : Boolean) with Inline;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is set to the given value.
end System.Pack_23;
|
B : Arr_Type (1 .. 26);
begin
B(B'First) := 'a';
for I in B'First .. B'Last-1 loop
B(I+1) := Lower_Case'Succ(B(I));
end loop; -- now all the B(I) are different
|
-------------------------------------------------------------------------------
-- Copyright 2021, The Trendy Terminal Developers (see AUTHORS file)
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- http://www.apache.org/licenses/LICENSE-2.0
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-------------------------------------------------------------------------------
with Ada.Strings.Fixed;
with Ada.Strings.Unbounded;
package body Trendy_Terminal.Histories is
package ASU renames Ada.Strings.Unbounded;
procedure Add (H : in out History; Input : String) is
begin
H.Entries.Prepend (ASU.To_Unbounded_String (Input));
end Add;
procedure Set_Max_Entries (H : in out History; Count : Positive) is
begin
H.Max_Entries := Count;
end Set_Max_Entries;
function Num_Entries (H : History) return Natural is
begin
return Natural (H.Entries.Length);
end Num_Entries;
function Get_Entry (H : History; Index : Positive) return String is
begin
return ASU.To_String (H.Entries (Index));
end Get_Entry;
function Completions_Matching (H : History; Incomplete : String) return Lines.Line_Vectors.Vector is
Result : Lines.Line_Vectors.Vector;
begin
for Each of H.Entries loop
if Ada.Strings.Fixed.Index (Source => Incomplete, Pattern => ASU.To_String (Each)) = 0 then
Result.Append (Lines.Make (Each, ASU.Length (Each) + 1));
end if;
end loop;
return Result;
end Completions_Matching;
end Trendy_Terminal.Histories;
|
-- C64104L.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 CONSTRAINT_ERROR IS RAISED UNDER THE APPROPRIATE
-- CIRCUMSTANCES FOR ACCESS PARAMETERS, NAMELY WHEN THE
-- ACTUAL INDEX BOUNDS OR DISCRIMINANTS ARE NOT EQUAL
-- TO THE FORMAL CONSTRAINTS BEFORE THE CALL (FOR IN AND IN OUT
-- MODES), AND WHEN THE FORMAL CONSTRAINTS ARE NOT EQUAL TO THE
-- ACTUAL CONSTRAINTS UPON RETURN (FOR IN OUT AND OUT MODES).
-- (I) AFTER RETURN, OUT MODE, CONSTRAINED FORMAL, STATIC
-- PRIVATE DISCRIMINANTS.
-- JRK 3/18/81
-- NL 10/13/81
-- SPS 10/26/82
WITH REPORT;
PROCEDURE C64104L IS
USE REPORT;
BEGIN
TEST ("C64104L", "CHECK THAT CONSTRAINT_ERROR IS RAISED " &
"APPROPRIATELY FOR ACCESS PARAMETERS");
--------------------------------------------------
DECLARE
PACKAGE PKG IS
TYPE E IS (E1, E2, E3);
TYPE T (D : E := E1; B : BOOLEAN := FALSE) IS
PRIVATE;
PRIVATE
TYPE ARR IS ARRAY (E RANGE <>) OF INTEGER;
TYPE T (D : E := E1; B : BOOLEAN := FALSE) IS
RECORD
I : INTEGER;
CASE B IS
WHEN FALSE =>
J : INTEGER;
WHEN TRUE =>
A : ARR (E1 .. D);
END CASE;
END RECORD;
END PKG;
USE PKG;
TYPE A IS ACCESS T;
SUBTYPE SA IS A(E2, TRUE);
V : A (E2, FALSE) := NEW T (E2, FALSE);
ENTERED : BOOLEAN := FALSE;
PROCEDURE P (X : OUT SA ) IS
BEGIN
ENTERED := TRUE;
X := NEW T (E2, TRUE);
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED IN PROCEDURE");
END P;
BEGIN
P (V);
FAILED ("EXCEPTION NOT RAISED AFTER RETURN");
EXCEPTION
WHEN CONSTRAINT_ERROR =>
IF NOT ENTERED THEN
FAILED ("CONSTRAINT_ERROR RAISED BEFORE " &
"CALL");
END IF;
WHEN OTHERS =>
IF NOT ENTERED THEN
FAILED ("OTHER EXCEPTION RAISED BEFORE CALL");
ELSE FAILED ("WRONG EXCEPTION RAISED AFTER " &
"RETURN");
END IF;
END;
------------------------------------------------
RESULT;
END C64104L;
|
with AUnit.Assertions; use AUnit.Assertions;
with ACO.Utils.DS.Generic_Table;
package body Generic_Table_Test is
pragma Assertion_Policy (Check);
type Key_Type is new Character;
subtype Test_Keys is Key_Type range 'a' .. 'z';
type Value_Type is new Positive;
function Hashit (Key : Key_Type) return Natural is
(Key_Type'Pos (Key));
Number_Of_Buckets : constant := 3;
Maximum_Size : constant :=
Test_Keys'Pos(Test_Keys'Last) - Test_Keys'Pos(Test_Keys'First) + 1;
package Table_Pack is new ACO.Utils.DS.Generic_Table
(Key_Type => Key_Type,
"=" => "=",
Hash => Hashit,
Value_Type => Value_Type);
subtype T is Table_Pack.Table
(Number_Of_Buckets => Number_Of_Buckets,
Maximum_Size => Maximum_Size);
function Name (T : Test) return AUnit.Message_String is
pragma Unreferenced (T);
begin
return AUnit.Format ("Data Structures: Generic Table Test");
end Name;
procedure Init_Test
is
Table : T;
begin
Assert (Table.Is_Empty, "Table is not initially empty");
Assert (Table.Length = 0, "Table has not initially the length zero");
Assert (not Table.Is_Full, "Table is initially full");
for K in Key_Type'Range loop
Assert (not Table.Is_Bound (K), "Table has a bound key at init");
end loop;
end Init_Test;
procedure Asserted_Fill
(Table : in out T)
is
V : Value_Type;
L : Natural := 0;
begin
for K in Test_Keys'Range loop
V := Key_Type'Pos(K);
Table.Bind (K, V);
L := L + 1;
Assert (Table.Is_Bound (K), "Key is not bound");
Assert (Table.Value_Of (K) = V, "Value for key incorrect");
Assert (Table.Length = L, "Length is not" & L'Img);
end loop;
Assert (Table.Is_Full, "Table not full");
Assert (not Table.Is_Empty, "Table is empty");
end Asserted_Fill;
procedure Bind
is
Table : T;
begin
Asserted_Fill (Table);
end Bind;
procedure Bind_New_To_Full
is
Table : T;
K : constant Key_Type := Key_Type'Succ (Test_Keys'Last);
begin
Asserted_Fill (Table);
Table.Bind (K, 1337);
end Bind_New_To_Full;
procedure Bind_Existing_To_Full
is
Table : T;
K : constant Key_Type := Test_Keys'First;
V : constant Value_Type := 1337;
L : Natural;
begin
Asserted_Fill (Table); -- Should fill with keys in Test_Keys'Range
L := Table.Length;
Assert (Table.Value_Of (K) /= V,
"Test precondition fail: test value already bound to test key");
Table.Bind (K, V);
Assert (Table.Value_Of (K) = V,
"Value of existing key not replaced when binding to full table");
Assert (Table.Length = L, "Length has changed");
Assert (Table.Is_Full, "Table shall still be full");
end Bind_Existing_To_Full;
procedure Unbind
is
Table : T;
L : Natural;
begin
Asserted_Fill (Table);
L := Table.Length;
for K in Test_Keys'Range loop
Table.Unbind (K);
L := L - 1;
Assert (not Table.Is_Bound (K), "Key is bound after unbind");
Assert (Table.Length = L, "Length is not" & L'Img);
end loop;
Assert (Table.Is_Empty, "Table not empty");
Assert (not Table.Is_Full, "Table is full");
end Unbind;
procedure Unbind_Empty
is
Table : T;
K : constant Key_Type := 'X';
begin
Table.Unbind (K);
Assert (not Table.Is_Bound (K), "Key is bound after unbinding empty table");
Assert (Table.Length = 0, "Length not 0 after unbinding to empty table");
Assert (Table.Is_Empty, "Table not empty after unbinding to empty table");
Assert (not Table.Is_Full, "Table is full after unbinding to empty table");
end Unbind_Empty;
procedure Value_Of_Nonexisting
is
Table : T;
V : Value_Type;
K : constant Key_Type := Key_Type'Succ (Test_Keys'Last);
pragma Unreferenced (V);
begin
V := Table.Value_Of (K);
end Value_Of_Nonexisting;
procedure Run_Test (T : in out Test) is
pragma Unreferenced (T);
begin
Init_Test;
Bind;
Unbind;
Unbind_Empty;
Bind_Existing_To_Full;
Assert_Exception
(Bind_New_To_Full'Access,
"Expected an exception when binding a new key to an already full table");
Assert_Exception
(Value_Of_Nonexisting'Access,
"Expected an exception when accessing value of key not bound");
end Run_Test;
end Generic_Table_Test;
|
-- Standard Ada library specification
-- Copyright (c) 2004-2016 AXE Consultants
-- Copyright (c) 2004, 2005, 2006 Ada-Europe
-- Copyright (c) 2000 The MITRE Corporation, Inc.
-- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc.
-- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual
---------------------------------------------------------------------------
with Ada.Real_Time;
with Ada.Task_Identification;
package System.Multiprocessors.Dispatching_Domains is
Dispatching_Domain_Error : exception;
type Dispatching_Domain (<>) is limited private;
System_Dispatching_Domain : constant Dispatching_Domain;
function Create (First : CPU; Last : CPU_Range) return Dispatching_Domain;
function Get_First_CPU (Domain : Dispatching_Domain) return CPU;
function Get_Last_CPU (Domain : Dispatching_Domain) return CPU_Range;
type CPU_Set is array(CPU range <>) of Boolean;
function Create (Set : CPU_Set) return Dispatching_Domain;
function Get_CPU_Set (Domain : Dispatching_Domain) return CPU_Set;
function Get_Dispatching_Domain
(T : Ada.Task_Identification.Task_Id :=
Ada.Task_Identification.Current_Task)
return Dispatching_Domain;
procedure Assign_Task
(Domain : in out Dispatching_Domain;
CPU : in CPU_Range := Not_A_Specific_CPU;
T : in Ada.Task_Identification.Task_Id :=
Ada.Task_Identification.Current_Task);
procedure Set_CPU
(CPU : in CPU_Range;
T : in Ada.Task_Identification.Task_Id :=
Ada.Task_Identification.Current_Task);
function Get_CPU
(T : Ada.Task_Identification.Task_Id :=
Ada.Task_Identification.Current_Task)
return CPU_Range;
procedure Delay_Until_And_Set_CPU
(Delay_Until_Time : in Ada.Real_Time.Time; CPU : in CPU_Range);
private
-- not specified by the language
end System.Multiprocessors.Dispatching_Domains;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I M A G E _ D --
-- --
-- B o d y --
-- --
-- Copyright (C) 2020-2021, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Img_Util; use System.Img_Util;
package body System.Image_D is
-------------------
-- Image_Decimal --
-------------------
procedure Image_Decimal
(V : Int;
S : in out String;
P : out Natural;
Scale : Integer)
is
pragma Assert (S'First = 1);
begin
-- Add space at start for non-negative numbers
if V >= 0 then
S (1) := ' ';
P := 1;
else
P := 0;
end if;
Set_Image_Decimal (V, S, P, Scale, 1, Integer'Max (1, Scale), 0);
end Image_Decimal;
-----------------------
-- Set_Image_Decimal --
-----------------------
procedure Set_Image_Decimal
(V : Int;
S : in out String;
P : in out Natural;
Scale : Integer;
Fore : Natural;
Aft : Natural;
Exp : Natural)
is
Digs : String := Int'Image (V);
-- Sign and digits of decimal value
begin
Set_Decimal_Digits (Digs, Digs'Length, S, P, Scale, Fore, Aft, Exp);
end Set_Image_Decimal;
end System.Image_D;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Elements.Defining_Character_Literals;
with Program.Element_Visitors;
package Program.Nodes.Defining_Character_Literals is
pragma Preelaborate;
type Defining_Character_Literal is
new Program.Nodes.Node
and Program.Elements.Defining_Character_Literals
.Defining_Character_Literal
and Program.Elements.Defining_Character_Literals
.Defining_Character_Literal_Text
with private;
function Create
(Character_Literal_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Defining_Character_Literal;
type Implicit_Defining_Character_Literal is
new Program.Nodes.Node
and Program.Elements.Defining_Character_Literals
.Defining_Character_Literal
with private;
function Create
(Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Defining_Character_Literal
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Defining_Character_Literal is
abstract new Program.Nodes.Node
and Program.Elements.Defining_Character_Literals
.Defining_Character_Literal
with null record;
procedure Initialize
(Self : aliased in out Base_Defining_Character_Literal'Class);
overriding procedure Visit
(Self : not null access Base_Defining_Character_Literal;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Is_Defining_Character_Literal_Element
(Self : Base_Defining_Character_Literal)
return Boolean;
overriding function Is_Defining_Name_Element
(Self : Base_Defining_Character_Literal)
return Boolean;
type Defining_Character_Literal is
new Base_Defining_Character_Literal
and Program.Elements.Defining_Character_Literals
.Defining_Character_Literal_Text
with record
Character_Literal_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
end record;
overriding function To_Defining_Character_Literal_Text
(Self : aliased in out Defining_Character_Literal)
return Program.Elements.Defining_Character_Literals
.Defining_Character_Literal_Text_Access;
overriding function Character_Literal_Token
(Self : Defining_Character_Literal)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Image (Self : Defining_Character_Literal) return Text;
type Implicit_Defining_Character_Literal is
new Base_Defining_Character_Literal
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Defining_Character_Literal_Text
(Self : aliased in out Implicit_Defining_Character_Literal)
return Program.Elements.Defining_Character_Literals
.Defining_Character_Literal_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Defining_Character_Literal)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Defining_Character_Literal)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Defining_Character_Literal)
return Boolean;
overriding function Image
(Self : Implicit_Defining_Character_Literal)
return Text;
end Program.Nodes.Defining_Character_Literals;
|
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- ncurses --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 2000,2004 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
-- $Revision: 1.4 $
-- $Date: 2004/08/21 21:37:00 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
with ncurses2.genericPuts;
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
with Ada.Strings.Unbounded;
with Ada.Strings.Fixed;
procedure ncurses2.acs_display is
use Int_IO;
procedure show_upper_chars (first : Integer);
function show_1_acs (N : Integer;
name : String;
code : Attributed_Character)
return Integer;
procedure show_acs_chars;
procedure show_upper_chars (first : Integer) is
C1 : constant Boolean := (first = 128);
last : constant Integer := first + 31;
package p is new ncurses2.genericPuts (200);
use p;
use p.BS;
use Ada.Strings.Unbounded;
tmpa : Unbounded_String;
tmpb : BS.Bounded_String;
begin
Erase;
Switch_Character_Attribute
(Attr => (Bold_Character => True, others => False));
Move_Cursor (Line => 0, Column => 20);
tmpa := To_Unbounded_String ("Display of ");
if C1 then
tmpa := tmpa & "C1";
else
tmpa := tmpa & "GR";
end if;
tmpa := tmpa & " Character Codes ";
myPut (tmpb, first);
Append (tmpa, To_String (tmpb));
Append (tmpa, " to ");
myPut (tmpb, last);
Append (tmpa, To_String (tmpb));
Add (Str => To_String (tmpa));
Switch_Character_Attribute
(On => False,
Attr => (Bold_Character => True, others => False));
Refresh;
for code in first .. last loop
declare
row : constant Line_Position
:= Line_Position (4 + ((code - first) mod 16));
col : constant Column_Position
:= Column_Position (((code - first) / 16) *
Integer (Columns) / 2);
tmp3 : String (1 .. 3);
tmpx : String (1 .. Integer (Columns / 4));
reply : Key_Code;
begin
Put (tmp3, code);
myPut (tmpb, code, 16);
tmpa := To_Unbounded_String (tmp3 & " (" & To_String (tmpb) & ')');
Ada.Strings.Fixed.Move (To_String (tmpa), tmpx,
Justify => Ada.Strings.Right);
Add (Line => row, Column => col,
Str => tmpx & ' ' & ':' & ' ');
if C1 then
Set_NoDelay_Mode (Mode => True);
end if;
Add_With_Immediate_Echo (Ch => Code_To_Char (Key_Code (code)));
-- TODO check this
if C1 then
reply := Getchar;
while reply /= Key_None loop
Add (Ch => Code_To_Char (reply));
Nap_Milli_Seconds (10);
reply := Getchar;
end loop;
Set_NoDelay_Mode (Mode => False);
end if;
end;
end loop;
end show_upper_chars;
function show_1_acs (N : Integer;
name : String;
code : Attributed_Character)
return Integer is
height : constant Integer := 16;
row : constant Line_Position := Line_Position (4 + (N mod height));
col : constant Column_Position := Column_Position ((N / height) *
Integer (Columns) / 2);
tmpx : String (1 .. Integer (Columns) / 3);
begin
Ada.Strings.Fixed.Move (name, tmpx,
Justify => Ada.Strings.Right,
Drop => Ada.Strings.Left);
Add (Line => row, Column => col, Str => tmpx & ' ' & ':' & ' ');
-- we need more room than C because our identifiers are longer
-- 22 chars actually
Add (Ch => code);
return N + 1;
end show_1_acs;
procedure show_acs_chars is
n : Integer;
begin
Erase;
Switch_Character_Attribute
(Attr => (Bold_Character => True, others => False));
Add (Line => 0, Column => 20,
Str => "Display of the ACS Character Set");
Switch_Character_Attribute (On => False,
Attr => (Bold_Character => True,
others => False));
Refresh;
-- the following is useful to generate the below
-- grep '^[ ]*ACS_' ../src/terminal_interface-curses.ads |
-- awk '{print "n := show_1_acs(n, \""$1"\", ACS_Map("$1"));"}'
n := show_1_acs (0, "ACS_Upper_Left_Corner",
ACS_Map (ACS_Upper_Left_Corner));
n := show_1_acs (n, "ACS_Lower_Left_Corner",
ACS_Map (ACS_Lower_Left_Corner));
n := show_1_acs (n, "ACS_Upper_Right_Corner",
ACS_Map (ACS_Upper_Right_Corner));
n := show_1_acs (n, "ACS_Lower_Right_Corner",
ACS_Map (ACS_Lower_Right_Corner));
n := show_1_acs (n, "ACS_Left_Tee", ACS_Map (ACS_Left_Tee));
n := show_1_acs (n, "ACS_Right_Tee", ACS_Map (ACS_Right_Tee));
n := show_1_acs (n, "ACS_Bottom_Tee", ACS_Map (ACS_Bottom_Tee));
n := show_1_acs (n, "ACS_Top_Tee", ACS_Map (ACS_Top_Tee));
n := show_1_acs (n, "ACS_Horizontal_Line",
ACS_Map (ACS_Horizontal_Line));
n := show_1_acs (n, "ACS_Vertical_Line", ACS_Map (ACS_Vertical_Line));
n := show_1_acs (n, "ACS_Plus_Symbol", ACS_Map (ACS_Plus_Symbol));
n := show_1_acs (n, "ACS_Scan_Line_1", ACS_Map (ACS_Scan_Line_1));
n := show_1_acs (n, "ACS_Scan_Line_9", ACS_Map (ACS_Scan_Line_9));
n := show_1_acs (n, "ACS_Diamond", ACS_Map (ACS_Diamond));
n := show_1_acs (n, "ACS_Checker_Board", ACS_Map (ACS_Checker_Board));
n := show_1_acs (n, "ACS_Degree", ACS_Map (ACS_Degree));
n := show_1_acs (n, "ACS_Plus_Minus", ACS_Map (ACS_Plus_Minus));
n := show_1_acs (n, "ACS_Bullet", ACS_Map (ACS_Bullet));
n := show_1_acs (n, "ACS_Left_Arrow", ACS_Map (ACS_Left_Arrow));
n := show_1_acs (n, "ACS_Right_Arrow", ACS_Map (ACS_Right_Arrow));
n := show_1_acs (n, "ACS_Down_Arrow", ACS_Map (ACS_Down_Arrow));
n := show_1_acs (n, "ACS_Up_Arrow", ACS_Map (ACS_Up_Arrow));
n := show_1_acs (n, "ACS_Board_Of_Squares",
ACS_Map (ACS_Board_Of_Squares));
n := show_1_acs (n, "ACS_Lantern", ACS_Map (ACS_Lantern));
n := show_1_acs (n, "ACS_Solid_Block", ACS_Map (ACS_Solid_Block));
n := show_1_acs (n, "ACS_Scan_Line_3", ACS_Map (ACS_Scan_Line_3));
n := show_1_acs (n, "ACS_Scan_Line_7", ACS_Map (ACS_Scan_Line_7));
n := show_1_acs (n, "ACS_Less_Or_Equal", ACS_Map (ACS_Less_Or_Equal));
n := show_1_acs (n, "ACS_Greater_Or_Equal",
ACS_Map (ACS_Greater_Or_Equal));
n := show_1_acs (n, "ACS_PI", ACS_Map (ACS_PI));
n := show_1_acs (n, "ACS_Not_Equal", ACS_Map (ACS_Not_Equal));
n := show_1_acs (n, "ACS_Sterling", ACS_Map (ACS_Sterling));
end show_acs_chars;
c1 : Key_Code;
c : Character := 'a';
begin
loop
case c is
when 'a' =>
show_acs_chars;
when '0' | '1' | '2' | '3' =>
show_upper_chars (ctoi (c) * 32 + 128);
when others =>
null;
end case;
Add (Line => Lines - 3, Column => 0,
Str => "Note: ANSI terminals may not display C1 characters.");
Add (Line => Lines - 2, Column => 0,
Str => "Select: a=ACS, 0=C1, 1,2,3=GR characters, q=quit");
Refresh;
c1 := Getchar;
c := Code_To_Char (c1);
exit when c = 'q' or c = 'x';
end loop;
Pause;
Erase;
End_Windows;
end ncurses2.acs_display;
|
-----------------------------------------------------------------------
-- Security-policies-tests - Unit tests for Security.Permissions
-- Copyright (C) 2011, 2012, 2013 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Files;
with Util.Test_Caller;
with Util.Measures;
with Security.Contexts;
with Security.Policies.Roles;
with Security.Permissions.Tests;
with Security.Policies.URLs;
package body Security.Policies.Tests is
use Util.Tests;
procedure Configure_Policy (Manager : in out Security.Policies.Policy_Manager;
Name : in String);
package Caller is new Util.Test_Caller (Test, "Security.Policies");
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
begin
Caller.Add_Test (Suite, "Test Security.Permissions.Create_Role",
Test_Create_Role'Access);
Caller.Add_Test (Suite, "Test Security.Permissions.Has_Permission",
Test_Has_Permission'Access);
Caller.Add_Test (Suite, "Test Security.Permissions.Read_Policy (empty)",
Test_Read_Empty_Policy'Access);
Caller.Add_Test (Suite, "Test Security.Policies.Add_Policy",
Test_Get_Role_Policy'Access);
Caller.Add_Test (Suite, "Test Security.Policies.Get_Policy",
Test_Get_Role_Policy'Access);
Caller.Add_Test (Suite, "Test Security.Policies.Roles.Get_Role_Policy",
Test_Get_Role_Policy'Access);
Caller.Add_Test (Suite, "Test Security.Policies.Read_Policy",
Test_Read_Policy'Access);
Caller.Add_Test (Suite, "Test Security.Policies.Roles.Set_Roles",
Test_Set_Roles'Access);
Caller.Add_Test (Suite, "Test Security.Policies.Roles.Set_Roles (invalid)",
Test_Set_Invalid_Roles'Access);
-- These tests are identical but registered under different names
-- for the test documentation.
Caller.Add_Test (Suite, "Test Security.Contexts.Has_Permission",
Test_Role_Policy'Access);
Caller.Add_Test (Suite, "Test Security.Controllers.Roles.Has_Permission",
Test_Role_Policy'Access);
Caller.Add_Test (Suite, "Test Security.Permissions.Role_Policy",
Test_Role_Policy'Access);
Caller.Add_Test (Suite, "Test Security.Contexts.Has_Permission (all-permission)",
Test_Anonymous_Permission'Access);
Caller.Add_Test (Suite, "Test Security.Contexts.Has_Permission (auth-permission)",
Test_Anonymous_Permission'Access);
end Add_Tests;
-- ------------------------------
-- Get the roles assigned to the user.
-- ------------------------------
function Get_Roles (User : in Test_Principal) return Roles.Role_Map is
begin
return User.Roles;
end Get_Roles;
-- ------------------------------
-- Get the principal name.
-- ------------------------------
function Get_Name (From : in Test_Principal) return String is
begin
return Util.Strings.To_String (From.Name);
end Get_Name;
-- ------------------------------
-- Test Create_Role and Get_Role_Name
-- ------------------------------
procedure Test_Create_Role (T : in out Test) is
use Security.Policies.Roles;
M : Security.Policies.Roles.Role_Policy;
Role : Role_Type;
begin
M.Create_Role (Name => "admin",
Role => Role);
Assert_Equals (T, "admin", M.Get_Role_Name (Role), "Invalid name");
for I in Role + 1 .. Role_Type'Last loop
declare
Name : constant String := "admin-" & Role_Type'Image (I);
Role2 : Role_Type;
begin
Role2 := M.Find_Role ("admin");
T.Assert (Role2 = Role, "Find_Role returned an invalid role");
M.Create_Role (Name => Name,
Role => Role2);
Assert_Equals (T, Name, M.Get_Role_Name (Role2), "Invalid name");
end;
end loop;
end Test_Create_Role;
-- ------------------------------
-- Test Set_Roles
-- ------------------------------
procedure Test_Set_Roles (T : in out Test) is
use Security.Policies.Roles;
M : Security.Policies.Roles.Role_Policy;
Admin : Role_Type;
Manager : Role_Type;
Map : Role_Map := (others => false);
begin
M.Create_Role (Name => "manager",
Role => Manager);
M.Create_Role (Name => "admin",
Role => Admin);
Assert_Equals (T, "admin", M.Get_Role_Name (Admin), "Invalid name");
T.Assert (not Map (Admin), "The admin role must not set in the map");
M.Set_Roles ("admin", Map);
T.Assert (Map (Admin), "The admin role is not set in the map");
T.Assert (not Map (Manager), "The manager role must not be set in the map");
M.Set_Roles ("manager,admin", Map);
T.Assert (Map (Admin), "The admin role is not set in the map");
T.Assert (Map (Manager), "The manager role is not set in the map");
end Test_Set_Roles;
-- ------------------------------
-- Test Set_Roles on an invalid role name
-- ------------------------------
procedure Test_Set_Invalid_Roles (T : in out Test) is
use Security.Policies.Roles;
M : Security.Policies.Roles.Role_Policy;
Map : Role_Map := (others => False);
begin
M.Set_Roles ("manager,admin", Map);
T.Assert (False, "No exception was raised");
exception
when E : Security.Policies.Roles.Invalid_Name =>
null;
end Test_Set_Invalid_Roles;
-- ------------------------------
-- Test Has_Permission
-- ------------------------------
procedure Test_Has_Permission (T : in out Test) is
M : Security.Policies.Policy_Manager (1);
-- Perm : Permissions.Permission_Type;
User : Test_Principal;
begin
-- T.Assert (not M.Has_Permission (User, 1), "User has a non-existing permission");
null;
end Test_Has_Permission;
procedure Configure_Policy (Manager : in out Security.Policies.Policy_Manager;
Name : in String) is
Dir : constant String := "regtests/files/permissions/";
Path : constant String := Util.Tests.Get_Path (Dir);
R : constant Security.Policies.Roles.Role_Policy_Access := new Roles.Role_Policy;
U : constant Security.Policies.URLs.URL_Policy_Access := new URLs.URL_Policy;
begin
Manager.Add_Policy (R.all'Access);
Manager.Add_Policy (U.all'Access);
Manager.Read_Policy (Util.Files.Compose (Path, Name));
end Configure_Policy;
-- ------------------------------
-- Test the Get_Policy, Get_Role_Policy and Add_Policy operations.
-- ------------------------------
procedure Test_Get_Role_Policy (T : in out Test) is
use type Roles.Role_Policy_Access;
M : aliased Security.Policies.Policy_Manager (Max_Policies => 2);
P : Security.Policies.Policy_Access;
R : Security.Policies.Roles.Role_Policy_Access;
begin
P := M.Get_Policy (Security.Policies.Roles.NAME);
T.Assert (P = null, "Get_Policy succeeded");
R := Security.Policies.Roles.Get_Role_Policy (M);
T.Assert (R = null, "Get_Role_Policy succeeded");
R := new Roles.Role_Policy;
M.Add_Policy (R.all'Access);
P := M.Get_Policy (Security.Policies.Roles.NAME);
T.Assert (P /= null, "Role policy not found");
T.Assert (P.all in Roles.Role_Policy'Class, "Invalid role policy");
R := Security.Policies.Roles.Get_Role_Policy (M);
T.Assert (R /= null, "Get_Role_Policy should not return null");
end Test_Get_Role_Policy;
-- ------------------------------
-- Test reading an empty policy file
-- ------------------------------
procedure Test_Read_Empty_Policy (T : in out Test) is
M : aliased Security.Policies.Policy_Manager (Max_Policies => 2);
User : aliased Test_Principal;
Context : aliased Security.Contexts.Security_Context;
R : Security.Policies.Roles.Role_Policy_Access;
begin
Configure_Policy (M, "empty.xml");
Context.Set_Context (Manager => M'Unchecked_Access,
Principal => User'Unchecked_Access);
R := Security.Policies.Roles.Get_Role_Policy (M);
declare
Admin : Policies.Roles.Role_Type;
pragma Unreferenced (Admin);
begin
Admin := R.Find_Role ("admin");
T.Fail ("'admin' role was returned");
exception
when Security.Policies.Roles.Invalid_Name =>
null;
end;
T.Assert (not Contexts.Has_Permission (Permissions.Tests.P_Admin.Permission),
"Has_Permission (admin) failed for empty policy");
T.Assert (not Contexts.Has_Permission (Permissions.Tests.P_Create.Permission),
"Has_Permission (create) failed for empty policy");
T.Assert (not Contexts.Has_Permission (Permissions.Tests.P_Update.Permission),
"Has_Permission (update) failed for empty policy");
T.Assert (not Contexts.Has_Permission (Permissions.Tests.P_Delete.Permission),
"Has_Permission (delete) failed for empty policy");
end Test_Read_Empty_Policy;
-- ------------------------------
-- Test reading policy files
-- ------------------------------
procedure Test_Read_Policy (T : in out Test) is
use Security.Permissions.Tests;
M : aliased Security.Policies.Policy_Manager (Max_Policies => 2);
User : aliased Test_Principal;
Admin : Policies.Roles.Role_Type;
Context : aliased Security.Contexts.Security_Context;
R : Security.Policies.Roles.Role_Policy_Access;
begin
Configure_Policy (M, "simple-policy.xml");
Context.Set_Context (Manager => M'Unchecked_Access,
Principal => User'Unchecked_Access);
R := Security.Policies.Roles.Get_Role_Policy (M);
Admin := R.Find_Role ("admin");
T.Assert (not Contexts.Has_Permission (Permission => P_Admin.Permission),
"Permission was granted but user has no role");
User.Roles (Admin) := True;
T.Assert (Contexts.Has_Permission (Permission => P_Admin.Permission),
"Permission was not granted and user has admin role");
declare
S : Util.Measures.Stamp;
Result : Boolean;
begin
for I in 1 .. 1_000 loop
Result := Contexts.Has_Permission (Permission => P_Admin.Permission);
end loop;
Util.Measures.Report (S, "Has_Permission role based", 1_000);
T.Assert (Result, "Permission not granted");
end;
declare
S : Util.Measures.Stamp;
begin
for I in 1 .. 1_000 loop
declare
URL : constant String := "/admin/list.html";
P : constant URLs.URL_Permission (URL'Length)
:= URLs.URL_Permission '(Len => URL'Length, URL => URL);
begin
T.Assert (Contexts.Has_Permission (Permission => P),
"Permission not granted");
end;
end loop;
Util.Measures.Report (S, "Has_Permission (cache hit)", 1_000);
end;
end Test_Read_Policy;
-- ------------------------------
-- Read the policy file <b>File</b> and perform a test on the given URI
-- with a user having the given role.
-- ------------------------------
procedure Check_Policy (T : in out Test;
File : in String;
Role : in String;
URL : in String;
Anonymous : in Boolean := False;
Granted : in Boolean := True) is
M : aliased Security.Policies.Policy_Manager (2);
User : aliased Test_Principal;
Admin : Roles.Role_Type;
Context : aliased Security.Contexts.Security_Context;
R : Security.Policies.Roles.Role_Policy_Access;
U : Security.Policies.URLs.URL_Policy_Access;
begin
Configure_Policy (M, File);
if Anonymous then
Context.Set_Context (Manager => M'Unchecked_Access,
Principal => null);
else
Context.Set_Context (Manager => M'Unchecked_Access,
Principal => User'Unchecked_Access);
end if;
R := Security.Policies.Roles.Get_Role_Policy (M);
U := Security.Policies.URLs.Get_URL_Policy (M);
Admin := R.Find_Role (Role);
declare
P : constant URLs.URL_Permission (URL'Length)
:= URLs.URL_Permission '(Len => URL'Length, URL => URL);
begin
if not Anonymous then
-- A user without the role should not have the permission.
T.Assert (not U.Has_Permission (Context => Context,
Permission => P),
"Permission was granted for user without role. URL=" & URL);
-- Set the role.
User.Roles (Admin) := True;
end if;
if Granted then
T.Assert (U.Has_Permission (Context => Context,
Permission => P),
"Permission was not granted for user with role. URL=" & URL);
else
T.Assert (not U.Has_Permission (Context => Context,
Permission => P),
"Permission was granted for user with role. URL=" & URL);
end if;
end;
end Check_Policy;
-- ------------------------------
-- Test reading policy files and using the <role-permission> controller
-- ------------------------------
procedure Test_Role_Policy (T : in out Test) is
begin
T.Check_Policy (File => "policy-with-role.xml",
Role => "developer",
URL => "/developer/user-should-have-developer-role");
T.Check_Policy (File => "policy-with-role.xml",
Role => "manager",
URL => "/developer/user-should-have-manager-role");
T.Check_Policy (File => "policy-with-role.xml",
Role => "manager",
URL => "/manager/user-should-have-manager-role");
T.Check_Policy (File => "policy-with-role.xml",
Role => "admin",
URL => "/manager/user-should-have-admin-role");
T.Check_Policy (File => "policy-with-role.xml",
Role => "admin",
URL => "/admin/user-should-have-admin-role");
T.Check_Policy (File => "policy-with-role.xml",
Role => "developer",
URL => "/admin/user-with-developer-role-should-not-access-admin",
Granted => False);
end Test_Role_Policy;
-- ------------------------------
-- Test anonymous users and permissions.
-- ------------------------------
procedure Test_Anonymous_Permission (T : in out Test) is
begin
T.Check_Policy (File => "simple-policy.xml",
Role => "admin",
URL => "/admin/page.html",
Anonymous => True,
Granted => False);
T.Check_Policy (File => "simple-policy.xml",
Role => "admin",
URL => "/user/totopage.html",
Anonymous => True,
Granted => False);
-- Anonymous users can access the page.
T.Check_Policy (File => "simple-policy.xml",
Role => "admin",
URL => "/page.html",
Anonymous => True,
Granted => True);
end Test_Anonymous_Permission;
end Security.Policies.Tests;
|
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with config.applications; use config.applications;
with ewok.perm_auto;
with ewok.tasks_shared; use ewoK.tasks_shared;
package ewok.perm
with spark_mode => on
is
---------------
-- Types --
---------------
type t_perm_name is
(PERM_RES_DEV_DMA,
PERM_RES_DEV_CRYPTO_USR,
PERM_RES_DEV_CRYPTO_CFG,
PERM_RES_DEV_CRYPTO_FULL,
PERM_RES_DEV_BUSES,
PERM_RES_DEV_EXTI,
PERM_RES_DEV_TIM,
PERM_RES_TIM_GETMILLI,
PERM_RES_TIM_GETMICRO,
PERM_RES_TIM_GETCYCLE,
PERM_RES_TSK_FISR,
PERM_RES_TSK_FIPC,
PERM_RES_TSK_RESET,
PERM_RES_TSK_UPGRADE,
PERM_RES_TSK_RNG,
PERM_RES_MEM_DYNAMIC_MAP);
---------------
-- Functions --
---------------
pragma assertion_policy (pre => IGNORE, post => IGNORE, assert => IGNORE);
-- Test if a task is allowed to share a DMA SHM with another task
function dmashm_is_granted
(from : in t_real_task_id;
to : in t_real_task_id)
return boolean
with
Global => null, -- com_dmashm_perm is a constant, not a variable
Post => (if (from = to) then dmashm_is_granted'Result = false),
Contract_Cases => (ewok.perm_auto.com_dmashm_perm(from,to) => dmashm_is_granted'Result,
others => not dmashm_is_granted'Result);
-- Test if a task is allowed to send an IPC to another task
function ipc_is_granted
(from : in t_real_task_id;
to : in t_real_task_id)
return boolean
with
Global => null, -- com_ipc_perm is a constant, not a variable
Post => (if (from = to) then ipc_is_granted'Result = false),
Contract_Cases => (ewok.perm_auto.com_ipc_perm(from,to) => ipc_is_granted'Result,
others => not ipc_is_granted'Result);
#if CONFIG_KERNEL_DOMAIN
function is_same_domain
(from : in t_real_task_id;
to : in t_real_task_id)
return boolean
with
Global => null,
Post => (if (from = to) then is_same_domain'Result = false);
#end if;
-- Test if a task is allowed to use a resource
function ressource_is_granted
(perm_name : in t_perm_name;
task_id : in config.applications.t_real_task_id)
return boolean
with Global => null;
end ewok.perm;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.UML.Packages.Collections is
pragma Preelaborate;
package UML_Package_Collections is
new AMF.Generic_Collections
(UML_Package,
UML_Package_Access);
type Set_Of_UML_Package is
new UML_Package_Collections.Set with null record;
Empty_Set_Of_UML_Package : constant Set_Of_UML_Package;
type Ordered_Set_Of_UML_Package is
new UML_Package_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UML_Package : constant Ordered_Set_Of_UML_Package;
type Bag_Of_UML_Package is
new UML_Package_Collections.Bag with null record;
Empty_Bag_Of_UML_Package : constant Bag_Of_UML_Package;
type Sequence_Of_UML_Package is
new UML_Package_Collections.Sequence with null record;
Empty_Sequence_Of_UML_Package : constant Sequence_Of_UML_Package;
private
Empty_Set_Of_UML_Package : constant Set_Of_UML_Package
:= (UML_Package_Collections.Set with null record);
Empty_Ordered_Set_Of_UML_Package : constant Ordered_Set_Of_UML_Package
:= (UML_Package_Collections.Ordered_Set with null record);
Empty_Bag_Of_UML_Package : constant Bag_Of_UML_Package
:= (UML_Package_Collections.Bag with null record);
Empty_Sequence_Of_UML_Package : constant Sequence_Of_UML_Package
:= (UML_Package_Collections.Sequence with null record);
end AMF.UML.Packages.Collections;
|
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr>
-- MIT license. Please refer to the LICENSE file.
-- with GNAT.Exception_Traces; -- For debugging.
with Apsepp_Test_Harness;
procedure Apsepp_Test is
-- use GNAT.Exception_Traces; -- For debugging.
begin
-- Trace_On (Every_Raise); -- For debugging.
Apsepp_Test_Harness.Apsepp_Test_Procedure;
-- Trace_Off; -- For debugging.
end Apsepp_Test;
|
with Ada.Finalization;
--
-- The model for a "readable sequence" is a sequential data buffer where
-- new data can be only appended and data can be read sequentially,
-- although the "cursor" to the current entry can be moved (mainly
-- by saving the current position and restoring it)
--
generic
type Element_Type is private;
type Element_Array is array (Positive range <>) of Element_Type;
package Readable_Sequences.Generic_Sequences is
type Sequence is
new Ada.Finalization.Limited_Controlled
with
private;
type Cursor is private;
function Empty_Sequence return Sequence;
function Create (Init : Element_Array) return Sequence;
function Create (End_Of_Sequence_Marker : Element_Type) return Sequence;
function Create (Init : Element_Array;
End_Of_Sequence_Marker : Element_Type) return Sequence;
function Has_End_Of_Sequence_Marker (Item : Sequence) return Boolean;
function Dump (Seq : Sequence) return Element_Array
with
Post => Dump'Result'Length = Seq.Length;
function Dump (Seq : Sequence;
From : Cursor) return Element_Array;
function First (Seq : Sequence) return Cursor
with
Post => Seq.Is_Valid_Position (First'Result);
procedure Clear (Seq : in out Sequence)
with
Post =>
Seq.Length = 0
and not Seq.Saved_Position
and Seq.Current_Position = Seq.First;
function Index (Seq : Sequence) return Positive;
procedure Append (Seq : in out Sequence;
Elements : Element_Array)
with
Post =>
Seq.Length = Seq.Length'Old + Elements'Length
and Seq.Remaining = Seq.Remaining'Old + Elements'Length;
procedure Append (To : in out Sequence;
What : Element_Type)
with
Post =>
To.Length = To.Length'Old + 1
and to.Remaining = to.Remaining'Old + 1;
procedure Append (To : in out Sequence;
What : Sequence)
with
Post =>
To.Length = To.Length'Old + What.Length
and to.Remaining = to.Remaining'Old + What.Length;
procedure Rewind (Seq : in out Sequence)
with
Post =>
Seq.Current_Position = Seq.First
and Seq.Remaining = Seq.Length;
procedure Rewind (Seq : in out Sequence;
To : Cursor)
with
Pre =>
Seq.Is_Valid_Position (To),
Post =>
Seq.Current_Position = To;
function Length (Seq : Sequence) return Natural;
-- Total number of data written in the buffer
function Remaining (Seq : Sequence) return Natural
with Post => Remaining'Result <= Seq.Length;
-- Return the number of elements that still need to be read from
-- Seq. This includes also the current element
function Is_Valid_Position (Seq : Sequence;
C : Cursor)
return Boolean;
function Current_Position (Seq : Sequence) return Cursor
with
Post => Seq.Is_Valid_Position (Current_Position'Result);
function Next_Position (Seq : Sequence) return Cursor
with
Post => Seq.Is_Valid_Position (Next_Position'Result);
-- Return the position will have the reading cursor after a call to Next.
-- Funny? It is useful for contracts
procedure Set_Position (Seq : in out Sequence;
Pos : Cursor)
with
Pre =>
Seq.Is_Valid_Position (Pos),
Post =>
Seq.Current_Position = Pos;
function Saved_Position (Seq : Sequence) return Boolean;
procedure Save_Position (Seq : in out Sequence)
with
Pre => not Seq.Saved_Position,
Post => Seq.Saved_Position;
procedure Restore_Position (Seq : in out Sequence)
with
Pre => Seq.Saved_Position,
Post => not Seq.Saved_Position;
procedure Clear_Position (Seq : in out Sequence)
with
Pre => Seq.Saved_Position,
Post => not Seq.Saved_Position;
function End_Of_Sequence (Seq : Sequence) return Boolean
is (Seq.Remaining = 0);
function Read (Seq : Sequence;
Ahead : Natural := 0) return Element_Type
with
Pre => Seq.Has_End_Of_Sequence_Marker or Seq.Remaining > Ahead;
function Next (Seq : in out Sequence) return Element_Type
with
Pre =>
Seq.Has_End_Of_Sequence_Marker or Seq.Remaining > 0,
Post =>
Next'Result = Seq.Read'Old
and Seq.Current_Position = Seq.Next_Position'Old;
procedure Next (Seq : in out Sequence;
Step : Positive := 1)
with
Post => Seq.Remaining = Integer'Max (Seq.Remaining'Old - Step, 0);
procedure Back (Seq : in out Sequence;
Step : Positive := 1)
with
Post => Seq.Remaining = Integer'Min (Seq.Remaining'Old + Step, Seq.Length);
procedure Process (Seq : Sequence;
Callback : access procedure (Item : Element_Type));
Beyond_End : exception;
private
type Cursor is range 0 .. Integer'Last;
type Buffer_Type is array (Cursor range <>) of Element_Type;
type Buffer_Access is not null access Buffer_Type;
function Free_Space (Seq : Sequence) return Natural;
--
-- A "Sequence" is basically a buffer with two cursors:
--
-- * One Cursor Points To The "current" Element That is Returned
-- by "reading" functions
--
-- * The other cursor points to the first free location that it
-- has not been initialized yet. This cursor can point beyond
-- the end of the buffer, if the buffer is filled.
--
-- "End of Sequence" condition happens when the two cursors are equal
--
type Sequence is
new Ada.Finalization.Limited_Controlled
with
record
Buffer : Buffer_Access;
First_Free : Cursor;
Position : Cursor;
Old_Position : Cursor;
Position_Saved : Boolean := False;
Has_End_Marker : Boolean := False;
End_Marker : Element_Type;
end record
with
Type_Invariant =>
Sequence.First_Free <= Sequence.Buffer.all'Last + 1
and then Sequence.Is_Valid_Position (Sequence.Position);
overriding
procedure Finalize (Object : in out Sequence);
function Saved_Position (Seq : Sequence)return Boolean
is (Seq.Position_Saved);
function Current_Position (Seq : Sequence) return Cursor
is (Seq.Position);
function Length (Seq : Sequence) return Natural
is (Natural (Seq.First_Free - Seq.Buffer'First));
function Read (Seq : Sequence;
Ahead : Natural := 0) return Element_Type
is (if Seq.Remaining > Ahead then
Seq.Buffer (Cursor (Integer (Seq.Position) + Ahead))
elsif Seq.Has_End_Marker then
Seq.End_Marker
else
raise Beyond_End);
function Has_End_Of_Sequence_Marker (Item : Sequence) return Boolean
is (Item.Has_End_Marker);
function Index (Seq : Sequence) return Positive
is (Positive (Seq.Position));
function Is_Valid_Position (Seq : Sequence;
C : Cursor)
return Boolean
is (C >= Seq.Buffer'First and C <= Seq.First_Free);
function Next_Position (Seq : Sequence) return Cursor
is (if Seq.End_Of_Sequence then
Seq.Position
else
Seq.Position + 1);
function Free_Space (Seq : Sequence) return Natural
is (Integer (Seq.Buffer'Last)-Integer (Seq.First_Free) + 1);
function First (Seq : Sequence) return Cursor
is (Seq.Buffer'First);
end Readable_Sequences.Generic_Sequences;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.