hexsha
stringlengths 40
40
| size
int64 3
1.05M
| ext
stringclasses 163
values | lang
stringclasses 53
values | max_stars_repo_path
stringlengths 3
945
| max_stars_repo_name
stringlengths 4
112
| max_stars_repo_head_hexsha
stringlengths 40
78
| max_stars_repo_licenses
sequencelengths 1
10
| max_stars_count
float64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 3
945
| max_issues_repo_name
stringlengths 4
113
| max_issues_repo_head_hexsha
stringlengths 40
78
| max_issues_repo_licenses
sequencelengths 1
10
| max_issues_count
float64 1
116k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 3
945
| max_forks_repo_name
stringlengths 4
113
| max_forks_repo_head_hexsha
stringlengths 40
78
| max_forks_repo_licenses
sequencelengths 1
10
| max_forks_count
float64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 3
1.05M
| avg_line_length
float64 1
966k
| max_line_length
int64 1
977k
| alphanum_fraction
float64 0
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20ab921d148e7d06c71a70201c5a4e244379dc81 | 9,048 | ads | Ada | src/ada-core/src/linted-io_pool.ads | mstewartgallus/linted | 4d4cf9390353ea045b95671474ab278456793a35 | [
"Apache-2.0"
] | null | null | null | src/ada-core/src/linted-io_pool.ads | mstewartgallus/linted | 4d4cf9390353ea045b95671474ab278456793a35 | [
"Apache-2.0"
] | null | null | null | src/ada-core/src/linted-io_pool.ads | mstewartgallus/linted | 4d4cf9390353ea045b95671474ab278456793a35 | [
"Apache-2.0"
] | null | null | null | -- Copyright 2015,2016,2017 Steven Stewart-Gallus
--
-- 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.Real_Time;
with Interfaces.C;
with System;
private with Linted.Channels;
with Linted.Errors;
with Linted.KOs;
with Linted.Triggers;
with Linted.Wait_Lists;
pragma Elaborate_All (Linted.Wait_Lists);
package Linted.IO_Pool with
Spark_Mode,
Initializes => (State => Wait_Lists.State),
Abstract_State => (State with External) is
pragma Elaborate_Body;
use type Interfaces.C.int;
type Writer_Event is record
Bytes_Written : Interfaces.C.size_t := 0;
Err : Errors.Error;
end record;
type Reader_Event is record
Bytes_Read : Interfaces.C.size_t := 0;
Err : Errors.Error;
end record;
type Poller_Event_Type is (Readable, Writable);
type Poller_Event_Set is array (Poller_Event_Type) of Boolean with
Pack;
type Poller_Event is record
Events : Poller_Event_Set :=
(Poller_Event_Type'First .. Poller_Event_Type'Last => False);
Err : Errors.Error;
end record;
type Remind_Me_Event is record
Dummy : Natural := 0;
end record;
type Read_Future is limited private with
Preelaborable_Initialization;
function Read_Future_Is_Live (Future : Read_Future) return Boolean with
Ghost,
Global => null,
Depends => (Read_Future_Is_Live'Result => Future);
procedure Read
(Object : KOs.KO;
Buf : System.Address;
Count : Interfaces.C.size_t;
Signaller : Triggers.Signaller;
Future : out Read_Future) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(State =>+ (Buf, Count, Object, Signaller, Wait_Lists.State),
Future => State,
Wait_Lists.State =>+ (Buf, Count, State, Object, Signaller)),
Post => Read_Future_Is_Live (Future);
procedure Read_Wait
(Future : in out Read_Future;
Event : out Reader_Event) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(Future => null,
Event => (State, Future),
State =>+ (Future, Wait_Lists.State),
Wait_Lists.State =>+ (Future, State)),
Pre => Read_Future_Is_Live (Future),
Post => not Read_Future_Is_Live (Future);
procedure Read_Poll
(Future : in out Read_Future;
Event : out Reader_Event;
Init : out Boolean) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(Future =>+ State,
Event => (State, Future),
Init => (State, Future),
State =>+ (Future, Wait_Lists.State),
Wait_Lists.State =>+ (Future, State)),
Pre => Read_Future_Is_Live (Future),
Post =>
(if Init then not Read_Future_Is_Live (Future)
else Read_Future_Is_Live (Future));
type Write_Future is limited private with
Preelaborable_Initialization;
function Write_Future_Is_Live (Future : Write_Future) return Boolean with
Ghost,
Global => null,
Depends => (Write_Future_Is_Live'Result => Future);
procedure Write
(Object : KOs.KO;
Buf : System.Address;
Count : Interfaces.C.size_t;
Signaller : Triggers.Signaller;
Future : out Write_Future) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(Future => State,
State =>+ (Buf, Count, Object, Signaller, Wait_Lists.State),
Wait_Lists.State =>+ (Buf, Count, State, Object, Signaller)),
Post => Write_Future_Is_Live (Future);
procedure Write_Wait
(Future : in out Write_Future;
Event : out Writer_Event) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(Future => null,
Event => (State, Future),
State =>+ (Future, Wait_Lists.State),
Wait_Lists.State =>+ (Future, State)),
Pre => Write_Future_Is_Live (Future),
Post => not Write_Future_Is_Live (Future);
procedure Write_Poll
(Future : in out Write_Future;
Event : out Writer_Event;
Init : out Boolean) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(Future =>+ State,
Event => (State, Future),
Init => (State, Future),
State =>+ (Future, State, Wait_Lists.State),
Wait_Lists.State =>+ (Future, State)),
Pre => Write_Future_Is_Live (Future),
Post =>
(if Init then not Write_Future_Is_Live (Future)
else Write_Future_Is_Live (Future));
type Poll_Future is limited private with
Preelaborable_Initialization;
function Poll_Future_Is_Live (Future : Poll_Future) return Boolean with
Ghost,
Global => null,
Depends => (Poll_Future_Is_Live'Result => Future);
procedure Poll
(Object : KOs.KO;
Events : Poller_Event_Set;
Signaller : Triggers.Signaller;
Future : out Poll_Future) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(Future => State,
State =>+ (Events, State, Object, Signaller, Wait_Lists.State),
Wait_Lists.State =>+ (Events, State, Object, Signaller)),
Post => Poll_Future_Is_Live (Future);
procedure Poll_Wait
(Future : in out Poll_Future;
Event : out Poller_Event) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(Future => null,
Event => (State, Future),
State =>+ (Future, Wait_Lists.State),
Wait_Lists.State =>+ (Future, State)),
Pre => Poll_Future_Is_Live (Future),
Post => not Poll_Future_Is_Live (Future);
procedure Poll_Poll
(Future : in out Poll_Future;
Event : out Poller_Event;
Init : out Boolean) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(Future =>+ State,
Event => (State, Future),
Init => (State, Future),
State =>+ (Future, Wait_Lists.State),
Wait_Lists.State =>+ (Future, State)),
Pre => Poll_Future_Is_Live (Future),
Post =>
(if Init then not Poll_Future_Is_Live (Future)
else Poll_Future_Is_Live (Future));
type Remind_Me_Future is limited private with
Preelaborable_Initialization;
function Remind_Me_Future_Is_Live
(Future : Remind_Me_Future) return Boolean with
Ghost,
Global => null,
Depends => (Remind_Me_Future_Is_Live'Result => Future);
procedure Remind_Me
(Time : Ada.Real_Time.Time;
Signaller : Triggers.Signaller;
Future : out Remind_Me_Future) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(Future => State,
State =>+ (Signaller, Time, Wait_Lists.State),
Wait_Lists.State =>+ (State, Signaller, Time)),
Post => Remind_Me_Future_Is_Live (Future);
procedure Remind_Me_Wait
(Future : in out Remind_Me_Future;
Event : out Remind_Me_Event) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(Future => null,
Event => (Future, State),
State =>+ (Future, Wait_Lists.State),
Wait_Lists.State =>+ (Future, State)),
Pre => Remind_Me_Future_Is_Live (Future),
Post => not Remind_Me_Future_Is_Live (Future);
procedure Remind_Me_Poll
(Future : in out Remind_Me_Future;
Event : out Remind_Me_Event;
Init : out Boolean) with
Global => (In_Out => (State, Wait_Lists.State)),
Depends =>
(Future =>+ State,
Event => (Future, State),
Init => (State, Future),
State =>+ (Future, Wait_Lists.State),
Wait_Lists.State =>+ (Future, State)),
Pre => Remind_Me_Future_Is_Live (Future),
Post =>
(if Init then not Remind_Me_Future_Is_Live (Future)
else Remind_Me_Future_Is_Live (Future));
private
Max_Read_Futures : constant := 10;
Max_Write_Futures : constant := 10;
Max_Poll_Futures : constant := 10;
Max_Remind_Me_Futures : constant := 10;
Max_Command_Queue_Capacity : constant := 10;
type Read_Future is mod Max_Read_Futures + 1 with
Default_Value => 0;
type Write_Future is mod Max_Write_Futures + 1 with
Default_Value => 0;
type Poll_Future is mod Max_Poll_Futures + 1 with
Default_Value => 0;
type Remind_Me_Future is mod Max_Remind_Me_Futures + 1 with
Default_Value => 0;
package Writer_Event_Channels is new Channels (Writer_Event);
package Reader_Event_Channels is new Channels (Reader_Event);
package Poller_Event_Channels is new Channels (Poller_Event);
package Remind_Me_Event_Channels is new Channels (Remind_Me_Event);
end Linted.IO_Pool;
| 33.387454 | 76 | 0.648099 |
500ec130086febfa6cb36ad28411b3baddc79e2a | 4,156 | adb | Ada | external/ncurses/Ada95/src/terminal_interface-curses-forms-form_user_data.adb | Arogon-project/arogon | f226e910348e1799daa478ab5191ced1777f8aa6 | [
"BSD-3-Clause"
] | 6 | 2019-06-24T03:09:47.000Z | 2022-02-06T13:50:34.000Z | external/ncurses/Ada95/src/terminal_interface-curses-forms-form_user_data.adb | Arogon-project/arogon | f226e910348e1799daa478ab5191ced1777f8aa6 | [
"BSD-3-Clause"
] | null | null | null | external/ncurses/Ada95/src/terminal_interface-curses-forms-form_user_data.adb | Arogon-project/arogon | f226e910348e1799daa478ab5191ced1777f8aa6 | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- Terminal_Interface.Curses.Forms.Form_User_Data --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998-2014,2018 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
-- $Revision: 1.16 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- |
-- |=====================================================================
-- | man page form__userptr.3x
-- |=====================================================================
-- |
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Form_User_Data is
-- |
-- |
-- |
procedure Set_User_Data (Frm : Form;
Data : User_Access)
is
function Set_Form_Userptr (Frm : Form;
Data : User_Access) return Eti_Error;
pragma Import (C, Set_Form_Userptr, "set_form_userptr");
begin
Eti_Exception (Set_Form_Userptr (Frm, Data));
end Set_User_Data;
-- |
-- |
-- |
function Get_User_Data (Frm : Form) return User_Access
is
function Form_Userptr (Frm : Form) return User_Access;
pragma Import (C, Form_Userptr, "form_userptr");
begin
return Form_Userptr (Frm);
end Get_User_Data;
procedure Get_User_Data (Frm : Form;
Data : out User_Access)
is
begin
Data := Get_User_Data (Frm);
end Get_User_Data;
end Terminal_Interface.Curses.Forms.Form_User_Data;
| 50.682927 | 78 | 0.448268 |
fbc3591ef9b21d38350d6863b04b31aa3783e02e | 16,390 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c37211b.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c37211b.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c37211b.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- C37211B.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 BY A DISCRIMINANT CONSTRAINT
-- IF A VALUE SPECIFIED FOR A DISCRIMINANT DOES NOT LIE IN THE RANGE
-- OF THE DISCRIMINANT. THIS TEST CONTAINS CHECKS FOR SUBTYPE
-- INDICATIONS WHERE THE TYPE MARK DENOTES A PRIVATE OR LIMITED
-- PRIVATE TYPE, AND THE DISCRIMINANT CONSTRAINT OCCURS AFTER THE FULL
-- DECLARATION OF THE TYPE.
-- R.WILLIAMS 8/28/86
-- EDS 7/14/98 AVOID OPTIMIZATION
WITH REPORT; USE REPORT;
PROCEDURE C37211B IS
SUBTYPE LIES IS BOOLEAN RANGE FALSE .. FALSE;
PACKAGE PKG IS
TYPE PRIV (L : LIES) IS PRIVATE;
TYPE LIM (L : LIES) IS LIMITED PRIVATE;
PRIVATE
TYPE PRIV (L : LIES) IS
RECORD
NULL;
END RECORD;
TYPE LIM (L : LIES) IS
RECORD
NULL;
END RECORD;
END PKG;
USE PKG;
BEGIN
TEST ( "C37211B", "CHECK THAT CONSTRAINT_ERROR IS RAISED BY " &
"A DISCRIMINANT CONSTRAINT IF A VALUE " &
"SPECIFIED FOR A DISCRIMINANT DOES NOT LIE " &
"IN THE RANGE OF THE DISCRIMINANT WHERE THE " &
"TYPE MARK DENOTES A PRIVATE OR LIMITED " &
"PRIVATE TYPE, AND THE DISCRIMINANT " &
"CONSTRAINT OCCURS AFTER THE FULL " &
"DECLARATION OF THE TYPE" );
BEGIN
DECLARE
SUBTYPE SUBPRIV IS PRIV (IDENT_BOOL (TRUE));
BEGIN
DECLARE
SP : SUBPRIV;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"ELABORATION OF SUBTYPE SUBPRIV " &
BOOLEAN'IMAGE(SP.L));
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT DECLARATION OF " &
"OBJECT SP" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
"SUBTYPE SUBPRIV" );
END;
BEGIN
DECLARE
SUBTYPE SUBLIM IS LIM (IDENT_BOOL (TRUE));
BEGIN
DECLARE
SL : SUBLIM;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"ELABORATION OF SUBTYPE SUBLIM" &
BOOLEAN'IMAGE(SL.L));
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT DECLARATION OF " &
"OBJECT SL " );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
"SUBTYPE SUBLIM" );
END;
BEGIN
DECLARE
TYPE PARR IS ARRAY (1 .. 5) OF PRIV (IDENT_BOOL (TRUE));
BEGIN
DECLARE
PAR : PARR;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"ELABORATION OF TYPE PARR " &
BOOLEAN'IMAGE(PAR(1).L));
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT DECLARATION OF " &
"OBJECT PAR" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
"TYPE PARR" );
END;
BEGIN
DECLARE
TYPE LARR IS ARRAY (1 .. 10) OF LIM (IDENT_BOOL (TRUE));
BEGIN
DECLARE
LAR : LARR;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"ELABORATION OF TYPE LARR " &
BOOLEAN'IMAGE(LAR(1).L));
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT DECLARATION OF " &
"OBJECT LAR" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
"TYPE LARR" );
END;
BEGIN
DECLARE
TYPE PRIV1 IS
RECORD
X : PRIV (IDENT_BOOL (TRUE));
END RECORD;
BEGIN
DECLARE
P1 : PRIV1;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"ELABORATION OF TYPE PRIV1 " &
BOOLEAN'IMAGE(P1.X.L));
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT DECLARATION OF " &
"OBJECT P1" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
"TYPE PRIV1" );
END;
BEGIN
DECLARE
TYPE LIM1 IS
RECORD
X : LIM (IDENT_BOOL (TRUE));
END RECORD;
BEGIN
DECLARE
L1 : LIM1;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"ELABORATION OF TYPE LIM1 " &
BOOLEAN'IMAGE(L1.X.L));
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT DECLARATION OF " &
"OBJECT L1" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
"TYPE LIM1" );
END;
BEGIN
DECLARE
TYPE ACCPRIV IS ACCESS PRIV (IDENT_BOOL (TRUE));
BEGIN
DECLARE
ACP : ACCPRIV;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"ELABORATION OF TYPE ACCPRIV " &
BOOLEAN'IMAGE(ACP.L));
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT DECLARATION OF " &
"OBJECT ACP" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
"TYPE ACCPRIV" );
END;
BEGIN
DECLARE
TYPE ACCLIM IS ACCESS LIM (IDENT_BOOL (TRUE));
BEGIN
DECLARE
ACL : ACCLIM;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"ELABORATION OF TYPE ACCLIM " &
BOOLEAN'IMAGE(ACL.L));
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT DECLARATION OF " &
"OBJECT ACL" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
"TYPE ACCLIM" );
END;
BEGIN
DECLARE
TYPE NEWPRIV IS NEW PRIV (IDENT_BOOL (TRUE));
BEGIN
DECLARE
NP : NEWPRIV;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"ELABORATION OF TYPE NEWPRIV " &
BOOLEAN'IMAGE(NP.L));
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT DECLARATION OF " &
"OBJECT NP" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
"TYPE NEWPRIV" );
END;
BEGIN
DECLARE
TYPE NEWLIM IS NEW LIM (IDENT_BOOL (TRUE));
BEGIN
DECLARE
NL : NEWLIM;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"ELABORATION OF TYPE NEWLIM " &
BOOLEAN'IMAGE(NL.L));
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT DECLARATION OF " &
"OBJECT NL" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
"TYPE NEWLIM" );
END;
BEGIN
DECLARE
P : PRIV (IDENT_BOOL (TRUE));
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE DECLARATION OF " &
"P " & BOOLEAN'IMAGE(P.L));
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED INSIDE BLOCK " &
"CONTAINING P" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT DECLARATION OF " &
"P" );
END;
BEGIN
DECLARE
L : LIM (IDENT_BOOL (TRUE));
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE DECLARATION OF " &
"L " & BOOLEAN'IMAGE(L.L));
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED INSIDE BLOCK " &
"CONTAINING L" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT DECLARATION OF " &
"L" );
END;
BEGIN
DECLARE
TYPE PRIV_NAME IS ACCESS PRIV;
BEGIN
DECLARE
PN : PRIV_NAME := NEW PRIV (IDENT_BOOL (TRUE));
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"DECLARATION OF OBJECT PN " &
BOOLEAN'IMAGE(PN.L));
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION ATTEMPTING TO USE OBJECT" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT DECLARATION " &
"OF OBJECT PN" );
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT ELABORATION OF TYPE " &
"PRIV_NAME" );
END;
BEGIN
DECLARE
TYPE LIM_NAME IS ACCESS LIM;
BEGIN
DECLARE
LN : LIM_NAME := NEW LIM (IDENT_BOOL (TRUE));
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"DECLARATION OF OBJECT LN " &
BOOLEAN'IMAGE(LN.L));
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION ATTEMPTING TO USE OBJECT" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT DECLARATION " &
"OF OBJECT LN" );
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT ELABORATION OF TYPE " &
"LIM_NAME" );
END;
BEGIN
DECLARE
PACKAGE PP IS
TYPE BAD_PRIV (D : LIES := IDENT_BOOL (TRUE)) IS
PRIVATE;
PRIVATE
TYPE BAD_PRIV (D : LIES := IDENT_BOOL (TRUE)) IS
RECORD
NULL;
END RECORD;
END PP;
USE PP;
BEGIN
DECLARE
BP : BAD_PRIV;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"DECLARATION OF OBJECT BP " &
BOOLEAN'IMAGE(BP.D));
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION ATTEMPTING TO USE OBJECT" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT DECLARATION " &
"OF OBJECT BP" );
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT ELABORATION OF TYPE " &
"BAD_PRIV" );
END;
BEGIN
DECLARE
PACKAGE PL IS
TYPE BAD_LIM (D : LIES := IDENT_BOOL (TRUE)) IS
LIMITED PRIVATE;
PRIVATE
TYPE BAD_LIM (D : LIES := IDENT_BOOL (TRUE)) IS
RECORD
NULL;
END RECORD;
END PL;
USE PL;
BEGIN
DECLARE
BL : BAD_LIM;
BEGIN
FAILED ( "NO EXCEPTION RAISED AT THE " &
"DECLARATION OF OBJECT BL " &
BOOLEAN'IMAGE(BL.D));
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION ATTEMPTING TO USE OBJECT" );
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED AT DECLARATION " &
"OF OBJECT BL" );
END;
EXCEPTION
WHEN OTHERS =>
FAILED ( "EXCEPTION RAISED AT ELABORATION OF TYPE " &
"BAD_LIM" );
END;
RESULT;
END C37211B;
| 33.044355 | 79 | 0.419524 |
0b62fbd317a6426ce5eaaa87d53e921e852ae613 | 3,134 | ads | Ada | src/audio/sdl-byteorder.ads | rveenker/sdlada | 2ef55d2100b248db44c89cb3a9f20038e453f330 | [
"Zlib"
] | 1 | 2021-10-30T14:41:56.000Z | 2021-10-30T14:41:56.000Z | src/audio/sdl-byteorder.ads | rveenker/sdlada | 2ef55d2100b248db44c89cb3a9f20038e453f330 | [
"Zlib"
] | null | null | null | src/audio/sdl-byteorder.ads | rveenker/sdlada | 2ef55d2100b248db44c89cb3a9f20038e453f330 | [
"Zlib"
] | null | null | null |
-- ----------------------------------------------------------------- --
-- AdaSDL --
-- Thin binding to Simple Direct Media Layer --
-- Copyright (C) 2000-2012 A.M.F.Vargas --
-- Antonio M. M. Ferreira Vargas --
-- Manhente - Barcelos - Portugal --
-- http://adasdl.sourceforge.net --
-- E-mail: [email protected] --
-- ----------------------------------------------------------------- --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the Free Software Foundation; either --
-- version 2 of the License, or (at your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public --
-- License along with this library; if not, write to the --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
-- ----------------------------------------------------------------- --
-- **************************************************************** --
-- This is an Ada binding to SDL ( Simple DirectMedia Layer from --
-- Sam Lantinga - www.libsld.org ) --
-- **************************************************************** --
-- In order to help the Ada programmer, the comments in this file --
-- are, in great extent, a direct copy of the original text in the --
-- SDL header files. --
-- **************************************************************** --
with Interfaces.C;
package SDL.Byteorder is
pragma Elaborate_Body;
package C renames Interfaces.C;
LIL_ENDIAN : constant C.int := 1234;
BIG_ENDIAN : constant C.int := 4321;
function Get_Byte_Order return C.int;
end SDL.Byteorder;
| 54.034483 | 71 | 0.438736 |
39eac348255d9abc8617b53f898c7a57d90026ca | 7,590 | adb | Ada | eBindings/uuid/gnatcoll-uuid.adb | persan/zeromq-Ada | 651ca44cce831c2d717338eab65a60fbfca7ec44 | [
"MIT"
] | 33 | 2015-01-16T13:42:55.000Z | 2021-11-30T21:28:50.000Z | eBindings/uuid/gnatcoll-uuid.adb | persan/zeromq-Ada | 651ca44cce831c2d717338eab65a60fbfca7ec44 | [
"MIT"
] | 6 | 2016-03-23T01:26:36.000Z | 2021-05-13T04:24:53.000Z | eBindings/uuid/gnatcoll-uuid.adb | persan/zeromq-Ada | 651ca44cce831c2d717338eab65a60fbfca7ec44 | [
"MIT"
] | 5 | 2016-03-09T20:20:09.000Z | 2020-06-17T06:59:39.000Z | with System;
package body gnatcoll.uuid is
use Interfaces.C;
package bits_types_h is
type uu_timer_t is new System.Address; -- types.h:161:27
end bits_types_h;
package bits_time_h is
CLOCKS_PER_SEC : constant := 1000000; -- time.h:34
CLOCK_REALTIME : constant := 0; -- time.h:46
CLOCK_MONOTONIC : constant := 1; -- time.h:48
CLOCK_PROCESS_CPUTIME_ID : constant := 2; -- time.h:50
CLOCK_THREAD_CPUTIME_ID : constant := 3; -- time.h:52
TIMER_ABSTIME : constant := 1; -- time.h:55
type timeval is record
tv_sec : aliased long; -- time.h:71:14
tv_usec : aliased long; -- time.h:72:19
end record;
pragma Convention (C_Pass_By_Copy, timeval); -- time.h:70:3
end bits_time_h;
package time_h is
subtype time_t is long; -- time.h:76:18
end time_h;
package uuid_uuid_h is
UUID_VARIANT_NCS : constant := 0; -- uuid.h:47
UUID_VARIANT_DCE : constant := 1; -- uuid.h:48
UUID_VARIANT_MICROSOFT : constant := 2; -- uuid.h:49
UUID_VARIANT_OTHER : constant := 3; -- uuid.h:50
UUID_TYPE_DCE_TIME : constant := 1; -- uuid.h:53
UUID_TYPE_DCE_RANDOM : constant := 4; -- uuid.h:54
type uuid_t is array (0 .. 15) of aliased unsigned_char; -- uuid.h:44:23
pragma Unreferenced (uuid_t);
procedure uuid_clear (arg1 : access unsigned_char); -- uuid.h:70:6
pragma Import (C, uuid_clear, "uuid_clear");
function uuid_compare
(arg1 : access unsigned_char;
arg2 : access unsigned_char) return int; -- uuid.h:73:5
pragma Import (C, uuid_compare, "uuid_compare");
procedure uuid_copy (arg1 : access unsigned_char;
arg2 : access unsigned_char); -- uuid.h:76:6
pragma Import (C, uuid_copy, "uuid_copy");
procedure uuid_generate
(arg1 : access unsigned_char); -- uuid.h:79:6
pragma Import (C, uuid_generate, "uuid_generate");
procedure uuid_generate_random
(arg1 : access unsigned_char); -- uuid.h:80:6
pragma Import (C, uuid_generate_random, "uuid_generate_random");
procedure uuid_generate_time
(arg1 : access unsigned_char); -- uuid.h:81:6
pragma Import (C, uuid_generate_time, "uuid_generate_time");
function uuid_is_null
(arg1 : access unsigned_char) return int; -- uuid.h:84:5
pragma Import (C, uuid_is_null, "uuid_is_null");
function uuid_parse
(arg1 : access Character;
arg2 : access unsigned_char) return int; -- uuid.h:87:5
pragma Import (C, uuid_parse, "uuid_parse");
procedure uuid_unparse
(arg1 : access unsigned_char;
arg2 : access Character); -- uuid.h:90:6
pragma Import (C, uuid_unparse, "uuid_unparse");
procedure uuid_unparse_lower
(arg1 : access unsigned_char;
arg2 : access Character); -- uuid.h:91:6
pragma Import (C, uuid_unparse_lower, "uuid_unparse_lower");
procedure uuid_unparse_upper
(arg1 : access unsigned_char;
arg2 : access Character); -- uuid.h:92:6
pragma Import (C, uuid_unparse_upper, "uuid_unparse_upper");
function uuid_time
(arg1 : access unsigned_char;
arg2 : access bits_time_h.timeval) return time_h.time_t; -- uuid.h:95
pragma Import (C, uuid_time, "uuid_time");
function uuid_type
(arg1 : access unsigned_char) return int; -- uuid.h:96:5
pragma Import (C, uuid_type, "uuid_type");
function uuid_variant
(arg1 : access unsigned_char) return int; -- uuid.h:97:5
pragma Import (C, uuid_variant, "uuid_variant");
end uuid_uuid_h;
-----------------------------------------------------
procedure Clear (this : in out UUID) is
begin
uuid_uuid_h.uuid_clear(this.data(this.data'First)'Unrestricted_Access);
end Clear;
function "<" (l, r : UUID) return Boolean is
begin
return uuid_uuid_h.uuid_compare (l.data (l.data'first)'Unrestricted_Access,
r.data (r.data'first)'Unrestricted_Access) < 0;
end "<";
function ">" (l, r : UUID) return Boolean is
begin
return uuid_uuid_h.uuid_compare (l.data (l.data'first)'Unrestricted_Access,
r.data(r.data'first)'Unrestricted_Access) > 0;
end ">";
function "=" (l, r : UUID) return Boolean is
begin
return uuid_uuid_h.uuid_compare (l.data (l.data'first)'Unrestricted_Access,
r.data (r.data'first)'Unrestricted_Access) = 0;
end "=";
function Generate return UUID is
begin
return ret : UUID do
uuid_uuid_h.uuid_generate (ret.data (ret.data'First)'Unrestricted_Access);
end return;
end Generate;
procedure Generate (this : out UUID) is
begin
this := Generate;
end Generate;
function Generate_Random return UUID is
begin
return ret : UUID do
uuid_uuid_h.uuid_generate_random (ret.data (ret.data'First)'Unrestricted_Access);
end return;
end Generate_Random;
procedure Generate_Random (this : out UUID) is
begin
this := Generate_Random;
end;
procedure Generate_Time (this : out UUID) is
begin
this := Generate_Time;
end;
function Generate_Time return UUID is
begin
return ret : UUID do
uuid_uuid_h.uuid_generate_time (ret.data (ret.data'First)'Unrestricted_Access);
end return;
end Generate_Time;
function Is_Null (this : UUID) return Boolean is
begin
return uuid_uuid_h.uuid_is_null (this.data (this.data'First)'Unrestricted_Access) /= 0;
end Is_Null;
function Parse (data : String) return UUID is
ret : UUID;
L_Data : constant string := data & ascii.NUL;
res : int;
begin
res := uuid_uuid_h.uuid_parse (L_Data (L_Data'First)'unrestricted_access,
ret.data (ret.data'First)'unrestricted_access);
if res /= 0 then
raise PARSE_ERROR with "Unable to parse: '" & data & "'";
else
return ret;
end if;
end Parse;
function Unparse (this : UUID) return String is
ret : String (1 .. 37);
begin
uuid_uuid_h.uuid_unparse (this.data (this.data'first)'Unrestricted_access, ret (1)'unrestricted_access);
return ret (1 .. 36);
end Unparse;
function Unparse_Lower (this : UUID) return String is
ret : String (1 .. 37);
begin
uuid_uuid_h.uuid_unparse_lower (this.data (this.data'first)'Unrestricted_access, ret (1)'unrestricted_access);
return ret(1..36);
end Unparse_Lower;
function Unparse_Upper (this : UUID) return String is
ret : String (1 .. 37) ;
begin
uuid_uuid_h.uuid_unparse_upper (this.data (this.data'first)'Unrestricted_access, ret (1)'unrestricted_access);
return ret (1 .. 36);
end Unparse_Upper;
function Get_Type (this : UUID) return UUID_Type is
ret : int := uuid_uuid_h.uuid_type (this.data (this.data'first)'Unrestricted_access);
begin
case ret is
when uuid_uuid_h.UUID_TYPE_DCE_TIME =>
return DCE_TIME;
when uuid_uuid_h.UUID_TYPE_DCE_RANDOM =>
return DCE_RANDOM;
when others =>
return DCE_UNDEFINED;
end case;
end Get_Type;
function Get_Variant (this : UUID) return UUID_Variant is
begin
return UUID_Variant'Val (uuid_uuid_h.uuid_variant (this.data (this.data'first)'Unrestricted_access));
end Get_Variant;
end gnatcoll.uuid;
| 32.575107 | 116 | 0.632675 |
4d1e9f86d1e5965bc2df09bed29999143bdc7576 | 3,426 | ads | Ada | source/containers/a-cnslli.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 33 | 2015-04-04T09:19:36.000Z | 2021-11-10T05:33:34.000Z | source/containers/a-cnslli.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 8 | 2017-11-14T13:05:07.000Z | 2018-08-09T15:28:49.000Z | source/containers/a-cnslli.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 9 | 2015-02-03T17:09:53.000Z | 2021-11-12T01:16:05.000Z | pragma License (Unrestricted);
-- implementation unit
with System;
package Ada.Containers.Naked_Singly_Linked_Lists is
pragma Preelaborate;
Node_Size : constant := Standard'Address_Size;
type Node is limited private;
type Node_Access is access Node;
function Previous (Position : not null Node_Access) return Node_Access
with Convention => Intrinsic;
pragma Inline_Always (Previous);
-- traversing
procedure Reverse_Iterate (
Last : Node_Access;
Process : not null access procedure (Position : not null Node_Access));
-- liner search
function Reverse_Find (
Last : Node_Access;
Params : System.Address;
Equivalent : not null access function (
Right : not null Node_Access;
Params : System.Address)
return Boolean)
return Node_Access;
function Is_Before (Before, After : Node_Access) return Boolean;
-- comparison
function Equivalent (
Left_Last, Right_Last : Node_Access;
Equivalent : not null access function (
Left, Right : not null Node_Access)
return Boolean)
return Boolean;
-- management
procedure Free (
First : in out Node_Access;
Last : in out Node_Access;
Length : in out Count_Type;
Free : not null access procedure (Object : in out Node_Access));
procedure Insert (
First : in out Node_Access;
Last : in out Node_Access;
Length : in out Count_Type;
Before : Node_Access;
New_Item : not null Node_Access);
procedure Remove (
First : in out Node_Access;
Last : in out Node_Access;
Length : in out Count_Type;
Position : not null Node_Access;
Next : Node_Access);
procedure Split (
Target_First : out Node_Access;
Target_Last : out Node_Access;
Length : out Count_Type;
Source_First : in out Node_Access;
Source_Last : in out Node_Access;
Source_Length : in out Count_Type;
Count : Count_Type);
procedure Copy (
Target_First : out Node_Access;
Target_Last : out Node_Access;
Length : out Count_Type;
Source_Last : Node_Access;
Copy : not null access procedure (
Target : out Node_Access;
Source : not null Node_Access));
procedure Reverse_Elements (
Target_First : in out Node_Access;
Target_Last : in out Node_Access;
Length : in out Count_Type);
-- sorting
function Is_Sorted (
Last : Node_Access;
LT : not null access function (
Left, Right : not null Node_Access)
return Boolean)
return Boolean;
procedure Merge (
Target_First : in out Node_Access;
Target_Last : in out Node_Access;
Length : in out Count_Type;
Source_First : in out Node_Access;
Source_Last : in out Node_Access;
Source_Length : in out Count_Type;
LT : not null access function (
Left, Right : not null Node_Access)
return Boolean);
procedure Merge_Sort (
Target_First : in out Node_Access;
Target_Last : in out Node_Access;
Length : in out Count_Type;
LT : not null access function (
Left, Right : not null Node_Access)
return Boolean);
private
type Node is limited record
Previous : Node_Access := null;
end record;
for Node'Size use Node_Size;
end Ada.Containers.Naked_Singly_Linked_Lists;
| 27.190476 | 77 | 0.655283 |
fb6108170ee68f54bb933d78b6088335ad099f63 | 3,585 | ads | Ada | source/web/tools/a2js/webapi/webgl/webapi-webgl-framebuffers.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/web/tools/a2js/webapi/webgl/webapi-webgl-framebuffers.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/web/tools/a2js/webapi/webgl/webapi-webgl-framebuffers.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Web API Definition --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2016, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
package WebAPI.WebGL.Framebuffers is
pragma Preelaborate;
type WebGL_Framebuffer is limited interface;
type WebGL_Framebuffer_Access is access all WebGL_Framebuffer'Class
with Storage_Size => 0;
end WebAPI.WebGL.Framebuffers;
| 65.181818 | 78 | 0.410879 |
0b5e6d5c73c8cb9a4566e4f5b616d5086d1782e8 | 2,196 | ads | Ada | src/wiki-nodes-lists.ads | jquorning/ada-wiki | 21dcbeb3897499ee4b4a85353f8a782e154c0a43 | [
"Apache-2.0"
] | 18 | 2015-10-26T21:32:08.000Z | 2021-11-30T10:38:51.000Z | src/wiki-nodes-lists.ads | jquorning/ada-wiki | 21dcbeb3897499ee4b4a85353f8a782e154c0a43 | [
"Apache-2.0"
] | 2 | 2018-03-18T08:22:06.000Z | 2022-02-16T22:15:05.000Z | src/wiki-nodes-lists.ads | jquorning/ada-wiki | 21dcbeb3897499ee4b4a85353f8a782e154c0a43 | [
"Apache-2.0"
] | 2 | 2019-04-05T17:10:34.000Z | 2022-02-13T20:50:56.000Z | -----------------------------------------------------------------------
-- wiki-nodes-lists -- Wiki Document Internal representation
-- Copyright (C) 2016, 2019 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- 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.Refs;
package Wiki.Nodes.Lists is
pragma Preelaborate;
package Node_List_Refs is new Util.Refs.General_References (Node_List, Finalize);
type Node_List_Ref is new Node_List_Refs.Ref with null record;
-- Append a node to the node list.
procedure Append (Into : in out Node_List_Ref;
Node : in Node_Type_Access);
-- Iterate over the nodes of the list and call the <tt>Process</tt> procedure with
-- each node instance.
procedure Iterate (List : in Node_List_Access;
Process : not null access procedure (Node : in Node_Type));
-- Iterate over the nodes of the list and call the <tt>Process</tt> procedure with
-- each node instance.
procedure Iterate (List : in Node_List_Ref;
Process : not null access procedure (Node : in Node_Type));
-- Returns True if the list reference is empty.
function Is_Empty (List : in Node_List_Ref) return Boolean;
-- Get the number of nodes in the list.
function Length (List : in Node_List_Ref) return Natural;
private
subtype Node_List_Accessor is Node_List_Refs.Element_Accessor;
procedure Iterate (List : in Node_List_Accessor;
Process : not null access procedure (Node : in Node_Type));
end Wiki.Nodes.Lists;
| 39.214286 | 86 | 0.655282 |
508cfd308236c6d5a728c900e2995f962da0eaa0 | 1,758 | ads | Ada | ada-wide_wide_text_io-complex_io.ads | mgrojo/adalib | dc1355a5b65c2843e702ac76252addb2caf3c56b | [
"BSD-3-Clause"
] | 15 | 2018-07-08T07:09:19.000Z | 2021-11-21T09:58:55.000Z | ada-wide_wide_text_io-complex_io.ads | mgrojo/adalib | dc1355a5b65c2843e702ac76252addb2caf3c56b | [
"BSD-3-Clause"
] | 4 | 2019-11-17T20:04:33.000Z | 2021-08-29T21:24:55.000Z | ada-wide_wide_text_io-complex_io.ads | mgrojo/adalib | dc1355a5b65c2843e702ac76252addb2caf3c56b | [
"BSD-3-Clause"
] | 3 | 2020-04-23T11:17:11.000Z | 2021-08-29T19:31:09.000Z | -- Standard Ada library specification
-- Copyright (c) 2003-2018 Maxim Reznik <[email protected]>
-- 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.Numerics.Generic_Complex_Types;
generic
with package Complex_Types is
new Ada.Numerics.Generic_Complex_Types (<>);
package Ada.Wide_Wide_Text_IO.Complex_IO is
use Complex_Types;
Default_Fore : Field := 2;
Default_Aft : Field := Real'Digits - 1;
Default_Exp : Field := 3;
procedure Get (File : in File_Type;
Item : out Complex;
Width : in Field := 0);
procedure Get (Item : out Complex;
Width : in Field := 0);
procedure Put (File : in File_Type;
Item : in Complex;
Fore : in Field := Default_Fore;
Aft : in Field := Default_Aft;
Exp : in Field := Default_Exp);
procedure Put (Item : in Complex;
Fore : in Field := Default_Fore;
Aft : in Field := Default_Aft;
Exp : in Field := Default_Exp);
procedure Get (From : in Wide_Wide_String;
Item : out Complex;
Last : out Positive);
procedure Put (To : out Wide_Wide_String;
Item : in Complex;
Aft : in Field := Default_Aft;
Exp : in Field := Default_Exp);
end Ada.Wide_Wide_Text_IO.Complex_IO;
| 34.470588 | 75 | 0.552332 |
0bf7457266e4cca23eee06a39bfeb28caa23c06e | 14,379 | adb | Ada | source/amf/uml/amf-internals-uml_duration_observations.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/amf/uml/amf-internals-uml_duration_observations.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/amf/uml/amf-internals-uml_duration_observations.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- 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_Duration_Observations is
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant UML_Duration_Observation_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_Duration_Observation
(AMF.UML.Duration_Observations.UML_Duration_Observation_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant UML_Duration_Observation_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_Duration_Observation
(AMF.UML.Duration_Observations.UML_Duration_Observation_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant UML_Duration_Observation_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_Duration_Observation
(Visitor,
AMF.UML.Duration_Observations.UML_Duration_Observation_Access (Self),
Control);
end if;
end Visit_Element;
---------------
-- Get_Event --
---------------
overriding function Get_Event
(Self : not null access constant UML_Duration_Observation_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
begin
return
AMF.UML.Named_Elements.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Event
(Self.Element)));
end Get_Event;
---------------------
-- Get_First_Event --
---------------------
overriding function Get_First_Event
(Self : not null access constant UML_Duration_Observation_Proxy)
return AMF.Boolean_Collections.Set_Of_Boolean is
begin
raise Program_Error;
return Get_First_Event (Self);
end Get_First_Event;
---------------------------
-- Get_Client_Dependency --
---------------------------
overriding function Get_Client_Dependency
(Self : not null access constant UML_Duration_Observation_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_Duration_Observation_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_Duration_Observation_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_Duration_Observation_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_Duration_Observation_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;
-----------------------------------
-- Get_Owning_Template_Parameter --
-----------------------------------
overriding function Get_Owning_Template_Parameter
(Self : not null access constant UML_Duration_Observation_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
begin
return
AMF.UML.Template_Parameters.UML_Template_Parameter_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Template_Parameter
(Self.Element)));
end Get_Owning_Template_Parameter;
-----------------------------------
-- Set_Owning_Template_Parameter --
-----------------------------------
overriding procedure Set_Owning_Template_Parameter
(Self : not null access UML_Duration_Observation_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Template_Parameter
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Owning_Template_Parameter;
----------------------------
-- Get_Template_Parameter --
----------------------------
overriding function Get_Template_Parameter
(Self : not null access constant UML_Duration_Observation_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
begin
return
AMF.UML.Template_Parameters.UML_Template_Parameter_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter
(Self.Element)));
end Get_Template_Parameter;
----------------------------
-- Set_Template_Parameter --
----------------------------
overriding procedure Set_Template_Parameter
(Self : not null access UML_Duration_Observation_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Template_Parameter;
-------------------------
-- All_Owning_Packages --
-------------------------
overriding function All_Owning_Packages
(Self : not null access constant UML_Duration_Observation_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_Duration_Observation_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_Duration_Observation_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_Duration_Observation_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_Duration_Observation_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_Duration_Observation_Proxy.Namespace";
return Namespace (Self);
end Namespace;
------------------------
-- Is_Compatible_With --
------------------------
overriding function Is_Compatible_With
(Self : not null access constant UML_Duration_Observation_Proxy;
P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented");
raise Program_Error with "Unimplemented procedure UML_Duration_Observation_Proxy.Is_Compatible_With";
return Is_Compatible_With (Self, P);
end Is_Compatible_With;
---------------------------
-- Is_Template_Parameter --
---------------------------
overriding function Is_Template_Parameter
(Self : not null access constant UML_Duration_Observation_Proxy)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented");
raise Program_Error with "Unimplemented procedure UML_Duration_Observation_Proxy.Is_Template_Parameter";
return Is_Template_Parameter (Self);
end Is_Template_Parameter;
end AMF.Internals.UML_Duration_Observations;
| 41.082857 | 112 | 0.604006 |
10d3deff6cba4b0ce660c406e7f0e06478815b37 | 13,192 | adb | Ada | adm/code/src/admbase-data_io.adb | leo-brewin/adm-bssn-numerical | 9e32c201272e9a41e7535475fe381e450b99b058 | [
"MIT"
] | 1 | 2022-01-25T11:36:06.000Z | 2022-01-25T11:36:06.000Z | adm/code/src/admbase-data_io.adb | leo-brewin/adm-bssn-numerical | 9e32c201272e9a41e7535475fe381e450b99b058 | [
"MIT"
] | null | null | null | adm/code/src/admbase-data_io.adb | leo-brewin/adm-bssn-numerical | 9e32c201272e9a41e7535475fe381e450b99b058 | [
"MIT"
] | null | null | null | with Support.CmdLine; use Support.CmdLine;
with Support.Strings; use Support.Strings;
with Ada.Streams.Stream_IO;
with Ada.Directories;
package body ADMBase.Data_IO is
data_directory : String := read_command_arg ('D',"data/");
results_directory : String := read_command_arg ('O',"results/");
procedure read_data (file_name : String := "data.txt") is
use Ada.Directories;
use Ada.Streams.Stream_IO;
txt : Ada.Streams.Stream_IO.File_Type;
txt_access : Ada.Streams.Stream_IO.Stream_Access;
begin
Open (txt, In_File, data_directory & "/" & file_name);
txt_access := Stream (txt);
Real'Read (txt_access, the_time);
for i in 1..num_x loop
for j in 1..num_y loop
for k in 1..num_z loop
MetricPointArray'Read (txt_access, gab (i,j,k));
ExtcurvPointArray'Read (txt_access, Kab (i,j,k));
Real'Read (txt_access, N (i,j,k));
end loop;
end loop;
end loop;
Close (txt);
end read_data;
procedure read_grid (file_name : String := "grid.txt") is
use Ada.Directories;
use Ada.Streams.Stream_IO;
txt : Ada.Streams.Stream_IO.File_Type;
txt_access : Ada.Streams.Stream_IO.Stream_Access;
begin
Open (txt, In_File, data_directory & "/" & file_name);
txt_access := Stream (txt);
Integer'Read (txt_access, num_x); -- number of grid points along x-axis
Integer'Read (txt_access, num_y); -- number of grid points along y-axis
Integer'Read (txt_access, num_z); -- number of grid points along z-axis
Real'Read (txt_access, dx); -- grid spacing along x-axis
Real'Read (txt_access, dy); -- grid spacing along y-axis
Real'Read (txt_access, dz); -- grid spacing along z-axis
Integer'Read (txt_access, grid_point_num);
Integer'Read (txt_access, interior_num);
Integer'Read (txt_access, boundary_num);
Integer'Read (txt_access, north_bndry_num);
Integer'Read (txt_access, south_bndry_num);
Integer'Read (txt_access, east_bndry_num);
Integer'Read (txt_access, west_bndry_num);
Integer'Read (txt_access, front_bndry_num);
Integer'Read (txt_access, back_bndry_num);
for i in 1..grid_point_num loop
GridPoint'Read (txt_access, grid_point_list (i));
end loop;
for i in 1..interior_num loop
Integer'Read (txt_access, interior (i));
end loop;
for i in 1..boundary_num loop
Integer'Read (txt_access, boundary (i));
end loop;
for i in 1..north_bndry_num loop
Integer'Read (txt_access, north_bndry (i));
end loop;
for i in 1..south_bndry_num loop
Integer'Read (txt_access, south_bndry (i));
end loop;
for i in 1..east_bndry_num loop
Integer'Read (txt_access, east_bndry (i));
end loop;
for i in 1..west_bndry_num loop
Integer'Read (txt_access, west_bndry (i));
end loop;
for i in 1..front_bndry_num loop
Integer'Read (txt_access, front_bndry (i));
end loop;
for i in 1..back_bndry_num loop
Integer'Read (txt_access, back_bndry (i));
end loop;
Close (txt);
end read_grid;
procedure write_data (file_name : String := "data.txt") is
use Ada.Directories;
use Ada.Streams.Stream_IO;
txt : Ada.Streams.Stream_IO.File_Type;
txt_access : Ada.Streams.Stream_IO.Stream_Access;
begin
Create_Path (Containing_Directory(data_directory & "/" & file_name));
Create (txt, Out_File, data_directory & "/" & file_name);
txt_access := Stream (txt);
Real'Write (txt_access, the_time);
for i in 1..num_x loop
for j in 1..num_y loop
for k in 1..num_z loop
MetricPointArray'Write (txt_access, gab (i,j,k));
ExtcurvPointArray'Write (txt_access, Kab (i,j,k));
Real'Write (txt_access, N (i,j,k));
end loop;
end loop;
end loop;
Close (txt);
end write_data;
procedure write_grid (file_name : String := "grid.txt") is
use Ada.Directories;
use Ada.Streams.Stream_IO;
txt : Ada.Streams.Stream_IO.File_Type;
txt_access : Ada.Streams.Stream_IO.Stream_Access;
begin
Create_Path (Containing_Directory(data_directory & "/" & file_name));
Create (txt, Out_File, data_directory & "/" & file_name);
txt_access := Stream (txt);
Integer'Write (txt_access, num_x); -- number of grid points along x-axis
Integer'Write (txt_access, num_y); -- number of grid points along y-axis
Integer'Write (txt_access, num_z); -- number of grid points along z-axis
Real'Write (txt_access, dx); -- grid spacing along x-axis
Real'Write (txt_access, dy); -- grid spacing along y-axis
Real'Write (txt_access, dz); -- grid spacing along z-axis
Integer'write (txt_access, grid_point_num);
Integer'Write (txt_access, interior_num);
Integer'Write (txt_access, boundary_num);
Integer'Write (txt_access, north_bndry_num);
Integer'Write (txt_access, south_bndry_num);
Integer'Write (txt_access, east_bndry_num);
Integer'Write (txt_access, west_bndry_num);
Integer'Write (txt_access, front_bndry_num);
Integer'Write (txt_access, back_bndry_num);
for i in 1..grid_point_num loop
GridPoint'Write (txt_access, grid_point_list (i));
end loop;
for i in 1..interior_num loop
Integer'Write (txt_access, interior (i));
end loop;
for i in 1..boundary_num loop
Integer'Write (txt_access, boundary (i));
end loop;
for i in 1..north_bndry_num loop
Integer'Write (txt_access, north_bndry (i));
end loop;
for i in 1..south_bndry_num loop
Integer'Write (txt_access, south_bndry (i));
end loop;
for i in 1..east_bndry_num loop
Integer'Write (txt_access, east_bndry (i));
end loop;
for i in 1..west_bndry_num loop
Integer'Write (txt_access, west_bndry (i));
end loop;
for i in 1..front_bndry_num loop
Integer'Write (txt_access, front_bndry (i));
end loop;
for i in 1..back_bndry_num loop
Integer'Write (txt_access, back_bndry (i));
end loop;
Close (txt);
end write_grid;
procedure read_data_fmt (file_name : String := "data.txt") is
txt : File_Type;
begin
Open (txt, In_File, data_directory & "/" & file_name);
Get (txt, the_time); Skip_Line (txt);
for i in 1..num_x loop
for j in 1..num_y loop
for k in 1..num_z loop
for a in MetricPointArray'Range loop
Get (txt, gab (i,j,k)(a));
end loop;
Skip_line (txt);
for a in ExtcurvPointArray'Range loop
Get (txt, Kab (i,j,k)(a));
end loop;
Skip_line (txt);
Get (txt, N (i,j,k));
Skip_Line (txt);
end loop;
end loop;
end loop;
Close (txt);
end read_data_fmt;
procedure read_grid_fmt (file_name : String := "grid.txt") is
txt : File_Type;
begin
Open (txt, In_File, data_directory & "/" & file_name);
Get (txt, num_x); -- number of grid points along x-axis
Get (txt, num_y); -- number of grid points along y-axis
Get (txt, num_z); -- number of grid points along z-axis
Skip_Line (txt);
Get (txt, dx); -- grid spacing along x-axis
Get (txt, dy); -- grid spacing along y-axis
Get (txt, dz); -- grid spacing along z-axis
Skip_Line (txt);
Get (txt, grid_point_num);
Get (txt, interior_num);
Get (txt, boundary_num);
Skip_Line (txt);
Get (txt, north_bndry_num);
Get (txt, south_bndry_num);
Get (txt, east_bndry_num);
Get (txt, west_bndry_num);
Get (txt, front_bndry_num);
Get (txt, back_bndry_num);
Skip_Line (txt);
for i in 1..grid_point_num loop
Get (txt, grid_point_list (i).i);
Get (txt, grid_point_list (i).j);
Get (txt, grid_point_list (i).k);
Skip_Line (txt);
Get (txt, grid_point_list (i).x);
Get (txt, grid_point_list (i).y);
Get (txt, grid_point_list (i).z);
Skip_Line (txt);
end loop;
for i in 1..interior_num loop
Get (txt, interior (i));
Skip_Line (txt);
end loop;
for i in 1..boundary_num loop
Get (txt, boundary (i));
Skip_Line (txt);
end loop;
for i in 1..north_bndry_num loop
Get (txt, north_bndry (i));
Skip_Line (txt);
end loop;
for i in 1..south_bndry_num loop
Get (txt, south_bndry (i));
Skip_Line (txt);
end loop;
for i in 1..east_bndry_num loop
Get (txt, east_bndry (i));
Skip_Line (txt);
end loop;
for i in 1..west_bndry_num loop
Get (txt, west_bndry (i));
Skip_Line (txt);
end loop;
for i in 1..front_bndry_num loop
Get (txt, front_bndry (i));
Skip_Line (txt);
end loop;
for i in 1..back_bndry_num loop
Get (txt, back_bndry (i));
Skip_Line (txt);
end loop;
Close (txt);
end read_grid_fmt;
procedure write_data_fmt (file_name : String := "data.txt") is
txt : File_Type;
use Ada.Directories;
begin
Create_Path (Containing_Directory(data_directory & "/" & file_name));
Create (txt, Out_File, data_directory & "/" & file_name);
Put_Line (txt, str(the_time,25));
for i in 1..num_x loop
for j in 1..num_y loop
for k in 1..num_z loop
for a in MetricPointArray'Range loop
Put (txt, str (gab (i,j,k)(a),25) & spc (1));
end loop;
New_line (txt);
for a in ExtcurvPointArray'Range loop
Put (txt, str (Kab (i,j,k)(a),25) & spc (1));
end loop;
New_line (txt);
Put_Line (txt, str (N (i,j,k),25));
end loop;
end loop;
end loop;
Close (txt);
end write_data_fmt;
procedure write_grid_fmt (file_name : String := "grid.txt") is
txt : File_Type;
use Ada.Directories;
begin
Create_Path (Containing_Directory(data_directory & "/" & file_name));
Create (txt, Out_File, data_directory & "/" & file_name);
Put (txt, str (num_x) & spc (1)); -- number of grid points along x-axis
Put (txt, str (num_y) & spc (1)); -- number of grid points along y-axis
Put (txt, str (num_z)); -- number of grid points along z-axis
New_Line (txt);
Put (txt, str (dx,25) & spc (1)); -- grid spacing along x-axis
Put (txt, str (dy,25) & spc (1)); -- grid spacing along y-axis
Put (txt, str (dz,25)); -- grid spacing along z-axis
New_Line (txt);
Put (txt, str (grid_point_num) & spc (1));
Put (txt, str (interior_num) & spc (1));
Put (txt, str (boundary_num));
New_Line (txt);
Put (txt, str (north_bndry_num) & spc (1));
Put (txt, str (south_bndry_num) & spc (1));
Put (txt, str (east_bndry_num) & spc (1));
Put (txt, str (west_bndry_num) & spc (1));
Put (txt, str (front_bndry_num) & spc (1));
Put (txt, str (back_bndry_num));
New_Line (txt);
for i in 1..grid_point_num loop
Put (txt, str (grid_point_list (i).i) & spc (1));
Put (txt, str (grid_point_list (i).j) & spc (1));
Put (txt, str (grid_point_list (i).k) & spc (1));
New_Line (txt);
Put (txt, str (grid_point_list (i).x,25) & spc (1));
Put (txt, str (grid_point_list (i).y,25) & spc (1));
Put (txt, str (grid_point_list (i).z,25));
New_Line (txt);
end loop;
for i in 1..interior_num loop
Put (txt, str (interior (i)));
New_Line (txt);
end loop;
for i in 1..boundary_num loop
Put (txt, str (boundary (i)));
New_Line (txt);
end loop;
for i in 1..north_bndry_num loop
Put (txt, str (north_bndry (i)));
New_Line (txt);
end loop;
for i in 1..south_bndry_num loop
Put (txt, str (south_bndry (i)));
New_Line (txt);
end loop;
for i in 1..east_bndry_num loop
Put (txt, str (east_bndry (i)));
New_Line (txt);
end loop;
for i in 1..west_bndry_num loop
Put (txt, str (west_bndry (i)));
New_Line (txt);
end loop;
for i in 1..front_bndry_num loop
Put (txt, str (front_bndry (i)));
New_Line (txt);
end loop;
for i in 1..back_bndry_num loop
Put (txt, str (back_bndry (i)));
New_Line (txt);
end loop;
Close (txt);
end write_grid_fmt;
end ADMBase.Data_IO;
| 29.380846 | 81 | 0.575197 |
50e5ae812b1ef9d1b3a744a525a28b38376250c3 | 3,904 | ads | Ada | tools-src/gnu/gcc/gcc/ada/s-pooglo.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 80 | 2015-01-02T10:14:04.000Z | 2021-06-07T06:29:49.000Z | tools-src/gnu/gcc/gcc/ada/s-pooglo.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 9 | 2015-05-14T11:03:12.000Z | 2018-01-04T07:12:58.000Z | tools-src/gnu/gcc/gcc/ada/s-pooglo.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 69 | 2015-01-02T10:45:56.000Z | 2021-09-06T07:52:13.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . P O O L _ G L O B A L --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992,1993,1994 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;
with System.Storage_Pools;
with System.Storage_Elements;
package System.Pool_Global is
pragma Elaborate_Body;
-- Needed to ensure that library routines can execute allocators
-- Allocation strategy:
-- Call to malloc/free for each Allocate/Deallocate
-- no user specifiable size
-- no automatic reclaim
-- minimal overhead
-- Default pool in the compiler for access types globally declared
type Unbounded_No_Reclaim_Pool is new
System.Storage_Pools.Root_Storage_Pool with null record;
function Storage_Size
(Pool : Unbounded_No_Reclaim_Pool)
return System.Storage_Elements.Storage_Count;
procedure Allocate
(Pool : in out Unbounded_No_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_No_Reclaim_Pool;
Address : System.Address;
Storage_Size : System.Storage_Elements.Storage_Count;
Alignment : System.Storage_Elements.Storage_Count);
-- Pool object for the compiler
Global_Pool_Object : Unbounded_No_Reclaim_Pool;
end System.Pool_Global;
| 50.051282 | 78 | 0.501537 |
cb20cd743d43be688e077926b903e8c16a374599 | 906 | ads | Ada | regtests/regtests-statements.ads | My-Colaborations/ada-ado | cebf1f9b38c0c259c44935e8bca05a5bff12aace | [
"Apache-2.0"
] | null | null | null | regtests/regtests-statements.ads | My-Colaborations/ada-ado | cebf1f9b38c0c259c44935e8bca05a5bff12aace | [
"Apache-2.0"
] | null | null | null | regtests/regtests-statements.ads | My-Colaborations/ada-ado | cebf1f9b38c0c259c44935e8bca05a5bff12aace | [
"Apache-2.0"
] | null | null | null | -----------------------------------------------------------------------
-- regtests-statements -- Tests model
-- Copyright (C) 2015 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
package Regtests.Statements is
end Regtests.Statements;
| 41.181818 | 76 | 0.62362 |
df0fb9d69a2ffb6cdb62c223f93aa06ee47a9939 | 6,917 | adb | Ada | thirdparty/adasdl/thin/adasdl/AdaSDL_framebuff/sdltests/threadwin.adb | Lucretia/old_nehe_ada95 | d0378c3bfce202eb01bf00b57c128735dbe8582d | [
"BSD-3-Clause"
] | null | null | null | thirdparty/adasdl/thin/adasdl/AdaSDL_framebuff/sdltests/threadwin.adb | Lucretia/old_nehe_ada95 | d0378c3bfce202eb01bf00b57c128735dbe8582d | [
"BSD-3-Clause"
] | null | null | null | thirdparty/adasdl/thin/adasdl/AdaSDL_framebuff/sdltests/threadwin.adb | Lucretia/old_nehe_ada95 | d0378c3bfce202eb01bf00b57c128735dbe8582d | [
"BSD-3-Clause"
] | null | null | null |
-- ----------------------------------------------------------------- --
-- --
-- This is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the Free Software Foundation; either --
-- version 2 of the License, or (at your option) any later version. --
-- --
-- This software is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public --
-- License along with this library; if not, write to the --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-- ----------------------------------------------------------------- --
-- ----------------------------------------------------------------- --
-- This is a translation, to the Ada programming language, of the --
-- original C test files written by Sam Lantinga - www.libsdl.org --
-- translation made by Antonio F. Vargas - www.adapower.net/~avargas --
-- ----------------------------------------------------------------- --
with System.Address_To_Access_Conversions;
with Interfaces.C;
with Ada.Text_IO;
use Ada.Text_IO;
with Ada.Command_Line;
with Ada.Characters.Handling;
with GNAT.OS_Lib;
with SDL.Types; use SDL.Types;
with SDL.Video;
with SDL.Thread;
with SDL.Error;
with SDL.Quit;
with SDL.Keyboard;
with SDL.Timer;
with SDL_Framebuffer;
with ThreadWin_Sprogs;
use ThreadWin_Sprogs;
procedure ThreadWin is
package C renames Interfaces.C;
use type C.int;
use type C.size_t;
package CL renames Ada.Command_Line;
package CH renames Ada.Characters.Handling;
package V renames SDL.Video;
use type V.Surface_Flags;
use type V.Surface_ptr;
package Tr renames SDL.Thread;
use type SDL.Init_Flags;
package Er renames SDL.Error;
package Kb renames SDL.Keyboard;
package Tm renames SDL.Timer;
package Fb renames SDL_Framebuffer;
Screen_Width : constant := 640;
Screen_Height : constant := 480;
screen : V.Surface_ptr;
icon : V.Surface_ptr;
parsed : Boolean;
buffer : Fb.Framebuffer_8bPointer;
palette : V.Colors_Array (0 .. 255);
init_flags : SDL.Init_Flags;
video_bpp : Uint8;
video_flags : V.Surface_Flags;
mouse_thread : Tr.SDL_Thread_ptr;
keybd_thread : Tr.SDL_Thread_ptr;
argc : Integer := CL.Argument_Count;
argv_i : Integer := 1;
begin
-- Set the options, based on command line arguments
init_flags := SDL.INIT_VIDEO;
video_bpp := 8;
video_flags := V.SWSURFACE;
parsed := True;
while parsed loop
-- If the threaded option is enabled, and the SDL library hasn't
-- been compiled with threaded events enabled, then the mouse and
-- keyboard won't respond.
if argc >= 1 and then CL.Argument (argv_i) = "-threaded" then
init_flags := init_flags or SDL.INIT_EVENTTHREAD;
argc := argc - 1;
argv_i := argv_i + 1;
Put_Line ("Running with threaded events");
elsif argc >= 1 and then CL.Argument (argv_i) = "-fullscreen" then
video_flags := video_flags or V.FULLSCREEN;
argc := argc - 1;
argv_i := argv_i + 1;
elsif (argc >= 2) and then
(CL.Argument (argv_i) = "-bpp") and then
CH.Is_Digit (CL.Argument (argv_i + 1) (1)) then
declare
package Uint8_IO is
new Modular_IO (Uint8);
use Uint8_IO;
last : Positive;
begin
Uint8_IO.Get (CL.Argument (argv_i), video_bpp, last);
end;
argc := argc - 2;
argv_i := argv_i + 2;
else
parsed := False;
end if;
end loop;
-- Initialize SDL with the requested flags
if SDL.Init (init_flags) < 0 then
Put_Line ("Couldn't initialize SDL: " & Er.Get_Error);
GNAT.OS_Lib.OS_Exit (1);
end if;
SDL.Quit.atexit (SDL.SDL_Quit'Access);
-- Set the icon -- this must be done before the first mode set
LoadIconSurface ("icon.bmp", icon_mask, icon);
if icon /= null then
V.WM_SetIcon (icon, icon_mask.all);
-- V.WM_SetIcon (icon, null);
end if;
-- Initialize the display
screen := V.SetVideoMode (Screen_Width, Screen_Height,
C.int (video_bpp), video_flags);
if screen = null then
Put_Line ("Couldn't set " & Integer'Image (Screen_Width) &
"x" & Integer'Image (Screen_Height) &
" video mode: " & Er.Get_Error);
GNAT.OS_Lib.OS_Exit (1);
end if;
Put ("Running in ");
if (screen.flags and V.FULLSCREEN) /= 0 then
Put (" fullscreen");
else
Put (" windowed");
end if;
Put_Line (" mode");
-- Enable printable characters
Kb.EnableUNICODE (1);
-- Set an event filter that discards everything but QUIT;
Ev.SetEventFilter (FilterEvents'Access);
-- Create the event handling threads
mouse_thread := Tr.CreateThread (HandleMouse'Access, System.Null_Address);
keybd_thread := Tr.CreateThread (HandleKeyboard'Access, System.Null_Address);
-- Set the surface pixels and refresh!
for i in C.size_t range 0 .. 255 loop
palette (i) := (Uint8 (255 - i),
Uint8 (255 - i),
Uint8 (255 - i),0);
end loop;
V.SetColors (screen, palette, C.int(palette'First), palette'Length);
if V.LockSurface (screen) < 0 then
Put_Line ("Couldn't lock display surface: " & Er.Get_Error);
GNAT.OS_Lib.OS_Exit (2);
end if;
buffer := Fb.Get_Framebuffer (screen);
for i in 0 .. screen.h - 1 loop
Fb.Paint_Line_Unchecked (screen, buffer, (i * 255) / screen.h);
buffer := Fb.Next_Line_Unchecked (screen, buffer);
end loop;
V.UnlockSurface (screen);
V.UpdateRect (screen, 0, 0, 0, 0);
-- Loop, wait for QUIT
while not done loop
if (init_flags and SDL.INIT_EVENTTHREAD) = 0 then
Ev.PumpEvents; -- Need when event thread is off
end if;
if Ev.PeepEvents (null, 0, Ev.PEEKEVENT, Ev.QUITMASK) /= 0 then
done := True;
end if;
-- Give up some CPU so the events can accumulate
Tm.SDL_Delay (20);
end loop;
Tr.WaitThread (mouse_thread, null);
Tr.WaitThread (keybd_thread, null);
GNAT.OS_Lib.OS_Exit (0);
end ThreadWin;
| 34.934343 | 80 | 0.573659 |
10be36318771d760dc6ac34c85ee7c324c0365b4 | 1,504 | ads | Ada | tier-1/xcb/source/thin/xcb-xcb_render_indexvalue_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 2 | 2015-11-12T11:16:20.000Z | 2021-08-24T22:32:04.000Z | tier-1/xcb/source/thin/xcb-xcb_render_indexvalue_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 1 | 2018-06-05T05:19:35.000Z | 2021-11-20T01:13:23.000Z | tier-1/xcb/source/thin/xcb-xcb_render_indexvalue_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | null | null | null | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_render_indexvalue_t is
-- Item
--
type Item is record
pixel : aliased Interfaces.Unsigned_32;
red : aliased Interfaces.Unsigned_16;
green : aliased Interfaces.Unsigned_16;
blue : aliased Interfaces.Unsigned_16;
alpha : aliased Interfaces.Unsigned_16;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C.size_t range <>) of aliased xcb.xcb_render_indexvalue_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_render_indexvalue_t.Item,
Element_Array => xcb.xcb_render_indexvalue_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C.size_t range <>) of aliased xcb.xcb_render_indexvalue_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_render_indexvalue_t.Pointer,
Element_Array => xcb.xcb_render_indexvalue_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_render_indexvalue_t;
| 27.345455 | 76 | 0.671543 |
c55d71975139bad4f8166a96eacf73c03cf180d9 | 8,718 | adb | Ada | src/common/gimli.adb | damaki/libkeccak | d06217e525f7927380690d6c37b485bdbe8aa96e | [
"BSD-3-Clause"
] | 26 | 2015-09-20T17:52:38.000Z | 2021-07-29T21:47:04.000Z | src/common/gimli.adb | damaki/libkeccak | d06217e525f7927380690d6c37b485bdbe8aa96e | [
"BSD-3-Clause"
] | 3 | 2019-03-12T16:01:36.000Z | 2020-05-23T13:06:43.000Z | src/common/gimli.adb | damaki/libkeccak | d06217e525f7927380690d6c37b485bdbe8aa96e | [
"BSD-3-Clause"
] | 2 | 2019-04-15T18:02:19.000Z | 2020-11-22T11:22:18.000Z | -------------------------------------------------------------------------------
-- 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.
-------------------------------------------------------------------------------
package body Gimli
with SPARK_Mode => On
is
Round_Constant : constant Unsigned_32 := 16#9e37_7900#;
------------
-- Swap --
------------
procedure Swap (A, B : in out Unsigned_32)
is
Temp : Unsigned_32;
begin
Temp := A;
A := B;
B := Temp;
end Swap;
--------------
-- SP_Box --
--------------
procedure SP_Box (S : in out State)
is
X : Unsigned_32;
Y : Unsigned_32;
Z : Unsigned_32;
begin
for Column in Column_Number loop
X := Rotate_Left (S (Column, 0), 24);
Y := Rotate_Left (S (Column, 1), 9);
Z := S (Column, 2);
S (Column, 2) := X xor Shift_Left (Z, 1) xor Shift_Left (Y and Z, 2);
S (Column, 1) := Y xor X xor Shift_Left (X or Z, 1);
S (Column, 0) := Z xor Y xor Shift_Left (X and Y, 3);
end loop;
end SP_Box;
------------
-- Init --
------------
procedure Init (S : out State)
is
begin
S := (others => (others => 0));
end Init;
---------------
-- Permute --
---------------
procedure Permute (S : in out State)
is
begin
for Round in reverse Round_Number loop
SP_Box (S);
-- Small swap: pattern s...s...s... etc.
if Round mod 4 = 0 then
Swap (S (0, 0), S (1, 0));
Swap (S (2, 0), S (3, 0));
end if;
-- Big swap: pattern ..S...S...S etc.
if Round mod 4 = 2 then
Swap (S (0, 0), S (2, 0));
Swap (S (1, 0), S (3, 0));
end if;
if Round mod 4 = 0 then
S (0, 0) := S (0, 0) xor (Round_Constant or Unsigned_32 (Round));
end if;
end loop;
end Permute;
---------------------------
-- XOR_Bits_Into_State --
---------------------------
procedure XOR_Bits_Into_State (S : in out State;
Data : in Keccak.Types.Byte_Array;
Bit_Len : in Natural)
is
Remaining_Bits : Natural := Bit_Len;
Offset : Natural := 0;
begin
-- Process whole words (32 bits).
Outer_Loop :
for Row in Row_Number loop
pragma Loop_Invariant ((Offset * 8) + Remaining_Bits = Bit_Len);
pragma Loop_Invariant (Offset mod 4 = 0);
pragma Loop_Invariant (Offset = Natural (Row) * 16);
for Column in Column_Number loop
pragma Loop_Invariant ((Offset * 8) + Remaining_Bits = Bit_Len);
pragma Loop_Invariant (Offset mod 4 = 0);
pragma Loop_Invariant (Offset = (Natural (Row) * 16) +
(Natural (Column) * 4));
exit Outer_Loop when Remaining_Bits < 32;
declare
Word : Unsigned_32;
begin
Word := Unsigned_32 (Data (Data'First + Offset));
Word := Word or Shift_Left (Unsigned_32 (Data (Data'First + Offset + 1)), 8);
Word := Word or Shift_Left (Unsigned_32 (Data (Data'First + Offset + 2)), 16);
Word := Word or Shift_Left (Unsigned_32 (Data (Data'First + Offset + 3)), 24);
S (Column, Row) := S (Column, Row) xor Word;
end;
Offset := Offset + 4;
Remaining_Bits := Remaining_Bits - 32;
end loop;
end loop Outer_Loop;
-- Process any remaining data
if Remaining_Bits > 0 then
declare
Column : constant Column_Number := Column_Number ((Bit_Len / 32) mod 4);
Row : constant Row_Number := Row_Number (Bit_Len / 128);
Word : Unsigned_32 := 0;
Remaining_Bytes : constant Natural := (Remaining_Bits + 7) / 8;
begin
for I in Natural range 0 .. Remaining_Bytes - 1 loop
Word := Word or Shift_Left (Unsigned_32 (Data (Data'First + Offset + I)), I * 8);
end loop;
S (Column, Row) := S (Column, Row) xor (Word and (2**Remaining_Bits) - 1);
end;
end if;
end XOR_Bits_Into_State;
--------------------
-- Extract_Bits --
--------------------
procedure Extract_Bytes (S : in State;
Data : out Keccak.Types.Byte_Array)
is
Remaining : Natural := Data'Length;
Offset : Natural := 0;
Pos : Keccak.Types.Index_Number;
begin
-- Process whole words (32 bits).
Outer_Loop :
for Row in Row_Number loop
pragma Loop_Invariant (Offset + Remaining = Data'Length);
pragma Loop_Invariant (Offset mod 4 = 0);
pragma Loop_Invariant (Offset = Natural (Row) * 16);
for Column in Column_Number loop
pragma Loop_Invariant (Offset + Remaining = Data'Length);
pragma Loop_Invariant (Offset mod 4 = 0);
pragma Loop_Invariant (Offset = (Natural (Row) * 16) +
(Natural (Column) * 4));
exit Outer_Loop when Remaining < 4;
declare
Word : constant Unsigned_32 := S (Column, Row);
begin
Pos := Data'First + Offset;
Data (Pos) := Unsigned_8 (Word and 16#FF#);
Data (Pos + 1) := Unsigned_8 (Shift_Right (Word, 8) and 16#FF#);
Data (Pos + 2) := Unsigned_8 (Shift_Right (Word, 16) and 16#FF#);
Data (Pos + 3) := Unsigned_8 (Shift_Right (Word, 24) and 16#FF#);
end;
Offset := Offset + 4;
Remaining := Remaining - 4;
end loop;
end loop Outer_Loop;
pragma Assert (Remaining < 4);
-- Process any remaining data
if Remaining > 0 then
declare
Column : constant Column_Number := Column_Number ((Offset / 4) mod 4);
Row : constant Row_Number := Row_Number (Offset / 16);
Word : constant Unsigned_32 := S (Column, Row);
begin
for I in Natural range 0 .. Remaining - 1 loop
pragma Loop_Invariant (Offset + (Remaining - I) = Data'Length);
Data (Data'First + Offset) := Unsigned_8 (Shift_Right (Word, I * 8) and 16#FF#);
Offset := Offset + 1;
end loop;
end;
end if;
end Extract_Bytes;
--------------------
-- Extract_Bits --
--------------------
procedure Extract_Bits (A : in State;
Data : out Keccak.Types.Byte_Array;
Bit_Len : in Natural)
is
begin
Extract_Bytes (A, Data);
-- Avoid exposing more bits than requested by masking away higher bits
-- in the last byte.
if Bit_Len > 0 and Bit_Len mod 8 /= 0 then
Data (Data'Last) := Data (Data'Last) and (2**(Bit_Len mod 8) - 1);
end if;
end Extract_Bits;
end Gimli;
| 34.188235 | 96 | 0.524088 |
4d4eeedd06732ffc531ea75908e2043d20a156d2 | 905 | ads | Ada | tier-1/gmp/source/thin/gmp_c-a_a_mpz_struct.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 2 | 2015-11-12T11:16:20.000Z | 2021-08-24T22:32:04.000Z | tier-1/gmp/source/thin/gmp_c-a_a_mpz_struct.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 1 | 2018-06-05T05:19:35.000Z | 2021-11-20T01:13:23.000Z | tier-1/gmp/source/thin/gmp_c-a_a_mpz_struct.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | null | null | null | -- This file is generated by SWIG. Please do *not* modify by hand.
--
with Interfaces.C;
with Interfaces.C;
package gmp_c.a_a_mpz_struct is
-- Item
--
type Item is record
a_mp_alloc : aliased Interfaces.C.int;
a_mp_size : aliased Interfaces.C.int;
a_mp_d : access gmp_c.mp_limb_t;
end record;
-- Items
--
type Items is
array (Interfaces.C.size_t range <>) of aliased gmp_c.a_a_mpz_struct.Item;
-- Pointer
--
type Pointer is access all gmp_c.a_a_mpz_struct.Item;
-- Pointers
--
type Pointers is
array
(Interfaces.C.size_t range <>) of aliased gmp_c.a_a_mpz_struct.Pointer;
-- Pointer_Pointer
--
type Pointer_Pointer is access all gmp_c.a_a_mpz_struct.Pointer;
function construct return gmp_c.a_a_mpz_struct.Item;
private
pragma Import (C, construct, "Ada_new___mpz_struct");
end gmp_c.a_a_mpz_struct;
| 21.046512 | 79 | 0.686188 |
fbcbf8d90516d7722841ad86780c9a9c9655d9e4 | 3,826 | ads | Ada | example_relationships/src/generic_list.ads | cortlandstarrett/mcada | d1a7a818f91459d53bd5b9354bc7d78e2c5d4518 | [
"Apache-2.0"
] | null | null | null | example_relationships/src/generic_list.ads | cortlandstarrett/mcada | d1a7a818f91459d53bd5b9354bc7d78e2c5d4518 | [
"Apache-2.0"
] | null | null | null | example_relationships/src/generic_list.ads | cortlandstarrett/mcada | d1a7a818f91459d53bd5b9354bc7d78e2c5d4518 | [
"Apache-2.0"
] | 1 | 2021-06-08T19:44:04.000Z | 2021-06-08T19:44:04.000Z | with Application_Types;
generic
type Element_Type is private;
package Generic_List is
type Node_Type;
type Node_Access_Type is access Node_Type;
type Node_Type is
record
Item : Element_Type;
Next : Node_Access_Type;
end record;
--
-- The node is the basic element of the list.
-- Component 'Item' is the 'useful' information and component 'Next' maintains the list
-- structure
--
--
-- The List_Header_Type is the entry element into the list. A number of the components are made
-- visible for diagnostic purposes and care should be taken when using them
--
type List_Header_Type is
record
Count : Application_Types.Base_Integer_Type := 0;
Max_Count : Application_Types.Base_Integer_Type := 0;
First_Entry : Node_Access_Type := null;
Stepping_Pointer : Node_Access_Type := null;
Free_List_Count : Application_Types.Base_Integer_Type := 0;
Free_List : Node_Access_Type := null;
end record;
type List_Header_Access_Type is access List_Header_Type;
--
-- The access type to the header is the most commonly-met item
--
---------------------------------------------------------------
--
function Initialise return List_Header_Access_Type;
--
-- Initialise must be done before any accesses are attempted on the list.
-- A sign that it has been missed is Constraint_Error/Access_Error
--
procedure Insert (New_Item : in Element_Type;
On_To : in List_Header_Access_Type );
procedure Delete (Item : in Node_Access_Type;
From : in out List_Header_Access_Type);
--
-- Insert and delete act on single items. Note that the 'item' parameter
-- is different in the two cases
--
-- PILOT_0000_0452 Add additional operation to remove entries without destroying list.
--
procedure Clear (From : in out List_Header_Access_Type);
--
-- Clear will remove all item entries from the list, but new items can be added as the list structure
-- will not be destroyed.
--
function Count_Of (Target_List : List_Header_Access_Type) return Application_Types.Base_Integer_Type;
--
-- Count_Of returns the number of items on the list.
--
function Max_Count_Of (Target_List : List_Header_Access_Type) return Application_Types.Base_Integer_Type;
--
-- Max_Count_Of returns the maximum number of items on the list jusqu'ici.
--
function First_Entry_Of (Target_List : List_Header_Access_Type) return Node_Access_Type;
function Next_Entry_Of (Target_List : List_Header_Access_Type) return Node_Access_Type;
--
-- These enable iteration over the list. First_Entry_Of always sets the pointer to the start,
-- and Next_Entry_Of always steps just one on. Note that these operations share a temporary
-- pointer with the Free list iterators below, and therefore should never be intermingled.
--
procedure Destroy_List (Target_List : in out List_Header_Access_Type);
--
-- This operation wipes out and deallocates the memory space of the items and the list
-- header. There is no way back after this one.
--
---------------------------------------------------------------------
function First_Entry_Of_Free_List (Target_List : List_Header_Access_Type) return Node_Access_Type;
function Next_Entry_Of_Free_List (Target_List : List_Header_Access_Type) return Node_Access_Type;
--
-- These enable iteration over the free list. They are the analogues of the list iterators above.
-- As noted, they must not be intermingled, but as these are essentially for diagnostic
-- purposes, this should not be a problem.
--
function Count_Of_Free_List (Target_List : List_Header_Access_Type) return Application_Types.Base_Integer_Type;
---------------------------------------------------------------------
--
List_Underflow_Error,
List_Storage_Error,
List_Access_Error: exception;
end Generic_List;
| 39.443299 | 113 | 0.717721 |
0b8f77eeef92bfd4d879c3aca1b91407f48dc0fd | 2,750 | ads | Ada | src/asf-views.ads | jquorning/ada-asf | ddc697c5dfa4e22c57c6958f4cff27e14d02ce98 | [
"Apache-2.0"
] | 12 | 2015-01-18T23:02:20.000Z | 2022-03-25T15:30:30.000Z | src/asf-views.ads | jquorning/ada-asf | ddc697c5dfa4e22c57c6958f4cff27e14d02ce98 | [
"Apache-2.0"
] | 3 | 2021-01-06T09:44:02.000Z | 2022-02-04T20:20:53.000Z | src/asf-views.ads | jquorning/ada-asf | ddc697c5dfa4e22c57c6958f4cff27e14d02ce98 | [
"Apache-2.0"
] | 4 | 2016-04-12T05:29:00.000Z | 2022-01-24T23:53:59.000Z | -----------------------------------------------------------------------
-- asf-views -- Views
-- Copyright (C) 2009, 2010, 2011, 2012, 2013 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- 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.
-----------------------------------------------------------------------
-- The <b>ASF.Views</b> package defines the abstractions to represent
-- an XHTML view that can be instantiated to create the JSF component
-- tree. The <b>ASF.Views</b> are read only once and they are shared
-- by the JSF component trees that are instantiated from it.
--
-- The XHTML view is read using a SAX parser which creates nodes
-- and attributes to represent the view.
--
-- The <b>ASF.Views</b> is composed of nodes represented by <b>Tag_Node</b>
-- and attributes represented by <b>Tag_Attribute</b>. In a sense, this
-- is very close to an XML DOM tree.
package ASF.Views is
pragma Preelaborate;
-- ------------------------------
-- Source line information
-- ------------------------------
type File_Info (<>) is limited private;
type File_Info_Access is access all File_Info;
-- Create a <b>File_Info</b> record to identify the file whose path is <b>Path</b>
-- and whose relative path portion starts at <b>Relative_Position</b>.
function Create_File_Info (Path : in String;
Relative_Position : in Natural) return File_Info_Access;
-- Get the relative path name
function Relative_Path (File : in File_Info) return String;
type Line_Info is private;
-- Get the line number
function Line (Info : in Line_Info) return Natural;
pragma Inline (Line);
-- Get the source file
function File (Info : in Line_Info) return String;
pragma Inline (File);
private
type File_Info (Length : Natural) is limited record
Relative_Pos : Natural;
Path : String (1 .. Length);
end record;
NO_FILE : aliased File_Info := File_Info '(Length => 0, Path => "", Relative_Pos => 0);
type Line_Info is record
Line : Natural := 0;
Column : Natural := 0;
File : File_Info_Access := NO_FILE'Access;
end record;
end ASF.Views;
| 37.671233 | 90 | 0.632 |
4d39cfe1b831914a6a2c9bbff350407f3866007f | 14,318 | adb | Ada | bb-runtimes/src/s-bbbosu__m1agl.adb | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/src/s-bbbosu__m1agl.adb | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/src/s-bbbosu__m1agl.adb | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . B B . B O A R D _ S U P P O R T --
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2002 Universidad Politecnica de Madrid --
-- Copyright (C) 2003-2005 The European Space Agency --
-- Copyright (C) 2003-2018, 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. --
-- --
-- The port of GNARL to bare board targets was initially developed by the --
-- Real-Time Systems Group at the Technical University of Madrid. --
-- --
------------------------------------------------------------------------------
with System.Machine_Code;
with System.BB.Board_Parameters;
with System.BB.CPU_Primitives;
with Interfaces;
with Interfaces.M1AGL.CoreTimer; use Interfaces.M1AGL.CoreTimer;
with Interfaces.M1AGL.CoreInterrupt; use Interfaces.M1AGL.CoreInterrupt;
with Interfaces.M1AGL;
package body System.BB.Board_Support is
use CPU_Primitives, BB.Interrupts, Machine_Code, Time, Interfaces;
Interrupt_Request_Vector : constant Vector_Id := 16;
-- See vector definitions in ARMv6-M version of System.BB.CPU_Primitives.
-- Defined by ARMv6-M specifications.
----------------------------------------------
-- New Vectored Interrupt Controller (NVIC) --
----------------------------------------------
NVIC_Base : constant := 16#E000_E000#;
-- Nested Vectored Interrupt Controller (NVIC) base.
NVIC_ISER : Word with Volatile, Address => NVIC_Base + 16#100#;
-- Writing a bit mask to this register enables the corresponding interrupts
Alarm_Time : Time.Timer_Interval;
pragma Volatile (Alarm_Time);
pragma Export (C, Alarm_Time, "__gnat_alarm_time");
Alarm_Interrupt_ID : constant Interrupt_ID := 2;
-- Return the interrupt level to use for the alarm clock handler.
----------------------------
-- Test and set intrinsic --
----------------------------
-- The run-time package System.Multiprocessors.Spin_Locks is based on the
-- implementation of test and set intrinsic. The Cortex-M1 architecture
-- does not implement the machine instructions LDREX/STREX so these
-- intrinsic functions are not available. This is only a problem at link
-- time since the Spin_Locks are only used in multi-processor systems,
-- which is not the case here.
--
-- To workaround the linker error, we export here the required intrinsic
-- functions. As explained above, they should never be executed so the body
-- of the functions only raises an Program_Error.
function Lock_Test_And_Set
(Ptr : access Unsigned_8;
Value : Unsigned_8)
return Unsigned_8;
pragma Export (C, Lock_Test_And_Set, "__sync_lock_test_and_set_1");
procedure Lock_Release (Ptr : access Unsigned_8);
pragma Export (C, Lock_Release, "__sync_lock_release");
-----------------------
-- Lock_Test_And_Set --
-----------------------
function Lock_Test_And_Set
(Ptr : access Unsigned_8;
Value : Unsigned_8)
return Unsigned_8
is
begin
raise Program_Error;
return 0;
end Lock_Test_And_Set;
------------------
-- Lock_Release --
------------------
procedure Lock_Release (Ptr : access Unsigned_8) is
begin
raise Program_Error;
end Lock_Release;
--------------------
-- Timer Handling --
--------------------
-- We use the Microsemi CoreTime as a periodic timer with 1 kHz rate. This
-- is a trade-off between accurate delays, limited overhead and maximum
-- time that interrupts may be disabled.
Tick_Period : constant Time.Timer_Interval :=
System.BB.Board_Parameters.Timer_Frequency / 1000;
RVR_Last : constant := 2**24 - 1;
pragma Assert (Tick_Period <= RVR_Last + 1);
Next_Tick_Time : Timer_Interval with Volatile;
-- Time when systick will expire. This gives the high digits of the time
procedure Interrupt_Handler;
----------------------
-- Initialize_Board --
----------------------
procedure Initialize_Board is
begin
-- Mask interrupts
Disable_Interrupts;
-- Time --
-- Configure CoreTimer
CoreTimer_Periph.Control.Enable := False;
CoreTimer_Periph.Control.Interrupt_Enable := True;
CoreTimer_Periph.Control.Timer_Mode := Continuous;
CoreTimer_Periph.Prescale.Value := Divide_By_2;
CoreTimer_Periph.Load_Value :=
Interfaces.M1AGL.UInt32 (Tick_Period - 1);
-- We do not enable the timer until the handler is ready to receive the
-- interrupt, i.e. in Install_Alarm_Handler.
Next_Tick_Time := Tick_Period;
Time.Set_Alarm (Timer_Interval'Last);
Time.Clear_Alarm_Interrupt;
-- Interrupts --
Install_Trap_Handler
(Interrupt_Handler'Address, Interrupt_Request_Vector);
-- On the Microsemi Cortex-M1 only one IRQ line of the NVIC is used, the
-- real interrupt handling is done by another device: CoreInterrupt. So
-- on the NVIC, we always enable the IRQ corresponding to
-- Core_Interrupt.
NVIC_ISER := 1;
end Initialize_Board;
package body Time is
Upper_Alarm_Handler : BB.Interrupts.Interrupt_Handler := null;
procedure Pre_Alarm_Handler (Id : Interrupt_ID);
-----------------------
-- Pre_Alarm_Handler --
-----------------------
procedure Pre_Alarm_Handler (Id : Interrupt_ID) is
begin
-- Next_Tick_Time is usually updated in Read_Clock, but we can't do
-- that for CoreTimer because there's no way to know if we are
-- We need to update the Next_Tick_Time before calling the s.bb.time
-- alarm handler executes because it expects
Next_Tick_Time := Next_Tick_Time + Tick_Period;
pragma Assert (Upper_Alarm_Handler /= null);
Upper_Alarm_Handler (Id);
end Pre_Alarm_Handler;
------------------------
-- Max_Timer_Interval --
------------------------
function Max_Timer_Interval return Timer_Interval is (2**32 - 1);
----------------
-- Read_Clock --
----------------
function Read_Clock return BB.Time.Time is
PRIMASK : Word;
Flag : Boolean;
Count : Timer_Interval;
Res : Timer_Interval;
begin
-- As several registers and variables need to be read or modified, do
-- it atomically.
Asm ("mrs %0, PRIMASK",
Outputs => Word'Asm_Output ("=&r", PRIMASK),
Volatile => True);
Asm ("msr PRIMASK, %0",
Inputs => Word'Asm_Input ("r", 1),
Volatile => True);
-- We must read the counter register before the flag
Count := Timer_Interval (CoreTimer_Periph.Current_Value);
-- If we read the flag first, a reload can occur just after the read
-- and the count register would wrap around. We'd end up with a Count
-- value close to the Tick_Period value but a flag at zero and
-- therefore miss the reload and return a wrong clock value.
-- This flag is set when the counter has reached zero. Next_Tick_Time
-- has to be incremented. This will trigger an interrupt very soon
-- (or has just triggered the interrupt), so count is either zero or
-- not far from Tick_Period.
Flag := CoreTimer_Periph.Raw_Interrupt_Status.Pending;
if Flag then
-- CoreTimer counter has just reached zero, pretend it is still
-- zero.
Res := Next_Tick_Time;
-- The following is not applicable to CoreTimer, so we increase
-- Next_Tick_Time in the alarm handler (see below):
-- Note that reading the Control and Status
-- register (SYST_CSR) clears the COUNTFLAG bit, so even if we
-- have sequential calls to this function, the increment of
-- Next_Tick_Time will happen only once.
-- Next_Tick_Time := Next_Tick_Time + Tick_Period;
else
-- The counter is decremented, so compute the actual time
Res := Next_Tick_Time - Count;
end if;
-- Restore interrupt mask
Asm ("msr PRIMASK, %0",
Inputs => Word'Asm_Input ("r", PRIMASK),
Volatile => True);
return BB.Time.Time (Res);
end Read_Clock;
---------------------------
-- Clear_Alarm_Interrupt --
---------------------------
procedure Clear_Alarm_Interrupt is
begin
-- Any write to this register will clear the interrupt
CoreTimer_Periph.Interrupt_Clear := 42;
end Clear_Alarm_Interrupt;
---------------
-- Set_Alarm --
---------------
procedure Set_Alarm (Ticks : Timer_Interval) is
Now : constant Timer_Interval := Timer_Interval (Read_Clock);
begin
Alarm_Time :=
Now + Timer_Interval'Min (Timer_Interval'Last / 2, Ticks);
-- As we will have periodic interrupts for alarms regardless, the
-- only thing to do is force an interrupt if the alarm has already
-- expired.
-- NOTE: We can't do this with the CoreTimer
end Set_Alarm;
---------------------------
-- Install_Alarm_Handler --
---------------------------
procedure Install_Alarm_Handler
(Handler : BB.Interrupts.Interrupt_Handler) is
begin
pragma Assert (Upper_Alarm_Handler = null);
Upper_Alarm_Handler := Handler;
BB.Interrupts.Attach_Handler
(Pre_Alarm_Handler'Access,
Alarm_Interrupt_ID,
Interrupt_Priority'Last);
-- Now we are ready to handle the CoreTimer interrupt
CoreTimer_Periph.Control.Enable := True;
end Install_Alarm_Handler;
end Time;
package body Multiprocessors is separate;
-----------------------
-- Interrupt_Handler --
-----------------------
procedure Interrupt_Handler is
Status : constant IRQ_Status_IRQ_Field_Array :=
CoreInterrupt_Periph.IRQ_Status.IRQ.Arr;
begin
-- For each interrupt
for Index in Status'Range loop
-- Check if the interrupt is flagged
if Status (Index) then
-- Call the wrapper
Interrupt_Wrapper (Index);
end if;
end loop;
end Interrupt_Handler;
package body Interrupts is
procedure Enable_Interrupt_Request
(Interrupt : Interrupt_ID;
Prio : Interrupt_Priority);
-- Enable interrupt requests for the given interrupt
------------------------------
-- Enable_Interrupt_Request --
------------------------------
procedure Enable_Interrupt_Request
(Interrupt : Interrupt_ID;
Prio : Interrupt_Priority)
is
pragma Unreferenced (Prio);
begin
CoreInterrupt_Periph.IRQ_Enable.IRQ.Arr (Interrupt) := True;
end Enable_Interrupt_Request;
-------------------------------
-- Install_Interrupt_Handler --
-------------------------------
procedure Install_Interrupt_Handler
(Interrupt : Interrupt_ID;
Prio : Interrupt_Priority)
is
begin
Enable_Interrupt_Request (Interrupt, Prio);
end Install_Interrupt_Handler;
---------------------------
-- Priority_Of_Interrupt --
---------------------------
function Priority_Of_Interrupt
(Interrupt : Interrupt_ID) return Any_Priority
is (Interrupt_Priority'Last);
----------------
-- Power_Down --
----------------
procedure Power_Down is
begin
Asm ("wfi", Volatile => True);
end Power_Down;
--------------------------
-- Set_Current_Priority --
--------------------------
procedure Set_Current_Priority (Priority : Integer) is
begin
-- There's no interrupt priority support on this platform
null;
end Set_Current_Priority;
end Interrupts;
end System.BB.Board_Support;
| 35.093137 | 79 | 0.55315 |
50e6f33d254007e2d42fc6508cada7af191f145d | 4,483 | adb | Ada | tools-src/gnu/gcc/gcc/ada/sem_ch2.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 80 | 2015-01-02T10:14:04.000Z | 2021-06-07T06:29:49.000Z | tools-src/gnu/gcc/gcc/ada/sem_ch2.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 9 | 2015-05-14T11:03:12.000Z | 2018-01-04T07:12:58.000Z | tools-src/gnu/gcc/gcc/ada/sem_ch2.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 69 | 2015-01-02T10:45:56.000Z | 2021-09-06T07:52:13.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ C H 2 --
-- --
-- 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; use Atree;
with Opt; use Opt;
with Restrict; use Restrict;
with Sem_Ch8; use Sem_Ch8;
with Sinfo; use Sinfo;
with Stand; use Stand;
package body Sem_Ch2 is
-------------------------------
-- Analyze_Character_Literal --
-------------------------------
procedure Analyze_Character_Literal (N : Node_Id) is
begin
-- The type is eventually inherited from the context. If expansion
-- has already established the proper type, do not modify it.
if No (Etype (N)) then
Set_Etype (N, Any_Character);
end if;
Set_Is_Static_Expression (N);
if Comes_From_Source (N)
and then not In_Character_Range (Char_Literal_Value (N))
then
Check_Restriction (No_Wide_Characters, N);
end if;
end Analyze_Character_Literal;
------------------------
-- Analyze_Identifier --
------------------------
procedure Analyze_Identifier (N : Node_Id) is
begin
Find_Direct_Name (N);
end Analyze_Identifier;
-----------------------------
-- Analyze_Integer_Literal --
-----------------------------
procedure Analyze_Integer_Literal (N : Node_Id) is
begin
Set_Etype (N, Universal_Integer);
Set_Is_Static_Expression (N);
end Analyze_Integer_Literal;
--------------------------
-- Analyze_Real_Literal --
--------------------------
procedure Analyze_Real_Literal (N : Node_Id) is
begin
Set_Etype (N, Universal_Real);
Set_Is_Static_Expression (N);
end Analyze_Real_Literal;
----------------------------
-- Analyze_String_Literal --
----------------------------
procedure Analyze_String_Literal (N : Node_Id) is
begin
-- The type is eventually inherited from the context. If expansion
-- has already established the proper type, do not modify it.
if No (Etype (N)) then
Set_Etype (N, Any_String);
end if;
-- String literals are static in Ada 95. Note that if the subtype
-- turns out to be non-static, then the Is_Static_Expression flag
-- will be reset in Eval_String_Literal.
if Ada_95 then
Set_Is_Static_Expression (N);
end if;
if Comes_From_Source (N) and then Has_Wide_Character (N) then
Check_Restriction (No_Wide_Characters, N);
end if;
end Analyze_String_Literal;
end Sem_Ch2;
| 37.991525 | 78 | 0.472675 |
230be5f89a71ebcea4436a957f0cd6888d6bc06c | 3,425 | ads | Ada | bb-runtimes/runtimes/zfp-stm32f3x4/gnat/s-imageu.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/runtimes/zfp-stm32f3x4/gnat/s-imageu.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/runtimes/zfp-stm32f3x4/gnat/s-imageu.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I M A G E _ U --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- This package contains the routines for supporting the Image attribute for
-- modular integer types, and also for conversion operations required in
-- Text_IO.Modular_IO for such types.
generic
type Uns is mod <>;
package System.Image_U is
pragma Pure;
procedure Image_Unsigned
(V : Uns;
S : in out String;
P : out Natural);
pragma Inline (Image_Unsigned);
-- Computes Uns'Image (V) and stores the result in S (1 .. P) setting
-- the resulting value of P. The caller guarantees that S is long enough to
-- hold the result, and that S'First is 1.
procedure Set_Image_Unsigned
(V : Uns;
S : in out String;
P : in out Natural);
-- Stores the image of V in S starting at S (P + 1), P is updated to point
-- to the last character stored. The value stored is identical to the value
-- of Uns'Image (V) except that no leading space is stored. The caller
-- guarantees that S is long enough to hold the result. S need not have a
-- lower bound of 1.
end System.Image_U;
| 54.365079 | 79 | 0.411971 |
0b59221c1494995a0774b839bac0c3a5cbe9e97a | 178 | adb | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/return4_pkg.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/return4_pkg.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/return4_pkg.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | package body Return4_Pkg is
function Get_Value (I : Integer) return Rec is
Value : Rec := (I1 => I, I2 => I, I3 => I);
begin
return Value;
end;
end Return4_Pkg;
| 17.8 | 48 | 0.617978 |
0ba45981558a91a63779228281ac408c14e23340 | 50,229 | adb | Ada | gcc-gcc-7_3_0-release/gcc/ada/sem_aux.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/ada/sem_aux.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/ada/sem_aux.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ A U X --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- 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 Atree; use Atree;
with Einfo; use Einfo;
with Snames; use Snames;
with Stand; use Stand;
with Uintp; use Uintp;
package body Sem_Aux is
----------------------
-- Ancestor_Subtype --
----------------------
function Ancestor_Subtype (Typ : Entity_Id) return Entity_Id is
begin
-- If this is first subtype, or is a base type, then there is no
-- ancestor subtype, so we return Empty to indicate this fact.
if Is_First_Subtype (Typ) or else Is_Base_Type (Typ) then
return Empty;
end if;
declare
D : constant Node_Id := Declaration_Node (Typ);
begin
-- If we have a subtype declaration, get the ancestor subtype
if Nkind (D) = N_Subtype_Declaration then
if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
return Entity (Subtype_Mark (Subtype_Indication (D)));
else
return Entity (Subtype_Indication (D));
end if;
-- If not, then no subtype indication is available
else
return Empty;
end if;
end;
end Ancestor_Subtype;
--------------------
-- Available_View --
--------------------
function Available_View (Ent : Entity_Id) return Entity_Id is
begin
-- Obtain the non-limited view (if available)
if Has_Non_Limited_View (Ent) then
return Get_Full_View (Non_Limited_View (Ent));
-- In all other cases, return entity unchanged
else
return Ent;
end if;
end Available_View;
--------------------
-- Constant_Value --
--------------------
function Constant_Value (Ent : Entity_Id) return Node_Id is
D : constant Node_Id := Declaration_Node (Ent);
Full_D : Node_Id;
begin
-- If we have no declaration node, then return no constant value. Not
-- clear how this can happen, but it does sometimes and this is the
-- safest approach.
if No (D) then
return Empty;
-- Normal case where a declaration node is present
elsif Nkind (D) = N_Object_Renaming_Declaration then
return Renamed_Object (Ent);
-- If this is a component declaration whose entity is a constant, it is
-- a prival within a protected function (and so has no constant value).
elsif Nkind (D) = N_Component_Declaration then
return Empty;
-- If there is an expression, return it
elsif Present (Expression (D)) then
return Expression (D);
-- For a constant, see if we have a full view
elsif Ekind (Ent) = E_Constant
and then Present (Full_View (Ent))
then
Full_D := Parent (Full_View (Ent));
-- The full view may have been rewritten as an object renaming
if Nkind (Full_D) = N_Object_Renaming_Declaration then
return Name (Full_D);
else
return Expression (Full_D);
end if;
-- Otherwise we have no expression to return
else
return Empty;
end if;
end Constant_Value;
---------------------------------
-- Corresponding_Unsigned_Type --
---------------------------------
function Corresponding_Unsigned_Type (Typ : Entity_Id) return Entity_Id is
pragma Assert (Is_Signed_Integer_Type (Typ));
Siz : constant Uint := Esize (Base_Type (Typ));
begin
if Siz = Esize (Standard_Short_Short_Integer) then
return Standard_Short_Short_Unsigned;
elsif Siz = Esize (Standard_Short_Integer) then
return Standard_Short_Unsigned;
elsif Siz = Esize (Standard_Unsigned) then
return Standard_Unsigned;
elsif Siz = Esize (Standard_Long_Integer) then
return Standard_Long_Unsigned;
elsif Siz = Esize (Standard_Long_Long_Integer) then
return Standard_Long_Long_Unsigned;
else
raise Program_Error;
end if;
end Corresponding_Unsigned_Type;
-----------------------------
-- Enclosing_Dynamic_Scope --
-----------------------------
function Enclosing_Dynamic_Scope (Ent : Entity_Id) return Entity_Id is
S : Entity_Id;
begin
-- The following test is an error defense against some syntax errors
-- that can leave scopes very messed up.
if Ent = Standard_Standard then
return Ent;
end if;
-- Normal case, search enclosing scopes
-- Note: the test for Present (S) should not be required, it defends
-- against an ill-formed tree.
S := Scope (Ent);
loop
-- If we somehow got an empty value for Scope, the tree must be
-- malformed. Rather than blow up we return Standard in this case.
if No (S) then
return Standard_Standard;
-- Quit if we get to standard or a dynamic scope. We must also
-- handle enclosing scopes that have a full view; required to
-- locate enclosing scopes that are synchronized private types
-- whose full view is a task type.
elsif S = Standard_Standard
or else Is_Dynamic_Scope (S)
or else (Is_Private_Type (S)
and then Present (Full_View (S))
and then Is_Dynamic_Scope (Full_View (S)))
then
return S;
-- Otherwise keep climbing
else
S := Scope (S);
end if;
end loop;
end Enclosing_Dynamic_Scope;
------------------------
-- First_Discriminant --
------------------------
function First_Discriminant (Typ : Entity_Id) return Entity_Id is
Ent : Entity_Id;
begin
pragma Assert
(Has_Discriminants (Typ) or else Has_Unknown_Discriminants (Typ));
Ent := First_Entity (Typ);
-- The discriminants are not necessarily contiguous, because access
-- discriminants will generate itypes. They are not the first entities
-- either because the tag must be ahead of them.
if Chars (Ent) = Name_uTag then
Ent := Next_Entity (Ent);
end if;
-- Skip all hidden stored discriminants if any
while Present (Ent) loop
exit when Ekind (Ent) = E_Discriminant
and then not Is_Completely_Hidden (Ent);
Ent := Next_Entity (Ent);
end loop;
-- Call may be on a private type with unknown discriminants, in which
-- case Ent is Empty, and as per the spec, we return Empty in this case.
-- Historical note: The assertion in previous versions that Ent is a
-- discriminant was overly cautious and prevented convenient application
-- of this function in the gnatprove context.
return Ent;
end First_Discriminant;
-------------------------------
-- First_Stored_Discriminant --
-------------------------------
function First_Stored_Discriminant (Typ : Entity_Id) return Entity_Id is
Ent : Entity_Id;
function Has_Completely_Hidden_Discriminant
(Typ : Entity_Id) return Boolean;
-- Scans the Discriminants to see whether any are Completely_Hidden
-- (the mechanism for describing non-specified stored discriminants)
-- Note that the entity list for the type may contain anonymous access
-- types created by expressions that constrain access discriminants.
----------------------------------------
-- Has_Completely_Hidden_Discriminant --
----------------------------------------
function Has_Completely_Hidden_Discriminant
(Typ : Entity_Id) return Boolean
is
Ent : Entity_Id;
begin
pragma Assert (Ekind (Typ) = E_Discriminant);
Ent := Typ;
while Present (Ent) loop
-- Skip anonymous types that may be created by expressions
-- used as discriminant constraints on inherited discriminants.
if Is_Itype (Ent) then
null;
elsif Ekind (Ent) = E_Discriminant
and then Is_Completely_Hidden (Ent)
then
return True;
end if;
Ent := Next_Entity (Ent);
end loop;
return False;
end Has_Completely_Hidden_Discriminant;
-- Start of processing for First_Stored_Discriminant
begin
pragma Assert
(Has_Discriminants (Typ)
or else Has_Unknown_Discriminants (Typ));
Ent := First_Entity (Typ);
if Chars (Ent) = Name_uTag then
Ent := Next_Entity (Ent);
end if;
if Has_Completely_Hidden_Discriminant (Ent) then
while Present (Ent) loop
exit when Ekind (Ent) = E_Discriminant
and then Is_Completely_Hidden (Ent);
Ent := Next_Entity (Ent);
end loop;
end if;
pragma Assert (Ekind (Ent) = E_Discriminant);
return Ent;
end First_Stored_Discriminant;
-------------------
-- First_Subtype --
-------------------
function First_Subtype (Typ : Entity_Id) return Entity_Id is
B : constant Entity_Id := Base_Type (Typ);
F : constant Node_Id := Freeze_Node (B);
Ent : Entity_Id;
begin
-- If the base type has no freeze node, it is a type in Standard, and
-- always acts as its own first subtype, except where it is one of the
-- predefined integer types. If the type is formal, it is also a first
-- subtype, and its base type has no freeze node. On the other hand, a
-- subtype of a generic formal is not its own first subtype. Its base
-- type, if anonymous, is attached to the formal type decl. from which
-- the first subtype is obtained.
if No (F) then
if B = Base_Type (Standard_Integer) then
return Standard_Integer;
elsif B = Base_Type (Standard_Long_Integer) then
return Standard_Long_Integer;
elsif B = Base_Type (Standard_Short_Short_Integer) then
return Standard_Short_Short_Integer;
elsif B = Base_Type (Standard_Short_Integer) then
return Standard_Short_Integer;
elsif B = Base_Type (Standard_Long_Long_Integer) then
return Standard_Long_Long_Integer;
elsif Is_Generic_Type (Typ) then
if Present (Parent (B)) then
return Defining_Identifier (Parent (B));
else
return Defining_Identifier (Associated_Node_For_Itype (B));
end if;
else
return B;
end if;
-- Otherwise we check the freeze node, if it has a First_Subtype_Link
-- then we use that link, otherwise (happens with some Itypes), we use
-- the base type itself.
else
Ent := First_Subtype_Link (F);
if Present (Ent) then
return Ent;
else
return B;
end if;
end if;
end First_Subtype;
-------------------------
-- First_Tag_Component --
-------------------------
function First_Tag_Component (Typ : Entity_Id) return Entity_Id is
Comp : Entity_Id;
Ctyp : Entity_Id;
begin
Ctyp := Typ;
pragma Assert (Is_Tagged_Type (Ctyp));
if Is_Class_Wide_Type (Ctyp) then
Ctyp := Root_Type (Ctyp);
end if;
if Is_Private_Type (Ctyp) then
Ctyp := Underlying_Type (Ctyp);
-- If the underlying type is missing then the source program has
-- errors and there is nothing else to do (the full-type declaration
-- associated with the private type declaration is missing).
if No (Ctyp) then
return Empty;
end if;
end if;
Comp := First_Entity (Ctyp);
while Present (Comp) loop
if Is_Tag (Comp) then
return Comp;
end if;
Comp := Next_Entity (Comp);
end loop;
-- No tag component found
return Empty;
end First_Tag_Component;
---------------------
-- Get_Binary_Nkind --
---------------------
function Get_Binary_Nkind (Op : Entity_Id) return Node_Kind is
begin
case Chars (Op) is
when Name_Op_Add => return N_Op_Add;
when Name_Op_Concat => return N_Op_Concat;
when Name_Op_Expon => return N_Op_Expon;
when Name_Op_Subtract => return N_Op_Subtract;
when Name_Op_Mod => return N_Op_Mod;
when Name_Op_Multiply => return N_Op_Multiply;
when Name_Op_Divide => return N_Op_Divide;
when Name_Op_Rem => return N_Op_Rem;
when Name_Op_And => return N_Op_And;
when Name_Op_Eq => return N_Op_Eq;
when Name_Op_Ge => return N_Op_Ge;
when Name_Op_Gt => return N_Op_Gt;
when Name_Op_Le => return N_Op_Le;
when Name_Op_Lt => return N_Op_Lt;
when Name_Op_Ne => return N_Op_Ne;
when Name_Op_Or => return N_Op_Or;
when Name_Op_Xor => return N_Op_Xor;
when others => raise Program_Error;
end case;
end Get_Binary_Nkind;
-------------------
-- Get_Low_Bound --
-------------------
function Get_Low_Bound (E : Entity_Id) return Node_Id is
begin
if Ekind (E) = E_String_Literal_Subtype then
return String_Literal_Low_Bound (E);
else
return Type_Low_Bound (E);
end if;
end Get_Low_Bound;
------------------
-- Get_Rep_Item --
------------------
function Get_Rep_Item
(E : Entity_Id;
Nam : Name_Id;
Check_Parents : Boolean := True) return Node_Id
is
N : Node_Id;
begin
N := First_Rep_Item (E);
while Present (N) loop
-- Only one of Priority / Interrupt_Priority can be specified, so
-- return whichever one is present to catch illegal duplication.
if Nkind (N) = N_Pragma
and then
(Pragma_Name_Unmapped (N) = Nam
or else (Nam = Name_Priority
and then Pragma_Name (N) =
Name_Interrupt_Priority)
or else (Nam = Name_Interrupt_Priority
and then Pragma_Name (N) = Name_Priority))
then
if Check_Parents then
return N;
-- If Check_Parents is False, return N if the pragma doesn't
-- appear in the Rep_Item chain of the parent.
else
declare
Par : constant Entity_Id := Nearest_Ancestor (E);
-- This node represents the parent type of type E (if any)
begin
if No (Par) then
return N;
elsif not Present_In_Rep_Item (Par, N) then
return N;
end if;
end;
end if;
elsif Nkind (N) = N_Attribute_Definition_Clause
and then
(Chars (N) = Nam
or else (Nam = Name_Priority
and then Chars (N) = Name_Interrupt_Priority))
then
if Check_Parents or else Entity (N) = E then
return N;
end if;
elsif Nkind (N) = N_Aspect_Specification
and then
(Chars (Identifier (N)) = Nam
or else
(Nam = Name_Priority
and then Chars (Identifier (N)) = Name_Interrupt_Priority))
then
if Check_Parents then
return N;
elsif Entity (N) = E then
return N;
end if;
end if;
Next_Rep_Item (N);
end loop;
return Empty;
end Get_Rep_Item;
function Get_Rep_Item
(E : Entity_Id;
Nam1 : Name_Id;
Nam2 : Name_Id;
Check_Parents : Boolean := True) return Node_Id
is
Nam1_Item : constant Node_Id := Get_Rep_Item (E, Nam1, Check_Parents);
Nam2_Item : constant Node_Id := Get_Rep_Item (E, Nam2, Check_Parents);
N : Node_Id;
begin
-- Check both Nam1_Item and Nam2_Item are present
if No (Nam1_Item) then
return Nam2_Item;
elsif No (Nam2_Item) then
return Nam1_Item;
end if;
-- Return the first node encountered in the list
N := First_Rep_Item (E);
while Present (N) loop
if N = Nam1_Item or else N = Nam2_Item then
return N;
end if;
Next_Rep_Item (N);
end loop;
return Empty;
end Get_Rep_Item;
--------------------
-- Get_Rep_Pragma --
--------------------
function Get_Rep_Pragma
(E : Entity_Id;
Nam : Name_Id;
Check_Parents : Boolean := True) return Node_Id
is
N : constant Node_Id := Get_Rep_Item (E, Nam, Check_Parents);
begin
if Present (N) and then Nkind (N) = N_Pragma then
return N;
end if;
return Empty;
end Get_Rep_Pragma;
function Get_Rep_Pragma
(E : Entity_Id;
Nam1 : Name_Id;
Nam2 : Name_Id;
Check_Parents : Boolean := True) return Node_Id
is
Nam1_Item : constant Node_Id := Get_Rep_Pragma (E, Nam1, Check_Parents);
Nam2_Item : constant Node_Id := Get_Rep_Pragma (E, Nam2, Check_Parents);
N : Node_Id;
begin
-- Check both Nam1_Item and Nam2_Item are present
if No (Nam1_Item) then
return Nam2_Item;
elsif No (Nam2_Item) then
return Nam1_Item;
end if;
-- Return the first node encountered in the list
N := First_Rep_Item (E);
while Present (N) loop
if N = Nam1_Item or else N = Nam2_Item then
return N;
end if;
Next_Rep_Item (N);
end loop;
return Empty;
end Get_Rep_Pragma;
---------------------
-- Get_Unary_Nkind --
---------------------
function Get_Unary_Nkind (Op : Entity_Id) return Node_Kind is
begin
case Chars (Op) is
when Name_Op_Abs => return N_Op_Abs;
when Name_Op_Subtract => return N_Op_Minus;
when Name_Op_Not => return N_Op_Not;
when Name_Op_Add => return N_Op_Plus;
when others => raise Program_Error;
end case;
end Get_Unary_Nkind;
---------------------------------
-- Has_External_Tag_Rep_Clause --
---------------------------------
function Has_External_Tag_Rep_Clause (T : Entity_Id) return Boolean is
begin
pragma Assert (Is_Tagged_Type (T));
return Has_Rep_Item (T, Name_External_Tag, Check_Parents => False);
end Has_External_Tag_Rep_Clause;
------------------
-- Has_Rep_Item --
------------------
function Has_Rep_Item
(E : Entity_Id;
Nam : Name_Id;
Check_Parents : Boolean := True) return Boolean
is
begin
return Present (Get_Rep_Item (E, Nam, Check_Parents));
end Has_Rep_Item;
function Has_Rep_Item
(E : Entity_Id;
Nam1 : Name_Id;
Nam2 : Name_Id;
Check_Parents : Boolean := True) return Boolean
is
begin
return Present (Get_Rep_Item (E, Nam1, Nam2, Check_Parents));
end Has_Rep_Item;
function Has_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
Item : Node_Id;
begin
pragma Assert
(Nkind_In (N, N_Aspect_Specification,
N_Attribute_Definition_Clause,
N_Enumeration_Representation_Clause,
N_Pragma,
N_Record_Representation_Clause));
Item := First_Rep_Item (E);
while Present (Item) loop
if Item = N then
return True;
end if;
Item := Next_Rep_Item (Item);
end loop;
return False;
end Has_Rep_Item;
--------------------
-- Has_Rep_Pragma --
--------------------
function Has_Rep_Pragma
(E : Entity_Id;
Nam : Name_Id;
Check_Parents : Boolean := True) return Boolean
is
begin
return Present (Get_Rep_Pragma (E, Nam, Check_Parents));
end Has_Rep_Pragma;
function Has_Rep_Pragma
(E : Entity_Id;
Nam1 : Name_Id;
Nam2 : Name_Id;
Check_Parents : Boolean := True) return Boolean
is
begin
return Present (Get_Rep_Pragma (E, Nam1, Nam2, Check_Parents));
end Has_Rep_Pragma;
--------------------------------
-- Has_Unconstrained_Elements --
--------------------------------
function Has_Unconstrained_Elements (T : Entity_Id) return Boolean is
U_T : constant Entity_Id := Underlying_Type (T);
begin
if No (U_T) then
return False;
elsif Is_Record_Type (U_T) then
return Has_Discriminants (U_T) and then not Is_Constrained (U_T);
elsif Is_Array_Type (U_T) then
return Has_Unconstrained_Elements (Component_Type (U_T));
else
return False;
end if;
end Has_Unconstrained_Elements;
----------------------
-- Has_Variant_Part --
----------------------
function Has_Variant_Part (Typ : Entity_Id) return Boolean is
FSTyp : Entity_Id;
Decl : Node_Id;
TDef : Node_Id;
CList : Node_Id;
begin
if not Is_Type (Typ) then
return False;
end if;
FSTyp := First_Subtype (Typ);
if not Has_Discriminants (FSTyp) then
return False;
end if;
-- Proceed with cautious checks here, return False if tree is not
-- as expected (may be caused by prior errors).
Decl := Declaration_Node (FSTyp);
if Nkind (Decl) /= N_Full_Type_Declaration then
return False;
end if;
TDef := Type_Definition (Decl);
if Nkind (TDef) /= N_Record_Definition then
return False;
end if;
CList := Component_List (TDef);
if Nkind (CList) /= N_Component_List then
return False;
else
return Present (Variant_Part (CList));
end if;
end Has_Variant_Part;
---------------------
-- In_Generic_Body --
---------------------
function In_Generic_Body (Id : Entity_Id) return Boolean is
S : Entity_Id;
begin
-- Climb scopes looking for generic body
S := Id;
while Present (S) and then S /= Standard_Standard loop
-- Generic package body
if Ekind (S) = E_Generic_Package
and then In_Package_Body (S)
then
return True;
-- Generic subprogram body
elsif Is_Subprogram (S)
and then Nkind (Unit_Declaration_Node (S)) =
N_Generic_Subprogram_Declaration
then
return True;
end if;
S := Scope (S);
end loop;
-- False if top of scope stack without finding a generic body
return False;
end In_Generic_Body;
-------------------------------
-- Initialization_Suppressed --
-------------------------------
function Initialization_Suppressed (Typ : Entity_Id) return Boolean is
begin
return Suppress_Initialization (Typ)
or else Suppress_Initialization (Base_Type (Typ));
end Initialization_Suppressed;
----------------
-- Initialize --
----------------
procedure Initialize is
begin
Obsolescent_Warnings.Init;
end Initialize;
-------------
-- Is_Body --
-------------
function Is_Body (N : Node_Id) return Boolean is
begin
return
Nkind (N) in N_Body_Stub
or else Nkind_In (N, N_Entry_Body,
N_Package_Body,
N_Protected_Body,
N_Subprogram_Body,
N_Task_Body);
end Is_Body;
---------------------
-- Is_By_Copy_Type --
---------------------
function Is_By_Copy_Type (Ent : Entity_Id) return Boolean is
begin
-- If Id is a private type whose full declaration has not been seen,
-- we assume for now that it is not a By_Copy type. Clearly this
-- attribute should not be used before the type is frozen, but it is
-- needed to build the associated record of a protected type. Another
-- place where some lookahead for a full view is needed ???
return
Is_Elementary_Type (Ent)
or else (Is_Private_Type (Ent)
and then Present (Underlying_Type (Ent))
and then Is_Elementary_Type (Underlying_Type (Ent)));
end Is_By_Copy_Type;
--------------------------
-- Is_By_Reference_Type --
--------------------------
function Is_By_Reference_Type (Ent : Entity_Id) return Boolean is
Btype : constant Entity_Id := Base_Type (Ent);
begin
if Error_Posted (Ent) or else Error_Posted (Btype) then
return False;
elsif Is_Private_Type (Btype) then
declare
Utyp : constant Entity_Id := Underlying_Type (Btype);
begin
if No (Utyp) then
return False;
else
return Is_By_Reference_Type (Utyp);
end if;
end;
elsif Is_Incomplete_Type (Btype) then
declare
Ftyp : constant Entity_Id := Full_View (Btype);
begin
-- Return true for a tagged incomplete type built as a shadow
-- entity in Build_Limited_Views. It can appear in the profile
-- of a thunk and the back end needs to know how it is passed.
if No (Ftyp) then
return Is_Tagged_Type (Btype);
else
return Is_By_Reference_Type (Ftyp);
end if;
end;
elsif Is_Concurrent_Type (Btype) then
return True;
elsif Is_Record_Type (Btype) then
if Is_Limited_Record (Btype)
or else Is_Tagged_Type (Btype)
or else Is_Volatile (Btype)
then
return True;
else
declare
C : Entity_Id;
begin
C := First_Component (Btype);
while Present (C) loop
-- For each component, test if its type is a by reference
-- type and if its type is volatile. Also test the component
-- itself for being volatile. This happens for example when
-- a Volatile aspect is added to a component.
if Is_By_Reference_Type (Etype (C))
or else Is_Volatile (Etype (C))
or else Is_Volatile (C)
then
return True;
end if;
C := Next_Component (C);
end loop;
end;
return False;
end if;
elsif Is_Array_Type (Btype) then
return
Is_Volatile (Btype)
or else Is_By_Reference_Type (Component_Type (Btype))
or else Is_Volatile (Component_Type (Btype))
or else Has_Volatile_Components (Btype);
else
return False;
end if;
end Is_By_Reference_Type;
-------------------------
-- Is_Definite_Subtype --
-------------------------
function Is_Definite_Subtype (T : Entity_Id) return Boolean is
pragma Assert (Is_Type (T));
K : constant Entity_Kind := Ekind (T);
begin
if Is_Constrained (T) then
return True;
elsif K in Array_Kind
or else K in Class_Wide_Kind
or else Has_Unknown_Discriminants (T)
then
return False;
-- Known discriminants: definite if there are default values. Note that
-- if any discriminant has a default, they all do.
elsif Has_Discriminants (T) then
return Present (Discriminant_Default_Value (First_Discriminant (T)));
else
return True;
end if;
end Is_Definite_Subtype;
---------------------
-- Is_Derived_Type --
---------------------
function Is_Derived_Type (Ent : E) return B is
Par : Node_Id;
begin
if Is_Type (Ent)
and then Base_Type (Ent) /= Root_Type (Ent)
and then not Is_Class_Wide_Type (Ent)
-- An access_to_subprogram whose result type is a limited view can
-- appear in a return statement, without the full view of the result
-- type being available. Do not interpret this as a derived type.
and then Ekind (Ent) /= E_Subprogram_Type
then
if not Is_Numeric_Type (Root_Type (Ent)) then
return True;
else
Par := Parent (First_Subtype (Ent));
return Present (Par)
and then Nkind (Par) = N_Full_Type_Declaration
and then Nkind (Type_Definition (Par)) =
N_Derived_Type_Definition;
end if;
else
return False;
end if;
end Is_Derived_Type;
-----------------------
-- Is_Generic_Formal --
-----------------------
function Is_Generic_Formal (E : Entity_Id) return Boolean is
Kind : Node_Kind;
begin
if No (E) then
return False;
else
Kind := Nkind (Parent (E));
return
Nkind_In (Kind, N_Formal_Object_Declaration,
N_Formal_Package_Declaration,
N_Formal_Type_Declaration)
or else Is_Formal_Subprogram (E);
end if;
end Is_Generic_Formal;
-------------------------------
-- Is_Immutably_Limited_Type --
-------------------------------
function Is_Immutably_Limited_Type (Ent : Entity_Id) return Boolean is
Btype : constant Entity_Id := Available_View (Base_Type (Ent));
begin
if Is_Limited_Record (Btype) then
return True;
elsif Ekind (Btype) = E_Limited_Private_Type
and then Nkind (Parent (Btype)) = N_Formal_Type_Declaration
then
return not In_Package_Body (Scope ((Btype)));
elsif Is_Private_Type (Btype) then
-- AI05-0063: A type derived from a limited private formal type is
-- not immutably limited in a generic body.
if Is_Derived_Type (Btype)
and then Is_Generic_Type (Etype (Btype))
then
if not Is_Limited_Type (Etype (Btype)) then
return False;
-- A descendant of a limited formal type is not immutably limited
-- in the generic body, or in the body of a generic child.
elsif Ekind (Scope (Etype (Btype))) = E_Generic_Package then
return not In_Package_Body (Scope (Btype));
else
return False;
end if;
else
declare
Utyp : constant Entity_Id := Underlying_Type (Btype);
begin
if No (Utyp) then
return False;
else
return Is_Immutably_Limited_Type (Utyp);
end if;
end;
end if;
elsif Is_Concurrent_Type (Btype) then
return True;
else
return False;
end if;
end Is_Immutably_Limited_Type;
---------------------
-- Is_Limited_Type --
---------------------
function Is_Limited_Type (Ent : Entity_Id) return Boolean is
Btype : constant E := Base_Type (Ent);
Rtype : constant E := Root_Type (Btype);
begin
if not Is_Type (Ent) then
return False;
elsif Ekind (Btype) = E_Limited_Private_Type
or else Is_Limited_Composite (Btype)
then
return True;
elsif Is_Concurrent_Type (Btype) then
return True;
-- The Is_Limited_Record flag normally indicates that the type is
-- limited. The exception is that a type does not inherit limitedness
-- from its interface ancestor. So the type may be derived from a
-- limited interface, but is not limited.
elsif Is_Limited_Record (Ent)
and then not Is_Interface (Ent)
then
return True;
-- Otherwise we will look around to see if there is some other reason
-- for it to be limited, except that if an error was posted on the
-- entity, then just assume it is non-limited, because it can cause
-- trouble to recurse into a murky entity resulting from other errors.
elsif Error_Posted (Ent) then
return False;
elsif Is_Record_Type (Btype) then
if Is_Limited_Interface (Ent) then
return True;
-- AI-419: limitedness is not inherited from a limited interface
elsif Is_Limited_Record (Rtype) then
return not Is_Interface (Rtype)
or else Is_Protected_Interface (Rtype)
or else Is_Synchronized_Interface (Rtype)
or else Is_Task_Interface (Rtype);
elsif Is_Class_Wide_Type (Btype) then
return Is_Limited_Type (Rtype);
else
declare
C : E;
begin
C := First_Component (Btype);
while Present (C) loop
if Is_Limited_Type (Etype (C)) then
return True;
end if;
C := Next_Component (C);
end loop;
end;
return False;
end if;
elsif Is_Array_Type (Btype) then
return Is_Limited_Type (Component_Type (Btype));
else
return False;
end if;
end Is_Limited_Type;
---------------------
-- Is_Limited_View --
---------------------
function Is_Limited_View (Ent : Entity_Id) return Boolean is
Btype : constant Entity_Id := Available_View (Base_Type (Ent));
begin
if Is_Limited_Record (Btype) then
return True;
elsif Ekind (Btype) = E_Limited_Private_Type
and then Nkind (Parent (Btype)) = N_Formal_Type_Declaration
then
return not In_Package_Body (Scope ((Btype)));
elsif Is_Private_Type (Btype) then
-- AI05-0063: A type derived from a limited private formal type is
-- not immutably limited in a generic body.
if Is_Derived_Type (Btype)
and then Is_Generic_Type (Etype (Btype))
then
if not Is_Limited_Type (Etype (Btype)) then
return False;
-- A descendant of a limited formal type is not immutably limited
-- in the generic body, or in the body of a generic child.
elsif Ekind (Scope (Etype (Btype))) = E_Generic_Package then
return not In_Package_Body (Scope (Btype));
else
return False;
end if;
else
declare
Utyp : constant Entity_Id := Underlying_Type (Btype);
begin
if No (Utyp) then
return False;
else
return Is_Limited_View (Utyp);
end if;
end;
end if;
elsif Is_Concurrent_Type (Btype) then
return True;
elsif Is_Record_Type (Btype) then
-- Note that we return True for all limited interfaces, even though
-- (unsynchronized) limited interfaces can have descendants that are
-- nonlimited, because this is a predicate on the type itself, and
-- things like functions with limited interface results need to be
-- handled as build in place even though they might return objects
-- of a type that is not inherently limited.
if Is_Class_Wide_Type (Btype) then
return Is_Limited_View (Root_Type (Btype));
else
declare
C : Entity_Id;
begin
C := First_Component (Btype);
while Present (C) loop
-- Don't consider components with interface types (which can
-- only occur in the case of a _parent component anyway).
-- They don't have any components, plus it would cause this
-- function to return true for nonlimited types derived from
-- limited interfaces.
if not Is_Interface (Etype (C))
and then Is_Limited_View (Etype (C))
then
return True;
end if;
C := Next_Component (C);
end loop;
end;
return False;
end if;
elsif Is_Array_Type (Btype) then
return Is_Limited_View (Component_Type (Btype));
else
return False;
end if;
end Is_Limited_View;
----------------------
-- Nearest_Ancestor --
----------------------
function Nearest_Ancestor (Typ : Entity_Id) return Entity_Id is
D : constant Node_Id := Declaration_Node (Typ);
begin
-- If we have a subtype declaration, get the ancestor subtype
if Nkind (D) = N_Subtype_Declaration then
if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
return Entity (Subtype_Mark (Subtype_Indication (D)));
else
return Entity (Subtype_Indication (D));
end if;
-- If derived type declaration, find who we are derived from
elsif Nkind (D) = N_Full_Type_Declaration
and then Nkind (Type_Definition (D)) = N_Derived_Type_Definition
then
declare
DTD : constant Entity_Id := Type_Definition (D);
SI : constant Entity_Id := Subtype_Indication (DTD);
begin
if Is_Entity_Name (SI) then
return Entity (SI);
else
return Entity (Subtype_Mark (SI));
end if;
end;
-- If derived type and private type, get the full view to find who we
-- are derived from.
elsif Is_Derived_Type (Typ)
and then Is_Private_Type (Typ)
and then Present (Full_View (Typ))
then
return Nearest_Ancestor (Full_View (Typ));
-- Otherwise, nothing useful to return, return Empty
else
return Empty;
end if;
end Nearest_Ancestor;
---------------------------
-- Nearest_Dynamic_Scope --
---------------------------
function Nearest_Dynamic_Scope (Ent : Entity_Id) return Entity_Id is
begin
if Is_Dynamic_Scope (Ent) then
return Ent;
else
return Enclosing_Dynamic_Scope (Ent);
end if;
end Nearest_Dynamic_Scope;
------------------------
-- Next_Tag_Component --
------------------------
function Next_Tag_Component (Tag : Entity_Id) return Entity_Id is
Comp : Entity_Id;
begin
pragma Assert (Is_Tag (Tag));
-- Loop to look for next tag component
Comp := Next_Entity (Tag);
while Present (Comp) loop
if Is_Tag (Comp) then
pragma Assert (Chars (Comp) /= Name_uTag);
return Comp;
end if;
Comp := Next_Entity (Comp);
end loop;
-- No tag component found
return Empty;
end Next_Tag_Component;
-----------------------
-- Number_Components --
-----------------------
function Number_Components (Typ : Entity_Id) return Nat is
N : Nat := 0;
Comp : Entity_Id;
begin
-- We do not call Einfo.First_Component_Or_Discriminant, as this
-- function does not skip completely hidden discriminants, which we
-- want to skip here.
if Has_Discriminants (Typ) then
Comp := First_Discriminant (Typ);
else
Comp := First_Component (Typ);
end if;
while Present (Comp) loop
N := N + 1;
Comp := Next_Component_Or_Discriminant (Comp);
end loop;
return N;
end Number_Components;
--------------------------
-- Number_Discriminants --
--------------------------
function Number_Discriminants (Typ : Entity_Id) return Pos is
N : Nat := 0;
Discr : Entity_Id := First_Discriminant (Typ);
begin
while Present (Discr) loop
N := N + 1;
Discr := Next_Discriminant (Discr);
end loop;
return N;
end Number_Discriminants;
----------------------------------------------
-- Object_Type_Has_Constrained_Partial_View --
----------------------------------------------
function Object_Type_Has_Constrained_Partial_View
(Typ : Entity_Id;
Scop : Entity_Id) return Boolean
is
begin
return Has_Constrained_Partial_View (Typ)
or else (In_Generic_Body (Scop)
and then Is_Generic_Type (Base_Type (Typ))
and then Is_Private_Type (Base_Type (Typ))
and then not Is_Tagged_Type (Typ)
and then not (Is_Array_Type (Typ)
and then not Is_Constrained (Typ))
and then Has_Discriminants (Typ));
end Object_Type_Has_Constrained_Partial_View;
------------------
-- Package_Body --
------------------
function Package_Body (E : Entity_Id) return Node_Id is
N : Node_Id;
begin
if Ekind (E) = E_Package_Body then
N := Parent (E);
if Nkind (N) = N_Defining_Program_Unit_Name then
N := Parent (N);
end if;
else
N := Package_Spec (E);
if Present (Corresponding_Body (N)) then
N := Parent (Corresponding_Body (N));
if Nkind (N) = N_Defining_Program_Unit_Name then
N := Parent (N);
end if;
else
N := Empty;
end if;
end if;
return N;
end Package_Body;
------------------
-- Package_Spec --
------------------
function Package_Spec (E : Entity_Id) return Node_Id is
begin
return Parent (Package_Specification (E));
end Package_Spec;
---------------------------
-- Package_Specification --
---------------------------
function Package_Specification (E : Entity_Id) return Node_Id is
N : Node_Id;
begin
N := Parent (E);
if Nkind (N) = N_Defining_Program_Unit_Name then
N := Parent (N);
end if;
return N;
end Package_Specification;
---------------------
-- Subprogram_Body --
---------------------
function Subprogram_Body (E : Entity_Id) return Node_Id is
Body_E : constant Entity_Id := Subprogram_Body_Entity (E);
begin
if No (Body_E) then
return Empty;
else
return Parent (Subprogram_Specification (Body_E));
end if;
end Subprogram_Body;
----------------------------
-- Subprogram_Body_Entity --
----------------------------
function Subprogram_Body_Entity (E : Entity_Id) return Entity_Id is
N : constant Node_Id := Parent (Subprogram_Specification (E));
-- Declaration for E
begin
-- If this declaration is not a subprogram body, then it must be a
-- subprogram declaration or body stub, from which we can retrieve the
-- entity for the corresponding subprogram body if any, or an abstract
-- subprogram declaration, for which we return Empty.
case Nkind (N) is
when N_Subprogram_Body =>
return E;
when N_Subprogram_Body_Stub
| N_Subprogram_Declaration
=>
return Corresponding_Body (N);
when others =>
return Empty;
end case;
end Subprogram_Body_Entity;
---------------------
-- Subprogram_Spec --
---------------------
function Subprogram_Spec (E : Entity_Id) return Node_Id is
N : constant Node_Id := Parent (Subprogram_Specification (E));
-- Declaration for E
begin
-- This declaration is either subprogram declaration or a subprogram
-- body, in which case return Empty.
if Nkind (N) = N_Subprogram_Declaration then
return N;
else
return Empty;
end if;
end Subprogram_Spec;
------------------------------
-- Subprogram_Specification --
------------------------------
function Subprogram_Specification (E : Entity_Id) return Node_Id is
N : Node_Id;
begin
N := Parent (E);
if Nkind (N) = N_Defining_Program_Unit_Name then
N := Parent (N);
end if;
-- If the Parent pointer of E is not a subprogram specification node
-- (going through an intermediate N_Defining_Program_Unit_Name node
-- for subprogram units), then E is an inherited operation. Its parent
-- points to the type derivation that produces the inheritance: that's
-- the node that generates the subprogram specification. Its alias
-- is the parent subprogram, and that one points to a subprogram
-- declaration, or to another type declaration if this is a hierarchy
-- of derivations.
if Nkind (N) not in N_Subprogram_Specification then
pragma Assert (Present (Alias (E)));
N := Subprogram_Specification (Alias (E));
end if;
return N;
end Subprogram_Specification;
---------------
-- Tree_Read --
---------------
procedure Tree_Read is
begin
Obsolescent_Warnings.Tree_Read;
end Tree_Read;
----------------
-- Tree_Write --
----------------
procedure Tree_Write is
begin
Obsolescent_Warnings.Tree_Write;
end Tree_Write;
--------------------
-- Ultimate_Alias --
--------------------
function Ultimate_Alias (Prim : Entity_Id) return Entity_Id is
E : Entity_Id := Prim;
begin
while Present (Alias (E)) loop
pragma Assert (Alias (E) /= E);
E := Alias (E);
end loop;
return E;
end Ultimate_Alias;
--------------------------
-- Unit_Declaration_Node --
--------------------------
function Unit_Declaration_Node (Unit_Id : Entity_Id) return Node_Id is
N : Node_Id := Parent (Unit_Id);
begin
-- Predefined operators do not have a full function declaration
if Ekind (Unit_Id) = E_Operator then
return N;
end if;
-- Isn't there some better way to express the following ???
while Nkind (N) /= N_Abstract_Subprogram_Declaration
and then Nkind (N) /= N_Entry_Body
and then Nkind (N) /= N_Entry_Declaration
and then Nkind (N) /= N_Formal_Package_Declaration
and then Nkind (N) /= N_Function_Instantiation
and then Nkind (N) /= N_Generic_Package_Declaration
and then Nkind (N) /= N_Generic_Subprogram_Declaration
and then Nkind (N) /= N_Package_Declaration
and then Nkind (N) /= N_Package_Body
and then Nkind (N) /= N_Package_Instantiation
and then Nkind (N) /= N_Package_Renaming_Declaration
and then Nkind (N) /= N_Procedure_Instantiation
and then Nkind (N) /= N_Protected_Body
and then Nkind (N) /= N_Subprogram_Declaration
and then Nkind (N) /= N_Subprogram_Body
and then Nkind (N) /= N_Subprogram_Body_Stub
and then Nkind (N) /= N_Subprogram_Renaming_Declaration
and then Nkind (N) /= N_Task_Body
and then Nkind (N) /= N_Task_Type_Declaration
and then Nkind (N) not in N_Formal_Subprogram_Declaration
and then Nkind (N) not in N_Generic_Renaming_Declaration
loop
N := Parent (N);
-- We don't use Assert here, because that causes an infinite loop
-- when assertions are turned off. Better to crash.
if No (N) then
raise Program_Error;
end if;
end loop;
return N;
end Unit_Declaration_Node;
end Sem_Aux;
| 29.862663 | 79 | 0.553226 |
0b4459ab3dfb2024a01e9a07969a8b8f30719b43 | 1,050 | ads | Ada | build_gnu/binutils/gdb/testsuite/gdb.ada/array_return/pck.ads | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | 1 | 2017-05-31T21:42:12.000Z | 2017-05-31T21:42:12.000Z | build_gnu/binutils/gdb/testsuite/gdb.ada/array_return/pck.ads | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | null | null | null | build_gnu/binutils/gdb/testsuite/gdb.ada/array_return/pck.ads | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | 1 | 2019-12-17T22:04:07.000Z | 2019-12-17T22:04:07.000Z | -- Copyright 2006-2014 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package Pck is
type Data_Small is array (1 .. 2) of Integer;
type Data_Large is array (1 .. 4) of Integer;
type Small_Float_Vector is array (1 .. 2) of Float;
function Create_Small return Data_Small;
function Create_Large return Data_Large;
function Create_Small_Float_Vector return Small_Float_Vector;
end Pck;
| 36.206897 | 73 | 0.74 |
507986b7891087c83de518bf2d37764d49c46518 | 24,243 | ads | Ada | src/asis/a4g-contt.ads | jquorning/dynamo | 10d68571476c270b8e45a9c5ef585fa9139b0d05 | [
"Apache-2.0"
] | 15 | 2015-01-18T23:04:19.000Z | 2022-03-01T20:27:08.000Z | src/asis/a4g-contt.ads | jquorning/dynamo | 10d68571476c270b8e45a9c5ef585fa9139b0d05 | [
"Apache-2.0"
] | 16 | 2018-06-10T07:09:30.000Z | 2022-03-26T18:28:40.000Z | src/asis/a4g-contt.ads | jquorning/dynamo | 10d68571476c270b8e45a9c5ef585fa9139b0d05 | [
"Apache-2.0"
] | 3 | 2015-11-11T18:00:14.000Z | 2022-01-30T23:08:45.000Z | ------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
-- --
-- A 4 G . C O N T T --
-- --
-- S p e c --
-- --
-- Copyright (C) 1995-2006, 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, 59 Temple Place --
-- - Suite 330, Boston, MA 02111-1307, 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 Ada Core Technologies Inc --
-- (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
-- This package defines the Context (Context) Table - the top-level ASIS data
-- structure for ASIS Context/Compilation_Unit processing.
with A4G.A_Alloc; use A4G.A_Alloc;
with A4G.A_Types; use A4G.A_Types;
with A4G.Unit_Rec;
with A4G.Tree_Rec;
with A4G.A_Elists; use A4G.A_Elists;
with A4G.A_Opt; use A4G.A_Opt;
with Table;
with Alloc;
with Types; use Types;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with Hostparm;
package A4G.Contt is
------------------------------------------------
-- Subprograms for General Context Processing --
------------------------------------------------
procedure Verify_Context_Name (Name : String; Cont : Context_Id);
-- Verifies the string passed as the Name parameter for
-- Asis.Ada_Environments.Associate. If the string can be used as a
-- Context name, it is stored in a Context Table for a further use,
-- and if the verification is failed, ASIS_Failed is raised and a Status
-- is set as Parameter_Error.
procedure Process_Context_Parameters
(Parameters : String;
Cont : Context_Id := Non_Associated);
-- Processes a Parameters string passed parameter to the
-- Asis.Ada_Environments.Associate query. If there are any errors contained
-- in the Context association parameters, ASIS_Failed is raised and
-- a Status is set as Parameter_Error only in case of a fatal error,
-- that is, when a given set of parameters does not allow to define a legal
-- ASIS Context in case of ASIS-for-GNAT. For a non-fatal error detected
-- for some parameter, ASIS warning is generated.
--
-- If the Parameters string contains tree file names, these names are
-- stored in the Context Tree Table for Cont.
function I_Options (C : Context_Id) return Argument_List;
-- Returns the list of "-I" GNAT options according to the definition of
-- the Context C.
procedure Initialize;
-- Should be called by Asis.Implementation.Initialize. Initializes the
-- Context Table. Sets Current_Context and Current_Tree to nil values.
procedure Finalize;
-- Should be called by Asis.Implementation.Finalize.
-- Finalizes all the Contexts being processed by ASIS and then finalizes
-- the general Context Table. Produces the debug output, if the
-- corresponding debug flags are set ON.
-- ??? Requires revising
procedure Pre_Initialize (C : Context_Id);
-- Should be called by Asis.Ada_Environments.Associate. It initializes
-- the unit and tree tables for C, but it does not put any information
-- in these tables. Before doing this, it backups the current context,
-- and after initializing Context tables it sets Current_Context to C and
-- Current_Tree to Nil_Tree.
procedure Initialize (C : Context_Id);
-- Should be called by Asis.Ada_Environments.Open.
-- Initializes the internal structures and Tables for the Context C.
procedure Finalize (C : Context_Id);
-- Should be called by Asis.Ada_Environments.Close.
-- Finalizes the internal structures and Tables for the Context C.
-- Produces the debug output, if the corresponding debug flags are
-- set ON.
function Allocate_New_Context return Context_Id;
-- Allocates a new entry to an ASIS Context Table and returns the
-- corresponding Id as a result
function Context_Info (C : Context_Id) return String;
-- returns the string, which content uniquely identifies the ASIS Context
-- printed by C in user-understandable form. Initially is supposed to
-- be called in the implementation of Asis_Compilation_Units.Unique_Name.
-- May be used for producing some debug output.
procedure Erase_Old (C : Context_Id);
-- Erases all the settings for the given context, which have been
-- made by previous calls to Asis.Ada_Environments.Associate
-- procedure. (All the dynamically allocated memory is reclaimed)
procedure Set_Context_Name (C : Context_Id; Name : String);
-- Stores Name as the context name for context C
procedure Set_Context_Parameters (C : Context_Id; Parameters : String);
-- Stores Parameters as the context parameters for context C
function Get_Context_Name (C : Context_Id) return String;
-- returns a name string associated with a context
function Get_Context_Parameters (C : Context_Id) return String;
-- returns a parameters string associated with a context
procedure Print_Context_Info;
-- produces the general debug output for ASIS contexts;
-- is intended to be used during ASIS implementation finalization
procedure Print_Context_Info (C : Context_Id);
-- produces the detailed debug output for the ASIS context C
-- is intended to be used during ASIS implementation finalization
procedure Print_Context_Parameters (C : Context_Id);
-- prints strings which were used when the Context C was associated
-- for the last time, as well as the corresponding settings made
-- as the result of this association
procedure Scan_Trees_New (C : Context_Id);
-- This procedure does the main job when opening the Context C in case if
-- tree processing mode for this context is set to Pre_Created or Mixed.
-- It scans the set of tree files making up the Context and collects some
-- block-box information about Compilation Units belonging to this Context.
-- In case if any error is detected (including error when reading a tree
-- file in -C1 or -CN Context mode or any inconsistency), ASIS_Failed is
-- raised as a result of opening the Context
function Get_Current_Tree return Tree_Id;
-- Returns the Id of the tree currently accessed by ASIS.
procedure Set_Current_Tree (Tree : Tree_Id);
-- Sets the currently accessed tree
function Get_Current_Cont return Context_Id;
-- Returns the Id of the ASIS Context to which the currently accessed
-- tree belongs
procedure Set_Current_Cont (L : Context_Id);
-- Sets the Id of the Context to which the currently accessed tree
-- belongs
---------------------------------------------------
-- Context Attributes Access and Update Routines --
---------------------------------------------------
function Is_Associated (C : Context_Id) return Boolean;
function Is_Opened (C : Context_Id) return Boolean;
function Opened_At (C : Context_Id) return ASIS_OS_Time;
function Context_Processing_Mode (C : Context_Id) return Context_Mode;
function Tree_Processing_Mode (C : Context_Id) return Tree_Mode;
function Source_Processing_Mode (C : Context_Id) return Source_Mode;
function Use_Default_Trees (C : Context_Id) return Boolean;
function Gcc_To_Call (C : Context_Id) return String_Access;
--------
procedure Set_Is_Associated (C : Context_Id; Ass : Boolean);
procedure Set_Is_Opened (C : Context_Id; Op : Boolean);
procedure Set_Context_Processing_Mode (C : Context_Id; M : Context_Mode);
procedure Set_Tree_Processing_Mode (C : Context_Id; M : Tree_Mode);
procedure Set_Source_Processing_Mode (C : Context_Id; M : Source_Mode);
procedure Set_Use_Default_Trees (C : Context_Id; B : Boolean);
procedure Set_Default_Context_Processing_Mode (C : Context_Id);
procedure Set_Default_Tree_Processing_Mode (C : Context_Id);
procedure Set_Default_Source_Processing_Mode (C : Context_Id);
-------------------------------------------------
-----------------
-- Name Buffer --
-----------------
-- All the Name Tables from the ASIS Context implementation
-- shares the same Name Buffer.
A_Name_Buffer : String (1 .. Hostparm.Max_Name_Length);
-- This buffer is used to set the name to be stored in the table for the
-- Name_Find call, and to retrieve the name for the Get_Name_String call.
A_Name_Len : Natural;
-- Length of name stored in Name_Buffer. Used as an input parameter for
-- Name_Find, and as an output value by Get_Name_String.
procedure Set_Name_String (S : String);
-- Sets A_Name_Len as S'Length and after that sets
-- A_Name_Buffer (1 .. A_Name_Len) as S. We do not need any encoding,
-- and we usually operate with strings which should be stored as they
-- came from the clients, so we simply can set the string to be
-- stored or looked for in the name buffer as it is.
procedure NB_Save;
-- Saves the current state (the value of A_Name_Len and the characters
-- in A_Name_Buffer (1 .. A_Name_Len) of the A_Name Buffer. This state may
-- be restored by NB_Restore
procedure NB_Restore;
-- Restores the state of the A_Name Buffer, which has been saved by the
-- NB_Save procedure
------------------
-- Search Paths --
------------------
procedure Set_Search_Paths (C : Context_Id);
-- Stores the previously verified and stored in temporary data structures
-- directory names as search paths for a given contexts. Also sets the
-- list of the "-I" options for calling the compiler from inside ASIS.
-- The temporary structures are cleaned, and the dynamically allocated
-- storage used by them are reclaimed.
function Locate_In_Search_Path
(C : Context_Id;
File_Name : String;
Dir_Kind : Search_Dir_Kinds)
return String_Access;
-- This function tries to locate the given file (having File_Name as its
-- name) in the search path associated with context C. If the file
-- cannot be located, the null access value is returned
-----------------
-- NEW STUFF --
-----------------
procedure Save_Context (C : Context_Id);
-- Saves the tables for C. Does nothing, if the currently accessed Context
-- is Non_Associated
procedure Restore_Context (C : Context_Id);
-- restored tables for C taking them from the internal C structure
procedure Reset_Context (C : Context_Id);
-- If C is not Nil_Context_Id, resets the currently accessed Context to be
-- C, including restoring all the tables. If C is Nil_Context_Id, does
-- nothing (we need this check for Nil_Context_Id, because C may come from
-- Nil_Compilation_Unit
procedure Backup_Current_Context;
-- Saves tables for the currently accessed Context. Does nothing, if the
-- currently accessed Context is Non_Associated.
private
------------------------
-- ASIS Context Table --
------------------------
-- The entries in the table are accessed using a Context_Id that ranges
-- from Context_Low_Bound to Context_High_Bound. Context_Low_Bound is
-- reserved for a Context which has never been associated.
--
-- The following diagram shows the general idea of the multiple
-- Context processing in ASIS:
-- Asis.Compilation_Unit value:
-- +-----------------------+
-- | Id : Unit_Id; ------+---------
-- | | |
-- | Cont_Id : Context_Id;-+- |
-- +-----------------------+ | |
-- | |
-- | |
-- +------------------------- |
-- | |
-- | Context Table: |
-- | ============= |
-- | +--------------+ |
-- | | | |
-- | | | |
-- | | | |
-- | | | |
-- | +--------------+ | Unit_Reciord value
-- +-->| | | /
-- | ... | | /
-- | | V / Unit Table for
-- | | +-----+-----+----------... / a given
-- | Units -----+----->| | | / Context
-- | | +-----+-----+----------...
-- | | ^ ^
-- | | | |------------------+
-- | | | |
-- | | | |
-- | | V |
-- | | +-----------------... |
-- | Name_Chars --+----> | |
-- | | +-----------------... |
-- | | |
-- | | +-----------------------
-- | | |
-- | | V
-- | | +----------------...
-- | Hash_Table -+----> |
-- | | +----------------...
-- | |
-- | |
-- | ... |
-- | |
-- +--------------+
-- | |
-- | |
-- | ... |
-- +--------------+
-- | |
-- . .
-- . .
-- . .
---------------------------
-- Types for hash tables --
---------------------------
Hash_Num : constant Int := 2**12;
-- Number of headers in the hash table. Current hash algorithm is closely
-- tailored to this choice, so it can only be changed if a corresponding
-- change is made to the hash algorithm.
Hash_Max : constant Int := Hash_Num - 1;
-- Indexes in the hash header table run from 0 to Hash_Num - 1
subtype Hash_Index_Type is Int range 0 .. Hash_Max;
-- Range of hash index values
type Hash_Array is array (Hash_Index_Type) of Unit_Id;
-- Each kind of tables in the implementation of an ASIS Context uses
-- its own type of hash table
--
-- The hash table is used to locate existing entries in the names table.
-- The entries point to the first names table entry whose hash value
-- matches the hash code. Then subsequent names table entries with the
-- same hash code value are linked through the Hash_Link fields.
function Hash return Hash_Index_Type;
pragma Inline (Hash);
-- Compute hash code for name stored in Name_Buffer (length in Name_Len)
-- In Unit Name Table it can really be applied only to the "normalized"
-- unit names.
---------------
-- NEW STUFF --
---------------
package A_Name_Chars is new Table.Table (
Table_Component_Type => Character,
Table_Index_Type => Int,
Table_Low_Bound => 0,
Table_Initial => Alloc.Name_Chars_Initial,
Table_Increment => Alloc.Name_Chars_Increment,
Table_Name => "A_Name_Chars");
package Unit_Table is new Table.Table (
Table_Component_Type => A4G.Unit_Rec.Unit_Record,
Table_Index_Type => A4G.A_Types.Unit_Id,
Table_Low_Bound => A4G.A_Types.First_Unit_Id,
Table_Initial => A4G.A_Alloc.Alloc_ASIS_Units_Initial,
Table_Increment => A4G.A_Alloc.Alloc_ASIS_Units_Increment,
Table_Name => "ASIS_Compilation_Units");
package Tree_Table is new Table.Table (
Table_Component_Type => A4G.Tree_Rec.Tree_Record,
Table_Index_Type => A4G.A_Types.Tree_Id,
Table_Low_Bound => A4G.A_Types.First_Tree_Id,
Table_Initial => A4G.A_Alloc.Alloc_ASIS_Trees_Initial,
Table_Increment => A4G.A_Alloc.Alloc_ASIS_Trees_Increment,
Table_Name => "ASIS_Trees");
subtype Directory_List_Ptr is Argument_List_Access;
subtype Tree_File_List_Ptr is Argument_List_Access;
type Saved_Context is record
Context_Name_Chars : A_Name_Chars.Saved_Table;
Context_Unit_Lists : A4G.A_Elists.Saved_Lists;
Units : Unit_Table.Saved_Table;
Trees : Tree_Table.Saved_Table;
end record;
--------------------
-- Context Record --
--------------------
type Context_Record is record -- the field should be commented also here!!!
---------------------------------------------------
-- General Context/Context Attributes and Fields --
---------------------------------------------------
Name : String_Access;
Parameters : String_Access;
-- to keep the parameters set by the ASIS Associate routine
GCC : String_Access;
-- If non-null, contains the full path to the compiler to be used when
-- creating trees on the fly. (If null, the standard gcc/GNAT
-- installation is used)
Is_Associated : Boolean := False;
Is_Opened : Boolean := False;
Opened_At : ASIS_OS_Time := Last_ASIS_OS_Time;
-- when an application opens a Context, we store the time of opening;
-- we need it to check whether an Element or a Compilation_Unit in
-- use has been obtained after the last opening of this Context
Specs : Natural;
Bodies : Natural;
-- counters for library_units_declarations and library_unit_bodies/
-- subunits (respectively) contained in a Context. We need them to
-- optimize processing of the queries Compilation_Units,
-- Libary_Unit_Declarations and Compilation_Unit_Bodies from
-- Asis.Compilation_Units and to make the difference between "regular"
-- and nonexistent units. Last for Context's Unit table gives us the
-- whole number of all the units, including nonexistent ones.
-------------------------------------
-- Fields for Context's Unit Table --
-------------------------------------
Hash_Table : Hash_Array; -- hash table for Unit Table
Current_Main_Unit : Unit_Id;
-- The variable to store the Id of the Unit corresponding to the
-- main unit of the currently accessed tree
-- ----------------------------------------------...
-- | Nil | |...|XXX| | | | |
-- | Unit | |...|XXX| | | | | <- Unit Table
-- ----------------------------------------------...
-- ^ ^ ^ ^ ^
-- | | | | |
-- | ----------------|
-- Current_Main_Unit |
-- |
-- for all of these Units
-- Is_New (C, Unit) = True
------------------
-- Search Paths --
------------------
-- we do not know the number of the directories in a path, so we have
-- to use pointers to the arrays of the pointers to strings
Source_Path : Directory_List_Ptr;
-- The search path for the source files
Object_Path : Directory_List_Ptr;
-- The search path for library (that is, object + ALI) files
Tree_Path : Directory_List_Ptr;
-- The search path for the tree output files
Context_I_Options : Directory_List_Ptr;
-- Source search path for GNAT or another tree builder, when it is
-- called from inside ASIS to create a tree output file "on the fly"
-- ("I" comes after "-I" gcc/GNAT option). The corresponding search
-- path is obtained form the value of the Source_Path field by
-- prepending "-I" to each directory name kept in Source_Path and
-- by appending "-I-" element to this path
Context_Tree_Files : Tree_File_List_Ptr;
Back_Up : Saved_Context;
Mode : Context_Mode := All_Trees;
Tree_Processing : Tree_Mode := Pre_Created;
Source_Processing : Source_Mode := All_Sources;
Use_Default_Trees : Boolean := False;
-- If set On, the value of the GNAT environment variable
-- ADA_OBJECTS_PATH is appended to Object_Path
end record;
-------------------
-- Context Table --
-------------------
package Contexts is new Table.Table (
Table_Component_Type => Context_Record,
Table_Index_Type => Context_Id,
Table_Low_Bound => First_Context_Id,
Table_Initial => Alloc_Contexts_Initial,
Table_Increment => Alloc_Contexts_Increment,
Table_Name => "ASIS_Contexts");
------------------------------------------------------
-- "Back-Up" Name Buffer for NB_Save and NB_Restore --
------------------------------------------------------
Backup_Name_Buffer : String (1 .. Hostparm.Max_Name_Length);
Backup_Name_Len : Natural := 0;
-- ??? is it the right place for these declarations???
Current_Tree : Tree_Id := Nil_Tree;
-- This is the tree, which is being currently accessed by ASIS.
-- The Initialize procedure sets Current_Tree equal to Nil_Tree.
Current_Context : Context_Id := Non_Associated;
-- This is the Context to which the currently accessed tree belongs.
-- The Initialize procedure sets Current_Context equal to Non_Associated.
First_New_Unit : Unit_Id;
-- In the Incremental Context mode stores the first unit registered
-- from the newly created tree. Then used by Set_All_Dependencies routine
-- to collect full dependencies only for the units added to the Context
end A4G.Contt;
| 44.646409 | 79 | 0.555212 |
df4468b23812bf65fb76673cc466642e32f46bc5 | 17,257 | adb | Ada | Ada95/samples/ncurses2-trace_set.adb | Ancient-Rom/android_external_libncurses | cfb80399910df8d55602d879d5cf0bc5ceaa2f89 | [
"X11"
] | 1,167 | 2017-08-21T21:21:24.000Z | 2022-03-31T15:42:10.000Z | vendor/ncurses/Ada95/samples/ncurses2-trace_set.adb | motor-admin/ruby-packer | 0a2a888d3facaa66c53ee7da008f7a49d479fce1 | [
"MIT"
] | 374 | 2015-11-03T12:37:22.000Z | 2021-12-17T14:18:08.000Z | vendor/ncurses/Ada95/samples/ncurses2-trace_set.adb | motor-admin/ruby-packer | 0a2a888d3facaa66c53ee7da008f7a49d479fce1 | [
"MIT"
] | 96 | 2015-11-22T07:47:26.000Z | 2022-01-20T19:52:19.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- ncurses2.trace_set --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 2000-2011,2014 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 <[email protected]> 2000
-- Version Control
-- $Revision: 1.6 $
-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
with Terminal_Interface.Curses.Trace; use Terminal_Interface.Curses.Trace;
with Terminal_Interface.Curses.Menus; use Terminal_Interface.Curses.Menus;
with Ada.Strings.Bounded;
-- interactively set the trace level
procedure ncurses2.trace_set is
function menu_virtualize (c : Key_Code) return Key_Code;
function subset (super, sub : Trace_Attribute_Set) return Boolean;
function trace_or (a, b : Trace_Attribute_Set) return Trace_Attribute_Set;
function trace_num (tlevel : Trace_Attribute_Set) return String;
function tracetrace (tlevel : Trace_Attribute_Set) return String;
function run_trace_menu (m : Menu; count : Integer) return Boolean;
function menu_virtualize (c : Key_Code) return Key_Code is
begin
case c is
when Character'Pos (newl) | Key_Exit =>
return Menu_Request_Code'Last + 1; -- MAX_COMMAND? TODO
when Character'Pos ('u') =>
return M_ScrollUp_Line;
when Character'Pos ('d') =>
return M_ScrollDown_Line;
when Character'Pos ('b') | Key_Next_Page =>
return M_ScrollUp_Page;
when Character'Pos ('f') | Key_Previous_Page =>
return M_ScrollDown_Page;
when Character'Pos ('n') | Key_Cursor_Down =>
return M_Next_Item;
when Character'Pos ('p') | Key_Cursor_Up =>
return M_Previous_Item;
when Character'Pos (' ') =>
return M_Toggle_Item;
when Key_Mouse =>
return c;
when others =>
Beep;
return c;
end case;
end menu_virtualize;
type string_a is access String;
type tbl_entry is record
name : string_a;
mask : Trace_Attribute_Set;
end record;
t_tbl : constant array (Positive range <>) of tbl_entry :=
(
(new String'("Disable"),
Trace_Disable),
(new String'("Times"),
Trace_Attribute_Set'(Times => True, others => False)),
(new String'("Tputs"),
Trace_Attribute_Set'(Tputs => True, others => False)),
(new String'("Update"),
Trace_Attribute_Set'(Update => True, others => False)),
(new String'("Cursor_Move"),
Trace_Attribute_Set'(Cursor_Move => True, others => False)),
(new String'("Character_Output"),
Trace_Attribute_Set'(Character_Output => True, others => False)),
(new String'("Ordinary"),
Trace_Ordinary),
(new String'("Calls"),
Trace_Attribute_Set'(Calls => True, others => False)),
(new String'("Virtual_Puts"),
Trace_Attribute_Set'(Virtual_Puts => True, others => False)),
(new String'("Input_Events"),
Trace_Attribute_Set'(Input_Events => True, others => False)),
(new String'("TTY_State"),
Trace_Attribute_Set'(TTY_State => True, others => False)),
(new String'("Internal_Calls"),
Trace_Attribute_Set'(Internal_Calls => True, others => False)),
(new String'("Character_Calls"),
Trace_Attribute_Set'(Character_Calls => True, others => False)),
(new String'("Termcap_TermInfo"),
Trace_Attribute_Set'(Termcap_TermInfo => True, others => False)),
(new String'("Maximium"),
Trace_Maximum)
);
package BS is new Ada.Strings.Bounded.Generic_Bounded_Length (300);
function subset (super, sub : Trace_Attribute_Set) return Boolean is
begin
if
(super.Times or not sub.Times) and
(super.Tputs or not sub.Tputs) and
(super.Update or not sub.Update) and
(super.Cursor_Move or not sub.Cursor_Move) and
(super.Character_Output or not sub.Character_Output) and
(super.Calls or not sub.Calls) and
(super.Virtual_Puts or not sub.Virtual_Puts) and
(super.Input_Events or not sub.Input_Events) and
(super.TTY_State or not sub.TTY_State) and
(super.Internal_Calls or not sub.Internal_Calls) and
(super.Character_Calls or not sub.Character_Calls) and
(super.Termcap_TermInfo or not sub.Termcap_TermInfo) and
True
then
return True;
else
return False;
end if;
end subset;
function trace_or (a, b : Trace_Attribute_Set) return Trace_Attribute_Set is
retval : Trace_Attribute_Set := Trace_Disable;
begin
retval.Times := (a.Times or b.Times);
retval.Tputs := (a.Tputs or b.Tputs);
retval.Update := (a.Update or b.Update);
retval.Cursor_Move := (a.Cursor_Move or b.Cursor_Move);
retval.Character_Output := (a.Character_Output or b.Character_Output);
retval.Calls := (a.Calls or b.Calls);
retval.Virtual_Puts := (a.Virtual_Puts or b.Virtual_Puts);
retval.Input_Events := (a.Input_Events or b.Input_Events);
retval.TTY_State := (a.TTY_State or b.TTY_State);
retval.Internal_Calls := (a.Internal_Calls or b.Internal_Calls);
retval.Character_Calls := (a.Character_Calls or b.Character_Calls);
retval.Termcap_TermInfo := (a.Termcap_TermInfo or b.Termcap_TermInfo);
return retval;
end trace_or;
-- Print the hexadecimal value of the mask so
-- users can set it from the command line.
function trace_num (tlevel : Trace_Attribute_Set) return String is
result : Integer := 0;
m : Integer := 1;
begin
if tlevel.Times then
result := result + m;
end if;
m := m * 2;
if tlevel.Tputs then
result := result + m;
end if;
m := m * 2;
if tlevel.Update then
result := result + m;
end if;
m := m * 2;
if tlevel.Cursor_Move then
result := result + m;
end if;
m := m * 2;
if tlevel.Character_Output then
result := result + m;
end if;
m := m * 2;
if tlevel.Calls then
result := result + m;
end if;
m := m * 2;
if tlevel.Virtual_Puts then
result := result + m;
end if;
m := m * 2;
if tlevel.Input_Events then
result := result + m;
end if;
m := m * 2;
if tlevel.TTY_State then
result := result + m;
end if;
m := m * 2;
if tlevel.Internal_Calls then
result := result + m;
end if;
m := m * 2;
if tlevel.Character_Calls then
result := result + m;
end if;
m := m * 2;
if tlevel.Termcap_TermInfo then
result := result + m;
end if;
m := m * 2;
return result'Img;
end trace_num;
function tracetrace (tlevel : Trace_Attribute_Set) return String is
use BS;
buf : Bounded_String := To_Bounded_String ("");
begin
-- The C version prints the hexadecimal value of the mask, we
-- won't do that here because this is Ada.
if tlevel = Trace_Disable then
Append (buf, "Trace_Disable");
else
if subset (tlevel,
Trace_Attribute_Set'(Times => True, others => False))
then
Append (buf, "Times");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Tputs => True, others => False))
then
Append (buf, "Tputs");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Update => True, others => False))
then
Append (buf, "Update");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Cursor_Move => True,
others => False))
then
Append (buf, "Cursor_Move");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Character_Output => True,
others => False))
then
Append (buf, "Character_Output");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Ordinary)
then
Append (buf, "Ordinary");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Calls => True, others => False))
then
Append (buf, "Calls");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Virtual_Puts => True,
others => False))
then
Append (buf, "Virtual_Puts");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Input_Events => True,
others => False))
then
Append (buf, "Input_Events");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(TTY_State => True,
others => False))
then
Append (buf, "TTY_State");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Internal_Calls => True,
others => False))
then
Append (buf, "Internal_Calls");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Character_Calls => True,
others => False))
then
Append (buf, "Character_Calls");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Termcap_TermInfo => True,
others => False))
then
Append (buf, "Termcap_TermInfo");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Maximum)
then
Append (buf, "Maximium");
Append (buf, ", ");
end if;
end if;
if To_String (buf) (Length (buf) - 1) = ',' then
Delete (buf, Length (buf) - 1, Length (buf));
end if;
return To_String (buf);
end tracetrace;
function run_trace_menu (m : Menu; count : Integer) return Boolean is
i, p : Item;
changed : Boolean;
c, v : Key_Code;
begin
loop
changed := (count /= 0);
c := Getchar (Get_Window (m));
v := menu_virtualize (c);
case Driver (m, v) is
when Unknown_Request =>
return False;
when others =>
i := Current (m);
if i = Menus.Items (m, 1) then -- the first item
for n in t_tbl'First + 1 .. t_tbl'Last loop
if Value (i) then
Set_Value (i, False);
changed := True;
end if;
end loop;
else
for n in t_tbl'First + 1 .. t_tbl'Last loop
p := Menus.Items (m, n);
if Value (p) then
Set_Value (Menus.Items (m, 1), False);
changed := True;
exit;
end if;
end loop;
end if;
if not changed then
return True;
end if;
end case;
end loop;
end run_trace_menu;
nc_tracing, mask : Trace_Attribute_Set;
pragma Import (C, nc_tracing, "_nc_tracing");
items_a : constant Item_Array_Access :=
new Item_Array (t_tbl'First .. t_tbl'Last + 1);
mrows : Line_Count;
mcols : Column_Count;
menuwin : Window;
menu_y : constant Line_Position := 8;
menu_x : constant Column_Position := 8;
ip : Item;
m : Menu;
count : Integer;
newtrace : Trace_Attribute_Set;
begin
Add (Line => 0, Column => 0, Str => "Interactively set trace level:");
Add (Line => 2, Column => 0,
Str => " Press space bar to toggle a selection.");
Add (Line => 3, Column => 0,
Str => " Use up and down arrow to move the select bar.");
Add (Line => 4, Column => 0,
Str => " Press return to set the trace level.");
Add (Line => 6, Column => 0, Str => "(Current trace level is ");
Add (Str => tracetrace (nc_tracing) & " numerically: " &
trace_num (nc_tracing));
Add (Ch => ')');
Refresh;
for n in t_tbl'Range loop
items_a.all (n) := New_Item (t_tbl (n).name.all);
end loop;
items_a.all (t_tbl'Last + 1) := Null_Item;
m := New_Menu (items_a);
Set_Format (m, 16, 2);
Scale (m, mrows, mcols);
Switch_Options (m, (One_Valued => True, others => False), On => False);
menuwin := New_Window (mrows + 2, mcols + 2, menu_y, menu_x);
Set_Window (m, menuwin);
Set_KeyPad_Mode (menuwin, SwitchOn => True);
Box (menuwin);
Set_Sub_Window (m, Derived_Window (menuwin, mrows, mcols, 1, 1));
Post (m);
for n in t_tbl'Range loop
ip := Items (m, n);
mask := t_tbl (n).mask;
if mask = Trace_Disable then
Set_Value (ip, nc_tracing = Trace_Disable);
elsif subset (sub => mask, super => nc_tracing) then
Set_Value (ip, True);
end if;
end loop;
count := 1;
while run_trace_menu (m, count) loop
count := count + 1;
end loop;
newtrace := Trace_Disable;
for n in t_tbl'Range loop
ip := Items (m, n);
if Value (ip) then
mask := t_tbl (n).mask;
newtrace := trace_or (newtrace, mask);
end if;
end loop;
Trace_On (newtrace);
Trace_Put ("trace level interactively set to " &
tracetrace (nc_tracing));
Move_Cursor (Line => Lines - 4, Column => 0);
Add (Str => "Trace level is ");
Add (Str => tracetrace (nc_tracing));
Add (Ch => newl);
Pause; -- was just Add(); Getchar
Post (m, False);
-- menuwin has subwindows I think, which makes an error.
declare begin
Delete (menuwin);
exception when Curses_Exception => null; end;
-- free_menu(m);
-- free_item()
end ncurses2.trace_set;
| 34.792339 | 79 | 0.520137 |
df72f7337dc3443f5e32c33007574d274b2ef239 | 534 | ads | Ada | source/web_io.ads | jquorning/iDoNu | 1618b679f7d0895729dded62f22b0826e7da7cb1 | [
"blessing"
] | 1 | 2016-08-09T20:47:23.000Z | 2016-08-09T20:47:23.000Z | source/web_io.ads | jquorning/iDoNu | 1618b679f7d0895729dded62f22b0826e7da7cb1 | [
"blessing"
] | null | null | null | source/web_io.ads | jquorning/iDoNu | 1618b679f7d0895729dded62f22b0826e7da7cb1 | [
"blessing"
] | null | null | null | --
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive others.
-- May you share freely, not taking more than you give.
--
with Types;
package Web_IO is
subtype HTML_String is String;
function Help_Image return HTML_String;
function Jobs_Image return HTML_String;
function Job_Image (Job : in Types.Job_Id)
return HTML_String;
end Web_IO;
| 22.25 | 68 | 0.691011 |
1c3c3b8b0e48c31c3da08ae28cbbd30606c085b7 | 2,135 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c9/c95080b.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c9/c95080b.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c9/c95080b.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- C95080B.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 PARAMETERLESS ENTRIES CAN BE CALLED WITH THE APPROPRIATE
-- NOTATION.
-- JWC 7/15/85
-- JRK 8/21/85
WITH REPORT; USE REPORT;
PROCEDURE C95080B IS
I : INTEGER := 1;
TASK T IS
ENTRY E;
ENTRY EF (1..3);
END T;
TASK BODY T IS
BEGIN
ACCEPT E DO
I := 15;
END E;
ACCEPT EF (2) DO
I := 20;
END EF;
END T;
BEGIN
TEST ("C95080B", "CHECK THAT PARAMETERLESS ENTRIES CAN BE " &
"CALLED");
T.E;
IF I /= 15 THEN
FAILED ("PARAMETERLESS ENTRY CALL YIELDS INCORRECT " &
"RESULT");
END IF;
I := 0;
T.EF (2);
IF I /= 20 THEN
FAILED ("PARAMETERLESS ENTRY FAMILY CALL YIELDS " &
"INCORRECT RESULT");
END IF;
RESULT;
END C95080B;
| 29.652778 | 79 | 0.596721 |
106b5520288c8b349a3bf775c753177037efba0d | 245 | adb | Ada | test/scanning-test/protypo-scanning-test.adb | fintatarta/protypo | c0c2bca17bc766ab95acc99b7422485388a10cb4 | [
"MIT"
] | null | null | null | test/scanning-test/protypo-scanning-test.adb | fintatarta/protypo | c0c2bca17bc766ab95acc99b7422485388a10cb4 | [
"MIT"
] | 4 | 2019-10-09T11:16:38.000Z | 2019-10-09T11:20:38.000Z | test/scanning-test/protypo-scanning-test.adb | fintatarta/protypo | c0c2bca17bc766ab95acc99b7422485388a10cb4 | [
"MIT"
] | null | null | null | with Protypo.Api.Interpreters;
procedure Protypo.Scanning.Test is
begin
-- Dump (Tokenize ("\wpitem{#WP.index}{#WP.start}{#WP.end}"));
Dump (Tokenize (Api.Interpreters.Slurp ("test-data/scanner.txt"), ""));
end Protypo.Scanning.Test;
| 30.625 | 74 | 0.693878 |
1c8232d1c83aa87654f71d519e99962ab49e36a7 | 39,469 | adb | Ada | src/gnat/sinput.adb | jquorning/dynamo | 10d68571476c270b8e45a9c5ef585fa9139b0d05 | [
"Apache-2.0"
] | 15 | 2015-01-18T23:04:19.000Z | 2022-03-01T20:27:08.000Z | src/gnat/sinput.adb | jquorning/dynamo | 10d68571476c270b8e45a9c5ef585fa9139b0d05 | [
"Apache-2.0"
] | 16 | 2018-06-10T07:09:30.000Z | 2022-03-26T18:28:40.000Z | src/gnat/sinput.adb | jquorning/dynamo | 10d68571476c270b8e45a9c5ef585fa9139b0d05 | [
"Apache-2.0"
] | 3 | 2015-11-11T18:00:14.000Z | 2022-01-30T23:08:45.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S I N P U T --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- 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 Style_Checks (All_Checks);
-- Subprograms not all in alpha order
with Atree; use Atree;
with Debug; use Debug;
with Opt; use Opt;
with Output; use Output;
with Scans; use Scans;
with Tree_IO; use Tree_IO;
with Widechar; use Widechar;
with GNAT.Byte_Order_Mark; use GNAT.Byte_Order_Mark;
with System; use System;
with System.Memory;
with System.WCh_Con; use System.WCh_Con;
with Unchecked_Conversion;
with Unchecked_Deallocation;
package body Sinput is
use ASCII;
-- Make control characters visible
First_Time_Around : Boolean := True;
-- This needs a comment ???
-- Routines to support conversion between types Lines_Table_Ptr,
-- Logical_Lines_Table_Ptr and System.Address.
pragma Warnings (Off);
-- These unchecked conversions are aliasing safe, since they are never
-- used to construct improperly aliased pointer values.
function To_Address is
new Unchecked_Conversion (Lines_Table_Ptr, Address);
function To_Address is
new Unchecked_Conversion (Logical_Lines_Table_Ptr, Address);
function To_Pointer is
new Unchecked_Conversion (Address, Lines_Table_Ptr);
function To_Pointer is
new Unchecked_Conversion (Address, Logical_Lines_Table_Ptr);
pragma Warnings (On);
---------------------------
-- Add_Line_Tables_Entry --
---------------------------
procedure Add_Line_Tables_Entry
(S : in out Source_File_Record;
P : Source_Ptr)
is
LL : Physical_Line_Number;
begin
-- Reallocate the lines tables if necessary
-- Note: the reason we do not use the normal Table package
-- mechanism is that we have several of these tables. We could
-- use the new GNAT.Dynamic_Tables package and that would probably
-- be a good idea ???
if S.Last_Source_Line = S.Lines_Table_Max then
Alloc_Line_Tables
(S,
Int (S.Last_Source_Line) *
((100 + Alloc.Lines_Increment) / 100));
if Debug_Flag_D then
Write_Str ("--> Reallocating lines table, size = ");
Write_Int (Int (S.Lines_Table_Max));
Write_Eol;
end if;
end if;
S.Last_Source_Line := S.Last_Source_Line + 1;
LL := S.Last_Source_Line;
S.Lines_Table (LL) := P;
-- Deal with setting new entry in logical lines table if one is
-- present. Note that there is always space (because the call to
-- Alloc_Line_Tables makes sure both tables are the same length),
if S.Logical_Lines_Table /= null then
-- We can always set the entry from the previous one, because
-- the processing for a Source_Reference pragma ensures that
-- at least one entry following the pragma is set up correctly.
S.Logical_Lines_Table (LL) := S.Logical_Lines_Table (LL - 1) + 1;
end if;
end Add_Line_Tables_Entry;
-----------------------
-- Alloc_Line_Tables --
-----------------------
procedure Alloc_Line_Tables
(S : in out Source_File_Record;
New_Max : Nat)
is
subtype size_t is Memory.size_t;
New_Table : Lines_Table_Ptr;
New_Logical_Table : Logical_Lines_Table_Ptr;
New_Size : constant size_t :=
size_t (New_Max * Lines_Table_Type'Component_Size /
Storage_Unit);
begin
if S.Lines_Table = null then
New_Table := To_Pointer (Memory.Alloc (New_Size));
else
New_Table :=
To_Pointer (Memory.Realloc (To_Address (S.Lines_Table), New_Size));
end if;
if New_Table = null then
raise Storage_Error;
else
S.Lines_Table := New_Table;
S.Lines_Table_Max := Physical_Line_Number (New_Max);
end if;
if S.Num_SRef_Pragmas /= 0 then
if S.Logical_Lines_Table = null then
New_Logical_Table := To_Pointer (Memory.Alloc (New_Size));
else
New_Logical_Table := To_Pointer
(Memory.Realloc (To_Address (S.Logical_Lines_Table), New_Size));
end if;
if New_Logical_Table = null then
raise Storage_Error;
else
S.Logical_Lines_Table := New_Logical_Table;
end if;
end if;
end Alloc_Line_Tables;
-----------------
-- Backup_Line --
-----------------
procedure Backup_Line (P : in out Source_Ptr) is
Sindex : constant Source_File_Index := Get_Source_File_Index (P);
Src : constant Source_Buffer_Ptr :=
Source_File.Table (Sindex).Source_Text;
Sfirst : constant Source_Ptr :=
Source_File.Table (Sindex).Source_First;
begin
P := P - 1;
if P = Sfirst then
return;
end if;
if Src (P) = CR then
if Src (P - 1) = LF then
P := P - 1;
end if;
else -- Src (P) = LF
if Src (P - 1) = CR then
P := P - 1;
end if;
end if;
-- Now find first character of the previous line
while P > Sfirst
and then Src (P - 1) /= LF
and then Src (P - 1) /= CR
loop
P := P - 1;
end loop;
end Backup_Line;
---------------------------
-- Build_Location_String --
---------------------------
procedure Build_Location_String (Loc : Source_Ptr) is
Ptr : Source_Ptr;
begin
-- Loop through instantiations
Ptr := Loc;
loop
Get_Name_String_And_Append
(Reference_Name (Get_Source_File_Index (Ptr)));
Add_Char_To_Name_Buffer (':');
Add_Nat_To_Name_Buffer (Nat (Get_Logical_Line_Number (Ptr)));
Ptr := Instantiation_Location (Ptr);
exit when Ptr = No_Location;
Add_Str_To_Name_Buffer (" instantiated at ");
end loop;
Name_Buffer (Name_Len + 1) := NUL;
return;
end Build_Location_String;
function Build_Location_String (Loc : Source_Ptr) return String is
begin
Name_Len := 0;
Build_Location_String (Loc);
return Name_Buffer (1 .. Name_Len);
end Build_Location_String;
-------------------
-- Check_For_BOM --
-------------------
procedure Check_For_BOM is
BOM : BOM_Kind;
Len : Natural;
Tst : String (1 .. 5);
C : Character;
begin
for J in 1 .. 5 loop
C := Source (Scan_Ptr + Source_Ptr (J) - 1);
-- Definitely no BOM if EOF character marks either end of file, or
-- an illegal non-BOM character if not at the end of file.
if C = EOF then
return;
end if;
Tst (J) := C;
end loop;
Read_BOM (Tst, Len, BOM, False);
case BOM is
when UTF8_All =>
Scan_Ptr := Scan_Ptr + Source_Ptr (Len);
Wide_Character_Encoding_Method := WCEM_UTF8;
Upper_Half_Encoding := True;
when UTF16_LE | UTF16_BE =>
Set_Standard_Error;
Write_Line ("UTF-16 encoding format not recognized");
Set_Standard_Output;
raise Unrecoverable_Error;
when UTF32_LE | UTF32_BE =>
Set_Standard_Error;
Write_Line ("UTF-32 encoding format not recognized");
Set_Standard_Output;
raise Unrecoverable_Error;
when Unknown =>
null;
when others =>
raise Program_Error;
end case;
end Check_For_BOM;
-----------------------------
-- Comes_From_Inlined_Body --
-----------------------------
function Comes_From_Inlined_Body (S : Source_Ptr) return Boolean is
SIE : Source_File_Record renames
Source_File.Table (Get_Source_File_Index (S));
begin
return SIE.Inlined_Body;
end Comes_From_Inlined_Body;
-----------------------
-- Get_Column_Number --
-----------------------
function Get_Column_Number (P : Source_Ptr) return Column_Number is
S : Source_Ptr;
C : Column_Number;
Sindex : Source_File_Index;
Src : Source_Buffer_Ptr;
begin
-- If the input source pointer is not a meaningful value then return
-- at once with column number 1. This can happen for a file not found
-- condition for a file loaded indirectly by RTE, and also perhaps on
-- some unknown internal error conditions. In either case we certainly
-- don't want to blow up.
if P < 1 then
return 1;
else
Sindex := Get_Source_File_Index (P);
Src := Source_File.Table (Sindex).Source_Text;
S := Line_Start (P);
C := 1;
while S < P loop
if Src (S) = HT then
C := (C - 1) / 8 * 8 + (8 + 1);
S := S + 1;
-- Deal with wide character case, but don't include brackets
-- notation in this circuit, since we know that this will
-- display unencoded (no one encodes brackets notation).
elsif Src (S) /= '[' and then Is_Start_Of_Wide_Char (Src, S) then
C := C + 1;
Skip_Wide (Src, S);
-- Normal (non-wide) character case or brackets sequence
else
C := C + 1;
S := S + 1;
end if;
end loop;
return C;
end if;
end Get_Column_Number;
-----------------------------
-- Get_Logical_Line_Number --
-----------------------------
function Get_Logical_Line_Number
(P : Source_Ptr) return Logical_Line_Number
is
SFR : Source_File_Record
renames Source_File.Table (Get_Source_File_Index (P));
L : constant Physical_Line_Number := Get_Physical_Line_Number (P);
begin
if SFR.Num_SRef_Pragmas = 0 then
return Logical_Line_Number (L);
else
return SFR.Logical_Lines_Table (L);
end if;
end Get_Logical_Line_Number;
---------------------------------
-- Get_Logical_Line_Number_Img --
---------------------------------
function Get_Logical_Line_Number_Img
(P : Source_Ptr) return String
is
begin
Name_Len := 0;
Add_Nat_To_Name_Buffer (Nat (Get_Logical_Line_Number (P)));
return Name_Buffer (1 .. Name_Len);
end Get_Logical_Line_Number_Img;
------------------------------
-- Get_Physical_Line_Number --
------------------------------
function Get_Physical_Line_Number
(P : Source_Ptr) return Physical_Line_Number
is
Sfile : Source_File_Index;
Table : Lines_Table_Ptr;
Lo : Physical_Line_Number;
Hi : Physical_Line_Number;
Mid : Physical_Line_Number;
Loc : Source_Ptr;
begin
-- If the input source pointer is not a meaningful value then return
-- at once with line number 1. This can happen for a file not found
-- condition for a file loaded indirectly by RTE, and also perhaps on
-- some unknown internal error conditions. In either case we certainly
-- don't want to blow up.
if P < 1 then
return 1;
-- Otherwise we can do the binary search
else
Sfile := Get_Source_File_Index (P);
Loc := P + Source_File.Table (Sfile).Sloc_Adjust;
Table := Source_File.Table (Sfile).Lines_Table;
Lo := 1;
Hi := Source_File.Table (Sfile).Last_Source_Line;
loop
Mid := (Lo + Hi) / 2;
if Loc < Table (Mid) then
Hi := Mid - 1;
else -- Loc >= Table (Mid)
if Mid = Hi or else
Loc < Table (Mid + 1)
then
return Mid;
else
Lo := Mid + 1;
end if;
end if;
end loop;
end if;
end Get_Physical_Line_Number;
---------------------------
-- Get_Source_File_Index --
---------------------------
function Get_Source_File_Index (S : Source_Ptr) return Source_File_Index is
begin
return Source_File_Index_Table (Int (S) / Source_Align);
end Get_Source_File_Index;
----------------
-- Initialize --
----------------
procedure Initialize is
begin
Source_gnat_adc := No_Source_File;
First_Time_Around := True;
Source_File.Init;
Instances.Init;
Instances.Append (No_Location);
pragma Assert (Instances.Last = No_Instance_Id);
end Initialize;
-------------------
-- Instantiation --
-------------------
function Instantiation (S : SFI) return Source_Ptr is
SIE : Source_File_Record renames Source_File.Table (S);
begin
if SIE.Inlined_Body then
return SIE.Inlined_Call;
else
return Instances.Table (SIE.Instance);
end if;
end Instantiation;
-------------------------
-- Instantiation_Depth --
-------------------------
function Instantiation_Depth (S : Source_Ptr) return Nat is
Sind : Source_File_Index;
Sval : Source_Ptr;
Depth : Nat;
begin
Sval := S;
Depth := 0;
loop
Sind := Get_Source_File_Index (Sval);
Sval := Instantiation (Sind);
exit when Sval = No_Location;
Depth := Depth + 1;
end loop;
return Depth;
end Instantiation_Depth;
----------------------------
-- Instantiation_Location --
----------------------------
function Instantiation_Location (S : Source_Ptr) return Source_Ptr is
begin
return Instantiation (Get_Source_File_Index (S));
end Instantiation_Location;
--------------------------
-- Iterate_On_Instances --
--------------------------
procedure Iterate_On_Instances is
begin
for J in 1 .. Instances.Last loop
Process (J, Instances.Table (J));
end loop;
end Iterate_On_Instances;
----------------------
-- Last_Source_File --
----------------------
function Last_Source_File return Source_File_Index is
begin
return Source_File.Last;
end Last_Source_File;
----------------
-- Line_Start --
----------------
function Line_Start (P : Source_Ptr) return Source_Ptr is
Sindex : constant Source_File_Index := Get_Source_File_Index (P);
Src : constant Source_Buffer_Ptr :=
Source_File.Table (Sindex).Source_Text;
Sfirst : constant Source_Ptr :=
Source_File.Table (Sindex).Source_First;
S : Source_Ptr;
begin
S := P;
while S > Sfirst
and then Src (S - 1) /= CR
and then Src (S - 1) /= LF
loop
S := S - 1;
end loop;
return S;
end Line_Start;
function Line_Start
(L : Physical_Line_Number;
S : Source_File_Index) return Source_Ptr
is
begin
return Source_File.Table (S).Lines_Table (L);
end Line_Start;
----------
-- Lock --
----------
procedure Lock is
begin
Source_File.Locked := True;
Source_File.Release;
end Lock;
----------------------
-- Num_Source_Files --
----------------------
function Num_Source_Files return Nat is
begin
return Int (Source_File.Last) - Int (Source_File.First) + 1;
end Num_Source_Files;
----------------------
-- Num_Source_Lines --
----------------------
function Num_Source_Lines (S : Source_File_Index) return Nat is
begin
return Nat (Source_File.Table (S).Last_Source_Line);
end Num_Source_Lines;
-----------------------
-- Original_Location --
-----------------------
function Original_Location (S : Source_Ptr) return Source_Ptr is
Sindex : Source_File_Index;
Tindex : Source_File_Index;
begin
if S <= No_Location then
return S;
else
Sindex := Get_Source_File_Index (S);
if Instantiation (Sindex) = No_Location then
return S;
else
Tindex := Template (Sindex);
while Instantiation (Tindex) /= No_Location loop
Tindex := Template (Tindex);
end loop;
return S - Source_First (Sindex) + Source_First (Tindex);
end if;
end if;
end Original_Location;
-------------------------
-- Physical_To_Logical --
-------------------------
function Physical_To_Logical
(Line : Physical_Line_Number;
S : Source_File_Index) return Logical_Line_Number
is
SFR : Source_File_Record renames Source_File.Table (S);
begin
if SFR.Num_SRef_Pragmas = 0 then
return Logical_Line_Number (Line);
else
return SFR.Logical_Lines_Table (Line);
end if;
end Physical_To_Logical;
--------------------------------
-- Register_Source_Ref_Pragma --
--------------------------------
procedure Register_Source_Ref_Pragma
(File_Name : File_Name_Type;
Stripped_File_Name : File_Name_Type;
Mapped_Line : Nat;
Line_After_Pragma : Physical_Line_Number)
is
subtype size_t is Memory.size_t;
SFR : Source_File_Record renames Source_File.Table (Current_Source_File);
ML : Logical_Line_Number;
begin
if File_Name /= No_File then
SFR.Reference_Name := Stripped_File_Name;
SFR.Full_Ref_Name := File_Name;
if not Debug_Generated_Code then
SFR.Debug_Source_Name := Stripped_File_Name;
SFR.Full_Debug_Name := File_Name;
end if;
SFR.Num_SRef_Pragmas := SFR.Num_SRef_Pragmas + 1;
end if;
if SFR.Num_SRef_Pragmas = 1 then
SFR.First_Mapped_Line := Logical_Line_Number (Mapped_Line);
end if;
if SFR.Logical_Lines_Table = null then
SFR.Logical_Lines_Table := To_Pointer
(Memory.Alloc
(size_t (SFR.Lines_Table_Max *
Logical_Lines_Table_Type'Component_Size /
Storage_Unit)));
end if;
SFR.Logical_Lines_Table (Line_After_Pragma - 1) := No_Line_Number;
ML := Logical_Line_Number (Mapped_Line);
for J in Line_After_Pragma .. SFR.Last_Source_Line loop
SFR.Logical_Lines_Table (J) := ML;
ML := ML + 1;
end loop;
end Register_Source_Ref_Pragma;
---------------------------------
-- Set_Source_File_Index_Table --
---------------------------------
procedure Set_Source_File_Index_Table (Xnew : Source_File_Index) is
Ind : Int;
SP : Source_Ptr;
SL : constant Source_Ptr := Source_File.Table (Xnew).Source_Last;
begin
SP := Source_File.Table (Xnew).Source_First;
pragma Assert (SP mod Source_Align = 0);
Ind := Int (SP) / Source_Align;
while SP <= SL loop
Source_File_Index_Table (Ind) := Xnew;
SP := SP + Source_Align;
Ind := Ind + 1;
end loop;
end Set_Source_File_Index_Table;
---------------------------
-- Skip_Line_Terminators --
---------------------------
procedure Skip_Line_Terminators
(P : in out Source_Ptr;
Physical : out Boolean)
is
Chr : constant Character := Source (P);
begin
if Chr = CR then
if Source (P + 1) = LF then
P := P + 2;
else
P := P + 1;
end if;
elsif Chr = LF then
P := P + 1;
elsif Chr = FF or else Chr = VT then
P := P + 1;
Physical := False;
return;
-- Otherwise we have a wide character
else
Skip_Wide (Source, P);
end if;
-- Fall through in the physical line terminator case. First deal with
-- making a possible entry into the lines table if one is needed.
-- Note: we are dealing with a real source file here, this cannot be
-- the instantiation case, so we need not worry about Sloc adjustment.
declare
S : Source_File_Record
renames Source_File.Table (Current_Source_File);
begin
Physical := True;
-- Make entry in lines table if not already made (in some scan backup
-- cases, we will be rescanning previously scanned source, so the
-- entry may have already been made on the previous forward scan).
if Source (P) /= EOF
and then P > S.Lines_Table (S.Last_Source_Line)
then
Add_Line_Tables_Entry (S, P);
end if;
end;
end Skip_Line_Terminators;
----------------
-- Sloc_Range --
----------------
procedure Sloc_Range (N : Node_Id; Min, Max : out Source_Ptr) is
function Process (N : Node_Id) return Traverse_Result;
-- Process function for traversing the node tree
procedure Traverse is new Traverse_Proc (Process);
-------------
-- Process --
-------------
function Process (N : Node_Id) return Traverse_Result is
Orig : constant Node_Id := Original_Node (N);
begin
if Sloc (Orig) < Min then
if Sloc (Orig) > No_Location then
Min := Sloc (Orig);
end if;
elsif Sloc (Orig) > Max then
if Sloc (Orig) > No_Location then
Max := Sloc (Orig);
end if;
end if;
return OK_Orig;
end Process;
-- Start of processing for Sloc_Range
begin
Min := Sloc (N);
Max := Sloc (N);
Traverse (N);
end Sloc_Range;
-------------------
-- Source_Offset --
-------------------
function Source_Offset (S : Source_Ptr) return Nat is
Sindex : constant Source_File_Index := Get_Source_File_Index (S);
Sfirst : constant Source_Ptr :=
Source_File.Table (Sindex).Source_First;
begin
return Nat (S - Sfirst);
end Source_Offset;
------------------------
-- Top_Level_Location --
------------------------
function Top_Level_Location (S : Source_Ptr) return Source_Ptr is
Oldloc : Source_Ptr;
Newloc : Source_Ptr;
begin
Newloc := S;
loop
Oldloc := Newloc;
Newloc := Instantiation_Location (Oldloc);
exit when Newloc = No_Location;
end loop;
return Oldloc;
end Top_Level_Location;
---------------
-- Tree_Read --
---------------
procedure Tree_Read is
begin
-- First we must free any old source buffer pointers
if not First_Time_Around then
for J in Source_File.First .. Source_File.Last loop
declare
S : Source_File_Record renames Source_File.Table (J);
procedure Free_Ptr is new Unchecked_Deallocation
(Big_Source_Buffer, Source_Buffer_Ptr);
pragma Warnings (Off);
-- This unchecked conversion is aliasing safe, since it is not
-- used to create improperly aliased pointer values.
function To_Source_Buffer_Ptr is new
Unchecked_Conversion (Address, Source_Buffer_Ptr);
pragma Warnings (On);
Tmp1 : Source_Buffer_Ptr;
begin
if S.Instance /= No_Instance_Id then
null;
else
-- Free the buffer, we use Free here, because we used malloc
-- or realloc directly to allocate the tables. That is
-- because we were playing the big array trick.
-- We have to recreate a proper pointer to the actual array
-- from the zero origin pointer stored in the source table.
Tmp1 :=
To_Source_Buffer_Ptr
(S.Source_Text (S.Source_First)'Address);
Free_Ptr (Tmp1);
if S.Lines_Table /= null then
Memory.Free (To_Address (S.Lines_Table));
S.Lines_Table := null;
end if;
if S.Logical_Lines_Table /= null then
Memory.Free (To_Address (S.Logical_Lines_Table));
S.Logical_Lines_Table := null;
end if;
end if;
end;
end loop;
end if;
-- Read in source file table and instance table
Source_File.Tree_Read;
Instances.Tree_Read;
-- The pointers we read in there for the source buffer and lines table
-- pointers are junk. We now read in the actual data that is referenced
-- by these two fields.
for J in Source_File.First .. Source_File.Last loop
declare
S : Source_File_Record renames Source_File.Table (J);
begin
-- For the instantiation case, we do not read in any data. Instead
-- we share the data for the generic template entry. Since the
-- template always occurs first, we can safely refer to its data.
if S.Instance /= No_Instance_Id then
declare
ST : Source_File_Record renames
Source_File.Table (S.Template);
begin
-- The lines tables are copied from the template entry
S.Lines_Table :=
Source_File.Table (S.Template).Lines_Table;
S.Logical_Lines_Table :=
Source_File.Table (S.Template).Logical_Lines_Table;
-- In the case of the source table pointer, we share the
-- same data as the generic template, but the virtual origin
-- is adjusted. For example, if the first subscript of the
-- template is 100, and that of the instantiation is 200,
-- then the instantiation pointer is obtained by subtracting
-- 100 from the template pointer.
declare
pragma Suppress (All_Checks);
pragma Warnings (Off);
-- This unchecked conversion is aliasing safe since it
-- not used to create improperly aliased pointer values.
function To_Source_Buffer_Ptr is new
Unchecked_Conversion (Address, Source_Buffer_Ptr);
pragma Warnings (On);
begin
S.Source_Text :=
To_Source_Buffer_Ptr
(ST.Source_Text
(ST.Source_First - S.Source_First)'Address);
end;
end;
-- Normal case (non-instantiation)
else
First_Time_Around := False;
S.Lines_Table := null;
S.Logical_Lines_Table := null;
Alloc_Line_Tables (S, Int (S.Last_Source_Line));
for J in 1 .. S.Last_Source_Line loop
Tree_Read_Int (Int (S.Lines_Table (J)));
end loop;
if S.Num_SRef_Pragmas /= 0 then
for J in 1 .. S.Last_Source_Line loop
Tree_Read_Int (Int (S.Logical_Lines_Table (J)));
end loop;
end if;
-- Allocate source buffer and read in the data and then set the
-- virtual origin to point to the logical zero'th element. This
-- address must be computed with subscript checks turned off.
declare
subtype B is Text_Buffer (S.Source_First .. S.Source_Last);
type Text_Buffer_Ptr is access B;
T : Text_Buffer_Ptr;
pragma Suppress (All_Checks);
pragma Warnings (Off);
-- This unchecked conversion is aliasing safe, since it is
-- never used to create improperly aliased pointer values.
function To_Source_Buffer_Ptr is new
Unchecked_Conversion (Address, Source_Buffer_Ptr);
pragma Warnings (On);
begin
T := new B;
Tree_Read_Data (T (S.Source_First)'Address,
Int (S.Source_Last) - Int (S.Source_First) + 1);
S.Source_Text := To_Source_Buffer_Ptr (T (0)'Address);
end;
end if;
end;
Set_Source_File_Index_Table (J);
end loop;
end Tree_Read;
----------------
-- Tree_Write --
----------------
procedure Tree_Write is
begin
Source_File.Tree_Write;
Instances.Tree_Write;
-- The pointers we wrote out there for the source buffer and lines
-- table pointers are junk, we now write out the actual data that
-- is referenced by these two fields.
for J in Source_File.First .. Source_File.Last loop
declare
S : Source_File_Record renames Source_File.Table (J);
begin
-- For instantiations, there is nothing to do, since the data is
-- shared with the generic template. When the tree is read, the
-- pointers must be set, but no extra data needs to be written.
if S.Instance /= No_Instance_Id then
null;
-- For the normal case, write out the data of the tables
else
-- Lines table
for J in 1 .. S.Last_Source_Line loop
Tree_Write_Int (Int (S.Lines_Table (J)));
end loop;
-- Logical lines table if present
if S.Num_SRef_Pragmas /= 0 then
for J in 1 .. S.Last_Source_Line loop
Tree_Write_Int (Int (S.Logical_Lines_Table (J)));
end loop;
end if;
-- Source buffer
Tree_Write_Data
(S.Source_Text (S.Source_First)'Address,
Int (S.Source_Last) - Int (S.Source_First) + 1);
end if;
end;
end loop;
end Tree_Write;
--------------------
-- Write_Location --
--------------------
procedure Write_Location (P : Source_Ptr) is
begin
if P = No_Location then
Write_Str ("<no location>");
elsif P <= Standard_Location then
Write_Str ("<standard location>");
else
declare
SI : constant Source_File_Index := Get_Source_File_Index (P);
begin
Write_Name (Debug_Source_Name (SI));
Write_Char (':');
Write_Int (Int (Get_Logical_Line_Number (P)));
Write_Char (':');
Write_Int (Int (Get_Column_Number (P)));
if Instantiation (SI) /= No_Location then
Write_Str (" [");
Write_Location (Instantiation (SI));
Write_Char (']');
end if;
end;
end if;
end Write_Location;
----------------------
-- Write_Time_Stamp --
----------------------
procedure Write_Time_Stamp (S : Source_File_Index) is
T : constant Time_Stamp_Type := Time_Stamp (S);
P : Natural;
begin
if T (1) = '9' then
Write_Str ("19");
P := 0;
else
Write_Char (T (1));
Write_Char (T (2));
P := 2;
end if;
Write_Char (T (P + 1));
Write_Char (T (P + 2));
Write_Char ('-');
Write_Char (T (P + 3));
Write_Char (T (P + 4));
Write_Char ('-');
Write_Char (T (P + 5));
Write_Char (T (P + 6));
Write_Char (' ');
Write_Char (T (P + 7));
Write_Char (T (P + 8));
Write_Char (':');
Write_Char (T (P + 9));
Write_Char (T (P + 10));
Write_Char (':');
Write_Char (T (P + 11));
Write_Char (T (P + 12));
end Write_Time_Stamp;
----------------------------------------------
-- Access Subprograms for Source File Table --
----------------------------------------------
function Debug_Source_Name (S : SFI) return File_Name_Type is
begin
return Source_File.Table (S).Debug_Source_Name;
end Debug_Source_Name;
function Instance (S : SFI) return Instance_Id is
begin
return Source_File.Table (S).Instance;
end Instance;
function File_Name (S : SFI) return File_Name_Type is
begin
return Source_File.Table (S).File_Name;
end File_Name;
function File_Type (S : SFI) return Type_Of_File is
begin
return Source_File.Table (S).File_Type;
end File_Type;
function First_Mapped_Line (S : SFI) return Logical_Line_Number is
begin
return Source_File.Table (S).First_Mapped_Line;
end First_Mapped_Line;
function Full_Debug_Name (S : SFI) return File_Name_Type is
begin
return Source_File.Table (S).Full_Debug_Name;
end Full_Debug_Name;
function Full_File_Name (S : SFI) return File_Name_Type is
begin
return Source_File.Table (S).Full_File_Name;
end Full_File_Name;
function Full_Ref_Name (S : SFI) return File_Name_Type is
begin
return Source_File.Table (S).Full_Ref_Name;
end Full_Ref_Name;
function Identifier_Casing (S : SFI) return Casing_Type is
begin
return Source_File.Table (S).Identifier_Casing;
end Identifier_Casing;
function Inlined_Body (S : SFI) return Boolean is
begin
return Source_File.Table (S).Inlined_Body;
end Inlined_Body;
function Inlined_Call (S : SFI) return Source_Ptr is
begin
return Source_File.Table (S).Inlined_Call;
end Inlined_Call;
function Keyword_Casing (S : SFI) return Casing_Type is
begin
return Source_File.Table (S).Keyword_Casing;
end Keyword_Casing;
function Last_Source_Line (S : SFI) return Physical_Line_Number is
begin
return Source_File.Table (S).Last_Source_Line;
end Last_Source_Line;
function License (S : SFI) return License_Type is
begin
return Source_File.Table (S).License;
end License;
function Num_SRef_Pragmas (S : SFI) return Nat is
begin
return Source_File.Table (S).Num_SRef_Pragmas;
end Num_SRef_Pragmas;
function Reference_Name (S : SFI) return File_Name_Type is
begin
return Source_File.Table (S).Reference_Name;
end Reference_Name;
function Source_Checksum (S : SFI) return Word is
begin
return Source_File.Table (S).Source_Checksum;
end Source_Checksum;
function Source_First (S : SFI) return Source_Ptr is
begin
if S = Internal_Source_File then
return Internal_Source'First;
else
return Source_File.Table (S).Source_First;
end if;
end Source_First;
function Source_Last (S : SFI) return Source_Ptr is
begin
if S = Internal_Source_File then
return Internal_Source'Last;
else
return Source_File.Table (S).Source_Last;
end if;
end Source_Last;
function Source_Text (S : SFI) return Source_Buffer_Ptr is
begin
if S = Internal_Source_File then
return Internal_Source_Ptr;
else
return Source_File.Table (S).Source_Text;
end if;
end Source_Text;
function Template (S : SFI) return SFI is
begin
return Source_File.Table (S).Template;
end Template;
function Time_Stamp (S : SFI) return Time_Stamp_Type is
begin
return Source_File.Table (S).Time_Stamp;
end Time_Stamp;
function Unit (S : SFI) return Unit_Number_Type is
begin
return Source_File.Table (S).Unit;
end Unit;
------------------------------------------
-- Set Procedures for Source File Table --
------------------------------------------
procedure Set_Identifier_Casing (S : SFI; C : Casing_Type) is
begin
Source_File.Table (S).Identifier_Casing := C;
end Set_Identifier_Casing;
procedure Set_Keyword_Casing (S : SFI; C : Casing_Type) is
begin
Source_File.Table (S).Keyword_Casing := C;
end Set_Keyword_Casing;
procedure Set_License (S : SFI; L : License_Type) is
begin
Source_File.Table (S).License := L;
end Set_License;
procedure Set_Unit (S : SFI; U : Unit_Number_Type) is
begin
Source_File.Table (S).Unit := U;
end Set_Unit;
----------------------
-- Trim_Lines_Table --
----------------------
procedure Trim_Lines_Table (S : Source_File_Index) is
Max : constant Nat := Nat (Source_File.Table (S).Last_Source_Line);
begin
-- Release allocated storage that is no longer needed
Source_File.Table (S).Lines_Table := To_Pointer
(Memory.Realloc
(To_Address (Source_File.Table (S).Lines_Table),
Memory.size_t
(Max * (Lines_Table_Type'Component_Size / System.Storage_Unit))));
Source_File.Table (S).Lines_Table_Max := Physical_Line_Number (Max);
end Trim_Lines_Table;
------------
-- Unlock --
------------
procedure Unlock is
begin
Source_File.Locked := False;
Source_File.Release;
end Unlock;
--------
-- wl --
--------
procedure wl (P : Source_Ptr) is
begin
Write_Location (P);
Write_Eol;
end wl;
end Sinput;
| 29.454478 | 79 | 0.548126 |
50d0e4d03f43e4dfddf0a93f01850abe613deead | 944 | adb | Ada | gnu/src/gdb/gdb/testsuite/gdb.ada/O2_float_param/callee.adb | ghsecuritylab/ellcc-mirror | b03a4afac74d50cf0987554b8c0cd8209bcb92a2 | [
"BSD-2-Clause"
] | null | null | null | gnu/src/gdb/gdb/testsuite/gdb.ada/O2_float_param/callee.adb | ghsecuritylab/ellcc-mirror | b03a4afac74d50cf0987554b8c0cd8209bcb92a2 | [
"BSD-2-Clause"
] | null | null | null | gnu/src/gdb/gdb/testsuite/gdb.ada/O2_float_param/callee.adb | ghsecuritylab/ellcc-mirror | b03a4afac74d50cf0987554b8c0cd8209bcb92a2 | [
"BSD-2-Clause"
] | null | null | null | -- Copyright 2013-2015 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with IO; use IO;
package body Callee is
procedure Increment (Val : in out Float; Msg: String) is
begin
if Val > 200.0 then
Put_Line (Msg);
end if;
Val := Val + 1.0;
end Increment;
end Callee;
| 34.962963 | 73 | 0.702331 |
0bc5890f4f7891f6c416bf42b3da8b21b5e2dd41 | 1,863 | adb | Ada | src/byron.adb | Okasu/Byron | 85b4b69fce59adecc8b5285f4a3bd6a561a038f4 | [
"BSD-2-Clause"
] | 1 | 2017-10-07T05:51:13.000Z | 2017-10-07T05:51:13.000Z | src/byron.adb | gsmnv/Byron | 85b4b69fce59adecc8b5285f4a3bd6a561a038f4 | [
"BSD-2-Clause"
] | null | null | null | src/byron.adb | gsmnv/Byron | 85b4b69fce59adecc8b5285f4a3bd6a561a038f4 | [
"BSD-2-Clause"
] | null | null | null | with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Sockets; use GNAT.Sockets;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Plugin_Management; use Plugin_Management;
with Ada.Command_Line; use Ada.Command_Line;
with Plugin;
with IRC;
with Config;
with Ada.Streams;
use type Ada.Streams.Stream_Element_Count;
procedure Byron is
Invalid_Arguments : exception;
Verbose : Boolean := False;
begin
if Argument_Count < 1 then
raise Invalid_Arguments;
elsif Argument (1) = "-v" then
if Argument_Count < 2 then
raise Invalid_Arguments;
else
Verbose := True;
Config.Parse (Argument (2));
end if;
else
Config.Parse (Argument (1));
end if;
declare
Address : constant Sock_Addr_Type :=
(Addr => Addresses (Get_Host_By_Name (To_String (Config.Server))),
Port => Port_Type (Config.Port),
Family => Family_Inet);
begin
IRC.Connect_To (Address);
IRC.Set_Nick (To_String (Config.Nick));
IRC.Identify (To_String (Config.Password));
for C in Plugin.Vectors.Iterate (Config.Channels) loop
IRC.Join_Channel ('#' & To_String (Plugin.Vectors.Element (C)));
end loop;
loop
declare
Line : constant String := To_String (IRC.Get_Line);
Message : constant IRC.Message := IRC.Get_Message;
begin
if Verbose then
Put_Line (Line);
end if;
IRC.Pong;
if Message.Mode = IRC.Modes (IRC.Privmsg) then
Execute_Commands (Message, Config.Owner, Config.Prefix);
end if;
end;
end loop;
end;
exception
when Invalid_Arguments =>
Put_Line ("Usage: byron [-v] CONFIG_FILE");
Put_Line ("-v verbose mode");
end Byron;
| 26.239437 | 76 | 0.603865 |
fbe69c2899afcc16013a03d367f54670c4dfc47c | 4,922 | ads | Ada | 4-high/gel/source/interface/gel-keyboard.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | 1 | 2022-01-20T07:13:42.000Z | 2022-01-20T07:13:42.000Z | 4-high/gel/source/interface/gel-keyboard.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | 4-high/gel/source/interface/gel-keyboard.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | with
lace.Event,
lace.Subject;
package gel.Keyboard with remote_Types
--
-- Provides an interface for a keyboard.
--
is
type Item is limited interface
and lace.Subject.item;
type View is access all Item'class;
--------
--- Keys
--
type Key is (Nil, -- TODO: Better names.
BACKSPACE,
TAB,
CLEAR,
ENTER,
PAUSE,
ESCAPE,
SPACE,
EXCLAIM,
QUOTEDBL,
HASH,
DOLLAR,
Percent,
AMPERSAND,
QUOTE,
LEFTPAREN,
RIGHTPAREN,
ASTERISK,
PLUS,
COMMA,
MINUS,
PERIOD,
SLASH,
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
COLON, SEMICOLON,
LESS, EQUALS, GREATER,
QUESTION,
AT_key,
LEFTBRACKET,
BACKSLASH,
RIGHTBRACKET,
CARET,
UNDERSCORE,
BACKQUOTE,
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z,
DELETE,
WORLD_0, WORLD_1, WORLD_2, WORLD_3, WORLD_4, WORLD_5, WORLD_6, WORLD_7, WORLD_8, WORLD_9,
WORLD_10, WORLD_11, WORLD_12, WORLD_13, WORLD_14, WORLD_15, WORLD_16, WORLD_17, WORLD_18, WORLD_19,
WORLD_20, WORLD_21, WORLD_22, WORLD_23, WORLD_24, WORLD_25, WORLD_26, WORLD_27, WORLD_28, WORLD_29,
WORLD_30, WORLD_31, WORLD_32, WORLD_33, WORLD_34, WORLD_35, WORLD_36, WORLD_37, WORLD_38, WORLD_39,
WORLD_40, WORLD_41, WORLD_42, WORLD_43, WORLD_44, WORLD_45, WORLD_46, WORLD_47, WORLD_48, WORLD_49,
WORLD_50, WORLD_51, WORLD_52, WORLD_53, WORLD_54, WORLD_55, WORLD_56, WORLD_57, WORLD_58, WORLD_59,
WORLD_60, WORLD_61, WORLD_62, WORLD_63, WORLD_64, WORLD_65, WORLD_66, WORLD_67, WORLD_68, WORLD_69,
WORLD_70, WORLD_71, WORLD_72, WORLD_73, WORLD_74, WORLD_75, WORLD_76, WORLD_77, WORLD_78, WORLD_79,
WORLD_80, WORLD_81, WORLD_82, WORLD_83, WORLD_84, WORLD_85, WORLD_86, WORLD_87, WORLD_88, WORLD_89,
WORLD_90, WORLD_91, WORLD_92, WORLD_93, WORLD_94, WORLD_95,
KP0, KP1, KP2, KP3, KP4, KP5, KP6, KP7, KP8, KP9,
KP_PERIOD,
KP_DIVIDE, KP_MULTIPLY, KP_MINUS, KP_PLUS,
KP_ENTER, KP_EQUALS,
UP, DOWN, RIGHT, LEFT,
INSERT,
HOME, END_key,
PAGEUP, PAGEDOWN,
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15,
NUMLOCK, CAPSLOCK, SCROLLLOCK,
RSHIFT, LSHIFT,
RCTRL, LCTRL,
RALT, LALT,
RMETA, LMETA,
LSUPER, RSUPER,
MODE,
COMPOSE,
HELP,
PRINT,
SYSREQ,
BREAK,
MENU,
POWER,
EURO,
UNDO);
function is_Graphic (Self : in Key) return Boolean;
-------------
--- Modifiers
--
type Modifier is (LSHIFT, -- TODO: Better names.
RSHIFT,
LCTRL,
RCTRL,
LALT,
RALT,
LMETA,
RMETA,
NUM,
CAPS,
MODE);
type modifier_Set is array (Modifier) of Boolean;
no_Modifiers : constant modifier_Set;
type modified_Key is
record
Key : keyboard.Key;
modifier_Set : keyboard.modifier_Set;
end record;
function Image (Self : in modified_Key) return Character;
----------
--- Events
--
type key_press_Event is new lace.Event.item with
record
modified_Key : keyboard.modified_Key;
Code : Integer;
end record;
type key_release_Event is new lace.Event.item with
record
modified_Key : keyboard.modified_Key;
end record;
--------------
--- Attributes
--
function Modifiers (Self : in Item) return Modifier_Set is abstract;
--------------
--- Operations
--
procedure emit_key_press_Event (Self : in out Item; Key : in keyboard.Key;
key_Code : in Integer) is abstract;
procedure emit_key_release_Event (Self : in out Item; Key : in keyboard.Key) is abstract;
private
no_Modifiers : constant modifier_Set := (others => False);
end gel.Keyboard;
| 30.012195 | 115 | 0.476229 |
4d07497eac2d6c31e9c075e05af680e2d0d5c2c9 | 1,895 | ads | Ada | tests/natools-time_statistics-tests.ads | faelys/natools | 947c004e6f69ca144942c6af40e102d089223cf8 | [
"0BSD"
] | null | null | null | tests/natools-time_statistics-tests.ads | faelys/natools | 947c004e6f69ca144942c6af40e102d089223cf8 | [
"0BSD"
] | null | null | null | tests/natools-time_statistics-tests.ads | faelys/natools | 947c004e6f69ca144942c6af40e102d089223cf8 | [
"0BSD"
] | null | null | null | ------------------------------------------------------------------------------
-- Copyright (c) 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. --
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Natools.Time_Statistics.Tests provides a test suite for the statistics --
-- facilities rooted at package Natools.Time_Statistics. --
------------------------------------------------------------------------------
with Natools.Tests;
package Natools.Time_Statistics.Tests is
package NT renames Natools.Tests;
procedure All_Tests (Report : in out NT.Reporter'Class);
procedure Summary_Accumulator (Report : in out NT.Reporter'Class);
procedure Coarse_Timer (Report : in out NT.Reporter'Class);
procedure Fine_Timer (Report : in out NT.Reporter'Class);
end Natools.Time_Statistics.Tests;
| 54.142857 | 78 | 0.527704 |
4d6359b311c622d5fd2be8a2c427017c0722ca2f | 94,473 | ads | Ada | tools-src/gnu/gcc/gcc/ada/atree.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 80 | 2015-01-02T10:14:04.000Z | 2021-06-07T06:29:49.000Z | tools-src/gnu/gcc/gcc/ada/atree.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 9 | 2015-05-14T11:03:12.000Z | 2018-01-04T07:12:58.000Z | tools-src/gnu/gcc/gcc/ada/atree.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 69 | 2015-01-02T10:45:56.000Z | 2021-09-06T07:52:13.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- A T R E E --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-2001, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Alloc;
with Sinfo; use Sinfo;
with Einfo; use Einfo;
with Types; use Types;
with Snames; use Snames;
with System; use System;
with Table;
with Uintp; use Uintp;
with Urealp; use Urealp;
with Unchecked_Conversion;
package Atree is
-- This package defines the format of the tree used to represent the Ada
-- program internally. Syntactic and semantic information is combined in
-- this tree. There is no separate symbol table structure.
-- WARNING: There is a C version of this package. Any changes to this
-- source file must be properly reflected in the C header file tree.h
-- Package Atree defines the basic structure of the tree and its nodes and
-- provides the basic abstract interface for manipulating the tree. Two
-- other packages use this interface to define the representation of Ada
-- programs using this tree format. The package Sinfo defines the basic
-- representation of the syntactic structure of the program, as output
-- by the parser. The package Entity_Info defines the semantic information
-- which is added to the tree nodes that represent declared entities (i.e.
-- the information which might typically be described in a separate symbol
-- table structure.
-- The front end of the compiler first parses the program and generates a
-- tree that is simply a syntactic representation of the program in abstract
-- syntax tree format. Subsequent processing in the front end traverses the
-- tree, transforming it in various ways and adding semantic information.
----------------------------------------
-- Definitions of Fields in Tree Node --
----------------------------------------
-- The representation of the tree is completely hidden, using a functional
-- interface for accessing and modifying the contents of nodes. Logically
-- a node contains a number of fields, much as though the nodes were
-- defined as a record type. The fields in a node are as follows:
-- Nkind Indicates the kind of the node. This field is present
-- in all nodes. The type is Node_Kind, which is declared
-- in the package Sinfo.
-- Sloc Location (Source_Ptr) of the corresponding token
-- in the Source buffer. The individual node definitions
-- show which token is referenced by this pointer.
-- In_List A flag used to indicate if the node is a member
-- of a node list.
-- Rewrite_Sub A flag set if the node has been rewritten using
-- the Rewrite procedure. The original value of the
-- node is retrievable with Original_Node.
-- Rewrite_Ins A flag set if a node is marked as a rewrite inserted
-- node as a result of a call to Mark_Rewrite_Insertion.
-- Paren_Count A 2-bit count used on expression nodes to indicate
-- the level of parentheses. Up to 3 levels can be
-- accomodated. Anything more than 3 levels is treated
-- as 3 levels (conformance tests that complain about
-- this are hereby deemed pathological!) Set to zero
-- for non-subexpression nodes.
-- Comes_From_Source
-- This flag is present in all nodes. It is set if the
-- node is built by the scanner or parser, and clear if
-- the node is built by the analyzer or expander. It
-- indicates that the node corresponds to a construct
-- that appears in the original source program.
-- Analyzed This flag is present in all nodes. It is set when
-- a node is analyzed, and is used to avoid analyzing
-- the same node twice. Analysis includes expansion if
-- expansion is active, so in this case if the flag is
-- set it means the node has been analyzed and expanded.
-- Error_Posted This flag is present in all nodes. It is set when
-- an error message is posted which is associated with
-- the flagged node. This is used to avoid posting more
-- than one message on the same node.
-- Field1
-- Field2
-- Field3
-- Field4
-- Field5 Five fields holding Union_Id values
-- Char_CodeN Synonym for FieldN typed as Char_Code
-- ElistN Synonym for FieldN typed as Elist_Id
-- ListN Synonym for FieldN typed as List_Id
-- NameN Synonym for FieldN typed as Name_Id
-- NodeN Synonym for FieldN typed as Node_Id
-- StrN Synonym for FieldN typed as String_Id
-- UintN Synonym for FieldN typed as Uint (Empty = Uint_0)
-- UrealN Synonym for FieldN typed as Ureal
-- Note: the actual usage of FieldN (i.e. whether it contains a Char_Code,
-- Elist_Id, List_Id, Name_Id, Node_Id, String_Id, Uint or Ureal), depends
-- on the value in Nkind. Generally the access to this field is always via
-- the functional interface, so the field names Char_CodeN, ElistN, ListN,
-- NameN, NodeN, StrN, UintN and UrealN are used only in the bodies of the
-- access functions (i.e. in the bodies of Sinfo and Einfo). These access
-- functions contain debugging code that checks that the use is consistent
-- with Nkind and Ekind values.
-- However, in specialized circumstances (examples are the circuit in
-- generic instantiation to copy trees, and in the tree dump routine),
-- it is useful to be able to do untyped traversals, and an internal
-- package in Atree allows for direct untyped accesses in such cases.
-- Flag4 Fifteen Boolean flags (use depends on Nkind and
-- Flag5 Ekind, as described for Fieldn). Again the access
-- Flag6 is usually via subprograms in Sinfo and Einfo which
-- Flag7 provide high-level synonyms for these flags, and
-- Flag8 contain debugging code that checks that the values
-- Flag9 in Nkind and Ekind are appropriate for the access.
-- Flag10
-- Flag11 Note that Flag1-3 are missing from this list. The
-- Flag12 first three flag positions are reserved for the
-- Flag13 standard flags (Comes_From_Source, Error_Posted,
-- Flag14 and Analyzed)
-- Flag15
-- Flag16
-- Flag17
-- Flag18
-- Link For a node, points to the Parent. For a list, points
-- to the list header. Note that in the latter case, a
-- client cannot modify the link field. This field is
-- private to the Atree package (but is also modified
-- by the Nlists package).
-- The following additional fields are present in extended nodes used
-- for entities (Nkind in N_Entity).
-- Ekind Entity type. This field indicates the type of the
-- entity, it is of type Entity_Kind which is defined
-- in package Einfo.
-- Flag19 133 additional flags
-- ...
-- Flag151
-- Convention Entity convention (Convention_Id value)
-- Field6 Additional Union_Id value stored in tree
-- Node6 Synonym for Field6 typed as Node_Id
-- Elist6 Synonym for Field6 typed as Elist_Id
-- Uint6 Synonym for Field6 typed as Uint (Empty = Uint_0)
-- Similar definitions for Field7 to Field23 (and Node7-Node23,
-- Elist7-Elist23, Uint7-Uint23, Ureal7-Ureal23). Note that not all
-- these functions are defined, only the ones that are actually used.
type Paren_Count_Type is mod 4;
for Paren_Count_Type'Size use 2;
-- Type used for Paren_Count field
function Last_Node_Id return Node_Id;
pragma Inline (Last_Node_Id);
-- Returns Id of last allocated node Id
function Nodes_Address return System.Address;
-- Return address of Nodes table (used in Back_End for Gigi call)
function Num_Nodes return Nat;
-- Total number of nodes allocated, where an entity counts as a single
-- node. This count is incremented every time a node or entity is
-- allocated, and decremented every time a node or entity is deleted.
-- This value is used by Xref and by Treepr to allocate hash tables of
-- suitable size for hashing Node_Id values.
-----------------------
-- Use of Empty Node --
-----------------------
-- The special Node_Id Empty is used to mark missing fields. Whenever the
-- syntax has an optional component, then the corresponding field will be
-- set to Empty if the component is missing.
-- Note: Empty is not used to describe an empty list. Instead in this
-- case the node field contains a list which is empty, and these cases
-- should be distinguished (essentially from a type point of view, Empty
-- is a Node, and is thus not a list).
-- Note: Empty does in fact correspond to an allocated node. Only the
-- Nkind field of this node may be referenced. It contains N_Empty, which
-- uniquely identifies the empty case. This allows the Nkind field to be
-- dereferenced before the check for Empty which is sometimes useful.
-----------------------
-- Use of Error Node --
-----------------------
-- The Error node is used during syntactic and semantic analysis to
-- indicate that the corresponding piece of syntactic structure or
-- semantic meaning cannot properly be represented in the tree because
-- of an illegality in the program.
-- If an Error node is encountered, then you know that a previous
-- illegality has been detected. The proper reaction should be to
-- avoid posting related cascaded error messages, and to propagate
-- the error node if necessary.
-----------------------
-- Current_Error_Node --
-----------------------
-- The current error node is a global location indicating the current
-- node that is being processed for the purposes of placing a compiler
-- abort message. This is not necessarily perfectly accurate, it is
-- just a reasonably accurate best guess. It is used to output the
-- source location in the abort message by Comperr, and also to
-- implement the d3 debugging flag. This is also used by Rtsfind
-- to generate error messages for No_Run_Time mode.
Current_Error_Node : Node_Id;
-- Node to place error messages
-------------------------------
-- Default Setting of Fields --
-------------------------------
-- Nkind is set to N_Unused_At_Start
-- Ekind is set to E_Void
-- Sloc is always set, there is no default value
-- Field1-5 fields are set to Empty
-- Field6-22 fields in extended nodes are set to Empty
-- Parent is set to Empty
-- All Boolean flag fields are set to False
-- Note: the value Empty is used in Field1-Field17 to indicate a null node.
-- The usage varies. The common uses are to indicate absence of an
-- optional clause or a completely unused Field1-17 field.
-------------------------------------
-- Use of Synonyms for Node Fields --
-------------------------------------
-- A subpackage Atree.Unchecked_Access provides routines for reading and
-- writing the fields defined above (Field1-17, Node1-17, Flag1-88 etc).
-- These unchecked access routines can be used for untyped traversals. In
-- In addition they are used in the implementations of the Sinfo and
-- Einfo packages. These packages both provide logical synonyms for
-- the generic fields, together with an appropriate set of access routines.
-- Normally access to information within tree nodes uses these synonyms,
-- providing a high level typed interface to the tree information.
--------------------------------------------------
-- Node Allocation and Modification Subprograms --
--------------------------------------------------
-- Generally the parser builds the tree and then it is further decorated
-- (e.g. by setting the entity fields), but not fundamentally modified.
-- However, there are cases in which the tree must be restructured by
-- adding and rearranging nodes, as a result of disambiguating cases
-- which the parser could not parse correctly, and adding additional
-- semantic information (e.g. making constraint checks explicit). The
-- following subprograms are used for constructing the tree in the first
-- place, and then for subsequent modifications as required
procedure Initialize;
-- Called at the start of compilation to initialize the allocation of
-- the node and list tables and make the standard entries for Empty,
-- Error and Error_List. Note that Initialize must not be called if
-- Tree_Read is used.
procedure Lock;
-- Called before the backend is invoked to lock the nodes table
procedure Tree_Read;
-- Initializes internal tables from current tree file using Tree_Read.
-- Note that Initialize should not be called if Tree_Read is used.
-- Tree_Read includes all necessary initialization.
procedure Tree_Write;
-- Writes out internal tables to current tree file using Tree_Write
function New_Node
(New_Node_Kind : Node_Kind;
New_Sloc : Source_Ptr)
return Node_Id;
-- Allocates a completely new node with the given node type and source
-- location values. All other fields are set to their standard defaults:
--
-- Empty for all Fieldn fields
-- False for all Flagn fields
--
-- The usual approach is to build a new node using this function and
-- then, using the value returned, use the Set_xxx functions to set
-- fields of the node as required. New_Node can only be used for
-- non-entity nodes, i.e. it never generates an extended node.
function New_Entity
(New_Node_Kind : Node_Kind;
New_Sloc : Source_Ptr)
return Entity_Id;
-- Similar to New_Node, except that it is used only for entity nodes
-- and returns an extended node.
procedure Set_Comes_From_Source_Default (Default : Boolean);
-- Sets value of Comes_From_Source flag to be used in all subsequent
-- New_Node and New_Entity calls until another call to this procedure
-- changes the default.
function Get_Comes_From_Source_Default return Boolean;
pragma Inline (Get_Comes_From_Source_Default);
-- Gets the current value of the Comes_From_Source flag
procedure Preserve_Comes_From_Source (NewN, OldN : Node_Id);
pragma Inline (Preserve_Comes_From_Source);
-- When a node is rewritten, it is sometimes appropriate to preserve the
-- original comes from source indication. This is true when the rewrite
-- essentially corresponds to a transformation corresponding exactly to
-- semantics in the reference manual. This procedure copies the setting
-- of Comes_From_Source from OldN to NewN.
function Has_Extension (N : Node_Id) return Boolean;
pragma Inline (Has_Extension);
-- Returns True if the given node has an extension (i.e. was created by
-- a call to New_Entity rather than New_Node, and Nkind is in N_Entity)
procedure Change_Node (N : Node_Id; New_Node_Kind : Node_Kind);
-- This procedure replaces the given node by setting its Nkind field to
-- the indicated value and resetting all other fields to their default
-- values except for Sloc, which is unchanged, and the Parent pointer
-- and list links, which are also unchanged. All other information in
-- the original node is lost. The new node has an extension if the
-- original node had an extension.
procedure Copy_Node (Source : Node_Id; Destination : Node_Id);
-- Copy the entire contents of the source node to the destination node.
-- The contents of the source node is not affected. If the source node
-- has an extension, then the destination must have an extension also.
-- The parent pointer of the destination and its list link, if any, are
-- not affected by the copy. Note that parent pointers of descendents
-- are not adjusted, so the descendents of the destination node after
-- the Copy_Node is completed have dubious parent pointers.
function New_Copy (Source : Node_Id) return Node_Id;
-- This function allocates a completely new node, and then initializes
-- it by copying the contents of the source node into it. The contents
-- of the source node is not affected. The target node is always marked
-- as not being in a list (even if the source is a list member). The
-- new node will have an extension if the source has an extension.
-- New_Copy (Empty) returns Empty and New_Copy (Error) returns Error.
-- Note that, unlike New_Copy_Tree, New_Copy does not recursively copy any
-- descendents, so in general parent pointers are not set correctly for
-- the descendents of the copied node. Both normal and extended nodes
-- (entities) may be copied using New_Copy.
function Relocate_Node (Source : Node_Id) return Node_Id;
-- Source is a non-entity node that is to be relocated. A new node is
-- allocated and the contents of Source are copied to this node using
-- Copy_Node. The parent pointers of descendents of the node are then
-- adjusted to point to the relocated copy. The original node is not
-- modified, but the parent pointers of its descendents are no longer
-- valid. This routine is used in conjunction with the tree rewrite
-- routines (see descriptions of Replace/Rewrite).
--
-- Note that the resulting node has the same parent as the source
-- node, and is thus still attached to the tree. It is valid for
-- Source to be Empty, in which case Relocate_Node simply returns
-- Empty as the result.
function New_Copy_Tree
(Source : Node_Id;
Map : Elist_Id := No_Elist;
New_Sloc : Source_Ptr := No_Location;
New_Scope : Entity_Id := Empty)
return Node_Id;
-- Given a node that is the root of a subtree, Copy_Tree copies the entire
-- syntactic subtree, including recursively any descendents whose parent
-- field references a copied node (descendents not linked to a copied node
-- by the parent field are not copied, instead the copied tree references
-- the same descendent as the original in this case, which is appropriate
-- for non-syntactic fields such as Etype). The parent pointers in the
-- copy are properly set. Copy_Tree (Empty/Error) returns Empty/Error.
-- The one exception to the rule of not copying semantic fields is that
-- any implicit types attached to the subtree are duplicated, so that
-- the copy contains a distinct set of implicit type entities. The Map
-- argument, if set to a non-empty Elist, specifies a set of mappings
-- to be applied to entities in the tree. The map has the form:
--
-- old entity 1
-- new entity to replace references to entity 1
-- old entity 2
-- new entity to replace references to entity 2
-- ...
--
-- The call destroys the contents of Map in this case
--
-- The parameter New_Sloc, if set to a value other than No_Location, is
-- used as the Sloc value for all nodes in the new copy. If New_Sloc is
-- set to its default value No_Location, then the Sloc values of the
-- nodes in the copy are simply copied from the corresponding original.
--
-- The Comes_From_Source indication is unchanged if New_Sloc is set to
-- the default No_Location value, but is reset if New_Sloc is given, since
-- in this case the result clearly is neither a source node or an exact
-- copy of a source node.
--
-- The parameter New_Scope, if set to a value other than Empty, is the
-- value to use as the Scope for any Itypes that are copied. The most
-- typical value for this parameter, if given, is Current_Scope.
function Copy_Separate_Tree (Source : Node_Id) return Node_Id;
-- Given a node that is the root of a subtree, Copy_Separate_Tree copies
-- the entire syntactic subtree, including recursively any descendants
-- whose parent field references a copied node (descendants not linked to
-- a copied node by the parent field are also copied.) The parent pointers
-- in the copy are properly set. Copy_Separate_Tree (Empty/Error) returns
-- Empty/Error. The semantic fields are not copied and the new subtree
-- does not share any entity with source subtree.
-- But the code *does* copy semantic fields, and the description above
-- is in any case unclear on this point ??? (RBKD)
procedure Exchange_Entities (E1 : Entity_Id; E2 : Entity_Id);
-- Exchange the contents of two entities. The parent pointers are switched
-- as well as the Defining_Identifier fields in the parents, so that the
-- entities point correctly to their original parents. The effect is thus
-- to leave the tree completely unchanged in structure, except that the
-- entity ID values of the two entities are interchanged. Neither of the
-- two entities may be list members.
procedure Delete_Node (Node : Node_Id);
-- The node, which must not be a list member, is deleted from the tree and
-- its type is set to N_Unused_At_End. It is an error (not necessarily
-- detected) to reference this node after it has been deleted. The
-- implementation of the body of Atree is free to reuse the node to
-- satisfy future node allocation requests, but is not required to do so.
procedure Delete_Tree (Node : Node_Id);
-- The entire syntactic subtree referenced by Node (i.e. the given node
-- and all its syntactic descendents) are deleted as described above for
-- Delete_Node.
function Extend_Node (Node : Node_Id) return Entity_Id;
-- This function returns a copy of its input node with an extension
-- added. The fields of the extension are set to Empty. Due to the way
-- extensions are handled (as two consecutive array elements), it may
-- be necessary to reallocate the node, so that the returned value is
-- not the same as the input value, but where possible the returned
-- value will be the same as the input value (i.e. the extension will
-- occur in place). It is the caller's responsibility to ensure that
-- any pointers to the original node are appropriately updated. This
-- function is used only by Sinfo.CN to change nodes into their
-- corresponding entities.
type Traverse_Result is (OK, Skip, Abandon);
-- This is the type of the result returned by the Process function passed
-- to Traverse_Func and Traverse_Proc and also the type of the result of
-- Traverse_Func itself. See descriptions below for details.
generic
with function Process (N : Node_Id) return Traverse_Result is <>;
function Traverse_Func (Node : Node_Id) return Traverse_Result;
-- This is a generic function that, given the parent node for a subtree,
-- traverses all syntactic nodes of this tree, calling the given function
-- Process on each one. The traversal is controlled as follows by the
-- result returned by Process:
-- OK The traversal continues normally with the children of
-- the node just processed.
-- Skip The children of the node just processed are skipped and
-- excluded from the traversal, but otherwise processing
-- continues elsewhere in the tree.
-- Abandon The entire traversal is immediately abandoned, and the
-- original call to Traverse returns Abandon.
-- The result returned by Traverse is Abandon if processing was terminated
-- by a call to Process returning Abandon, otherwise it is OK (meaning that
-- all calls to process returned either OK or Skip).
generic
with function Process (N : Node_Id) return Traverse_Result is <>;
procedure Traverse_Proc (Node : Node_Id);
pragma Inline (Traverse_Proc);
-- This is similar to Traverse_Func except that no result is returned,
-- i.e. Traverse_Func is called and the result is simply discarded.
---------------------------
-- Node Access Functions --
---------------------------
-- The following functions return the contents of the indicated field of
-- the node referenced by the argument, which is a Node_Id.
function Nkind (N : Node_Id) return Node_Kind;
pragma Inline (Nkind);
function Analyzed (N : Node_Id) return Boolean;
pragma Inline (Analyzed);
function Comes_From_Source (N : Node_Id) return Boolean;
pragma Inline (Comes_From_Source);
function Error_Posted (N : Node_Id) return Boolean;
pragma Inline (Error_Posted);
function Sloc (N : Node_Id) return Source_Ptr;
pragma Inline (Sloc);
function Paren_Count (N : Node_Id) return Paren_Count_Type;
pragma Inline (Paren_Count);
function Parent (N : Node_Id) return Node_Id;
pragma Inline (Parent);
-- Returns the parent of a node if the node is not a list member, or
-- else the parent of the list containing the node if the node is a
-- list member.
function No (N : Node_Id) return Boolean;
pragma Inline (No);
-- Tests given Id for equality with the Empty node. This allows notations
-- like "if No (Variant_Part)" as opposed to "if Variant_Part = Empty".
function Present (N : Node_Id) return Boolean;
pragma Inline (Present);
-- Tests given Id for inequality with the Empty node. This allows notations
-- like "if Present (Statement)" as opposed to "if Statement /= Empty".
-----------------------------
-- Entity Access Functions --
-----------------------------
-- The following functions apply only to Entity_Id values, i.e.
-- to extended nodes.
function Ekind (E : Entity_Id) return Entity_Kind;
pragma Inline (Ekind);
function Convention (E : Entity_Id) return Convention_Id;
pragma Inline (Convention);
----------------------------
-- Node Update Procedures --
----------------------------
-- The following functions set a specified field in the node whose Id is
-- passed as the first argument. The second parameter is the new value
-- to be set in the specified field. Note that Set_Nkind is in the next
-- section, since its use is restricted.
procedure Set_Sloc (N : Node_Id; Val : Source_Ptr);
pragma Inline (Set_Sloc);
procedure Set_Paren_Count (N : Node_Id; Val : Paren_Count_Type);
pragma Inline (Set_Paren_Count);
procedure Set_Parent (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Parent);
procedure Set_Analyzed (N : Node_Id; Val : Boolean := True);
pragma Inline (Set_Analyzed);
procedure Set_Error_Posted (N : Node_Id; Val : Boolean := True);
pragma Inline (Set_Error_Posted);
procedure Set_Comes_From_Source (N : Node_Id; Val : Boolean);
pragma Inline (Set_Comes_From_Source);
-- Note that this routine is very rarely used, since usually the
-- default mechanism provided sets the right value, but in some
-- unusual cases, the value needs to be reset (e.g. when a source
-- node is copied, and the copy must not have Comes_From_Source set.
------------------------------
-- Entity Update Procedures --
------------------------------
-- The following procedures apply only to Entity_Id values, i.e.
-- to extended nodes.
procedure Set_Ekind (E : Entity_Id; Val : Entity_Kind);
pragma Inline (Set_Ekind);
procedure Set_Convention (E : Entity_Id; Val : Convention_Id);
pragma Inline (Set_Convention);
---------------------------
-- Tree Rewrite Routines --
---------------------------
-- During the compilation process it is necessary in a number of situations
-- to rewrite the tree. In some cases, such rewrites do not affect the
-- structure of the tree, for example, when an indexed component node is
-- replaced by the corresponding call node (the parser cannot distinguish
-- between these two cases).
-- In other situations, the rewrite does affect the structure of the
-- tree. Examples are the replacement of a generic instantiation by the
-- instantiated spec and body, and the static evaluation of expressions.
-- If such structural modifications are done by the expander, there are
-- no difficulties, since the form of the tree after the expander has no
-- special significance, except as input to the backend of the compiler.
-- However, if these modifications are done by the semantic phase, then
-- it is important that they be done in a manner which allows the original
-- tree to be preserved. This is because tools like pretty printers need
-- to have this original tree structure available.
-- The subprograms in this section allow rewriting of the tree by either
-- insertion of new nodes in an existing list, or complete replacement of
-- a subtree. The resulting tree for most purposes looks as though it has
-- been really changed, and there is no trace of the original. However,
-- special subprograms, also defined in this section, allow the original
-- tree to be reconstructed if necessary.
-- For tree modifications done in the expander, it is permissible to
-- destroy the original tree, although it is also allowable to use the
-- tree rewrite routines where it is convenient to do so.
procedure Mark_Rewrite_Insertion (New_Node : Node_Id);
pragma Inline (Mark_Rewrite_Insertion);
-- This procedure marks the given node as an insertion made during a tree
-- rewriting operation. Only the root needs to be marked. The call does
-- not do the actual insertion, which must be done using one of the normal
-- list insertion routines. The node is treated normally in all respects
-- except for its response to Is_Rewrite_Insertion. The function of these
-- calls is to be able to get an accurate original tree. This helps the
-- accuracy of Sprint.Sprint_Node, and in particular, when stubs are being
-- generated, it is essential that the original tree be accurate.
function Is_Rewrite_Insertion (Node : Node_Id) return Boolean;
pragma Inline (Is_Rewrite_Insertion);
-- Tests whether the given node was marked using Set_Rewrite_Insert. This
-- is used in reconstructing the original tree (where such nodes are to
-- be eliminated from the reconstructed tree).
procedure Rewrite (Old_Node, New_Node : Node_Id);
-- This is used when a complete subtree is to be replaced. Old_Node is the
-- root of the old subtree to be replaced, and New_Node is the root of the
-- newly constructed replacement subtree. The actual mechanism is to swap
-- the contents of these two nodes fixing up the parent pointers of the
-- replaced node (we do not attempt to preserve parent pointers for the
-- original node). Neither Old_Node nor New_Node can be extended nodes.
--
-- Note: New_Node may not contain references to Old_Node, for example as
-- descendents, since the rewrite would make such references invalid. If
-- New_Node does need to reference Old_Node, then these references should
-- be to a relocated copy of Old_Node (see Relocate_Node procedure).
--
-- Note: The Original_Node function applied to Old_Node (which has now
-- been replaced by the contents of New_Node), can be used to obtain the
-- original node, i.e. the old contents of Old_Node.
procedure Replace (Old_Node, New_Node : Node_Id);
-- This is similar to Rewrite, except that the old value of Old_Node is
-- not saved, and the New_Node is deleted after the replace, since it
-- is assumed that it can no longer be legitimately needed. The flag
-- Is_Rewrite_Susbtitute will be False for the resulting node, unless
-- it was already true on entry, and Original_Node will not return the
-- original contents of the Old_Node, but rather the New_Node value (unless
-- Old_Node had already been rewritten using Rewrite). Replace also
-- preserves the setting of Comes_From_Source.
--
-- Note, New_Node may not contain references to Old_Node, for example as
-- descendents, since the rewrite would make such references invalid. If
-- New_Node does need to reference Old_Node, then these references should
-- be to a relocated copy of Old_Node (see Relocate_Node procedure).
--
-- Replace is used in certain circumstances where it is desirable to
-- suppress any history of the rewriting operation. Notably, it is used
-- when the parser has mis-classified a node (e.g. a task entry call
-- that the parser has parsed as a procedure call).
function Is_Rewrite_Substitution (Node : Node_Id) return Boolean;
pragma Inline (Is_Rewrite_Substitution);
-- Return True iff Node has been rewritten (i.e. if Node is the root
-- of a subtree which was installed using Rewrite).
function Original_Node (Node : Node_Id) return Node_Id;
pragma Inline (Original_Node);
-- If Node has not been rewritten, then returns its input argument
-- unchanged, else returns the Node for the original subtree.
--
-- Note: Parents are not preserved in original tree nodes that are
-- retrieved in this way (i.e. their children may have children whose
-- pointers which reference some other node).
-- Note: there is no direct mechanism for deleting an original node (in
-- a manner that can be reversed later). One possible approach is to use
-- Rewrite to substitute a null statement for the node to be deleted.
-----------------------------------
-- Generic Field Access Routines --
-----------------------------------
-- This subpackage provides the functions for accessing and procedures
-- for setting fields that are normally referenced by their logical
-- synonyms defined in packages Sinfo and Einfo. As previously
-- described the implementations of these packages use the package
-- Atree.Unchecked_Access.
package Unchecked_Access is
-- Functions to allow interpretation of Union_Id values as Uint
-- and Ureal values
function To_Union is new Unchecked_Conversion (Uint, Union_Id);
function To_Union is new Unchecked_Conversion (Ureal, Union_Id);
function From_Union is new Unchecked_Conversion (Union_Id, Uint);
function From_Union is new Unchecked_Conversion (Union_Id, Ureal);
-- Functions to fetch contents of indicated field. It is an error
-- to attempt to read the value of a field which is not present.
function Field1 (N : Node_Id) return Union_Id;
pragma Inline (Field1);
function Field2 (N : Node_Id) return Union_Id;
pragma Inline (Field2);
function Field3 (N : Node_Id) return Union_Id;
pragma Inline (Field3);
function Field4 (N : Node_Id) return Union_Id;
pragma Inline (Field4);
function Field5 (N : Node_Id) return Union_Id;
pragma Inline (Field5);
function Field6 (N : Node_Id) return Union_Id;
pragma Inline (Field6);
function Field7 (N : Node_Id) return Union_Id;
pragma Inline (Field7);
function Field8 (N : Node_Id) return Union_Id;
pragma Inline (Field8);
function Field9 (N : Node_Id) return Union_Id;
pragma Inline (Field9);
function Field10 (N : Node_Id) return Union_Id;
pragma Inline (Field10);
function Field11 (N : Node_Id) return Union_Id;
pragma Inline (Field11);
function Field12 (N : Node_Id) return Union_Id;
pragma Inline (Field12);
function Field13 (N : Node_Id) return Union_Id;
pragma Inline (Field13);
function Field14 (N : Node_Id) return Union_Id;
pragma Inline (Field14);
function Field15 (N : Node_Id) return Union_Id;
pragma Inline (Field15);
function Field16 (N : Node_Id) return Union_Id;
pragma Inline (Field16);
function Field17 (N : Node_Id) return Union_Id;
pragma Inline (Field17);
function Field18 (N : Node_Id) return Union_Id;
pragma Inline (Field18);
function Field19 (N : Node_Id) return Union_Id;
pragma Inline (Field19);
function Field20 (N : Node_Id) return Union_Id;
pragma Inline (Field20);
function Field21 (N : Node_Id) return Union_Id;
pragma Inline (Field21);
function Field22 (N : Node_Id) return Union_Id;
pragma Inline (Field22);
function Field23 (N : Node_Id) return Union_Id;
pragma Inline (Field23);
function Node1 (N : Node_Id) return Node_Id;
pragma Inline (Node1);
function Node2 (N : Node_Id) return Node_Id;
pragma Inline (Node2);
function Node3 (N : Node_Id) return Node_Id;
pragma Inline (Node3);
function Node4 (N : Node_Id) return Node_Id;
pragma Inline (Node4);
function Node5 (N : Node_Id) return Node_Id;
pragma Inline (Node5);
function Node6 (N : Node_Id) return Node_Id;
pragma Inline (Node6);
function Node7 (N : Node_Id) return Node_Id;
pragma Inline (Node7);
function Node8 (N : Node_Id) return Node_Id;
pragma Inline (Node8);
function Node9 (N : Node_Id) return Node_Id;
pragma Inline (Node9);
function Node10 (N : Node_Id) return Node_Id;
pragma Inline (Node10);
function Node11 (N : Node_Id) return Node_Id;
pragma Inline (Node11);
function Node12 (N : Node_Id) return Node_Id;
pragma Inline (Node12);
function Node13 (N : Node_Id) return Node_Id;
pragma Inline (Node13);
function Node14 (N : Node_Id) return Node_Id;
pragma Inline (Node14);
function Node15 (N : Node_Id) return Node_Id;
pragma Inline (Node15);
function Node16 (N : Node_Id) return Node_Id;
pragma Inline (Node16);
function Node17 (N : Node_Id) return Node_Id;
pragma Inline (Node17);
function Node18 (N : Node_Id) return Node_Id;
pragma Inline (Node18);
function Node19 (N : Node_Id) return Node_Id;
pragma Inline (Node19);
function Node20 (N : Node_Id) return Node_Id;
pragma Inline (Node20);
function Node21 (N : Node_Id) return Node_Id;
pragma Inline (Node21);
function Node22 (N : Node_Id) return Node_Id;
pragma Inline (Node22);
function Node23 (N : Node_Id) return Node_Id;
pragma Inline (Node23);
function List1 (N : Node_Id) return List_Id;
pragma Inline (List1);
function List2 (N : Node_Id) return List_Id;
pragma Inline (List2);
function List3 (N : Node_Id) return List_Id;
pragma Inline (List3);
function List4 (N : Node_Id) return List_Id;
pragma Inline (List4);
function List5 (N : Node_Id) return List_Id;
pragma Inline (List5);
function List10 (N : Node_Id) return List_Id;
pragma Inline (List10);
function List14 (N : Node_Id) return List_Id;
pragma Inline (List14);
function Elist2 (N : Node_Id) return Elist_Id;
pragma Inline (Elist2);
function Elist3 (N : Node_Id) return Elist_Id;
pragma Inline (Elist3);
function Elist4 (N : Node_Id) return Elist_Id;
pragma Inline (Elist4);
function Elist8 (N : Node_Id) return Elist_Id;
pragma Inline (Elist8);
function Elist13 (N : Node_Id) return Elist_Id;
pragma Inline (Elist13);
function Elist15 (N : Node_Id) return Elist_Id;
pragma Inline (Elist15);
function Elist16 (N : Node_Id) return Elist_Id;
pragma Inline (Elist16);
function Elist18 (N : Node_Id) return Elist_Id;
pragma Inline (Elist18);
function Elist21 (N : Node_Id) return Elist_Id;
pragma Inline (Elist21);
function Elist23 (N : Node_Id) return Elist_Id;
pragma Inline (Elist23);
function Name1 (N : Node_Id) return Name_Id;
pragma Inline (Name1);
function Name2 (N : Node_Id) return Name_Id;
pragma Inline (Name2);
function Char_Code2 (N : Node_Id) return Char_Code;
pragma Inline (Char_Code2);
function Str3 (N : Node_Id) return String_Id;
pragma Inline (Str3);
-- Note: the following Uintnn functions have a special test for
-- the Field value being Empty. If an Empty value is found then
-- Uint_0 is returned. This avoids the rather tricky requirement
-- of initializing all Uint fields in nodes and entities.
function Uint3 (N : Node_Id) return Uint;
pragma Inline (Uint3);
function Uint4 (N : Node_Id) return Uint;
pragma Inline (Uint4);
function Uint5 (N : Node_Id) return Uint;
pragma Inline (Uint5);
function Uint8 (N : Node_Id) return Uint;
pragma Inline (Uint8);
function Uint9 (N : Node_Id) return Uint;
pragma Inline (Uint9);
function Uint10 (N : Node_Id) return Uint;
pragma Inline (Uint10);
function Uint11 (N : Node_Id) return Uint;
pragma Inline (Uint11);
function Uint12 (N : Node_Id) return Uint;
pragma Inline (Uint12);
function Uint13 (N : Node_Id) return Uint;
pragma Inline (Uint13);
function Uint14 (N : Node_Id) return Uint;
pragma Inline (Uint14);
function Uint15 (N : Node_Id) return Uint;
pragma Inline (Uint15);
function Uint16 (N : Node_Id) return Uint;
pragma Inline (Uint16);
function Uint17 (N : Node_Id) return Uint;
pragma Inline (Uint17);
function Uint22 (N : Node_Id) return Uint;
pragma Inline (Uint22);
function Ureal3 (N : Node_Id) return Ureal;
pragma Inline (Ureal3);
function Ureal18 (N : Node_Id) return Ureal;
pragma Inline (Ureal18);
function Ureal21 (N : Node_Id) return Ureal;
pragma Inline (Ureal21);
function Flag4 (N : Node_Id) return Boolean;
pragma Inline (Flag4);
function Flag5 (N : Node_Id) return Boolean;
pragma Inline (Flag5);
function Flag6 (N : Node_Id) return Boolean;
pragma Inline (Flag6);
function Flag7 (N : Node_Id) return Boolean;
pragma Inline (Flag7);
function Flag8 (N : Node_Id) return Boolean;
pragma Inline (Flag8);
function Flag9 (N : Node_Id) return Boolean;
pragma Inline (Flag9);
function Flag10 (N : Node_Id) return Boolean;
pragma Inline (Flag10);
function Flag11 (N : Node_Id) return Boolean;
pragma Inline (Flag11);
function Flag12 (N : Node_Id) return Boolean;
pragma Inline (Flag12);
function Flag13 (N : Node_Id) return Boolean;
pragma Inline (Flag13);
function Flag14 (N : Node_Id) return Boolean;
pragma Inline (Flag14);
function Flag15 (N : Node_Id) return Boolean;
pragma Inline (Flag15);
function Flag16 (N : Node_Id) return Boolean;
pragma Inline (Flag16);
function Flag17 (N : Node_Id) return Boolean;
pragma Inline (Flag17);
function Flag18 (N : Node_Id) return Boolean;
pragma Inline (Flag18);
function Flag19 (N : Node_Id) return Boolean;
pragma Inline (Flag19);
function Flag20 (N : Node_Id) return Boolean;
pragma Inline (Flag20);
function Flag21 (N : Node_Id) return Boolean;
pragma Inline (Flag21);
function Flag22 (N : Node_Id) return Boolean;
pragma Inline (Flag22);
function Flag23 (N : Node_Id) return Boolean;
pragma Inline (Flag23);
function Flag24 (N : Node_Id) return Boolean;
pragma Inline (Flag24);
function Flag25 (N : Node_Id) return Boolean;
pragma Inline (Flag25);
function Flag26 (N : Node_Id) return Boolean;
pragma Inline (Flag26);
function Flag27 (N : Node_Id) return Boolean;
pragma Inline (Flag27);
function Flag28 (N : Node_Id) return Boolean;
pragma Inline (Flag28);
function Flag29 (N : Node_Id) return Boolean;
pragma Inline (Flag29);
function Flag30 (N : Node_Id) return Boolean;
pragma Inline (Flag30);
function Flag31 (N : Node_Id) return Boolean;
pragma Inline (Flag31);
function Flag32 (N : Node_Id) return Boolean;
pragma Inline (Flag32);
function Flag33 (N : Node_Id) return Boolean;
pragma Inline (Flag33);
function Flag34 (N : Node_Id) return Boolean;
pragma Inline (Flag34);
function Flag35 (N : Node_Id) return Boolean;
pragma Inline (Flag35);
function Flag36 (N : Node_Id) return Boolean;
pragma Inline (Flag36);
function Flag37 (N : Node_Id) return Boolean;
pragma Inline (Flag37);
function Flag38 (N : Node_Id) return Boolean;
pragma Inline (Flag38);
function Flag39 (N : Node_Id) return Boolean;
pragma Inline (Flag39);
function Flag40 (N : Node_Id) return Boolean;
pragma Inline (Flag40);
function Flag41 (N : Node_Id) return Boolean;
pragma Inline (Flag41);
function Flag42 (N : Node_Id) return Boolean;
pragma Inline (Flag42);
function Flag43 (N : Node_Id) return Boolean;
pragma Inline (Flag43);
function Flag44 (N : Node_Id) return Boolean;
pragma Inline (Flag44);
function Flag45 (N : Node_Id) return Boolean;
pragma Inline (Flag45);
function Flag46 (N : Node_Id) return Boolean;
pragma Inline (Flag46);
function Flag47 (N : Node_Id) return Boolean;
pragma Inline (Flag47);
function Flag48 (N : Node_Id) return Boolean;
pragma Inline (Flag48);
function Flag49 (N : Node_Id) return Boolean;
pragma Inline (Flag49);
function Flag50 (N : Node_Id) return Boolean;
pragma Inline (Flag50);
function Flag51 (N : Node_Id) return Boolean;
pragma Inline (Flag51);
function Flag52 (N : Node_Id) return Boolean;
pragma Inline (Flag52);
function Flag53 (N : Node_Id) return Boolean;
pragma Inline (Flag53);
function Flag54 (N : Node_Id) return Boolean;
pragma Inline (Flag54);
function Flag55 (N : Node_Id) return Boolean;
pragma Inline (Flag55);
function Flag56 (N : Node_Id) return Boolean;
pragma Inline (Flag56);
function Flag57 (N : Node_Id) return Boolean;
pragma Inline (Flag57);
function Flag58 (N : Node_Id) return Boolean;
pragma Inline (Flag58);
function Flag59 (N : Node_Id) return Boolean;
pragma Inline (Flag59);
function Flag60 (N : Node_Id) return Boolean;
pragma Inline (Flag60);
function Flag61 (N : Node_Id) return Boolean;
pragma Inline (Flag61);
function Flag62 (N : Node_Id) return Boolean;
pragma Inline (Flag62);
function Flag63 (N : Node_Id) return Boolean;
pragma Inline (Flag63);
function Flag64 (N : Node_Id) return Boolean;
pragma Inline (Flag64);
function Flag65 (N : Node_Id) return Boolean;
pragma Inline (Flag65);
function Flag66 (N : Node_Id) return Boolean;
pragma Inline (Flag66);
function Flag67 (N : Node_Id) return Boolean;
pragma Inline (Flag67);
function Flag68 (N : Node_Id) return Boolean;
pragma Inline (Flag68);
function Flag69 (N : Node_Id) return Boolean;
pragma Inline (Flag69);
function Flag70 (N : Node_Id) return Boolean;
pragma Inline (Flag70);
function Flag71 (N : Node_Id) return Boolean;
pragma Inline (Flag71);
function Flag72 (N : Node_Id) return Boolean;
pragma Inline (Flag72);
function Flag73 (N : Node_Id) return Boolean;
pragma Inline (Flag73);
function Flag74 (N : Node_Id) return Boolean;
pragma Inline (Flag74);
function Flag75 (N : Node_Id) return Boolean;
pragma Inline (Flag75);
function Flag76 (N : Node_Id) return Boolean;
pragma Inline (Flag76);
function Flag77 (N : Node_Id) return Boolean;
pragma Inline (Flag77);
function Flag78 (N : Node_Id) return Boolean;
pragma Inline (Flag78);
function Flag79 (N : Node_Id) return Boolean;
pragma Inline (Flag79);
function Flag80 (N : Node_Id) return Boolean;
pragma Inline (Flag80);
function Flag81 (N : Node_Id) return Boolean;
pragma Inline (Flag81);
function Flag82 (N : Node_Id) return Boolean;
pragma Inline (Flag82);
function Flag83 (N : Node_Id) return Boolean;
pragma Inline (Flag83);
function Flag84 (N : Node_Id) return Boolean;
pragma Inline (Flag84);
function Flag85 (N : Node_Id) return Boolean;
pragma Inline (Flag85);
function Flag86 (N : Node_Id) return Boolean;
pragma Inline (Flag86);
function Flag87 (N : Node_Id) return Boolean;
pragma Inline (Flag87);
function Flag88 (N : Node_Id) return Boolean;
pragma Inline (Flag88);
function Flag89 (N : Node_Id) return Boolean;
pragma Inline (Flag89);
function Flag90 (N : Node_Id) return Boolean;
pragma Inline (Flag90);
function Flag91 (N : Node_Id) return Boolean;
pragma Inline (Flag91);
function Flag92 (N : Node_Id) return Boolean;
pragma Inline (Flag92);
function Flag93 (N : Node_Id) return Boolean;
pragma Inline (Flag93);
function Flag94 (N : Node_Id) return Boolean;
pragma Inline (Flag94);
function Flag95 (N : Node_Id) return Boolean;
pragma Inline (Flag95);
function Flag96 (N : Node_Id) return Boolean;
pragma Inline (Flag96);
function Flag97 (N : Node_Id) return Boolean;
pragma Inline (Flag97);
function Flag98 (N : Node_Id) return Boolean;
pragma Inline (Flag98);
function Flag99 (N : Node_Id) return Boolean;
pragma Inline (Flag99);
function Flag100 (N : Node_Id) return Boolean;
pragma Inline (Flag100);
function Flag101 (N : Node_Id) return Boolean;
pragma Inline (Flag101);
function Flag102 (N : Node_Id) return Boolean;
pragma Inline (Flag102);
function Flag103 (N : Node_Id) return Boolean;
pragma Inline (Flag103);
function Flag104 (N : Node_Id) return Boolean;
pragma Inline (Flag104);
function Flag105 (N : Node_Id) return Boolean;
pragma Inline (Flag105);
function Flag106 (N : Node_Id) return Boolean;
pragma Inline (Flag106);
function Flag107 (N : Node_Id) return Boolean;
pragma Inline (Flag107);
function Flag108 (N : Node_Id) return Boolean;
pragma Inline (Flag108);
function Flag109 (N : Node_Id) return Boolean;
pragma Inline (Flag109);
function Flag110 (N : Node_Id) return Boolean;
pragma Inline (Flag110);
function Flag111 (N : Node_Id) return Boolean;
pragma Inline (Flag111);
function Flag112 (N : Node_Id) return Boolean;
pragma Inline (Flag112);
function Flag113 (N : Node_Id) return Boolean;
pragma Inline (Flag113);
function Flag114 (N : Node_Id) return Boolean;
pragma Inline (Flag114);
function Flag115 (N : Node_Id) return Boolean;
pragma Inline (Flag115);
function Flag116 (N : Node_Id) return Boolean;
pragma Inline (Flag116);
function Flag117 (N : Node_Id) return Boolean;
pragma Inline (Flag117);
function Flag118 (N : Node_Id) return Boolean;
pragma Inline (Flag118);
function Flag119 (N : Node_Id) return Boolean;
pragma Inline (Flag119);
function Flag120 (N : Node_Id) return Boolean;
pragma Inline (Flag120);
function Flag121 (N : Node_Id) return Boolean;
pragma Inline (Flag121);
function Flag122 (N : Node_Id) return Boolean;
pragma Inline (Flag122);
function Flag123 (N : Node_Id) return Boolean;
pragma Inline (Flag123);
function Flag124 (N : Node_Id) return Boolean;
pragma Inline (Flag124);
function Flag125 (N : Node_Id) return Boolean;
pragma Inline (Flag125);
function Flag126 (N : Node_Id) return Boolean;
pragma Inline (Flag126);
function Flag127 (N : Node_Id) return Boolean;
pragma Inline (Flag127);
function Flag128 (N : Node_Id) return Boolean;
pragma Inline (Flag128);
function Flag129 (N : Node_Id) return Boolean;
pragma Inline (Flag129);
function Flag130 (N : Node_Id) return Boolean;
pragma Inline (Flag130);
function Flag131 (N : Node_Id) return Boolean;
pragma Inline (Flag131);
function Flag132 (N : Node_Id) return Boolean;
pragma Inline (Flag132);
function Flag133 (N : Node_Id) return Boolean;
pragma Inline (Flag133);
function Flag134 (N : Node_Id) return Boolean;
pragma Inline (Flag134);
function Flag135 (N : Node_Id) return Boolean;
pragma Inline (Flag135);
function Flag136 (N : Node_Id) return Boolean;
pragma Inline (Flag136);
function Flag137 (N : Node_Id) return Boolean;
pragma Inline (Flag137);
function Flag138 (N : Node_Id) return Boolean;
pragma Inline (Flag138);
function Flag139 (N : Node_Id) return Boolean;
pragma Inline (Flag139);
function Flag140 (N : Node_Id) return Boolean;
pragma Inline (Flag140);
function Flag141 (N : Node_Id) return Boolean;
pragma Inline (Flag141);
function Flag142 (N : Node_Id) return Boolean;
pragma Inline (Flag142);
function Flag143 (N : Node_Id) return Boolean;
pragma Inline (Flag143);
function Flag144 (N : Node_Id) return Boolean;
pragma Inline (Flag144);
function Flag145 (N : Node_Id) return Boolean;
pragma Inline (Flag145);
function Flag146 (N : Node_Id) return Boolean;
pragma Inline (Flag146);
function Flag147 (N : Node_Id) return Boolean;
pragma Inline (Flag147);
function Flag148 (N : Node_Id) return Boolean;
pragma Inline (Flag148);
function Flag149 (N : Node_Id) return Boolean;
pragma Inline (Flag149);
function Flag150 (N : Node_Id) return Boolean;
pragma Inline (Flag150);
function Flag151 (N : Node_Id) return Boolean;
pragma Inline (Flag151);
function Flag152 (N : Node_Id) return Boolean;
pragma Inline (Flag151);
function Flag153 (N : Node_Id) return Boolean;
pragma Inline (Flag151);
function Flag154 (N : Node_Id) return Boolean;
pragma Inline (Flag151);
function Flag155 (N : Node_Id) return Boolean;
pragma Inline (Flag151);
function Flag156 (N : Node_Id) return Boolean;
pragma Inline (Flag151);
function Flag157 (N : Node_Id) return Boolean;
pragma Inline (Flag151);
function Flag158 (N : Node_Id) return Boolean;
pragma Inline (Flag151);
function Flag159 (N : Node_Id) return Boolean;
pragma Inline (Flag159);
function Flag160 (N : Node_Id) return Boolean;
pragma Inline (Flag160);
function Flag161 (N : Node_Id) return Boolean;
pragma Inline (Flag161);
function Flag162 (N : Node_Id) return Boolean;
pragma Inline (Flag162);
function Flag163 (N : Node_Id) return Boolean;
pragma Inline (Flag163);
function Flag164 (N : Node_Id) return Boolean;
pragma Inline (Flag164);
function Flag165 (N : Node_Id) return Boolean;
pragma Inline (Flag165);
function Flag166 (N : Node_Id) return Boolean;
pragma Inline (Flag166);
function Flag167 (N : Node_Id) return Boolean;
pragma Inline (Flag167);
function Flag168 (N : Node_Id) return Boolean;
pragma Inline (Flag168);
function Flag169 (N : Node_Id) return Boolean;
pragma Inline (Flag169);
function Flag170 (N : Node_Id) return Boolean;
pragma Inline (Flag170);
function Flag171 (N : Node_Id) return Boolean;
pragma Inline (Flag171);
function Flag172 (N : Node_Id) return Boolean;
pragma Inline (Flag172);
function Flag173 (N : Node_Id) return Boolean;
pragma Inline (Flag173);
function Flag174 (N : Node_Id) return Boolean;
pragma Inline (Flag174);
function Flag175 (N : Node_Id) return Boolean;
pragma Inline (Flag175);
function Flag176 (N : Node_Id) return Boolean;
pragma Inline (Flag176);
function Flag177 (N : Node_Id) return Boolean;
pragma Inline (Flag177);
function Flag178 (N : Node_Id) return Boolean;
pragma Inline (Flag178);
function Flag179 (N : Node_Id) return Boolean;
pragma Inline (Flag179);
function Flag180 (N : Node_Id) return Boolean;
pragma Inline (Flag180);
function Flag181 (N : Node_Id) return Boolean;
pragma Inline (Flag181);
function Flag182 (N : Node_Id) return Boolean;
pragma Inline (Flag182);
function Flag183 (N : Node_Id) return Boolean;
pragma Inline (Flag183);
-- Procedures to set value of indicated field
procedure Set_Nkind (N : Node_Id; Val : Node_Kind);
pragma Inline (Set_Nkind);
procedure Set_Field1 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field1);
procedure Set_Field2 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field2);
procedure Set_Field3 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field3);
procedure Set_Field4 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field4);
procedure Set_Field5 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field5);
procedure Set_Field6 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field6);
procedure Set_Field7 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field7);
procedure Set_Field8 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field8);
procedure Set_Field9 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field9);
procedure Set_Field10 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field10);
procedure Set_Field11 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field11);
procedure Set_Field12 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field12);
procedure Set_Field13 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field13);
procedure Set_Field14 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field14);
procedure Set_Field15 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field15);
procedure Set_Field16 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field16);
procedure Set_Field17 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field17);
procedure Set_Field18 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field18);
procedure Set_Field19 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field19);
procedure Set_Field20 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field20);
procedure Set_Field21 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field21);
procedure Set_Field22 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field22);
procedure Set_Field23 (N : Node_Id; Val : Union_Id);
pragma Inline (Set_Field23);
procedure Set_Node1 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node1);
procedure Set_Node2 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node2);
procedure Set_Node3 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node3);
procedure Set_Node4 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node4);
procedure Set_Node5 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node5);
procedure Set_Node6 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node6);
procedure Set_Node7 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node7);
procedure Set_Node8 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node8);
procedure Set_Node9 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node9);
procedure Set_Node10 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node10);
procedure Set_Node11 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node11);
procedure Set_Node12 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node12);
procedure Set_Node13 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node13);
procedure Set_Node14 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node14);
procedure Set_Node15 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node15);
procedure Set_Node16 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node16);
procedure Set_Node17 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node17);
procedure Set_Node18 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node18);
procedure Set_Node19 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node19);
procedure Set_Node20 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node20);
procedure Set_Node21 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node21);
procedure Set_Node22 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node22);
procedure Set_Node23 (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node23);
procedure Set_List1 (N : Node_Id; Val : List_Id);
pragma Inline (Set_List1);
procedure Set_List2 (N : Node_Id; Val : List_Id);
pragma Inline (Set_List2);
procedure Set_List3 (N : Node_Id; Val : List_Id);
pragma Inline (Set_List3);
procedure Set_List4 (N : Node_Id; Val : List_Id);
pragma Inline (Set_List4);
procedure Set_List5 (N : Node_Id; Val : List_Id);
pragma Inline (Set_List5);
procedure Set_List10 (N : Node_Id; Val : List_Id);
pragma Inline (Set_List10);
procedure Set_List14 (N : Node_Id; Val : List_Id);
pragma Inline (Set_List14);
procedure Set_Elist2 (N : Node_Id; Val : Elist_Id);
pragma Inline (Set_Elist2);
procedure Set_Elist3 (N : Node_Id; Val : Elist_Id);
pragma Inline (Set_Elist3);
procedure Set_Elist4 (N : Node_Id; Val : Elist_Id);
pragma Inline (Set_Elist4);
procedure Set_Elist8 (N : Node_Id; Val : Elist_Id);
pragma Inline (Set_Elist8);
procedure Set_Elist13 (N : Node_Id; Val : Elist_Id);
pragma Inline (Set_Elist13);
procedure Set_Elist15 (N : Node_Id; Val : Elist_Id);
pragma Inline (Set_Elist15);
procedure Set_Elist16 (N : Node_Id; Val : Elist_Id);
pragma Inline (Set_Elist16);
procedure Set_Elist18 (N : Node_Id; Val : Elist_Id);
pragma Inline (Set_Elist18);
procedure Set_Elist21 (N : Node_Id; Val : Elist_Id);
pragma Inline (Set_Elist21);
procedure Set_Elist23 (N : Node_Id; Val : Elist_Id);
pragma Inline (Set_Elist23);
procedure Set_Name1 (N : Node_Id; Val : Name_Id);
pragma Inline (Set_Name1);
procedure Set_Name2 (N : Node_Id; Val : Name_Id);
pragma Inline (Set_Name2);
procedure Set_Char_Code2 (N : Node_Id; Val : Char_Code);
pragma Inline (Set_Char_Code2);
procedure Set_Str3 (N : Node_Id; Val : String_Id);
pragma Inline (Set_Str3);
procedure Set_Uint3 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint3);
procedure Set_Uint4 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint4);
procedure Set_Uint5 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint5);
procedure Set_Uint8 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint8);
procedure Set_Uint9 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint9);
procedure Set_Uint10 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint10);
procedure Set_Uint11 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint11);
procedure Set_Uint12 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint12);
procedure Set_Uint13 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint13);
procedure Set_Uint14 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint14);
procedure Set_Uint15 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint15);
procedure Set_Uint16 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint16);
procedure Set_Uint17 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint17);
procedure Set_Uint22 (N : Node_Id; Val : Uint);
pragma Inline (Set_Uint22);
procedure Set_Ureal3 (N : Node_Id; Val : Ureal);
pragma Inline (Set_Ureal3);
procedure Set_Ureal18 (N : Node_Id; Val : Ureal);
pragma Inline (Set_Ureal18);
procedure Set_Ureal21 (N : Node_Id; Val : Ureal);
pragma Inline (Set_Ureal21);
procedure Set_Flag4 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag4);
procedure Set_Flag5 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag5);
procedure Set_Flag6 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag6);
procedure Set_Flag7 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag7);
procedure Set_Flag8 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag8);
procedure Set_Flag9 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag9);
procedure Set_Flag10 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag10);
procedure Set_Flag11 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag11);
procedure Set_Flag12 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag12);
procedure Set_Flag13 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag13);
procedure Set_Flag14 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag14);
procedure Set_Flag15 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag15);
procedure Set_Flag16 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag16);
procedure Set_Flag17 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag17);
procedure Set_Flag18 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag18);
procedure Set_Flag19 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag19);
procedure Set_Flag20 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag20);
procedure Set_Flag21 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag21);
procedure Set_Flag22 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag22);
procedure Set_Flag23 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag23);
procedure Set_Flag24 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag24);
procedure Set_Flag25 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag25);
procedure Set_Flag26 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag26);
procedure Set_Flag27 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag27);
procedure Set_Flag28 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag28);
procedure Set_Flag29 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag29);
procedure Set_Flag30 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag30);
procedure Set_Flag31 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag31);
procedure Set_Flag32 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag32);
procedure Set_Flag33 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag33);
procedure Set_Flag34 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag34);
procedure Set_Flag35 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag35);
procedure Set_Flag36 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag36);
procedure Set_Flag37 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag37);
procedure Set_Flag38 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag38);
procedure Set_Flag39 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag39);
procedure Set_Flag40 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag40);
procedure Set_Flag41 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag41);
procedure Set_Flag42 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag42);
procedure Set_Flag43 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag43);
procedure Set_Flag44 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag44);
procedure Set_Flag45 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag45);
procedure Set_Flag46 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag46);
procedure Set_Flag47 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag47);
procedure Set_Flag48 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag48);
procedure Set_Flag49 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag49);
procedure Set_Flag50 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag50);
procedure Set_Flag51 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag51);
procedure Set_Flag52 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag52);
procedure Set_Flag53 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag53);
procedure Set_Flag54 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag54);
procedure Set_Flag55 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag55);
procedure Set_Flag56 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag56);
procedure Set_Flag57 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag57);
procedure Set_Flag58 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag58);
procedure Set_Flag59 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag59);
procedure Set_Flag60 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag60);
procedure Set_Flag61 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag61);
procedure Set_Flag62 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag62);
procedure Set_Flag63 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag63);
procedure Set_Flag64 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag64);
procedure Set_Flag65 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag65);
procedure Set_Flag66 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag66);
procedure Set_Flag67 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag67);
procedure Set_Flag68 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag68);
procedure Set_Flag69 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag69);
procedure Set_Flag70 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag70);
procedure Set_Flag71 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag71);
procedure Set_Flag72 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag72);
procedure Set_Flag73 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag73);
procedure Set_Flag74 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag74);
procedure Set_Flag75 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag75);
procedure Set_Flag76 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag76);
procedure Set_Flag77 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag77);
procedure Set_Flag78 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag78);
procedure Set_Flag79 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag79);
procedure Set_Flag80 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag80);
procedure Set_Flag81 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag81);
procedure Set_Flag82 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag82);
procedure Set_Flag83 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag83);
procedure Set_Flag84 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag84);
procedure Set_Flag85 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag85);
procedure Set_Flag86 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag86);
procedure Set_Flag87 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag87);
procedure Set_Flag88 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag88);
procedure Set_Flag89 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag89);
procedure Set_Flag90 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag90);
procedure Set_Flag91 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag91);
procedure Set_Flag92 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag92);
procedure Set_Flag93 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag93);
procedure Set_Flag94 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag94);
procedure Set_Flag95 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag95);
procedure Set_Flag96 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag96);
procedure Set_Flag97 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag97);
procedure Set_Flag98 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag98);
procedure Set_Flag99 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag99);
procedure Set_Flag100 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag100);
procedure Set_Flag101 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag101);
procedure Set_Flag102 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag102);
procedure Set_Flag103 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag103);
procedure Set_Flag104 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag104);
procedure Set_Flag105 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag105);
procedure Set_Flag106 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag106);
procedure Set_Flag107 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag107);
procedure Set_Flag108 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag108);
procedure Set_Flag109 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag109);
procedure Set_Flag110 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag110);
procedure Set_Flag111 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag111);
procedure Set_Flag112 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag112);
procedure Set_Flag113 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag113);
procedure Set_Flag114 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag114);
procedure Set_Flag115 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag115);
procedure Set_Flag116 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag116);
procedure Set_Flag117 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag117);
procedure Set_Flag118 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag118);
procedure Set_Flag119 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag119);
procedure Set_Flag120 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag120);
procedure Set_Flag121 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag121);
procedure Set_Flag122 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag122);
procedure Set_Flag123 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag123);
procedure Set_Flag124 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag124);
procedure Set_Flag125 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag125);
procedure Set_Flag126 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag126);
procedure Set_Flag127 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag127);
procedure Set_Flag128 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag128);
procedure Set_Flag129 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag129);
procedure Set_Flag130 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag130);
procedure Set_Flag131 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag131);
procedure Set_Flag132 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag132);
procedure Set_Flag133 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag133);
procedure Set_Flag134 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag134);
procedure Set_Flag135 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag135);
procedure Set_Flag136 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag136);
procedure Set_Flag137 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag137);
procedure Set_Flag138 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag138);
procedure Set_Flag139 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag139);
procedure Set_Flag140 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag140);
procedure Set_Flag141 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag141);
procedure Set_Flag142 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag142);
procedure Set_Flag143 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag143);
procedure Set_Flag144 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag144);
procedure Set_Flag145 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag145);
procedure Set_Flag146 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag146);
procedure Set_Flag147 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag147);
procedure Set_Flag148 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag148);
procedure Set_Flag149 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag149);
procedure Set_Flag150 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag150);
procedure Set_Flag151 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag151);
procedure Set_Flag152 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag152);
procedure Set_Flag153 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag153);
procedure Set_Flag154 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag154);
procedure Set_Flag155 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag155);
procedure Set_Flag156 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag156);
procedure Set_Flag157 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag157);
procedure Set_Flag158 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag158);
procedure Set_Flag159 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag159);
procedure Set_Flag160 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag160);
procedure Set_Flag161 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag161);
procedure Set_Flag162 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag162);
procedure Set_Flag163 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag163);
procedure Set_Flag164 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag164);
procedure Set_Flag165 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag165);
procedure Set_Flag166 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag166);
procedure Set_Flag167 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag167);
procedure Set_Flag168 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag168);
procedure Set_Flag169 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag169);
procedure Set_Flag170 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag170);
procedure Set_Flag171 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag171);
procedure Set_Flag172 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag172);
procedure Set_Flag173 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag173);
procedure Set_Flag174 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag174);
procedure Set_Flag175 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag175);
procedure Set_Flag176 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag176);
procedure Set_Flag177 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag177);
procedure Set_Flag178 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag178);
procedure Set_Flag179 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag179);
procedure Set_Flag180 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag180);
procedure Set_Flag181 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag181);
procedure Set_Flag182 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag182);
procedure Set_Flag183 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag183);
-- The following versions of Set_Noden also set the parent
-- pointer of the referenced node if it is non_Empty
procedure Set_Node1_With_Parent (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node1_With_Parent);
procedure Set_Node2_With_Parent (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node2_With_Parent);
procedure Set_Node3_With_Parent (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node3_With_Parent);
procedure Set_Node4_With_Parent (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node4_With_Parent);
procedure Set_Node5_With_Parent (N : Node_Id; Val : Node_Id);
pragma Inline (Set_Node5_With_Parent);
-- The following versions of Set_Listn also set the parent pointer of
-- the referenced node if it is non_Empty. The procedures for List6
-- to List12 can only be applied to nodes which have an extension.
procedure Set_List1_With_Parent (N : Node_Id; Val : List_Id);
pragma Inline (Set_List1_With_Parent);
procedure Set_List2_With_Parent (N : Node_Id; Val : List_Id);
pragma Inline (Set_List2_With_Parent);
procedure Set_List3_With_Parent (N : Node_Id; Val : List_Id);
pragma Inline (Set_List3_With_Parent);
procedure Set_List4_With_Parent (N : Node_Id; Val : List_Id);
pragma Inline (Set_List4_With_Parent);
procedure Set_List5_With_Parent (N : Node_Id; Val : List_Id);
pragma Inline (Set_List5_With_Parent);
end Unchecked_Access;
-----------------------------
-- Private Part Subpackage --
-----------------------------
-- The following package contains the definition of the data structure
-- used by the implementation of the Atree package. Logically it really
-- corresponds to the private part, hence the name. The reason that it
-- is defined as a sub-package is to allow special access from clients
-- that need to see the internals of the data structures.
package Atree_Private_Part is
-------------------------
-- Tree Representation --
-------------------------
-- The nodes of the tree are stored in a table (i.e. an array). In the
-- case of extended nodes four consecutive components in the array are
-- used. There are thus two formats for array components. One is used
-- for non-extended nodes, and for the first component of extended
-- nodes. The other is used for the extension parts (second, third and
-- fourth components) of an extended node. A variant record structure
-- is used to distinguish the two formats.
type Node_Record (Is_Extension : Boolean := False) is record
-- Logically, the only field in the common part is the above
-- Is_Extension discriminant (a single bit). However, Gigi cannot
-- yet handle such a structure, so we fill out the common part of
-- the record with fields that are used in different ways for
-- normal nodes and node extensions.
Pflag1, Pflag2 : Boolean;
-- The Paren_Count field is represented using two boolean flags,
-- where Pflag1 is worth 1, and Pflag2 is worth 2. This is done
-- because we need to be easily able to reuse this field for
-- extra flags in the extended node case.
In_List : Boolean;
-- Flag used to indicate if node is a member of a list.
-- This field is considered private to the Atree package.
Unused_1 : Boolean;
-- Currently unused flag
Rewrite_Ins : Boolean;
-- Flag set by Mark_Rewrite_Insertion procedure.
-- This field is considered private to the Atree package.
Analyzed : Boolean;
-- Flag to indicate the node has been analyzed (and expanded)
Comes_From_Source : Boolean;
-- Flag to indicate that node comes from the source program (i.e.
-- was built by the parser or scanner, not the analyzer or expander).
Error_Posted : Boolean;
-- Flag to indicate that an error message has been posted on the
-- node (to avoid duplicate flags on the same node)
Flag4 : Boolean;
Flag5 : Boolean;
Flag6 : Boolean;
Flag7 : Boolean;
Flag8 : Boolean;
Flag9 : Boolean;
Flag10 : Boolean;
Flag11 : Boolean;
Flag12 : Boolean;
Flag13 : Boolean;
Flag14 : Boolean;
Flag15 : Boolean;
Flag16 : Boolean;
Flag17 : Boolean;
Flag18 : Boolean;
-- The eighteen flags for a normal node
-- The above fields are used as follows in components 2-4 of
-- an extended node entry.
-- In_List used as Flag19, Flag40, Flag129
-- Unused_1 used as Flag20, Flag41, Flag130
-- Rewrite_Ins used as Flag21, Flag42, Flag131
-- Analyzed used as Flag22, Flag43, Flag132
-- Comes_From_Source used as Flag23, Flag44, Flag133
-- Error_Posted used as Flag24, Flag45, Flag134
-- Flag4 used as Flag25, Flag46, Flag135
-- Flag5 used as Flag26, Flag47, Flag136
-- Flag6 used as Flag27, Flag48, Flag137
-- Flag7 used as Flag28, Flag49, Flag138
-- Flag8 used as Flag29, Flag50, Flag139
-- Flag9 used as Flag30, Flag51, Flag140
-- Flag10 used as Flag31, Flag52, Flag141
-- Flag11 used as Flag32, Flag53, Flag142
-- Flag12 used as Flag33, Flag54, Flag143
-- Flag13 used as Flag34, Flag55, Flag144
-- Flag14 used as Flag35, Flag56, Flag145
-- Flag15 used as Flag36, Flag57, Flag146
-- Flag16 used as Flag37, Flag58, Flag147
-- Flag17 used as Flag38, Flag59, Flag148
-- Flag18 used as Flag39, Flag60, Flag149
-- Pflag1 used as Flag61, Flag62, Flag150
-- Pflag2 used as Flag63, Flag64, Flag151
Nkind : Node_Kind;
-- For a non-extended node, or the initial section of an extended
-- node, this field holds the Node_Kind value. For an extended node,
-- The Nkind field is used as follows:
--
-- Second entry: holds the Ekind field of the entity
-- Third entry: holds 8 additional flags (Flag65-Flag72)
-- Fourth entry: not currently used
-- Now finally (on an 32-bit boundary!) comes the variant part
case Is_Extension is
-- Non-extended node, or first component of extended node
when False =>
Sloc : Source_Ptr;
-- Source location for this node
Link : Union_Id;
-- This field is used either as the Parent pointer (if In_List
-- is False), or to point to the list header (if In_List is
-- True). This field is considered private and can be modified
-- only by Atree or by Nlists.
Field1 : Union_Id;
Field2 : Union_Id;
Field3 : Union_Id;
Field4 : Union_Id;
Field5 : Union_Id;
-- Five general use fields, which can contain Node_Id, List_Id,
-- Elist_Id, String_Id, Name_Id, or Char_Code values depending
-- on the values in Nkind and (for extended nodes), in Ekind.
-- See packages Sinfo and Einfo for details of their use.
-- Extension (second component) of extended node
when True =>
Field6 : Union_Id;
Field7 : Union_Id;
Field8 : Union_Id;
Field9 : Union_Id;
Field10 : Union_Id;
Field11 : Union_Id;
Field12 : Union_Id;
-- Seven additional general fields available only for entities
-- See package Einfo for details of their use (which depends
-- on the value in the Ekind field).
-- In the third component, the extension format as described
-- above is used to hold additional general fields and flags
-- as follows:
-- Field6-11 Holds Field13-Field18
-- Field12 Holds Flag73-Flag96 and Convention
-- In the fourth component, the extension format as described
-- above is used to hold additional general fields and flags
-- as follows:
-- Field6-10 Holds Field19-Field23
-- Field11 Holds Flag152-Flag167 (16 bits unused)
-- Field12 Holds Flag97-Flag128
end case;
end record;
pragma Pack (Node_Record);
for Node_Record'Size use 8*32;
for Node_Record'Alignment use 4;
-- The following defines the extendible array used for the nodes table
-- Nodes with extensions use two consecutive entries in the array
package Nodes is new Table.Table (
Table_Component_Type => Node_Record,
Table_Index_Type => Node_Id,
Table_Low_Bound => First_Node_Id,
Table_Initial => Alloc.Nodes_Initial,
Table_Increment => Alloc.Nodes_Increment,
Table_Name => "Nodes");
end Atree_Private_Part;
end Atree;
| 36.589078 | 79 | 0.642554 |
c52de5003f694c4196111a38e31cd260ca42c274 | 2,245 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c5/c54a04a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c5/c54a04a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c5/c54a04a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- C54A04A.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 PRIVATE (DISCRETE) TYPES MAY BE USED IN CASE EXPRESSIONS
-- WITHIN THE DEFINING PACKAGE.
-- DAT 1/29/81
WITH REPORT;
PROCEDURE C54A04A IS
USE REPORT;
PACKAGE P IS
TYPE T IS PRIVATE;
TYPE LT IS LIMITED PRIVATE;
PRIVATE
TYPE T IS ('Z', X);
TYPE LT IS NEW INTEGER RANGE 0 .. 1;
END P;
VT : P.T;
VLT : P.LT;
PACKAGE BODY P IS
BEGIN
TEST ("C54A04A", "PRIVATE DISCRETE TYPES MAY APPEAR IN " &
"CASE EXPRESSIONS IN PACKAGE BODY");
VT := 'Z';
VLT := LT (IDENT_INT (1));
CASE VT IS
WHEN X => FAILED ("WRONG CASE 1");
WHEN 'Z' => NULL; -- OK
END CASE;
CASE VLT IS
WHEN 1 => NULL; -- OK
WHEN 0 => FAILED ("WRONG CASE 2");
END CASE;
END P;
BEGIN
-- TEST CALLED FROM PACKAGE BODY, ALREADY ELABORATED.
RESULT;
END C54A04A;
| 29.539474 | 79 | 0.6 |
4d279d4316272a5f17997167082e4018b6145f25 | 3,606 | ads | Ada | tools/scitools/conf/understand/ada/ada05/a-wtdeio.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | 1 | 2020-01-20T21:26:46.000Z | 2020-01-20T21:26:46.000Z | tools/scitools/conf/understand/ada/ada05/a-wtdeio.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | tools/scitools/conf/understand/ada/ada05/a-wtdeio.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . W I D E _ T E X T _ I O . D E C I M A L _ I O --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
--
--
--
--
--
--
--
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Text_IO.Decimal_IO is a subpackage of
-- Wide_Text_IO. In GNAT we make it a child package to avoid loading the
-- necessary code if Decimal_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the
-- difference in semantics so that it is invisible to the Ada programmer.
private generic
type Num is delta <> digits <>;
package Ada.Wide_Text_IO.Decimal_IO is
Default_Fore : Field := 2;
Default_Aft : Field := Num'Digits - 1;
Default_Exp : Field := 3;
procedure Get
(File : File_Type;
Item : out Num;
Width : Field := 0);
procedure Get
(Item : out Num;
Width : Field := 0);
procedure Put
(File : File_Type;
Item : Num;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp);
procedure Put
(Item : Num;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp);
procedure Get
(From : Wide_String;
Item : out Num;
Last : out Positive);
procedure Put
(To : out Wide_String;
Item : Num;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp);
end Ada.Wide_Text_IO.Decimal_IO;
| 41.448276 | 78 | 0.477537 |
fbe47524a7896af89872f64d9df12e079aadc08c | 1,175 | adb | Ada | tests/alog_suite.adb | btmalone/alog | 164a0a3e82aee414dc6125b64cd8ccc3a01876f9 | [
"Apache-2.0"
] | null | null | null | tests/alog_suite.adb | btmalone/alog | 164a0a3e82aee414dc6125b64cd8ccc3a01876f9 | [
"Apache-2.0"
] | 3 | 2018-12-23T03:07:49.000Z | 2019-06-03T20:16:30.000Z | tests/alog_suite.adb | btmalone/alog | 164a0a3e82aee414dc6125b64cd8ccc3a01876f9 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------
--
-- Copyright (c) 2018, Brendan T Malone All Rights Reserved.
--
-- 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 Alog.Tests;
package body Alog_Suite is
use AUnit.Test_Suites;
-- Statically allocate test suite:
Result : aliased Test_Suite;
-- Statically allocate test cases:
Test_Alog : aliased Alog.Tests.Alog_Test;
function Suite return Access_Test_Suite is
begin
Add_Test (Result'Access, Test_Alog'Access);
return Result'Access;
end Suite;
end Alog_Suite;
| 31.756757 | 76 | 0.633191 |
20e5e113a07a6aea0767f020dd9f99595900b2ff | 221 | adb | Ada | ada-main-c-depend/main.adb | dksmiffs/gnatmake-examples | 237c0cd9fe8d4788f8898509319a3a665d2233b1 | [
"MIT"
] | null | null | null | ada-main-c-depend/main.adb | dksmiffs/gnatmake-examples | 237c0cd9fe8d4788f8898509319a3a665d2233b1 | [
"MIT"
] | null | null | null | ada-main-c-depend/main.adb | dksmiffs/gnatmake-examples | 237c0cd9fe8d4788f8898509319a3a665d2233b1 | [
"MIT"
] | null | null | null | with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
procedure C_Fun;
pragma Import(C, C_Fun, "i_am_c");
begin
Put_Line("Calling external C code from Ada main.");
C_Fun;
Put_Line("Exiting Ada main.");
end Main;
| 22.1 | 53 | 0.714932 |
0beb07f8d82dda1346fb98bfccd1cb0e80e0a564 | 45,094 | ads | Ada | src/emulator_8080-disassembler.ads | lholzi/emulator_8080 | 4a147b0402723cbdb97a2897d674b1e000f8a240 | [
"MIT"
] | 1 | 2020-09-15T17:35:10.000Z | 2020-09-15T17:35:10.000Z | src/emulator_8080-disassembler.ads | lholzi/emulator_8080 | 4a147b0402723cbdb97a2897d674b1e000f8a240 | [
"MIT"
] | null | null | null | src/emulator_8080-disassembler.ads | lholzi/emulator_8080 | 4a147b0402723cbdb97a2897d674b1e000f8a240 | [
"MIT"
] | 1 | 2021-05-23T18:53:46.000Z | 2021-05-23T18:53:46.000Z | with Ada.Strings.Bounded;
with Emulator_8080.Processor;
package Emulator_8080.Disassembler is
type Execution_Mode_Type is (Execute_And_Print, Execute_Only);
type Render_Step_Callback_Type is access procedure(Vram : in Processor.Vram_Type);
procedure Read_Rom(Render_Step_Callback : in Render_Step_Callback_Type := null;
Execution_Mode : in Execution_Mode_Type;
Processor : in out Emulator_8080.Processor.Processor_Type);
private
procedure Print_Mnemonic_Information(Processor : in Emulator_8080.Processor.Processor_Type);
package Opcode_String is new Ada.Strings.Bounded.Generic_Bounded_Length(Max => 100);
type Opcode_Information_Type is record
Mnemonic : Opcode_String.Bounded_String;
Description : Opcode_String.Bounded_String;
Size : Positive range 1 .. 3;
end record;
type Opcode_Mapper_Type is array(Byte_Type'Range) of Opcode_Information_Type;
--Opcode_Mapper : constant Opcode_Mapper_Type := (others => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("TEST"),
-- Description => Opcode_String.To_Bounded_String("TEST"),
-- Size => 1));
Opcode_Mapper : constant Opcode_Mapper_Type :=
(16#00# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("NOP"), Size => 1, Description => Opcode_String.To_Bounded_String("NOP")),
16#01# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("LXI B,D16"), Size => 3, Description => Opcode_String.To_Bounded_String("B <- byte 3, C <- byte 2")),
16#02# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("STAX B"), Size => 1, Description => Opcode_String.To_Bounded_String("(BC) <- A")),
16#03# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INX B"), Size => 1, Description => Opcode_String.To_Bounded_String("BC <- BC+1")),
16#04# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INR B"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC): B <- B+1")),
16#05# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCR B"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC): B <- B-1")),
16#06# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MVI B, D8"), Size => 2, Description => Opcode_String.To_Bounded_String("B <- byte 2")),
16#07# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RLC"), Size => 1, Description => Opcode_String.To_Bounded_String("(CY):A = A << 1; bit 0 = prev bit 7; CY = prev bit 7")),
16#09# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DAD B"), Size => 1, Description => Opcode_String.To_Bounded_String("(CY): HL = HL + BC")),
16#0a# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("LDAX B"), Size => 1, Description => Opcode_String.To_Bounded_String("A <- (BC)")),
16#0b# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCX B"), Size => 1, Description => Opcode_String.To_Bounded_String("BC = BC-1")),
16#0c# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INR C"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC): C <- C+1")),
16#0d# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCR C"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC): C <-C-1")),
16#0e# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MVI C,D8"), Size => 2, Description => Opcode_String.To_Bounded_String("C <- byte 2")),
16#0f# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RRC"), Size => 1, Description => Opcode_String.To_Bounded_String("(CY): A = A >> 1; bit 7 = prev bit 0; CY = prev bit 0")),
16#11# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("LXI D,D16"), Size => 3, Description => Opcode_String.To_Bounded_String("- byte 3, E <- byte 2")),
16#12# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("STAX D"), Size => 1, Description => Opcode_String.To_Bounded_String("(DE) <- A")),
16#13# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INX D"), Size => 1, Description => Opcode_String.To_Bounded_String("DE <- DE + 1")),
16#14# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INR D"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):D <- D+1")),
16#15# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCR D"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):D <- D-1")),
16#16# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MVI D, D8"), Size => 2, Description => Opcode_String.To_Bounded_String("D <- byte 2")),
16#17# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RAL"), Size => 1, Description => Opcode_String.To_Bounded_String("(CY): A = A << 1; bit 0 = prev CY; CY = prev bit 7")),
16#19# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DAD D"), Size => 1, Description => Opcode_String.To_Bounded_String("(CY): HL = HL + DE")),
16#1a# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("LDAX D"), Size => 1, Description => Opcode_String.To_Bounded_String("A <- (DE)")),
16#1b# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCX D"), Size => 1, Description => Opcode_String.To_Bounded_String("DE = DE-1")),
16#1c# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INR E"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):E <-E+1")),
16#1d# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCR E"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):E <- E-1")),
16#1e# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MVI E,D8"), Size => 2, Description => Opcode_String.To_Bounded_String("E <- byte 2")),
16#1f# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RAR"), Size => 1, Description => Opcode_String.To_Bounded_String("(CY): A = A >> 1; bit 7 = prev bit 7; CY = prev bit 0")),
16#21# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("LXI H,D16"), Size => 3, Description => Opcode_String.To_Bounded_String("H <- byte 3, L <- byte 2")),
16#22# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SHLD adr"), Size => 3, Description => Opcode_String.To_Bounded_String("(adr) <-L; (adr+1)<-H")),
16#23# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INX H"), Size => 1, Description => Opcode_String.To_Bounded_String("HL <- HL + 1")),
16#24# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INR H"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):H <- H+1")),
16#25# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCR H"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):H <- H-1")),
16#26# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MVI H,D8"), Size => 2, Description => Opcode_String.To_Bounded_String("H <- byte 2")),
16#27# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DAA"), Size => 1, Description => Opcode_String.To_Bounded_String("special")),
16#29# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DAD H"), Size => 1, Description => Opcode_String.To_Bounded_String("(CY): HL = HL + HI")),
16#2a# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("LHLD adr"), Size => 3, Description => Opcode_String.To_Bounded_String("L <- (adr); H<-(adr+1)")),
16#2b# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCX H"), Size => 1, Description => Opcode_String.To_Bounded_String("HL = HL-1")),
16#2c# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INR L "), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):L <- L+1")),
16#2d# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCR L"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):L <- L-1")),
16#2e# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MVI L, D8"), Size => 2, Description => Opcode_String.To_Bounded_String("L <- byte 2")),
16#2f# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CMA"), Size => 1, Description => Opcode_String.To_Bounded_String("A <- !A")),
16#31# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("LXI SP, D16"), Size => 3, Description => Opcode_String.To_Bounded_String("SP.hi <- byte 3, SP.lo <- byte 2")),
16#32# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("STA adr"), Size => 3, Description => Opcode_String.To_Bounded_String("(adr) <- A")),
16#33# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INX SP"), Size => 1, Description => Opcode_String.To_Bounded_String("SP = SP + 1")),
16#34# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INR M"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):(HL) <- (HL)+1")),
16#35# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCR M"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):(HL) <- (HL)-1")),
16#36# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MVI M,D8"), Size => 2, Description => Opcode_String.To_Bounded_String("(HL) <- byte 2")),
16#37# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("STC"), Size => 1, Description => Opcode_String.To_Bounded_String("(CY): CY = 1")),
16#39# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DAD SP"), Size => 1, Description => Opcode_String.To_Bounded_String("(CY): HL = HL + SP")),
16#3a# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("LDA adr"), Size => 3, Description => Opcode_String.To_Bounded_String("A <- (adr)")),
16#3b# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCX SP"), Size => 1, Description => Opcode_String.To_Bounded_String("SP = SP-1")),
16#3c# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("INR A"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):A <- A+1")),
16#3d# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DCR A"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, AC):A <- A-1")),
16#3e# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MVI A,D8"), Size => 2, Description => Opcode_String.To_Bounded_String("A <- byte 2")),
16#3f# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CMC"), Size => 1, Description => Opcode_String.To_Bounded_String("(CY): CY=!CY")),
16#40# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV B,B"), Size => 1, Description => Opcode_String.To_Bounded_String("B <- B")),
16#41# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV B,C"), Size => 1, Description => Opcode_String.To_Bounded_String("B <- C")),
16#42# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV B,D"), Size => 1, Description => Opcode_String.To_Bounded_String("B <- D")),
16#43# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV B,E"), Size => 1, Description => Opcode_String.To_Bounded_String("B <- E")),
16#44# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV B,H"), Size => 1, Description => Opcode_String.To_Bounded_String("B <- H")),
16#45# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV B,L"), Size => 1, Description => Opcode_String.To_Bounded_String("B <- L")),
16#46# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV B,M"), Size => 1, Description => Opcode_String.To_Bounded_String("B <- (HL)")),
16#47# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV B,A"), Size => 1, Description => Opcode_String.To_Bounded_String("B <- A")),
16#48# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV C,B"), Size => 1, Description => Opcode_String.To_Bounded_String("C <- B")),
16#49# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV C,C"), Size => 1, Description => Opcode_String.To_Bounded_String("C <- C")),
16#4a# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV C,D"), Size => 1, Description => Opcode_String.To_Bounded_String("C <- D")),
16#4b# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV C,E"), Size => 1, Description => Opcode_String.To_Bounded_String("C <- E")),
16#4c# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV C,H"), Size => 1, Description => Opcode_String.To_Bounded_String("C <- H")),
16#4d# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV C,L"), Size => 1, Description => Opcode_String.To_Bounded_String("C <- L")),
16#4e# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV C,M"), Size => 1, Description => Opcode_String.To_Bounded_String("C <- (HL)")),
16#4f# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV C,A"), Size => 1, Description => Opcode_String.To_Bounded_String("C <- A")),
16#50# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV D,B"), Size => 1, Description => Opcode_String.To_Bounded_String("D <- B")),
16#51# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV D,C"), Size => 1, Description => Opcode_String.To_Bounded_String("D <- C")),
16#52# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV D,D"), Size => 1, Description => Opcode_String.To_Bounded_String("D <- D")),
16#53# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV D,E"), Size => 1, Description => Opcode_String.To_Bounded_String("D <- E")),
16#54# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV D,H"), Size => 1, Description => Opcode_String.To_Bounded_String("D <- H")),
16#55# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV D,L"), Size => 1, Description => Opcode_String.To_Bounded_String("D <- L")),
16#56# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV D,M"), Size => 1, Description => Opcode_String.To_Bounded_String("D <- (HL)")),
16#57# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV D,A"), Size => 1, Description => Opcode_String.To_Bounded_String("D <- A")),
16#58# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV E,B"), Size => 1, Description => Opcode_String.To_Bounded_String("E <- B")),
16#59# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV E,C"), Size => 1, Description => Opcode_String.To_Bounded_String("E <- C")),
16#5a# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV E,D"), Size => 1, Description => Opcode_String.To_Bounded_String("E <- D")),
16#5b# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV E,E"), Size => 1, Description => Opcode_String.To_Bounded_String("E <- E")),
16#5c# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV E,H"), Size => 1, Description => Opcode_String.To_Bounded_String("E <- H")),
16#5d# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV E,L"), Size => 1, Description => Opcode_String.To_Bounded_String("E <- L")),
16#5e# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV E,M"), Size => 1, Description => Opcode_String.To_Bounded_String("E <- (HL)")),
16#5f# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV E,A"), Size => 1, Description => Opcode_String.To_Bounded_String("E <- A")),
16#60# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV H,B"), Size => 1, Description => Opcode_String.To_Bounded_String("H <- B")),
16#61# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV H,C"), Size => 1, Description => Opcode_String.To_Bounded_String("H <- C")),
16#62# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV H,D"), Size => 1, Description => Opcode_String.To_Bounded_String("H <- D")),
16#63# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV H,E"), Size => 1, Description => Opcode_String.To_Bounded_String("H <- E")),
16#64# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV H,H"), Size => 1, Description => Opcode_String.To_Bounded_String("H <- H")),
16#65# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV H,L"), Size => 1, Description => Opcode_String.To_Bounded_String("H <- L")),
16#66# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV H,M"), Size => 1, Description => Opcode_String.To_Bounded_String("H <- (HL)")),
16#67# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV H,A"), Size => 1, Description => Opcode_String.To_Bounded_String("H <- A")),
16#68# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV L,B"), Size => 1, Description => Opcode_String.To_Bounded_String("L <- B")),
16#69# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV L,C"), Size => 1, Description => Opcode_String.To_Bounded_String("L <- C")),
16#6a# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV L,D"), Size => 1, Description => Opcode_String.To_Bounded_String("L <- D")),
16#6b# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV L,E"), Size => 1, Description => Opcode_String.To_Bounded_String("L <- E")),
16#6c# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV L,H"), Size => 1, Description => Opcode_String.To_Bounded_String("L <- H")),
16#6d# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV L,L"), Size => 1, Description => Opcode_String.To_Bounded_String("L <- L")),
16#6e# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV L,M"), Size => 1, Description => Opcode_String.To_Bounded_String("L <- (HL)")),
16#6f# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV L,A"), Size => 1, Description => Opcode_String.To_Bounded_String("L <- A")),
16#70# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV M,B"), Size => 1, Description => Opcode_String.To_Bounded_String("(HL) <- B")),
16#71# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV M,C"), Size => 1, Description => Opcode_String.To_Bounded_String("(HL) <- C")),
16#72# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV M,D"), Size => 1, Description => Opcode_String.To_Bounded_String("(HL) <- D")),
16#73# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV M,E"), Size => 1, Description => Opcode_String.To_Bounded_String("(HL) <- E")),
16#74# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV M,H"), Size => 1, Description => Opcode_String.To_Bounded_String("(HL) <- H")),
16#75# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV M,L"), Size => 1, Description => Opcode_String.To_Bounded_String("(HL) <- L")),
16#76# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("HLT"), Size => 1, Description => Opcode_String.To_Bounded_String("special")),
16#77# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV M,A"), Size => 1, Description => Opcode_String.To_Bounded_String("(HL) <- A")),
16#78# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV A,B"), Size => 1, Description => Opcode_String.To_Bounded_String("A <- B")),
16#79# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV A,C"), Size => 1, Description => Opcode_String.To_Bounded_String("A <- C")),
16#7a# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV A,D"), Size => 1, Description => Opcode_String.To_Bounded_String("A <- D")),
16#7b# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV A,E"), Size => 1, Description => Opcode_String.To_Bounded_String("A <- E")),
16#7c# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV A,H"), Size => 1, Description => Opcode_String.To_Bounded_String("A <- H")),
16#7d# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV A,L"), Size => 1, Description => Opcode_String.To_Bounded_String("A <- L")),
16#7e# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV A,M"), Size => 1, Description => Opcode_String.To_Bounded_String("A <- (HL)")),
16#7f# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("MOV A,A"), Size => 1, Description => Opcode_String.To_Bounded_String("A <- A")),
16#80# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADD B"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + B")),
16#81# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADD C"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + C")),
16#82# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADD D"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + D")),
16#83# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADD E"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + E")),
16#84# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADD H"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + H")),
16#85# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADD L"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + L")),
16#86# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADD M"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + (HL)")),
16#87# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADD A"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + A")),
16#88# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADC B"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + B + CY")),
16#89# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADC C"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + C + CY")),
16#8a# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADC D"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + D + CY")),
16#8b# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADC E"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + E + CY")),
16#8c# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADC H"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + H + CY")),
16#8d# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADC L"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + L + CY")),
16#8e# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADC M"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + (HL) + CY")),
16#8f# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADC A"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + A + CY")),
16#90# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SUB B"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - B")),
16#91# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SUB C"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - C")),
16#92# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SUB D"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + D")),
16#93# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SUB E"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - E")),
16#94# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SUB H"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + H")),
16#95# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SUB L"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - L")),
16#96# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SUB M"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A + (HL)")),
16#97# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SUB A"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - A")),
16#98# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SBB B"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - B - CY")),
16#99# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SBB C"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - C - CY")),
16#9a# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SBB D"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - D - CY")),
16#9b# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SBB E"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - E - CY")),
16#9c# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SBB H"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - H - CY")),
16#9d# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SBB L"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - L - CY")),
16#9e# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SBB M"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - (HL) - CY")),
16#9f# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SBB A"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - A - CY")),
16#a0# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ANA B"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A & B")),
16#a1# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ANA C"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A & C")),
16#a2# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ANA D"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A & D")),
16#a3# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ANA E"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A & E")),
16#a4# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ANA H"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A & H")),
16#a5# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ANA L"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A & L")),
16#a6# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ANA M"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A & (HL)")),
16#a7# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ANA A"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A & A")),
16#a8# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("XRA B"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A ^ B")),
16#a9# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("XRA C"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A ^ C")),
16#aa# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("XRA D"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A ^ D")),
16#ab# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("XRA E"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A ^ E")),
16#ac# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("XRA H"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A ^ H")),
16#ad# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("XRA L"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A ^ L")),
16#ae# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("XRA M"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A ^ (HL)")),
16#af# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("XRA A"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A ^ A")),
16#b0# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ORA B"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A | B")),
16#b1# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ORA C"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A | C")),
16#b2# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ORA D"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A | D")),
16#b3# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ORA E"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A | E")),
16#b4# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ORA H"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A | H")),
16#b5# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ORA L"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A | L")),
16#b6# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ORA M"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A | (HL)")),
16#b7# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ORA A"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A | A")),
16#b8# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CMP B"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A - B")),
16#b9# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CMP C"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A - C")),
16#ba# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CMP D"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A - D")),
16#bb# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CMP E"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A - E")),
16#bc# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CMP H"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A - H")),
16#bd# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CMP L"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A - L")),
16#be# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CMP M"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A - (HL)")),
16#bf# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CMP A"), Size => 1, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A - A")),
16#c0# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RNZ"), Size => 1, Description => Opcode_String.To_Bounded_String("if NZ, RET")),
16#c1# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("POP B"), Size => 1, Description => Opcode_String.To_Bounded_String("C <- (sp); B <- (sp+1); sp <- sp+2")),
16#c2# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("JNZ adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if NZ, PC <- adr")),
16#c3# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("JMP adr"), Size => 3, Description => Opcode_String.To_Bounded_String("PC <= adr")),
16#c4# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CNZ adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if NZ, CALL adr")),
16#c5# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("PUSH B"), Size => 1, Description => Opcode_String.To_Bounded_String("(sp-2)<-C; (sp-1)<-B; sp <- sp - 2")),
16#c6# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ADI D8"), Size => 2, Description => Opcode_String.To_Bounded_String("Z, S, P, CY, ACA <- A + byte")),
16#c7# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RST 0"), Size => 1, Description => Opcode_String.To_Bounded_String("CALL $0")),
16#c8# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RZ"), Size => 1, Description => Opcode_String.To_Bounded_String("if Z, RET")),
16#c9# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RET"), Size => 1, Description => Opcode_String.To_Bounded_String("PC.lo <- (sp); PC.hi<-(sp+1); SP <- SP+2")),
16#ca# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("JZ adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if Z, PC <- adr")),
16#cc# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CZ adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if Z, CALL adr")),
16#cd# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CALL adr"), Size => 3, Description => Opcode_String.To_Bounded_String("(SP-1)<-PC.hi;(SP-2)<-PC.lo;SP<-SP-2;PC=adr")),
16#ce# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ACI D8"), Size => 2, Description => Opcode_String.To_Bounded_String("Z, S, P, CY, ACA <- A + data + CY")),
16#cf# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RST 1"), Size => 1, Description => Opcode_String.To_Bounded_String("CALL $8")),
16#d0# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RNC"), Size => 1, Description => Opcode_String.To_Bounded_String("if NCY, RET")),
16#d1# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("POP D"), Size => 1, Description => Opcode_String.To_Bounded_String("E <- (sp); D <- (sp+1); sp <- sp+2")),
16#d2# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("JNC adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if NCY, PC<-adr")),
16#d3# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("OUT D8"), Size => 2, Description => Opcode_String.To_Bounded_String("special")),
16#d4# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CNC adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if NCY, CALL adr")),
16#d5# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("PUSH D"), Size => 1, Description => Opcode_String.To_Bounded_String("(sp-2)<-E; (sp-1)<-D; sp <- sp - 2")),
16#d6# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SUI D8"), Size => 2, Description => Opcode_String.To_Bounded_String("Z, S, P, CY, ACA <- A - data")),
16#d7# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RST 2"), Size => 1, Description => Opcode_String.To_Bounded_String("CALL $10")),
16#d8# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RC"), Size => 1, Description => Opcode_String.To_Bounded_String("if CY, RET")),
16#da# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("JC adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if CY, PC<-adr")),
16#db# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("IN D8"), Size => 2, Description => Opcode_String.To_Bounded_String("special")),
16#dc# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CC adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if CY, CALL adr")),
16#de# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SBI D8"), Size => 2, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A - data - CY")),
16#df# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RST 3"), Size => 1, Description => Opcode_String.To_Bounded_String("CALL $18")),
16#e0# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RPO"), Size => 1, Description => Opcode_String.To_Bounded_String("if PO, RET")),
16#e1# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("POP H"), Size => 1, Description => Opcode_String.To_Bounded_String("L <- (sp); H <- (sp+1); sp <- sp+2")),
16#e2# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("JPO adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if PO, PC <- adr")),
16#e3# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("XTHL"), Size => 1, Description => Opcode_String.To_Bounded_String("L <-> (SP); H <-> (SP+1)")),
16#e4# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CPO adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if PO, CALL adr")),
16#e5# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("PUSH H"), Size => 1, Description => Opcode_String.To_Bounded_String("(sp-2)<-L; (sp-1)<-H; sp <- sp - 2")),
16#e6# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ANI D8"), Size => 2, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A & data")),
16#e7# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RST 4"), Size => 1, Description => Opcode_String.To_Bounded_String("CALL $20")),
16#e8# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RPE"), Size => 1, Description => Opcode_String.To_Bounded_String("if PE, RET")),
16#e9# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("PCHL"), Size => 1, Description => Opcode_String.To_Bounded_String("PC.hi <- H; PC.lo <- L")),
16#ea# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("JPE adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if PE, PC <- adr")),
16#eb# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("XCHG"), Size => 1, Description => Opcode_String.To_Bounded_String("H <-> D; L <-> E")),
16#ec# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CPE adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if PE, CALL adr")),
16#ee# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("XRI D8"), Size => 2, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A ^ data")),
16#ef# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RST 5"), Size => 1, Description => Opcode_String.To_Bounded_String("CALL $28")),
16#f0# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RP"), Size => 1, Description => Opcode_String.To_Bounded_String("if P, RET")),
16#f1# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("POP PSW"), Size => 1, Description => Opcode_String.To_Bounded_String("flags <- (sp); A <- (sp+1); sp <- sp+2")),
16#f2# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("JP adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if P=1 PC <- adr")),
16#f3# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("DI"), Size => 1, Description => Opcode_String.To_Bounded_String("special")),
16#f4# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CP adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if P, PC <- adr")),
16#f5# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("PUSH PSW"), Size => 1, Description => Opcode_String.To_Bounded_String("(sp-2)<-flags; (sp-1)<-A; sp <- sp - 2")),
16#f6# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("ORI D8"), Size => 2, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A <- A | data")),
16#f7# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RST 6"), Size => 1, Description => Opcode_String.To_Bounded_String("CALL $30")),
16#f8# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RM"), Size => 1, Description => Opcode_String.To_Bounded_String("if M, RET")),
16#f9# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("SPHL"), Size => 1, Description => Opcode_String.To_Bounded_String("SP=HL")),
16#fa# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("JM adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if M, PC <- adr")),
16#fb# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("EI"), Size => 1, Description => Opcode_String.To_Bounded_String("special")),
16#fc# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CM adr"), Size => 3, Description => Opcode_String.To_Bounded_String("if M, CALL adr")),
16#fe# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("CPI D8"), Size => 2, Description => Opcode_String.To_Bounded_String("(Z, S, P, CY, AC): A - data")),
16#ff# => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("RST 7"), Size => 1, Description => Opcode_String.To_Bounded_String("CALL $38")),
others => Opcode_Information_Type'(Mnemonic => Opcode_String.To_Bounded_String("UNDEFINED OPCODE"), Description => Opcode_String.To_Bounded_String("UNDEFINED OPCODE"), Size => 1));
end Emulator_8080.Disassembler;
| 165.179487 | 209 | 0.69058 |
1c1b05e8522dcc4366ba412d8e034a7d79d591ba | 4,612 | adb | Ada | src/implementation/cl_gl/cl-memory-images-cl_gl.adb | flyx/OpenCLAda | a03a82842b11edda44c8a85f737f5111d1a522a4 | [
"0BSD"
] | 8 | 2015-02-10T20:04:25.000Z | 2021-06-25T07:46:31.000Z | src/implementation/cl_gl/cl-memory-images-cl_gl.adb | flyx/OpenCLAda | a03a82842b11edda44c8a85f737f5111d1a522a4 | [
"0BSD"
] | 1 | 2015-09-10T00:01:55.000Z | 2015-09-10T10:42:23.000Z | src/implementation/cl_gl/cl-memory-images-cl_gl.adb | flyx/OpenCLAda | a03a82842b11edda44c8a85f737f5111d1a522a4 | [
"0BSD"
] | 1 | 2017-02-13T23:07:06.000Z | 2017-02-13T23:07:06.000Z | --------------------------------------------------------------------------------
-- Copyright (c) 2013, Felix Krause <[email protected]>
--
-- 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.Enumerations;
with CL.Helpers;
with CL.API.CL_GL;
package body CL.Memory.Images.CL_GL is
package body Constructors is
function Create_Image2D
(Context : Contexts.CL_GL.Context'Class;
Mode : Access_Kind;
Texture_Target : Targets.Texture_2D_Target.Fillable_Target'Class;
Mipmap_Level : GL.Objects.Textures.Mipmap_Level;
Texture : GL.Objects.Textures.Texture'Class)
return Image2D is
Flags : constant Memory_Flags := Create_Flags (Mode);
Raw_Object : System.Address;
Error : aliased Enumerations.Error_Code;
begin
Raw_Object := API.CL_GL.Create_From_GL_Texture_2D
(CL_Object (Context).Location,
To_Bitfield (Flags),
Texture_Target.Raw_Kind, Mipmap_Level,
Texture.Raw_Id,
Error'Unchecked_Access);
Helpers.Error_Handler (Error);
return Image2D'(Ada.Finalization.Controlled with Location => Raw_Object);
end Create_Image2D;
function Create_Image2D
(Context : Contexts.CL_GL.Context'Class;
Mode : Access_Kind;
Texture_Target : Targets.Cube_Map_Side_Target.Fillable_Target'Class;
Mipmap_Level : GL.Objects.Textures.Mipmap_Level;
Texture : GL.Objects.Textures.Texture'Class)
return Image2D is
Flags : constant Memory_Flags := Create_Flags (Mode);
Raw_Object : System.Address;
Error : aliased Enumerations.Error_Code;
begin
Raw_Object := API.CL_GL.Create_From_GL_Texture_2D
(CL_Object (Context).Location,
To_Bitfield (Flags),
Texture_Target.Raw_Kind, Mipmap_Level,
Texture.Raw_Id,
Error'Unchecked_Access);
Helpers.Error_Handler (Error);
return Image2D'(Ada.Finalization.Controlled with Location => Raw_Object);
end Create_Image2D;
function Create_Image2D
(Context : Contexts.CL_GL.Context'Class;
Mode : Access_Kind;
Renderbuffer : GL.Objects.Renderbuffers.Renderbuffer_Target)
return Image2D is
Flags : constant Memory_Flags := Create_Flags (Mode);
Raw_Object : System.Address;
Error : aliased Enumerations.Error_Code;
begin
Raw_Object := API.CL_GL.Create_From_GL_Renderbuffer
(CL_Object (Context).Location, To_Bitfield (Flags),
Renderbuffer.Raw_Kind, Error'Unchecked_Access);
Helpers.Error_Handler (Error);
return Image2D'(Ada.Finalization.Controlled with Location => Raw_Object);
end Create_Image2D;
function Create_Image3D
(Context : Contexts.CL_GL.Context'Class;
Mode : Access_Kind;
Texture_Target : Targets.Texture_3D_Target.Fillable_Target'Class;
Mipmap_Level : GL.Objects.Textures.Mipmap_Level;
Texture : GL.Objects.Textures.Texture'Class)
return Image3D is
Flags : constant Memory_Flags := Create_Flags (Mode);
Raw_Object : System.Address;
Error : aliased Enumerations.Error_Code;
begin
Raw_Object := API.CL_GL.Create_From_GL_Texture_3D
(CL_Object (Context).Location, To_Bitfield (Flags),
Texture_Target.Raw_Kind, Mipmap_Level, Texture.Raw_Id,
Error'Unchecked_Access);
Helpers.Error_Handler (Error);
return Image3D'(Ada.Finalization.Controlled with Location => Raw_Object);
end Create_Image3D;
end Constructors;
end CL.Memory.Images.CL_GL;
| 43.102804 | 82 | 0.637901 |
104de064ecff0b368045041f6b2c691b49bab248 | 4,491 | adb | Ada | stream_hashing.adb | annexi-strayline/AURA | fbbc4bc963ee82872a67e088b68f0565ba5b50a7 | [
"BSD-3-Clause"
] | 13 | 2021-09-28T18:14:32.000Z | 2022-02-09T17:48:53.000Z | stream_hashing.adb | annexi-strayline/AURA | fbbc4bc963ee82872a67e088b68f0565ba5b50a7 | [
"BSD-3-Clause"
] | 9 | 2021-09-28T19:18:25.000Z | 2022-01-14T22:54:06.000Z | stream_hashing.adb | annexi-strayline/AURA | fbbc4bc963ee82872a67e088b68f0565ba5b50a7 | [
"BSD-3-Clause"
] | 1 | 2021-10-21T21:19:08.000Z | 2021-10-21T21:19:08.000Z | ------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- Reference Implementation --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * Richard Wai (ANNEXI-STRAYLINE) --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- --
-- * Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
package body Stream_Hashing is
--
-- Hash_Type
--
---------
-- "<" --
---------
function "<" (Left, Right: Hash_Type) return Boolean
is (Modular_Hashing.SHA1.SHA1_Hash (Left)."<"
(Modular_Hashing.SHA1.SHA1_Hash (Right)));
---------------
-- To_String --
---------------
function To_String (H: Hash_Type) return String
is (H.Hexadecimal (Lower_Case => False));
--------------------
-- Digrest_Stream --
--------------------
function Digest_Stream
(Stream: not null access Ada.Streams.Root_Stream_Type'Class)
return Hash_Type
is
use Ada.Streams;
Buffer: Stream_Element_Array (1 .. 1024);
Last : Stream_Element_Offset := Buffer'Last;
Engine: Modular_Hashing.SHA1.SHA1_Engine;
begin
while Last = Buffer'Last loop
Stream.Read (Item => Buffer, Last => Last);
Engine.Write (Buffer (Buffer'First .. Last));
end loop;
return Hash_Type'(Modular_Hashing.SHA1.SHA1_Hash (Engine.Digest)
with null record);
end Digest_Stream;
end Stream_Hashing;
| 48.815217 | 78 | 0.434647 |
d0b40bffc28a0040f6b87608b28446989d3835f8 | 8,533 | ads | Ada | bb-runtimes/src/system/system-xi-armv6m-sfp.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/src/system/system-xi-armv6m-sfp.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/src/system/system-xi-armv6m-sfp.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M --
-- --
-- S p e c --
-- (ARM Version) --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
pragma Restrictions (No_Exception_Propagation);
-- Only local exception handling is supported in this profile
pragma Restrictions (No_Exception_Registration);
-- Disable exception name registration. This capability is not used because
-- it is only required by exception stream attributes which are not supported
-- in this run time.
pragma Restrictions (No_Implicit_Dynamic_Code);
-- Pointers to nested subprograms are not allowed in this run time, in order
-- to prevent the compiler from building "trampolines".
pragma Restrictions (No_Finalization);
-- Controlled types are not supported in this run time
pragma Profile (Ravenscar);
-- This is a Ravenscar run time
package System is
pragma Pure;
-- Note that we take advantage of the implementation permission to make
-- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
-- 2005, this is Pure in any case (AI-362).
pragma No_Elaboration_Code_All;
-- Allow the use of that restriction in units that WITH this unit
type Name is (SYSTEM_NAME_GNAT);
System_Name : constant Name := SYSTEM_NAME_GNAT;
-- System-Dependent Named Numbers
Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1);
Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1;
Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size;
Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
Max_Base_Digits : constant := Long_Long_Float'Digits;
Max_Digits : constant := Long_Long_Float'Digits;
Max_Mantissa : constant := Standard'Max_Integer_Size - 1;
Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
Tick : constant := 0.000_001;
-- Storage-related Declarations
type Address is private;
pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := 8;
Word_Size : constant := Standard'Word_Size;
Memory_Size : constant := 2 ** Word_Size;
-- Address comparison
function "<" (Left, Right : Address) return Boolean;
function "<=" (Left, Right : Address) return Boolean;
function ">" (Left, Right : Address) return Boolean;
function ">=" (Left, Right : Address) return Boolean;
function "=" (Left, Right : Address) return Boolean;
pragma Import (Intrinsic, "<");
pragma Import (Intrinsic, "<=");
pragma Import (Intrinsic, ">");
pragma Import (Intrinsic, ">=");
pragma Import (Intrinsic, "=");
-- Other System-Dependent Declarations
type Bit_Order is (High_Order_First, Low_Order_First);
Default_Bit_Order : constant Bit_Order :=
Bit_Order'Val (Standard'Default_Bit_Order);
pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
-- Priority-related Declarations (RM D.1)
-- The armv6-m architectures defines multiple priority levels for
-- interrupts. However it is not possible to mask interrupts based on their
-- priority (because the BASEPRI register is not implemented). This means
-- that the run-time cannot provided the required interrupt semantic for
-- more than one level of interrupt priority.
Max_Interrupt_Priority : constant Positive := 255;
Max_Priority : constant Positive := 254;
subtype Any_Priority is Integer range 0 .. 255;
subtype Priority is Any_Priority range 0 .. Max_Priority;
subtype Interrupt_Priority is Any_Priority
range Max_Priority + 1 .. Max_Interrupt_Priority;
Default_Priority : constant Priority := 127;
-- By default, the priority assigned is the one in the middle of the
-- Priority range.
private
type Address is mod Memory_Size;
Null_Address : constant Address := 0;
--------------------------------------
-- System Implementation Parameters --
--------------------------------------
-- These parameters provide information about the target that is used
-- by the compiler. They are in the private part of System, where they
-- can be accessed using the special circuitry in the Targparm unit
-- whose source should be consulted for more detailed descriptions
-- of the individual switch values.
Atomic_Sync_Default : constant Boolean := False;
Backend_Divide_Checks : constant Boolean := False;
Backend_Overflow_Checks : constant Boolean := True;
Command_Line_Args : constant Boolean := False;
Configurable_Run_Time : constant Boolean := True;
Denorm : constant Boolean := True;
Duration_32_Bits : constant Boolean := False;
Exit_Status_Supported : constant Boolean := False;
Fractional_Fixed_Ops : constant Boolean := False;
Frontend_Layout : constant Boolean := False;
Machine_Overflows : constant Boolean := False;
Machine_Rounds : constant Boolean := True;
Preallocated_Stacks : constant Boolean := True;
Signed_Zeros : constant Boolean := True;
Stack_Check_Default : constant Boolean := False;
Stack_Check_Probes : constant Boolean := False;
Stack_Check_Limits : constant Boolean := False;
Support_Aggregates : constant Boolean := True;
Support_Composite_Assign : constant Boolean := True;
Support_Composite_Compare : constant Boolean := True;
Support_Long_Shifts : constant Boolean := True;
Always_Compatible_Rep : constant Boolean := True;
Suppress_Standard_Library : constant Boolean := True;
Use_Ada_Main_Program_Name : constant Boolean := False;
Frontend_Exceptions : constant Boolean := False;
ZCX_By_Default : constant Boolean := True;
end System;
| 48.482955 | 79 | 0.581624 |
0b14e20c2b8f554f983c458d735ff25af1644314 | 10,577 | ads | Ada | 3-mid/opengl/source/opengl.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | 1 | 2022-01-20T07:13:42.000Z | 2022-01-20T07:13:42.000Z | 3-mid/opengl/source/opengl.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | 3-mid/opengl/source/opengl.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | with
GL,
float_Math.Algebra.linear.d2,
float_Math.Algebra.linear.d3,
float_Math.Geometry.d2,
float_Math.Geometry.d3,
ada.Containers;
package openGL
--
-- Provides a namespace and set of core types.
--
is
pragma Pure;
Error : exception;
------------
-- Profiles
--
type profile_Kind is (Safe, Lean, Desk);
function Profile return profile_Kind;
----------
-- Models
--
Model_too_complex : exception;
max_Models : constant := 2**32 - 1;
type model_Id is range 0 .. max_Models;
null_model_Id : constant model_Id;
-----------
-- Indices
--
type short_Index_t is range 0 .. 2**8 - 1;
type Index_t is range 0 .. 2**16 - 1;
type long_Index_t is range 0 .. 2**32 - 1;
type short_Indices is array (long_Index_t range <>) of short_Index_t;
type Indices is array (long_Index_t range <>) of Index_t;
type long_Indices is array (long_Index_t range <>) of long_Index_t;
--------
-- Math
--
package Math renames float_Math;
use Math;
package linear_Algebra renames float_Math.Algebra.linear;
package linear_Algebra_2d renames float_Math.Algebra.linear.d2;
package linear_Algebra_3d renames float_Math.Algebra.linear.d3;
package Geometry_2d renames float_Math.Geometry.d2;
package Geometry_3d renames float_Math.Geometry.d3;
--------
-- Real
--
subtype Real is math.Real;
package real_Functions renames math.Functions;
-------------
-- Safe Real
--
protected
type safe_Real
is
procedure Value_is (Now : in Real);
function Value return Real;
private
the_Value : Real;
end safe_Real;
-----------
-- Extents
--
type Extent_2D is
record
Width : Natural;
Height : Natural;
end record;
-----------
-- Vectors
--
subtype Vector is math.Vector;
subtype Vector_2 is math.Vector_2;
subtype Vector_3 is math.Vector_3;
subtype Vector_4 is math.Vector_4;
type Vector_2_array is array (Positive range <>) of Vector_2;
type Vector_3_array is array ( Index_t range <>) of aliased Vector_3;
type Vector_3_large_array is array (long_Index_t range <>) of aliased Vector_3;
function Scaled (Self : in Vector_3; By : in Vector_3) return Vector_3;
function Scaled (Self : in Vector_3_array; By : in Vector_3) return Vector_3_array;
function to_Vector_3_array (Self : in Vector_2_array) return Vector_3_array;
------------
-- Matrices
--
subtype Matrix is math.Matrix;
subtype Matrix_2x2 is math.Matrix_2x2;
subtype Matrix_3x3 is math.Matrix_3x3;
subtype Matrix_4x4 is math.Matrix_4x4;
---------------
-- Height Maps
--
type height_Map is array (Index_t range <>,
Index_t range <>) of aliased Real;
function Scaled (Self : in height_Map; By : in Real) return height_Map;
procedure scale (Self : in out height_Map; By : in Real);
function height_Extent (Self : in height_Map) return Vector_2;
--
-- Returns the min and max height.
type index_Pair is array (1 .. 2) of Index_t;
function Region (Self : in height_Map; Rows, Cols : in index_Pair) return height_Map;
--
-- Returns the submatrix indicated via Rows & Cols.
------------
-- Geometry
--
subtype Site is Vector_3; -- A position in 3d space.
subtype Sites is Vector_3_array;
subtype many_Sites is Vector_3_large_array;
subtype Normal is Vector_3; -- A normal in 3d space.
subtype Normals is Vector_3_array;
subtype many_Normals is Vector_3_large_array;
type Bounds is
record
Ball : Real; -- Sphere radius.
Box : Geometry_3d.bounding_Box;
end record;
null_Bounds : constant Bounds;
function bounding_Box_of (Self : Sites) return Bounds;
procedure set_Ball_from_Box (Self : in out Bounds);
---------
-- Color
--
-- RGB
--
subtype grey_Value is gl.GLubyte;
subtype color_Value is gl.GLubyte;
type rgb_Color is
record
Red : aliased color_Value;
Green : color_Value;
Blue : color_Value;
end record;
type rgba_Color is
record
Primary : rgb_Color;
Alpha : color_Value;
end record;
-- Primary
--
null_Primary : constant := Real'Adjacent (0.0, -1.0);
type Primary is new Real range null_Primary .. 1.0;
type Color is
record
Red : Primary;
Green : Primary;
Blue : Primary;
end record;
type Colors is array (Index_t range <>) of Color;
type Opaqueness is new Real range 0.0 .. 1.0;
Opaque : constant Opaqueness;
Lucid : constant Opaqueness;
type lucid_Color is
record
Primary : Color;
Opacity : Opaqueness;
end record;
type lucid_Colors is array (Index_t range <>) of lucid_Color;
no_Color : constant Color;
no_lucid_Color : constant lucid_Color;
subtype Shine is Real range 1.0 .. Real'Last;
default_Shine : constant := 0.05;
----------
-- Images
--
type grey_Image is array (Index_t range <>, Index_t range <>) of aliased grey_Value;
type Image is array (Index_t range <>, Index_t range <>) of aliased rgb_Color;
type lucid_Image is array (Index_t range <>, Index_t range <>) of aliased rgba_Color;
function to_Image (From : in lucid_Image) return Image;
-----------
-- Texture
--
-- Coordinates
--
type Coordinate_1D is
record
S : aliased Real;
end record;
type Coordinate_2D is
record
S, T : aliased Real;
end record;
type Coordinate_3D is
record
S, T, R : aliased Real;
end record;
type Coordinate_4D is
record
S, T, R, Q : aliased Real;
end record;
type Coordinates_1D is array (Index_t range <>) of aliased Coordinate_1D;
type Coordinates_2D is array (Index_t range <>) of aliased Coordinate_2D;
type Coordinates_3D is array (Index_t range <>) of aliased Coordinate_3D;
type Coordinates_4D is array (Index_t range <>) of aliased Coordinate_4D;
type many_Coordinates_1D is array (long_Index_t range <>) of aliased Coordinate_1D;
type many_Coordinates_2D is array (long_Index_t range <>) of aliased Coordinate_2D;
type many_Coordinates_3D is array (long_Index_t range <>) of aliased Coordinate_3D;
type many_Coordinates_4D is array (long_Index_t range <>) of aliased Coordinate_4D;
-- Transforms
--
type texture_Transform is
record
Offset : Real;
Scale : Real;
end record;
type texture_Transform_1D is
record
S : texture_Transform;
end record;
type texture_Transform_2D is
record
S : texture_Transform;
T : texture_Transform;
end record;
type texture_Transform_3D is
record
S : texture_Transform;
T : texture_Transform;
R : texture_Transform;
end record;
type texture_Transform_4D is
record
S : texture_Transform;
T : texture_Transform;
R : texture_Transform;
Q : texture_Transform;
end record;
----------
-- Assets
--
type asset_Name is new String (1 .. 128);
--
-- Name of a file containing textures, images, fonts or other resources.
null_Asset : constant asset_Name;
function to_Asset (Self : in String) return asset_Name;
function to_String (Self : in asset_Name) return String;
function Hash (Self : in asset_Name) return ada.Containers.Hash_type;
-----------------------------
-- Shader Program Parameters
--
type Parameters is tagged limited private;
---------------
-- Task Safety
--
type safe_Boolean is new Boolean;
pragma Atomic (safe_Boolean);
private
-- NB: Packing these arrays forces compiler to use the correct size for the element type, rather than the most efficient size.
--
pragma Pack (short_Indices);
pragma Pack ( Indices);
pragma Pack ( long_Indices);
pragma Assert (GL.GLfloat'Size = Real'Size);
null_Asset : constant asset_Name := (others => ' ');
null_model_Id : constant model_Id := 0;
null_Bounds : constant Bounds := (ball => 0.0,
box => (lower => (Real'Last, Real'Last, Real'Last),
upper => (Real'First, Real'First, Real'First)));
-----------
-- Opacity
--
Opaque : constant Opaqueness := 1.0;
Lucid : constant Opaqueness := 0.0;
opaque_Value : constant color_Value := color_Value'Last;
lucid_Value : constant color_Value := color_Value'First;
---------
-- Color
--
no_Color : constant Color := (Red => null_Primary,
Green => null_Primary,
Blue => null_Primary);
no_lucid_Color : constant lucid_Color := (Primary => (Red => null_Primary,
Green => null_Primary,
Blue => null_Primary),
Opacity => Opaqueness'First);
-- RGB
--
type rgb_Colors is array (Index_t range <>) of rgb_Color;
type rgba_Colors is array (Index_t range <>) of rgba_Color;
-- Conversions
--
function to_Color (Red, Green, Blue : in Primary) return rgb_Color;
function to_color_Value (Self : in Primary) return color_Value;
function to_Primary (Self : in color_Value) return Primary;
function to_Color (From : in rgb_Color) return Color;
function to_lucid_Color (From : in rgba_Color) return lucid_Color;
function to_rgba_Color (From : in lucid_Color) return rgba_Color;
function to_rgb_Color (From : in Color) return rgb_Color;
function "+" (From : in rgb_Color) return Color renames to_Color;
function "+" (From : in lucid_Color) return rgba_Color renames to_rgba_Color;
function "+" (From : in Color) return rgb_Color renames to_rgb_Color;
----------------------------
-- Shader Program Parameters
--
type Parameters is tagged limited null record;
end openGL;
| 25.303828 | 129 | 0.600076 |
0b5aa611dbd8185c25c2c350ed656cfd9d115bb1 | 10,080 | adb | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-sequio.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-sequio.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-sequio.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S E Q U E N T I A L _ I O --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This is the generic template for Sequential_IO, i.e. the code that gets
-- duplicated. We absolutely minimize this code by either calling routines
-- in System.File_IO (for common file functions), or in System.Sequential_IO
-- (for specialized Sequential_IO functions)
with Ada.Unchecked_Conversion;
with System;
with System.Byte_Swapping;
with System.CRTL;
with System.File_Control_Block;
with System.File_IO;
with System.Storage_Elements;
with Interfaces.C_Streams; use Interfaces.C_Streams;
package body Ada.Sequential_IO is
package FIO renames System.File_IO;
package FCB renames System.File_Control_Block;
package SIO renames System.Sequential_IO;
package SSE renames System.Storage_Elements;
SU : constant := System.Storage_Unit;
subtype AP is FCB.AFCB_Ptr;
subtype FP is SIO.File_Type;
function To_FCB is new Ada.Unchecked_Conversion (File_Mode, FCB.File_Mode);
function To_SIO is new Ada.Unchecked_Conversion (FCB.File_Mode, File_Mode);
use type System.Bit_Order;
use type System.CRTL.size_t;
procedure Byte_Swap (Siz : in out size_t);
-- Byte swap Siz
---------------
-- Byte_Swap --
---------------
procedure Byte_Swap (Siz : in out size_t) is
use System.Byte_Swapping;
begin
case size_t'Size is
when 32 => Siz := size_t (Bswap_32 (U32 (Siz)));
when 64 => Siz := size_t (Bswap_64 (U64 (Siz)));
when others => raise Program_Error;
end case;
end Byte_Swap;
-----------
-- Close --
-----------
procedure Close (File : in out File_Type) is
begin
FIO.Close (AP (File)'Unrestricted_Access);
end Close;
------------
-- Create --
------------
procedure Create
(File : in out File_Type;
Mode : File_Mode := Out_File;
Name : String := "";
Form : String := "")
is
begin
SIO.Create (FP (File), To_FCB (Mode), Name, Form);
end Create;
------------
-- Delete --
------------
procedure Delete (File : in out File_Type) is
begin
FIO.Delete (AP (File)'Unrestricted_Access);
end Delete;
-----------------
-- End_Of_File --
-----------------
function End_Of_File (File : File_Type) return Boolean is
begin
return FIO.End_Of_File (AP (File));
end End_Of_File;
-----------
-- Flush --
-----------
procedure Flush (File : File_Type) is
begin
FIO.Flush (AP (File));
end Flush;
----------
-- Form --
----------
function Form (File : File_Type) return String is
begin
return FIO.Form (AP (File));
end Form;
-------------
-- Is_Open --
-------------
function Is_Open (File : File_Type) return Boolean is
begin
return FIO.Is_Open (AP (File));
end Is_Open;
----------
-- Mode --
----------
function Mode (File : File_Type) return File_Mode is
begin
return To_SIO (FIO.Mode (AP (File)));
end Mode;
----------
-- Name --
----------
function Name (File : File_Type) return String is
begin
return FIO.Name (AP (File));
end Name;
----------
-- Open --
----------
procedure Open
(File : in out File_Type;
Mode : File_Mode;
Name : String;
Form : String := "")
is
begin
SIO.Open (FP (File), To_FCB (Mode), Name, Form);
end Open;
----------
-- Read --
----------
procedure Read (File : File_Type; Item : out Element_Type) is
Siz : constant size_t := (Item'Size + SU - 1) / SU;
Rsiz : size_t;
begin
FIO.Check_Read_Status (AP (File));
-- For non-definite type or type with discriminants, read size and
-- raise Program_Error if it is larger than the size of the item.
if not Element_Type'Definite
or else Element_Type'Has_Discriminants
then
FIO.Read_Buf
(AP (File), Rsiz'Address, size_t'Size / System.Storage_Unit);
-- If item read has non-default scalar storage order, then the size
-- will have been written with that same order, so byte swap it.
if Element_Type'Scalar_Storage_Order /= System.Default_Bit_Order then
Byte_Swap (Rsiz);
end if;
-- For a type with discriminants, we have to read into a temporary
-- buffer if Item is constrained, to check that the discriminants
-- are correct.
if Element_Type'Has_Discriminants and then Item'Constrained then
declare
RsizS : constant SSE.Storage_Offset :=
SSE.Storage_Offset (Rsiz - 1);
type SA is new SSE.Storage_Array (0 .. RsizS);
for SA'Alignment use Standard'Maximum_Alignment;
-- We will perform an unchecked conversion of a pointer-to-SA
-- into pointer-to-Element_Type. We need to ensure that the
-- source is always at least as strictly aligned as the target.
type SAP is access all SA;
type ItemP is access all Element_Type;
pragma Warnings (Off);
-- We have to turn warnings off for function To_ItemP,
-- because it gets analyzed for all types, including ones
-- which can't possibly come this way, and for which the
-- size of the access types differs.
function To_ItemP is new Ada.Unchecked_Conversion (SAP, ItemP);
pragma Warnings (On);
Buffer : aliased SA;
pragma Unsuppress (Discriminant_Check);
begin
FIO.Read_Buf (AP (File), Buffer'Address, Rsiz);
Item := To_ItemP (Buffer'Access).all;
return;
end;
end if;
-- In the case of a non-definite type, make sure the length is OK.
-- We can't do this in the variant record case, because the size is
-- based on the current discriminant, so may be apparently wrong.
if not Element_Type'Has_Discriminants and then Rsiz > Siz then
raise Program_Error;
end if;
FIO.Read_Buf (AP (File), Item'Address, Rsiz);
-- For definite type without discriminants, use actual size of item
else
FIO.Read_Buf (AP (File), Item'Address, Siz);
end if;
end Read;
-----------
-- Reset --
-----------
procedure Reset (File : in out File_Type; Mode : File_Mode) is
begin
FIO.Reset (AP (File)'Unrestricted_Access, To_FCB (Mode));
end Reset;
procedure Reset (File : in out File_Type) is
begin
FIO.Reset (AP (File)'Unrestricted_Access);
end Reset;
-----------
-- Write --
-----------
procedure Write (File : File_Type; Item : Element_Type) is
Siz : constant size_t := (Item'Size + SU - 1) / SU;
-- Size to be written, in native representation
Swapped_Siz : size_t := Siz;
-- Same, possibly byte swapped to account for Element_Type endianness
begin
FIO.Check_Write_Status (AP (File));
-- For non-definite types or types with discriminants, write the size
if not Element_Type'Definite
or else Element_Type'Has_Discriminants
then
-- If item written has non-default scalar storage order, then the
-- size is written with that same order, so byte swap it.
if Element_Type'Scalar_Storage_Order /= System.Default_Bit_Order then
Byte_Swap (Swapped_Siz);
end if;
FIO.Write_Buf
(AP (File), Swapped_Siz'Address, size_t'Size / System.Storage_Unit);
end if;
FIO.Write_Buf (AP (File), Item'Address, Siz);
end Write;
end Ada.Sequential_IO;
| 32 | 79 | 0.536806 |
df3cd86c1d6442934b802497eb2d88f493ccc587 | 2,131 | ads | Ada | source/image/required/s-wwdenu.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 33 | 2015-04-04T09:19:36.000Z | 2021-11-10T05:33:34.000Z | source/image/required/s-wwdenu.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 8 | 2017-11-14T13:05:07.000Z | 2018-08-09T15:28:49.000Z | source/image/required/s-wwdenu.ads | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 9 | 2015-02-03T17:09:53.000Z | 2021-11-12T01:16:05.000Z | pragma License (Unrestricted);
-- implementation unit required by compiler
package System.WWd_Enum is
pragma Pure;
-- (s-wchcon.ads)
type WC_Encoding_Method is range 1 .. 6;
-- required for Enum'Wide_Width by compiler (s-wwdenu.ads)
function Wide_Width_Enumeration_8 (
Names : String;
Indexes : Address;
Lo, Hi : Natural;
EM : WC_Encoding_Method := 1)
return Natural;
function Wide_Width_Enumeration_16 (
Names : String;
Indexes : Address;
Lo, Hi : Natural;
EM : WC_Encoding_Method := 1)
return Natural;
function Wide_Width_Enumeration_32 (
Names : String;
Indexes : Address;
Lo, Hi : Natural;
EM : WC_Encoding_Method := 1)
return Natural;
pragma Pure_Function (Wide_Width_Enumeration_8);
pragma Pure_Function (Wide_Width_Enumeration_16);
pragma Pure_Function (Wide_Width_Enumeration_32);
pragma Inline (Wide_Width_Enumeration_8);
pragma Inline (Wide_Width_Enumeration_16);
pragma Inline (Wide_Width_Enumeration_32);
-- required for Enum'Wide_Wide_Width by compiler (s-wwdenu.ads)
function Wide_Wide_Width_Enumeration_8 (
Names : String;
Indexes : Address;
Lo, Hi : Natural;
EM : WC_Encoding_Method := 1)
return Natural;
function Wide_Wide_Width_Enumeration_16 (
Names : String;
Indexes : Address;
Lo, Hi : Natural;
EM : WC_Encoding_Method := 1)
return Natural;
function Wide_Wide_Width_Enumeration_32 (
Names : String;
Indexes : Address;
Lo, Hi : Natural;
EM : WC_Encoding_Method := 1)
return Natural;
pragma Pure_Function (Wide_Wide_Width_Enumeration_8);
pragma Pure_Function (Wide_Wide_Width_Enumeration_16);
pragma Pure_Function (Wide_Wide_Width_Enumeration_32);
pragma Inline (Wide_Wide_Width_Enumeration_8);
pragma Inline (Wide_Wide_Width_Enumeration_16);
pragma Inline (Wide_Wide_Width_Enumeration_32);
-- [gcc 4.5/4.6] it needs default values for EM to avoiding bug of compiler
-- (missing argument for parameter "EM" in call to ...)
end System.WWd_Enum;
| 31.80597 | 79 | 0.695448 |
23b102f23782a6d3c19208d70c13d4ce98c0ff8f | 6,001 | adb | Ada | src/sdl-video-palettes.adb | Fabien-Chouteau/sdlada | f08d72e3f5dcec228d68fb5b6681ea831f81ef47 | [
"Zlib"
] | 1 | 2021-10-30T14:41:56.000Z | 2021-10-30T14:41:56.000Z | src/sdl-video-palettes.adb | Fabien-Chouteau/sdlada | f08d72e3f5dcec228d68fb5b6681ea831f81ef47 | [
"Zlib"
] | null | null | null | src/sdl-video-palettes.adb | Fabien-Chouteau/sdlada | f08d72e3f5dcec228d68fb5b6681ea831f81ef47 | [
"Zlib"
] | null | null | null | --------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2020, Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
with Ada.Finalization; use Ada.Finalization;
package body SDL.Video.Palettes is
-- function Element_Value (Container : in Palette_array; Pos : in Palette_Cursor) return Colour is
-- begin
-- return Pos.Current.all;
-- end Element_Value;
-- function Has_Element (Pos : in Palette_Cursor) return Boolean is
-- begin
-- -- if Pos.Index < Positive (Pos.Container.Internal.Total) then
-- if Pos.Index < Pos.Total then
-- return True;
-- end if;
-- return False;
-- end Has_Element;
-- function Iterate (Container : not null access Palette_Array) return Palette_Iterators'Class is
-- begin
-- return It : constant Palette_Iterators := Palette_Iterators'(Container => Palette_Access (Container)) do
-- null;
-- end return;
-- end Iterate;
-- function First (Object : in Palette_Iterators) return Palette_Cursor is
-- begin
-- return Palette_Cursor'
-- (-- Container => Object.Internal,
-- Index => Positive'First,
-- Total => Positive (Object.Container.Internal.Total),
-- Current => Object.Container.Internal.Colours);
-- end First;
-- function Next (Object : in Palette_Iterators; Position : in Palette_Cursor) return Palette_Cursor is
-- Curr : Colour_Array_Pointer.Pointer := Position.Current;
-- begin
-- Colour_Array_Pointer.Increment (Curr);
-- return Palette_Cursor'
-- (-- Container => Object.Internal,
-- Index => Position.Index + 1,
-- Total => Position.Total,
-- Current => Curr);
-- end Next;
type Iterator (Container : access constant Palette'Class) is new Limited_Controlled and
Palette_Iterator_Interfaces.Forward_Iterator with
record
Index : Natural;
end record;
overriding
function First (Object : Iterator) return Cursor;
overriding
function Next (Object : Iterator; Position : Cursor) return Cursor;
function Element (Position : in Cursor) return Colour is
begin
-- return Position.Container.Data.Colours (Position.Index);
return Colour_Array_Pointer.Value (Position.Current) (0);
end Element;
function Has_Element (Position : in Cursor) return Boolean is
begin
return Position.Index <= Natural (Position.Container.Data.Total);
end Has_Element;
function Constant_Reference
(Container : aliased Palette;
Position : Cursor) return Colour is
begin
-- Put_Line ("Constant_Reference" & Natural'Image (Position.Index));
-- return Position.Container.Data.Colours (Position.Index);
return Colour_Array_Pointer.Value (Position.Current) (0);
end Constant_Reference;
function Iterate (Container : Palette) return
Palette_Iterator_Interfaces.Forward_Iterator'Class is
begin
-- Put_Line ("Iterate");
return It : constant Iterator :=
(Limited_Controlled with
Container => Container'Access, Index => Natural'First + 1)
do
-- Put_Line (" index = " & Natural'Image(It.Index));
null;
end return;
end Iterate;
function Create (Total_Colours : in Positive) return Palette is
function SDL_Alloc_Palette (Ncolors : in C.int) return Internal_Palette_Access with
Import => True,
Convention => C,
External_Name => "SDL_AllocPalette";
begin
return P : constant Palette :=
(Data => SDL_Alloc_Palette (C.int (Total_Colours)))
do
null;
end return;
end Create;
procedure Free (Container : in out Palette) is
procedure SDL_Free_Palette (Self : in Internal_Palette_Access) with
Import => True,
Convention => C,
External_Name => "SDL_FreePalette";
begin
SDL_Free_Palette (Container.Data);
Container.Data := null;
end Free;
overriding
function First (Object : Iterator) return Cursor is
begin
-- Put_Line ("First -> Index = " & Natural'Image (Object.Index));
return Cursor'(Container => Object.Container,
Index => Object.Index,
Current => Object.Container.Data.Colours);
end First;
overriding
function Next (Object : Iterator; Position : Cursor) return Cursor is
Next_Ptr : Colour_Array_Pointer.Pointer := Position.Current;
begin
Colour_Array_Pointer.Increment (Next_Ptr);
-- Put_Line ("Next");
-- if Object.Container /= Position.Container then
-- raise Program_Error with "Wrong containers";
-- end if;
return Cursor'(Container => Object.Container,
Index => Position.Index + 1,
Current => Next_Ptr);
end Next;
end SDL.Video.Palettes;
| 35.934132 | 116 | 0.621563 |
394575fedf525bd37654a8aeb8f99237a37679ac | 4,270 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cz/cz1101a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cz/cz1101a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cz/cz1101a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- CZ1101A.ADA
--
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
--
-- OBJECTIVE:
-- CHECK THAT THE REPORT ROUTINES OF THE REPORT PACKAGE WORK
-- CORRECTLY.
--
-- PASS/FAIL CRITERIA:
-- THIS TEST PASSES IF THE OUTPUT MATCHES THAT SUPPLIED IN THE
-- APPLICABLE VERSION OF THE ACVC USERS' GUIDE. THE EXPECTED
-- TEST RESULT IS "TENTATIVELY PASSED."
-- HISTORY:
-- JRK 08/07/81 CREATED ORIGINAL TEST.
-- JRK 10/27/82
-- JRK 06/01/84
-- JET 01/13/88 ADDED TESTS OF SPECIAL_ACTION AND UPDATED HEADER.
-- PWB 06/24/88 CORRECTED LENGTH OF ONE OUTPUT STRING AND ADDED
-- PASS/FAIL CRITERIA.
-- BCB 05/17/90 CORRECTED LENGTH OF 'MAX_LEN LONG' OUTPUT STRING.
-- ADDED CODE TO CREATE REPFILE.
-- LDC 05/17/90 REMOVED DIRECT_IO REFERENCES.
-- PWN 12/03/94 REMOVED ADA 9X INCOMPATIBILITIES.
WITH REPORT;
USE REPORT;
PROCEDURE CZ1101A IS
DATE_AND_TIME : STRING(1..17);
DATE, TIME : STRING(1..7);
BEGIN
COMMENT ("(CZ1101A) CHECK REPORT ROUTINES");
COMMENT (" INITIAL VALUES SHOULD BE 'NO_NAME' AND 'FAILED'");
RESULT;
TEST ("PASS_TEST", "CHECKING 'TEST' AND 'RESULT' FOR 'PASSED'");
COMMENT ("THIS LINE IS EXACTLY 'MAX_LEN' LONG. " &
"...5...60....5...70");
COMMENT ("THIS COMMENT HAS A WORD THAT SPANS THE FOLD " &
"POINT. THIS COMMENT FITS EXACTLY ON TWO LINES. " &
"..5...60....5...70");
COMMENT ("THIS_COMMENT_IS_ONE_VERY_LONG_WORD_AND_SO_" &
"IT_SHOULD_BE_SPLIT_AT_THE_FOLD_POINT");
RESULT;
COMMENT ("CHECK THAT 'RESULT' RESETS VALUES TO 'NO_NAME' " &
"AND 'FAILED'");
RESULT;
TEST ("FAIL_TEST", "CHECKING 'FAILED' AND 'RESULT' FOR 'FAILED'");
FAILED ("'RESULT' SHOULD NOW BE 'FAILED'");
RESULT;
TEST ("NA_TEST", "CHECKING 'NOT-APPLICABLE'");
NOT_APPLICABLE ("'RESULT' SHOULD NOW BE 'NOT-APPLICABLE'");
RESULT;
TEST ("FAIL_NA_TEST", "CHECKING 'NOT_APPLICABLE', 'FAILED', " &
"'NOT_APPLICABLE'");
NOT_APPLICABLE ("'RESULT' BECOMES 'NOT-APPLICABLE'");
FAILED ("'RESULT' BECOMES 'FAILED'");
NOT_APPLICABLE ("CALLING 'NOT_APPLICABLE' DOESN'T CHANGE " &
"'RESULT'");
RESULT;
TEST ("SPEC_NA_TEST", "CHECKING 'SPEC_ACT', 'NOT_APPLICABLE', " &
"'SPEC_ACT'");
SPECIAL_ACTION("'RESULT' BECOMES 'TENTATIVELY PASSED'");
NOT_APPLICABLE ("'RESULT' BECOMES 'NOT APPLICABLE'");
SPECIAL_ACTION("CALLING 'SPECIAL_ACTION' DOESN'T CHANGE 'RESULT'");
RESULT;
TEST ("SPEC_FAIL_TEST", "CHECKING 'SPEC_ACT', 'FAILED', " &
"'SPEC_ACT'");
SPECIAL_ACTION("'RESULT' BECOMES 'TENTATIVELY PASSED'");
FAILED ("'RESULT' BECOMES 'FAILED'");
SPECIAL_ACTION("CALLING 'SPECIAL_ACTION' DOESN'T CHANGE 'RESULT'");
RESULT;
TEST ("CZ1101A", "CHECKING 'SPECIAL_ACTION' ALONE");
SPECIAL_ACTION("'RESULT' BECOMES 'TENTATIVELY PASSED'");
RESULT;
END CZ1101A;
| 38.125 | 79 | 0.625527 |
0b0e713a6e26c6e200b0fab1f157619b8990ad47 | 197,249 | adb | Ada | fpga/wave/.autopilot/db/on_structure_edge.bind.adb | dorin-ionita/RustHPC | 903e5dd8f09213a5cc33f5e651d687e234944e84 | [
"MIT"
] | 2 | 2021-06-22T19:23:55.000Z | 2021-07-03T16:47:01.000Z | fpga/wave/.autopilot/db/on_structure_edge.bind.adb | dorin-ionita/RustHPC | 903e5dd8f09213a5cc33f5e651d687e234944e84 | [
"MIT"
] | 60 | 2019-11-05T14:12:34.000Z | 2021-06-21T22:31:17.000Z | fpga/wave/.autopilot/db/on_structure_edge.bind.adb | dorin-ionita/wireless-models-experiments | 903e5dd8f09213a5cc33f5e651d687e234944e84 | [
"MIT"
] | null | null | null | <?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>on_structure_edge</name>
<ret_bitwidth>3</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>x</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>x</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>y</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>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>scenario_nr_struct</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>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>scenario_structure_c</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>RAM</coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>80</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>71</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>5</id>
<name>y_read</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>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>92</item>
<item>93</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>6</id>
<name>x_read</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>x</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>94</item>
<item>95</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>7</id>
<name>scenario_nr_struct_l</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>/home/dorin</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>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</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>96</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>8</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>97</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>10</id>
<name>i</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>i</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>31</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>99</item>
<item>100</item>
<item>101</item>
<item>102</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>i_cast</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</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>103</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name>tmp</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>104</item>
<item>105</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name>i_6</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>i</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>31</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>106</item>
<item>108</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>14</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>109</item>
<item>110</item>
<item>111</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name>tmp_s</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>113</item>
<item>114</item>
<item>116</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>17</id>
<name>tmp_253</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</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>117</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>18</id>
<name>tmp_254</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>118</item>
<item>120</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>19</id>
<name>tmp_255</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>122</item>
<item>124</item>
<item>125</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name>scenario_structure_c</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>126</item>
<item>128</item>
<item>129</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>tmp_256</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>130</item>
<item>132</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name>tmp_257</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>133</item>
<item>134</item>
<item>135</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name>tmp_258</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>136</item>
<item>138</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>tmp_259</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>139</item>
<item>140</item>
<item>141</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>scenario_structure_c_1</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>142</item>
<item>143</item>
<item>144</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>scenario_structure_c_2</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>37</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>37</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>145</item>
<item>146</item>
<item>147</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>27</id>
<name>scenario_structure_c_3</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>39</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>148</item>
<item>149</item>
<item>150</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name>tmp_260</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>151</item>
<item>153</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>29</id>
<name>tmp_261</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>39</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>154</item>
<item>155</item>
<item>156</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name>scenario_structure_c_4</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>39</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>157</item>
<item>158</item>
<item>159</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>31</id>
<name>tmp_262</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>160</item>
<item>162</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>32</id>
<name>tmp_263</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>42</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>163</item>
<item>164</item>
<item>165</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>33</id>
<name>tmp_264</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>166</item>
<item>168</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>34</id>
<name>tmp_265</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>42</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>169</item>
<item>170</item>
<item>171</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name>scenario_structure_c_5</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>42</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>172</item>
<item>173</item>
<item>174</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>tmp_266</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>175</item>
<item>177</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>37</id>
<name>tmp_267</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>42</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>178</item>
<item>179</item>
<item>180</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name>scenario_structure_c_6</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>42</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>181</item>
<item>182</item>
<item>183</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>39</id>
<name>scenario_structure_c_7</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>43</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>43</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>184</item>
<item>185</item>
<item>186</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>40</id>
<name>scenario_structure_c_8</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</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>187</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>41</id>
<name>tmp_132</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>188</item>
<item>189</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>42</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>190</item>
<item>191</item>
<item>192</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>44</id>
<name>scenario_structure_c_9</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</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>193</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</type>
<id>45</id>
<name>tmp_133</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>194</item>
<item>195</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>46</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>36</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>36</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>196</item>
<item>197</item>
<item>198</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>48</id>
<name>scenario_structure_c_10</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>37</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>37</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>199</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>49</id>
<name>tmp_134</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>37</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>37</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>200</item>
<item>201</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_46">
<Value>
<Obj>
<type>0</type>
<id>50</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>37</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>37</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>202</item>
<item>203</item>
<item>204</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_47">
<Value>
<Obj>
<type>0</type>
<id>52</id>
<name>scenario_structure_c_11</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>39</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>205</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_48">
<Value>
<Obj>
<type>0</type>
<id>53</id>
<name>tmp_135</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>39</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>206</item>
<item>207</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_49">
<Value>
<Obj>
<type>0</type>
<id>54</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>39</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>208</item>
<item>209</item>
<item>210</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_50">
<Value>
<Obj>
<type>0</type>
<id>56</id>
<name>scenario_structure_c_12</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>39</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>211</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_51">
<Value>
<Obj>
<type>0</type>
<id>57</id>
<name>tmp_136</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>39</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>212</item>
<item>213</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_52">
<Value>
<Obj>
<type>0</type>
<id>58</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>39</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>39</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>214</item>
<item>215</item>
<item>216</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_53">
<Value>
<Obj>
<type>0</type>
<id>60</id>
<name>scenario_structure_c_13</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>40</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>40</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>217</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>61</id>
<name>tmp_137</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>40</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>40</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>218</item>
<item>219</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_55">
<Value>
<Obj>
<type>0</type>
<id>62</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>40</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>40</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>220</item>
<item>221</item>
<item>222</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_56">
<Value>
<Obj>
<type>0</type>
<id>64</id>
<name>scenario_structure_c_14</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>42</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>223</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_57">
<Value>
<Obj>
<type>0</type>
<id>65</id>
<name>tmp_138</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>42</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>224</item>
<item>225</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_58">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>42</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>226</item>
<item>227</item>
<item>228</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_59">
<Value>
<Obj>
<type>0</type>
<id>68</id>
<name>scenario_structure_c_15</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>42</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>229</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_60">
<Value>
<Obj>
<type>0</type>
<id>69</id>
<name>tmp_139</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>42</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>230</item>
<item>231</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_61">
<Value>
<Obj>
<type>0</type>
<id>70</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>42</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>42</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>232</item>
<item>233</item>
<item>234</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_62">
<Value>
<Obj>
<type>0</type>
<id>72</id>
<name>scenario_structure_c_16</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>43</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</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>235</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_63">
<Value>
<Obj>
<type>0</type>
<id>73</id>
<name>tmp_140</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>43</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>43</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>236</item>
<item>237</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_64">
<Value>
<Obj>
<type>0</type>
<id>74</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>43</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>43</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>238</item>
<item>239</item>
<item>240</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_65">
<Value>
<Obj>
<type>0</type>
<id>76</id>
<name>scenario_structure_c_17</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>45</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>45</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>241</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_66">
<Value>
<Obj>
<type>0</type>
<id>77</id>
<name>tmp_141</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>45</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>45</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>242</item>
<item>243</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_67">
<Value>
<Obj>
<type>0</type>
<id>78</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>45</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</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>244</item>
<item>245</item>
<item>246</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_68">
<Value>
<Obj>
<type>0</type>
<id>80</id>
<name>scenario_structure_c_18</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>45</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>45</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>247</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_69">
<Value>
<Obj>
<type>0</type>
<id>81</id>
<name>tmp_142</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>45</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>45</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>248</item>
<item>249</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_70">
<Value>
<Obj>
<type>0</type>
<id>82</id>
<name>tmp_143</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>46</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>46</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>250</item>
<item>251</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_71">
<Value>
<Obj>
<type>0</type>
<id>83</id>
<name>or_cond</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>46</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>46</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>252</item>
<item>253</item>
</oprand_edges>
<opcode>and</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_72">
<Value>
<Obj>
<type>0</type>
<id>84</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>45</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</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>254</item>
<item>255</item>
<item>256</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_73">
<Value>
<Obj>
<type>0</type>
<id>86</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>34</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>34</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>257</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_74">
<Value>
<Obj>
<type>0</type>
<id>88</id>
<name>p_0</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>10</count>
<item_version>0</item_version>
<item>258</item>
<item>259</item>
<item>261</item>
<item>262</item>
<item>264</item>
<item>265</item>
<item>267</item>
<item>268</item>
<item>270</item>
<item>271</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_75">
<Value>
<Obj>
<type>0</type>
<id>89</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>50</lineNumber>
<contextFuncName>on_structure_edge</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>on_structure_edge</second>
</first>
<second>50</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>272</item>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>16</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_76">
<Value>
<Obj>
<type>2</type>
<id>98</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>31</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_77">
<Value>
<Obj>
<type>2</type>
<id>107</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>31</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_78">
<Value>
<Obj>
<type>2</type>
<id>115</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_79">
<Value>
<Obj>
<type>2</type>
<id>119</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>34</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_80">
<Value>
<Obj>
<type>2</type>
<id>123</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>30</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_81">
<Value>
<Obj>
<type>2</type>
<id>127</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="_82">
<Value>
<Obj>
<type>2</type>
<id>131</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>34</bitwidth>
</Value>
<const_type>0</const_type>
<content>2</content>
</item>
<item class_id_reference="16" object_id="_83">
<Value>
<Obj>
<type>2</type>
<id>137</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>34</bitwidth>
</Value>
<const_type>0</const_type>
<content>3</content>
</item>
<item class_id_reference="16" object_id="_84">
<Value>
<Obj>
<type>2</type>
<id>152</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>34</bitwidth>
</Value>
<const_type>0</const_type>
<content>4</content>
</item>
<item class_id_reference="16" object_id="_85">
<Value>
<Obj>
<type>2</type>
<id>161</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>34</bitwidth>
</Value>
<const_type>0</const_type>
<content>6</content>
</item>
<item class_id_reference="16" object_id="_86">
<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>34</bitwidth>
</Value>
<const_type>0</const_type>
<content>7</content>
</item>
<item class_id_reference="16" object_id="_87">
<Value>
<Obj>
<type>2</type>
<id>176</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>34</bitwidth>
</Value>
<const_type>0</const_type>
<content>5</content>
</item>
<item class_id_reference="16" object_id="_88">
<Value>
<Obj>
<type>2</type>
<id>260</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>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_89">
<Value>
<Obj>
<type>2</type>
<id>263</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>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>4</content>
</item>
<item class_id_reference="16" object_id="_90">
<Value>
<Obj>
<type>2</type>
<id>266</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>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>3</content>
</item>
<item class_id_reference="16" object_id="_91">
<Value>
<Obj>
<type>2</type>
<id>269</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>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>2</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>15</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_92">
<Obj>
<type>3</type>
<id>9</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_93">
<Obj>
<type>3</type>
<id>15</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>5</count>
<item_version>0</item_version>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_94">
<Obj>
<type>3</type>
<id>43</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>27</count>
<item_version>0</item_version>
<item>16</item>
<item>17</item>
<item>18</item>
<item>19</item>
<item>20</item>
<item>21</item>
<item>22</item>
<item>23</item>
<item>24</item>
<item>25</item>
<item>26</item>
<item>27</item>
<item>28</item>
<item>29</item>
<item>30</item>
<item>31</item>
<item>32</item>
<item>33</item>
<item>34</item>
<item>35</item>
<item>36</item>
<item>37</item>
<item>38</item>
<item>39</item>
<item>40</item>
<item>41</item>
<item>42</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_95">
<Obj>
<type>3</type>
<id>47</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>44</item>
<item>45</item>
<item>46</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_96">
<Obj>
<type>3</type>
<id>51</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>48</item>
<item>49</item>
<item>50</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_97">
<Obj>
<type>3</type>
<id>55</id>
<name>._crit_edge1</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>52</item>
<item>53</item>
<item>54</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_98">
<Obj>
<type>3</type>
<id>59</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>56</item>
<item>57</item>
<item>58</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_99">
<Obj>
<type>3</type>
<id>63</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>60</item>
<item>61</item>
<item>62</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_100">
<Obj>
<type>3</type>
<id>67</id>
<name>._crit_edge5</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>64</item>
<item>65</item>
<item>66</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_101">
<Obj>
<type>3</type>
<id>71</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>68</item>
<item>69</item>
<item>70</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_102">
<Obj>
<type>3</type>
<id>75</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>72</item>
<item>73</item>
<item>74</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_103">
<Obj>
<type>3</type>
<id>79</id>
<name>._crit_edge9</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>76</item>
<item>77</item>
<item>78</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_104">
<Obj>
<type>3</type>
<id>85</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>5</count>
<item_version>0</item_version>
<item>80</item>
<item>81</item>
<item>82</item>
<item>83</item>
<item>84</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_105">
<Obj>
<type>3</type>
<id>87</id>
<name>._crit_edge13</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>86</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_106">
<Obj>
<type>3</type>
<id>90</id>
<name>._crit_edge</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>2</count>
<item_version>0</item_version>
<item>88</item>
<item>89</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>179</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_107">
<id>93</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>5</sink_obj>
</item>
<item class_id_reference="20" object_id="_108">
<id>95</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>6</sink_obj>
</item>
<item class_id_reference="20" object_id="_109">
<id>96</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>7</sink_obj>
</item>
<item class_id_reference="20" object_id="_110">
<id>97</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_111">
<id>99</id>
<edge_type>1</edge_type>
<source_obj>98</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_112">
<id>100</id>
<edge_type>2</edge_type>
<source_obj>9</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_113">
<id>101</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_114">
<id>102</id>
<edge_type>2</edge_type>
<source_obj>87</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_115">
<id>103</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_116">
<id>104</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_117">
<id>105</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_118">
<id>106</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_119">
<id>108</id>
<edge_type>1</edge_type>
<source_obj>107</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_120">
<id>109</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>14</sink_obj>
</item>
<item class_id_reference="20" object_id="_121">
<id>110</id>
<edge_type>2</edge_type>
<source_obj>90</source_obj>
<sink_obj>14</sink_obj>
</item>
<item class_id_reference="20" object_id="_122">
<id>111</id>
<edge_type>2</edge_type>
<source_obj>43</source_obj>
<sink_obj>14</sink_obj>
</item>
<item class_id_reference="20" object_id="_123">
<id>114</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_124">
<id>116</id>
<edge_type>1</edge_type>
<source_obj>115</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_125">
<id>117</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_126">
<id>118</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_127">
<id>120</id>
<edge_type>1</edge_type>
<source_obj>119</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_128">
<id>124</id>
<edge_type>1</edge_type>
<source_obj>123</source_obj>
<sink_obj>19</sink_obj>
</item>
<item class_id_reference="20" object_id="_129">
<id>125</id>
<edge_type>1</edge_type>
<source_obj>18</source_obj>
<sink_obj>19</sink_obj>
</item>
<item class_id_reference="20" object_id="_130">
<id>126</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_131">
<id>128</id>
<edge_type>1</edge_type>
<source_obj>127</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_132">
<id>129</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_133">
<id>130</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_134">
<id>132</id>
<edge_type>1</edge_type>
<source_obj>131</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_135">
<id>134</id>
<edge_type>1</edge_type>
<source_obj>123</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_136">
<id>135</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_137">
<id>136</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_138">
<id>138</id>
<edge_type>1</edge_type>
<source_obj>137</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_139">
<id>140</id>
<edge_type>1</edge_type>
<source_obj>123</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_140">
<id>141</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_141">
<id>142</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_142">
<id>143</id>
<edge_type>1</edge_type>
<source_obj>127</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_143">
<id>144</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_144">
<id>145</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_145">
<id>146</id>
<edge_type>1</edge_type>
<source_obj>127</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_146">
<id>147</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_147">
<id>148</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_148">
<id>149</id>
<edge_type>1</edge_type>
<source_obj>127</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_149">
<id>150</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_150">
<id>151</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_151">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>152</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_152">
<id>155</id>
<edge_type>1</edge_type>
<source_obj>123</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_153">
<id>156</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_154">
<id>157</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_155">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>127</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_156">
<id>159</id>
<edge_type>1</edge_type>
<source_obj>29</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_157">
<id>160</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>31</sink_obj>
</item>
<item class_id_reference="20" object_id="_158">
<id>162</id>
<edge_type>1</edge_type>
<source_obj>161</source_obj>
<sink_obj>31</sink_obj>
</item>
<item class_id_reference="20" object_id="_159">
<id>164</id>
<edge_type>1</edge_type>
<source_obj>123</source_obj>
<sink_obj>32</sink_obj>
</item>
<item class_id_reference="20" object_id="_160">
<id>165</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>32</sink_obj>
</item>
<item class_id_reference="20" object_id="_161">
<id>166</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>33</sink_obj>
</item>
<item class_id_reference="20" object_id="_162">
<id>168</id>
<edge_type>1</edge_type>
<source_obj>167</source_obj>
<sink_obj>33</sink_obj>
</item>
<item class_id_reference="20" object_id="_163">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>123</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_164">
<id>171</id>
<edge_type>1</edge_type>
<source_obj>33</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_165">
<id>172</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_166">
<id>173</id>
<edge_type>1</edge_type>
<source_obj>127</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_167">
<id>174</id>
<edge_type>1</edge_type>
<source_obj>34</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_168">
<id>175</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_169">
<id>177</id>
<edge_type>1</edge_type>
<source_obj>176</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_170">
<id>179</id>
<edge_type>1</edge_type>
<source_obj>123</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_171">
<id>180</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_172">
<id>181</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_173">
<id>182</id>
<edge_type>1</edge_type>
<source_obj>127</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_174">
<id>183</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_175">
<id>184</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_176">
<id>185</id>
<edge_type>1</edge_type>
<source_obj>127</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_177">
<id>186</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_178">
<id>187</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>40</sink_obj>
</item>
<item class_id_reference="20" object_id="_179">
<id>188</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_180">
<id>189</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_181">
<id>190</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_182">
<id>191</id>
<edge_type>2</edge_type>
<source_obj>55</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_183">
<id>192</id>
<edge_type>2</edge_type>
<source_obj>47</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_184">
<id>193</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>44</sink_obj>
</item>
<item class_id_reference="20" object_id="_185">
<id>194</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_186">
<id>195</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_187">
<id>196</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_188">
<id>197</id>
<edge_type>2</edge_type>
<source_obj>55</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_189">
<id>198</id>
<edge_type>2</edge_type>
<source_obj>51</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_190">
<id>199</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_191">
<id>200</id>
<edge_type>1</edge_type>
<source_obj>48</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_192">
<id>201</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_193">
<id>202</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_194">
<id>203</id>
<edge_type>2</edge_type>
<source_obj>55</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_195">
<id>204</id>
<edge_type>2</edge_type>
<source_obj>90</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_196">
<id>205</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>52</sink_obj>
</item>
<item class_id_reference="20" object_id="_197">
<id>206</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_198">
<id>207</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_199">
<id>208</id>
<edge_type>1</edge_type>
<source_obj>53</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_200">
<id>209</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_201">
<id>210</id>
<edge_type>2</edge_type>
<source_obj>59</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_202">
<id>211</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_203">
<id>212</id>
<edge_type>1</edge_type>
<source_obj>56</source_obj>
<sink_obj>57</sink_obj>
</item>
<item class_id_reference="20" object_id="_204">
<id>213</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>57</sink_obj>
</item>
<item class_id_reference="20" object_id="_205">
<id>214</id>
<edge_type>1</edge_type>
<source_obj>57</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_206">
<id>215</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_207">
<id>216</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_208">
<id>217</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>60</sink_obj>
</item>
<item class_id_reference="20" object_id="_209">
<id>218</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>61</sink_obj>
</item>
<item class_id_reference="20" object_id="_210">
<id>219</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>61</sink_obj>
</item>
<item class_id_reference="20" object_id="_211">
<id>220</id>
<edge_type>1</edge_type>
<source_obj>61</source_obj>
<sink_obj>62</sink_obj>
</item>
<item class_id_reference="20" object_id="_212">
<id>221</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>62</sink_obj>
</item>
<item class_id_reference="20" object_id="_213">
<id>222</id>
<edge_type>2</edge_type>
<source_obj>90</source_obj>
<sink_obj>62</sink_obj>
</item>
<item class_id_reference="20" object_id="_214">
<id>223</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>64</sink_obj>
</item>
<item class_id_reference="20" object_id="_215">
<id>224</id>
<edge_type>1</edge_type>
<source_obj>64</source_obj>
<sink_obj>65</sink_obj>
</item>
<item class_id_reference="20" object_id="_216">
<id>225</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>65</sink_obj>
</item>
<item class_id_reference="20" object_id="_217">
<id>226</id>
<edge_type>1</edge_type>
<source_obj>65</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_218">
<id>227</id>
<edge_type>2</edge_type>
<source_obj>79</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_219">
<id>228</id>
<edge_type>2</edge_type>
<source_obj>71</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_220">
<id>229</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>68</sink_obj>
</item>
<item class_id_reference="20" object_id="_221">
<id>230</id>
<edge_type>1</edge_type>
<source_obj>68</source_obj>
<sink_obj>69</sink_obj>
</item>
<item class_id_reference="20" object_id="_222">
<id>231</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>69</sink_obj>
</item>
<item class_id_reference="20" object_id="_223">
<id>232</id>
<edge_type>1</edge_type>
<source_obj>69</source_obj>
<sink_obj>70</sink_obj>
</item>
<item class_id_reference="20" object_id="_224">
<id>233</id>
<edge_type>2</edge_type>
<source_obj>79</source_obj>
<sink_obj>70</sink_obj>
</item>
<item class_id_reference="20" object_id="_225">
<id>234</id>
<edge_type>2</edge_type>
<source_obj>75</source_obj>
<sink_obj>70</sink_obj>
</item>
<item class_id_reference="20" object_id="_226">
<id>235</id>
<edge_type>1</edge_type>
<source_obj>39</source_obj>
<sink_obj>72</sink_obj>
</item>
<item class_id_reference="20" object_id="_227">
<id>236</id>
<edge_type>1</edge_type>
<source_obj>72</source_obj>
<sink_obj>73</sink_obj>
</item>
<item class_id_reference="20" object_id="_228">
<id>237</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>73</sink_obj>
</item>
<item class_id_reference="20" object_id="_229">
<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="_230">
<id>239</id>
<edge_type>2</edge_type>
<source_obj>79</source_obj>
<sink_obj>74</sink_obj>
</item>
<item class_id_reference="20" object_id="_231">
<id>240</id>
<edge_type>2</edge_type>
<source_obj>90</source_obj>
<sink_obj>74</sink_obj>
</item>
<item class_id_reference="20" object_id="_232">
<id>241</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>76</sink_obj>
</item>
<item class_id_reference="20" object_id="_233">
<id>242</id>
<edge_type>1</edge_type>
<source_obj>76</source_obj>
<sink_obj>77</sink_obj>
</item>
<item class_id_reference="20" object_id="_234">
<id>243</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>77</sink_obj>
</item>
<item class_id_reference="20" object_id="_235">
<id>244</id>
<edge_type>1</edge_type>
<source_obj>77</source_obj>
<sink_obj>78</sink_obj>
</item>
<item class_id_reference="20" object_id="_236">
<id>245</id>
<edge_type>2</edge_type>
<source_obj>87</source_obj>
<sink_obj>78</sink_obj>
</item>
<item class_id_reference="20" object_id="_237">
<id>246</id>
<edge_type>2</edge_type>
<source_obj>85</source_obj>
<sink_obj>78</sink_obj>
</item>
<item class_id_reference="20" object_id="_238">
<id>247</id>
<edge_type>1</edge_type>
<source_obj>39</source_obj>
<sink_obj>80</sink_obj>
</item>
<item class_id_reference="20" object_id="_239">
<id>248</id>
<edge_type>1</edge_type>
<source_obj>80</source_obj>
<sink_obj>81</sink_obj>
</item>
<item class_id_reference="20" object_id="_240">
<id>249</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>81</sink_obj>
</item>
<item class_id_reference="20" object_id="_241">
<id>250</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>82</sink_obj>
</item>
<item class_id_reference="20" object_id="_242">
<id>251</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>82</sink_obj>
</item>
<item class_id_reference="20" object_id="_243">
<id>252</id>
<edge_type>1</edge_type>
<source_obj>81</source_obj>
<sink_obj>83</sink_obj>
</item>
<item class_id_reference="20" object_id="_244">
<id>253</id>
<edge_type>1</edge_type>
<source_obj>82</source_obj>
<sink_obj>83</sink_obj>
</item>
<item class_id_reference="20" object_id="_245">
<id>254</id>
<edge_type>1</edge_type>
<source_obj>83</source_obj>
<sink_obj>84</sink_obj>
</item>
<item class_id_reference="20" object_id="_246">
<id>255</id>
<edge_type>2</edge_type>
<source_obj>87</source_obj>
<sink_obj>84</sink_obj>
</item>
<item class_id_reference="20" object_id="_247">
<id>256</id>
<edge_type>2</edge_type>
<source_obj>90</source_obj>
<sink_obj>84</sink_obj>
</item>
<item class_id_reference="20" object_id="_248">
<id>257</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>86</sink_obj>
</item>
<item class_id_reference="20" object_id="_249">
<id>258</id>
<edge_type>1</edge_type>
<source_obj>115</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_250">
<id>259</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_251">
<id>261</id>
<edge_type>1</edge_type>
<source_obj>260</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_252">
<id>262</id>
<edge_type>2</edge_type>
<source_obj>51</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_253">
<id>264</id>
<edge_type>1</edge_type>
<source_obj>263</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_254">
<id>265</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_255">
<id>267</id>
<edge_type>1</edge_type>
<source_obj>266</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_256">
<id>268</id>
<edge_type>2</edge_type>
<source_obj>75</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_257">
<id>270</id>
<edge_type>1</edge_type>
<source_obj>269</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_258">
<id>271</id>
<edge_type>2</edge_type>
<source_obj>85</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_259">
<id>272</id>
<edge_type>1</edge_type>
<source_obj>88</source_obj>
<sink_obj>89</sink_obj>
</item>
<item class_id_reference="20" object_id="_260">
<id>273</id>
<edge_type>2</edge_type>
<source_obj>9</source_obj>
<sink_obj>15</sink_obj>
</item>
<item class_id_reference="20" object_id="_261">
<id>274</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>43</sink_obj>
</item>
<item class_id_reference="20" object_id="_262">
<id>275</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>90</sink_obj>
</item>
<item class_id_reference="20" object_id="_263">
<id>276</id>
<edge_type>2</edge_type>
<source_obj>43</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_264">
<id>277</id>
<edge_type>2</edge_type>
<source_obj>43</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_265">
<id>278</id>
<edge_type>2</edge_type>
<source_obj>47</source_obj>
<sink_obj>51</sink_obj>
</item>
<item class_id_reference="20" object_id="_266">
<id>279</id>
<edge_type>2</edge_type>
<source_obj>47</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_267">
<id>280</id>
<edge_type>2</edge_type>
<source_obj>51</source_obj>
<sink_obj>90</sink_obj>
</item>
<item class_id_reference="20" object_id="_268">
<id>281</id>
<edge_type>2</edge_type>
<source_obj>51</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_269">
<id>282</id>
<edge_type>2</edge_type>
<source_obj>55</source_obj>
<sink_obj>59</sink_obj>
</item>
<item class_id_reference="20" object_id="_270">
<id>283</id>
<edge_type>2</edge_type>
<source_obj>55</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_271">
<id>284</id>
<edge_type>2</edge_type>
<source_obj>59</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_272">
<id>285</id>
<edge_type>2</edge_type>
<source_obj>59</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_273">
<id>286</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>90</sink_obj>
</item>
<item class_id_reference="20" object_id="_274">
<id>287</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_275">
<id>288</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>71</sink_obj>
</item>
<item class_id_reference="20" object_id="_276">
<id>289</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>79</sink_obj>
</item>
<item class_id_reference="20" object_id="_277">
<id>290</id>
<edge_type>2</edge_type>
<source_obj>71</source_obj>
<sink_obj>75</sink_obj>
</item>
<item class_id_reference="20" object_id="_278">
<id>291</id>
<edge_type>2</edge_type>
<source_obj>71</source_obj>
<sink_obj>79</sink_obj>
</item>
<item class_id_reference="20" object_id="_279">
<id>292</id>
<edge_type>2</edge_type>
<source_obj>75</source_obj>
<sink_obj>90</sink_obj>
</item>
<item class_id_reference="20" object_id="_280">
<id>293</id>
<edge_type>2</edge_type>
<source_obj>75</source_obj>
<sink_obj>79</sink_obj>
</item>
<item class_id_reference="20" object_id="_281">
<id>294</id>
<edge_type>2</edge_type>
<source_obj>79</source_obj>
<sink_obj>85</sink_obj>
</item>
<item class_id_reference="20" object_id="_282">
<id>295</id>
<edge_type>2</edge_type>
<source_obj>79</source_obj>
<sink_obj>87</sink_obj>
</item>
<item class_id_reference="20" object_id="_283">
<id>296</id>
<edge_type>2</edge_type>
<source_obj>85</source_obj>
<sink_obj>90</sink_obj>
</item>
<item class_id_reference="20" object_id="_284">
<id>297</id>
<edge_type>2</edge_type>
<source_obj>85</source_obj>
<sink_obj>87</sink_obj>
</item>
<item class_id_reference="20" object_id="_285">
<id>298</id>
<edge_type>2</edge_type>
<source_obj>87</source_obj>
<sink_obj>15</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="_286">
<mId>1</mId>
<mTag>on_structure_edge</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>-1</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_287">
<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>9</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="_288">
<mId>3</mId>
<mTag>Loop 1</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>13</count>
<item_version>0</item_version>
<item>15</item>
<item>43</item>
<item>47</item>
<item>51</item>
<item>55</item>
<item>59</item>
<item>63</item>
<item>67</item>
<item>71</item>
<item>75</item>
<item>79</item>
<item>85</item>
<item>87</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>-1</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_289">
<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>90</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="_290">
<states class_id="25" tracking_level="0" version="0">
<count>14</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_291">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_292">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_293">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_294">
<id>7</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_295">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_296">
<id>2</id>
<operations>
<count>10</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_297">
<id>10</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_298">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_299">
<id>12</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_300">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_301">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_302">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_303">
<id>18</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_304">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_305">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_306">
<id>40</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_307">
<id>3</id>
<operations>
<count>24</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_308">
<id>17</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_309">
<id>21</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_310">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_311">
<id>23</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_312">
<id>24</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_313">
<id>25</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_314">
<id>26</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_315">
<id>27</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_316">
<id>28</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_317">
<id>29</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_318">
<id>30</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_319">
<id>31</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_320">
<id>32</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_321">
<id>33</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_322">
<id>34</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_323">
<id>35</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_324">
<id>36</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_325">
<id>37</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_326">
<id>38</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_327">
<id>39</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_328">
<id>40</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_329">
<id>41</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_330">
<id>42</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_331">
<id>44</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_332">
<id>4</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_333">
<id>44</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_334">
<id>45</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_335">
<id>46</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_336">
<id>48</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_337">
<id>5</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_338">
<id>48</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_339">
<id>49</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_340">
<id>50</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_341">
<id>52</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_342">
<id>6</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_343">
<id>52</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_344">
<id>53</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_345">
<id>54</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_346">
<id>56</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_347">
<id>7</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_348">
<id>56</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_349">
<id>57</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_350">
<id>58</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_351">
<id>60</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_352">
<id>8</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_353">
<id>60</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_354">
<id>61</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_355">
<id>62</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_356">
<id>64</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_357">
<id>9</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_358">
<id>64</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_359">
<id>65</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_360">
<id>66</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_361">
<id>68</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_362">
<id>10</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_363">
<id>68</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_364">
<id>69</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_365">
<id>70</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_366">
<id>72</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_367">
<id>11</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_368">
<id>72</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_369">
<id>73</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_370">
<id>74</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_371">
<id>76</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_372">
<id>12</id>
<operations>
<count>5</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_373">
<id>76</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_374">
<id>77</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_375">
<id>78</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_376">
<id>80</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_377">
<id>82</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_378">
<id>13</id>
<operations>
<count>5</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_379">
<id>80</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_380">
<id>81</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_381">
<id>83</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_382">
<id>84</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_383">
<id>86</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_384">
<id>14</id>
<operations>
<count>2</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_385">
<id>88</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_386">
<id>89</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>21</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_387">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>52</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="_388">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>53</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>12</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_389">
<inState>2</inState>
<outState>14</outState>
<condition>
<id>55</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>12</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_390">
<inState>3</inState>
<outState>4</outState>
<condition>
<id>57</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>41</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_391">
<inState>3</inState>
<outState>5</outState>
<condition>
<id>58</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>41</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_392">
<inState>4</inState>
<outState>5</outState>
<condition>
<id>60</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="_393">
<inState>5</inState>
<outState>6</outState>
<condition>
<id>64</id>
<sop>
<count>3</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>41</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>45</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>49</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_394">
<inState>5</inState>
<outState>14</outState>
<condition>
<id>63</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>41</first>
<second>0</second>
</first>
<second>0</second>
</item>
<item>
<first>
<first>45</first>
<second>0</second>
</first>
<second>0</second>
</item>
<item>
<first>
<first>49</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_395">
<inState>6</inState>
<outState>7</outState>
<condition>
<id>66</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>53</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_396">
<inState>6</inState>
<outState>8</outState>
<condition>
<id>67</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>53</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_397">
<inState>7</inState>
<outState>8</outState>
<condition>
<id>69</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="_398">
<inState>8</inState>
<outState>9</outState>
<condition>
<id>73</id>
<sop>
<count>3</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>53</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>57</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>61</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_399">
<inState>8</inState>
<outState>14</outState>
<condition>
<id>72</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>53</first>
<second>0</second>
</first>
<second>0</second>
</item>
<item>
<first>
<first>57</first>
<second>0</second>
</first>
<second>0</second>
</item>
<item>
<first>
<first>61</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_400">
<inState>9</inState>
<outState>10</outState>
<condition>
<id>75</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>65</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_401">
<inState>9</inState>
<outState>11</outState>
<condition>
<id>76</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>65</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_402">
<inState>10</inState>
<outState>11</outState>
<condition>
<id>78</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_403">
<inState>11</inState>
<outState>12</outState>
<condition>
<id>82</id>
<sop>
<count>3</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>65</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>69</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>73</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_404">
<inState>11</inState>
<outState>14</outState>
<condition>
<id>81</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>65</first>
<second>0</second>
</first>
<second>0</second>
</item>
<item>
<first>
<first>69</first>
<second>0</second>
</first>
<second>0</second>
</item>
<item>
<first>
<first>73</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_405">
<inState>12</inState>
<outState>13</outState>
<condition>
<id>84</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="_406">
<inState>13</inState>
<outState>14</outState>
<condition>
<id>87</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>77</first>
<second>0</second>
</first>
<second>0</second>
</item>
<item>
<first>
<first>83</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_407">
<inState>13</inState>
<outState>2</outState>
<condition>
<id>89</id>
<sop>
<count>2</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>77</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>83</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>71</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>5</first>
<second class_id="39" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>6</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>7</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>8</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>10</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>11</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>14</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>16</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>18</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>19</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>29</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>31</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>32</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>33</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>34</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>37</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>38</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>39</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>41</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>42</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>44</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>46</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>3</first>
<second>1</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>52</first>
<second>
<first>4</first>
<second>1</second>
</second>
</item>
<item>
<first>53</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>56</first>
<second>
<first>5</first>
<second>1</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>58</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>6</first>
<second>1</second>
</second>
</item>
<item>
<first>61</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>7</first>
<second>0</second>
</second>
</item>
<item>
<first>64</first>
<second>
<first>7</first>
<second>1</second>
</second>
</item>
<item>
<first>65</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>8</first>
<second>0</second>
</second>
</item>
<item>
<first>68</first>
<second>
<first>8</first>
<second>1</second>
</second>
</item>
<item>
<first>69</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>70</first>
<second>
<first>9</first>
<second>0</second>
</second>
</item>
<item>
<first>72</first>
<second>
<first>9</first>
<second>1</second>
</second>
</item>
<item>
<first>73</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>74</first>
<second>
<first>10</first>
<second>0</second>
</second>
</item>
<item>
<first>76</first>
<second>
<first>10</first>
<second>1</second>
</second>
</item>
<item>
<first>77</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>78</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>80</first>
<second>
<first>11</first>
<second>1</second>
</second>
</item>
<item>
<first>81</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>82</first>
<second>
<first>11</first>
<second>0</second>
</second>
</item>
<item>
<first>83</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>84</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>86</first>
<second>
<first>12</first>
<second>0</second>
</second>
</item>
<item>
<first>88</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
<item>
<first>89</first>
<second>
<first>13</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="40" tracking_level="0" version="0">
<count>15</count>
<item_version>0</item_version>
<item class_id="41" tracking_level="0" version="0">
<first>9</first>
<second class_id="42" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>15</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>43</first>
<second>
<first>1</first>
<second>2</second>
</second>
</item>
<item>
<first>47</first>
<second>
<first>2</first>
<second>3</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>3</first>
<second>4</second>
</second>
</item>
<item>
<first>55</first>
<second>
<first>4</first>
<second>5</second>
</second>
</item>
<item>
<first>59</first>
<second>
<first>5</first>
<second>6</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>6</first>
<second>7</second>
</second>
</item>
<item>
<first>67</first>
<second>
<first>7</first>
<second>8</second>
</second>
</item>
<item>
<first>71</first>
<second>
<first>8</first>
<second>9</second>
</second>
</item>
<item>
<first>75</first>
<second>
<first>9</first>
<second>10</second>
</second>
</item>
<item>
<first>79</first>
<second>
<first>10</first>
<second>11</second>
</second>
</item>
<item>
<first>85</first>
<second>
<first>11</first>
<second>12</second>
</second>
</item>
<item>
<first>87</first>
<second>
<first>12</first>
<second>12</second>
</second>
</item>
<item>
<first>90</first>
<second>
<first>13</first>
<second>13</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="43" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</regions>
<dp_fu_nodes class_id="44" tracking_level="0" version="0">
<count>41</count>
<item_version>0</item_version>
<item class_id="45" tracking_level="0" version="0">
<first>46</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
<item>
<first>52</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
<item>
<first>58</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>65</first>
<second>
<count>22</count>
<item_version>0</item_version>
<item>40</item>
<item>40</item>
<item>44</item>
<item>44</item>
<item>48</item>
<item>48</item>
<item>52</item>
<item>52</item>
<item>56</item>
<item>56</item>
<item>60</item>
<item>60</item>
<item>64</item>
<item>64</item>
<item>68</item>
<item>68</item>
<item>72</item>
<item>72</item>
<item>76</item>
<item>76</item>
<item>80</item>
<item>80</item>
</second>
</item>
<item>
<first>70</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>77</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>84</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>91</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>98</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>105</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>112</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>39</item>
</second>
</item>
<item>
<first>124</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>139</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
<item>
<first>156</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>41</item>
<item>65</item>
</second>
</item>
<item>
<first>161</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>45</item>
<item>69</item>
</second>
</item>
<item>
<first>166</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>49</item>
<item>73</item>
</second>
</item>
<item>
<first>171</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>53</item>
<item>77</item>
</second>
</item>
<item>
<first>176</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>57</item>
<item>81</item>
</second>
</item>
<item>
<first>181</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>185</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>189</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>194</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>200</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>208</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>214</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
<item>
<first>223</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>227</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>232</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>241</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>246</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>255</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>260</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>269</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>274</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>283</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>288</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>297</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>37</item>
</second>
</item>
<item>
<first>311</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>316</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>82</item>
</second>
</item>
<item>
<first>320</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>83</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="47" tracking_level="0" version="0">
<count>37</count>
<item_version>0</item_version>
<item class_id="48" tracking_level="0" version="0">
<first>grp_fu_156</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>41</item>
<item>65</item>
</second>
</item>
<item>
<first>grp_fu_161</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>45</item>
<item>69</item>
</second>
</item>
<item>
<first>grp_fu_166</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>49</item>
<item>73</item>
</second>
</item>
<item>
<first>grp_fu_171</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>53</item>
<item>77</item>
</second>
</item>
<item>
<first>grp_fu_176</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>57</item>
<item>81</item>
</second>
</item>
<item>
<first>i_6_fu_194</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>i_cast_fu_185</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>i_phi_fu_124</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>or_cond_fu_320</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>83</item>
</second>
</item>
<item>
<first>p_0_phi_fu_139</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
<item>
<first>scenario_structure_c_1_gep_fu_70</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>scenario_structure_c_2_gep_fu_77</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>scenario_structure_c_3_gep_fu_84</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>scenario_structure_c_4_gep_fu_91</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>scenario_structure_c_5_gep_fu_98</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>scenario_structure_c_6_gep_fu_105</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>scenario_structure_c_7_gep_fu_112</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>39</item>
</second>
</item>
<item>
<first>scenario_structure_c_gep_fu_58</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>tmp_137_fu_311</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>tmp_143_fu_316</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>82</item>
</second>
</item>
<item>
<first>tmp_253_fu_223</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>tmp_254_fu_208</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>tmp_255_fu_214</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
<item>
<first>tmp_256_fu_227</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>tmp_257_fu_232</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>tmp_258_fu_241</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>tmp_259_fu_246</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>tmp_260_fu_255</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>tmp_261_fu_260</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>tmp_262_fu_269</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>tmp_263_fu_274</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>tmp_264_fu_283</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>tmp_265_fu_288</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</second>
</item>
<item>
<first>tmp_266_fu_297</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>tmp_267_fu_302</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>tmp_fu_189</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>tmp_s_fu_200</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>3</count>
<item_version>0</item_version>
<item>
<first>scenario_nr_struct_l_load_fu_181</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>x_read_read_fu_52</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
<item>
<first>y_read_read_fu_46</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</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="49" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="50" tracking_level="0" version="0">
<first class_id="51" tracking_level="0" version="0">
<first>scenario_structure_c</first>
<second>0</second>
</first>
<second>
<count>22</count>
<item_version>0</item_version>
<item>40</item>
<item>40</item>
<item>44</item>
<item>44</item>
<item>48</item>
<item>48</item>
<item>52</item>
<item>52</item>
<item>56</item>
<item>56</item>
<item>60</item>
<item>60</item>
<item>64</item>
<item>64</item>
<item>68</item>
<item>68</item>
<item>72</item>
<item>72</item>
<item>76</item>
<item>76</item>
<item>80</item>
<item>80</item>
</second>
</item>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>24</count>
<item_version>0</item_version>
<item>
<first>120</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>131</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
<item>
<first>325</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
<item>
<first>333</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
<item>
<first>340</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>348</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>353</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>364</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>369</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>374</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>379</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>384</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>389</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>394</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>399</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>39</item>
</second>
</item>
<item>
<first>404</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>409</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>413</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</item>
</second>
</item>
<item>
<first>420</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</second>
</item>
<item>
<first>424</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>57</item>
</second>
</item>
<item>
<first>431</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>435</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</second>
</item>
<item>
<first>442</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>446</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>82</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>24</count>
<item_version>0</item_version>
<item>
<first>i_6_reg_348</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>i_reg_120</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>p_0_reg_131</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
<item>
<first>scenario_nr_struct_l_reg_340</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>scenario_structure_c_1_reg_369</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>scenario_structure_c_2_reg_374</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>scenario_structure_c_3_reg_379</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>scenario_structure_c_4_reg_384</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>scenario_structure_c_5_reg_389</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>scenario_structure_c_6_reg_394</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>scenario_structure_c_7_reg_399</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>39</item>
</second>
</item>
<item>
<first>scenario_structure_c_8_reg_404</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>40</item>
</second>
</item>
<item>
<first>scenario_structure_c_reg_364</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>tmp_132_reg_409</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>tmp_133_reg_413</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</item>
</second>
</item>
<item>
<first>tmp_135_reg_420</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</second>
</item>
<item>
<first>tmp_136_reg_424</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>57</item>
</second>
</item>
<item>
<first>tmp_138_reg_431</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>tmp_139_reg_435</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</second>
</item>
<item>
<first>tmp_141_reg_442</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>tmp_143_reg_446</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>82</item>
</second>
</item>
<item>
<first>tmp_s_reg_353</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>x_read_reg_333</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
<item>
<first>y_read_reg_325</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>2</count>
<item_version>0</item_version>
<item>
<first>120</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>131</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>2</count>
<item_version>0</item_version>
<item>
<first>i_reg_120</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>p_0_reg_131</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="52" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="53" tracking_level="0" version="0">
<first>scenario_nr_struct</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
<item>
<first>scenario_structure_c(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>22</count>
<item_version>0</item_version>
<item>40</item>
<item>40</item>
<item>44</item>
<item>44</item>
<item>48</item>
<item>48</item>
<item>52</item>
<item>52</item>
<item>56</item>
<item>56</item>
<item>60</item>
<item>60</item>
<item>64</item>
<item>64</item>
<item>68</item>
<item>68</item>
<item>72</item>
<item>72</item>
<item>76</item>
<item>76</item>
<item>80</item>
<item>80</item>
</second>
</item>
</second>
</item>
<item>
<first>x</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
</second>
</item>
<item>
<first>y</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="54" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="55" tracking_level="0" version="0">
<first>4</first>
<second>RAM</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
| 24.487772 | 73 | 0.571313 |
0b7259c99dd019472f1427600268f905eff6d204 | 913 | adb | Ada | Read Only/gdb-6.8/gdb/testsuite/gdb.ada/fixed_cmp/fixed.adb | samyvic/OS-Project | 1622bc1641876584964effd91d65ef02e92728e1 | [
"Apache-2.0"
] | null | null | null | Read Only/gdb-6.8/gdb/testsuite/gdb.ada/fixed_cmp/fixed.adb | samyvic/OS-Project | 1622bc1641876584964effd91d65ef02e92728e1 | [
"Apache-2.0"
] | null | null | null | Read Only/gdb-6.8/gdb/testsuite/gdb.ada/fixed_cmp/fixed.adb | samyvic/OS-Project | 1622bc1641876584964effd91d65ef02e92728e1 | [
"Apache-2.0"
] | null | null | null | -- Copyright 2007, 2008 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 Fixed is
type Fixed_Point_Type is delta 0.001 range 0.0 .. 1000.0;
My_Var : Fixed_Point_Type := 14.0;
begin
Do_Nothing (My_Var'Address); -- STOP
end Fixed;
| 36.52 | 73 | 0.728368 |
0bd1ddfb525ce331953450eafe0c0bca3099078c | 5,536 | ads | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/g-traceb.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/g-traceb.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/g-traceb.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- G N A T . T R A C E B A C K --
-- --
-- S p e c --
-- --
-- Copyright (C) 1999-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. --
-- --
------------------------------------------------------------------------------
-- Run-time non-symbolic traceback support
-- This package provides a method for generating a traceback of the
-- current execution location. The traceback shows the locations of
-- calls in the call chain, up to either the top or a designated
-- number of levels.
-- The traceback information is in the form of absolute code locations.
-- These code locations may be converted to corresponding source locations
-- using the external addr2line utility, or from within GDB.
-- In order to use this facility, in some cases the binder must be invoked
-- with -E switch (store the backtrace with exception occurrence). Please
-- refer to gnatbind documentation for more information.
-- To analyze the code locations later using addr2line or gdb, the necessary
-- units must be compiled with the debugging switch -g in the usual manner.
-- Note that it is not necessary to compile with -g to use Call_Chain. In
-- other words, the following sequence of steps can be used:
-- Compile without -g
-- Run the program, and call Call_Chain
-- Recompile with -g
-- Use addr2line to interpret the absolute call locations (note that
-- addr2line expects addresses in hexadecimal format).
-- This capability is currently supported on the following targets:
-- AiX PowerPC
-- GNU/Linux x86
-- GNU/Linux PowerPC
-- LynxOS x86
-- LynxOS 178 xcoff PowerPC
-- LynxOS 178 elf PowerPC
-- Solaris x86
-- Solaris sparc
-- VxWorks ARM
-- VxWorks7 ARM
-- VxWorks PowerPC
-- VxWorks x86
-- Windows XP
-- Note: see also GNAT.Traceback.Symbolic, a child unit in file g-trasym.ads
-- providing symbolic trace back capability for a subset of the above targets.
with System;
with Ada.Exceptions.Traceback;
package GNAT.Traceback is
pragma Elaborate_Body;
subtype Code_Loc is System.Address;
-- Code location used in building tracebacks
subtype Tracebacks_Array is Ada.Exceptions.Traceback.Tracebacks_Array;
-- Traceback array used to hold a generated traceback list
----------------
-- Call_Chain --
----------------
procedure Call_Chain (Traceback : out Tracebacks_Array; Len : out Natural);
-- Store up to Traceback'Length tracebacks corresponding to the current
-- call chain. The first entry stored corresponds to the deepest level
-- of subprogram calls. Len shows the number of traceback entries stored.
-- It will be equal to Traceback'Length unless the entire traceback is
-- shorter, in which case positions in Traceback past the Len position
-- are undefined on return.
function Call_Chain
(Max_Len : Positive;
Skip_Frames : Natural := 1) return Tracebacks_Array;
-- Returns up to Max_Len tracebacks corresponding to the current call
-- chain. Result array order is the same as in above procedure Call_Chain
-- except that Skip_Frames says how many of the most recent calls should be
-- excluded from the result, starting with this procedure itself: 1 means
-- exclude the frame for this procedure, 2 means 1 + exclude the frame for
-- this procedure's caller, ...
end GNAT.Traceback;
| 49.428571 | 79 | 0.563584 |
fbf63723414ee9566e92197401345c128c15e4fc | 3,984 | ads | Ada | source/uaflex/lib/string_sources.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/uaflex/lib/string_sources.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/uaflex/lib/string_sources.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, Vadim Godunko <[email protected]> --
-- 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 Abstract_Sources;
with League.Strings;
with League.Strings.Cursors.Characters;
package String_Sources is
type String_Source is new Abstract_Sources.Abstract_Source with private;
overriding function Get_Next
(Self : not null access String_Source)
return Abstract_Sources.Code_Unit_32;
procedure Create
(Self : out String_Source;
Text : League.Strings.Universal_String);
private
type String_Source is new Abstract_Sources.Abstract_Source with record
Text : League.Strings.Universal_String;
Cursor : League.Strings.Cursors.Characters.Character_Cursor;
end record;
end String_Sources;
| 57.73913 | 78 | 0.45758 |
39b8c6dd75f96975c8b245b139916efaa22f4d85 | 965 | ads | Ada | tier-1/fann/source/thin/fann_c-fann_neuron.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 2 | 2015-11-12T11:16:20.000Z | 2021-08-24T22:32:04.000Z | tier-1/fann/source/thin/fann_c-fann_neuron.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 1 | 2018-06-05T05:19:35.000Z | 2021-11-20T01:13:23.000Z | tier-1/fann/source/thin/fann_c-fann_neuron.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | null | null | null | -- This file is generated by SWIG. Please do *not* modify by hand.
--
with interfaces.c;
with interfaces.C;
package fann_c.fann_neuron is
-- Item
--
type Item is
record
first_con : aliased interfaces.c.unsigned;
last_con : aliased interfaces.c.unsigned;
sum : aliased fann_c.fann_type;
value : aliased fann_c.fann_type;
activation_steepness : aliased fann_c.fann_type;
activation_function : aliased fann_c.fann_activationfunc_enum;
end record;
-- Items
--
type Items is array (interfaces.C.Size_t range <>) of aliased fann_c.fann_neuron.Item;
-- Pointer
--
type Pointer is access all fann_c.fann_neuron.Item;
-- Pointers
--
type Pointers is array (interfaces.C.Size_t range <>) of aliased fann_c.fann_neuron.Pointer;
-- Pointer_Pointer
--
type Pointer_Pointer is access all fann_c.fann_neuron.Pointer;
end fann_c.fann_neuron;
| 17.545455 | 95 | 0.66943 |
508e948a14ee1710915178ebfdf077ffaae08454 | 2,724 | ads | Ada | src/ada-pulse/src/pulse-scache.ads | mstewartgallus/linted | 4d4cf9390353ea045b95671474ab278456793a35 | [
"Apache-2.0"
] | null | null | null | src/ada-pulse/src/pulse-scache.ads | mstewartgallus/linted | 4d4cf9390353ea045b95671474ab278456793a35 | [
"Apache-2.0"
] | null | null | null | src/ada-pulse/src/pulse-scache.ads | mstewartgallus/linted | 4d4cf9390353ea045b95671474ab278456793a35 | [
"Apache-2.0"
] | null | null | null | -- Copyright 2016 Steven Stewart-Gallus
--
-- 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 System;
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings;
with Libc.Stdint;
with Libc.Stddef;
with Pulse.Context;
with Pulse.Volume;
package Pulse.Scache with
Spark_Mode => Off is
type pa_context_play_sample_cb_t is access procedure
(arg1 : System.Address;
arg2 : Libc.Stdint.uint32_t;
arg3 : System.Address);
pragma Convention
(C,
pa_context_play_sample_cb_t); -- /usr/include/pulse/scache.h:87
function pa_stream_connect_upload
(s : System.Address;
length : Libc.Stddef.size_t)
return int; -- /usr/include/pulse/scache.h:90
pragma Import (C, pa_stream_connect_upload, "pa_stream_connect_upload");
function pa_stream_finish_upload
(s : System.Address) return int; -- /usr/include/pulse/scache.h:95
pragma Import (C, pa_stream_finish_upload, "pa_stream_finish_upload");
function pa_context_remove_sample
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/scache.h:98
pragma Import (C, pa_context_remove_sample, "pa_context_remove_sample");
function pa_context_play_sample
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
dev : Interfaces.C.Strings.chars_ptr;
volume : Pulse.Volume.pa_volume_t;
cb : Pulse.Context.pa_context_success_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/scache.h:103
pragma Import (C, pa_context_play_sample, "pa_context_play_sample");
function pa_context_play_sample_with_proplist
(c : System.Address;
name : Interfaces.C.Strings.chars_ptr;
dev : Interfaces.C.Strings.chars_ptr;
volume : Pulse.Volume.pa_volume_t;
proplist : System.Address;
cb : pa_context_play_sample_cb_t;
userdata : System.Address)
return System.Address; -- /usr/include/pulse/scache.h:115
pragma Import
(C,
pa_context_play_sample_with_proplist,
"pa_context_play_sample_with_proplist");
end Pulse.Scache;
| 34.481013 | 75 | 0.722467 |
fb386c373f07fdc1e568a6a656f2e0a4b0a5302a | 28,915 | ads | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-tags.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-tags.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-tags.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . T A G S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- For performance analysis, take into account that the operations in this
-- package provide the guarantee that all dispatching calls on primitive
-- operations of tagged types and interfaces take constant time (in terms
-- of source lines executed), that is to say, the cost of these calls is
-- independent of the number of primitives of the type or interface, and
-- independent of the number of ancestors or interface progenitors that a
-- tagged type may have.
-- The following subprograms of the public part of this package take constant
-- time (in terms of source lines executed):
-- Expanded_Name, Wide_Expanded_Name, Wide_Wide_Expanded_Name, External_Tag,
-- Is_Abstract, Is_Descendant_At_Same_Level, Parent_Tag,
-- Descendant_Tag (when used with a library-level tagged type),
-- Internal_Tag (when used with a library-level tagged type).
-- The following subprograms of the public part of this package execute in
-- time that is not constant (in terms of sources line executed):
-- Internal_Tag (when used with a locally defined tagged type), because in
-- such cases this routine processes the external tag, extracts from it an
-- address available there, and converts it into the tag value returned by
-- this function. The number of instructions executed is not constant since
-- it depends on the length of the external tag string.
-- Descendant_Tag (when used with a locally defined tagged type), because
-- it relies on the subprogram Internal_Tag() to provide its functionality.
-- Interface_Ancestor_Tags, because this function returns a table whose
-- length depends on the number of interfaces covered by a tagged type.
with System.Storage_Elements;
package Ada.Tags is
pragma Preelaborate;
-- In accordance with Ada 2005 AI-362
type Tag is private;
pragma Preelaborable_Initialization (Tag);
No_Tag : constant Tag;
function Expanded_Name (T : Tag) return String;
function Wide_Expanded_Name (T : Tag) return Wide_String;
pragma Ada_05 (Wide_Expanded_Name);
function Wide_Wide_Expanded_Name (T : Tag) return Wide_Wide_String;
pragma Ada_05 (Wide_Wide_Expanded_Name);
function External_Tag (T : Tag) return String;
function Internal_Tag (External : String) return Tag;
function Descendant_Tag
(External : String;
Ancestor : Tag) return Tag;
pragma Ada_05 (Descendant_Tag);
function Is_Descendant_At_Same_Level
(Descendant : Tag;
Ancestor : Tag) return Boolean;
pragma Ada_05 (Is_Descendant_At_Same_Level);
function Parent_Tag (T : Tag) return Tag;
pragma Ada_05 (Parent_Tag);
type Tag_Array is array (Positive range <>) of Tag;
function Interface_Ancestor_Tags (T : Tag) return Tag_Array;
pragma Ada_05 (Interface_Ancestor_Tags);
function Is_Abstract (T : Tag) return Boolean;
pragma Ada_2012 (Is_Abstract);
Tag_Error : exception;
private
-- Structure of the GNAT Primary Dispatch Table
-- +--------------------+
-- | Signature |
-- +--------------------+
-- | Tagged_Kind |
-- +--------------------+ Predef Prims
-- | Predef_Prims -----------------------------> +------------+
-- +--------------------+ | table of |
-- | Offset_To_Top | | predefined |
-- +--------------------+ | primitives |
-- |Typeinfo_Ptr/TSD_Ptr---> Type Specific Data +------------+
-- Tag ---> +--------------------+ +-------------------+
-- | table of | | inheritance depth |
-- : primitive ops : +-------------------+
-- | pointers | | access level |
-- +--------------------+ +-------------------+
-- | alignment |
-- +-------------------+
-- | expanded name |
-- +-------------------+
-- | external tag |
-- +-------------------+
-- | hash table link |
-- +-------------------+
-- | transportable |
-- +-------------------+
-- | is_abstract |
-- +-------------------+
-- | needs finalization|
-- +-------------------+
-- | Ifaces_Table ---> Interface Data
-- +-------------------+ +------------+
-- Select Specific Data <---- SSD | | Nb_Ifaces |
-- +------------------+ +-------------------+ +------------+
-- |table of primitive| | table of | | table |
-- : operation : : ancestor : : of :
-- | kinds | | tags | | interfaces |
-- +------------------+ +-------------------+ +------------+
-- |table of |
-- : entry :
-- | indexes |
-- +------------------+
-- Structure of the GNAT Secondary Dispatch Table
-- +--------------------+
-- | Signature |
-- +--------------------+
-- | Tagged_Kind |
-- +--------------------+ Predef Prims
-- | Predef_Prims -----------------------------> +------------+
-- +--------------------+ | table of |
-- | Offset_To_Top | | predefined |
-- +--------------------+ | primitives |
-- | OSD_Ptr |---> Object Specific Data | thunks |
-- Tag ---> +--------------------+ +---------------+ +------------+
-- | table of | | num prim ops |
-- : primitive op : +---------------+
-- | thunk pointers | | table of |
-- +--------------------+ + primitive |
-- | op offsets |
-- +---------------+
-- The runtime information kept for each tagged type is separated into two
-- objects: the Dispatch Table and the Type Specific Data record.
package SSE renames System.Storage_Elements;
subtype Cstring is String (Positive);
type Cstring_Ptr is access all Cstring;
pragma No_Strict_Aliasing (Cstring_Ptr);
-- Declarations for the table of interfaces
type Offset_To_Top_Function_Ptr is
access function (This : System.Address) return SSE.Storage_Offset;
-- Type definition used to call the function that is generated by the
-- expander in case of tagged types with discriminants that have secondary
-- dispatch tables. This function provides the Offset_To_Top value in this
-- specific case.
type Interface_Data_Element is record
Iface_Tag : Tag;
Static_Offset_To_Top : Boolean;
Offset_To_Top_Value : SSE.Storage_Offset;
Offset_To_Top_Func : Offset_To_Top_Function_Ptr;
Secondary_DT : Tag;
end record;
-- If some ancestor of the tagged type has discriminants the field
-- Static_Offset_To_Top is False and the field Offset_To_Top_Func
-- is used to store the access to the function generated by the
-- expander which provides this value; otherwise Static_Offset_To_Top
-- is True and such value is stored in the Offset_To_Top_Value field.
-- Secondary_DT references a secondary dispatch table whose contents
-- are pointers to the primitives of the tagged type that cover the
-- interface primitives. Secondary_DT gives support to dispatching
-- calls through interface types associated with Generic Dispatching
-- Constructors.
type Interfaces_Array is array (Natural range <>) of Interface_Data_Element;
type Interface_Data (Nb_Ifaces : Positive) is record
Ifaces_Table : Interfaces_Array (1 .. Nb_Ifaces);
end record;
type Interface_Data_Ptr is access all Interface_Data;
-- Table of abstract interfaces used to give support to backward interface
-- conversions and also to IW_Membership.
-- Primitive operation kinds. These values differentiate the kinds of
-- callable entities stored in the dispatch table. Certain kinds may
-- not be used, but are added for completeness.
type Prim_Op_Kind is
(POK_Function,
POK_Procedure,
POK_Protected_Entry,
POK_Protected_Function,
POK_Protected_Procedure,
POK_Task_Entry,
POK_Task_Function,
POK_Task_Procedure);
-- Select specific data types
type Select_Specific_Data_Element is record
Index : Positive;
Kind : Prim_Op_Kind;
end record;
type Select_Specific_Data_Array is
array (Positive range <>) of Select_Specific_Data_Element;
type Select_Specific_Data (Nb_Prim : Positive) is record
SSD_Table : Select_Specific_Data_Array (1 .. Nb_Prim);
-- NOTE: Nb_Prim is the number of non-predefined primitive operations
end record;
type Select_Specific_Data_Ptr is access all Select_Specific_Data;
-- A table used to store the primitive operation kind and entry index of
-- primitive subprograms of a type that implements a limited interface.
-- The Select Specific Data table resides in the Type Specific Data of a
-- type. This construct is used in the handling of dispatching triggers
-- in select statements.
type Prim_Ptr is access procedure;
type Address_Array is array (Positive range <>) of Prim_Ptr;
subtype Dispatch_Table is Address_Array (1 .. 1);
-- Used by GDB to identify the _tags and traverse the run-time structure
-- associated with tagged types. For compatibility with older versions of
-- gdb, its name must not be changed.
type Tag is access all Dispatch_Table;
pragma No_Strict_Aliasing (Tag);
type Interface_Tag is access all Dispatch_Table;
No_Tag : constant Tag := null;
-- The expander ensures that Tag objects reference the Prims_Ptr component
-- of the wrapper.
type Tag_Ptr is access all Tag;
pragma No_Strict_Aliasing (Tag_Ptr);
type Offset_To_Top_Ptr is access all SSE.Storage_Offset;
pragma No_Strict_Aliasing (Offset_To_Top_Ptr);
type Tag_Table is array (Natural range <>) of Tag;
type Size_Ptr is
access function (A : System.Address) return Long_Long_Integer;
type Type_Specific_Data (Idepth : Natural) is record
-- The discriminant Idepth is the Inheritance Depth Level: Used to
-- implement the membership test associated with single inheritance of
-- tagged types in constant-time. It also indicates the size of the
-- Tags_Table component.
Access_Level : Natural;
-- Accessibility level required to give support to Ada 2005 nested type
-- extensions. This feature allows safe nested type extensions by
-- shifting the accessibility checks to certain operations, rather than
-- being enforced at the type declaration. In particular, by performing
-- run-time accessibility checks on class-wide allocators, class-wide
-- function return, and class-wide stream I/O, the danger of objects
-- outliving their type declaration can be eliminated (Ada 2005: AI-344)
Alignment : Natural;
Expanded_Name : Cstring_Ptr;
External_Tag : Cstring_Ptr;
HT_Link : Tag_Ptr;
-- Components used to support to the Ada.Tags subprograms in RM 3.9
-- Note: Expanded_Name is referenced by GDB to determine the actual name
-- of the tagged type. Its requirements are: 1) it must have this exact
-- name, and 2) its contents must point to a C-style Nul terminated
-- string containing its expanded name. GDB has no requirement on a
-- given position inside the record.
Transportable : Boolean;
-- Used to check RM E.4(18), set for types that satisfy the requirements
-- for being used in remote calls as actuals for classwide formals or as
-- return values for classwide functions.
Is_Abstract : Boolean;
-- True if the type is abstract (Ada 2012: AI05-0173)
Needs_Finalization : Boolean;
-- Used to dynamically check whether an object is controlled or not
Size_Func : Size_Ptr;
-- Pointer to the subprogram computing the _size of the object. Used by
-- the run-time whenever a call to the 'size primitive is required. We
-- cannot assume that the contents of dispatch tables are addresses
-- because in some architectures the ABI allows descriptors.
Interfaces_Table : Interface_Data_Ptr;
-- Pointer to the table of interface tags. It is used to implement the
-- membership test associated with interfaces and also for backward
-- abstract interface type conversions (Ada 2005:AI-251)
SSD : Select_Specific_Data_Ptr;
-- Pointer to a table of records used in dispatching selects. This field
-- has a meaningful value for all tagged types that implement a limited,
-- protected, synchronized or task interfaces and have non-predefined
-- primitive operations.
Tags_Table : Tag_Table (0 .. Idepth);
-- Table of ancestor tags. Its size actually depends on the inheritance
-- depth level of the tagged type.
end record;
type Type_Specific_Data_Ptr is access all Type_Specific_Data;
pragma No_Strict_Aliasing (Type_Specific_Data_Ptr);
-- Declarations for the dispatch table record
type Signature_Kind is
(Unknown,
Primary_DT,
Secondary_DT);
-- Tagged type kinds with respect to concurrency and limitedness
type Tagged_Kind is
(TK_Abstract_Limited_Tagged,
TK_Abstract_Tagged,
TK_Limited_Tagged,
TK_Protected,
TK_Tagged,
TK_Task);
type Dispatch_Table_Wrapper (Num_Prims : Natural) is record
Signature : Signature_Kind;
Tag_Kind : Tagged_Kind;
Predef_Prims : System.Address;
-- Pointer to the dispatch table of predefined Ada primitives
-- According to the C++ ABI the components Offset_To_Top and TSD are
-- stored just "before" the dispatch table, and they are referenced with
-- negative offsets referring to the base of the dispatch table. The
-- _Tag (or the VTable_Ptr in C++ terminology) must point to the base
-- of the virtual table, just after these components, to point to the
-- Prims_Ptr table.
Offset_To_Top : SSE.Storage_Offset;
-- Offset between the _Tag field and the field that contains the
-- reference to this dispatch table. For primary dispatch tables it is
-- zero. For secondary dispatch tables: if the parent record type (if
-- any) has a compile-time-known size, then Offset_To_Top contains the
-- expected value, otherwise it contains SSE.Storage_Offset'Last and the
-- actual offset is to be found in the tagged record, right after the
-- field that contains the reference to this dispatch table. See the
-- implementation of Ada.Tags.Offset_To_Top for the corresponding logic.
TSD : System.Address;
Prims_Ptr : aliased Address_Array (1 .. Num_Prims);
-- The size of the Prims_Ptr array actually depends on the tagged type
-- to which it applies. For each tagged type, the expander computes the
-- actual array size, allocating the Dispatch_Table record accordingly.
end record;
type Dispatch_Table_Ptr is access all Dispatch_Table_Wrapper;
pragma No_Strict_Aliasing (Dispatch_Table_Ptr);
-- The following type declaration is used by the compiler when the program
-- is compiled with restriction No_Dispatching_Calls. It is also used with
-- interface types to generate the tag and run-time information associated
-- with them.
type No_Dispatch_Table_Wrapper is record
NDT_TSD : System.Address;
NDT_Prims_Ptr : Natural;
end record;
DT_Predef_Prims_Size : constant SSE.Storage_Count :=
SSE.Storage_Count
(1 * (Standard'Address_Size /
System.Storage_Unit));
-- Size of the Predef_Prims field of the Dispatch_Table
DT_Offset_To_Top_Size : constant SSE.Storage_Count :=
SSE.Storage_Count
(1 * (Standard'Address_Size /
System.Storage_Unit));
-- Size of the Offset_To_Top field of the Dispatch Table
DT_Typeinfo_Ptr_Size : constant SSE.Storage_Count :=
SSE.Storage_Count
(1 * (Standard'Address_Size /
System.Storage_Unit));
-- Size of the Typeinfo_Ptr field of the Dispatch Table
use type System.Storage_Elements.Storage_Offset;
DT_Offset_To_Top_Offset : constant SSE.Storage_Count :=
DT_Typeinfo_Ptr_Size
+ DT_Offset_To_Top_Size;
DT_Predef_Prims_Offset : constant SSE.Storage_Count :=
DT_Typeinfo_Ptr_Size
+ DT_Offset_To_Top_Size
+ DT_Predef_Prims_Size;
-- Offset from Prims_Ptr to Predef_Prims component
-- Object Specific Data record of secondary dispatch tables
type Object_Specific_Data_Array is array (Positive range <>) of Positive;
type Object_Specific_Data (OSD_Num_Prims : Positive) is record
OSD_Table : Object_Specific_Data_Array (1 .. OSD_Num_Prims);
-- Table used in secondary DT to reference their counterpart in the
-- select specific data (in the TSD of the primary DT). This construct
-- is used in the handling of dispatching triggers in select statements.
-- Nb_Prim is the number of non-predefined primitive operations.
end record;
type Object_Specific_Data_Ptr is access all Object_Specific_Data;
pragma No_Strict_Aliasing (Object_Specific_Data_Ptr);
-- The following subprogram specifications are placed here instead of the
-- package body to see them from the frontend through rtsfind.
function Base_Address (This : System.Address) return System.Address;
-- Ada 2005 (AI-251): Displace "This" to point to the base address of the
-- object (that is, the address of the primary tag of the object).
procedure Check_TSD (TSD : Type_Specific_Data_Ptr);
-- Ada 2012 (AI-113): Raise Program_Error if the external tag of this TSD
-- is the same as the external tag for some other tagged type declaration.
function Displace (This : System.Address; T : Tag) return System.Address;
-- Ada 2005 (AI-251): Displace "This" to point to the secondary dispatch
-- table of T.
function Secondary_Tag (T, Iface : Tag) return Tag;
-- Ada 2005 (AI-251): Given a primary tag T associated with a tagged type
-- Typ, search for the secondary tag of the interface type Iface covered
-- by Typ.
function DT (T : Tag) return Dispatch_Table_Ptr;
-- Return the pointer to the TSD record associated with T
function Get_Entry_Index (T : Tag; Position : Positive) return Positive;
-- Ada 2005 (AI-251): Return a primitive operation's entry index (if entry)
-- given a dispatch table T and a position of a primitive operation in T.
function Get_Offset_Index
(T : Tag;
Position : Positive) return Positive;
-- Ada 2005 (AI-251): Given a pointer to a secondary dispatch table (T)
-- and a position of an operation in the DT, retrieve the corresponding
-- operation's position in the primary dispatch table from the Offset
-- Specific Data table of T.
function Get_Prim_Op_Kind
(T : Tag;
Position : Positive) return Prim_Op_Kind;
-- Ada 2005 (AI-251): Return a primitive operation's kind given a dispatch
-- table T and a position of a primitive operation in T.
function Get_Tagged_Kind (T : Tag) return Tagged_Kind;
-- Ada 2005 (AI-345): Given a pointer to either a primary or a secondary
-- dispatch table, return the tagged kind of a type in the context of
-- concurrency and limitedness.
function CW_Membership (Obj_Tag : Tag; Typ_Tag : Tag) return Boolean;
-- Given the tag of an object and the tag associated to a type, return
-- true if Obj is in Typ'Class.
function IW_Membership (This : System.Address; T : Tag) return Boolean;
-- Ada 2005 (AI-251): General routine that checks if a given object
-- implements a tagged type. Its common usage is to check if Obj is in
-- Iface'Class, but it is also used to check if a class-wide interface
-- implements a given type (Iface_CW_Typ in T'Class). For example:
--
-- type I is interface;
-- type T is tagged ...
--
-- function Test (O : I'Class) is
-- begin
-- return O in T'Class.
-- end Test;
function Offset_To_Top
(This : System.Address) return SSE.Storage_Offset;
-- Ada 2005 (AI-251): Returns the current value of the Offset_To_Top
-- component available in the prologue of the dispatch table. If the parent
-- of the tagged type has discriminants this value is stored in a record
-- component just immediately after the tag component.
function Needs_Finalization (T : Tag) return Boolean;
-- A helper routine used in conjunction with finalization collections which
-- service class-wide types. The function dynamically determines whether an
-- object is controlled or has controlled components.
function Parent_Size
(Obj : System.Address;
T : Tag) return SSE.Storage_Count;
-- Computes the size the ancestor part of a tagged extension object whose
-- address is 'obj' by calling indirectly the ancestor _size function. The
-- ancestor is the parent of the type represented by tag T. This function
-- assumes that _size is always in slot one of the dispatch table.
procedure Register_Interface_Offset
(Prim_T : Tag;
Interface_T : Tag;
Is_Static : Boolean;
Offset_Value : SSE.Storage_Offset;
Offset_Func : Offset_To_Top_Function_Ptr);
-- Register in the table of interfaces of the tagged type associated with
-- Prim_T the offset of the record component associated with the progenitor
-- Interface_T (that is, the distance from "This" to the object component
-- containing the tag of the secondary dispatch table). In case of constant
-- offset, Is_Static is true and Offset_Value has such value. In case of
-- variable offset, Is_Static is false and Offset_Func is an access to
-- function that must be called to evaluate the offset.
procedure Register_Tag (T : Tag);
-- Insert the Tag and its associated external_tag in a table for the sake
-- of Internal_Tag.
procedure Set_Dynamic_Offset_To_Top
(This : System.Address;
Prim_T : Tag;
Interface_T : Tag;
Offset_Value : SSE.Storage_Offset;
Offset_Func : Offset_To_Top_Function_Ptr);
-- Ada 2005 (AI-251): The compiler generates calls to this routine only
-- when initializing the Offset_To_Top field of dispatch tables of tagged
-- types that cover interface types whose parent type has variable size
-- components.
--
-- "This" is the object whose dispatch table is being initialized. Prim_T
-- is the primary tag of such object. Interface_T is the interface tag for
-- which the secondary dispatch table is being initialized. Offset_Value
-- is the distance from "This" to the object component containing the tag
-- of the secondary dispatch table (a zero value means that this interface
-- shares the primary dispatch table). Offset_Func references a function
-- that must be called to evaluate the offset at run time. This routine
-- also takes care of registering these values in the table of interfaces
-- of the type.
procedure Set_Entry_Index (T : Tag; Position : Positive; Value : Positive);
-- Ada 2005 (AI-345): Set the entry index of a primitive operation in T's
-- TSD table indexed by Position.
procedure Set_Prim_Op_Kind
(T : Tag;
Position : Positive;
Value : Prim_Op_Kind);
-- Ada 2005 (AI-251): Set the kind of a primitive operation in T's TSD
-- table indexed by Position.
procedure Unregister_Tag (T : Tag);
-- Remove a particular tag from the external tag hash table
Max_Predef_Prims : constant Positive := 16;
-- Number of reserved slots for the following predefined ada primitives:
--
-- 1. Size
-- 2. Read
-- 3. Write
-- 4. Input
-- 5. Output
-- 6. "="
-- 7. assignment
-- 8. deep adjust
-- 9. deep finalize
-- 10. Put_Image
-- 11. async select
-- 12. conditional select
-- 13. prim_op kind
-- 14. task_id
-- 15. dispatching requeue
-- 16. timed select
--
-- The compiler checks that the value here is correct
subtype Predef_Prims_Table is Address_Array (1 .. Max_Predef_Prims);
type Predef_Prims_Table_Ptr is access Predef_Prims_Table;
pragma No_Strict_Aliasing (Predef_Prims_Table_Ptr);
type Addr_Ptr is access System.Address;
pragma No_Strict_Aliasing (Addr_Ptr);
-- This type is used by the frontend to generate the code that handles
-- dispatch table slots of types declared at the local level.
end Ada.Tags;
| 46.116427 | 79 | 0.602317 |
50f1a6b2f26b039ffa7eb03466c77263bca6b5ec | 16,671 | ads | Ada | llvm-gcc-4.2-2.9/gcc/ada/exp_disp.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | 1 | 2016-04-09T02:58:13.000Z | 2016-04-09T02:58:13.000Z | llvm-gcc-4.2-2.9/gcc/ada/exp_disp.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | llvm-gcc-4.2-2.9/gcc/ada/exp_disp.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E X P _ 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 expansion.
with Types; use Types;
package Exp_Disp is
-------------------------------------
-- Predefined primitive operations --
-------------------------------------
-- The predefined primitive operations (PPOs) are subprograms generated
-- by GNAT for a particular tagged type. Their role is to provide support
-- for different Ada language features such as the attribute 'Size or
-- handling of dispatching triggers in select statements. PPOs are created
-- when a tagged type is expanded or frozen. These subprograms are later
-- collected and inserted into the dispatch table of a tagged type at
-- fixed positions. Some of the PPOs that manipulate data in tagged objects
-- require the generation of thunks.
-- List of predefined primitive operations
-- Leading underscores designate reserved names. Bracketed numerical
-- values represent dispatch table slot numbers.
-- _Size (1) - implementation of the attribute 'Size for any tagged
-- type. Constructs of the form Prefix'Size are converted into
-- Prefix._Size.
-- _Alignment (2) - implementation of the attribute 'Alignment for
-- any tagged type. Constructs of the form Prefix'Alignment are
-- converted into Prefix._Alignment.
-- TSS_Stream_Read (3) - implementation of the stream attribute Read
-- for any tagged type.
-- TSS_Stream_Write (4) - implementation of the stream attribute Write
-- for any tagged type.
-- TSS_Stream_Input (5) - implementation of the stream attribute Input
-- for any tagged type.
-- TSS_Stream_Output (6) - implementation of the stream attribute
-- Output for any tagged type.
-- Op_Eq (7) - implementation of the equality operator for any non-
-- limited tagged type.
-- _Assign (8) - implementation of the assignment operator for any
-- non-limited tagged type.
-- TSS_Deep_Adjust (9) - implementation of the finalization operation
-- Adjust for any non-limited tagged type.
-- TSS_Deep_Finalize (10) - implementation of the finalization
-- operation Finalize for any non-limited tagged type.
-- _Disp_Asynchronous_Select (11) - used in the expansion of ATC with
-- dispatching triggers. Null implementation for limited interfaces,
-- full body generation for types that implement limited interfaces,
-- not generated for the rest of the cases. See Expand_N_Asynchronous_
-- Select in Exp_Ch9 for more information.
-- _Disp_Conditional_Select (12) - used in the expansion of conditional
-- selects with dispatching triggers. Null implementation for limited
-- interfaces, full body generation for types that implement limited
-- interfaces, not generated for the rest of the cases. See Expand_N_
-- Conditional_Entry_Call in Exp_Ch9 for more information.
-- _Disp_Get_Prim_Op_Kind (13) - helper routine used in the expansion
-- of ATC with dispatching triggers. Null implementation for limited
-- interfaces, full body generation for types that implement limited
-- interfaces, not generated for the rest of the cases.
-- _Disp_Get_Task_Id (14) - helper routine used in the expansion of
-- Abort, attributes 'Callable and 'Terminated for task interface
-- class-wide types. Full body generation for task types, null
-- implementation for limited interfaces, not generated for the rest
-- of the cases. See Expand_N_Attribute_Reference in Exp_Attr and
-- Expand_N_Abort_Statement in Exp_Ch9 for more information.
-- _Disp_Timed_Select (15) - used in the expansion of timed selects
-- with dispatching triggers. Null implementation for limited
-- interfaces, full body generation for types that implement limited
-- interfaces, not generated for the rest of the cases. See Expand_N_
-- Timed_Entry_Call for more information.
-- Lifecycle of predefined primitive operations
-- The specifications and bodies of the PPOs are created by
-- Make_Predefined_Primitive_Specs and Predefined_Primitive_Bodies
-- in Exp_Ch3. The generated specifications are immediately analyzed,
-- while the bodies are left as freeze actions to the tagged type for
-- which they are created.
-- PPOs are collected and added to the Primitive_Operations list of
-- a type by the regular analysis mechanism.
-- PPOs are frozen in Predefined_Primitive_Freeze in Exp_Ch3.
-- Thunks for PPOs are created in Freeze_Subprogram in Exp_Ch6, by a
-- call to Register_Predefined_DT_Entry, also in Exp_Ch6.
-- Dispatch table positions of PPOs are set in Set_All_DT_Position in
-- Exp_Disp.
-- Calls to PPOs procede as regular dispatching calls. If the PPO
-- has a thunk, a call procedes as a regular dispatching call with
-- a thunk.
-- Guidelines for addition of new predefined primitive operations
-- Update the value of constant Default_Prim_Op_Count in A-Tags.ads
-- to reflect the new number of PPOs.
-- Introduce a new predefined name for the new PPO in Snames.ads and
-- Snames.adb.
-- Categorize the new PPO name as predefined by adding an entry in
-- Is_Predefined_Dispatching_Operation in Exp_Util.adb.
-- Generate the specification of the new PPO in Make_Predefined_
-- Primitive_Spec in Exp_Ch3.adb. The Is_Internal flag of the defining
-- identifier of the specification must be set to True.
-- Generate the body of the new PPO in Predefined_Primitive_Bodies in
-- Exp_Ch3.adb. The Is_Internal flag of the defining identifier of the
-- specification must be set to True.
-- If the new PPO requires a thunk, add an entry in Freeze_Subprogram
-- in Exp_Ch6.adb.
-- When generating calls to a PPO, use Find_Prim_Op from Exp_Util.ads
-- to retrieve the entity of the operation directly.
-- Number of predefined primitive operations added by the Expander
-- for a tagged type. If more predefined primitive operations are
-- added, the following items must be changed:
-- Ada.Tags.Defailt_Prim_Op_Count - indirect use
-- Exp_Disp.Default_Prim_Op_Position - indirect use
-- Exp_Disp.Set_All_DT_Position - direct use
type DT_Access_Action is
(CW_Membership,
IW_Membership,
DT_Entry_Size,
DT_Prologue_Size,
Get_Access_Level,
Get_Entry_Index,
Get_External_Tag,
Get_Predefined_Prim_Op_Address,
Get_Prim_Op_Address,
Get_Prim_Op_Kind,
Get_RC_Offset,
Get_Remotely_Callable,
Get_Tagged_Kind,
Inherit_DT,
Inherit_TSD,
Register_Interface_Tag,
Register_Tag,
Set_Access_Level,
Set_Entry_Index,
Set_Expanded_Name,
Set_External_Tag,
Set_Interface_Table,
Set_Offset_Index,
Set_OSD,
Set_Predefined_Prim_Op_Address,
Set_Prim_Op_Address,
Set_Prim_Op_Kind,
Set_RC_Offset,
Set_Remotely_Callable,
Set_Signature,
Set_SSD,
Set_TSD,
Set_Tagged_Kind,
TSD_Entry_Size,
TSD_Prologue_Size);
procedure Expand_Dispatching_Call (Call_Node : Node_Id);
-- Expand the call to the operation through the dispatch table and perform
-- the required tag checks when appropriate. For CPP types the call is
-- done through the Vtable (tag checks are not relevant)
procedure Expand_Interface_Actuals (Call_Node : Node_Id);
-- Ada 2005 (AI-251): Displace all the actuals corresponding to class-wide
-- interfaces to reference the interface tag of the actual object
procedure Expand_Interface_Conversion
(N : Node_Id;
Is_Static : Boolean := True);
-- Ada 2005 (AI-251): N is a type-conversion node. Reference the base of
-- the object to give access to the interface tag associated with the
-- secondary dispatch table.
function Expand_Interface_Thunk
(N : Node_Id;
Thunk_Alias : Node_Id;
Thunk_Id : Entity_Id) return Node_Id;
-- Ada 2005 (AI-251): When a tagged type implements abstract interfaces we
-- generate additional subprograms (thunks) to have a layout compatible
-- with the C++ ABI. The thunk modifies the value of the first actual of
-- the call (that is, the pointer to the object) before transferring
-- control to the target function.
function Fill_DT_Entry
(Loc : Source_Ptr;
Prim : Entity_Id) return Node_Id;
-- Generate the code necessary to fill the appropriate entry of the
-- dispatch table of Prim's controlling type with Prim's address.
function Fill_Secondary_DT_Entry
(Loc : Source_Ptr;
Prim : Entity_Id;
Thunk_Id : Entity_Id;
Iface_DT_Ptr : Entity_Id) return Node_Id;
-- (Ada 2005): Generate the code necessary to fill the appropriate entry of
-- the secondary dispatch table of Prim's controlling type with Thunk_Id's
-- address.
function Get_Remotely_Callable (Obj : Node_Id) return Node_Id;
-- Return an expression that holds True if the object can be transmitted
-- onto another partition according to E.4 (18)
function Init_Predefined_Interface_Primitives
(Typ : Entity_Id) return List_Id;
-- Ada 2005 (AI-251): Initialize the entries associated with predefined
-- primitives in all the secondary dispatch tables of Typ.
function Make_DT_Access_Action
(Typ : Entity_Id;
Action : DT_Access_Action;
Args : List_Id) return Node_Id;
-- Generate a call to one of the Dispatch Table Access Subprograms defined
-- in Ada.Tags or in Interfaces.Cpp
function Make_DT (Typ : Entity_Id) return List_Id;
-- Expand the declarations for the Dispatch Table (or the Vtable in
-- the case of type whose ancestor is a CPP_Class)
function Make_Disp_Asynchronous_Select_Body
(Typ : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Generate the body of the primitive operation of type
-- Typ used for dispatching in asynchronous selects. Generate a null body
-- if Typ is an interface type.
function Make_Disp_Asynchronous_Select_Spec
(Typ : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Generate the specification of the primitive operation
-- of type Typ used for dispatching in asynchronous selects.
function Make_Disp_Conditional_Select_Body
(Typ : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Generate the body of the primitive operation of type
-- Typ used for dispatching in conditional selects. Generate a null body
-- if Typ is an interface type.
function Make_Disp_Conditional_Select_Spec
(Typ : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Generate the specification of the primitive operation
-- of type Typ used for dispatching in conditional selects.
function Make_Disp_Get_Prim_Op_Kind_Body
(Typ : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Generate the body of the primitive operation of type
-- Typ used for retrieving the callable entity kind during dispatching in
-- asynchronous selects. Generate a null body if Typ is an interface type.
function Make_Disp_Get_Prim_Op_Kind_Spec
(Typ : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Generate the specification of the primitive operation
-- of the type Typ use for retrieving the callable entity kind during
-- dispatching in asynchronous selects.
function Make_Disp_Get_Task_Id_Body
(Typ : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Generate the body of the primitive operation of type
-- Typ used for retrieving the _task_id field of a task interface class-
-- wide type. Generate a null body if Typ is an interface or a non-task
-- type.
function Make_Disp_Get_Task_Id_Spec
(Typ : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Generate the specification of the primitive operation
-- of type Typ used for retrieving the _task_id field of a task interface
-- class-wide type.
function Make_Disp_Timed_Select_Body
(Typ : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Generate the body of the primitive operation of type
-- Typ used for dispatching in timed selects. Generate a null body if Nul
-- is an interface type.
function Make_Disp_Timed_Select_Spec
(Typ : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Generate the specification of the primitive operation
-- of type Typ used for dispatching in timed selects.
function Make_Select_Specific_Data_Table
(Typ : Entity_Id) return List_Id;
-- Ada 2005 (AI-345): Create and populate the auxiliary table in the TSD
-- of Typ used for dispatching in asynchronous, conditional and timed
-- selects. Generate code to set the primitive operation kinds and entry
-- indices of primitive operations and primitive wrappers.
procedure Make_Secondary_DT
(Typ : Entity_Id;
Ancestor_Typ : Entity_Id;
Suffix_Index : Int;
Iface : Entity_Id;
AI_Tag : Entity_Id;
Acc_Disp_Tables : in out Elist_Id;
Result : out List_Id);
-- Ada 2005 (AI-251): Expand the declarations for the Secondary Dispatch
-- Table of Typ associated with Iface (each abstract interface implemented
-- by Typ has a secondary dispatch table). The arguments Typ, Ancestor_Typ
-- and Suffix_Index are used to generate an unique external name which
-- is added at the end of Acc_Disp_Tables; this external name will be
-- used later by the subprogram Exp_Ch3.Build_Init_Procedure.
procedure Set_All_DT_Position (Typ : Entity_Id);
-- Set the DT_Position field for each primitive operation. In the CPP
-- Class case check that no pragma CPP_Virtual is missing and that the
-- DT_Position are coherent
procedure Set_Default_Constructor (Typ : Entity_Id);
-- Typ is a CPP_Class type. Create the Init procedure of that type to
-- be the default constructor (i.e. the function returning this type,
-- having a pragma CPP_Constructor and no parameter)
procedure Write_DT (Typ : Entity_Id);
pragma Export (Ada, Write_DT);
-- Debugging procedure (to be called within gdb)
end Exp_Disp;
| 45.92562 | 79 | 0.656949 |
fb684334b266a15b5c6752d95e5345c9ebb5cef9 | 5,030 | ads | Ada | source/amf/ocl/amf-ocl-iterator_exps-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/amf/ocl/amf-ocl-iterator_exps-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/amf/ocl/amf-ocl-iterator_exps-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, Vadim Godunko <[email protected]> --
-- 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.Iterator_Exps.Collections is
pragma Preelaborate;
package OCL_Iterator_Exp_Collections is
new AMF.Generic_Collections
(OCL_Iterator_Exp,
OCL_Iterator_Exp_Access);
type Set_Of_OCL_Iterator_Exp is
new OCL_Iterator_Exp_Collections.Set with null record;
Empty_Set_Of_OCL_Iterator_Exp : constant Set_Of_OCL_Iterator_Exp;
type Ordered_Set_Of_OCL_Iterator_Exp is
new OCL_Iterator_Exp_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_OCL_Iterator_Exp : constant Ordered_Set_Of_OCL_Iterator_Exp;
type Bag_Of_OCL_Iterator_Exp is
new OCL_Iterator_Exp_Collections.Bag with null record;
Empty_Bag_Of_OCL_Iterator_Exp : constant Bag_Of_OCL_Iterator_Exp;
type Sequence_Of_OCL_Iterator_Exp is
new OCL_Iterator_Exp_Collections.Sequence with null record;
Empty_Sequence_Of_OCL_Iterator_Exp : constant Sequence_Of_OCL_Iterator_Exp;
private
Empty_Set_Of_OCL_Iterator_Exp : constant Set_Of_OCL_Iterator_Exp
:= (OCL_Iterator_Exp_Collections.Set with null record);
Empty_Ordered_Set_Of_OCL_Iterator_Exp : constant Ordered_Set_Of_OCL_Iterator_Exp
:= (OCL_Iterator_Exp_Collections.Ordered_Set with null record);
Empty_Bag_Of_OCL_Iterator_Exp : constant Bag_Of_OCL_Iterator_Exp
:= (OCL_Iterator_Exp_Collections.Bag with null record);
Empty_Sequence_Of_OCL_Iterator_Exp : constant Sequence_Of_OCL_Iterator_Exp
:= (OCL_Iterator_Exp_Collections.Sequence with null record);
end AMF.OCL.Iterator_Exps.Collections;
| 54.673913 | 84 | 0.519085 |
23a4247b37c79190cbf633616b350f8e2ef1243d | 1,924 | ads | Ada | 3-mid/opengl/source/lean/model/opengl-model-billboard-colored_textured.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | 1 | 2022-01-20T07:13:42.000Z | 2022-01-20T07:13:42.000Z | 3-mid/opengl/source/lean/model/opengl-model-billboard-colored_textured.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | 3-mid/opengl/source/lean/model/opengl-model-billboard-colored_textured.ads | charlie5/lace-alire | 9ace9682cf4daac7adb9f980c2868d6225b8111c | [
"0BSD"
] | null | null | null | with
openGL.Geometry.colored_textured,
openGL.Texture,
openGL.Font,
openGL.Palette;
package openGL.Model.billboard.colored_textured
--
-- Models a colored, textured billboard.
--
is
type Item is new Model.billboard.item with private;
type View is access all Item'Class;
---------
--- Forge
--
function new_Billboard (Size : in Size_t := default_Size;
Plane : in billboard.Plane;
Color : in lucid_Color;
Texture : in asset_Name) return View;
--------------
--- Attributes
--
overriding
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
procedure Color_is (Self : in out Item; Now : in lucid_Color);
procedure Texture_Coords_are (Self : in out Item; Now : in Coordinates);
overriding
procedure modify (Self : in out Item);
overriding
function is_Modified (Self : in Item) return Boolean;
private
type Item is new Model.billboard.item with
record
Color : lucid_Color := (Palette.White, Opaque);
texture_Name : asset_Name := null_Asset;
Texture : openGL.Texture.Object := openGL.Texture.null_Object; -- The texture to be applied to the billboard face.
texture_Coords : Coordinates := ((0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0));
is_Modified : Boolean := False;
Vertices : access Geometry.colored_textured.Vertex_array := new geometry.colored_textured.Vertex_array (1 .. 4);
Geometry : access Geometry.colored_textured.item'Class;
end record;
end openGL.Model.billboard.colored_textured;
| 31.032258 | 135 | 0.587838 |
0b76e054d7f4ad26f30ffd80e624e3e8c13bb0ba | 146 | ads | Ada | kv-avm-actor_references-sets.ads | davidkristola/vole | aa8e19d9deff2efe98fcd4dc0028c2895d624693 | [
"Unlicense"
] | 4 | 2015-02-02T12:11:41.000Z | 2020-12-19T02:14:21.000Z | kv-avm-actor_references-sets.ads | davidkristola/vole | aa8e19d9deff2efe98fcd4dc0028c2895d624693 | [
"Unlicense"
] | null | null | null | kv-avm-actor_references-sets.ads | davidkristola/vole | aa8e19d9deff2efe98fcd4dc0028c2895d624693 | [
"Unlicense"
] | 3 | 2017-02-22T10:44:02.000Z | 2021-05-16T09:34:39.000Z | with Ada.Containers.Ordered_Sets;
package kv.avm.Actor_References.Sets is new Ada.Containers.Ordered_Sets(Element_Type => Actor_Reference_Type);
| 36.5 | 110 | 0.842466 |
50de3ad809b7653cf36f10e98f6ad8002abd4446 | 3,249 | ads | Ada | source/oasis/program-elements-for_loop_statements.ads | reznikmm/gela | 20134f1d154fb763812e73860c6f4b04f353df79 | [
"MIT"
] | null | null | null | source/oasis/program-elements-for_loop_statements.ads | reznikmm/gela | 20134f1d154fb763812e73860c6f4b04f353df79 | [
"MIT"
] | null | null | null | source/oasis/program-elements-for_loop_statements.ads | reznikmm/gela | 20134f1d154fb763812e73860c6f4b04f353df79 | [
"MIT"
] | 1 | 2019-10-16T09:05:27.000Z | 2019-10-16T09:05:27.000Z | -- SPDX-FileCopyrightText: 2019 Max Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Elements.Statements;
with Program.Elements.Defining_Identifiers;
with Program.Lexical_Elements;
with Program.Elements.Loop_Parameter_Specifications;
with Program.Elements.Generalized_Iterator_Specifications;
with Program.Elements.Element_Iterator_Specifications;
with Program.Element_Vectors;
with Program.Elements.Identifiers;
package Program.Elements.For_Loop_Statements is
pragma Pure (Program.Elements.For_Loop_Statements);
type For_Loop_Statement is
limited interface and Program.Elements.Statements.Statement;
type For_Loop_Statement_Access is access all For_Loop_Statement'Class
with Storage_Size => 0;
not overriding function Statement_Identifier
(Self : For_Loop_Statement)
return Program.Elements.Defining_Identifiers.Defining_Identifier_Access
is abstract;
not overriding function Loop_Parameter
(Self : For_Loop_Statement)
return Program.Elements.Loop_Parameter_Specifications
.Loop_Parameter_Specification_Access is abstract;
not overriding function Generalized_Iterator
(Self : For_Loop_Statement)
return Program.Elements.Generalized_Iterator_Specifications
.Generalized_Iterator_Specification_Access is abstract;
not overriding function Element_Iterator
(Self : For_Loop_Statement)
return Program.Elements.Element_Iterator_Specifications
.Element_Iterator_Specification_Access is abstract;
not overriding function Statements
(Self : For_Loop_Statement)
return not null Program.Element_Vectors.Element_Vector_Access
is abstract;
not overriding function End_Statement_Identifier
(Self : For_Loop_Statement)
return Program.Elements.Identifiers.Identifier_Access is abstract;
type For_Loop_Statement_Text is limited interface;
type For_Loop_Statement_Text_Access is
access all For_Loop_Statement_Text'Class with Storage_Size => 0;
not overriding function To_For_Loop_Statement_Text
(Self : in out For_Loop_Statement)
return For_Loop_Statement_Text_Access is abstract;
not overriding function Colon_Token
(Self : For_Loop_Statement_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function For_Token
(Self : For_Loop_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Loop_Token
(Self : For_Loop_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function End_Token
(Self : For_Loop_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Loop_Token_2
(Self : For_Loop_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Semicolon_Token
(Self : For_Loop_Statement_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
end Program.Elements.For_Loop_Statements;
| 34.935484 | 77 | 0.779624 |
5005fb3f2fcab9a9d28659429016701fdeea2bee | 3,651 | ads | Ada | src/shared/generic/lsc-aes_generic-cbc.ads | Componolit/libsparkcrypto | 8531a07b6e9f5eb33eae0fa32759b4cbd3509d95 | [
"OpenSSL",
"Unlicense"
] | 30 | 2018-05-18T09:11:50.000Z | 2021-05-18T16:29:14.000Z | src/shared/generic/lsc-aes_generic-cbc.ads | Componolit/libsparkcrypto | 8531a07b6e9f5eb33eae0fa32759b4cbd3509d95 | [
"OpenSSL",
"Unlicense"
] | 15 | 2018-12-13T07:53:36.000Z | 2019-09-24T19:43:35.000Z | src/shared/generic/lsc-aes_generic-cbc.ads | Componolit/libsparkcrypto | 8531a07b6e9f5eb33eae0fa32759b4cbd3509d95 | [
"OpenSSL",
"Unlicense"
] | 3 | 2019-04-04T17:41:29.000Z | 2021-05-07T22:28:46.000Z | -------------------------------------------------------------------------------
-- This file is part of libsparkcrypto.
--
-- @author Alexander Senier
-- @date 2019-01-21
--
-- Copyright (C) 2018 Componolit GmbH
-- 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 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 LSC.AES_Generic.CBC
is
pragma Pure;
generic
type Plaintext_Index_Type is (<>);
type Plaintext_Elem_Type is (<>);
type Plaintext_Type is array (Plaintext_Index_Type range <>) of Plaintext_Elem_Type;
type Ciphertext_Index_Type is (<>);
type Ciphertext_Elem_Type is (<>);
type Ciphertext_Type is array (Ciphertext_Index_Type range <>) of Ciphertext_Elem_Type;
procedure Decrypt (Ciphertext : Ciphertext_Type;
IV : Ciphertext_Type;
Key : AES_Generic.Dec_Key_Type;
Plaintext : out Plaintext_Type)
with
Pre => Ciphertext'Length > 0 and
Ciphertext'Length mod 16 = 0 and
Plaintext'Length >= Ciphertext'Length and
IV'Length = 16;
-- Decrypt @Ciphertext to @Plaintext using @IV and @Key in CBC mode
generic
type Plaintext_Index_Type is (<>);
type Plaintext_Elem_Type is (<>);
type Plaintext_Type is array (Plaintext_Index_Type range <>) of Plaintext_Elem_Type;
type Ciphertext_Index_Type is (<>);
type Ciphertext_Elem_Type is (<>);
type Ciphertext_Type is array (Ciphertext_Index_Type range <>) of Ciphertext_Elem_Type;
procedure Encrypt (Plaintext : Plaintext_Type;
IV : Ciphertext_Type;
Key : AES_Generic.Enc_Key_Type;
Ciphertext : out Ciphertext_Type)
with
Pre => Plaintext'Length > 0 and
Plaintext'Length mod 16 = 0 and
Ciphertext'Length >= Plaintext'Length and
IV'Length = 16;
-- Encrypt @Plaintext to @Ciphertext using @IV and @Key in CBC mode
end LSC.AES_Generic.CBC;
| 46.807692 | 93 | 0.640373 |
0b178320d818a3ba727493bac9444ea45125a968 | 4,367 | adb | Ada | .emacs.d/elpa/wisi-3.1.3/wisitoken-gen_token_enum.adb | caqg/linux-home | eed631aae6f5e59e4f46e14f1dff443abca5fa28 | [
"Linux-OpenIB"
] | null | null | null | .emacs.d/elpa/wisi-3.1.3/wisitoken-gen_token_enum.adb | caqg/linux-home | eed631aae6f5e59e4f46e14f1dff443abca5fa28 | [
"Linux-OpenIB"
] | null | null | null | .emacs.d/elpa/wisi-3.1.3/wisitoken-gen_token_enum.adb | caqg/linux-home | eed631aae6f5e59e4f46e14f1dff443abca5fa28 | [
"Linux-OpenIB"
] | null | null | null | -- Abstract :
--
-- See spec
--
-- Copyright (C) 2017, 2018 Free Software Foundation, Inc.
--
-- This library is free software; you can redistribute it and/or modify it
-- under terms of the GNU General Public License as published by the Free
-- Software Foundation; either version 3, or (at your option) any later
-- version. This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- As a special exception under Section 7 of GPL version 3, you are granted
-- additional permissions described in the GCC Runtime Library Exception,
-- version 3.1, as published by the Free Software Foundation.
pragma License (GPL);
with Ada.Characters.Handling;
with WisiToken.Wisi_Ada;
package body WisiToken.Gen_Token_Enum is
function Token_Enum_Image return Token_ID_Array_String
is
use Ada.Characters.Handling;
Result : Token_ID_Array_String (Token_ID'First .. +Last_Nonterminal);
begin
for I in Token_Enum_ID loop
if I <= Last_Terminal then
Result (+I) := new String'(Token_Enum_ID'Image (I));
else
Result (+I) := new String'(To_Lower (Token_Enum_ID'Image (I)));
end if;
end loop;
return Result;
end Token_Enum_Image;
function To_Syntax (Item : in Enum_Syntax) return WisiToken.Lexer.Regexp.Syntax
is
Result : WisiToken.Lexer.Regexp.Syntax (Token_ID'First .. +Last_Terminal);
begin
for I in Result'Range loop
Result (I) := Item (-I);
end loop;
return Result;
end To_Syntax;
function "&" (Left, Right : in Token_Enum_ID) return Token_ID_Arrays.Vector
is begin
return Result : Token_ID_Arrays.Vector do
Result.Append (+Left);
Result.Append (+Right);
end return;
end "&";
function "&"
(Left : in Token_ID_Arrays.Vector;
Right : in Token_Enum_ID)
return Token_ID_Arrays.Vector
is begin
return Result : Token_ID_Arrays.Vector := Left do
Result.Append (+Right);
end return;
end "&";
function "+"
(Left : in Token_Enum_ID;
Right : in WisiToken.Syntax_Trees.Semantic_Action)
return WisiToken.Productions.Right_Hand_Side
is begin
return WisiToken.Wisi_Ada."+" (+Left, Right);
end "+";
function "<="
(Left : in Token_Enum_ID;
Right : in WisiToken.Productions.Right_Hand_Side)
return WisiToken.Productions.Instance
is begin
return WisiToken.Wisi_Ada."<=" (+Left, Productions.RHS_Arrays.To_Vector (Right, 1));
end "<=";
function To_Nonterminal_Array_Token_Set
(Item : in Nonterminal_Array_Token_Set)
return WisiToken.Token_Array_Token_Set
is
Result : Token_Array_Token_Set :=
(LR1_Descriptor.First_Nonterminal .. LR1_Descriptor.Last_Nonterminal =>
(LR1_Descriptor.First_Terminal .. LR1_Descriptor.Last_Nonterminal => False));
begin
for I in Item'Range (1) loop
for J in Item'Range (2) loop
Result (+I, +J) := Item (I, J);
end loop;
end loop;
return Result;
end To_Nonterminal_Array_Token_Set;
function To_Nonterminal_Array_Terminal_Set
(Item : in Nonterminal_Array_Terminal_Set)
return WisiToken.Token_Array_Token_Set
is
Result : Token_Array_Token_Set :=
(LR1_Descriptor.First_Nonterminal .. LR1_Descriptor.Last_Nonterminal =>
(LR1_Descriptor.First_Terminal .. LR1_Descriptor.Last_Terminal => False));
begin
for I in Item'Range (1) loop
for J in Item'Range (2) loop
Result (+I, +J) := Item (I, J);
end loop;
end loop;
return Result;
end To_Nonterminal_Array_Terminal_Set;
function "+" (Item : in Token_Array) return WisiToken.Token_ID_Set
is
Result : Token_ID_Set := (LR1_Descriptor.First_Terminal .. LR1_Descriptor.Last_Terminal => False);
begin
for I in Item'Range loop
Result (+Item (I)) := True;
end loop;
return Result;
end "+";
function "+" (Item : in Token_Enum_ID) return WisiToken.Token_ID_Set
is begin
return +Token_Array'(1 => Item);
end "+";
begin
LR1_Descriptor.Image := Token_Enum_Image;
LALR_Descriptor.Image := LR1_Descriptor.Image;
end WisiToken.Gen_Token_Enum;
| 32.589552 | 104 | 0.670025 |
d01fb1c126a977500026b5813f45826764edaa4b | 2,335 | ada | Ada | Task/Wireworld/Ada/wireworld.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:38.000Z | 2018-11-09T22:08:38.000Z | Task/Wireworld/Ada/wireworld.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | null | null | null | Task/Wireworld/Ada/wireworld.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | with Ada.Text_IO; use Ada.Text_IO;
procedure Test_Wireworld is
type Cell is (' ', 'H', 't', '.');
type Board is array (Positive range <>, Positive range <>) of Cell;
-- Perform one transition of the cellular automation
procedure Wireworld (State : in out Board) is
function "abs" (Left : Cell) return Natural is
begin
if Left = 'H' then
return 1;
else
return 0;
end if;
end "abs";
Above : array (State'Range (2)) of Cell := (others => ' ');
Left : Cell := ' ';
Current : Cell;
begin
for I in State'First (1) + 1..State'Last (1) - 1 loop
for J in State'First (2) + 1..State'Last (2) - 1 loop
Current := State (I, J);
case Current is
when ' ' =>
null;
when 'H' =>
State (I, J) := 't';
when 't' =>
State (I, J) := '.';
when '.' =>
if abs Above ( J - 1) + abs Above ( J) + abs Above ( J + 1) +
abs Left + abs State (I, J + 1) +
abs State (I + 1, J - 1) + abs State (I + 1, J) + abs State (I + 1, J + 1)
in 1..2 then
State (I, J) := 'H';
else
State (I, J) := '.';
end if;
end case;
Above (J - 1) := Left;
Left := Current;
end loop;
end loop;
end Wireworld;
-- Print state of the automation
procedure Put (State : Board) is
begin
for I in State'First (1) + 1..State'Last (1) - 1 loop
for J in State'First (2) + 1..State'Last (2) - 1 loop
case State (I, J) is
when ' ' => Put (' ');
when 'H' => Put ('H');
when 't' => Put ('t');
when '.' => Put ('.');
end case;
end loop;
New_Line;
end loop;
end Put;
Oscillator : Board := (" ", " tH ", " . .... ", " .. ", " ");
begin
for Step in 0..9 loop
Put_Line ("Step" & Integer'Image (Step) & " ---------"); Put (Oscillator);
Wireworld (Oscillator);
end loop;
end Test_Wireworld;
| 34.850746 | 97 | 0.405996 |
0b2d1a866a6549b5a08e7861cacdb86c9e32d373 | 480 | ads | Ada | passencrypt.ads | micahwelf/Password_Encode | 30a9152d98bcc48290f47f79342bf29113983d4d | [
"MIT"
] | null | null | null | passencrypt.ads | micahwelf/Password_Encode | 30a9152d98bcc48290f47f79342bf29113983d4d | [
"MIT"
] | null | null | null | passencrypt.ads | micahwelf/Password_Encode | 30a9152d98bcc48290f47f79342bf29113983d4d | [
"MIT"
] | null | null | null | with Ada.Strings,
Ada.Strings.UTF_Encoding,
Ada.Strings.UTF_Encoding.Wide_Strings,
Ada.Command_Line,
Ada.Directories,
Ada.Streams,
Ada.Streams.Stream_IO,
Ada.Sequential_IO,
Interfaces.C_Streams,
Password_Encode;
use Ada.Strings.UTF_Encoding;
package PassEncrypt is
package IO is new Ada.Sequential_IO(Password_Encode.Byte);
use IO;
type IO_Attachment is (Standard_IO, File_IO, Null_IO);
procedure Main;
end PassEncrypt;
| 22.857143 | 61 | 0.725 |
df82d012259d43f55c9e503fe1fa4e736495e09f | 6,867 | adb | Ada | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/g-sothco.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/g-sothco.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/g-sothco.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . S O C K E T S . T H I N _ C O M M O N --
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-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. --
-- --
------------------------------------------------------------------------------
package body GNAT.Sockets.Thin_Common is
-----------------
-- Set_Address --
-----------------
procedure Set_Address
(Sin : Sockaddr_Access;
Address : Sock_Addr_Type)
is
begin
Set_Family (Sin.Sin_Family, Address.Family);
Sin.Sin_Port := Short_To_Network (C.unsigned_short (Address.Port));
case Address.Family is
when Family_Inet =>
Sin.Sin_Addr := To_In_Addr (Address.Addr);
when Family_Inet6 =>
Sin.Sin6_Addr := To_In6_Addr (Address.Addr);
Sin.Sin6_Scope_Id := 0;
when Family_Unspec =>
null;
end case;
end Set_Address;
-----------------
-- Get_Address --
-----------------
function Get_Address (Sin : Sockaddr) return Sock_Addr_Type is
Family : constant C.unsigned_short :=
(if SOSC.Has_Sockaddr_Len = 0 then Sin.Sin_Family.Short_Family
else C.unsigned_short (Sin.Sin_Family.Char_Family));
Result : Sock_Addr_Type
(case Family is
when SOSC.AF_INET6 => Family_Inet6,
when SOSC.AF_INET => Family_Inet,
when others => Family_Unspec);
begin
Result.Port := Port_Type (Network_To_Short (Sin.Sin_Port));
case Result.Family is
when Family_Inet =>
To_Inet_Addr (Sin.Sin_Addr, Result.Addr);
when Family_Inet6 =>
To_Inet_Addr (Sin.Sin6_Addr, Result.Addr);
when Family_Unspec =>
Result.Addr := (Family => Family_Unspec);
end case;
return Result;
end Get_Address;
----------------
-- Set_Family --
----------------
procedure Set_Family
(Length_And_Family : out Sockaddr_Length_And_Family;
Family : Family_Type)
is
C_Family : C.int renames Families (Family);
Has_Sockaddr_Len : constant Boolean := SOSC.Has_Sockaddr_Len /= 0;
begin
if Has_Sockaddr_Len then
Length_And_Family.Length := Lengths (Family);
Length_And_Family.Char_Family := C.unsigned_char (C_Family);
else
Length_And_Family.Short_Family := C.unsigned_short (C_Family);
end if;
end Set_Family;
----------------
-- To_In_Addr --
----------------
function To_In_Addr (Addr : Inet_Addr_Type) return In_Addr is
begin
if Addr.Family = Family_Inet then
return (S_B1 => C.unsigned_char (Addr.Sin_V4 (1)),
S_B2 => C.unsigned_char (Addr.Sin_V4 (2)),
S_B3 => C.unsigned_char (Addr.Sin_V4 (3)),
S_B4 => C.unsigned_char (Addr.Sin_V4 (4)));
end if;
raise Socket_Error with "IPv6 not supported";
end To_In_Addr;
------------------
-- To_Inet_Addr --
------------------
procedure To_Inet_Addr
(Addr : In_Addr;
Result : out Inet_Addr_Type) is
begin
Result.Sin_V4 (1) := Inet_Addr_Comp_Type (Addr.S_B1);
Result.Sin_V4 (2) := Inet_Addr_Comp_Type (Addr.S_B2);
Result.Sin_V4 (3) := Inet_Addr_Comp_Type (Addr.S_B3);
Result.Sin_V4 (4) := Inet_Addr_Comp_Type (Addr.S_B4);
end To_Inet_Addr;
------------------
-- To_Inet_Addr --
------------------
procedure To_Inet_Addr
(Addr : In6_Addr;
Result : out Inet_Addr_Type)
is
Sin_V6 : Inet_Addr_V6_Type;
begin
for J in Addr'Range loop
Sin_V6 (J) := Inet_Addr_Comp_Type (Addr (J));
end loop;
Result := (Family => Family_Inet6, Sin_V6 => Sin_V6);
end To_Inet_Addr;
----------------
-- To_In_Addr --
----------------
function To_In6_Addr (Addr : Inet_Addr_Type) return In6_Addr is
Result : In6_Addr;
begin
for J in Addr.Sin_V6'Range loop
Result (J) := C.unsigned_char (Addr.Sin_V6 (J));
end loop;
return Result;
end To_In6_Addr;
----------------------
-- Short_To_Network --
----------------------
function Short_To_Network (S : C.unsigned_short) return C.unsigned_short is
use Interfaces;
use System;
begin
-- Big-endian case. No conversion needed. On these platforms, htons()
-- defaults to a null procedure.
if Default_Bit_Order = High_Order_First then
return S;
-- Little-endian case. We must swap the high and low bytes of this
-- short to make the port number network compliant.
else
return C.unsigned_short (Rotate_Left (Unsigned_16 (S), 8));
end if;
end Short_To_Network;
end GNAT.Sockets.Thin_Common;
| 36.333333 | 78 | 0.50284 |
0e9e809a6c4151f593a8a7ad35e1dd376041aa51 | 1,726 | ada | Ada | Task/Find-the-missing-permutation/Ada/find-the-missing-permutation.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:38.000Z | 2018-11-09T22:08:38.000Z | Task/Find-the-missing-permutation/Ada/find-the-missing-permutation.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | null | null | null | Task/Find-the-missing-permutation/Ada/find-the-missing-permutation.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | with Ada.Text_IO;
procedure Missing_Permutations is
subtype Permutation_Character is Character range 'A' .. 'D';
Character_Count : constant :=
1 + Permutation_Character'Pos (Permutation_Character'Last)
- Permutation_Character'Pos (Permutation_Character'First);
type Permutation_String is
array (1 .. Character_Count) of Permutation_Character;
procedure Put (Item : Permutation_String) is
begin
for I in Item'Range loop
Ada.Text_IO.Put (Item (I));
end loop;
end Put;
Given_Permutations : array (Positive range <>) of Permutation_String :=
("ABCD", "CABD", "ACDB", "DACB", "BCDA", "ACBD",
"ADCB", "CDAB", "DABC", "BCAD", "CADB", "CDBA",
"CBAD", "ABDC", "ADBC", "BDCA", "DCBA", "BACD",
"BADC", "BDAC", "CBDA", "DBCA", "DCAB");
Count : array (Permutation_Character, 1 .. Character_Count) of Natural
:= (others => (others => 0));
Max_Count : Positive := 1;
Missing_Permutation : Permutation_String;
begin
for I in Given_Permutations'Range loop
for Pos in 1 .. Character_Count loop
Count (Given_Permutations (I) (Pos), Pos) :=
Count (Given_Permutations (I) (Pos), Pos) + 1;
if Count (Given_Permutations (I) (Pos), Pos) > Max_Count then
Max_Count := Count (Given_Permutations (I) (Pos), Pos);
end if;
end loop;
end loop;
for Char in Permutation_Character loop
for Pos in 1 .. Character_Count loop
if Count (Char, Pos) < Max_Count then
Missing_Permutation (Pos) := Char;
end if;
end loop;
end loop;
Ada.Text_IO.Put_Line ("Missing Permutation:");
Put (Missing_Permutation);
end Missing_Permutations;
| 33.192308 | 77 | 0.631518 |
fbce9af3a0b4d8448474ad2b186b61d1da583961 | 17,518 | ada | Ada | aflex/src/alsys_dos/mainb.ada | irion7/aflex-ayacc-mirror | 6c8e444ca735a1e2149beb14c5a85759d05403fe | [
"Unlicense"
] | 1 | 2015-01-18T23:09:29.000Z | 2015-01-18T23:09:29.000Z | aflex/src/alsys_dos/mainb.ada | irion7/aflex-ayacc-mirror | 6c8e444ca735a1e2149beb14c5a85759d05403fe | [
"Unlicense"
] | null | null | null | aflex/src/alsys_dos/mainb.ada | irion7/aflex-ayacc-mirror | 6c8e444ca735a1e2149beb14c5a85759d05403fe | [
"Unlicense"
] | null | null | null |
-- TITLE main body
-- AUTHOR: John Self (UCI)
-- DESCRIPTION driver routines for aflex. Calls drivers for all
-- high level routines from other packages.
-- $Header: /co/ua/self/arcadia/aflex/ada/src/RCS/mainB.a,v 1.23 90/10/15 20:00:28 self Exp Locker: self $
--***************************************************************************
-- This file is subject to the Arcadia License Agreement.
--
-- (see notice in aflex.a)
--
--***************************************************************************
with MISC_DEFS, MISC, COMMAND_LINE_INTERFACE, DFA, ECS, GEN, TEXT_IO, PARSER;
with MAIN_BODY, TSTRING, PARSE_TOKENS, SKELETON_MANAGER, EXTERNAL_FILE_MANAGER;
with EXTERNAL_FILE_MANAGER, INT_IO; use MISC_DEFS, COMMAND_LINE_INTERFACE,
TSTRING, EXTERNAL_FILE_MANAGER;
package body MAIN_BODY is
OUTFILE_CREATED : BOOLEAN := FALSE;
AFLEX_VERSION : STRING(1 .. 4) := "1.4a";
STARTTIME, ENDTIME : VSTRING;
-- aflexend - terminate aflex
--
-- note
-- This routine does not return.
procedure AFLEXEND(STATUS : in INTEGER) is
use TEXT_IO;
TBLSIZ : INTEGER;
begin
TERMINATION_STATUS := STATUS;
-- we'll return this value of the OS.
if (IS_OPEN(SKELFILE)) then
CLOSE(SKELFILE);
end if;
if (IS_OPEN(TEMP_ACTION_FILE)) then
DELETE(TEMP_ACTION_FILE);
end if;
if (IS_OPEN(DEF_FILE)) then
DELETE(DEF_FILE);
end if;
if (BACKTRACK_REPORT) then
if (NUM_BACKTRACKING = 0) then
TEXT_IO.PUT_LINE(BACKTRACK_FILE, "No backtracking.");
else
if (FULLTBL) then
INT_IO.PUT(BACKTRACK_FILE, NUM_BACKTRACKING, 0);
TEXT_IO.PUT_LINE(BACKTRACK_FILE,
" backtracking (non-accepting) states.");
else
TEXT_IO.PUT_LINE(BACKTRACK_FILE, "Compressed tables always backtrack."
);
end if;
end if;
CLOSE(BACKTRACK_FILE);
end if;
if (PRINTSTATS) then
ENDTIME := MISC.AFLEX_GETTIME;
TEXT_IO.PUT_LINE(STANDARD_ERROR, "aflex version " & AFLEX_VERSION &
" usage statistics:");
TSTRING.PUT_LINE(STANDARD_ERROR, " started at " & STARTTIME &
", finished at " & ENDTIME);
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, LASTNFA, 0);
TEXT_IO.PUT(STANDARD_ERROR, '/');
INT_IO.PUT(STANDARD_ERROR, CURRENT_MNS, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " NFA states");
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, LASTDFA, 0);
TEXT_IO.PUT(STANDARD_ERROR, '/');
INT_IO.PUT(STANDARD_ERROR, CURRENT_MAX_DFAS, 0);
TEXT_IO.PUT(STANDARD_ERROR, " DFA states (");
INT_IO.PUT(STANDARD_ERROR, TOTNST, 0);
TEXT_IO.PUT(STANDARD_ERROR, " words)");
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUM_RULES - 1, 0);
-- - 1 for def. rule
TEXT_IO.PUT_LINE(STANDARD_ERROR, " rules");
if (NUM_BACKTRACKING = 0) then
TEXT_IO.PUT_LINE(STANDARD_ERROR, " No backtracking");
else
if (FULLTBL) then
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUM_BACKTRACKING, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR,
" backtracking (non-accepting) states");
else
TEXT_IO.PUT_LINE(STANDARD_ERROR, " compressed tables always backtrack"
);
end if;
end if;
if (BOL_NEEDED) then
TEXT_IO.PUT_LINE(STANDARD_ERROR, " Beginning-of-line patterns used");
end if;
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, LASTSC, 0);
TEXT_IO.PUT(STANDARD_ERROR, '/');
INT_IO.PUT(STANDARD_ERROR, CURRENT_MAX_SCS, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " start conditions");
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUMEPS, 0);
TEXT_IO.PUT(STANDARD_ERROR, " epsilon states, ");
INT_IO.PUT(STANDARD_ERROR, EPS2, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " double epsilon states");
if (LASTCCL = 0) then
TEXT_IO.PUT_LINE(STANDARD_ERROR, " no character classes");
else
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, LASTCCL, 0);
TEXT_IO.PUT(STANDARD_ERROR, '/');
INT_IO.PUT(STANDARD_ERROR, CURRENT_MAXCCLS, 0);
TEXT_IO.PUT(STANDARD_ERROR, " character classes needed ");
INT_IO.PUT(STANDARD_ERROR, CCLMAP(LASTCCL) + CCLLEN(LASTCCL), 0);
TEXT_IO.PUT(STANDARD_ERROR, '/');
INT_IO.PUT(STANDARD_ERROR, CURRENT_MAX_CCL_TBL_SIZE, 0);
TEXT_IO.PUT(STANDARD_ERROR, " words of storage, ");
INT_IO.PUT(STANDARD_ERROR, CCLREUSE, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, "reused");
end if;
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUMSNPAIRS, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " state/nextstate pairs created");
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUMUNIQ, 0);
TEXT_IO.PUT(STANDARD_ERROR, '/');
INT_IO.PUT(STANDARD_ERROR, NUMDUP, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " unique/duplicate transitions");
if (FULLTBL) then
TBLSIZ := LASTDFA*NUMECS;
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, TBLSIZ, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " table entries");
else
TBLSIZ := 2*(LASTDFA + NUMTEMPS) + 2*TBLEND;
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, LASTDFA + NUMTEMPS, 0);
TEXT_IO.PUT(STANDARD_ERROR, '/');
INT_IO.PUT(STANDARD_ERROR, CURRENT_MAX_DFAS, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " base-def entries created");
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, TBLEND, 0);
TEXT_IO.PUT(STANDARD_ERROR, '/');
INT_IO.PUT(STANDARD_ERROR, CURRENT_MAX_XPAIRS, 0);
TEXT_IO.PUT(STANDARD_ERROR, " (peak ");
INT_IO.PUT(STANDARD_ERROR, PEAKPAIRS, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, ") nxt-chk entries created");
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUMTEMPS*NUMMECS, 0);
TEXT_IO.PUT(STANDARD_ERROR, '/');
INT_IO.PUT(STANDARD_ERROR, CURRENT_MAX_TEMPLATE_XPAIRS, 0);
TEXT_IO.PUT(STANDARD_ERROR, " (peak ");
INT_IO.PUT(STANDARD_ERROR, NUMTEMPS*NUMECS, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, ") template nxt-chk entries created");
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUMMT, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " empty table entries");
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUMPROTS, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " protos created");
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUMTEMPS, 0);
TEXT_IO.PUT(STANDARD_ERROR, " templates created, ");
INT_IO.PUT(STANDARD_ERROR, TMPUSES, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, "uses");
end if;
if (USEECS) then
TBLSIZ := TBLSIZ + CSIZE;
TEXT_IO.PUT_LINE(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUMECS, 0);
TEXT_IO.PUT(STANDARD_ERROR, '/');
INT_IO.PUT(STANDARD_ERROR, CSIZE, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " equivalence classes created");
end if;
if (USEMECS) then
TBLSIZ := TBLSIZ + NUMECS;
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUMMECS, 0);
TEXT_IO.PUT(STANDARD_ERROR, '/');
INT_IO.PUT(STANDARD_ERROR, CSIZE, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " meta-equivalence classes created");
end if;
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, HSHCOL, 0);
TEXT_IO.PUT(STANDARD_ERROR, " (");
INT_IO.PUT(STANDARD_ERROR, HSHSAVE, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " saved) hash collisions, ");
INT_IO.PUT(STANDARD_ERROR, DFAEQL, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " DFAs equal");
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, NUM_REALLOCS, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " sets of reallocations needed");
TEXT_IO.PUT(STANDARD_ERROR, " ");
INT_IO.PUT(STANDARD_ERROR, TBLSIZ, 0);
TEXT_IO.PUT_LINE(STANDARD_ERROR, " total table entries needed");
end if;
if (STATUS /= 0) then
raise AFLEX_TERMINATE;
end if;
end AFLEXEND;
-- aflexinit - initialize aflex
procedure AFLEXINIT is
use TEXT_IO, TSTRING;
SAWCMPFLAG, USE_STDOUT : BOOLEAN;
OUTPUT_FILE : FILE_TYPE;
INPUT_FILE : FILE_TYPE;
I : INTEGER;
ARG_CNT : INTEGER;
FLAG_POS : INTEGER;
ARG : VSTRING;
SKELNAME : VSTRING;
SKELNAME_USED : BOOLEAN := FALSE;
begin
PRINTSTATS := FALSE;
SYNTAXERROR := FALSE;
TRACE := FALSE;
SPPRDFLT := FALSE;
INTERACTIVE := FALSE;
CASEINS := FALSE;
BACKTRACK_REPORT := FALSE;
PERFORMANCE_REPORT := FALSE;
DDEBUG := FALSE;
FULLTBL := FALSE;
CONTINUED_ACTION := FALSE;
GEN_LINE_DIRS := TRUE;
USEMECS := TRUE;
USEECS := TRUE;
SAWCMPFLAG := FALSE;
USE_STDOUT := FALSE;
-- read flags
COMMAND_LINE_INTERFACE.INITIALIZE_COMMAND_LINE;
-- load up argv
EXTERNAL_FILE_MANAGER.INITIALIZE_FILES;
-- do external files setup
-- loop through the list of arguments
ARG_CNT := 1;
while (ARG_CNT <= ARGC - 1) loop
if ((CHAR(ARGV(ARG_CNT), 1) /= '-') or (LEN(ARGV(ARG_CNT)) < 2)) then
exit;
end if;
-- loop through the flags in this argument.
ARG := ARGV(ARG_CNT);
FLAG_POS := 2;
while (FLAG_POS <= LEN(ARG)) loop
case CHAR(ARG, FLAG_POS) is
when 'b' =>
BACKTRACK_REPORT := TRUE;
when 'd' =>
DDEBUG := TRUE;
when 'f' =>
USEECS := FALSE;
USEMECS := FALSE;
FULLTBL := TRUE;
when 'I' =>
INTERACTIVE := TRUE;
when 'i' =>
CASEINS := TRUE;
when 'L' =>
GEN_LINE_DIRS := FALSE;
when 'p' =>
PERFORMANCE_REPORT := TRUE;
when 'S' =>
if (FLAG_POS /= 2) then
MISC.AFLEXERROR("-S flag must be given separately");
end if;
SKELNAME := SLICE(ARG, FLAG_POS + 1, LEN(ARG));
SKELNAME_USED := TRUE;
goto GET_NEXT_ARG;
when 's' =>
SPPRDFLT := TRUE;
when 't' =>
USE_STDOUT := TRUE;
when 'T' =>
TRACE := TRUE;
when 'v' =>
PRINTSTATS := TRUE;
-- UMASS CODES :
-- Added an flag to indicate whether or not the aflex generated
-- codes will be used by Ayacc extension.
when 'E' =>
Ayacc_Extension_Flag := TRUE;
-- END OF UMASS CODES.
when others =>
MISC.AFLEXERROR("unknown flag " & CHAR(ARG, FLAG_POS));
end case;
FLAG_POS := FLAG_POS + 1;
end loop;
<<GET_NEXT_ARG>> ARG_CNT := ARG_CNT + 1;
-- go on to next argument from list.
end loop;
if (FULLTBL and USEMECS) then
MISC.AFLEXERROR("full table and -cm don't make sense together");
end if;
if (FULLTBL and INTERACTIVE) then
MISC.AFLEXERROR("full table and -I are (currently) incompatible");
end if;
if (ARG_CNT < ARGC) then
begin
if (ARG_CNT - ARGC > 1) then
MISC.AFLEXERROR("extraneous argument(s) given");
end if;
-- Tell aflex where to read input from.
INFILENAME := ARGV(ARG_CNT);
OPEN(INPUT_FILE, IN_FILE, STR(ARGV(ARG_CNT)));
SET_INPUT(INPUT_FILE);
exception
when NAME_ERROR =>
MISC.AFLEXFATAL("can't open " & INFILENAME);
end;
end if;
if (not USE_STDOUT) then
EXTERNAL_FILE_MANAGER.GET_SCANNER_FILE(OUTPUT_FILE);
OUTFILE_CREATED := TRUE;
end if;
if (BACKTRACK_REPORT) then
EXTERNAL_FILE_MANAGER.GET_BACKTRACK_FILE(BACKTRACK_FILE);
end if;
LASTCCL := 0;
LASTSC := 0;
--initialize the statistics
STARTTIME := MISC.AFLEX_GETTIME;
begin
-- open the skeleton file
if (SKELNAME_USED) then
OPEN(SKELFILE, IN_FILE, STR(SKELNAME));
SKELETON_MANAGER.SET_EXTERNAL_SKELETON;
end if;
exception
when USE_ERROR | NAME_ERROR =>
MISC.AFLEXFATAL("couldn't open skeleton file " & SKELNAME);
end;
-- without a third argument create make an anonymous temp file.
begin
CREATE(TEMP_ACTION_FILE, OUT_FILE);
CREATE(DEF_FILE, OUT_FILE);
exception
when USE_ERROR | NAME_ERROR =>
MISC.AFLEXFATAL("can't create temporary file");
end;
LASTDFA := 0;
LASTNFA := 0;
NUM_RULES := 0;
NUMAS := 0;
NUMSNPAIRS := 0;
TMPUSES := 0;
NUMECS := 0;
NUMEPS := 0;
EPS2 := 0;
NUM_REALLOCS := 0;
HSHCOL := 0;
DFAEQL := 0;
TOTNST := 0;
NUMUNIQ := 0;
NUMDUP := 0;
HSHSAVE := 0;
EOFSEEN := FALSE;
DATAPOS := 0;
DATALINE := 0;
NUM_BACKTRACKING := 0;
ONESP := 0;
NUMPROTS := 0;
VARIABLE_TRAILING_CONTEXT_RULES := FALSE;
BOL_NEEDED := FALSE;
LINENUM := 1;
SECTNUM := 1;
FIRSTPROT := NIL;
-- used in mkprot() so that the first proto goes in slot 1
-- of the proto queue
LASTPROT := 1;
if (USEECS) then
-- set up doubly-linked equivalence classes
ECGROUP(1) := NIL;
for CNT in 2 .. CSIZE loop
ECGROUP(CNT) := CNT - 1;
NEXTECM(CNT - 1) := CNT;
end loop;
NEXTECM(CSIZE) := NIL;
else
-- put everything in its own equivalence class
for CNT in 1 .. CSIZE loop
ECGROUP(CNT) := CNT;
NEXTECM(CNT) := BAD_SUBSCRIPT; -- to catch errors
end loop;
end if;
SET_UP_INITIAL_ALLOCATIONS;
end AFLEXINIT;
-- readin - read in the rules section of the input file(s)
procedure READIN is
begin
SKELETON_MANAGER.SKELOUT;
TEXT_IO.PUT("with " & TSTRING.STR(MISC.BASENAME) & "_dfa" & "; ");
TEXT_IO.PUT_LINE("use " & TSTRING.STR(MISC.BASENAME) & "_dfa" & "; ");
TEXT_IO.PUT("with " & TSTRING.STR(MISC.BASENAME) & "_io" & "; ");
TEXT_IO.PUT_LINE("use " & TSTRING.STR(MISC.BASENAME) & "_io" & "; ");
MISC.LINE_DIRECTIVE_OUT;
PARSER.YYPARSE;
if (USEECS) then
ECS.CRE8ECS(NEXTECM, ECGROUP, CSIZE, NUMECS);
ECS.CCL2ECL;
else
NUMECS := CSIZE;
end if;
exception
when PARSE_TOKENS.SYNTAX_ERROR =>
MISC.AFLEXERROR("fatal parse error at line " & INTEGER'IMAGE(LINENUM));
MAIN_BODY.AFLEXEND(1);
end READIN;
-- set_up_initial_allocations - allocate memory for internal tables
procedure SET_UP_INITIAL_ALLOCATIONS is
begin
CURRENT_MNS := INITIAL_MNS;
FIRSTST := ALLOCATE_INTEGER_ARRAY(CURRENT_MNS);
LASTST := ALLOCATE_INTEGER_ARRAY(CURRENT_MNS);
FINALST := ALLOCATE_INTEGER_ARRAY(CURRENT_MNS);
TRANSCHAR := ALLOCATE_INTEGER_ARRAY(CURRENT_MNS);
TRANS1 := ALLOCATE_INTEGER_ARRAY(CURRENT_MNS);
TRANS2 := ALLOCATE_INTEGER_ARRAY(CURRENT_MNS);
ACCPTNUM := ALLOCATE_INTEGER_ARRAY(CURRENT_MNS);
ASSOC_RULE := ALLOCATE_INTEGER_ARRAY(CURRENT_MNS);
STATE_TYPE := ALLOCATE_STATE_ENUM_ARRAY(CURRENT_MNS);
CURRENT_MAX_RULES := INITIAL_MAX_RULES;
RULE_TYPE := ALLOCATE_RULE_ENUM_ARRAY(CURRENT_MAX_RULES);
RULE_LINENUM := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_RULES);
CURRENT_MAX_SCS := INITIAL_MAX_SCS;
SCSET := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_SCS);
SCBOL := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_SCS);
SCXCLU := ALLOCATE_BOOLEAN_ARRAY(CURRENT_MAX_SCS);
SCEOF := ALLOCATE_BOOLEAN_ARRAY(CURRENT_MAX_SCS);
SCNAME := ALLOCATE_VSTRING_ARRAY(CURRENT_MAX_SCS);
ACTVSC := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_SCS);
CURRENT_MAXCCLS := INITIAL_MAX_CCLS;
CCLMAP := ALLOCATE_INTEGER_ARRAY(CURRENT_MAXCCLS);
CCLLEN := ALLOCATE_INTEGER_ARRAY(CURRENT_MAXCCLS);
CCLNG := ALLOCATE_INTEGER_ARRAY(CURRENT_MAXCCLS);
CURRENT_MAX_CCL_TBL_SIZE := INITIAL_MAX_CCL_TBL_SIZE;
CCLTBL := ALLOCATE_CHARACTER_ARRAY(CURRENT_MAX_CCL_TBL_SIZE);
CURRENT_MAX_DFA_SIZE := INITIAL_MAX_DFA_SIZE;
CURRENT_MAX_XPAIRS := INITIAL_MAX_XPAIRS;
NXT := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_XPAIRS);
CHK := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_XPAIRS);
CURRENT_MAX_TEMPLATE_XPAIRS := INITIAL_MAX_TEMPLATE_XPAIRS;
TNXT := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_TEMPLATE_XPAIRS);
CURRENT_MAX_DFAS := INITIAL_MAX_DFAS;
BASE := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_DFAS);
DEF := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_DFAS);
DFASIZ := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_DFAS);
ACCSIZ := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_DFAS);
DHASH := ALLOCATE_INTEGER_ARRAY(CURRENT_MAX_DFAS);
DSS := ALLOCATE_INT_PTR_ARRAY(CURRENT_MAX_DFAS);
DFAACC := ALLOCATE_DFAACC_UNION(CURRENT_MAX_DFAS);
end SET_UP_INITIAL_ALLOCATIONS;
end MAIN_BODY;
| 33.367619 | 107 | 0.609373 |
5052816a6d6ce6771b200fc30dc8c5ada210fe32 | 514 | ads | Ada | source/nodes/program-nodes-discriminant_specification_vectors.ads | reznikmm/gela | 20134f1d154fb763812e73860c6f4b04f353df79 | [
"MIT"
] | null | null | null | source/nodes/program-nodes-discriminant_specification_vectors.ads | reznikmm/gela | 20134f1d154fb763812e73860c6f4b04f353df79 | [
"MIT"
] | null | null | null | source/nodes/program-nodes-discriminant_specification_vectors.ads | reznikmm/gela | 20134f1d154fb763812e73860c6f4b04f353df79 | [
"MIT"
] | 1 | 2019-10-16T09:05:27.000Z | 2019-10-16T09:05:27.000Z | -- SPDX-FileCopyrightText: 2019 Max Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Nodes.Generic_Vectors;
with Program.Elements.Discriminant_Specifications;
package Program.Nodes.Discriminant_Specification_Vectors is new
Program.Nodes.Generic_Vectors
(Program.Elements.Discriminant_Specifications
.Discriminant_Specification_Vector);
pragma Preelaborate (Program.Nodes.Discriminant_Specification_Vectors);
| 36.714286 | 71 | 0.729572 |
df7cd98be42b27de95e01325e8316659adc932af | 1,356 | adb | Ada | src/main.adb | patrickf2000/ada-asm | f340f56077de1eec31da51557ac37ebcd0a11e57 | [
"BSD-3-Clause"
] | null | null | null | src/main.adb | patrickf2000/ada-asm | f340f56077de1eec31da51557ac37ebcd0a11e57 | [
"BSD-3-Clause"
] | null | null | null | src/main.adb | patrickf2000/ada-asm | f340f56077de1eec31da51557ac37ebcd0a11e57 | [
"BSD-3-Clause"
] | null | null | null | with Ada.Text_IO; use Ada.Text_IO;
with Ada.Streams.Stream_IO;
with Parser; use Parser;
with X86Parser; use X86Parser;
with X86Writer; use X86Writer;
with Elf; use Elf;
procedure Main is
package Stream_IO renames Ada.Streams.Stream_IO;
Lines, Data, Code : Parts_Vector.Vector;
instr : Instr_Vector.Vector;
code_size : Integer := 0;
file : Stream_IO.File_Type;
writer : Ada.Streams.Stream_IO.Stream_Access;
file_name : constant String := "first.bin";
begin
Lines := Load_File("./first.asm");
Data := Get_Part(Lines, ".data");
Code := Get_Part(Lines, ".text");
Parser_Debug(Lines);
New_Line;
Put_Line(".data -->");
Parser_Debug(Data);
New_Line;
Put_Line(".text -->");
Parser_Debug(Code);
New_Line;
Put_Line("--------------------------------------------");
New_Line;
instr := Get_Instr_Size(Code);
Instr_Debug(instr);
Put_Line("--------------------------------------------");
New_Line;
instr := Pass1(instr);
code_size := Get_total_Size(instr);
Instr_Debug(instr);
-- Now write (pass 2)
Stream_IO.Create(file, Stream_IO.Out_File, file_name);
writer := Stream_IO.Stream(file);
build_elf(writer, code_size);
assemble(instr, writer);
Stream_IO.Close(file);
end Main;
| 23.37931 | 61 | 0.588496 |
4d07a3a9a3b961a3b2c0c804fe81ffe580de5b39 | 1,728 | ads | Ada | electives/pw/lab/lista-2/ada/node.ads | jerry-sky/academic-notebook | be2d350289441b99168ea40412891bc65b9cb431 | [
"Unlicense"
] | 4 | 2020-12-28T21:53:00.000Z | 2022-03-22T19:24:47.000Z | electives/pw/lab/lista-2/ada/node.ads | jerry-sky/academic-notebook | be2d350289441b99168ea40412891bc65b9cb431 | [
"Unlicense"
] | 3 | 2022-02-13T18:07:10.000Z | 2022-02-13T18:16:07.000Z | electives/pw/lab/lista-2/ada/node.ads | jerry-sky/academic-notebook | be2d350289441b99168ea40412891bc65b9cb431 | [
"Unlicense"
] | 4 | 2020-12-28T16:05:35.000Z | 2022-03-08T16:20:00.000Z | with Ada.Numerics.Float_Random;
with RandInt;
with Logger;
with External; use External;
with Receiver;
package Node is
package RAF renames Ada.Numerics.Float_Random;
package LOG renames Logger;
package RAD renames RandInt;
package REC renames Receiver;
type NodeObj;
type pNodeObj is access NodeObj;
type Array_pNodeObj is array (Positive range <>) of pNodeObj;
type pArray_pNodeObj is access Array_pNodeObj;
type Message is record
content: Natural;
health: Natural;
end record;
type pMessage is access Message;
procedure SleepForSomeTime(maxSleep: Natural; intervals: Natural := 1);
task type NodeTask(
self: pNodeObj;
maxSleep: Natural;
logger: LOG.pLoggerReceiver;
isLast: Boolean;
receiver: REC.pReceiverTask
) is
entry SendMessage(message: in pMessage);
entry SetupTrap;
entry Stop;
end NodeTask;
type pNodeTask is access NodeTask;
-- NodeStash sort of simulates what a `chan` in Golang would do
task type NodeStash(
self: pNodeObj
) is
entry SendMessage(message: in pMessage);
entry Stop;
end NodeStash;
type pNodeStash is access NodeStash;
type NodeObj is record
id: Natural;
neighbours: pArray_pNodeObj;
nodeTask: pNodeTask;
nodeStash: pNodeStash;
end record;
-- grim reaper kills given node
task type NodeTaskGrimReaper(node: pNodeObj);
type pNodeTaskGrimReaper is access NodeTaskGrimReaper;
type Array_pNodeTaskGrimReaper is array (Positive range <>) of pNodeTaskGrimReaper;
type pArray_pNodeTaskGrimReaper is access Array_pNodeTaskGrimReaper;
end Node;
| 25.043478 | 87 | 0.688079 |
1c33aa3fce127f9ab5ff6bfa56247ae49bb789e2 | 3,585 | ads | Ada | 3-mid/impact/source/3d/collision/dispatch/impact-d3-collision-algorithm-activating-compound.ads | charlie5/lace | e9b7dc751d500ff3f559617a6fc3089ace9dc134 | [
"0BSD"
] | 20 | 2015-11-04T09:23:59.000Z | 2022-01-14T10:21:42.000Z | 3-mid/impact/source/3d/collision/dispatch/impact-d3-collision-algorithm-activating-compound.ads | charlie5/lace | e9b7dc751d500ff3f559617a6fc3089ace9dc134 | [
"0BSD"
] | 2 | 2015-11-04T17:05:56.000Z | 2015-12-08T03:16:13.000Z | 3-mid/impact/source/3d/collision/dispatch/impact-d3-collision-algorithm-activating-compound.ads | charlie5/lace | e9b7dc751d500ff3f559617a6fc3089ace9dc134 | [
"0BSD"
] | 1 | 2015-12-07T12:53:52.000Z | 2015-12-07T12:53:52.000Z | with impact.d3.collision.Algorithm.activating,
impact.d3.collision.Algorithm,
impact.d3.Object,
impact.d3.collision.create_Func,
impact.d3.Dispatcher,
impact.d3.collision.manifold_Result,
impact.d3.Manifold;
private
with ada.containers.Vectors;
package impact.d3.collision.Algorithm.activating.compound
--
-- impact.d3.collision.Algorithm.activating.compound supports collision between CompoundCollisionShapes and other collision shapes
--
is
type Item is new impact.d3.collision.Algorithm.activating.item with private;
function to_compound_Algorithm (ci : in AlgorithmConstructionInfo;
body0, body1 : access impact.d3.Object.item'Class;
isSwapped : in Boolean ) return Item'Class;
overriding procedure destruct (Self : in out Item);
overriding procedure processCollision (Self : in out Item; body0, body1 : access impact.d3.Object.item'Class;
dispatchInfo : in impact.d3.Dispatcher.DispatcherInfo;
resultOut : out impact.d3.collision.manifold_Result.item);
overriding function calculateTimeOfImpact (Self : in Item; body0, body1 : access impact.d3.Object.item'Class;
dispatchInfo : in impact.d3.Dispatcher.DispatcherInfo;
resultOut : access impact.d3.collision.manifold_Result.item) return math.Real;
overriding
procedure getAllContactManifolds (Self : in out Item; manifoldArray : out impact.d3.collision.Algorithm.btManifoldArray);
-- procedure clearCache (Self : in out Item);
--- Create Functions
--
type CreateFunc is new create_Func.item with null record;
overriding
function CreateCollisionAlgorithm (Self : in CreateFunc; ci : in AlgorithmConstructionInfo;
body0, body1 : access impact.d3.Object.item'Class) return impact.d3.Dispatcher.Algorithm_view;
type SwappedCreateFunc is new create_Func.item with null record;
overriding
function CreateCollisionAlgorithm (Self : in SwappedCreateFunc; ci : in AlgorithmConstructionInfo;
body0, body1 : access impact.d3.Object.item'Class) return impact.d3.Dispatcher.Algorithm_view;
private
type collision_algorithm_View is access all impact.d3.collision.Algorithm.item'Class;
package collision_algorithm_Vectors is new ada.containers.Vectors (Positive, collision_algorithm_View);
subtype collision_algorithm_Vector is collision_algorithm_Vectors.Vector;
type Item is new impact.d3.collision.Algorithm.activating.item with
record
m_isSwapped : Boolean;
m_childCollisionAlgorithms : collision_algorithm_Vector;
m_sharedManifold : access impact.d3.Manifold.item;
m_ownsManifold : Boolean;
m_compoundShapeRevision : Integer; -- To keep track of changes, so that childAlgorithm array can be updated.
end record;
procedure removeChildAlgorithms (Self : in out Item);
procedure preallocateChildAlgorithms (Self : in out Item; body0, body1 : access impact.d3.Object.item'Class);
end impact.d3.collision.Algorithm.activating.compound;
| 31.447368 | 163 | 0.639052 |
df2e276f57241ee463c754e7968d1f671af08c7f | 4,411 | ads | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-chacon.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-chacon.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-chacon.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . C H A R A C T E R S . C O N V E R S I O N S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2005-2020, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package Ada.Characters.Conversions is
pragma Pure;
function Is_Character (Item : Wide_Character) return Boolean;
function Is_String (Item : Wide_String) return Boolean;
function Is_Character (Item : Wide_Wide_Character) return Boolean;
function Is_String (Item : Wide_Wide_String) return Boolean;
function Is_Wide_Character (Item : Wide_Wide_Character) return Boolean;
function Is_Wide_String (Item : Wide_Wide_String) return Boolean;
function To_Wide_Character (Item : Character) return Wide_Character;
function To_Wide_String (Item : String) return Wide_String;
function To_Wide_Wide_Character
(Item : Character) return Wide_Wide_Character;
function To_Wide_Wide_String
(Item : String) return Wide_Wide_String;
function To_Wide_Wide_Character
(Item : Wide_Character) return Wide_Wide_Character;
function To_Wide_Wide_String
(Item : Wide_String) return Wide_Wide_String;
function To_Character
(Item : Wide_Character;
Substitute : Character := ' ') return Character;
function To_String
(Item : Wide_String;
Substitute : Character := ' ') return String;
function To_Character
(Item : Wide_Wide_Character;
Substitute : Character := ' ') return Character;
function To_String
(Item : Wide_Wide_String;
Substitute : Character := ' ') return String;
function To_Wide_Character
(Item : Wide_Wide_Character;
Substitute : Wide_Character := ' ') return Wide_Character;
function To_Wide_String
(Item : Wide_Wide_String;
Substitute : Wide_Character := ' ') return Wide_String;
end Ada.Characters.Conversions;
| 50.701149 | 78 | 0.514396 |
4d2cfc68e75cb7c88e7952a5eb27a079f8721820 | 1,032 | ads | Ada | specs/ada/common/tkmrpc-response-cfg-tkm_reset.ads | DrenfongWong/tkm-rpc | 075d22871cf81d497aac656c7f03a513278b641c | [
"BSD-3-Clause"
] | null | null | null | specs/ada/common/tkmrpc-response-cfg-tkm_reset.ads | DrenfongWong/tkm-rpc | 075d22871cf81d497aac656c7f03a513278b641c | [
"BSD-3-Clause"
] | null | null | null | specs/ada/common/tkmrpc-response-cfg-tkm_reset.ads | DrenfongWong/tkm-rpc | 075d22871cf81d497aac656c7f03a513278b641c | [
"BSD-3-Clause"
] | null | null | null | with Tkmrpc.Types;
with Tkmrpc.Operations.Cfg;
package Tkmrpc.Response.Cfg.Tkm_Reset is
Data_Size : constant := 0;
Padding_Size : constant := Response.Body_Size - Data_Size;
subtype Padding_Range is Natural range 1 .. Padding_Size;
subtype Padding_Type is Types.Byte_Sequence (Padding_Range);
type Response_Type is record
Header : Response.Header_Type;
Padding : Padding_Type;
end record;
for Response_Type use record
Header at 0 range 0 .. (Response.Header_Size * 8) - 1;
Padding at Response.Header_Size + Data_Size range
0 .. (Padding_Size * 8) - 1;
end record;
for Response_Type'Size use Response.Response_Size * 8;
Null_Response : constant Response_Type :=
Response_Type'
(Header =>
Response.Header_Type'(Operation => Operations.Cfg.Tkm_Reset,
Result => Results.Invalid_Operation,
Request_Id => 0),
Padding => Padding_Type'(others => 0));
end Tkmrpc.Response.Cfg.Tkm_Reset;
| 31.272727 | 67 | 0.66376 |
1035042fd20d52fdc3ae3fc2e25f2879ce817d1c | 6,246 | adb | Ada | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack31.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack31.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack31.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 3 1 --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
with System.Unsigned_Types;
package body System.Pack_31 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_31;
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_31 --
------------
function Get_31
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_31
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_31;
------------
-- Set_31 --
------------
procedure Set_31
(Arr : System.Address;
N : Natural;
E : Bits_31;
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_31;
end System.Pack_31;
| 39.531646 | 78 | 0.460775 |
20e97d4e21196d41390f3ec3e7e7b208d1962fe2 | 35,090 | adb | Ada | src/gen-model-xmi.adb | My-Colaborations/dynamo | 09704417a23050d5bb52d48a65a14a1c2d926184 | [
"Apache-2.0"
] | null | null | null | src/gen-model-xmi.adb | My-Colaborations/dynamo | 09704417a23050d5bb52d48a65a14a1c2d926184 | [
"Apache-2.0"
] | null | null | null | src/gen-model-xmi.adb | My-Colaborations/dynamo | 09704417a23050d5bb52d48a65a14a1c2d926184 | [
"Apache-2.0"
] | null | null | null | -----------------------------------------------------------------------
-- gen-model-xmi -- UML-XMI model
-- Copyright (C) 2012, 2013, 2015, 2016 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- 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.Tags;
with Util.Strings;
with Util.Log.Loggers;
package body Gen.Model.XMI is
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Gen.Model.XMI");
procedure Append_Message (Into : in out Ada.Strings.Unbounded.Unbounded_String;
Message : in String);
-- ------------------------------
-- Append a message to the error message. A newline is inserted if the buffer contains
-- an existing message.
-- ------------------------------
procedure Append_Message (Into : in out Ada.Strings.Unbounded.Unbounded_String;
Message : in String) is
begin
if Length (Into) > 0 then
Append (Into, ASCII.LF);
end if;
Append (Into, Message);
end Append_Message;
-- ------------------------------
-- Iterate on the model element of the type <tt>On</tt> and execute the <tt>Process</tt>
-- procedure.
-- ------------------------------
procedure Iterate (Model : in Model_Map.Map;
On : in Element_Type;
Process : not null access procedure (Id : in Unbounded_String;
Node : in Model_Element_Access)) is
Iter : Model_Map_Cursor := Model.First;
begin
while Has_Element (Iter) loop
declare
Node : constant Model_Element_Access := Element (Iter);
begin
if Node.Get_Type = On then
Process (Model_Map.Key (Iter), Node);
end if;
end;
Next (Iter);
end loop;
end Iterate;
-- ------------------------------
-- Iterate over the model elements of the list.
-- ------------------------------
procedure Iterate_Elements (Closure : in out T;
List : in Model_Vector;
Process : not null access
procedure (Closure : in out T;
Node : in Model_Element_Access)) is
Iter : Model_Cursor := List.First;
begin
while Model_Vectors.Has_Element (Iter) loop
Process (Closure, Model_Vectors.Element (Iter));
Model_Vectors.Next (Iter);
end loop;
end Iterate_Elements;
-- ------------------------------
-- Find the model element with the given XMI id or given name.
-- Returns null if the model element is not found.
-- ------------------------------
function Find (Model : in Model_Map.Map;
Key : in String;
Mode : in Search_Type := BY_ID) return Model_Element_Access is
begin
if Mode = BY_ID then
declare
Pos : constant Model_Map_Cursor := Model.Find (To_Unbounded_String (Key));
begin
if Has_Element (Pos) then
return Element (Pos);
else
Log.Error ("Model element id '{0}' not found", Key);
return null;
end if;
end;
else
declare
Iter : Model_Map_Cursor := Model.First;
Pos : Natural;
begin
if Key (Key'First) /= '@' then
Pos := Util.Strings.Index (Key, '.');
else
Pos := 0;
end if;
while Has_Element (Iter) loop
declare
Node : Model_Element_Access := Element (Iter);
begin
-- Find in the package only. If there is no '.', check the package name only.
if Node.Get_Type = XMI_PACKAGE then
if Pos = 0 and Node.Name = Key then
return Node;
end if;
-- Check that the package name matches and look in it.
if Pos > 0 and then Node.Name = Key (Key'First .. Pos - 1) then
Node := Node.Find (Key (Pos + 1 .. Key'Last));
if Node /= null then
return Node;
end if;
end if;
end if;
end;
Next (Iter);
end loop;
end;
return null;
end if;
end Find;
-- ------------------------------
-- Find from the model file identified by <tt>Name</tt>, the model element with the
-- identifier or name represented by <tt>Key</tt>.
-- Returns null if the model element is not found.
-- ------------------------------
function Find_Element (Model : in UML_Model;
Name : in String;
Key : in String;
Mode : in Search_Type := BY_ID)
return Element_Type_Access is
Model_Pos : constant UML_Model_Map.Cursor := Model.Find (To_Unbounded_String (Name));
Item : Model_Element_Access;
begin
if UML_Model_Map.Has_Element (Model_Pos) then
if Mode = BY_ID or Mode = BY_NAME then
Item := Find (UML_Model_Map.Element (Model_Pos), Key, Mode);
else
declare
Iter : Model_Map_Cursor := UML_Model_Map.Element (Model_Pos).First;
begin
while Has_Element (Iter) loop
declare
Node : constant Model_Element_Access := Element (Iter);
begin
if Node.all in Element_Type'Class and then Node.Name = Key then
return Element_Type'Class (Node.all)'Access;
end if;
end;
Next (Iter);
end loop;
end;
end if;
if Item = null then
Log.Error ("The model file {0} does not define {1}",
Name, Key);
return null;
end if;
if not (Item.all in Element_Type'Class) then
Log.Error ("The model file {0} defines the element {1}",
Name, Key);
return null;
end if;
return Element_Type'Class (Item.all)'Access;
else
Log.Error ("Model file {0} not found", Name);
return null;
end if;
end Find_Element;
-- ------------------------------
-- Find the model element within all loaded UML models.
-- Returns null if the model element is not found.
-- ------------------------------
function Find (Model : in UML_Model;
Current : in Model_Map.Map;
Id : in Ada.Strings.Unbounded.Unbounded_String)
return Model_Element_Access is
Pos : constant Natural := Index (Id, "#");
First : Natural;
begin
if Pos = 0 then
return Find (Current, To_String (Id));
end if;
First := Index (Id, "/", Pos, Ada.Strings.Backward);
if First = 0 then
First := 1;
else
First := First + 1;
end if;
declare
Len : constant Natural := Length (Id);
Name : constant Unbounded_String := Unbounded_Slice (Id, First, Pos - 1);
Model_Pos : constant UML_Model_Map.Cursor := Model.Find (Name);
begin
if UML_Model_Map.Has_Element (Model_Pos) then
return Find (UML_Model_Map.Element (Model_Pos),
Slice (Id, Pos + 1, Len));
else
Log.Error ("Model element {0} not found", To_String (Id));
return null;
end if;
end;
end Find;
-- ------------------------------
-- Dump the XMI model elements.
-- ------------------------------
procedure Dump (Map : in Model_Map.Map) is
Iter : Model_Map_Cursor := Map.First;
begin
while Has_Element (Iter) loop
Element (Iter).Dump;
Next (Iter);
end loop;
end Dump;
-- ------------------------------
-- Reconcile all the UML model elements by resolving all the references to UML elements.
-- ------------------------------
procedure Reconcile (Model : in out UML_Model;
Debug : in Boolean := False) is
procedure Reconcile_Model (Key : in Ada.Strings.Unbounded.Unbounded_String;
Map : in out Model_Map.Map);
procedure Reconcile_Model (Key : in Ada.Strings.Unbounded.Unbounded_String;
Map : in out Model_Map.Map) is
pragma Unreferenced (Key);
Iter : Model_Map_Cursor := Map.First;
begin
while Has_Element (Iter) loop
declare
Node : constant Model_Element_Access := Element (Iter);
begin
Node.Reconcile (Model);
end;
Next (Iter);
end loop;
if Debug then
Gen.Model.XMI.Dump (Map);
end if;
end Reconcile_Model;
Iter : UML_Model_Map.Cursor := Model.First;
begin
while UML_Model_Map.Has_Element (Iter) loop
UML_Model_Map.Update_Element (Model, Iter, Reconcile_Model'Access);
UML_Model_Map.Next (Iter);
end loop;
end Reconcile;
-- ------------------------------
-- Reconcile the element by resolving the references to other elements in the model.
-- ------------------------------
procedure Reconcile (Node : in out Model_Element;
Model : in UML_Model) is
Iter : Model_Cursor := Node.Stereotypes.First;
begin
while Model_Vectors.Has_Element (Iter) loop
Model_Vectors.Element (Iter).Reconcile (Model);
Model_Vectors.Next (Iter);
end loop;
end Reconcile;
-- ------------------------------
-- Find the element with the given name. If the name is a qualified name, navigate
-- down the package/class to find the appropriate element.
-- Returns null if the element was not found.
-- ------------------------------
function Find (Node : in Model_Element;
Name : in String) return Model_Element_Access is
Pos : constant Natural := Util.Strings.Index (Name, '.');
Iter : Model_Cursor;
Item : Model_Element_Access;
begin
if Pos = 0 or Name (Name'First) = '@' then
Iter := Node.Elements.First;
while Model_Vectors.Has_Element (Iter) loop
Item := Model_Vectors.Element (Iter);
if Item.Name = Name then
return Item;
end if;
Model_Vectors.Next (Iter);
end loop;
return null;
else
Item := Node.Find (Name (Name'First .. Pos - 1));
if Item = null then
return null;
end if;
return Item.Find (Name (Pos + 1 .. Name'Last));
end if;
end Find;
-- ------------------------------
-- Set the model name.
-- ------------------------------
procedure Set_Name (Node : in out Model_Element;
Value : in Util.Beans.Objects.Object) is
begin
if not Util.Beans.Objects.Is_Null (Value) then
Node.Set_Name (Util.Beans.Objects.To_Unbounded_String (Value));
end if;
end Set_Name;
-- ------------------------------
-- Set the model XMI unique id.
-- ------------------------------
procedure Set_XMI_Id (Node : in out Model_Element;
Value : in Util.Beans.Objects.Object) is
begin
Node.XMI_Id := Util.Beans.Objects.To_Unbounded_String (Value);
end Set_XMI_Id;
-- ------------------------------
-- Validate the node definition as much as we can before the reconcile phase.
-- If an error is detected, return a message. Returns an empty string if everything is ok.
-- ------------------------------
function Get_Error_Message (Node : in Model_Element) return String is
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
if Length (Node.XMI_Id) = 0 then
Append (Result, "the 'xmi.id' attribute is empty");
end if;
return To_String (Result);
end Get_Error_Message;
-- ------------------------------
-- Dump the node to get some debugging description about it.
-- ------------------------------
procedure Dump (Node : in Model_Element) is
begin
Log.Info ("XMI {0} - {2}: {1}",
Element_Type'Image (Model_Element'Class (Node).Get_Type),
To_String (Node.XMI_Id), To_String (Node.Name));
if Node.Parent /= null then
Log.Info (" Parent: {0} ({1})", To_String (Node.Parent.Name),
Element_Type'Image (Node.Parent.Get_Type));
end if;
declare
Iter : Model_Cursor := Node.Tagged_Values.First;
Tag : Tagged_Value_Element_Access;
begin
while Model_Vectors.Has_Element (Iter) loop
Tag := Tagged_Value_Element'Class (Model_Vectors.Element (Iter).all)'Access;
if Tag.Tag_Def /= null then
Log.Info (" Tag: {0} = {1}",
To_String (Tag.Tag_Def.Name),
To_String (Tag.Value));
else
Log.Info (" Undef tag: {0} = {1}",
To_String (Tag.XMI_Id), To_String (Tag.Value));
end if;
Model_Vectors.Next (Iter);
end loop;
end;
declare
Stereotype : Model_Cursor := Node.Stereotypes.First;
begin
while Model_Vectors.Has_Element (Stereotype) loop
Log.Info (" Stereotype: <<{0}>>: {1}",
To_String (Model_Vectors.Element (Stereotype).Name),
To_String (Model_Vectors.Element (Stereotype).XMI_Id));
Model_Vectors.Next (Stereotype);
end loop;
end;
end Dump;
-- ------------------------------
-- Find the tag value element with the given name.
-- Returns null if there is no such tag.
-- ------------------------------
function Find_Tag_Value (Node : in Model_Element;
Name : in String) return Tagged_Value_Element_Access is
Pos : Model_Cursor := Node.Tagged_Values.First;
Tag : Model_Element_Access;
begin
while Model_Vectors.Has_Element (Pos) loop
Tag := Model_Vectors.Element (Pos);
if Tag.Name = Name then
return Tagged_Value_Element'Class (Tag.all)'Access;
end if;
Model_Vectors.Next (Pos);
end loop;
return null;
end Find_Tag_Value;
-- ------------------------------
-- Find the tag value associated with the given tag definition.
-- Returns the tag value if it was found, otherwise returns the default
-- ------------------------------
function Find_Tag_Value (Node : in Model_Element;
Definition : in Tag_Definition_Element_Access;
Default : in String := "") return String is
Pos : Model_Cursor := Node.Tagged_Values.First;
Tag : Model_Element_Access;
begin
while Model_Vectors.Has_Element (Pos) loop
Tag := Model_Vectors.Element (Pos);
if Tag.all in Tagged_Value_Element'Class and then
Tagged_Value_Element'Class (Tag.all).Tag_Def = Definition
then
return Ada.Strings.Unbounded.To_String (Tagged_Value_Element'Class (Tag.all).Value);
end if;
Model_Vectors.Next (Pos);
end loop;
return Default;
end Find_Tag_Value;
-- ------------------------------
-- Get the documentation and comment associated with the model element.
-- Returns the empty string if there is no comment.
-- ------------------------------
function Get_Comment (Node : in Model_Element) return String is
procedure Collect_Comment (Id : in Unbounded_String;
Item : in Model_Element_Access);
Doc : constant Tagged_Value_Element_Access := Node.Find_Tag_Value (TAG_DOCUMENTATION);
Result : Ada.Strings.Unbounded.Unbounded_String;
procedure Collect_Comment (Id : in Unbounded_String;
Item : in Model_Element_Access) is
pragma Unreferenced (Id);
Comment : constant Comment_Element_Access := Comment_Element'Class (Item.all)'Access;
begin
if Comment.Ref_Id = Node.XMI_Id then
Ada.Strings.Unbounded.Append (Result, Comment.Text);
end if;
end Collect_Comment;
begin
Iterate (Node.Model.all, XMI_COMMENT, Collect_Comment'Access);
if Doc /= null then
Ada.Strings.Unbounded.Append (Result, Doc.Value);
end if;
return Ada.Strings.Unbounded.To_String (Result);
end Get_Comment;
-- ------------------------------
-- Get the full qualified name for the element.
-- ------------------------------
function Get_Qualified_Name (Node : in Model_Element) return String is
begin
if Node.Parent /= null then
return Node.Parent.Get_Qualified_Name & "." & To_String (Node.Name);
else
return To_String (Node.Name);
end if;
end Get_Qualified_Name;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Ref_Type_Element) return Element_Type is
begin
if Node.Ref /= null then
return Node.Ref.Get_Type;
else
return XMI_UNKNOWN;
end if;
end Get_Type;
-- ------------------------------
-- Reconcile the element by resolving the references to other elements in the model.
-- ------------------------------
overriding
procedure Reconcile (Node : in out Ref_Type_Element;
Model : in UML_Model) is
Item : constant Model_Element_Access := Find (Model, Node.Model.all, Node.Ref_Id);
begin
if Item /= null then
Node.Set_Name (Item.Name);
Node.Ref := Item;
Node.XMI_Id := Item.XMI_Id;
end if;
Model_Element (Node).Reconcile (Model);
end Reconcile;
-- ------------------------------
-- Set the reference id and collect in the profiles set the UML profiles that must
-- be loaded to get the reference.
-- ------------------------------
procedure Set_Reference_Id (Node : in out Ref_Type_Element;
Ref : in String;
Profiles : in out Util.Strings.Sets.Set) is
Pos : constant Natural := Util.Strings.Index (Ref, '#');
begin
Node.Ref_Id := To_Unbounded_String (Ref);
if Pos > 0 then
declare
First : constant Natural := Util.Strings.Rindex (Ref, '/', Pos);
begin
Profiles.Include (Ref (First + 1 .. Pos - 1));
end;
end if;
end Set_Reference_Id;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Data_Type_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_DATA_TYPE;
end Get_Type;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Enum_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_ENUMERATION;
end Get_Type;
-- ------------------------------
-- Validate the node definition as much as we can before the reconcile phase.
-- An enum must not be empty, it must have at least one literal.
-- If an error is detected, return a message. Returns an empty string if everything is ok.
-- ------------------------------
overriding
function Get_Error_Message (Node : in Enum_Element) return String is
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
Append (Result, Model_Element (Node).Get_Error_Message);
if Node.Elements.Is_Empty then
Append_Message (Result, "the enum '" & To_String (Node.Name) & "' is empty.");
end if;
return To_String (Result);
end Get_Error_Message;
-- ------------------------------
-- Create an enum literal and add it to the enum.
-- ------------------------------
procedure Add_Literal (Node : in out Enum_Element;
Id : in Util.Beans.Objects.Object;
Name : in Util.Beans.Objects.Object;
Literal : out Literal_Element_Access) is
begin
Literal := new Literal_Element (Node.Model);
Literal.XMI_Id := Util.Beans.Objects.To_Unbounded_String (Id);
Literal.Set_Name (Util.Beans.Objects.To_Unbounded_String (Name));
Node.Elements.Append (Literal.all'Access);
end Add_Literal;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Literal_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_ENUMERATION_LITERAL;
end Get_Type;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Stereotype_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_STEREOTYPE;
end Get_Type;
-- ------------------------------
-- Returns True if the model element has the stereotype with the given name.
-- ------------------------------
function Has_Stereotype (Node : in Model_Element'Class;
Stereotype : in Stereotype_Element_Access) return Boolean is
Iter : Model_Cursor := Node.Stereotypes.First;
begin
if Stereotype = null then
return False;
end if;
while Model_Vectors.Has_Element (Iter) loop
declare
S : constant Model_Element_Access := Model_Vectors.Element (Iter);
begin
if S = Stereotype.all'Access then
return True;
end if;
if S.XMI_Id = Stereotype.XMI_Id then
return True;
end if;
end;
Model_Vectors.Next (Iter);
end loop;
return False;
end Has_Stereotype;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Comment_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_COMMENT;
end Get_Type;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Operation_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_OPERATION;
end Get_Type;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Attribute_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_ATTRIBUTE;
end Get_Type;
-- ------------------------------
-- Reconcile the element by resolving the references to other elements in the model.
-- ------------------------------
overriding
procedure Reconcile (Node : in out Attribute_Element;
Model : in UML_Model) is
Item : Model_Element_Access;
begin
if Length (Node.Ref_Id) = 0 then
return;
end if;
Item := Find (Model, Node.Model.all, Node.Ref_Id);
Model_Element (Node).Reconcile (Model);
if Item = null then
return;
end if;
if not (Item.all in Data_Type_Element'Class) then
Log.Error ("Invalid data type {0}", To_String (Node.Ref_Id));
return;
end if;
Node.Data_Type := Data_Type_Element'Class (Item.all)'Access;
end Reconcile;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Parameter_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_PARAMETER;
end Get_Type;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Association_End_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_ASSOCIATION_END;
end Get_Type;
-- ------------------------------
-- Get the documentation and comment associated with the model element.
-- Integrates the comment from the association itself as well as this association end.
-- Returns the empty string if there is no comment.
-- ------------------------------
overriding
function Get_Comment (Node : in Association_End_Element) return String is
Comment : constant String := Model_Element (Node).Get_Comment;
Association_Comment : constant String := Node.Parent.Get_Comment;
begin
if Association_Comment'Length = 0 then
return Comment;
elsif Comment'Length = 0 then
return Association_Comment;
else
return Association_Comment & ASCII.LF & Comment;
end if;
end Get_Comment;
-- ------------------------------
-- Reconcile the element by resolving the references to other elements in the model.
-- ------------------------------
overriding
procedure Reconcile (Node : in out Association_End_Element;
Model : in UML_Model) is
begin
Model_Element (Node).Reconcile (Model);
end Reconcile;
-- ------------------------------
-- Make the association between the two ends.
-- ------------------------------
procedure Make_Association (From : in out Association_End_Element;
To : in out Association_End_Element'Class;
Model : in UML_Model) is
Target : Model_Element_Access;
Source : Model_Element_Access;
begin
Log.Info ("Reconcile association {0} - {1}",
To_String (From.Name), To_String (To.Name));
Target := Find (Model, From.Model.all, To.Ref_Id);
if Target = null then
Log.Error ("Association end {0} not found", To_String (From.Name));
return;
end if;
Source := Find (Model, From.Model.all, From.Ref_Id);
if Source = null then
Log.Error ("Association end {0} not found", To_String (To.Name));
return;
end if;
if From.Navigable then
Class_Element'Class (Target.all).Associations.Append (From'Unchecked_Access);
From.Target_Element := Target.all'Access;
From.Source_Element := Source.all'Access;
Log.Info ("Class {0} { {1}: {2} }",
To_String (Target.Name),
To_String (From.Name),
To_String (Source.Name));
if Length (From.Name) = 0 then
Log.Error ("Class {0}: missing association end name to class {1}",
To_String (Target.Name), To_String (Source.Name));
end if;
end if;
end Make_Association;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Association_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_ASSOCIATION;
end Get_Type;
-- ------------------------------
-- Validate the node definition as much as we can before the reconcile phase.
-- An association must contain two ends and a name is necessary on the navigable ends.
-- If an error is detected, return a message. Returns an empty string if everything is ok.
-- ------------------------------
overriding
function Get_Error_Message (Node : in Association_Element) return String is
use type Ada.Containers.Count_Type;
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
Append (Result, Model_Element (Node).Get_Error_Message);
if Length (Node.Name) = 0 then
Append_Message (Result, "Association has an empty name.");
end if;
if Node.Connections.Length = 2 then
declare
First, Second : Association_End_Element_Access;
begin
First := Association_End_Element'Class (Node.Connections.Element (1).all)'Access;
Second := Association_End_Element'Class (Node.Connections.Element (2).all)'Access;
if First.Navigable and Length (First.Name) = 0 then
Append_Message (Result, "Association '" & To_String (Node.Name) &
"' has a navigable association end with an empty name.");
end if;
if Second.Navigable and Length (Second.Name) = 0 then
Append_Message (Result, "Association '" & To_String (Node.Name) &
"' has a navigable association end with an empty name.");
end if;
if not First.Navigable and not Second.Navigable then
Append_Message (Result, "Association '" & To_String (Node.Name) &
"' has no navigable association ends.");
end if;
end;
elsif Node.Connections.Length /= 0 then
Append_Message (Result, "Association '" & To_String (Node.Name)
& "' needs 2 association ends");
end if;
return To_String (Result);
end Get_Error_Message;
-- ------------------------------
-- Reconcile the association between classes in the package. Find the association
-- ends and add the necessary links to the corresponding class elements.
-- ------------------------------
overriding
procedure Reconcile (Node : in out Association_Element;
Model : in UML_Model) is
use type Ada.Containers.Count_Type;
begin
Model_Element (Node).Reconcile (Model);
if Node.Connections.Length >= 2 then
declare
First, Second : Association_End_Element_Access;
begin
First := Association_End_Element'Class (Node.Connections.Element (1).all)'Access;
Second := Association_End_Element'Class (Node.Connections.Element (2).all)'Access;
First.Make_Association (Second.all, Model);
Second.Make_Association (First.all, Model);
end;
elsif Node.Connections.Length > 0 then
Log.Info ("Association {0} needs 2 association ends", To_String (Node.Name));
end if;
end Reconcile;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Generalization_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_GENERALIZATION;
end Get_Type;
-- ------------------------------
-- Reconcile the association between classes in the package. Find the association
-- ends and add the necessary links to the corresponding class elements.
-- ------------------------------
overriding
procedure Reconcile (Node : in out Generalization_Element;
Model : in UML_Model) is
begin
Ref_Type_Element (Node).Reconcile (Model);
Node.Child_Class := Find (Model, Node.Model.all, Node.Child_Id);
if Node.Child_Class /= null then
if Node.Child_Class.all in Class_Element'Class then
Class_Element'Class (Node.Child_Class.all).Parent_Class := Node'Unchecked_Access;
end if;
end if;
end Reconcile;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Tagged_Value_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_TAGGED_VALUE;
end Get_Type;
-- ------------------------------
-- Reconcile the element by resolving the references to other elements in the model.
-- ------------------------------
overriding
procedure Reconcile (Node : in out Tagged_Value_Element;
Model : in UML_Model) is
Item : constant Model_Element_Access := Find (Model, Node.Model.all, Node.Ref_Id);
begin
Model_Element (Node).Reconcile (Model);
if Item /= null then
Node.Set_Name (Item.Name);
if not (Item.all in Tag_Definition_Element'Class) then
Log.Error ("Element {0} is not a tag definition. Tag is {1}, reference is {2}",
Ada.Strings.Unbounded.To_String (Item.Name),
Ada.Tags.Expanded_Name (Item'Tag),
Ada.Strings.Unbounded.To_String (Node.Ref_Id));
else
Node.Tag_Def := Tag_Definition_Element'Class (Item.all)'Access;
end if;
end if;
end Reconcile;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Tag_Definition_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_TAG_DEFINITION;
end Get_Type;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Class_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_CLASS;
end Get_Type;
-- ------------------------------
-- Reconcile the element by resolving the references to other elements in the model.
-- ------------------------------
overriding
procedure Reconcile (Node : in out Class_Element;
Model : in UML_Model) is
begin
if Node.Parent_Class /= null then
Node.Parent_Class.Reconcile (Model);
end if;
Data_Type_Element (Node).Reconcile (Model);
end Reconcile;
-- ------------------------------
-- Get the element type.
-- ------------------------------
overriding
function Get_Type (Node : in Package_Element) return Element_Type is
pragma Unreferenced (Node);
begin
return XMI_PACKAGE;
end Get_Type;
end Gen.Model.XMI;
| 37.569593 | 97 | 0.537646 |
4d17cbb1b2ac1fd16006e60e79535e50a49965d3 | 665 | ads | Ada | ada-strings-wide_wide_unbounded-wide_wide_hash.ads | mgrojo/adalib | dc1355a5b65c2843e702ac76252addb2caf3c56b | [
"BSD-3-Clause"
] | 15 | 2018-07-08T07:09:19.000Z | 2021-11-21T09:58:55.000Z | ada-strings-wide_wide_unbounded-wide_wide_hash.ads | mgrojo/adalib | dc1355a5b65c2843e702ac76252addb2caf3c56b | [
"BSD-3-Clause"
] | 4 | 2019-11-17T20:04:33.000Z | 2021-08-29T21:24:55.000Z | ada-strings-wide_wide_unbounded-wide_wide_hash.ads | mgrojo/adalib | dc1355a5b65c2843e702ac76252addb2caf3c56b | [
"BSD-3-Clause"
] | 3 | 2020-04-23T11:17:11.000Z | 2021-08-29T19:31:09.000Z | -- Standard Ada library specification
-- Copyright (c) 2003-2018 Maxim Reznik <[email protected]>
-- 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;
function Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Hash
(Key : in Unbounded_Wide_Wide_String)
return Ada.Containers.Hash_Type;
pragma Preelaborate (Wide_Wide_Hash);
| 39.117647 | 75 | 0.657143 |
4d4f9594e76faa5bf37bfc0789c6e94c619ff731 | 4,207 | adb | Ada | llvm-gcc-4.2-2.9/gcc/ada/s-stoele.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | 1 | 2016-04-09T02:58:13.000Z | 2016-04-09T02:58:13.000Z | llvm-gcc-4.2-2.9/gcc/ada/s-stoele.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | llvm-gcc-4.2-2.9/gcc/ada/s-stoele.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . S T O R A G E _ E L E M E N T S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Unchecked_Conversion;
package body System.Storage_Elements is
pragma Suppress (All_Checks);
function To_Address is new Unchecked_Conversion (Storage_Offset, Address);
function To_Offset is new Unchecked_Conversion (Address, Storage_Offset);
-- Address arithmetic
function "+" (Left : Address; Right : Storage_Offset) return Address is
begin
return To_Address (To_Integer (Left) + To_Integer (To_Address (Right)));
end "+";
function "+" (Left : Storage_Offset; Right : Address) return Address is
begin
return To_Address (To_Integer (To_Address (Left)) + To_Integer (Right));
end "+";
function "-" (Left : Address; Right : Storage_Offset) return Address is
begin
return To_Address (To_Integer (Left) - To_Integer (To_Address (Right)));
end "-";
function "-" (Left, Right : Address) return Storage_Offset is
begin
return To_Offset (To_Address (To_Integer (Left) - To_Integer (Right)));
end "-";
function "mod"
(Left : Address;
Right : Storage_Offset) return Storage_Offset
is
begin
if Right >= 0 then
return Storage_Offset
(To_Integer (Left) mod Integer_Address (Right));
else
return -Storage_Offset
((-To_Integer (Left)) mod Integer_Address (-Right));
end if;
end "mod";
-- Conversion to/from integers
function To_Address (Value : Integer_Address) return Address is
begin
return Address (Value);
end To_Address;
function To_Integer (Value : Address) return Integer_Address is
begin
return Integer_Address (Value);
end To_Integer;
end System.Storage_Elements;
| 46.230769 | 78 | 0.515332 |
39bff1354506d7eb51d4fa4b3fa169f4458bb54d | 3,227 | ads | Ada | bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/s-pack29.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/s-pack29.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/s-pack29.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 2 9 --
-- --
-- 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 = 29
package System.Pack_29 is
pragma Preelaborate;
Bits : constant := 29;
type Bits_29 is mod 2 ** Bits;
for Bits_29'Size use Bits;
-- In all subprograms below, Rev_SSO is set True if the array has the
-- non-default scalar storage order.
function Get_29
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_29 with Inline;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is extracted and returned.
procedure Set_29
(Arr : System.Address;
N : Natural;
E : Bits_29;
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_29;
| 52.901639 | 78 | 0.388286 |
390ed04b1804c5bc6f786bb7ac327874e49eb930 | 27,749 | ads | Ada | tools-src/gnu/gcc/gcc/ada/i-cobol.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 80 | 2015-01-02T10:14:04.000Z | 2021-06-07T06:29:49.000Z | tools-src/gnu/gcc/gcc/ada/i-cobol.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 9 | 2015-05-14T11:03:12.000Z | 2018-01-04T07:12:58.000Z | tools-src/gnu/gcc/gcc/ada/i-cobol.ads | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 69 | 2015-01-02T10:45:56.000Z | 2021-09-06T07:52:13.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- I N T E R F A C E S . C O B O L --
-- --
-- S p e c --
-- (ASCII Version) --
-- --
-- $Revision$
-- --
-- Copyright (C) 1993-2000 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. --
-- --
------------------------------------------------------------------------------
-- This version of the COBOL interfaces package assumes that the COBOL
-- compiler uses ASCII as its internal representation of characters, i.e.
-- that the type COBOL_Character has the same representation as the Ada
-- type Standard.Character.
package Interfaces.COBOL is
------------------------------------------------------------
-- Types And Operations For Internal Data Representations --
------------------------------------------------------------
type Floating is new Float;
type Long_Floating is new Long_Float;
type Binary is new Integer;
type Long_Binary is new Long_Long_Integer;
Max_Digits_Binary : constant := 9;
Max_Digits_Long_Binary : constant := 18;
type Decimal_Element is mod 16;
type Packed_Decimal is array (Positive range <>) of Decimal_Element;
pragma Pack (Packed_Decimal);
type COBOL_Character is new Character;
Ada_To_COBOL : array (Standard.Character) of COBOL_Character := (
COBOL_Character'Val (000), COBOL_Character'Val (001),
COBOL_Character'Val (002), COBOL_Character'Val (003),
COBOL_Character'Val (004), COBOL_Character'Val (005),
COBOL_Character'Val (006), COBOL_Character'Val (007),
COBOL_Character'Val (008), COBOL_Character'Val (009),
COBOL_Character'Val (010), COBOL_Character'Val (011),
COBOL_Character'Val (012), COBOL_Character'Val (013),
COBOL_Character'Val (014), COBOL_Character'Val (015),
COBOL_Character'Val (016), COBOL_Character'Val (017),
COBOL_Character'Val (018), COBOL_Character'Val (019),
COBOL_Character'Val (020), COBOL_Character'Val (021),
COBOL_Character'Val (022), COBOL_Character'Val (023),
COBOL_Character'Val (024), COBOL_Character'Val (025),
COBOL_Character'Val (026), COBOL_Character'Val (027),
COBOL_Character'Val (028), COBOL_Character'Val (029),
COBOL_Character'Val (030), COBOL_Character'Val (031),
COBOL_Character'Val (032), COBOL_Character'Val (033),
COBOL_Character'Val (034), COBOL_Character'Val (035),
COBOL_Character'Val (036), COBOL_Character'Val (037),
COBOL_Character'Val (038), COBOL_Character'Val (039),
COBOL_Character'Val (040), COBOL_Character'Val (041),
COBOL_Character'Val (042), COBOL_Character'Val (043),
COBOL_Character'Val (044), COBOL_Character'Val (045),
COBOL_Character'Val (046), COBOL_Character'Val (047),
COBOL_Character'Val (048), COBOL_Character'Val (049),
COBOL_Character'Val (050), COBOL_Character'Val (051),
COBOL_Character'Val (052), COBOL_Character'Val (053),
COBOL_Character'Val (054), COBOL_Character'Val (055),
COBOL_Character'Val (056), COBOL_Character'Val (057),
COBOL_Character'Val (058), COBOL_Character'Val (059),
COBOL_Character'Val (060), COBOL_Character'Val (061),
COBOL_Character'Val (062), COBOL_Character'Val (063),
COBOL_Character'Val (064), COBOL_Character'Val (065),
COBOL_Character'Val (066), COBOL_Character'Val (067),
COBOL_Character'Val (068), COBOL_Character'Val (069),
COBOL_Character'Val (070), COBOL_Character'Val (071),
COBOL_Character'Val (072), COBOL_Character'Val (073),
COBOL_Character'Val (074), COBOL_Character'Val (075),
COBOL_Character'Val (076), COBOL_Character'Val (077),
COBOL_Character'Val (078), COBOL_Character'Val (079),
COBOL_Character'Val (080), COBOL_Character'Val (081),
COBOL_Character'Val (082), COBOL_Character'Val (083),
COBOL_Character'Val (084), COBOL_Character'Val (085),
COBOL_Character'Val (086), COBOL_Character'Val (087),
COBOL_Character'Val (088), COBOL_Character'Val (089),
COBOL_Character'Val (090), COBOL_Character'Val (091),
COBOL_Character'Val (092), COBOL_Character'Val (093),
COBOL_Character'Val (094), COBOL_Character'Val (095),
COBOL_Character'Val (096), COBOL_Character'Val (097),
COBOL_Character'Val (098), COBOL_Character'Val (099),
COBOL_Character'Val (100), COBOL_Character'Val (101),
COBOL_Character'Val (102), COBOL_Character'Val (103),
COBOL_Character'Val (104), COBOL_Character'Val (105),
COBOL_Character'Val (106), COBOL_Character'Val (107),
COBOL_Character'Val (108), COBOL_Character'Val (109),
COBOL_Character'Val (110), COBOL_Character'Val (111),
COBOL_Character'Val (112), COBOL_Character'Val (113),
COBOL_Character'Val (114), COBOL_Character'Val (115),
COBOL_Character'Val (116), COBOL_Character'Val (117),
COBOL_Character'Val (118), COBOL_Character'Val (119),
COBOL_Character'Val (120), COBOL_Character'Val (121),
COBOL_Character'Val (122), COBOL_Character'Val (123),
COBOL_Character'Val (124), COBOL_Character'Val (125),
COBOL_Character'Val (126), COBOL_Character'Val (127),
COBOL_Character'Val (128), COBOL_Character'Val (129),
COBOL_Character'Val (130), COBOL_Character'Val (131),
COBOL_Character'Val (132), COBOL_Character'Val (133),
COBOL_Character'Val (134), COBOL_Character'Val (135),
COBOL_Character'Val (136), COBOL_Character'Val (137),
COBOL_Character'Val (138), COBOL_Character'Val (139),
COBOL_Character'Val (140), COBOL_Character'Val (141),
COBOL_Character'Val (142), COBOL_Character'Val (143),
COBOL_Character'Val (144), COBOL_Character'Val (145),
COBOL_Character'Val (146), COBOL_Character'Val (147),
COBOL_Character'Val (148), COBOL_Character'Val (149),
COBOL_Character'Val (150), COBOL_Character'Val (151),
COBOL_Character'Val (152), COBOL_Character'Val (153),
COBOL_Character'Val (154), COBOL_Character'Val (155),
COBOL_Character'Val (156), COBOL_Character'Val (157),
COBOL_Character'Val (158), COBOL_Character'Val (159),
COBOL_Character'Val (160), COBOL_Character'Val (161),
COBOL_Character'Val (162), COBOL_Character'Val (163),
COBOL_Character'Val (164), COBOL_Character'Val (165),
COBOL_Character'Val (166), COBOL_Character'Val (167),
COBOL_Character'Val (168), COBOL_Character'Val (169),
COBOL_Character'Val (170), COBOL_Character'Val (171),
COBOL_Character'Val (172), COBOL_Character'Val (173),
COBOL_Character'Val (174), COBOL_Character'Val (175),
COBOL_Character'Val (176), COBOL_Character'Val (177),
COBOL_Character'Val (178), COBOL_Character'Val (179),
COBOL_Character'Val (180), COBOL_Character'Val (181),
COBOL_Character'Val (182), COBOL_Character'Val (183),
COBOL_Character'Val (184), COBOL_Character'Val (185),
COBOL_Character'Val (186), COBOL_Character'Val (187),
COBOL_Character'Val (188), COBOL_Character'Val (189),
COBOL_Character'Val (190), COBOL_Character'Val (191),
COBOL_Character'Val (192), COBOL_Character'Val (193),
COBOL_Character'Val (194), COBOL_Character'Val (195),
COBOL_Character'Val (196), COBOL_Character'Val (197),
COBOL_Character'Val (198), COBOL_Character'Val (199),
COBOL_Character'Val (200), COBOL_Character'Val (201),
COBOL_Character'Val (202), COBOL_Character'Val (203),
COBOL_Character'Val (204), COBOL_Character'Val (205),
COBOL_Character'Val (206), COBOL_Character'Val (207),
COBOL_Character'Val (208), COBOL_Character'Val (209),
COBOL_Character'Val (210), COBOL_Character'Val (211),
COBOL_Character'Val (212), COBOL_Character'Val (213),
COBOL_Character'Val (214), COBOL_Character'Val (215),
COBOL_Character'Val (216), COBOL_Character'Val (217),
COBOL_Character'Val (218), COBOL_Character'Val (219),
COBOL_Character'Val (220), COBOL_Character'Val (221),
COBOL_Character'Val (222), COBOL_Character'Val (223),
COBOL_Character'Val (224), COBOL_Character'Val (225),
COBOL_Character'Val (226), COBOL_Character'Val (227),
COBOL_Character'Val (228), COBOL_Character'Val (229),
COBOL_Character'Val (230), COBOL_Character'Val (231),
COBOL_Character'Val (232), COBOL_Character'Val (233),
COBOL_Character'Val (234), COBOL_Character'Val (235),
COBOL_Character'Val (236), COBOL_Character'Val (237),
COBOL_Character'Val (238), COBOL_Character'Val (239),
COBOL_Character'Val (240), COBOL_Character'Val (241),
COBOL_Character'Val (242), COBOL_Character'Val (243),
COBOL_Character'Val (244), COBOL_Character'Val (245),
COBOL_Character'Val (246), COBOL_Character'Val (247),
COBOL_Character'Val (248), COBOL_Character'Val (249),
COBOL_Character'Val (250), COBOL_Character'Val (251),
COBOL_Character'Val (252), COBOL_Character'Val (253),
COBOL_Character'Val (254), COBOL_Character'Val (255));
COBOL_To_Ada : array (COBOL_Character) of Standard.Character := (
Standard.Character'Val (000), Standard.Character'Val (001),
Standard.Character'Val (002), Standard.Character'Val (003),
Standard.Character'Val (004), Standard.Character'Val (005),
Standard.Character'Val (006), Standard.Character'Val (007),
Standard.Character'Val (008), Standard.Character'Val (009),
Standard.Character'Val (010), Standard.Character'Val (011),
Standard.Character'Val (012), Standard.Character'Val (013),
Standard.Character'Val (014), Standard.Character'Val (015),
Standard.Character'Val (016), Standard.Character'Val (017),
Standard.Character'Val (018), Standard.Character'Val (019),
Standard.Character'Val (020), Standard.Character'Val (021),
Standard.Character'Val (022), Standard.Character'Val (023),
Standard.Character'Val (024), Standard.Character'Val (025),
Standard.Character'Val (026), Standard.Character'Val (027),
Standard.Character'Val (028), Standard.Character'Val (029),
Standard.Character'Val (030), Standard.Character'Val (031),
Standard.Character'Val (032), Standard.Character'Val (033),
Standard.Character'Val (034), Standard.Character'Val (035),
Standard.Character'Val (036), Standard.Character'Val (037),
Standard.Character'Val (038), Standard.Character'Val (039),
Standard.Character'Val (040), Standard.Character'Val (041),
Standard.Character'Val (042), Standard.Character'Val (043),
Standard.Character'Val (044), Standard.Character'Val (045),
Standard.Character'Val (046), Standard.Character'Val (047),
Standard.Character'Val (048), Standard.Character'Val (049),
Standard.Character'Val (050), Standard.Character'Val (051),
Standard.Character'Val (052), Standard.Character'Val (053),
Standard.Character'Val (054), Standard.Character'Val (055),
Standard.Character'Val (056), Standard.Character'Val (057),
Standard.Character'Val (058), Standard.Character'Val (059),
Standard.Character'Val (060), Standard.Character'Val (061),
Standard.Character'Val (062), Standard.Character'Val (063),
Standard.Character'Val (064), Standard.Character'Val (065),
Standard.Character'Val (066), Standard.Character'Val (067),
Standard.Character'Val (068), Standard.Character'Val (069),
Standard.Character'Val (070), Standard.Character'Val (071),
Standard.Character'Val (072), Standard.Character'Val (073),
Standard.Character'Val (074), Standard.Character'Val (075),
Standard.Character'Val (076), Standard.Character'Val (077),
Standard.Character'Val (078), Standard.Character'Val (079),
Standard.Character'Val (080), Standard.Character'Val (081),
Standard.Character'Val (082), Standard.Character'Val (083),
Standard.Character'Val (084), Standard.Character'Val (085),
Standard.Character'Val (086), Standard.Character'Val (087),
Standard.Character'Val (088), Standard.Character'Val (089),
Standard.Character'Val (090), Standard.Character'Val (091),
Standard.Character'Val (092), Standard.Character'Val (093),
Standard.Character'Val (094), Standard.Character'Val (095),
Standard.Character'Val (096), Standard.Character'Val (097),
Standard.Character'Val (098), Standard.Character'Val (099),
Standard.Character'Val (100), Standard.Character'Val (101),
Standard.Character'Val (102), Standard.Character'Val (103),
Standard.Character'Val (104), Standard.Character'Val (105),
Standard.Character'Val (106), Standard.Character'Val (107),
Standard.Character'Val (108), Standard.Character'Val (109),
Standard.Character'Val (110), Standard.Character'Val (111),
Standard.Character'Val (112), Standard.Character'Val (113),
Standard.Character'Val (114), Standard.Character'Val (115),
Standard.Character'Val (116), Standard.Character'Val (117),
Standard.Character'Val (118), Standard.Character'Val (119),
Standard.Character'Val (120), Standard.Character'Val (121),
Standard.Character'Val (122), Standard.Character'Val (123),
Standard.Character'Val (124), Standard.Character'Val (125),
Standard.Character'Val (126), Standard.Character'Val (127),
Standard.Character'Val (128), Standard.Character'Val (129),
Standard.Character'Val (130), Standard.Character'Val (131),
Standard.Character'Val (132), Standard.Character'Val (133),
Standard.Character'Val (134), Standard.Character'Val (135),
Standard.Character'Val (136), Standard.Character'Val (137),
Standard.Character'Val (138), Standard.Character'Val (139),
Standard.Character'Val (140), Standard.Character'Val (141),
Standard.Character'Val (142), Standard.Character'Val (143),
Standard.Character'Val (144), Standard.Character'Val (145),
Standard.Character'Val (146), Standard.Character'Val (147),
Standard.Character'Val (148), Standard.Character'Val (149),
Standard.Character'Val (150), Standard.Character'Val (151),
Standard.Character'Val (152), Standard.Character'Val (153),
Standard.Character'Val (154), Standard.Character'Val (155),
Standard.Character'Val (156), Standard.Character'Val (157),
Standard.Character'Val (158), Standard.Character'Val (159),
Standard.Character'Val (160), Standard.Character'Val (161),
Standard.Character'Val (162), Standard.Character'Val (163),
Standard.Character'Val (164), Standard.Character'Val (165),
Standard.Character'Val (166), Standard.Character'Val (167),
Standard.Character'Val (168), Standard.Character'Val (169),
Standard.Character'Val (170), Standard.Character'Val (171),
Standard.Character'Val (172), Standard.Character'Val (173),
Standard.Character'Val (174), Standard.Character'Val (175),
Standard.Character'Val (176), Standard.Character'Val (177),
Standard.Character'Val (178), Standard.Character'Val (179),
Standard.Character'Val (180), Standard.Character'Val (181),
Standard.Character'Val (182), Standard.Character'Val (183),
Standard.Character'Val (184), Standard.Character'Val (185),
Standard.Character'Val (186), Standard.Character'Val (187),
Standard.Character'Val (188), Standard.Character'Val (189),
Standard.Character'Val (190), Standard.Character'Val (191),
Standard.Character'Val (192), Standard.Character'Val (193),
Standard.Character'Val (194), Standard.Character'Val (195),
Standard.Character'Val (196), Standard.Character'Val (197),
Standard.Character'Val (198), Standard.Character'Val (199),
Standard.Character'Val (200), Standard.Character'Val (201),
Standard.Character'Val (202), Standard.Character'Val (203),
Standard.Character'Val (204), Standard.Character'Val (205),
Standard.Character'Val (206), Standard.Character'Val (207),
Standard.Character'Val (208), Standard.Character'Val (209),
Standard.Character'Val (210), Standard.Character'Val (211),
Standard.Character'Val (212), Standard.Character'Val (213),
Standard.Character'Val (214), Standard.Character'Val (215),
Standard.Character'Val (216), Standard.Character'Val (217),
Standard.Character'Val (218), Standard.Character'Val (219),
Standard.Character'Val (220), Standard.Character'Val (221),
Standard.Character'Val (222), Standard.Character'Val (223),
Standard.Character'Val (224), Standard.Character'Val (225),
Standard.Character'Val (226), Standard.Character'Val (227),
Standard.Character'Val (228), Standard.Character'Val (229),
Standard.Character'Val (230), Standard.Character'Val (231),
Standard.Character'Val (232), Standard.Character'Val (233),
Standard.Character'Val (234), Standard.Character'Val (235),
Standard.Character'Val (236), Standard.Character'Val (237),
Standard.Character'Val (238), Standard.Character'Val (239),
Standard.Character'Val (240), Standard.Character'Val (241),
Standard.Character'Val (242), Standard.Character'Val (243),
Standard.Character'Val (244), Standard.Character'Val (245),
Standard.Character'Val (246), Standard.Character'Val (247),
Standard.Character'Val (248), Standard.Character'Val (249),
Standard.Character'Val (250), Standard.Character'Val (251),
Standard.Character'Val (252), Standard.Character'Val (253),
Standard.Character'Val (254), Standard.Character'Val (255));
type Alphanumeric is array (Positive range <>) of COBOL_Character;
-- pragma Pack (Alphanumeric);
function To_COBOL (Item : String) return Alphanumeric;
function To_Ada (Item : Alphanumeric) return String;
procedure To_COBOL
(Item : String;
Target : out Alphanumeric;
Last : out Natural);
procedure To_Ada
(Item : Alphanumeric;
Target : out String;
Last : out Natural);
type Numeric is array (Positive range <>) of COBOL_Character;
-- pragma Pack (Numeric);
--------------------------------------------
-- Formats For COBOL Data Representations --
--------------------------------------------
type Display_Format is private;
Unsigned : constant Display_Format;
Leading_Separate : constant Display_Format;
Trailing_Separate : constant Display_Format;
Leading_Nonseparate : constant Display_Format;
Trailing_Nonseparate : constant Display_Format;
type Binary_Format is private;
High_Order_First : constant Binary_Format;
Low_Order_First : constant Binary_Format;
Native_Binary : constant Binary_Format;
High_Order_First_Unsigned : constant Binary_Format;
Low_Order_First_Unsigned : constant Binary_Format;
Native_Binary_Unsigned : constant Binary_Format;
type Packed_Format is private;
Packed_Unsigned : constant Packed_Format;
Packed_Signed : constant Packed_Format;
------------------------------------------------------------
-- Types For External Representation Of COBOL Binary Data --
------------------------------------------------------------
type Byte is mod 2 ** COBOL_Character'Size;
type Byte_Array is array (Positive range <>) of Byte;
-- pragma Pack (Byte_Array);
Conversion_Error : exception;
generic
type Num is delta <> digits <>;
package Decimal_Conversions is
-- Display Formats: data values are represented as Numeric
function Valid
(Item : Numeric;
Format : Display_Format)
return Boolean;
function Length
(Format : Display_Format)
return Natural;
function To_Decimal
(Item : Numeric;
Format : Display_Format)
return Num;
function To_Display
(Item : Num;
Format : Display_Format)
return Numeric;
-- Packed Formats: data values are represented as Packed_Decimal
function Valid
(Item : Packed_Decimal;
Format : Packed_Format)
return Boolean;
function Length
(Format : Packed_Format)
return Natural;
function To_Decimal
(Item : Packed_Decimal;
Format : Packed_Format)
return Num;
function To_Packed
(Item : Num;
Format : Packed_Format)
return Packed_Decimal;
-- Binary Formats: external data values are represented as Byte_Array
function Valid
(Item : Byte_Array;
Format : Binary_Format)
return Boolean;
function Length
(Format : Binary_Format)
return Natural;
function To_Decimal
(Item : Byte_Array;
Format : Binary_Format) return Num;
function To_Binary
(Item : Num;
Format : Binary_Format)
return Byte_Array;
-- Internal Binary formats: data values are of type Binary/Long_Binary
function To_Decimal (Item : Binary) return Num;
function To_Decimal (Item : Long_Binary) return Num;
function To_Binary (Item : Num) return Binary;
function To_Long_Binary (Item : Num) return Long_Binary;
private
pragma Inline (Length);
pragma Inline (To_Binary);
pragma Inline (To_Decimal);
pragma Inline (To_Display);
pragma Inline (To_Decimal);
pragma Inline (To_Long_Binary);
pragma Inline (Valid);
end Decimal_Conversions;
------------------------------------------
-- Implementation Dependent Definitions --
------------------------------------------
-- The implementation dependent definitions are wholly contained in the
-- private part of this spec (the body is implementation independent)
private
-------------------
-- Binary Format --
-------------------
type Binary_Format is (H, L, N, HU, LU, NU);
subtype Binary_Unsigned_Format is Binary_Format range HU .. NU;
High_Order_First : constant Binary_Format := H;
Low_Order_First : constant Binary_Format := L;
Native_Binary : constant Binary_Format := N;
High_Order_First_Unsigned : constant Binary_Format := HU;
Low_Order_First_Unsigned : constant Binary_Format := LU;
Native_Binary_Unsigned : constant Binary_Format := NU;
---------------------------
-- Packed Decimal Format --
---------------------------
-- Packed decimal numbers use the IBM mainframe format:
-- dd dd ... dd dd ds
-- where d are the Digits, in natural left to right order, and s is
-- the sign digit. If the number of Digits os even, then the high
-- order (leftmost) Digits is always a 0. For example, a six digit
-- number has the format:
-- 0d dd dd ds
-- The sign digit has the possible values
-- 16#0A# non-standard plus sign
-- 16#0B# non-standard minus sign
-- 16#0C# standard plus sign
-- 16#0D# standard minus sign
-- 16#0E# non-standard plus sign
-- 16#0F# standard unsigned sign
-- The non-standard signs are recognized on input, but never generated
-- for output numbers. The 16#0F# distinguishes unsigned numbers from
-- signed positive numbers, but is treated as positive for computational
-- purposes. This format provides distinguished positive and negative
-- zero values, which behave the same in all operations.
type Packed_Format is (U, S);
Packed_Unsigned : constant Packed_Format := U;
Packed_Signed : constant Packed_Format := S;
type Packed_Representation_Type is (IBM);
-- Indicator for format used for packed decimal
Packed_Representation : constant Packed_Representation_Type := IBM;
-- This version of the spec uses IBM internal format, as described above.
-----------------------------
-- Display Decimal Formats --
-----------------------------
-- Display numbers are stored in standard ASCII format, as ASCII strings.
-- For the embedded signs, the following codes are used:
-- 0-9 positive: 16#30# .. 16#39# (i.e. natural ASCII digit code)
-- 0-9 negative: 16#20# .. 16#29# (ASCII digit code - 16#10#)
type Display_Format is (U, LS, TS, LN, TN);
Unsigned : constant Display_Format := U;
Leading_Separate : constant Display_Format := LS;
Trailing_Separate : constant Display_Format := TS;
Leading_Nonseparate : constant Display_Format := LN;
Trailing_Nonseparate : constant Display_Format := TN;
subtype COBOL_Digits is COBOL_Character range '0' .. '9';
-- Digit values in display decimal
COBOL_Space : constant COBOL_Character := ' ';
COBOL_Plus : constant COBOL_Character := '+';
COBOL_Minus : constant COBOL_Character := '-';
-- Sign values for Leading_Separate and Trailing_Separate formats
subtype COBOL_Plus_Digits is COBOL_Character
range COBOL_Character'Val (16#30#) .. COBOL_Character'Val (16#39#);
-- Values used for embedded plus signs in nonseparate formats
subtype COBOL_Minus_Digits is COBOL_Character
range COBOL_Character'Val (16#20#) .. COBOL_Character'Val (16#29#);
-- Values used for embedded minus signs in nonseparate formats
end Interfaces.COBOL;
| 48.940035 | 78 | 0.648672 |
0bf45b20ea379950246bb5b24baa15e20fce2280 | 3,715 | ads | Ada | source/amf/uml/amf-uml-holders-object_node_ordering_kinds.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/amf/uml/amf-uml-holders-object_node_ordering_kinds.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/amf/uml/amf-uml-holders-object_node_ordering_kinds.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- 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 League.Holders.Generic_Enumerations;
package AMF.UML.Holders.Object_Node_Ordering_Kinds is
new League.Holders.Generic_Enumerations
(AMF.UML.UML_Object_Node_Ordering_Kind);
pragma Preelaborate (AMF.UML.Holders.Object_Node_Ordering_Kinds);
| 71.442308 | 78 | 0.414805 |
4d02e4220f63630fb66c00a6b25ac0df5f9b7382 | 5,247 | adb | Ada | arch/ARM/Nordic/drivers/nrf51-events.adb | WickedShell/Ada_Drivers_Library | 391866ad37a599347df40a4dbb3bf0721bedabea | [
"BSD-3-Clause"
] | 6 | 2017-05-28T04:37:11.000Z | 2020-11-22T11:26:19.000Z | arch/ARM/Nordic/drivers/nrf51-events.adb | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | 2 | 2019-08-30T10:57:40.000Z | 2020-02-11T21:34:14.000Z | arch/ARM/Nordic/drivers/nrf51-events.adb | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | 2 | 2017-02-07T19:42:02.000Z | 2020-11-22T11:26:20.000Z | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of 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_Conversion;
package body nRF51.Events is
function To_UInt32 is new Ada.Unchecked_Conversion (System.Address, UInt32);
function To_Address is new Ada.Unchecked_Conversion (UInt32, System.Address);
---------------
-- Triggered --
---------------
function Triggered (Evt : Event_Type) return Boolean is
Reg : UInt32;
for Reg'Address use System.Address (Evt);
begin
return Reg /= 0;
end Triggered;
----------------------
-- Enable_Interrupt --
----------------------
procedure Enable_Interrupt (Evt : Event_Type) is
Reg_Addr : constant UInt32 := To_UInt32 (System.Address (Evt));
Device_Base : constant UInt32 := Reg_Addr and 16#FFFF_F000#;
Event_Index : constant UInt7 := UInt7 (Reg_Addr and 16#0000_007F#) / 4;
-- The bit corresponding to an event is determined by the offset of the
-- event. (nRF51 Series Reference Manual, section 9.1.6)
Set_Register_Addr : constant UInt32 := Device_Base + 16#0000_0304#;
-- For each device the "Interrupt enable set register" is always located
-- at the same offset: 0x304. (nRF51 Series Reference Manual,
-- section 9.1.6)
Set_Register : UInt32 with Address => To_Address (Set_Register_Addr);
begin
Set_Register := 2**Natural (Event_Index);
end Enable_Interrupt;
-----------------------
-- Disable_Interrupt --
-----------------------
procedure Disable_Interrupt (Evt : Event_Type) is
Reg_Addr : constant UInt32 := To_UInt32 (System.Address (Evt));
Device_Base : constant UInt32 := Reg_Addr and 16#FFFF_F000#;
Event_Index : constant UInt7 := UInt7 (Reg_Addr and 16#0000_007F#) / 4;
-- The bit corresponding to an event is determined by the offset of the
-- event. (nRF51 Series Reference Manual, section 9.1.6)
Clear_Register_Addr : constant UInt32 := Device_Base + 16#0000_0308#;
-- For each device the "Interrupt enable clear register" is always
-- located at the same offset: 0x308. (nRF51 Series Reference Manual,
-- section 9.1.6)
Clear_Register : UInt32 with Address => To_Address (Clear_Register_Addr);
begin
Clear_Register := 2**Natural (Event_Index);
end Disable_Interrupt;
-----------
-- Clear --
-----------
procedure Clear (Evt : Event_Type) is
Reg : UInt32 with Address => System.Address (Evt);
begin
Reg := 0;
end Clear;
-----------------
-- Get_Address --
-----------------
function Get_Address (Evt : Event_Type) return System.Address is
begin
return System.Address (Evt);
end Get_Address;
-----------------
-- Get_Address --
-----------------
function Get_Address (Evt : Event_Type) return UInt32 is
begin
return To_UInt32 (System.Address (Evt));
end Get_Address;
end nRF51.Events;
| 41.642857 | 80 | 0.566228 |
0b3082941504295273f1b5c810a0251682e70404 | 4,209 | ads | Ada | tools/scitools/conf/understand/ada/ada12/s-excdeb.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | 1 | 2020-01-20T21:26:46.000Z | 2020-01-20T21:26:46.000Z | tools/scitools/conf/understand/ada/ada12/s-excdeb.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | tools/scitools/conf/understand/ada/ada12/s-excdeb.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . E X C E P T I O N S _ D E B U G --
-- --
-- S p e c --
-- --
-- Copyright (C) 2006-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. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains internal routines used as debugger helpers.
-- It should be compiled without optimization to let debuggers inspect
-- parameter values reliably from breakpoints on the routines.
pragma Compiler_Unit;
with System.Standard_Library;
package System.Exceptions_Debug is
pragma Preelaborate_05;
-- To let Ada.Exceptions "with" us and let us "with" Standard_Library
package SSL renames System.Standard_Library;
-- To let some of the hooks below have formal parameters typed in
-- accordance with what GDB expects.
procedure Debug_Raise_Exception (E : SSL.Exception_Data_Ptr);
pragma Export
(Ada, Debug_Raise_Exception, "__gnat_debug_raise_exception");
-- Hook called at a "raise" point for an exception E, when it is
-- just about to be propagated.
procedure Debug_Unhandled_Exception (E : SSL.Exception_Data_Ptr);
pragma Export
(Ada, Debug_Unhandled_Exception, "__gnat_unhandled_exception");
-- Hook called during the propagation process of an exception E, as soon
-- as it is known to be unhandled.
procedure Debug_Raise_Assert_Failure;
pragma Export
(Ada, Debug_Raise_Assert_Failure, "__gnat_debug_raise_assert_failure");
-- Hook called when an assertion failed. This is used by the debugger to
-- intercept assertion failures, and treat them specially.
procedure Local_Raise (Excep : System.Address);
pragma Export (Ada, Local_Raise);
-- This is a dummy routine, used only by the debugger for the purpose of
-- logging local raise statements that were transformed into a direct goto
-- to the handler code. The compiler in this case generates:
--
-- Local_Raise (exception_data'address);
-- goto Handler
--
-- The argument is the address of the exception data
end System.Exceptions_Debug;
| 53.961538 | 78 | 0.492991 |
395917039ffc37f1d7416bc46ba4823a5556a2b3 | 1,146 | adb | Ada | build_gnu/binutils/gdb/testsuite/gdb.ada/atomic_enum/pck.adb | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | 1 | 2017-05-31T21:42:12.000Z | 2017-05-31T21:42:12.000Z | build_gnu/binutils/gdb/testsuite/gdb.ada/atomic_enum/pck.adb | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | null | null | null | build_gnu/binutils/gdb/testsuite/gdb.ada/atomic_enum/pck.adb | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | 1 | 2019-12-17T22:04:07.000Z | 2019-12-17T22:04:07.000Z | -- Copyright 2008-2014 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package body Pck is
type Data_T is (One, Two, Three);
pragma Atomic (Data_T);
Data_Flag : Data_T := One;
procedure Increment is
begin
if Data_Flag = Data_T'Last then
Data_Flag := Data_T'First;
else
Data_Flag := Data_T'Succ (Data_Flag);
end if;
end Increment;
function Is_First return Boolean is
begin
return Data_Flag = Data_T'First;
end Is_First;
end Pck;
| 30.157895 | 73 | 0.698953 |
d0193ff6410a1a0128deb6a579dbc37190af0331 | 13,140 | ads | Ada | arch/ARM/STM32/driversL5/stm32-pka.ads | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | 2 | 2018-05-16T03:56:39.000Z | 2019-07-31T13:53:56.000Z | arch/ARM/STM32/driversL5/stm32-pka.ads | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | null | null | null | arch/ARM/STM32/driversL5/stm32-pka.ads | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | null | null | null | with System;
with STM32.Device; use STM32.Device;
with STM32_SVD; use STM32_SVD;
with STM32_SVD.PKA; use STM32_SVD.PKA;
generic
Curve_Name : String;
Num_Bits : UInt32;
Hash_Size : UInt32 := 256;
package STM32.PKA is
N_By_8 : constant UInt32 := (Num_Bits / 8) + (if (Num_Bits mod 8) > 0 then 1 else 0);
N_By_32 : constant UInt32 := (Num_Bits / 32) + (if (Num_Bits mod 32) > 0 then 1 else 0);
Rem_By_32 : constant UInt32 := (Num_Bits mod 32);
Hash_N_By_8 : UInt32 := Hash_Size / 8;
subtype ECDSA_Array is UInt8_Array (0 .. Integer (N_By_8 - 1));
subtype ECDSA_Key is ECDSA_Array;
subtype ECDSA_Hash is UInt8_Array (0 .. Integer (Hash_N_By_8 - 1));
subtype ECDSA_Rand is ECDSA_Array;
type ECDSA_Signature is record
R : ECDSA_Array;
S : ECDSA_Array;
end record;
type ECDSA_PublicKey is record
X : ECDSA_Array;
Y : ECDSA_Array;
end record;
subtype ECDSA_String is String (1 .. Integer ((2 * N_By_8)));
subtype ECDSA_KeyStr is ECDSA_String;
subtype ECDSA_HashStr is String (1 .. Integer ((2 * Hash_N_By_8)));
subtype ECDSA_RandStr is ECDSA_String;
type ECDSA_SignatureStr is record
R : ECDSA_String;
S : ECDSA_String;
end record;
type ECDSA_PointStr is record
X : ECDSA_String;
Y : ECDSA_String;
end record;
subtype ECDSA_PublicKeyStr is ECDSA_PointStr;
subtype Digest_Buffer is UInt8_Array (0 .. Integer (N_By_8 - 1));
subtype Digest_BufferStr is String (1 .. Integer ((2 * N_By_8)));
PKA : aliased PKA_Peripheral with Import, Volatile, Address => S_NS_Periph (PKA_Base);
-- PKA RAM
-- The PKA RAM is mapped at the offset address of 0x0400 compared to the PKA base
-- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-- address. Only 32-bit word single accesses are supported, through PKA.AHB interface.
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- RAM size is 3576 bytes (max word offset: 0x11F4)
type ECDSA_Sign_Ram is record
Order_Num_Bits : UInt32;
Mod_Num_Bits : UInt32;
A_Coeff_Sign : UInt32;
A_Coeff : UInt32_Array (0 .. 20);
Mod_GF : UInt32_Array (0 .. 41);
K : UInt32_Array (0 .. 20);
X : UInt32_Array (0 .. 20);
Y : UInt32_Array (0 .. 20);
R : UInt32_Array (0 .. 20);
S : UInt32_Array (0 .. 20);
B_Coeff : UInt32_Array (0 .. 20);
Hash : UInt32_Array (0 .. 20);
PrivateKey : UInt32_Array (0 .. 21);
Order_N : UInt32_Array (0 .. 20);
Error : UInt32;
Final_Pt_X : UInt32_Array (0 .. 20);
Final_Pt_Y : UInt32_Array (0 .. 20);
end record;
for ECDSA_Sign_Ram use record
Order_Num_Bits at 16#0400# range 0 .. 31;
Mod_Num_Bits at 16#0404# range 0 .. 31;
A_Coeff_Sign at 16#0408# range 0 .. 31;
A_Coeff at 16#040c# range 0 .. 671;
Mod_GF at 16#0460# range 0 .. 1343;
K at 16#0508# range 0 .. 671;
X at 16#055c# range 0 .. 671;
Y at 16#05b0# range 0 .. 671;
R at 16#0700# range 0 .. 671;
S at 16#0754# range 0 .. 671;
B_Coeff at 16#07fc# range 0 .. 671;
Hash at 16#0de8# range 0 .. 671;
PrivateKey at 16#0e3c# range 0 .. 703;
Order_N at 16#0e94# range 0 .. 671;
Error at 16#0ee8# range 0 .. 31;
Final_Pt_X at 16#103c# range 0 .. 671;
Final_Pt_Y at 16#1090# range 0 .. 671;
end record;
type ECDSA_Verify_Ram is record
Order_Num_Bits : UInt32;
A_Coeff_Sign : UInt32;
A_Coeff : UInt32_Array (0 .. 20);
Mod_Num_Bits : UInt32;
Mod_GF : UInt32_Array (0 .. 61);
Result : UInt32;
IP_X : UInt32_Array (0 .. 20);
IP_Y : UInt32_Array (0 .. 20);
S : UInt32_Array (0 .. 20);
Order_N : UInt32_Array (0 .. 20);
PK_X : UInt32_Array (0 .. 20);
PK_Y : UInt32_Array (0 .. 20);
Hash : UInt32_Array (0 .. 20);
R : UInt32_Array (0 .. 20);
end record;
for ECDSA_Verify_Ram use record
Order_Num_Bits at 16#0404# range 0 .. 31;
A_Coeff_Sign at 16#045c# range 0 .. 31;
A_Coeff at 16#0460# range 0 .. 671;
Mod_Num_Bits at 16#04b4# range 0 .. 31;
Mod_GF at 16#04b8# range 0 .. 1983;
Result at 16#05b0# range 0 .. 31;
IP_X at 16#05e8# range 0 .. 671;
IP_Y at 16#063c# range 0 .. 671;
S at 16#0a44# range 0 .. 671;
Order_N at 16#0d5c# range 0 .. 671;
PK_X at 16#0f40# range 0 .. 671;
PK_Y at 16#0f94# range 0 .. 671;
Hash at 16#0fe8# range 0 .. 671;
R at 16#1098# range 0 .. 671;
end record;
type ECDSA_Ram is record
Op_Len : UInt32;
N_Bits : UInt32;
M_Param : UInt32_Array (0 .. 20);
A : UInt32_Array (0 .. 20);
T1 : UInt32_Array (0 .. 20);
T2 : UInt32_Array (0 .. 20);
T3 : UInt32_Array (0 .. 20);
B : UInt32_Array (0 .. 20);
Result : UInt32_Array (0 .. 20);
Mod_GF : UInt32_Array (0 .. 20);
end record;
for ECDSA_Ram use record
Op_Len at 16#0400# range 0 .. 31;
N_Bits at 16#0404# range 0 .. 31;
M_Param at 16#0594# range 0 .. 671;
A at 16#08b4# range 0 .. 671;
T1 at 16#0908# range 0 .. 671;
T2 at 16#095c# range 0 .. 671;
T3 at 16#09b0# range 0 .. 671;
B at 16#0a44# range 0 .. 671;
Result at 16#0bd0# range 0 .. 671;
Mod_GF at 16#0d5c# range 0 .. 671;
end record;
type ECDSA_Point_Ram is record
Scalar_Len : UInt32;
N_Bits : UInt32;
A_Sign : UInt32;
A_Coeff : UInt32_Array (0 .. 20);
Curve_Mod : UInt32_Array (0 .. 20);
Scalar : UInt32_Array (0 .. 20);
X : UInt32_Array (0 .. 20);
Y : UInt32_Array (0 .. 20);
end record;
for ECDSA_Point_Ram use record
Scalar_Len at 16#0400# range 0 .. 31;
N_Bits at 16#0404# range 0 .. 31;
A_Sign at 16#0408# range 0 .. 31;
A_Coeff at 16#040c# range 0 .. 671;
Curve_Mod at 16#0460# range 0 .. 671;
Scalar at 16#0508# range 0 .. 671;
X at 16#055c# range 0 .. 671;
Y at 16#05b0# range 0 .. 671;
end record;
type ECDSA_Point_Check_Ram is record
Result : UInt32;
N_Bits : UInt32;
A_Sign : UInt32;
A_Coeff : UInt32_Array (0 .. 20);
Curve_Mod : UInt32_Array (0 .. 20);
X : UInt32_Array (0 .. 20);
Y : UInt32_Array (0 .. 20);
B_Coeff : UInt32_Array (0 .. 20);
end record;
for ECDSA_Point_Check_Ram use record
Result at 16#0400# range 0 .. 31;
N_Bits at 16#0404# range 0 .. 31;
A_Sign at 16#0408# range 0 .. 31;
A_Coeff at 16#040c# range 0 .. 671;
Curve_Mod at 16#0460# range 0 .. 671;
X at 16#055c# range 0 .. 671;
Y at 16#05b0# range 0 .. 671;
B_Coeff at 16#07fc# range 0 .. 671;
end record;
type All_PKA_Ram is record
RAM : UInt32_Array (0 .. 893);
end record;
for All_PKA_Ram use record
RAM at 16#400# range 0 .. 28607;
end record;
type PKA_Parameters is
(
Montgomery_Parameter_Computation_With_Modular_Exponentiation,
Montgomery_Parameter_Computation_Only,
Modular_Exponentiation_Only,
RSA_CRT_Exponentiation,
Modular_Inversion,
Arithmetic_Addition,
Arithmetic_Subtraction,
Arithmetic_Multiplication,
Arithmetic_Comparison,
Modular_Reduction,
Modular_Addition,
Modular_Subtraction,
Montgomery_Multiplication,
FP_Scalar_Multiplication,
FP_Scalar_Multiplication_Fast,
ECDSA_Sign,
ECDSA_Verification,
Point_On_Elliptic_Curve_Fp_Check)
with Size => 6;
for PKA_Parameters use
(
Montgomery_Parameter_Computation_With_Modular_Exponentiation => 2#000000#,
Montgomery_Parameter_Computation_Only => 2#000001#,
Modular_Exponentiation_Only => 2#000010#,
RSA_CRT_Exponentiation => 2#000111#,
Modular_Inversion => 2#001000#,
Arithmetic_Addition => 2#001001#,
Arithmetic_Subtraction => 2#001010#,
Arithmetic_Multiplication => 2#001011#,
Arithmetic_Comparison => 2#001100#,
Modular_Reduction => 2#001101#,
Modular_Addition => 2#001110#,
Modular_Subtraction => 2#001111#,
Montgomery_Multiplication => 2#010000#,
FP_Scalar_Multiplication => 2#100000#,
FP_Scalar_Multiplication_Fast => 2#100010#,
ECDSA_Sign => 2#100100#,
ECDSA_Verification => 2#100110#,
Point_On_Elliptic_Curve_Fp_Check => 2#101000#);
type CurveData is record
P : String (1 .. Integer (N_By_8 * 2));
X : String (1 .. Integer (N_By_8 * 2));
Y : String (1 .. Integer (N_By_8 * 2));
A : String (1 .. Integer (N_By_8 * 2));
B : String (1 .. Integer (N_By_8 * 2));
N : String (1 .. Integer (N_By_8 * 2));
end record;
type Init_Mode is (Signing, Validation, Point_Check, Arithmetic, Field_Arithmetic);
procedure Copy_S_To_U32 (S : String; To : out UInt32_Array);
procedure Copy_U8_To_U32 (From : UInt8_Array; To : out UInt32_Array);
procedure Copy_U32_To_U8 (From : UInt32_Array; To : out UInt8_Array);
procedure Copy_U8_To_S (From : UInt8; To : out ECDSA_String; Offset : UInt32);
procedure Copy_U32_To_S (From : UInt32_Array; To : out ECDSA_String);
procedure Enable_Pka;
procedure Disable_Pka;
procedure StartPKA (Mode : PKA_Parameters);
function Check_Errors return Boolean;
procedure Clear_Flags;
procedure Clear_Ram;
function Common_Init (Mode : Init_Mode) return CurveData;
function Normalize (Digest : ECDSA_Hash) return Digest_Buffer;
function Normalize (Digest : ECDSA_HashStr) return Digest_BufferStr;
function ECDSA_Sign (Private_Key : ECDSA_Key;
H : ECDSA_Hash;
K : ECDSA_Rand;
Signature : out ECDSA_Signature) return Boolean;
function ECDSA_Sign (Private_Key : ECDSA_KeyStr;
H : ECDSA_HashStr;
K : ECDSA_RandStr;
Signature : out ECDSA_SignatureStr) return Boolean;
function ECDSA_Valid (Public_Key : ECDSA_PublicKey;
Digest : ECDSA_Hash;
Signature : ECDSA_Signature) return Boolean;
function ECDSA_Valid (Public_Key : ECDSA_PublicKeyStr;
Digest : ECDSA_HashStr;
Signature : ECDSA_SignatureStr) return Boolean;
procedure ECDSA_Math (Work : String;
A : ECDSA_String;
B : ECDSA_String := (1 => '0', others => '0');
C : ECDSA_String := (1 => '0', others => '0');
O1 : out ECDSA_String;
O2 : out ECDSA_String);
procedure ECDSA_Point_Mult (X : ECDSA_String;
Y : ECDSA_String;
Scalar : ECDSA_String;
X_Res : out ECDSA_String;
Y_Res : out ECDSA_String);
procedure ECDSA_Point_Mult (Scalar : ECDSA_String;
X_Res : out ECDSA_String;
Y_Res : out ECDSA_String);
function ECDSA_Point_On_Curve (Point : ECDSA_PointStr) return Boolean;
function Make_Random_Group_String (NClamp : Boolean := False) return ECDSA_String;
function Make_Public_Key_String (PrivateKey : ECDSA_String) return ECDSA_PublicKeyStr;
end STM32.PKA;
| 40.934579 | 91 | 0.524581 |
4d8668d45bf031ea6b96a1c3b737aac9e9a7f586 | 2,951 | ads | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-wwdcha.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-wwdcha.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-wwdcha.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . W W D _ C H A R --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the routine used for Character'Wide_[Wide_]Width
package System.WWd_Char is
pragma Pure;
function Wide_Width_Character (Lo, Hi : Character) return Natural;
-- Compute Wide_Width attribute for non-static type derived from
-- Character. The arguments are the low and high bounds for the type.
function Wide_Wide_Width_Character (Lo, Hi : Character) return Natural;
-- Compute Wide_Wide_Width attribute for non-static type derived from
-- Character. The arguments are the low and high bounds for the type.
end System.WWd_Char;
| 64.152174 | 79 | 0.442223 |
0eeeb5e3f862f2d3377fa002424f5a931a6adcfe | 17,272 | adb | Ada | Ada95/samples/ncurses2-demo_forms.adb | Ancient-Rom/android_external_libncurses | cfb80399910df8d55602d879d5cf0bc5ceaa2f89 | [
"X11"
] | 1,167 | 2017-08-21T21:21:24.000Z | 2022-03-31T15:42:10.000Z | vendor/ncurses/Ada95/samples/ncurses2-demo_forms.adb | motor-admin/ruby-packer | 0a2a888d3facaa66c53ee7da008f7a49d479fce1 | [
"MIT"
] | 374 | 2015-11-03T12:37:22.000Z | 2021-12-17T14:18:08.000Z | vendor/ncurses/Ada95/samples/ncurses2-demo_forms.adb | motor-admin/ruby-packer | 0a2a888d3facaa66c53ee7da008f7a49d479fce1 | [
"MIT"
] | 96 | 2015-11-22T07:47:26.000Z | 2022-01-20T19:52:19.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- ncurses --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 2000-2011,2014 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 <[email protected]> 2000
-- Version Control
-- $Revision: 1.7 $
-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms;
with Terminal_Interface.Curses.Forms.Field_User_Data;
with Ada.Characters.Handling;
with Ada.Strings;
with Ada.Strings.Bounded;
procedure ncurses2.demo_forms is
package BS is new Ada.Strings.Bounded.Generic_Bounded_Length (80);
type myptr is access Integer;
-- The C version stores a pointer in the userptr and
-- converts it into a long integer.
-- The correct, but inconvenient way to do it is to use a
-- pointer to long and keep the pointer constant.
-- It just adds one memory piece to allocate and deallocate (not done here)
package StringData is new
Terminal_Interface.Curses.Forms.Field_User_Data (Integer, myptr);
function edit_secure (me : Field; c_in : Key_Code) return Key_Code;
function form_virtualize (f : Form; w : Window) return Key_Code;
function my_form_driver (f : Form; c : Key_Code) return Boolean;
function make_label (frow : Line_Position;
fcol : Column_Position;
label : String) return Field;
function make_field (frow : Line_Position;
fcol : Column_Position;
rows : Line_Count;
cols : Column_Count;
secure : Boolean) return Field;
procedure display_form (f : Form);
procedure erase_form (f : Form);
-- prints '*' instead of characters.
-- Not that this keeps a bug from the C version:
-- type in the psasword field then move off and back.
-- the cursor is at position one, but
-- this assumes it as at the end so text gets appended instead
-- of overwtitting.
function edit_secure (me : Field; c_in : Key_Code) return Key_Code is
rows, frow : Line_Position;
nrow : Natural;
cols, fcol : Column_Position;
nbuf : Buffer_Number;
c : Key_Code := c_in;
c2 : Character;
use StringData;
begin
Info (me, rows, cols, frow, fcol, nrow, nbuf);
-- TODO if result = Form_Ok and nbuf > 0 then
-- C version checked the return value
-- of Info, the Ada binding throws an exception I think.
if nbuf > 0 then
declare
temp : BS.Bounded_String;
temps : String (1 .. 10);
-- TODO Get_Buffer povides no information on the field length?
len : myptr;
begin
Get_Buffer (me, 1, Str => temps);
-- strcpy(temp, field_buffer(me, 1));
Get_User_Data (me, len);
temp := BS.To_Bounded_String (temps (1 .. len.all));
if c <= Key_Max then
c2 := Code_To_Char (c);
if Ada.Characters.Handling.Is_Graphic (c2) then
BS.Append (temp, c2);
len.all := len.all + 1;
Set_Buffer (me, 1, BS.To_String (temp));
c := Character'Pos ('*');
else
c := 0;
end if;
else
case c is
when REQ_BEG_FIELD |
REQ_CLR_EOF |
REQ_CLR_EOL |
REQ_DEL_LINE |
REQ_DEL_WORD |
REQ_DOWN_CHAR |
REQ_END_FIELD |
REQ_INS_CHAR |
REQ_INS_LINE |
REQ_LEFT_CHAR |
REQ_NEW_LINE |
REQ_NEXT_WORD |
REQ_PREV_WORD |
REQ_RIGHT_CHAR |
REQ_UP_CHAR =>
c := 0; -- we don't want to do inline editing
when REQ_CLR_FIELD =>
if len.all /= 0 then
temp := BS.To_Bounded_String ("");
Set_Buffer (me, 1, BS.To_String (temp));
len.all := 0;
end if;
when REQ_DEL_CHAR |
REQ_DEL_PREV =>
if len.all /= 0 then
BS.Delete (temp, BS.Length (temp), BS.Length (temp));
Set_Buffer (me, 1, BS.To_String (temp));
len.all := len.all - 1;
end if;
when others => null;
end case;
end if;
end;
end if;
return c;
end edit_secure;
mode : Key_Code := REQ_INS_MODE;
function form_virtualize (f : Form; w : Window) return Key_Code is
type lookup_t is record
code : Key_Code;
result : Key_Code;
-- should be Form_Request_Code, but we need MAX_COMMAND + 1
end record;
lookup : constant array (Positive range <>) of lookup_t :=
(
(
Character'Pos ('A') mod 16#20#, REQ_NEXT_CHOICE
),
(
Character'Pos ('B') mod 16#20#, REQ_PREV_WORD
),
(
Character'Pos ('C') mod 16#20#, REQ_CLR_EOL
),
(
Character'Pos ('D') mod 16#20#, REQ_DOWN_FIELD
),
(
Character'Pos ('E') mod 16#20#, REQ_END_FIELD
),
(
Character'Pos ('F') mod 16#20#, REQ_NEXT_PAGE
),
(
Character'Pos ('G') mod 16#20#, REQ_DEL_WORD
),
(
Character'Pos ('H') mod 16#20#, REQ_DEL_PREV
),
(
Character'Pos ('I') mod 16#20#, REQ_INS_CHAR
),
(
Character'Pos ('K') mod 16#20#, REQ_CLR_EOF
),
(
Character'Pos ('L') mod 16#20#, REQ_LEFT_FIELD
),
(
Character'Pos ('M') mod 16#20#, REQ_NEW_LINE
),
(
Character'Pos ('N') mod 16#20#, REQ_NEXT_FIELD
),
(
Character'Pos ('O') mod 16#20#, REQ_INS_LINE
),
(
Character'Pos ('P') mod 16#20#, REQ_PREV_FIELD
),
(
Character'Pos ('R') mod 16#20#, REQ_RIGHT_FIELD
),
(
Character'Pos ('S') mod 16#20#, REQ_BEG_FIELD
),
(
Character'Pos ('U') mod 16#20#, REQ_UP_FIELD
),
(
Character'Pos ('V') mod 16#20#, REQ_DEL_CHAR
),
(
Character'Pos ('W') mod 16#20#, REQ_NEXT_WORD
),
(
Character'Pos ('X') mod 16#20#, REQ_CLR_FIELD
),
(
Character'Pos ('Y') mod 16#20#, REQ_DEL_LINE
),
(
Character'Pos ('Z') mod 16#20#, REQ_PREV_CHOICE
),
(
Character'Pos ('[') mod 16#20#, -- ESCAPE
Form_Request_Code'Last + 1
),
(
Key_Backspace, REQ_DEL_PREV
),
(
KEY_DOWN, REQ_DOWN_CHAR
),
(
Key_End, REQ_LAST_FIELD
),
(
Key_Home, REQ_FIRST_FIELD
),
(
KEY_LEFT, REQ_LEFT_CHAR
),
(
KEY_LL, REQ_LAST_FIELD
),
(
Key_Next, REQ_NEXT_FIELD
),
(
KEY_NPAGE, REQ_NEXT_PAGE
),
(
KEY_PPAGE, REQ_PREV_PAGE
),
(
Key_Previous, REQ_PREV_FIELD
),
(
KEY_RIGHT, REQ_RIGHT_CHAR
),
(
KEY_UP, REQ_UP_CHAR
),
(
Character'Pos ('Q') mod 16#20#, -- QUIT
Form_Request_Code'Last + 1 -- TODO MAX_FORM_COMMAND + 1
)
);
c : Key_Code := Getchar (w);
me : constant Field := Current (f);
begin
if c = Character'Pos (']') mod 16#20# then
if mode = REQ_INS_MODE then
mode := REQ_OVL_MODE;
else
mode := REQ_INS_MODE;
end if;
c := mode;
else
for n in lookup'Range loop
if lookup (n).code = c then
c := lookup (n).result;
exit;
end if;
end loop;
end if;
-- Force the field that the user is typing into to be in reverse video,
-- while the other fields are shown underlined.
if c <= Key_Max then
c := edit_secure (me, c);
Set_Background (me, (Reverse_Video => True, others => False));
elsif c <= Form_Request_Code'Last then
c := edit_secure (me, c);
Set_Background (me, (Under_Line => True, others => False));
end if;
return c;
end form_virtualize;
function my_form_driver (f : Form; c : Key_Code) return Boolean is
flag : constant Driver_Result := Driver (f, F_Validate_Field);
begin
if c = Form_Request_Code'Last + 1 and
flag = Form_Ok
then
return True;
else
Beep;
return False;
end if;
end my_form_driver;
function make_label (frow : Line_Position;
fcol : Column_Position;
label : String) return Field is
f : constant Field := Create (1, label'Length, frow, fcol, 0, 0);
o : Field_Option_Set := Get_Options (f);
begin
if f /= Null_Field then
Set_Buffer (f, 0, label);
o.Active := False;
Set_Options (f, o);
end if;
return f;
end make_label;
function make_field (frow : Line_Position;
fcol : Column_Position;
rows : Line_Count;
cols : Column_Count;
secure : Boolean) return Field is
f : Field;
use StringData;
len : myptr;
begin
if secure then
f := Create (rows, cols, frow, fcol, 0, 1);
else
f := Create (rows, cols, frow, fcol, 0, 0);
end if;
if f /= Null_Field then
Set_Background (f, (Under_Line => True, others => False));
len := new Integer;
len.all := 0;
Set_User_Data (f, len);
end if;
return f;
end make_field;
procedure display_form (f : Form) is
w : Window;
rows : Line_Count;
cols : Column_Count;
begin
Scale (f, rows, cols);
w := New_Window (rows + 2, cols + 4, 0, 0);
if w /= Null_Window then
Set_Window (f, w);
Set_Sub_Window (f, Derived_Window (w, rows, cols, 1, 2));
Box (w); -- 0,0
Set_KeyPad_Mode (w, True);
end if;
-- TODO if Post(f) /= Form_Ok then it's a procedure
declare
begin
Post (f);
exception
when
Eti_System_Error |
Eti_Bad_Argument |
Eti_Posted |
Eti_Connected |
Eti_Bad_State |
Eti_No_Room |
Eti_Not_Posted |
Eti_Unknown_Command |
Eti_No_Match |
Eti_Not_Selectable |
Eti_Not_Connected |
Eti_Request_Denied |
Eti_Invalid_Field |
Eti_Current =>
Refresh (w);
end;
-- end if;
end display_form;
procedure erase_form (f : Form) is
w : Window := Get_Window (f);
s : Window := Get_Sub_Window (f);
begin
Post (f, False);
Erase (w);
Refresh (w);
Delete (s);
Delete (w);
end erase_form;
finished : Boolean := False;
f : constant Field_Array_Access := new Field_Array (1 .. 12);
secure : Field;
myform : Form;
w : Window;
c : Key_Code;
result : Driver_Result;
begin
Move_Cursor (Line => 18, Column => 0);
Add (Str => "Defined form-traversal keys: ^Q/ESC- exit form");
Add (Ch => newl);
Add (Str => "^N -- go to next field ^P -- go to previous field");
Add (Ch => newl);
Add (Str => "Home -- go to first field End -- go to last field");
Add (Ch => newl);
Add (Str => "^L -- go to field to left ^R -- go to field to right");
Add (Ch => newl);
Add (Str => "^U -- move upward to field ^D -- move downward to field");
Add (Ch => newl);
Add (Str => "^W -- go to next word ^B -- go to previous word");
Add (Ch => newl);
Add (Str => "^S -- go to start of field ^E -- go to end of field");
Add (Ch => newl);
Add (Str => "^H -- delete previous char ^Y -- delete line");
Add (Ch => newl);
Add (Str => "^G -- delete current word ^C -- clear to end of line");
Add (Ch => newl);
Add (Str => "^K -- clear to end of field ^X -- clear field");
Add (Ch => newl);
Add (Str => "Arrow keys move within a field as you would expect.");
Add (Line => 4, Column => 57, Str => "Forms Entry Test");
Refresh;
-- describe the form
f.all (1) := make_label (0, 15, "Sample Form");
f.all (2) := make_label (2, 0, "Last Name");
f.all (3) := make_field (3, 0, 1, 18, False);
f.all (4) := make_label (2, 20, "First Name");
f.all (5) := make_field (3, 20, 1, 12, False);
f.all (6) := make_label (2, 34, "Middle Name");
f.all (7) := make_field (3, 34, 1, 12, False);
f.all (8) := make_label (5, 0, "Comments");
f.all (9) := make_field (6, 0, 4, 46, False);
f.all (10) := make_label (5, 20, "Password:");
f.all (11) := make_field (5, 30, 1, 9, True);
secure := f.all (11);
f.all (12) := Null_Field;
myform := New_Form (f);
display_form (myform);
w := Get_Window (myform);
Set_Raw_Mode (SwitchOn => True);
Set_NL_Mode (SwitchOn => True); -- lets us read ^M's
while not finished loop
c := form_virtualize (myform, w);
result := Driver (myform, c);
case result is
when Form_Ok =>
Add (Line => 5, Column => 57, Str => Get_Buffer (secure, 1));
Clear_To_End_Of_Line;
Refresh;
when Unknown_Request =>
finished := my_form_driver (myform, c);
when others =>
Beep;
end case;
end loop;
erase_form (myform);
-- TODO Free_Form(myform);
-- for (c = 0; f[c] != 0; c++) free_field(f[c]);
Set_Raw_Mode (SwitchOn => False);
Set_NL_Mode (SwitchOn => True);
end ncurses2.demo_forms;
| 34.613226 | 79 | 0.483557 |
0b2dd761d91645b3571ade7c3ad1ffca5584e2b8 | 5,115 | adb | Ada | source/xml/catalogs/matreshka-xml_catalogs-loader.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/xml/catalogs/matreshka-xml_catalogs-loader.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/xml/catalogs/matreshka-xml_catalogs-loader.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- XML Processor --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.XML_Catalogs.Handlers;
with XML.SAX.Input_Sources.Streams.Files;
with XML.SAX.Simple_Readers;
package body Matreshka.XML_Catalogs.Loader is
----------
-- Load --
----------
function Load
(URI : League.Strings.Universal_String;
Prefer : Matreshka.XML_Catalogs.Entry_Files.Prefer_Mode)
return Matreshka.XML_Catalogs.Entry_Files.Catalog_Entry_File_Access
is
Source : aliased XML.SAX.Input_Sources.Streams.Files.File_Input_Source;
Handler : aliased Matreshka.XML_Catalogs.Handlers.XML_Catalog_Handler;
Reader : aliased XML.SAX.Simple_Readers.Simple_Reader;
begin
Handler.Set_Default_Prefer_Mode (Prefer);
Reader.Set_Content_Handler (Handler'Unchecked_Access);
Source.Open_By_URI (URI);
Reader.Parse (Source'Unchecked_Access);
return Handler.Get_Catalog_Entry_File;
end Load;
-----------------------
-- Load_By_File_Name --
-----------------------
function Load_By_File_Name
(Name : League.Strings.Universal_String;
Prefer : Matreshka.XML_Catalogs.Entry_Files.Prefer_Mode)
return Matreshka.XML_Catalogs.Entry_Files.Catalog_Entry_File_Access
is
Source : aliased XML.SAX.Input_Sources.Streams.Files.File_Input_Source;
Handler : aliased Matreshka.XML_Catalogs.Handlers.XML_Catalog_Handler;
Reader : aliased XML.SAX.Simple_Readers.Simple_Reader;
begin
Handler.Set_Default_Prefer_Mode (Prefer);
Reader.Set_Content_Handler (Handler'Unchecked_Access);
Reader.Set_Error_Handler (Handler'Unchecked_Access);
Source.Open_By_File_Name (Name);
Reader.Parse (Source'Unchecked_Access);
return Handler.Get_Catalog_Entry_File;
end Load_By_File_Name;
end Matreshka.XML_Catalogs.Loader;
| 52.193878 | 78 | 0.503617 |
1c3a5cd3b08258858aac243e661459e9a01ac7d3 | 385 | adb | Ada | concurrent.adb | M1nified/Ada-Samples | 0943d028b533f43a8eb56b291189311edc77e15c | [
"MIT"
] | null | null | null | concurrent.adb | M1nified/Ada-Samples | 0943d028b533f43a8eb56b291189311edc77e15c | [
"MIT"
] | null | null | null | concurrent.adb | M1nified/Ada-Samples | 0943d028b533f43a8eb56b291189311edc77e15c | [
"MIT"
] | null | null | null | with Ada.Text_Io;
use Ada.Text_Io;
procedure Concurrent is
task type Task1 is
entry Insert (In1 : in Integer);
end Task1;
task body Task1 is
Value : Integer;
begin
Value := 10;
accept Insert(In1 : in Integer) do
Value := In1;
end Insert;
Put_Line(Integer'Image(Value));
end Task1;
thetask : Task1;
begin
thetask.Insert(2);
end Concurrent; | 19.25 | 38 | 0.657143 |
1cc91c15d7407f61aab7d9d0d3ebf9ec15fc93f4 | 3,015 | adb | Ada | Ada95/samples/tour.adb | mvaisakh/android_external_libncurses | d44c8a16d7f1ed276d0de0b3f6f1a5596c5f556f | [
"DOC",
"Unlicense"
] | 1,167 | 2017-08-21T21:21:24.000Z | 2022-03-31T15:42:10.000Z | Ada95/samples/tour.adb | thabongshot/ncurses-5.9-mac | 8475dcacfcad55dda5e69f3c8d89de0264fc4429 | [
"DOC",
"Unlicense"
] | 374 | 2015-11-03T12:37:22.000Z | 2021-12-17T14:18:08.000Z | Ada95/samples/tour.adb | thabongshot/ncurses-5.9-mac | 8475dcacfcad55dda5e69f3c8d89de0264fc4429 | [
"DOC",
"Unlicense"
] | 96 | 2015-11-22T07:47:26.000Z | 2022-01-20T19:52:19.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- tour --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
-- $Revision: 1.9 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Sample; use Sample;
procedure Tour is
begin
Whow;
end Tour;
| 64.148936 | 78 | 0.40398 |
dfe9b5902a507c8515517e8270a57c3f941b2622 | 2,948 | ads | Ada | llvm-gcc-4.2-2.9/gcc/ada/s-expmod.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | 1 | 2016-04-09T02:58:13.000Z | 2016-04-09T02:58:13.000Z | llvm-gcc-4.2-2.9/gcc/ada/s-expmod.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | llvm-gcc-4.2-2.9/gcc/ada/s-expmod.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . E X P _ M O D --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- This procedure performs exponentiation of a modular type with non-binary
-- modulus values. Arithmetic is done in Long_Long_Unsigned, with explicit
-- accounting for the modulus value which is passed as the second argument.
package System.Exp_Mod is
pragma Pure;
function Exp_Modular
(Left : Integer;
Modulus : Integer;
Right : Natural)
return Integer;
end System.Exp_Mod;
| 61.416667 | 78 | 0.451493 |
50946423e80b0f8885e2e221dafe851374077d4e | 18,651 | adb | Ada | source/amf/ocl/amf-internals-ocl_collection_literal_exps.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/amf/ocl/amf-internals-ocl_collection_literal_exps.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/amf/ocl/amf-internals-ocl_collection_literal_exps.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Elements;
with AMF.Internals.Element_Collections;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.OCL_Attributes;
with AMF.OCL.Collection_Literal_Parts.Collections;
with AMF.UML.Comments.Collections;
with AMF.UML.Dependencies.Collections;
with AMF.UML.Elements.Collections;
with AMF.UML.Named_Elements;
with AMF.UML.Namespaces.Collections;
with AMF.UML.Packages.Collections;
with AMF.UML.String_Expressions;
with AMF.UML.Types;
with AMF.Visitors.OCL_Iterators;
with AMF.Visitors.OCL_Visitors;
with League.Strings.Internals;
with Matreshka.Internals.Strings;
package body AMF.Internals.OCL_Collection_Literal_Exps is
--------------
-- Get_Kind --
--------------
overriding function Get_Kind
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return AMF.OCL.OCL_Collection_Kind is
begin
return
AMF.Internals.Tables.OCL_Attributes.Internal_Get_Kind
(Self.Element);
end Get_Kind;
--------------
-- Set_Kind --
--------------
overriding procedure Set_Kind
(Self : not null access OCL_Collection_Literal_Exp_Proxy;
To : AMF.OCL.OCL_Collection_Kind) is
begin
AMF.Internals.Tables.OCL_Attributes.Internal_Set_Kind
(Self.Element, To);
end Set_Kind;
--------------
-- Get_Part --
--------------
overriding function Get_Part
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return AMF.OCL.Collection_Literal_Parts.Collections.Ordered_Set_Of_OCL_Collection_Literal_Part is
begin
return
AMF.OCL.Collection_Literal_Parts.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.OCL_Attributes.Internal_Get_Part
(Self.Element)));
end Get_Part;
--------------
-- Get_Type --
--------------
overriding function Get_Type
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return AMF.UML.Types.UML_Type_Access is
begin
return
AMF.UML.Types.UML_Type_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.OCL_Attributes.Internal_Get_Type
(Self.Element)));
end Get_Type;
--------------
-- Set_Type --
--------------
overriding procedure Set_Type
(Self : not null access OCL_Collection_Literal_Exp_Proxy;
To : AMF.UML.Types.UML_Type_Access) is
begin
AMF.Internals.Tables.OCL_Attributes.Internal_Set_Type
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Type;
---------------------------
-- Get_Client_Dependency --
---------------------------
overriding function Get_Client_Dependency
(Self : not null access constant OCL_Collection_Literal_Exp_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.OCL_Attributes.Internal_Get_Client_Dependency
(Self.Element)));
end Get_Client_Dependency;
--------------
-- Get_Name --
--------------
overriding function Get_Name
(Self : not null access constant OCL_Collection_Literal_Exp_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.OCL_Attributes.Internal_Get_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_Name;
--------------
-- Set_Name --
--------------
overriding procedure Set_Name
(Self : not null access OCL_Collection_Literal_Exp_Proxy;
To : AMF.Optional_String) is
begin
if To.Is_Empty then
AMF.Internals.Tables.OCL_Attributes.Internal_Set_Name
(Self.Element, null);
else
AMF.Internals.Tables.OCL_Attributes.Internal_Set_Name
(Self.Element,
League.Strings.Internals.Internal (To.Value));
end if;
end Set_Name;
-------------------------
-- Get_Name_Expression --
-------------------------
overriding function Get_Name_Expression
(Self : not null access constant OCL_Collection_Literal_Exp_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.OCL_Attributes.Internal_Get_Name_Expression
(Self.Element)));
end Get_Name_Expression;
-------------------------
-- Set_Name_Expression --
-------------------------
overriding procedure Set_Name_Expression
(Self : not null access OCL_Collection_Literal_Exp_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access) is
begin
AMF.Internals.Tables.OCL_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 OCL_Collection_Literal_Exp_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.OCL_Attributes.Internal_Get_Namespace
(Self.Element)));
end Get_Namespace;
------------------------
-- Get_Qualified_Name --
------------------------
overriding function Get_Qualified_Name
(Self : not null access constant OCL_Collection_Literal_Exp_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.OCL_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;
--------------------
-- Get_Visibility --
--------------------
overriding function Get_Visibility
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return AMF.UML.Optional_UML_Visibility_Kind is
begin
return
AMF.Internals.Tables.OCL_Attributes.Internal_Get_Visibility
(Self.Element);
end Get_Visibility;
--------------------
-- Set_Visibility --
--------------------
overriding procedure Set_Visibility
(Self : not null access OCL_Collection_Literal_Exp_Proxy;
To : AMF.UML.Optional_UML_Visibility_Kind) is
begin
AMF.Internals.Tables.OCL_Attributes.Internal_Set_Visibility
(Self.Element, To);
end Set_Visibility;
-----------------------
-- Get_Owned_Comment --
-----------------------
overriding function Get_Owned_Comment
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return AMF.UML.Comments.Collections.Set_Of_UML_Comment is
begin
return
AMF.UML.Comments.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Comment
(Self.Element)));
end Get_Owned_Comment;
-----------------------
-- Get_Owned_Element --
-----------------------
overriding function Get_Owned_Element
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return AMF.UML.Elements.Collections.Set_Of_UML_Element is
begin
return
AMF.UML.Elements.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Element
(Self.Element)));
end Get_Owned_Element;
---------------
-- Get_Owner --
---------------
overriding function Get_Owner
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return AMF.UML.Elements.UML_Element_Access is
begin
return
AMF.UML.Elements.UML_Element_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owner
(Self.Element)));
end Get_Owner;
--------------------
-- All_Namespaces --
--------------------
overriding function All_Namespaces
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "All_Namespaces unimplemented");
raise Program_Error with "Unimplemented procedure OCL_Collection_Literal_Exp_Proxy.All_Namespaces";
return All_Namespaces (Self);
end All_Namespaces;
-------------------------
-- All_Owning_Packages --
-------------------------
overriding function All_Owning_Packages
(Self : not null access constant OCL_Collection_Literal_Exp_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 OCL_Collection_Literal_Exp_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 OCL_Collection_Literal_Exp_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 OCL_Collection_Literal_Exp_Proxy.Is_Distinguishable_From";
return Is_Distinguishable_From (Self, N, Ns);
end Is_Distinguishable_From;
---------------
-- Namespace --
---------------
overriding function Namespace
(Self : not null access constant OCL_Collection_Literal_Exp_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 OCL_Collection_Literal_Exp_Proxy.Namespace";
return Namespace (Self);
end Namespace;
--------------------
-- Qualified_Name --
--------------------
overriding function Qualified_Name
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return League.Strings.Universal_String is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Qualified_Name unimplemented");
raise Program_Error with "Unimplemented procedure OCL_Collection_Literal_Exp_Proxy.Qualified_Name";
return Qualified_Name (Self);
end Qualified_Name;
---------------
-- Separator --
---------------
overriding function Separator
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return League.Strings.Universal_String is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Separator unimplemented");
raise Program_Error with "Unimplemented procedure OCL_Collection_Literal_Exp_Proxy.Separator";
return Separator (Self);
end Separator;
------------------------
-- All_Owned_Elements --
------------------------
overriding function All_Owned_Elements
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return AMF.UML.Elements.Collections.Set_Of_UML_Element is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "All_Owned_Elements unimplemented");
raise Program_Error with "Unimplemented procedure OCL_Collection_Literal_Exp_Proxy.All_Owned_Elements";
return All_Owned_Elements (Self);
end All_Owned_Elements;
-------------------
-- Must_Be_Owned --
-------------------
overriding function Must_Be_Owned
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Must_Be_Owned unimplemented");
raise Program_Error with "Unimplemented procedure OCL_Collection_Literal_Exp_Proxy.Must_Be_Owned";
return Must_Be_Owned (Self);
end Must_Be_Owned;
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.OCL_Visitors.OCL_Visitor'Class then
AMF.Visitors.OCL_Visitors.OCL_Visitor'Class
(Visitor).Enter_Collection_Literal_Exp
(AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant OCL_Collection_Literal_Exp_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.OCL_Visitors.OCL_Visitor'Class then
AMF.Visitors.OCL_Visitors.OCL_Visitor'Class
(Visitor).Leave_Collection_Literal_Exp
(AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant OCL_Collection_Literal_Exp_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.OCL_Iterators.OCL_Iterator'Class then
AMF.Visitors.OCL_Iterators.OCL_Iterator'Class
(Iterator).Visit_Collection_Literal_Exp
(Visitor,
AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access (Self),
Control);
end if;
end Visit_Element;
end AMF.Internals.OCL_Collection_Literal_Exps;
| 37.376754 | 114 | 0.613318 |
4d4d60ba40af1cbda607629598c6cd0898790184 | 3,598 | ads | Ada | source/league/league-json-streams-integer_stream_operations.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/league/league-json-streams-integer_stream_operations.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/league/league-json-streams-integer_stream_operations.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- 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 League.JSON.Streams.Generic_Integer_Stream_Operations;
package League.JSON.Streams.Integer_Stream_Operations is
new League.JSON.Streams.Generic_Integer_Stream_Operations (Integer);
pragma Preelaborate (League.JSON.Streams.Integer_Stream_Operations);
| 73.428571 | 78 | 0.431073 |
0ba84c7e5f732e6aa40fcb5d5e3c2dd38c77df24 | 19,643 | adb | Ada | tools/xml2ayacc/encoding/auto/encodings-maps-cp_861.adb | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | 4 | 2016-02-05T15:51:56.000Z | 2022-03-25T20:38:32.000Z | tools/xml2ayacc/encoding/auto/encodings-maps-cp_861.adb | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | null | null | null | tools/xml2ayacc/encoding/auto/encodings-maps-cp_861.adb | faelys/gela-asis | 48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253 | [
"BSD-3-Clause"
] | null | null | null | -- Auto generated file. Don't edit
-- Read copyright and license at the end of this file
package body Encodings.Maps.CP_861 is
Forward : Forward_Map (Character'Val(16#80#) .. Character'Last) :=
(Wide_Character'Val( 16#C7#),
Wide_Character'Val( 16#FC#),
Wide_Character'Val( 16#E9#),
Wide_Character'Val( 16#E2#),
Wide_Character'Val( 16#E4#),
Wide_Character'Val( 16#E0#),
Wide_Character'Val( 16#E5#),
Wide_Character'Val( 16#E7#),
Wide_Character'Val( 16#EA#),
Wide_Character'Val( 16#EB#),
Wide_Character'Val( 16#E8#),
Wide_Character'Val( 16#D0#),
Wide_Character'Val( 16#F0#),
Wide_Character'Val( 16#DE#),
Wide_Character'Val( 16#C4#),
Wide_Character'Val( 16#C5#),
Wide_Character'Val( 16#C9#),
Wide_Character'Val( 16#E6#),
Wide_Character'Val( 16#C6#),
Wide_Character'Val( 16#F4#),
Wide_Character'Val( 16#F6#),
Wide_Character'Val( 16#FE#),
Wide_Character'Val( 16#FB#),
Wide_Character'Val( 16#DD#),
Wide_Character'Val( 16#FD#),
Wide_Character'Val( 16#D6#),
Wide_Character'Val( 16#DC#),
Wide_Character'Val( 16#F8#),
Wide_Character'Val( 16#A3#),
Wide_Character'Val( 16#D8#),
Wide_Character'Val(16#20A7#),
Wide_Character'Val( 16#192#),
Wide_Character'Val( 16#E1#),
Wide_Character'Val( 16#ED#),
Wide_Character'Val( 16#F3#),
Wide_Character'Val( 16#FA#),
Wide_Character'Val( 16#C1#),
Wide_Character'Val( 16#CD#),
Wide_Character'Val( 16#D3#),
Wide_Character'Val( 16#DA#),
Wide_Character'Val( 16#BF#),
Wide_Character'Val(16#2310#),
Wide_Character'Val( 16#AC#),
Wide_Character'Val( 16#BD#),
Wide_Character'Val( 16#BC#),
Wide_Character'Val( 16#A1#),
Wide_Character'Val( 16#AB#),
Wide_Character'Val( 16#BB#),
Wide_Character'Val(16#2591#),
Wide_Character'Val(16#2592#),
Wide_Character'Val(16#2593#),
Wide_Character'Val(16#2502#),
Wide_Character'Val(16#2524#),
Wide_Character'Val(16#2561#),
Wide_Character'Val(16#2562#),
Wide_Character'Val(16#2556#),
Wide_Character'Val(16#2555#),
Wide_Character'Val(16#2563#),
Wide_Character'Val(16#2551#),
Wide_Character'Val(16#2557#),
Wide_Character'Val(16#255D#),
Wide_Character'Val(16#255C#),
Wide_Character'Val(16#255B#),
Wide_Character'Val(16#2510#),
Wide_Character'Val(16#2514#),
Wide_Character'Val(16#2534#),
Wide_Character'Val(16#252C#),
Wide_Character'Val(16#251C#),
Wide_Character'Val(16#2500#),
Wide_Character'Val(16#253C#),
Wide_Character'Val(16#255E#),
Wide_Character'Val(16#255F#),
Wide_Character'Val(16#255A#),
Wide_Character'Val(16#2554#),
Wide_Character'Val(16#2569#),
Wide_Character'Val(16#2566#),
Wide_Character'Val(16#2560#),
Wide_Character'Val(16#2550#),
Wide_Character'Val(16#256C#),
Wide_Character'Val(16#2567#),
Wide_Character'Val(16#2568#),
Wide_Character'Val(16#2564#),
Wide_Character'Val(16#2565#),
Wide_Character'Val(16#2559#),
Wide_Character'Val(16#2558#),
Wide_Character'Val(16#2552#),
Wide_Character'Val(16#2553#),
Wide_Character'Val(16#256B#),
Wide_Character'Val(16#256A#),
Wide_Character'Val(16#2518#),
Wide_Character'Val(16#250C#),
Wide_Character'Val(16#2588#),
Wide_Character'Val(16#2584#),
Wide_Character'Val(16#258C#),
Wide_Character'Val(16#2590#),
Wide_Character'Val(16#2580#),
Wide_Character'Val( 16#3B1#),
Wide_Character'Val( 16#DF#),
Wide_Character'Val( 16#393#),
Wide_Character'Val( 16#3C0#),
Wide_Character'Val( 16#3A3#),
Wide_Character'Val( 16#3C3#),
Wide_Character'Val( 16#B5#),
Wide_Character'Val( 16#3C4#),
Wide_Character'Val( 16#3A6#),
Wide_Character'Val( 16#398#),
Wide_Character'Val( 16#3A9#),
Wide_Character'Val( 16#3B4#),
Wide_Character'Val(16#221E#),
Wide_Character'Val( 16#3C6#),
Wide_Character'Val( 16#3B5#),
Wide_Character'Val(16#2229#),
Wide_Character'Val(16#2261#),
Wide_Character'Val( 16#B1#),
Wide_Character'Val(16#2265#),
Wide_Character'Val(16#2264#),
Wide_Character'Val(16#2320#),
Wide_Character'Val(16#2321#),
Wide_Character'Val( 16#F7#),
Wide_Character'Val(16#2248#),
Wide_Character'Val( 16#B0#),
Wide_Character'Val(16#2219#),
Wide_Character'Val( 16#B7#),
Wide_Character'Val(16#221A#),
Wide_Character'Val(16#207F#),
Wide_Character'Val( 16#B2#),
Wide_Character'Val(16#25A0#),
Wide_Character'Val( 16#A0#));
Ranges : Maps.Wide_Ranges (1 .. 64) :=
((Wide_Character'Val( 16#0#),Wide_Character'Val( 16#7F#), 1),
(Wide_Character'Val( 16#A0#),Wide_Character'Val( 16#A1#), 129),
(Wide_Character'Val( 16#A3#),Wide_Character'Val( 16#A3#), 131),
(Wide_Character'Val( 16#AB#),Wide_Character'Val( 16#AC#), 132),
(Wide_Character'Val( 16#B0#),Wide_Character'Val( 16#B2#), 134),
(Wide_Character'Val( 16#B5#),Wide_Character'Val( 16#B5#), 137),
(Wide_Character'Val( 16#B7#),Wide_Character'Val( 16#B7#), 138),
(Wide_Character'Val( 16#BB#),Wide_Character'Val( 16#BD#), 139),
(Wide_Character'Val( 16#BF#),Wide_Character'Val( 16#BF#), 142),
(Wide_Character'Val( 16#C1#),Wide_Character'Val( 16#C1#), 143),
(Wide_Character'Val( 16#C4#),Wide_Character'Val( 16#C7#), 144),
(Wide_Character'Val( 16#C9#),Wide_Character'Val( 16#C9#), 148),
(Wide_Character'Val( 16#CD#),Wide_Character'Val( 16#CD#), 149),
(Wide_Character'Val( 16#D0#),Wide_Character'Val( 16#D0#), 150),
(Wide_Character'Val( 16#D3#),Wide_Character'Val( 16#D3#), 151),
(Wide_Character'Val( 16#D6#),Wide_Character'Val( 16#D6#), 152),
(Wide_Character'Val( 16#D8#),Wide_Character'Val( 16#D8#), 153),
(Wide_Character'Val( 16#DA#),Wide_Character'Val( 16#DA#), 154),
(Wide_Character'Val( 16#DC#),Wide_Character'Val( 16#E2#), 155),
(Wide_Character'Val( 16#E4#),Wide_Character'Val( 16#EB#), 162),
(Wide_Character'Val( 16#ED#),Wide_Character'Val( 16#ED#), 170),
(Wide_Character'Val( 16#F0#),Wide_Character'Val( 16#F0#), 171),
(Wide_Character'Val( 16#F3#),Wide_Character'Val( 16#F4#), 172),
(Wide_Character'Val( 16#F6#),Wide_Character'Val( 16#F8#), 174),
(Wide_Character'Val( 16#FA#),Wide_Character'Val( 16#FE#), 177),
(Wide_Character'Val( 16#192#),Wide_Character'Val( 16#192#), 182),
(Wide_Character'Val( 16#393#),Wide_Character'Val( 16#393#), 183),
(Wide_Character'Val( 16#398#),Wide_Character'Val( 16#398#), 184),
(Wide_Character'Val( 16#3A3#),Wide_Character'Val( 16#3A3#), 185),
(Wide_Character'Val( 16#3A6#),Wide_Character'Val( 16#3A6#), 186),
(Wide_Character'Val( 16#3A9#),Wide_Character'Val( 16#3A9#), 187),
(Wide_Character'Val( 16#3B1#),Wide_Character'Val( 16#3B1#), 188),
(Wide_Character'Val( 16#3B4#),Wide_Character'Val( 16#3B5#), 189),
(Wide_Character'Val( 16#3C0#),Wide_Character'Val( 16#3C0#), 191),
(Wide_Character'Val( 16#3C3#),Wide_Character'Val( 16#3C4#), 192),
(Wide_Character'Val( 16#3C6#),Wide_Character'Val( 16#3C6#), 194),
(Wide_Character'Val(16#207F#),Wide_Character'Val(16#207F#), 195),
(Wide_Character'Val(16#20A7#),Wide_Character'Val(16#20A7#), 196),
(Wide_Character'Val(16#2219#),Wide_Character'Val(16#221A#), 197),
(Wide_Character'Val(16#221E#),Wide_Character'Val(16#221E#), 199),
(Wide_Character'Val(16#2229#),Wide_Character'Val(16#2229#), 200),
(Wide_Character'Val(16#2248#),Wide_Character'Val(16#2248#), 201),
(Wide_Character'Val(16#2261#),Wide_Character'Val(16#2261#), 202),
(Wide_Character'Val(16#2264#),Wide_Character'Val(16#2265#), 203),
(Wide_Character'Val(16#2310#),Wide_Character'Val(16#2310#), 205),
(Wide_Character'Val(16#2320#),Wide_Character'Val(16#2321#), 206),
(Wide_Character'Val(16#2500#),Wide_Character'Val(16#2500#), 208),
(Wide_Character'Val(16#2502#),Wide_Character'Val(16#2502#), 209),
(Wide_Character'Val(16#250C#),Wide_Character'Val(16#250C#), 210),
(Wide_Character'Val(16#2510#),Wide_Character'Val(16#2510#), 211),
(Wide_Character'Val(16#2514#),Wide_Character'Val(16#2514#), 212),
(Wide_Character'Val(16#2518#),Wide_Character'Val(16#2518#), 213),
(Wide_Character'Val(16#251C#),Wide_Character'Val(16#251C#), 214),
(Wide_Character'Val(16#2524#),Wide_Character'Val(16#2524#), 215),
(Wide_Character'Val(16#252C#),Wide_Character'Val(16#252C#), 216),
(Wide_Character'Val(16#2534#),Wide_Character'Val(16#2534#), 217),
(Wide_Character'Val(16#253C#),Wide_Character'Val(16#253C#), 218),
(Wide_Character'Val(16#2550#),Wide_Character'Val(16#256C#), 219),
(Wide_Character'Val(16#2580#),Wide_Character'Val(16#2580#), 248),
(Wide_Character'Val(16#2584#),Wide_Character'Val(16#2584#), 249),
(Wide_Character'Val(16#2588#),Wide_Character'Val(16#2588#), 250),
(Wide_Character'Val(16#258C#),Wide_Character'Val(16#258C#), 251),
(Wide_Character'Val(16#2590#),Wide_Character'Val(16#2593#), 252),
(Wide_Character'Val(16#25A0#),Wide_Character'Val(16#25A0#), 256));
Backward : Maps.Backward_Map (1 .. 256) :=
(Character'Val( 16#0#),
Character'Val( 16#1#),
Character'Val( 16#2#),
Character'Val( 16#3#),
Character'Val( 16#4#),
Character'Val( 16#5#),
Character'Val( 16#6#),
Character'Val( 16#7#),
Character'Val( 16#8#),
Character'Val( 16#9#),
Character'Val( 16#A#),
Character'Val( 16#B#),
Character'Val( 16#C#),
Character'Val( 16#D#),
Character'Val( 16#E#),
Character'Val( 16#F#),
Character'Val(16#10#),
Character'Val(16#11#),
Character'Val(16#12#),
Character'Val(16#13#),
Character'Val(16#14#),
Character'Val(16#15#),
Character'Val(16#16#),
Character'Val(16#17#),
Character'Val(16#18#),
Character'Val(16#19#),
Character'Val(16#1A#),
Character'Val(16#1B#),
Character'Val(16#1C#),
Character'Val(16#1D#),
Character'Val(16#1E#),
Character'Val(16#1F#),
Character'Val(16#20#),
Character'Val(16#21#),
Character'Val(16#22#),
Character'Val(16#23#),
Character'Val(16#24#),
Character'Val(16#25#),
Character'Val(16#26#),
Character'Val(16#27#),
Character'Val(16#28#),
Character'Val(16#29#),
Character'Val(16#2A#),
Character'Val(16#2B#),
Character'Val(16#2C#),
Character'Val(16#2D#),
Character'Val(16#2E#),
Character'Val(16#2F#),
Character'Val(16#30#),
Character'Val(16#31#),
Character'Val(16#32#),
Character'Val(16#33#),
Character'Val(16#34#),
Character'Val(16#35#),
Character'Val(16#36#),
Character'Val(16#37#),
Character'Val(16#38#),
Character'Val(16#39#),
Character'Val(16#3A#),
Character'Val(16#3B#),
Character'Val(16#3C#),
Character'Val(16#3D#),
Character'Val(16#3E#),
Character'Val(16#3F#),
Character'Val(16#40#),
Character'Val(16#41#),
Character'Val(16#42#),
Character'Val(16#43#),
Character'Val(16#44#),
Character'Val(16#45#),
Character'Val(16#46#),
Character'Val(16#47#),
Character'Val(16#48#),
Character'Val(16#49#),
Character'Val(16#4A#),
Character'Val(16#4B#),
Character'Val(16#4C#),
Character'Val(16#4D#),
Character'Val(16#4E#),
Character'Val(16#4F#),
Character'Val(16#50#),
Character'Val(16#51#),
Character'Val(16#52#),
Character'Val(16#53#),
Character'Val(16#54#),
Character'Val(16#55#),
Character'Val(16#56#),
Character'Val(16#57#),
Character'Val(16#58#),
Character'Val(16#59#),
Character'Val(16#5A#),
Character'Val(16#5B#),
Character'Val(16#5C#),
Character'Val(16#5D#),
Character'Val(16#5E#),
Character'Val(16#5F#),
Character'Val(16#60#),
Character'Val(16#61#),
Character'Val(16#62#),
Character'Val(16#63#),
Character'Val(16#64#),
Character'Val(16#65#),
Character'Val(16#66#),
Character'Val(16#67#),
Character'Val(16#68#),
Character'Val(16#69#),
Character'Val(16#6A#),
Character'Val(16#6B#),
Character'Val(16#6C#),
Character'Val(16#6D#),
Character'Val(16#6E#),
Character'Val(16#6F#),
Character'Val(16#70#),
Character'Val(16#71#),
Character'Val(16#72#),
Character'Val(16#73#),
Character'Val(16#74#),
Character'Val(16#75#),
Character'Val(16#76#),
Character'Val(16#77#),
Character'Val(16#78#),
Character'Val(16#79#),
Character'Val(16#7A#),
Character'Val(16#7B#),
Character'Val(16#7C#),
Character'Val(16#7D#),
Character'Val(16#7E#),
Character'Val(16#7F#),
Character'Val(16#FF#),
Character'Val(16#AD#),
Character'Val(16#9C#),
Character'Val(16#AE#),
Character'Val(16#AA#),
Character'Val(16#F8#),
Character'Val(16#F1#),
Character'Val(16#FD#),
Character'Val(16#E6#),
Character'Val(16#FA#),
Character'Val(16#AF#),
Character'Val(16#AC#),
Character'Val(16#AB#),
Character'Val(16#A8#),
Character'Val(16#A4#),
Character'Val(16#8E#),
Character'Val(16#8F#),
Character'Val(16#92#),
Character'Val(16#80#),
Character'Val(16#90#),
Character'Val(16#A5#),
Character'Val(16#8B#),
Character'Val(16#A6#),
Character'Val(16#99#),
Character'Val(16#9D#),
Character'Val(16#A7#),
Character'Val(16#9A#),
Character'Val(16#97#),
Character'Val(16#8D#),
Character'Val(16#E1#),
Character'Val(16#85#),
Character'Val(16#A0#),
Character'Val(16#83#),
Character'Val(16#84#),
Character'Val(16#86#),
Character'Val(16#91#),
Character'Val(16#87#),
Character'Val(16#8A#),
Character'Val(16#82#),
Character'Val(16#88#),
Character'Val(16#89#),
Character'Val(16#A1#),
Character'Val(16#8C#),
Character'Val(16#A2#),
Character'Val(16#93#),
Character'Val(16#94#),
Character'Val(16#F6#),
Character'Val(16#9B#),
Character'Val(16#A3#),
Character'Val(16#96#),
Character'Val(16#81#),
Character'Val(16#98#),
Character'Val(16#95#),
Character'Val(16#9F#),
Character'Val(16#E2#),
Character'Val(16#E9#),
Character'Val(16#E4#),
Character'Val(16#E8#),
Character'Val(16#EA#),
Character'Val(16#E0#),
Character'Val(16#EB#),
Character'Val(16#EE#),
Character'Val(16#E3#),
Character'Val(16#E5#),
Character'Val(16#E7#),
Character'Val(16#ED#),
Character'Val(16#FC#),
Character'Val(16#9E#),
Character'Val(16#F9#),
Character'Val(16#FB#),
Character'Val(16#EC#),
Character'Val(16#EF#),
Character'Val(16#F7#),
Character'Val(16#F0#),
Character'Val(16#F3#),
Character'Val(16#F2#),
Character'Val(16#A9#),
Character'Val(16#F4#),
Character'Val(16#F5#),
Character'Val(16#C4#),
Character'Val(16#B3#),
Character'Val(16#DA#),
Character'Val(16#BF#),
Character'Val(16#C0#),
Character'Val(16#D9#),
Character'Val(16#C3#),
Character'Val(16#B4#),
Character'Val(16#C2#),
Character'Val(16#C1#),
Character'Val(16#C5#),
Character'Val(16#CD#),
Character'Val(16#BA#),
Character'Val(16#D5#),
Character'Val(16#D6#),
Character'Val(16#C9#),
Character'Val(16#B8#),
Character'Val(16#B7#),
Character'Val(16#BB#),
Character'Val(16#D4#),
Character'Val(16#D3#),
Character'Val(16#C8#),
Character'Val(16#BE#),
Character'Val(16#BD#),
Character'Val(16#BC#),
Character'Val(16#C6#),
Character'Val(16#C7#),
Character'Val(16#CC#),
Character'Val(16#B5#),
Character'Val(16#B6#),
Character'Val(16#B9#),
Character'Val(16#D1#),
Character'Val(16#D2#),
Character'Val(16#CB#),
Character'Val(16#CF#),
Character'Val(16#D0#),
Character'Val(16#CA#),
Character'Val(16#D8#),
Character'Val(16#D7#),
Character'Val(16#CE#),
Character'Val(16#DF#),
Character'Val(16#DC#),
Character'Val(16#DB#),
Character'Val(16#DD#),
Character'Val(16#DE#),
Character'Val(16#B0#),
Character'Val(16#B1#),
Character'Val(16#B2#),
Character'Val(16#FE#));
function Decode (Char : Character) return Wide_Character is
begin
return Decode (Char, Forward);
end Decode;
procedure Decode
(Text : in Raw_String;
Text_Last : out Natural;
Result : out Wide_String;
Result_Last : out Natural;
Map : in Encoding := Encodings.CP_861)
is
begin
Decode (Text, Text_Last, Result, Result_Last, Forward);
end Decode;
procedure Encode
(Text : in Wide_String;
Text_Last : out Natural;
Result : out Raw_String;
Result_Last : out Natural;
Map : in Encoding := Encodings.CP_861)
is
begin
Encode (Text, Text_Last, Result, Result_Last,
Ranges, Backward);
end Encode;
begin
Encoder_List (Encodings.CP_861) := Encode'Access;
Decoder_List (Encodings.CP_861) := Decode'Access;
end Encodings.Maps.CP_861;
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, Maxim Reznik
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of the Maxim Reznik, IE nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
| 37.630268 | 79 | 0.604643 |
0e2daf2fa696342e3ec6ccd3a65105dc83bbcd75 | 4,708 | ads | Ada | tools/scitools/conf/understand/ada/ada12/s-valdec.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | 1 | 2020-01-20T21:26:46.000Z | 2020-01-20T21:26:46.000Z | tools/scitools/conf/understand/ada/ada12/s-valdec.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | tools/scitools/conf/understand/ada/ada12/s-valdec.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . V A L _ D E C --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains routines for scanning decimal values where the size
-- of the type is no greater than Standard.Integer'Size, for use in Text_IO.
-- Decimal_IO, and the Value attribute for such decimal types.
package System.Val_Dec is
pragma Pure;
function Scan_Decimal
(Str : String;
Ptr : not null access Integer;
Max : Integer;
Scale : Integer) return Integer;
-- This function scans the string starting at Str (Ptr.all) for a valid
-- real literal according to the syntax described in (RM 3.5(43)). The
-- substring scanned extends no further than Str (Max). There are three
-- cases for the return:
--
-- If a valid real literal is found after scanning past any initial spaces,
-- then Ptr.all is updated past the last character of the literal (but
-- trailing spaces are not scanned out). The value returned is the value
-- Integer'Integer_Value (decimal-literal-value), using the given Scale
-- to determine this value.
--
-- If no valid real literal is found, then Ptr.all points either to an
-- initial non-digit character, or to Max + 1 if the field is all spaces
-- and the exception Constraint_Error is raised.
--
-- If a syntactically valid integer is scanned, but the value is out of
-- range, or, in the based case, the base value is out of range or there
-- is an out of range digit, then Ptr.all points past the integer, and
-- Constraint_Error is raised.
--
-- Note: these rules correspond to the requirements for leaving the
-- pointer positioned in Text_Io.Get
--
-- Note: if Str is null, i.e. if Max is less than Ptr, then this is a
-- special case of an all-blank string, and Ptr is unchanged, and hence
-- is greater than Max as required in this case.
function Value_Decimal (Str : String; Scale : Integer) return Integer;
-- Used in computing X'Value (Str) where X is a decimal types whose size
-- does not exceed Standard.Integer'Size. Str is the string argument of
-- the attribute. Constraint_Error is raised if the string is malformed
-- or if the value is out of range, otherwise the value returned is the
-- value Integer'Integer_Value (decimal-literal-value), using the given
-- Scale to determine this value.
end System.Val_Dec;
| 58.85 | 79 | 0.49554 |
10f9810a8a0f132ecb8d4d796000604caefb2e36 | 3,191 | ads | Ada | src/skill-field_restrictions.ads | skill-lang/adaCommon | b27bccb8fa1c8b299ab98a82741a648183e41d3c | [
"BSD-3-Clause"
] | null | null | null | src/skill-field_restrictions.ads | skill-lang/adaCommon | b27bccb8fa1c8b299ab98a82741a648183e41d3c | [
"BSD-3-Clause"
] | null | null | null | src/skill-field_restrictions.ads | skill-lang/adaCommon | b27bccb8fa1c8b299ab98a82741a648183e41d3c | [
"BSD-3-Clause"
] | null | null | null | -- ___ _ ___ _ _ --
-- / __| |/ (_) | | Common SKilL implementation --
-- \__ \ ' <| | | |__ runtime field restriction handling --
-- |___/_|\_\_|_|____| by: Timm Felden --
-- --
pragma Ada_2012;
with Ada.Containers.Vectors;
with Ada.Unchecked_Conversion;
with Skill.Types;
package Skill.Field_Restrictions is
pragma Warnings (Off);
use type Skill.Types.Annotation;
type Base_T is abstract tagged null record;
-- ID as of SkillTR
function Id (This : access Base_T) return Integer is abstract;
type Base is access all Base_T'Class;
package Vector_P is new Ada.Containers.Vectors (Natural, Base);
subtype Vector is Vector_P.Vector;
function Empty return Vector is
(Vector_P.Empty_Vector);
type Checkable_T is abstract new Base_T with null record;
function Id (This : access Checkable_T) return Integer is abstract;
-- checks argument v, return true iff argument fulfills the condition
function Check (This : access Checkable_T; V : Skill.Types.Box)
return Boolean is abstract;
type Checkable is access all Checkable_T'Class;
-- just because Ada sucks
function To is new Ada.Unchecked_Conversion(Base, Checkable);
function To is new Ada.Unchecked_Conversion(Skill.Types.Box, Skill.Types.Annotation);
type Nonnull_T is new Checkable_T with null record;
overriding
function Id (This : access Nonnull_T) return Integer is
(0);
overriding
function Check (This : access Nonnull_T; V : Skill.Types.Box)
return Boolean is
(To(V)/=null);
-- returns the nonnull instance
function Nonnull return Base;
generic
type T is private;
package Default is
type Restriction is new Base_T with record
Value : T;
end record;
type Ref is access Restriction;
overriding
function Id (This : access Restriction) return Integer is
(1);
end Default;
generic
type T is private;
With function "<=" (L,R : T) return Boolean is <>;
With function To (V : Skill.Types.Box) return T is <>;
package Rage is
type Restriction is new Checkable_T with record
Min : T;
Max : T;
end record;
type Ref is access Restriction;
overriding
function Id (This : access Restriction) return Integer is
(3);
overriding
function Check (This : access Restriction; V : Skill.Types.Box)
return Boolean is
(This.Min <= To(V) and then To(V) <= This.Max);
end Rage;
type Coding_T is new Base_T with record
Name : Skill.Types.String_Access;
end record;
overriding
function Id (This : access Coding_T) return Integer is
(5);
type Constant_Length_Pointer_T is new Base_T with null record;
overriding
function Id (This : access Constant_Length_Pointer_T) return Integer is
(7);
function Constant_Length_Pointer return Base;
end Skill.Field_Restrictions;
| 30.682692 | 88 | 0.622375 |
2057a63ac6ee67d20938414a2d1fbc3d7f8d3453 | 3,471 | ads | Ada | source/opm/matreshka-transactions.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/opm/matreshka-transactions.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/opm/matreshka-transactions.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Orthogonal Persistence Manager --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2009, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
package Matreshka.Transactions is
procedure Start;
procedure Commit;
procedure Rollback;
end Matreshka.Transactions;
| 64.277778 | 78 | 0.404206 |
39446dfc96ab3a9d26756edee864a8e0bfa90641 | 6,110 | adb | Ada | source/sql/matreshka-internals-sql_parameter_sets.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/sql/matreshka-internals-sql_parameter_sets.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/sql/matreshka-internals-sql_parameter_sets.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- SQL Database Access --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
package body Matreshka.Internals.SQL_Parameter_Sets is
-----------
-- Alias --
-----------
procedure Alias
(Self : in out Parameter_Set;
Name : League.Strings.Universal_String) is
begin
raise Program_Error;
end Alias;
------------
-- Append --
------------
procedure Append
(Self : in out Parameter_Set;
Name : League.Strings.Universal_String)
is
Value : League.Holders.Holder;
begin
Self.Names.Insert (Integer (Self.Names.Length) + 1, Name);
Self.Values.Insert (Name, Value);
end Append;
-----------
-- Clear --
-----------
procedure Clear (Self : in out Parameter_Set) is
begin
null;
end Clear;
-------------------
-- Has_Parameter --
-------------------
function Has_Parameter
(Self : Parameter_Set;
Name : League.Strings.Universal_String) return Boolean is
begin
return Self.Values.Contains (Name);
end Has_Parameter;
----------
-- Hash --
----------
function Hash (Item : Positive) return Ada.Containers.Hash_Type is
begin
return Ada.Containers.Hash_Type (Item);
end Hash;
-----------
-- Index --
-----------
function Index
(Self : Parameter_Set;
Name : League.Strings.Universal_String) return Integer
is
use type League.Strings.Universal_String;
Position : Integer_Maps.Cursor := Self.Names.First;
begin
while Integer_Maps.Has_Element (Position) loop
if Integer_Maps.Element (Position) = Name then
return Integer_Maps.Key (Position);
end if;
Integer_Maps.Next (Position);
end loop;
raise Program_Error;
end Index;
---------------------
-- Number_Of_Named --
---------------------
function Number_Of_Named (Self : Parameter_Set) return Natural is
begin
return Natural (Self.Values.Length);
end Number_Of_Named;
--------------------------
-- Number_Of_Positional --
--------------------------
function Number_Of_Positional (Self : Parameter_Set) return Natural is
begin
return Natural (Self.Names.Length);
end Number_Of_Positional;
---------------
-- Set_Value --
---------------
procedure Set_Value
(Self : in out Parameter_Set;
Name : League.Strings.Universal_String;
Value : League.Holders.Holder) is
begin
if Self.Values.Contains (Name) then
Self.Values.Replace (Name, Value);
end if;
end Set_Value;
-----------
-- Value --
-----------
function Value
(Self : Parameter_Set; Index : Positive) return League.Holders.Holder is
begin
return Self.Values.Element (Self.Names.Element (Index));
end Value;
end Matreshka.Internals.SQL_Parameter_Sets;
| 36.153846 | 78 | 0.47234 |
0b6060b9387d159c2d7c7dbb99a1b74c7f4aec32 | 3,274 | adb | Ada | problems/033/a033.adb | melwyncarlo/ProjectEuler | c4d30ed528ae6de82232f3d2044d608c6e8f1c37 | [
"MIT"
] | null | null | null | problems/033/a033.adb | melwyncarlo/ProjectEuler | c4d30ed528ae6de82232f3d2044d608c6e8f1c37 | [
"MIT"
] | null | null | null | problems/033/a033.adb | melwyncarlo/ProjectEuler | c4d30ed528ae6de82232f3d2044d608c6e8f1c37 | [
"MIT"
] | null | null | null | with Ada.Strings.Fixed;
with Ada.Integer_Text_IO;
-- Copyright 2021 Melwyn Francis Carlo
procedure A033 is
use Ada.Strings.Fixed;
use Ada.Integer_Text_IO;
Products_List : array (Integer range 1 .. 4, 1 .. 2) of Integer;
Value_1, Value_2 : Float;
Count_Val : Integer := 1;
Reduced : Boolean;
I, Temp_Num_11, Temp_Num_12, Temp_Num_21,
Temp_Num_22, Temp_Num_3, Temp_Num_4 : Integer;
begin
for I in 10 .. 50 loop
for J in 10 .. 99 loop
if I >= J or (I mod 10) = 0 or (J mod 10) = 0 then
goto Continue;
end if;
Temp_Num_11 := Character'Pos (Trim (Integer'Image (I),
Ada.Strings.Both) (1)) - Character'Pos ('0');
Temp_Num_12 := Character'Pos (Trim (Integer'Image (I),
Ada.Strings.Both) (2)) - Character'Pos ('0');
Temp_Num_21 := Character'Pos (Trim (Integer'Image (J),
Ada.Strings.Both) (1)) - Character'Pos ('0');
Temp_Num_22 := Character'Pos (Trim (Integer'Image (J),
Ada.Strings.Both) (2)) - Character'Pos ('0');
Temp_Num_3 := 99999;
Temp_Num_4 := 99999;
if Temp_Num_11 = Temp_Num_21 and Temp_Num_12 /= Temp_Num_22 then
Temp_Num_3 := Temp_Num_12;
Temp_Num_4 := Temp_Num_22;
elsif Temp_Num_11 = Temp_Num_22 and Temp_Num_12 /= Temp_Num_21 then
Temp_Num_3 := Temp_Num_12;
Temp_Num_4 := Temp_Num_21;
elsif Temp_Num_12 = Temp_Num_21 and Temp_Num_11 /= Temp_Num_22 then
Temp_Num_3 := Temp_Num_11;
Temp_Num_4 := Temp_Num_22;
elsif Temp_Num_12 = Temp_Num_22 and Temp_Num_11 /= Temp_Num_21 then
Temp_Num_3 := Temp_Num_11;
Temp_Num_4 := Temp_Num_21;
end if;
if Temp_Num_3 /= 99999 then
Value_1 := (Float'Floor (Float (I) * 1.0E5 / Float (J))) / 1.0E5;
Value_2 := (Float'Floor (Float (Temp_Num_3) * 1.0E5 /
Float (Temp_Num_4))) / 1.0E5;
if (Value_1 - Value_2) < 1.0E-5
and (Value_1 - Value_2) > -1.0E-5
then
Products_List (Count_Val, 1) := I;
Products_List (Count_Val, 2) := J;
Count_Val := Count_Val + 1;
end if;
end if;
<<Continue>>
end loop;
end loop;
Products_List (1, 1) := Products_List (1, 1) * Products_List (2, 1)
* Products_List (3, 1) * Products_List (4, 1);
Products_List (1, 2) := Products_List (1, 2) * Products_List (2, 2)
* Products_List (3, 2) * Products_List (4, 2);
while Products_List (1, 1) /= 1 and Products_List (1, 2) /= 1 loop
I := 2;
Reduced := False;
while not Reduced loop
if (Products_List (1, 1) mod I) = 0
and (Products_List (1, 2) mod I) = 0
then
Products_List (1, 1) := Products_List (1, 1) / I;
Products_List (1, 2) := Products_List (1, 2) / I;
Reduced := True;
else
I := I + 1;
end if;
end loop;
end loop;
Put (Products_List (1, 2), Width => 0);
end A033;
| 27.057851 | 77 | 0.527184 |
0ebb96536f257c7cc39abe17809bd5f2df6b1d15 | 4,346 | adb | Ada | arch/ARM/STM32/driversF1/stm32-afio.adb | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | 2 | 2018-05-16T03:56:39.000Z | 2019-07-31T13:53:56.000Z | arch/ARM/STM32/driversF1/stm32-afio.adb | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | null | null | null | arch/ARM/STM32/driversF1/stm32-afio.adb | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2017, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of STMicroelectronics nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
-- --
------------------------------------------------------------------------------
with STM32_SVD.EXTI; use STM32_SVD.EXTI;
with STM32_SVD.AFIO; use STM32_SVD.AFIO;
with STM32.Device; use STM32.Device;
with STM32.EXTI;
package body STM32.AFIO is
procedure Connect_External_Interrupt
(Port : GPIO_Port;
Pin : GPIO_Pin_Index)
is
Port_Id : constant UInt4 := GPIO_Port_Representation (Port);
begin
-- Finally we assign the port 'number' to the EXTI_n value within the
-- control register. We depend upon the Port enumerals' underlying
-- numeric representation values matching what the hardware expects,
-- that is, the values 0 .. n-1, which we get automatically unless
-- overridden.
case Pin is
when 0 .. 3 =>
AFIO_Periph.EXTICR1.EXTI.Arr (Pin) := Port_Id;
when 4 .. 7 =>
AFIO_Periph.EXTICR2.EXTI.Arr (Pin) := Port_Id;
when 8 .. 11 =>
AFIO_Periph.EXTICR3.EXTI.Arr (Pin) := Port_Id;
when 12 .. 15 =>
AFIO_Periph.EXTICR4.EXTI.Arr (Pin) := Port_Id;
end case;
end Connect_External_Interrupt;
procedure Connect_External_Interrupt (Port : GPIO_Port; Pin : GPIO_Pin)
is
begin
Connect_External_Interrupt (Port, GPIO_Pin'Pos (Pin));
end Connect_External_Interrupt;
procedure Connect_External_Interrupt
(Point : GPIO_Point)
is
begin
Connect_External_Interrupt (Point.Periph.all, Point.Pin);
end Connect_External_Interrupt;
procedure Connect_External_Interrupt
(Port : GPIO_Port; Pins : GPIO_Pins)
is
begin
for Pin of Pins loop
Connect_External_Interrupt (Port, Pin);
end loop;
end Connect_External_Interrupt;
procedure Clear_External_Interrupt (Pin : GPIO_Pin)
is
use STM32.EXTI;
begin
Clear_External_Interrupt (External_Line_Number'Val (GPIO_Pin'Pos (Pin)));
end Clear_External_Interrupt;
end STM32.AFIO;
| 46.731183 | 79 | 0.567418 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.