CombinedText
stringlengths 4
3.42M
|
|---|
------------------------------------------------------------------------------
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
with Ada.Streams.Stream_IO;
with Ada.Strings.Fixed;
with Ada.Characters.Latin_1;
with Ada.Characters.Handling;
with Ada.Characters.Conversions;
with Registrar.Registration;
separate (Repositories)
procedure Generate_Repo_Spec (Index: Repository_Index) is
use Unit_Names;
function To_Wide_Wide_String (Item: in String) return Wide_Wide_String
renames Ada.Characters.Conversions.To_Wide_Wide_String;
Repo: constant Repository := All_Repositories.Extract (Index);
Tab: constant String := (1 .. 4 => ' ');
Trimmed_Index: constant String
:= Ada.Strings.Fixed.Trim (Source => Repository_Index'Image(Index),
Side => Ada.Strings.Both);
File_Name: constant String
:= "aura-repository_" & Trimmed_Index & ".ads";
Format_Value: constant String
:= Ada.Characters.Handling.To_Lower
(Repository_Format'Image (Repo.Format));
generic
Stream: not null access Ada.Streams.Root_Stream_Type'Class;
procedure Generic_Generator;
procedure Generic_Generator is
procedure New_Line is
begin
Character'Write (Stream, Ada.Characters.Latin_1.LF);
end New_Line;
procedure Put_Line (Item: in String) is
begin
String'Write (Stream, Item);
New_Line;
end Put_Line;
begin
Put_Line
("-- This specification was automatically generated by the AURA CLI");
Put_Line
("-- DO NOT MODIFY THIS FILE MANUALLY");
New_Line;
Put_Line ("package AURA.Repository_" & Trimmed_Index & " with Pure is");
New_Line;
Put_Line (Tab & "Format : constant Repository_Format := "
& Format_Value & ';');
Put_Line (Tab & "Location: constant String := """
& UBS.To_String (Repo.Location) & """;");
if UBS.Length (Repo.Snapshot) > 0 then
Put_Line (Tab & "Snapshot: constant String := """
& UBS.To_String (Repo.Snapshot)
& """;");
end if;
case Repo.Format is
when System | Local =>
-- Nothing left to add
null;
when Git =>
if UBS.Length (Repo.Tracking_Branch) > 0 then
New_Line;
Put_Line (Tab & "Tracking_Branch: constant String := """
& UBS.To_String (Repo.Tracking_Branch)
& """;");
end if;
end case;
New_Line;
Put_Line ("end AURA.Repository_" & Trimmed_Index & ';');
end Generic_Generator;
Lookup_Name: Unit_Name;
begin
-- See if the repo spec has already been entered by the Registrar.
Lookup_Name.Set_Name
("AURA.Repository_" & To_Wide_Wide_String (Trimmed_Index));
if Reg_Qs.Unit_Entered (Lookup_Name) then
declare
use Registrar.Library_Units;
use Registrar.Source_Files;
Existing_Spec: constant Library_Unit
:= Reg_Qs.Lookup_Unit (Lookup_Name);
Spec_Source: aliased Source_Stream
:= Checkout_Write_Stream (Source => Existing_Spec.Spec_File,
Rewrite => True);
procedure Generate is new Generic_Generator (Spec_Source'Access);
begin
Generate;
end;
else
-- New repo from scratch
declare
use Ada.Streams.Stream_IO;
New_Spec: File_Type;
begin
Create (File => New_Spec,
Name => File_Name);
declare
procedure Generate is new Generic_Generator (Stream (New_Spec));
begin
Generate;
end;
Close (New_Spec);
end;
-- Now that the spec file has been created, we need to find the
-- directory entry to submit to Enter_Unit
declare
use Ada.Directories;
Search : Search_Type;
Specent: Directory_Entry_Type;
begin
Start_Search (Search => Search,
Directory => Current_Directory,
Pattern => File_Name);
Assert (Check => More_Entries (Search),
Message => "Error generating Repository spec - cannot find "
& "generated file!");
Get_Next_Entry (Search => Search, Directory_Entry => Specent);
Registrar.Registration.Enter_Unit (Specent);
End_Search (Search);
end;
end if;
end Generate_Repo_Spec;
|
-- Swagger Petstore
-- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
--
-- OpenAPI spec version: 1.0.0
-- Contact: apiteam@swagger.io
--
-- NOTE: This package is auto generated by the swagger code generator 1.5.0.
-- https://github.com/swagger-api/swagger-codegen.git
-- Do not edit the class manually.with IO.OpenAPI.Model.Default;
with Swagger.Streams;
with Ada.Containers.Vectors;
package IO.OpenAPI.Api.Models is
end IO.OpenAPI.Api.Models;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ADA.STRINGS.WIDE_UNBOUNDED.WIDE_TEXT_IO --
-- --
-- B o d y --
-- --
-- Copyright (C) 1997-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Wide_Text_IO; use Ada.Wide_Text_IO;
package body Ada.Strings.Wide_Unbounded.Wide_Text_IO is
--------------
-- Get_Line --
--------------
function Get_Line return Unbounded_Wide_String is
Buffer : Wide_String (1 .. 1000);
Last : Natural;
Str1 : Wide_String_Access;
Str2 : Wide_String_Access;
Result : Unbounded_Wide_String;
begin
Get_Line (Buffer, Last);
Str1 := new Wide_String'(Buffer (1 .. Last));
while Last = Buffer'Last loop
Get_Line (Buffer, Last);
Str2 := new Wide_String (1 .. Str1'Last + Last);
Str2 (Str1'Range) := Str1.all;
Str2 (Str1'Last + 1 .. Str2'Last) := Buffer (1 .. Last);
Free (Str1);
Str1 := Str2;
end loop;
Result.Reference := Str1;
Result.Last := Str1'Length;
return Result;
end Get_Line;
function Get_Line
(File : Ada.Wide_Text_IO.File_Type) return Unbounded_Wide_String
is
Buffer : Wide_String (1 .. 1000);
Last : Natural;
Str1 : Wide_String_Access;
Str2 : Wide_String_Access;
Result : Unbounded_Wide_String;
begin
Get_Line (File, Buffer, Last);
Str1 := new Wide_String'(Buffer (1 .. Last));
while Last = Buffer'Last loop
Get_Line (File, Buffer, Last);
Str2 := new Wide_String (1 .. Str1'Last + Last);
Str2 (Str1'Range) := Str1.all;
Str2 (Str1'Last + 1 .. Str2'Last) := Buffer (1 .. Last);
Free (Str1);
Str1 := Str2;
end loop;
Result.Reference := Str1;
Result.Last := Str1'Length;
return Result;
end Get_Line;
procedure Get_Line (Item : out Unbounded_Wide_String) is
begin
Get_Line (Current_Input, Item);
end Get_Line;
procedure Get_Line
(File : Ada.Wide_Text_IO.File_Type;
Item : out Unbounded_Wide_String)
is
begin
-- We are going to read into the string that is already there and
-- allocated. Hopefully it is big enough now, if not, we will extend
-- it in the usual manner using Realloc_For_Chunk.
-- Make sure we start with at least 80 characters
if Item.Reference'Last < 80 then
Realloc_For_Chunk (Item, 80);
end if;
-- Loop to read data, filling current string as far as possible.
-- Item.Last holds the number of characters read so far.
Item.Last := 0;
loop
Get_Line
(File,
Item.Reference (Item.Last + 1 .. Item.Reference'Last),
Item.Last);
-- If we hit the end of the line before the end of the buffer, then
-- we are all done, and the result length is properly set.
if Item.Last < Item.Reference'Last then
return;
end if;
-- If not enough room, double it and keep reading
Realloc_For_Chunk (Item, Item.Last);
end loop;
end Get_Line;
---------
-- Put --
---------
procedure Put (U : Unbounded_Wide_String) is
begin
Put (U.Reference (1 .. U.Last));
end Put;
procedure Put (File : File_Type; U : Unbounded_Wide_String) is
begin
Put (File, U.Reference (1 .. U.Last));
end Put;
--------------
-- Put_Line --
--------------
procedure Put_Line (U : Unbounded_Wide_String) is
begin
Put_Line (U.Reference (1 .. U.Last));
end Put_Line;
procedure Put_Line (File : File_Type; U : Unbounded_Wide_String) is
begin
Put_Line (File, U.Reference (1 .. U.Last));
end Put_Line;
end Ada.Strings.Wide_Unbounded.Wide_Text_IO;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . C G I . C O O K I E --
-- --
-- S p e c --
-- --
-- Copyright (C) 2000-2010, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This is a package to interface a GNAT program with a Web server via the
-- Common Gateway Interface (CGI). It exports services to deal with Web
-- cookies (piece of information kept in the Web client software).
-- The complete CGI Cookie specification can be found in the RFC2109 at:
-- http://www.ics.uci.edu/pub/ietf/http/rfc2109.txt
-- This package builds up data tables whose memory is not released. A CGI
-- program is expected to be a short lived program and so it is adequate to
-- have the underlying OS free the program on exit.
package GNAT.CGI.Cookie is
-- The package will initialize itself by parsing the HTTP_Cookie runtime
-- CGI environment variable during elaboration but we do not want to raise
-- an exception at this time, so the exception Data_Error is deferred and
-- will be raised when calling any services below (except for Ok).
Cookie_Not_Found : exception;
-- This exception is raised when a specific parameter is not found
procedure Put_Header
(Header : String := Default_Header;
Force : Boolean := False);
-- Output standard CGI header by default. This header must be returned
-- back to the server at the very beginning and will be output only for
-- the first call to Put_Header if Force is set to False. This procedure
-- also outputs the Cookies that have been defined. If the program uses
-- the GNAT.CGI.Put_Header service, cookies will not be set.
--
-- Cookies are passed back to the server in the header, the format is:
--
-- Set-Cookie: <key>=<value>; comment=<comment>; domain=<domain>;
-- max_age=<max_age>; path=<path>[; secured]
function Ok return Boolean;
-- Returns True if the CGI cookie environment is valid and False otherwise.
-- Every service used when the CGI environment is not valid will raise the
-- exception Data_Error.
function Count return Natural;
-- Returns the number of cookies received by the CGI
function Value
(Key : String;
Required : Boolean := False) return String;
-- Returns the cookie value associated with the cookie named Key. If cookie
-- does not exist, returns an empty string if Required is False and raises
-- the exception Cookie_Not_Found otherwise.
function Value (Position : Positive) return String;
-- Returns the value associated with the cookie number Position of the CGI.
-- It raises Cookie_Not_Found if there is no such cookie (i.e. Position >
-- Count)
function Exists (Key : String) return Boolean;
-- Returns True if the cookie named Key exist and False otherwise
function Key (Position : Positive) return String;
-- Returns the key associated with the cookie number Position of the CGI.
-- It raises Cookie_Not_Found if there is no such cookie (i.e. Position >
-- Count)
procedure Set
(Key : String;
Value : String;
Comment : String := "";
Domain : String := "";
Max_Age : Natural := Natural'Last;
Path : String := "/";
Secure : Boolean := False);
-- Add a cookie to the list of cookies. This will be sent back to the
-- server by the Put_Header service above.
generic
with procedure
Action
(Key : String;
Value : String;
Position : Positive;
Quit : in out Boolean);
procedure For_Every_Cookie;
-- Iterate through all cookies received from the server and call
-- the Action supplied procedure. The Key, Value parameters are set
-- appropriately, Position is the cookie order in the list, Quit is set to
-- True by default. Quit can be set to False to control the iterator
-- termination.
end GNAT.CGI.Cookie;
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
-- Trivial implementation of library declarations
with Program.Library_Unit_Bodies;
with Program.Library_Unit_Declarations;
with Program.Compilation_Unit_Vectors;
with Program.Units.Vectors;
package Program.Units.Declarations is
pragma Preelaborate;
type Unit_Declaration is new Unit
and Program.Library_Unit_Declarations.Library_Unit_Declaration
with private;
procedure Initialize
(Self : in out Unit_Declaration;
Compilation : Program.Compilations.Compilation_Access;
Full_Name : Text;
Context_Clause : Program.Element_Vectors.Element_Vector_Access;
Declaration : not null Program.Elements.Element_Access;
Parent : Program.Library_Unit_Declarations
.Library_Unit_Declaration_Access);
procedure Append_Child
(Self : in out Unit_Declaration;
Value : Program.Compilation_Units.Compilation_Unit_Access);
procedure Set_Body
(Self : in out Unit_Declaration;
Value : Program.Library_Unit_Bodies.Library_Unit_Body_Access);
private
type Unit_Declaration is new Unit
and Program.Library_Unit_Declarations.Library_Unit_Declaration
with
record
Parent : Program.Library_Unit_Declarations
.Library_Unit_Declaration_Access;
Impl : Program.Library_Unit_Bodies.Library_Unit_Body_Access;
Childern : aliased Program.Units.Vectors.Unit_Vector;
end record;
overriding function Parent (Self : access Unit_Declaration)
return Program.Library_Unit_Declarations.Library_Unit_Declaration_Access;
overriding function Corresponding_Body (Self : access Unit_Declaration)
return Program.Library_Unit_Bodies.Library_Unit_Body_Access;
overriding function Corresponding_Childern
(Self : access Unit_Declaration)
return Program.Compilation_Unit_Vectors.Compilation_Unit_Vector_Access;
overriding function Is_Library_Unit_Declaration_Unit
(Self : Unit_Declaration) return Boolean;
end Program.Units.Declarations;
|
-- { dg-do run }
procedure Discr33 is
subtype Int is Integer range 1..100;
type T (D : Int := 1) is
record
A : Integer;
B : String (1..D);
C : aliased Integer;
end record;
Var : T := (D => 1, A => 1234, B => "x", C => 4567);
type Int_Ref is access all Integer;
Pointer_To_C : Int_Ref := Var.C'Access;
begin
if Pointer_To_C.all /= 4567 then
raise Program_Error;
end if;
Var := (D => 26, A => 1234, B => "abcdefghijklmnopqrstuvwxyz", C => 2345);
if Pointer_To_C.all /= 2345 then
raise Program_Error;
end if;
end Discr33;
|
-----------------------------------------------------------------------
-- AWA.Blogs.Models -- AWA.Blogs.Models
-----------------------------------------------------------------------
-- File generated by ada-gen DO NOT MODIFY
-- Template used: templates/model/package-body.xhtml
-- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095
-----------------------------------------------------------------------
-- Copyright (C) 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
with Util.Beans.Objects.Time;
with ASF.Events.Faces.Actions;
with AWA.Events.Action_Method;
package body AWA.Blogs.Models is
use type ADO.Objects.Object_Record_Access;
use type ADO.Objects.Object_Ref;
use type ADO.Objects.Object_Record;
pragma Warnings (Off, "formal parameter * is not referenced");
function Blog_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => BLOG_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Blog_Key;
function Blog_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => BLOG_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Blog_Key;
function "=" (Left, Right : Blog_Ref'Class) return Boolean is
begin
return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right);
end "=";
procedure Set_Field (Object : in out Blog_Ref'Class;
Impl : out Blog_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Blog_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
procedure Allocate (Object : in out Blog_Ref) is
Impl : Blog_Access;
begin
Impl := new Blog_Impl;
Impl.Version := 0;
Impl.Create_Date := ADO.DEFAULT_TIME;
Impl.Update_Date := ADO.DEFAULT_TIME;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Blog
-- ----------------------------------------
procedure Set_Id (Object : in out Blog_Ref;
Value : in ADO.Identifier) is
Impl : Blog_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value);
end Set_Id;
function Get_Id (Object : in Blog_Ref)
return ADO.Identifier is
Impl : constant Blog_Access
:= Blog_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
procedure Set_Name (Object : in out Blog_Ref;
Value : in String) is
Impl : Blog_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 2, Impl.Name, Value);
end Set_Name;
procedure Set_Name (Object : in out Blog_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Blog_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 2, Impl.Name, Value);
end Set_Name;
function Get_Name (Object : in Blog_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Name);
end Get_Name;
function Get_Name (Object : in Blog_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Blog_Access
:= Blog_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Name;
end Get_Name;
function Get_Version (Object : in Blog_Ref)
return Integer is
Impl : constant Blog_Access
:= Blog_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Version;
end Get_Version;
procedure Set_Uid (Object : in out Blog_Ref;
Value : in String) is
Impl : Blog_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 4, Impl.Uid, Value);
end Set_Uid;
procedure Set_Uid (Object : in out Blog_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Blog_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 4, Impl.Uid, Value);
end Set_Uid;
function Get_Uid (Object : in Blog_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Uid);
end Get_Uid;
function Get_Uid (Object : in Blog_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Blog_Access
:= Blog_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Uid;
end Get_Uid;
procedure Set_Create_Date (Object : in out Blog_Ref;
Value : in Ada.Calendar.Time) is
Impl : Blog_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 5, Impl.Create_Date, Value);
end Set_Create_Date;
function Get_Create_Date (Object : in Blog_Ref)
return Ada.Calendar.Time is
Impl : constant Blog_Access
:= Blog_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Create_Date;
end Get_Create_Date;
procedure Set_Update_Date (Object : in out Blog_Ref;
Value : in Ada.Calendar.Time) is
Impl : Blog_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 6, Impl.Update_Date, Value);
end Set_Update_Date;
function Get_Update_Date (Object : in Blog_Ref)
return Ada.Calendar.Time is
Impl : constant Blog_Access
:= Blog_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Update_Date;
end Get_Update_Date;
procedure Set_Url (Object : in out Blog_Ref;
Value : in String) is
Impl : Blog_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 7, Impl.Url, Value);
end Set_Url;
procedure Set_Url (Object : in out Blog_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Blog_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 7, Impl.Url, Value);
end Set_Url;
function Get_Url (Object : in Blog_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Url);
end Get_Url;
function Get_Url (Object : in Blog_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Blog_Access
:= Blog_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Url;
end Get_Url;
procedure Set_Workspace (Object : in out Blog_Ref;
Value : in AWA.Workspaces.Models.Workspace_Ref'Class) is
Impl : Blog_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 8, Impl.Workspace, Value);
end Set_Workspace;
function Get_Workspace (Object : in Blog_Ref)
return AWA.Workspaces.Models.Workspace_Ref'Class is
Impl : constant Blog_Access
:= Blog_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Workspace;
end Get_Workspace;
-- Copy of the object.
procedure Copy (Object : in Blog_Ref;
Into : in out Blog_Ref) is
Result : Blog_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Blog_Access
:= Blog_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Blog_Access
:= new Blog_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Name := Impl.Name;
Copy.Version := Impl.Version;
Copy.Uid := Impl.Uid;
Copy.Create_Date := Impl.Create_Date;
Copy.Update_Date := Impl.Update_Date;
Copy.Url := Impl.Url;
Copy.Workspace := Impl.Workspace;
end;
end if;
Into := Result;
end Copy;
procedure Find (Object : in out Blog_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Blog_Access := new Blog_Impl;
begin
Impl.Find (Session, Query, Found);
if Found then
ADO.Objects.Set_Object (Object, Impl.all'Access);
else
ADO.Objects.Set_Object (Object, null);
Destroy (Impl);
end if;
end Find;
procedure Load (Object : in out Blog_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Blog_Access := new Blog_Impl;
Found : Boolean;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
raise ADO.Objects.NOT_FOUND;
end if;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Load;
procedure Load (Object : in out Blog_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Blog_Access := new Blog_Impl;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
else
ADO.Objects.Set_Object (Object, Impl.all'Access);
end if;
end Load;
procedure Save (Object : in out Blog_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl = null then
Impl := new Blog_Impl;
ADO.Objects.Set_Object (Object, Impl);
end if;
if not ADO.Objects.Is_Created (Impl.all) then
Impl.Create (Session);
else
Impl.Save (Session);
end if;
end Save;
procedure Delete (Object : in out Blog_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl /= null then
Impl.Delete (Session);
end if;
end Delete;
-- --------------------
-- Free the object
-- --------------------
procedure Destroy (Object : access Blog_Impl) is
type Blog_Impl_Ptr is access all Blog_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Blog_Impl, Blog_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Blog_Impl_Ptr := Blog_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
procedure Find (Object : in out Blog_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, BLOG_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Object.Load (Stmt, Session);
Stmt.Next;
Found := not Stmt.Has_Elements;
else
Found := False;
end if;
end Find;
overriding
procedure Load (Object : in out Blog_Impl;
Session : in out ADO.Sessions.Session'Class) is
Found : Boolean;
Query : ADO.SQL.Query;
Id : constant ADO.Identifier := Object.Get_Key_Value;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Object.Find (Session, Query, Found);
if not Found then
raise ADO.Objects.NOT_FOUND;
end if;
end Load;
procedure Save (Object : in out Blog_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (BLOG_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_1_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (2) then
Stmt.Save_Field (Name => COL_1_1_NAME, -- name
Value => Object.Name);
Object.Clear_Modified (2);
end if;
if Object.Is_Modified (4) then
Stmt.Save_Field (Name => COL_3_1_NAME, -- uid
Value => Object.Uid);
Object.Clear_Modified (4);
end if;
if Object.Is_Modified (5) then
Stmt.Save_Field (Name => COL_4_1_NAME, -- create_date
Value => Object.Create_Date);
Object.Clear_Modified (5);
end if;
if Object.Is_Modified (6) then
Stmt.Save_Field (Name => COL_5_1_NAME, -- update_date
Value => Object.Update_Date);
Object.Clear_Modified (6);
end if;
if Object.Is_Modified (7) then
Stmt.Save_Field (Name => COL_6_1_NAME, -- url
Value => Object.Url);
Object.Clear_Modified (7);
end if;
if Object.Is_Modified (8) then
Stmt.Save_Field (Name => COL_7_1_NAME, -- workspace_id
Value => Object.Workspace);
Object.Clear_Modified (8);
end if;
if Stmt.Has_Save_Fields then
Object.Version := Object.Version + 1;
Stmt.Save_Field (Name => "version",
Value => Object.Version);
Stmt.Set_Filter (Filter => "id = ? and version = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Version - 1);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
else
raise ADO.Objects.LAZY_LOCK;
end if;
end if;
end;
end if;
end Save;
procedure Create (Object : in out Blog_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (BLOG_DEF'Access);
Result : Integer;
begin
Object.Version := 1;
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_0_1_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_1_1_NAME, -- name
Value => Object.Name);
Query.Save_Field (Name => COL_2_1_NAME, -- version
Value => Object.Version);
Query.Save_Field (Name => COL_3_1_NAME, -- uid
Value => Object.Uid);
Query.Save_Field (Name => COL_4_1_NAME, -- create_date
Value => Object.Create_Date);
Query.Save_Field (Name => COL_5_1_NAME, -- update_date
Value => Object.Update_Date);
Query.Save_Field (Name => COL_6_1_NAME, -- url
Value => Object.Url);
Query.Save_Field (Name => COL_7_1_NAME, -- workspace_id
Value => Object.Workspace);
Query.Execute (Result);
if Result /= 1 then
raise ADO.Objects.INSERT_ERROR;
end if;
ADO.Objects.Set_Created (Object);
end Create;
procedure Delete (Object : in out Blog_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (BLOG_DEF'Access);
begin
Stmt.Set_Filter (Filter => "id = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Execute;
end Delete;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Blog_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Blog_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Blog_Impl (Obj.all)'Access;
if Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "name" then
return Util.Beans.Objects.To_Object (Impl.Name);
elsif Name = "uid" then
return Util.Beans.Objects.To_Object (Impl.Uid);
elsif Name = "create_date" then
return Util.Beans.Objects.Time.To_Object (Impl.Create_Date);
elsif Name = "update_date" then
return Util.Beans.Objects.Time.To_Object (Impl.Update_Date);
elsif Name = "url" then
return Util.Beans.Objects.To_Object (Impl.Url);
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
procedure List (Object : in out Blog_Vector;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class) is
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, BLOG_DEF'Access);
begin
Stmt.Execute;
Blog_Vectors.Clear (Object);
while Stmt.Has_Elements loop
declare
Item : Blog_Ref;
Impl : constant Blog_Access := new Blog_Impl;
begin
Impl.Load (Stmt, Session);
ADO.Objects.Set_Object (Item, Impl.all'Access);
Object.Append (Item);
end;
Stmt.Next;
end loop;
end List;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out Blog_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Set_Key_Value (Stmt.Get_Identifier (0));
Object.Name := Stmt.Get_Unbounded_String (1);
Object.Uid := Stmt.Get_Unbounded_String (3);
Object.Create_Date := Stmt.Get_Time (4);
Object.Update_Date := Stmt.Get_Time (5);
Object.Url := Stmt.Get_Unbounded_String (6);
if not Stmt.Is_Null (7) then
Object.Workspace.Set_Key_Value (Stmt.Get_Identifier (7), Session);
end if;
Object.Version := Stmt.Get_Integer (2);
ADO.Objects.Set_Created (Object);
end Load;
function Post_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => POST_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Post_Key;
function Post_Key (Id : in String) return ADO.Objects.Object_Key is
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER,
Of_Class => POST_DEF'Access);
begin
ADO.Objects.Set_Value (Result, Id);
return Result;
end Post_Key;
function "=" (Left, Right : Post_Ref'Class) return Boolean is
begin
return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right);
end "=";
procedure Set_Field (Object : in out Post_Ref'Class;
Impl : out Post_Access) is
Result : ADO.Objects.Object_Record_Access;
begin
Object.Prepare_Modify (Result);
Impl := Post_Impl (Result.all)'Access;
end Set_Field;
-- Internal method to allocate the Object_Record instance
procedure Allocate (Object : in out Post_Ref) is
Impl : Post_Access;
begin
Impl := new Post_Impl;
Impl.Create_Date := ADO.DEFAULT_TIME;
Impl.Version := 0;
Impl.Publish_Date.Is_Null := True;
Impl.Status := AWA.Blogs.Models.Post_Status_Type'First;
Impl.Allow_Comments := False;
Impl.Read_Count := 0;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Allocate;
-- ----------------------------------------
-- Data object: Post
-- ----------------------------------------
procedure Set_Id (Object : in out Post_Ref;
Value : in ADO.Identifier) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value);
end Set_Id;
function Get_Id (Object : in Post_Ref)
return ADO.Identifier is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Object.all)'Access;
begin
return Impl.Get_Key_Value;
end Get_Id;
procedure Set_Title (Object : in out Post_Ref;
Value : in String) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 2, Impl.Title, Value);
end Set_Title;
procedure Set_Title (Object : in out Post_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 2, Impl.Title, Value);
end Set_Title;
function Get_Title (Object : in Post_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Title);
end Get_Title;
function Get_Title (Object : in Post_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Title;
end Get_Title;
procedure Set_Text (Object : in out Post_Ref;
Value : in String) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 3, Impl.Text, Value);
end Set_Text;
procedure Set_Text (Object : in out Post_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 3, Impl.Text, Value);
end Set_Text;
function Get_Text (Object : in Post_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Text);
end Get_Text;
function Get_Text (Object : in Post_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Text;
end Get_Text;
procedure Set_Create_Date (Object : in out Post_Ref;
Value : in Ada.Calendar.Time) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 4, Impl.Create_Date, Value);
end Set_Create_Date;
function Get_Create_Date (Object : in Post_Ref)
return Ada.Calendar.Time is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Create_Date;
end Get_Create_Date;
procedure Set_Uri (Object : in out Post_Ref;
Value : in String) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_String (Impl.all, 5, Impl.Uri, Value);
end Set_Uri;
procedure Set_Uri (Object : in out Post_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 5, Impl.Uri, Value);
end Set_Uri;
function Get_Uri (Object : in Post_Ref)
return String is
begin
return Ada.Strings.Unbounded.To_String (Object.Get_Uri);
end Get_Uri;
function Get_Uri (Object : in Post_Ref)
return Ada.Strings.Unbounded.Unbounded_String is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Uri;
end Get_Uri;
function Get_Version (Object : in Post_Ref)
return Integer is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Version;
end Get_Version;
procedure Set_Publish_Date (Object : in out Post_Ref;
Value : in ADO.Nullable_Time) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Time (Impl.all, 7, Impl.Publish_Date, Value);
end Set_Publish_Date;
function Get_Publish_Date (Object : in Post_Ref)
return ADO.Nullable_Time is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Publish_Date;
end Get_Publish_Date;
procedure Set_Status (Object : in out Post_Ref;
Value : in AWA.Blogs.Models.Post_Status_Type) is
procedure Set_Field_Enum is
new ADO.Objects.Set_Field_Operation (Post_Status_Type);
Impl : Post_Access;
begin
Set_Field (Object, Impl);
Set_Field_Enum (Impl.all, 8, Impl.Status, Value);
end Set_Status;
function Get_Status (Object : in Post_Ref)
return AWA.Blogs.Models.Post_Status_Type is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Status;
end Get_Status;
procedure Set_Allow_Comments (Object : in out Post_Ref;
Value : in Boolean) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Boolean (Impl.all, 9, Impl.Allow_Comments, Value);
ADO.Objects.Set_Field_Boolean (Impl.all, 9, Impl.Allow_Comments, Value);
end Set_Allow_Comments;
function Get_Allow_Comments (Object : in Post_Ref)
return Boolean is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Allow_Comments;
end Get_Allow_Comments;
procedure Set_Read_Count (Object : in out Post_Ref;
Value : in Integer) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Integer (Impl.all, 10, Impl.Read_Count, Value);
end Set_Read_Count;
function Get_Read_Count (Object : in Post_Ref)
return Integer is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Read_Count;
end Get_Read_Count;
procedure Set_Author (Object : in out Post_Ref;
Value : in AWA.Users.Models.User_Ref'Class) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 11, Impl.Author, Value);
end Set_Author;
function Get_Author (Object : in Post_Ref)
return AWA.Users.Models.User_Ref'Class is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Author;
end Get_Author;
procedure Set_Blog (Object : in out Post_Ref;
Value : in AWA.Blogs.Models.Blog_Ref'Class) is
Impl : Post_Access;
begin
Set_Field (Object, Impl);
ADO.Objects.Set_Field_Object (Impl.all, 12, Impl.Blog, Value);
end Set_Blog;
function Get_Blog (Object : in Post_Ref)
return AWA.Blogs.Models.Blog_Ref'Class is
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
begin
return Impl.Blog;
end Get_Blog;
-- Copy of the object.
procedure Copy (Object : in Post_Ref;
Into : in out Post_Ref) is
Result : Post_Ref;
begin
if not Object.Is_Null then
declare
Impl : constant Post_Access
:= Post_Impl (Object.Get_Load_Object.all)'Access;
Copy : constant Post_Access
:= new Post_Impl;
begin
ADO.Objects.Set_Object (Result, Copy.all'Access);
Copy.Copy (Impl.all);
Copy.Title := Impl.Title;
Copy.Text := Impl.Text;
Copy.Create_Date := Impl.Create_Date;
Copy.Uri := Impl.Uri;
Copy.Version := Impl.Version;
Copy.Publish_Date := Impl.Publish_Date;
Copy.Status := Impl.Status;
Copy.Allow_Comments := Impl.Allow_Comments;
Copy.Read_Count := Impl.Read_Count;
Copy.Author := Impl.Author;
Copy.Blog := Impl.Blog;
end;
end if;
Into := Result;
end Copy;
procedure Find (Object : in out Post_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Impl : constant Post_Access := new Post_Impl;
begin
Impl.Find (Session, Query, Found);
if Found then
ADO.Objects.Set_Object (Object, Impl.all'Access);
else
ADO.Objects.Set_Object (Object, null);
Destroy (Impl);
end if;
end Find;
procedure Load (Object : in out Post_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier) is
Impl : constant Post_Access := new Post_Impl;
Found : Boolean;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
raise ADO.Objects.NOT_FOUND;
end if;
ADO.Objects.Set_Object (Object, Impl.all'Access);
end Load;
procedure Load (Object : in out Post_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean) is
Impl : constant Post_Access := new Post_Impl;
Query : ADO.SQL.Query;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Impl.Find (Session, Query, Found);
if not Found then
Destroy (Impl);
else
ADO.Objects.Set_Object (Object, Impl.all'Access);
end if;
end Load;
procedure Save (Object : in out Post_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl = null then
Impl := new Post_Impl;
ADO.Objects.Set_Object (Object, Impl);
end if;
if not ADO.Objects.Is_Created (Impl.all) then
Impl.Create (Session);
else
Impl.Save (Session);
end if;
end Save;
procedure Delete (Object : in out Post_Ref;
Session : in out ADO.Sessions.Master_Session'Class) is
Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object;
begin
if Impl /= null then
Impl.Delete (Session);
end if;
end Delete;
-- --------------------
-- Free the object
-- --------------------
procedure Destroy (Object : access Post_Impl) is
type Post_Impl_Ptr is access all Post_Impl;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Post_Impl, Post_Impl_Ptr);
pragma Warnings (Off, "*redundant conversion*");
Ptr : Post_Impl_Ptr := Post_Impl (Object.all)'Access;
pragma Warnings (On, "*redundant conversion*");
begin
Unchecked_Free (Ptr);
end Destroy;
procedure Find (Object : in out Post_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean) is
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Query, POST_DEF'Access);
begin
Stmt.Execute;
if Stmt.Has_Elements then
Object.Load (Stmt, Session);
Stmt.Next;
Found := not Stmt.Has_Elements;
else
Found := False;
end if;
end Find;
overriding
procedure Load (Object : in out Post_Impl;
Session : in out ADO.Sessions.Session'Class) is
Found : Boolean;
Query : ADO.SQL.Query;
Id : constant ADO.Identifier := Object.Get_Key_Value;
begin
Query.Bind_Param (Position => 1, Value => Id);
Query.Set_Filter ("id = ?");
Object.Find (Session, Query, Found);
if not Found then
raise ADO.Objects.NOT_FOUND;
end if;
end Load;
procedure Save (Object : in out Post_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Update_Statement
:= Session.Create_Statement (POST_DEF'Access);
begin
if Object.Is_Modified (1) then
Stmt.Save_Field (Name => COL_0_2_NAME, -- id
Value => Object.Get_Key);
Object.Clear_Modified (1);
end if;
if Object.Is_Modified (2) then
Stmt.Save_Field (Name => COL_1_2_NAME, -- title
Value => Object.Title);
Object.Clear_Modified (2);
end if;
if Object.Is_Modified (3) then
Stmt.Save_Field (Name => COL_2_2_NAME, -- text
Value => Object.Text);
Object.Clear_Modified (3);
end if;
if Object.Is_Modified (4) then
Stmt.Save_Field (Name => COL_3_2_NAME, -- create_date
Value => Object.Create_Date);
Object.Clear_Modified (4);
end if;
if Object.Is_Modified (5) then
Stmt.Save_Field (Name => COL_4_2_NAME, -- uri
Value => Object.Uri);
Object.Clear_Modified (5);
end if;
if Object.Is_Modified (7) then
Stmt.Save_Field (Name => COL_6_2_NAME, -- publish_date
Value => Object.Publish_Date);
Object.Clear_Modified (7);
end if;
if Object.Is_Modified (8) then
Stmt.Save_Field (Name => COL_7_2_NAME, -- status
Value => Integer (Post_Status_Type'Pos (Object.Status)));
Object.Clear_Modified (8);
end if;
if Object.Is_Modified (9) then
Stmt.Save_Field (Name => COL_8_2_NAME, -- allow_comments
Value => Object.Allow_Comments);
Object.Clear_Modified (9);
end if;
if Object.Is_Modified (10) then
Stmt.Save_Field (Name => COL_9_2_NAME, -- read_count
Value => Object.Read_Count);
Object.Clear_Modified (10);
end if;
if Object.Is_Modified (11) then
Stmt.Save_Field (Name => COL_10_2_NAME, -- author_id
Value => Object.Author);
Object.Clear_Modified (11);
end if;
if Object.Is_Modified (12) then
Stmt.Save_Field (Name => COL_11_2_NAME, -- blog_id
Value => Object.Blog);
Object.Clear_Modified (12);
end if;
if Stmt.Has_Save_Fields then
Object.Version := Object.Version + 1;
Stmt.Save_Field (Name => "version",
Value => Object.Version);
Stmt.Set_Filter (Filter => "id = ? and version = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Add_Param (Value => Object.Version - 1);
declare
Result : Integer;
begin
Stmt.Execute (Result);
if Result /= 1 then
if Result /= 0 then
raise ADO.Objects.UPDATE_ERROR;
else
raise ADO.Objects.LAZY_LOCK;
end if;
end if;
end;
end if;
end Save;
procedure Create (Object : in out Post_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Query : ADO.Statements.Insert_Statement
:= Session.Create_Statement (POST_DEF'Access);
Result : Integer;
begin
Object.Version := 1;
Session.Allocate (Id => Object);
Query.Save_Field (Name => COL_0_2_NAME, -- id
Value => Object.Get_Key);
Query.Save_Field (Name => COL_1_2_NAME, -- title
Value => Object.Title);
Query.Save_Field (Name => COL_2_2_NAME, -- text
Value => Object.Text);
Query.Save_Field (Name => COL_3_2_NAME, -- create_date
Value => Object.Create_Date);
Query.Save_Field (Name => COL_4_2_NAME, -- uri
Value => Object.Uri);
Query.Save_Field (Name => COL_5_2_NAME, -- version
Value => Object.Version);
Query.Save_Field (Name => COL_6_2_NAME, -- publish_date
Value => Object.Publish_Date);
Query.Save_Field (Name => COL_7_2_NAME, -- status
Value => Integer (Post_Status_Type'Pos (Object.Status)));
Query.Save_Field (Name => COL_8_2_NAME, -- allow_comments
Value => Object.Allow_Comments);
Query.Save_Field (Name => COL_9_2_NAME, -- read_count
Value => Object.Read_Count);
Query.Save_Field (Name => COL_10_2_NAME, -- author_id
Value => Object.Author);
Query.Save_Field (Name => COL_11_2_NAME, -- blog_id
Value => Object.Blog);
Query.Execute (Result);
if Result /= 1 then
raise ADO.Objects.INSERT_ERROR;
end if;
ADO.Objects.Set_Created (Object);
end Create;
procedure Delete (Object : in out Post_Impl;
Session : in out ADO.Sessions.Master_Session'Class) is
Stmt : ADO.Statements.Delete_Statement
:= Session.Create_Statement (POST_DEF'Access);
begin
Stmt.Set_Filter (Filter => "id = ?");
Stmt.Add_Param (Value => Object.Get_Key);
Stmt.Execute;
end Delete;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Post_Ref;
Name : in String) return Util.Beans.Objects.Object is
Obj : ADO.Objects.Object_Record_Access;
Impl : access Post_Impl;
begin
if From.Is_Null then
return Util.Beans.Objects.Null_Object;
end if;
Obj := From.Get_Load_Object;
Impl := Post_Impl (Obj.all)'Access;
if Name = "id" then
return ADO.Objects.To_Object (Impl.Get_Key);
elsif Name = "title" then
return Util.Beans.Objects.To_Object (Impl.Title);
elsif Name = "text" then
return Util.Beans.Objects.To_Object (Impl.Text);
elsif Name = "create_date" then
return Util.Beans.Objects.Time.To_Object (Impl.Create_Date);
elsif Name = "uri" then
return Util.Beans.Objects.To_Object (Impl.Uri);
elsif Name = "publish_date" then
if Impl.Publish_Date.Is_Null then
return Util.Beans.Objects.Null_Object;
else
return Util.Beans.Objects.Time.To_Object (Impl.Publish_Date.Value);
end if;
elsif Name = "status" then
return AWA.Blogs.Models.Post_Status_Type_Objects.To_Object (Impl.Status);
elsif Name = "allow_comments" then
return Util.Beans.Objects.To_Object (Impl.Allow_Comments);
elsif Name = "read_count" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Read_Count));
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Load the object from current iterator position
-- ------------------------------
procedure Load (Object : in out Post_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class) is
begin
Object.Set_Key_Value (Stmt.Get_Identifier (0));
Object.Title := Stmt.Get_Unbounded_String (1);
Object.Text := Stmt.Get_Unbounded_String (2);
Object.Create_Date := Stmt.Get_Time (3);
Object.Uri := Stmt.Get_Unbounded_String (4);
Object.Publish_Date := Stmt.Get_Time (6);
Object.Status := Post_Status_Type'Val (Stmt.Get_Integer (7));
Object.Allow_Comments := Stmt.Get_Boolean (8);
Object.Allow_Comments := Stmt.Get_Boolean (8);
Object.Read_Count := Stmt.Get_Integer (9);
if not Stmt.Is_Null (10) then
Object.Author.Set_Key_Value (Stmt.Get_Identifier (10), Session);
end if;
if not Stmt.Is_Null (11) then
Object.Blog.Set_Key_Value (Stmt.Get_Identifier (11), Session);
end if;
Object.Version := Stmt.Get_Integer (5);
ADO.Objects.Set_Created (Object);
end Load;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Admin_Post_Info;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Id));
elsif Name = "title" then
return Util.Beans.Objects.To_Object (From.Title);
elsif Name = "uri" then
return Util.Beans.Objects.To_Object (From.Uri);
elsif Name = "date" then
return Util.Beans.Objects.Time.To_Object (From.Date);
elsif Name = "status" then
return AWA.Blogs.Models.Post_Status_Type_Objects.To_Object (From.Status);
elsif Name = "read_count" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Read_Count));
elsif Name = "username" then
return Util.Beans.Objects.To_Object (From.Username);
elsif Name = "comment_count" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Comment_Count));
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Admin_Post_Info;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "id" then
Item.Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value));
elsif Name = "title" then
Item.Title := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "uri" then
Item.Uri := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "date" then
Item.Date := Util.Beans.Objects.Time.To_Time (Value);
elsif Name = "status" then
Item.Status := AWA.Blogs.Models.Post_Status_Type_Objects.To_Value (Value);
elsif Name = "read_count" then
Item.Read_Count := Util.Beans.Objects.To_Integer (Value);
elsif Name = "username" then
Item.Username := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "comment_count" then
Item.Comment_Count := Util.Beans.Objects.To_Integer (Value);
end if;
end Set_Value;
-- --------------------
-- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>.
-- --------------------
procedure List (Object : in out Admin_Post_Info_List_Bean'Class;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
begin
List (Object.List, Session, Context);
end List;
-- --------------------
-- The Admin_Post_Info describes a post in the administration interface.
-- --------------------
procedure List (Object : in out Admin_Post_Info_Vector;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
procedure Read (Into : in out Admin_Post_Info);
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Context);
Pos : Natural := 0;
procedure Read (Into : in out Admin_Post_Info) is
begin
Into.Id := Stmt.Get_Identifier (0);
Into.Title := Stmt.Get_Unbounded_String (1);
Into.Uri := Stmt.Get_Unbounded_String (2);
Into.Date := Stmt.Get_Time (3);
Into.Status := AWA.Blogs.Models.Post_Status_Type'Val (Stmt.Get_Integer (4));
Into.Read_Count := Stmt.Get_Natural (5);
Into.Username := Stmt.Get_Unbounded_String (6);
Into.Comment_Count := Stmt.Get_Natural (7);
end Read;
begin
Stmt.Execute;
Admin_Post_Info_Vectors.Clear (Object);
while Stmt.Has_Elements loop
Object.Insert_Space (Before => Pos);
Object.Update_Element (Index => Pos, Process => Read'Access);
Pos := Pos + 1;
Stmt.Next;
end loop;
end List;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Blog_Info;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Id));
elsif Name = "title" then
return Util.Beans.Objects.To_Object (From.Title);
elsif Name = "uid" then
return Util.Beans.Objects.To_Object (From.Uid);
elsif Name = "create_date" then
return Util.Beans.Objects.Time.To_Object (From.Create_Date);
elsif Name = "post_count" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Post_Count));
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Blog_Info;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "id" then
Item.Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value));
elsif Name = "title" then
Item.Title := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "uid" then
Item.Uid := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "create_date" then
Item.Create_Date := Util.Beans.Objects.Time.To_Time (Value);
elsif Name = "post_count" then
Item.Post_Count := Util.Beans.Objects.To_Integer (Value);
end if;
end Set_Value;
-- --------------------
-- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>.
-- --------------------
procedure List (Object : in out Blog_Info_List_Bean'Class;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
begin
List (Object.List, Session, Context);
end List;
-- --------------------
-- The list of blogs.
-- --------------------
procedure List (Object : in out Blog_Info_Vector;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
procedure Read (Into : in out Blog_Info);
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Context);
Pos : Natural := 0;
procedure Read (Into : in out Blog_Info) is
begin
Into.Id := Stmt.Get_Identifier (0);
Into.Title := Stmt.Get_Unbounded_String (1);
Into.Uid := Stmt.Get_Unbounded_String (2);
Into.Create_Date := Stmt.Get_Time (3);
Into.Post_Count := Stmt.Get_Integer (4);
end Read;
begin
Stmt.Execute;
Blog_Info_Vectors.Clear (Object);
while Stmt.Has_Elements loop
Object.Insert_Space (Before => Pos);
Object.Update_Element (Index => Pos, Process => Read'Access);
Pos := Pos + 1;
Stmt.Next;
end loop;
end List;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Comment_Info;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Id));
elsif Name = "post_id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Post_Id));
elsif Name = "title" then
return Util.Beans.Objects.To_Object (From.Title);
elsif Name = "author" then
return Util.Beans.Objects.To_Object (From.Author);
elsif Name = "email" then
return Util.Beans.Objects.To_Object (From.Email);
elsif Name = "date" then
return Util.Beans.Objects.Time.To_Object (From.Date);
elsif Name = "status" then
return AWA.Comments.Models.Status_Type_Objects.To_Object (From.Status);
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Comment_Info;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "id" then
Item.Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value));
elsif Name = "post_id" then
Item.Post_Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value));
elsif Name = "title" then
Item.Title := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "author" then
Item.Author := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "email" then
Item.Email := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "date" then
Item.Date := Util.Beans.Objects.Time.To_Time (Value);
elsif Name = "status" then
Item.Status := AWA.Comments.Models.Status_Type_Objects.To_Value (Value);
end if;
end Set_Value;
-- --------------------
-- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>.
-- --------------------
procedure List (Object : in out Comment_Info_List_Bean'Class;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
begin
List (Object.List, Session, Context);
end List;
-- --------------------
-- The comment information.
-- --------------------
procedure List (Object : in out Comment_Info_Vector;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
procedure Read (Into : in out Comment_Info);
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Context);
Pos : Natural := 0;
procedure Read (Into : in out Comment_Info) is
begin
Into.Id := Stmt.Get_Identifier (0);
Into.Post_Id := Stmt.Get_Identifier (1);
Into.Title := Stmt.Get_Unbounded_String (2);
Into.Author := Stmt.Get_Unbounded_String (3);
Into.Email := Stmt.Get_Unbounded_String (4);
Into.Date := Stmt.Get_Time (5);
Into.Status := AWA.Comments.Models.Status_Type'Val (Stmt.Get_Integer (6));
end Read;
begin
Stmt.Execute;
Comment_Info_Vectors.Clear (Object);
while Stmt.Has_Elements loop
Object.Insert_Space (Before => Pos);
Object.Update_Element (Index => Pos, Process => Read'Access);
Pos := Pos + 1;
Stmt.Next;
end loop;
end List;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Month_Stat_Info;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "year" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Year));
elsif Name = "month" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Month));
elsif Name = "count" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Count));
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Month_Stat_Info;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "year" then
Item.Year := Util.Beans.Objects.To_Integer (Value);
elsif Name = "month" then
Item.Month := Util.Beans.Objects.To_Integer (Value);
elsif Name = "count" then
Item.Count := Util.Beans.Objects.To_Integer (Value);
end if;
end Set_Value;
-- --------------------
-- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>.
-- --------------------
procedure List (Object : in out Month_Stat_Info_List_Bean'Class;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
begin
List (Object.List, Session, Context);
end List;
-- --------------------
-- The month statistics.
-- --------------------
procedure List (Object : in out Month_Stat_Info_Vector;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
procedure Read (Into : in out Month_Stat_Info);
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Context);
Pos : Natural := 0;
procedure Read (Into : in out Month_Stat_Info) is
begin
Into.Year := Stmt.Get_Natural (0);
Into.Month := Stmt.Get_Natural (1);
Into.Count := Stmt.Get_Natural (2);
end Read;
begin
Stmt.Execute;
Month_Stat_Info_Vectors.Clear (Object);
while Stmt.Has_Elements loop
Object.Insert_Space (Before => Pos);
Object.Update_Element (Index => Pos, Process => Read'Access);
Pos := Pos + 1;
Stmt.Next;
end loop;
end List;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Post_Info;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Id));
elsif Name = "title" then
return Util.Beans.Objects.To_Object (From.Title);
elsif Name = "uri" then
return Util.Beans.Objects.To_Object (From.Uri);
elsif Name = "date" then
return Util.Beans.Objects.Time.To_Object (From.Date);
elsif Name = "username" then
return Util.Beans.Objects.To_Object (From.Username);
elsif Name = "text" then
return Util.Beans.Objects.To_Object (From.Text);
elsif Name = "allow_comments" then
return Util.Beans.Objects.To_Object (From.Allow_Comments);
elsif Name = "comment_count" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Comment_Count));
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Post_Info;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "id" then
Item.Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value));
elsif Name = "title" then
Item.Title := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "uri" then
Item.Uri := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "date" then
Item.Date := Util.Beans.Objects.Time.To_Time (Value);
elsif Name = "username" then
Item.Username := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "text" then
Item.Text := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "allow_comments" then
Item.Allow_Comments := Util.Beans.Objects.To_Boolean (Value);
elsif Name = "comment_count" then
Item.Comment_Count := Util.Beans.Objects.To_Integer (Value);
end if;
end Set_Value;
-- --------------------
-- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>.
-- --------------------
procedure List (Object : in out Post_Info_List_Bean'Class;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
begin
List (Object.List, Session, Context);
end List;
-- --------------------
-- The Post_Info describes a post to be displayed in the blog page
-- --------------------
procedure List (Object : in out Post_Info_Vector;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class) is
procedure Read (Into : in out Post_Info);
Stmt : ADO.Statements.Query_Statement
:= Session.Create_Statement (Context);
Pos : Natural := 0;
procedure Read (Into : in out Post_Info) is
begin
Into.Id := Stmt.Get_Identifier (0);
Into.Title := Stmt.Get_Unbounded_String (1);
Into.Uri := Stmt.Get_Unbounded_String (2);
Into.Date := Stmt.Get_Time (3);
Into.Username := Stmt.Get_Unbounded_String (4);
Into.Text := Stmt.Get_Unbounded_String (5);
Into.Allow_Comments := Stmt.Get_Boolean (6);
Into.Comment_Count := Stmt.Get_Natural (7);
end Read;
begin
Stmt.Execute;
Post_Info_Vectors.Clear (Object);
while Stmt.Has_Elements loop
Object.Insert_Space (Before => Pos);
Object.Update_Element (Index => Pos, Process => Read'Access);
Pos := Pos + 1;
Stmt.Next;
end loop;
end List;
procedure Op_Create (Bean : in out Blog_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Create (Bean : in out Blog_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Blog_Bean'Class (Bean).Create (Outcome);
end Op_Create;
package Binding_Blog_Bean_1 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Blog_Bean,
Method => Op_Create,
Name => "create");
procedure Op_Create_Default (Bean : in out Blog_Bean;
Event : in AWA.Events.Module_Event'Class);
procedure Op_Create_Default (Bean : in out Blog_Bean;
Event : in AWA.Events.Module_Event'Class) is
begin
Blog_Bean'Class (Bean).Create_Default (Event);
end Op_Create_Default;
package Binding_Blog_Bean_2 is
new AWA.Events.Action_Method.Bind (Bean => Blog_Bean,
Method => Op_Create_Default,
Name => "create_default");
procedure Op_Load (Bean : in out Blog_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load (Bean : in out Blog_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Blog_Bean'Class (Bean).Load (Outcome);
end Op_Load;
package Binding_Blog_Bean_3 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Blog_Bean,
Method => Op_Load,
Name => "load");
Binding_Blog_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (1 => Binding_Blog_Bean_1.Proxy'Access,
2 => Binding_Blog_Bean_2.Proxy'Access,
3 => Binding_Blog_Bean_3.Proxy'Access
);
-- ------------------------------
-- This bean provides some methods that can be used in a Method_Expression.
-- ------------------------------
overriding
function Get_Method_Bindings (From : in Blog_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Binding_Blog_Bean_Array'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Blog_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "name" then
Item.Set_Name (Util.Beans.Objects.To_String (Value));
elsif Name = "uid" then
Item.Set_Uid (Util.Beans.Objects.To_String (Value));
elsif Name = "create_date" then
Item.Set_Create_Date (Util.Beans.Objects.Time.To_Time (Value));
elsif Name = "update_date" then
Item.Set_Update_Date (Util.Beans.Objects.Time.To_Time (Value));
elsif Name = "url" then
Item.Set_Url (Util.Beans.Objects.To_String (Value));
end if;
end Set_Value;
procedure Op_Save (Bean : in out Post_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Save (Bean : in out Post_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Post_Bean'Class (Bean).Save (Outcome);
end Op_Save;
package Binding_Post_Bean_1 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Post_Bean,
Method => Op_Save,
Name => "save");
procedure Op_Delete (Bean : in out Post_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Delete (Bean : in out Post_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Post_Bean'Class (Bean).Delete (Outcome);
end Op_Delete;
package Binding_Post_Bean_2 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Post_Bean,
Method => Op_Delete,
Name => "delete");
procedure Op_Load (Bean : in out Post_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load (Bean : in out Post_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Post_Bean'Class (Bean).Load (Outcome);
end Op_Load;
package Binding_Post_Bean_3 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Post_Bean,
Method => Op_Load,
Name => "load");
procedure Op_Load_Admin (Bean : in out Post_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load_Admin (Bean : in out Post_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Post_Bean'Class (Bean).Load_Admin (Outcome);
end Op_Load_Admin;
package Binding_Post_Bean_4 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Post_Bean,
Method => Op_Load_Admin,
Name => "load_admin");
Binding_Post_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (1 => Binding_Post_Bean_1.Proxy'Access,
2 => Binding_Post_Bean_2.Proxy'Access,
3 => Binding_Post_Bean_3.Proxy'Access,
4 => Binding_Post_Bean_4.Proxy'Access
);
-- ------------------------------
-- This bean provides some methods that can be used in a Method_Expression.
-- ------------------------------
overriding
function Get_Method_Bindings (From : in Post_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Binding_Post_Bean_Array'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Post_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "title" then
Item.Set_Title (Util.Beans.Objects.To_String (Value));
elsif Name = "text" then
Item.Set_Text (Util.Beans.Objects.To_String (Value));
elsif Name = "create_date" then
Item.Set_Create_Date (Util.Beans.Objects.Time.To_Time (Value));
elsif Name = "uri" then
Item.Set_Uri (Util.Beans.Objects.To_String (Value));
elsif Name = "publish_date" then
if Util.Beans.Objects.Is_Null (Value) then
Item.Set_Publish_Date (ADO.Nullable_Time '(Is_Null => True, others => <>));
else
Item.Set_Publish_Date (ADO.Nullable_Time '(Is_Null => False,
Value => Util.Beans.Objects.Time.To_Time (Value)));
end if;
elsif Name = "status" then
Item.Set_Status (Post_Status_Type_Objects.To_Value (Value));
elsif Name = "allow_comments" then
Item.Set_Allow_Comments (Util.Beans.Objects.To_Boolean (Value));
elsif Name = "read_count" then
Item.Set_Read_Count (Util.Beans.Objects.To_Integer (Value));
end if;
end Set_Value;
procedure Op_Load (Bean : in out Post_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load (Bean : in out Post_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Post_List_Bean'Class (Bean).Load (Outcome);
end Op_Load;
package Binding_Post_List_Bean_1 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Post_List_Bean,
Method => Op_Load,
Name => "load");
Binding_Post_List_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (1 => Binding_Post_List_Bean_1.Proxy'Access
);
-- ------------------------------
-- This bean provides some methods that can be used in a Method_Expression.
-- ------------------------------
overriding
function Get_Method_Bindings (From : in Post_List_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Binding_Post_List_Bean_Array'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Post_List_Bean;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "tag" then
return Util.Beans.Objects.To_Object (From.Tag);
elsif Name = "page" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Page));
elsif Name = "count" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Count));
elsif Name = "page_size" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Page_Size));
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Post_List_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "tag" then
Item.Tag := Util.Beans.Objects.To_Unbounded_String (Value);
elsif Name = "page" then
Item.Page := Util.Beans.Objects.To_Integer (Value);
elsif Name = "count" then
Item.Count := Util.Beans.Objects.To_Integer (Value);
elsif Name = "page_size" then
Item.Page_Size := Util.Beans.Objects.To_Integer (Value);
end if;
end Set_Value;
procedure Op_Load (Bean : in out Stat_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
procedure Op_Load (Bean : in out Stat_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is
begin
Stat_List_Bean'Class (Bean).Load (Outcome);
end Op_Load;
package Binding_Stat_List_Bean_1 is
new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Stat_List_Bean,
Method => Op_Load,
Name => "load");
Binding_Stat_List_Bean_Array : aliased constant Util.Beans.Methods.Method_Binding_Array
:= (1 => Binding_Stat_List_Bean_1.Proxy'Access
);
-- ------------------------------
-- This bean provides some methods that can be used in a Method_Expression.
-- ------------------------------
overriding
function Get_Method_Bindings (From : in Stat_List_Bean)
return Util.Beans.Methods.Method_Binding_Array_Access is
pragma Unreferenced (From);
begin
return Binding_Stat_List_Bean_Array'Access;
end Get_Method_Bindings;
-- ------------------------------
-- Get the bean attribute identified by the name.
-- ------------------------------
overriding
function Get_Value (From : in Stat_List_Bean;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "blog_id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Blog_Id));
elsif Name = "post_id" then
return Util.Beans.Objects.To_Object (Long_Long_Integer (From.Post_Id));
end if;
return Util.Beans.Objects.Null_Object;
end Get_Value;
-- ------------------------------
-- Set the value identified by the name
-- ------------------------------
overriding
procedure Set_Value (Item : in out Stat_List_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object) is
begin
if Name = "blog_id" then
Item.Blog_Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value));
elsif Name = "post_id" then
Item.Post_Id := ADO.Identifier (Util.Beans.Objects.To_Long_Long_Integer (Value));
end if;
end Set_Value;
end AWA.Blogs.Models;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Tools Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2015, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Asis.Definitions;
with Asis.Expressions;
package body Properties.Definitions.Discriminant_Constraint is
----------
-- Code --
----------
function Code
(Engine : access Engines.Contexts.Context;
Element : Asis.Definition;
Name : Engines.Text_Property)
return League.Strings.Universal_String
is
List : constant Asis.Discriminant_Association_List :=
Asis.Definitions.Discriminant_Associations (Element);
Text : League.Strings.Universal_String;
Expr : Asis.Expression;
begin
for J in List'Range loop
Expr := Asis.Expressions.Discriminant_Expression (List (J));
Text.Append (Engine.Text.Get_Property (Expr, Name));
if J /= List'Last then
Text.Append (",");
end if;
end loop;
return Text;
end Code;
end Properties.Definitions.Discriminant_Constraint;
|
with Libadalang.Analysis; use Libadalang.Analysis;
with Rejuvenation.Navigation; use Rejuvenation.Navigation;
package Rewriters_Context_Utils is
function Combine_Contexts (C1, C2 : Ada_Node) return Ada_Node
with Pre =>
Is_Reflexive_Ancestor (C1, C2)
or else Is_Reflexive_Ancestor (C2, C1),
Post =>
Is_Reflexive_Ancestor (Combine_Contexts'Result, C1)
and then Is_Reflexive_Ancestor (Combine_Contexts'Result, C2);
end Rewriters_Context_Utils;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.CLDR.Collation_Rules_Parser;
package body Matreshka.CLDR.LDML_Parsers is
use type League.Strings.Universal_String;
Collation_Tag : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("collation");
Collations_Tag : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("collations");
Cr_Tag : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("cr");
Generation_Tag : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("generation");
Identity_Tag : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("identity");
Language_Tag : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("language");
LDML_Tag : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("ldml");
Settings_Tag : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("settings");
Suppress_Contractions_Tag : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("suppress_contractions");
Version_Tag : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("version");
Type_Attribute : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("type");
Standard_Image : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("standard");
----------------
-- Characters --
----------------
overriding procedure Characters
(Self : in out LDML_Parser;
Text : League.Strings.Universal_String;
Success : in out Boolean) is
begin
Self.Text.Append (Text);
end Characters;
-----------------
-- End_Element --
-----------------
overriding procedure End_Element
(Self : in out LDML_Parser;
Namespace_URI : League.Strings.Universal_String;
Local_Name : League.Strings.Universal_String;
Qualified_Name : League.Strings.Universal_String;
Success : in out Boolean) is
begin
if Self.Ignore_Depth /= 0 then
Self.Ignore_Depth := Self.Ignore_Depth - 1;
elsif Qualified_Name = Cr_Tag then
Collation_Rules_Parser.Parse_Collation_Rules
(Self.Collations.all, Self.Text.To_Wide_Wide_String);
Self.Collect_Text := False;
elsif Qualified_Name = Suppress_Contractions_Tag then
for J in 2 .. Self.Text.Length - 1 loop
-- XXX This field must be parsed as Unicode Set.
Matreshka.CLDR.Collation_Data.Suppress_Contractions
(Self.Collations.all,
Wide_Wide_Character'Pos (Self.Text (J).To_Wide_Wide_Character));
end loop;
Self.Collect_Text := False;
end if;
end End_Element;
------------------
-- Error_String --
------------------
overriding function Error_String
(Self : LDML_Parser) return League.Strings.Universal_String is
begin
return League.Strings.Empty_Universal_String;
end Error_String;
-------------------
-- Start_Element --
-------------------
overriding procedure Start_Element
(Self : in out LDML_Parser;
Namespace_URI : League.Strings.Universal_String;
Local_Name : League.Strings.Universal_String;
Qualified_Name : League.Strings.Universal_String;
Attributes : XML.SAX.Attributes.SAX_Attributes;
Success : in out Boolean) is
begin
if Self.Ignore_Depth /= 0 then
Self.Ignore_Depth := Self.Ignore_Depth + 1;
elsif Qualified_Name = Collations_Tag then
null;
elsif Qualified_Name = Collation_Tag then
if Attributes.Value (Type_Attribute) /= Standard_Image then
-- Ignore all collations except 'standard'.
Self.Ignore_Depth := 1;
end if;
elsif Qualified_Name = Cr_Tag then
Self.Collect_Text := True;
Self.Text.Clear;
elsif Qualified_Name = Generation_Tag then
null;
elsif Qualified_Name = Identity_Tag then
null;
elsif Qualified_Name = Language_Tag then
null;
elsif Qualified_Name = LDML_Tag then
null;
elsif Qualified_Name = Settings_Tag then
null;
elsif Qualified_Name = Suppress_Contractions_Tag then
Self.Collect_Text := True;
Self.Text.Clear;
elsif Qualified_Name = Version_Tag then
null;
else
raise Program_Error;
end if;
end Start_Element;
end Matreshka.CLDR.LDML_Parsers;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . B O U N D E D _ H O L D E R S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2015-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/>. --
------------------------------------------------------------------------------
with Unchecked_Conversion;
with System.Put_Images;
package body Ada.Containers.Bounded_Holders is
function Size_In_Storage_Elements (Element : Element_Type) return Natural;
-- This returns the size of Element in storage units. It raises an
-- exception if the size is not a multiple of Storage_Unit, or if the size
-- is too big.
------------------------------
-- Size_In_Storage_Elements --
------------------------------
function Size_In_Storage_Elements (Element : Element_Type) return Natural is
Max_Size : Natural renames Max_Size_In_Storage_Elements;
begin
return S : constant Natural := Element'Size / System.Storage_Unit do
pragma Assert
(Element'Size mod System.Storage_Unit = 0,
"Size must be a multiple of Storage_Unit");
pragma Assert
(S <= Max_Size, "Size is too big:" & S'Img & " >" & Max_Size'Img);
end return;
end Size_In_Storage_Elements;
function Cast is new
Unchecked_Conversion (System.Address, Element_Access);
---------
-- "=" --
---------
function "=" (Left, Right : Holder) return Boolean is
begin
return Get (Left) = Get (Right);
end "=";
------------------------
-- Constant_Reference --
------------------------
function Constant_Reference
(Container : aliased Holder) return not null access constant Element_Type
is
begin
return Cast (Container'Address);
end Constant_Reference;
---------
-- Get --
---------
function Get (Container : Holder) return Element_Type is
begin
return Cast (Container'Address).all;
end Get;
---------------
-- Put_Image --
---------------
procedure Put_Image
(S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder)
is
use System.Put_Images;
begin
Array_Before (S);
Element_Type'Put_Image (S, Get (V));
Array_After (S);
end Put_Image;
---------------
-- Reference --
---------------
function Reference
(Container : not null access Holder) return not null access Element_Type
is
begin
return Cast (Container.all'Address);
end Reference;
---------
-- Set --
---------
procedure Set (Container : in out Holder; New_Item : Element_Type) is
Storage : Storage_Array
(1 .. Size_In_Storage_Elements (New_Item)) with
Address => New_Item'Address;
begin
Container.Data (Storage'Range) := Storage;
end Set;
---------------
-- To_Holder --
---------------
function To_Holder (New_Item : Element_Type) return Holder is
begin
return Result : Holder do
Set (Result, New_Item);
end return;
end To_Holder;
end Ada.Containers.Bounded_Holders;
|
pragma License (Unrestricted);
-- extended unit
with Ada.References.Strings;
with Ada.Streams.Block_Transmission.Strings;
with Ada.Strings.Generic_Unbounded;
package Ada.Strings.Unbounded_Strings is
new Generic_Unbounded (
Character,
String,
Streams.Block_Transmission.Strings.Read,
Streams.Block_Transmission.Strings.Write,
References.Strings.Slicing);
pragma Preelaborate (Ada.Strings.Unbounded_Strings);
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2009-2015, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
package Matreshka.Internals.Unicode.Ucd is
pragma Preelaborate;
type First_Stage_Index is mod 16#1100#;
type Second_Stage_Index is mod 16#100#;
type Sequence_Count is range 0 .. 2 ** 16 - 1;
for Sequence_Count'Size use 16;
subtype Sequence_Index is Sequence_Count range 1 .. Sequence_Count'Last;
type Code_Point_Sequence is array (Sequence_Index range <>) of Code_Point;
type Code_Point_Sequence_Access is access constant Code_Point_Sequence;
---------------------
-- Core properties --
---------------------
type General_Category is
(Control,
Format,
Unassigned,
Private_Use,
Surrogate,
Lowercase_Letter,
Titlecase_Letter,
Uppercase_Letter,
Modifier_Letter,
Other_Letter,
Spacing_Mark,
Enclosing_Mark,
Nonspacing_Mark,
Decimal_Number,
Letter_Number,
Other_Number,
Connector_Punctuation,
Dash_Punctuation,
Close_Punctuation,
Final_Punctuation,
Initial_Punctuation,
Other_Punctuation,
Open_Punctuation,
Currency_Symbol,
Modifier_Symbol,
Math_Symbol,
Other_Symbol,
Line_Separator,
Paragraph_Separator,
Space_Separator);
for General_Category'Size use 8;
type Boolean_Properties is
(Composition_Exclusion, -- XXX
Expands_On_NFC, -- Derived
Expands_On_NFD, -- Derived
Expands_On_NFKC, -- Derived
Expands_On_NFKD, -- Derived
Full_Composition_Exclusion, -- Derived
ASCII_Hex_Digit,
Bidi_Control,
Dash,
Deprecated,
Diacritic,
Extender,
Hex_Digit,
Hyphen,
Ideographic,
IDS_Binary_Operator,
IDS_Trinary_Operator,
Join_Control,
Logical_Order_Exception,
Noncharacter_Code_Point,
Other_Alphabetic,
Other_Default_Ignorable_Code_Point,
Other_Grapheme_Extend,
Other_ID_Continue,
Other_ID_Start,
Other_Lowercase,
Other_Math,
Other_Uppercase,
Pattern_Syntax,
Pattern_White_Space,
Quotation_Mark,
Radical,
Soft_Dotted,
STerm,
Terminal_Punctuation,
Unified_Ideograph,
Variation_Selector,
White_Space,
-- Bidi_Mirrored, -- XXX
-- Derived core properties. This list must include only properties
-- from DerivedCoreProperties.txt file.
Alphabetic, -- Derived
Cased, -- Derived
Case_Ignorable, -- Derived
Changes_When_Lowercased, -- Derived
Changes_When_Uppercased, -- Derived
Changes_When_Titlecased, -- Derived
Changes_When_Casefolded, -- Derived
Changes_When_Casemapped, -- Derived
Default_Ignorable_Code_Point, -- Derived
Grapheme_Base, -- Derived
Grapheme_Extend, -- Derived
Grapheme_Link, -- Deprecated, derived
ID_Continue, -- Derived
ID_Start, -- Derived
Lowercase, -- Derived
Math, -- Derived
Uppercase, -- Derived
XID_Continue, -- Derived
XID_Start, -- Derived
-- Derived normalization properties.
Changes_When_NFKC_Casefolded); -- Derived
subtype Overridable_Boolean_Properties is Boolean_Properties
range ASCII_Hex_Digit .. Changes_When_NFKC_Casefolded;
type Boolean_Values is array (Overridable_Boolean_Properties) of Boolean;
for Boolean_Values'Component_Size use 1;
for Boolean_Values'Size use 64; -- 52 bits used for now
type East_Asian_Width is
(Ambiguous,
Fullwidth,
Halfwidth,
Neutral,
Narrow,
Wide);
for East_Asian_Width'Size use 8;
type Grapheme_Cluster_Break is
(Control,
CR,
Extend,
L,
LF,
LV,
LVT,
Prepend,
Regional_Indicator,
Spacing_Mark,
T,
V,
Other);
for Grapheme_Cluster_Break'Size use 8;
type Word_Break is
(CR,
LF,
Newline,
Extend,
Regional_Indicator,
Format,
Katakana,
Hebrew_Letter,
A_Letter,
Single_Quote,
Double_Quote,
Mid_Num_Let,
Mid_Letter,
Mid_Num,
Numeric,
Extend_Num_Let,
Other);
for Word_Break'Size use 8;
type Sentence_Break is
(Other,
CR,
LF,
Sep,
Sp,
Lower,
Upper,
O_Letter,
Numeric,
A_Term,
S_Term,
Close,
S_Continue,
Format,
Extend);
for Sentence_Break'Size use 8;
type Line_Break is
(Ambiguous,
Alphabetic,
Break_Both,
Break_After,
Break_Before,
Mandatory_Break,
Contingent_Break,
Conditional_Japanese_Starter,
Close_Punctuation,
Combining_Mark,
Close_Parenthesis,
Carriage_Return,
Exclamation,
Glue,
H2,
H3,
Hebrew_Letter,
Hyphen,
Ideographic,
Inseparable,
Infix_Numeric,
JL,
JT,
JV,
Line_Feed,
Next_Line,
Nonstarter,
Numeric,
Open_Punctuation,
Postfix_Numeric,
Prefix_Numeric,
Quotation,
Regional_Indicator,
Complex_Context,
Surrogate,
Space,
Break_Symbols,
Word_Joiner,
Unknown,
ZW_Space);
for Line_Break'Size use 8;
type Core_Values is record
GC : General_Category; -- 8 (5) bits
EA : East_Asian_Width; -- 8 (3) bits
GCB : Grapheme_Cluster_Break; -- 8 (4) bits
WB : Word_Break; -- 8 (4) bits
SB : Sentence_Break; -- 8 (4) bits
LB : Line_Break; -- 8 (6) bits
B : Boolean_Values; -- 64 (52) bits
end record;
for Core_Values'Size use 128;
for Core_Values use record
B at 0 range 0 .. 63;
GC at 0 range 64 .. 71;
GCB at 0 range 72 .. 79;
WB at 0 range 80 .. 87;
SB at 0 range 88 .. 95;
LB at 0 range 96 .. 103;
EA at 0 range 104 .. 111;
end record;
type Core_Second_Stage is array (Second_Stage_Index) of Core_Values;
type Core_Second_Stage_Access is not null access constant Core_Second_Stage;
type Core_First_Stage is
array (First_Stage_Index) of Core_Second_Stage_Access;
type Core_First_Stage_Access is not null access constant Core_First_Stage;
------------
-- Casing --
------------
type Casing_Context is
(Final_Sigma,
After_Soft_Dotted,
More_Above,
Before_Dot,
After_I);
type Case_Mapping_Range is record
First : Sequence_Count;
Last : Sequence_Count;
end record;
type Case_Mapping_Kinds is (Lower, Upper, Title, Folding);
type Case_Mapping_Ranges is
array (Case_Mapping_Kinds) of Case_Mapping_Range;
type Simple_Case_Mappings is
array (Case_Mapping_Kinds) of Code_Point;
type Casing_Context_Mapping_Ranges is
array (Case_Mapping_Kinds range Lower .. Title) of Case_Mapping_Range;
type Case_Mapping is record
Simple : Simple_Case_Mappings;
Ranges : Case_Mapping_Ranges;
Context_First : Sequence_Count;
Context_Last : Sequence_Count;
end record;
type Casing_Context_Mapping is record
Context : Casing_Context;
Negative : Boolean;
Ranges : Casing_Context_Mapping_Ranges;
end record;
type Case_Mapping_Second_Stage is
array (Second_Stage_Index) of Case_Mapping;
type Case_Mapping_Second_Stage_Access is
not null access constant Case_Mapping_Second_Stage;
type Case_Mapping_First_Stage is
array (First_Stage_Index) of Case_Mapping_Second_Stage_Access;
type Case_Mapping_First_Stage_Access is
access constant Case_Mapping_First_Stage;
type Casing_Context_Mapping_Sequence is
array (Sequence_Index range <>) of Casing_Context_Mapping;
type Casing_Context_Mapping_Sequence_Access is
access constant Casing_Context_Mapping_Sequence;
-------------------
-- Normalization --
-------------------
type Canonical_Combining_Class is mod 256;
Not_Reordered : constant Canonical_Combining_Class := 0;
Overlay : constant Canonical_Combining_Class := 1;
Nukta : constant Canonical_Combining_Class := 7;
Kana_Voicing : constant Canonical_Combining_Class := 8;
Virama : constant Canonical_Combining_Class := 9;
Attached_Below_Left : constant Canonical_Combining_Class := 200;
Attached_Below : constant Canonical_Combining_Class := 202;
Attached_Above_Right : constant Canonical_Combining_Class := 216;
Below_Left : constant Canonical_Combining_Class := 218;
Below : constant Canonical_Combining_Class := 220;
Below_Right : constant Canonical_Combining_Class := 222;
Left : constant Canonical_Combining_Class := 224;
Right : constant Canonical_Combining_Class := 226;
Above_Left : constant Canonical_Combining_Class := 228;
Above : constant Canonical_Combining_Class := 230;
Above_Right : constant Canonical_Combining_Class := 232;
Double_Below : constant Canonical_Combining_Class := 233;
Double_Above : constant Canonical_Combining_Class := 234;
Iota_Subscript : constant Canonical_Combining_Class := 240;
type Decomposition_Type is
(None,
Canonical,
Font,
No_Break,
Initial,
Medial,
Final,
Isolated,
Circle,
Super,
Sub,
Vertical,
Wide,
Narrow,
Small,
Square,
Fraction,
Compat);
for Decomposition_Type'Size use 8;
subtype Not_Overridable_Boolean_Properties is Boolean_Properties
range Composition_Exclusion .. Full_Composition_Exclusion;
type Non_Overridable_Boolean_Values is
array (Not_Overridable_Boolean_Properties) of Boolean;
for Non_Overridable_Boolean_Values'Component_Size use 1;
for Non_Overridable_Boolean_Values'Size use 8; -- 6 bits used for now
type Normalization_Quick_Check is (No, Maybe, Yes);
for Normalization_Quick_Check'Size use 2;
type Normalization_Form is (NFC, NFD, NFKC, NFKD);
type Normalization_Quick_Checks is
array (Normalization_Form) of Normalization_Quick_Check;
for Normalization_Quick_Checks'Size use 8;
for Normalization_Quick_Checks'Component_Size
use Normalization_Quick_Check'Size;
type Normalization_Mapping_Range is record
First : Sequence_Count;
Last : Sequence_Count;
end record;
type Decomposition_Kinds is (Canonical, Compatibility);
type Decomposition_Mapping is
array (Decomposition_Kinds) of Normalization_Mapping_Range;
type Normalization_Mapping is record
Decomposition : Decomposition_Mapping;
Composition : Normalization_Mapping_Range;
CCC : Canonical_Combining_Class; -- 8 bits
NQC : Normalization_Quick_Checks; -- 8 bits
DT : Decomposition_Type; -- 8 (5) bits
B : Non_Overridable_Boolean_Values;
end record;
for Normalization_Mapping'Size use 128;
type Normalization_Mapping_Second_Stage is
array (Second_Stage_Index) of Normalization_Mapping;
type Normalization_Mapping_Second_Stage_Access is
not null access constant Normalization_Mapping_Second_Stage;
type Normalization_Mapping_First_Stage is
array (First_Stage_Index) of Normalization_Mapping_Second_Stage_Access;
type Composition_Mapping is
array (Sequence_Index range <>, Sequence_Index range <>) of Code_Point;
---------------
-- Collation --
---------------
type Collation_Weight is mod 2**16;
for Collation_Weight'Size use 16;
pragma Assert (Code_Unit_16'Size = Collation_Weight'Size);
-- Note: collation algoriphm in identical strength level adds copy of the
-- source string in NFD form at the end of produced sorting key, thus it is
-- important that Code_Unit_16 and Collation_Weight types have equal size.
type Collation_Element is record
Primary : Collation_Weight;
Secondary : Collation_Weight;
Trinary : Collation_Weight;
end record;
type Collation_Element_Sequence is
array (Sequence_Index range <>) of Collation_Element;
type Collation_Element_Sequence_Access is
access constant Collation_Element_Sequence;
type Contractor_Record is record
Code : Code_Point;
Contractor_First : Sequence_Count;
Contractor_Last : Sequence_Count;
Expansion_First : Sequence_Count;
Expansion_Last : Sequence_Count;
end record;
type Contractor_Array is
array (Sequence_Index range <>) of Contractor_Record;
type Contractor_Array_Access is access constant Contractor_Array;
type Collation_Record is record
Contractor_First : Sequence_Count;
Contractor_Last : Sequence_Count;
Expansion_First : Sequence_Count;
Expansion_Last : Sequence_Count;
end record;
type Collation_Second_Stage is
array (Second_Stage_Index) of Collation_Record;
type Collation_Second_Stage_Access is
not null access constant Collation_Second_Stage;
type Collation_First_Stage is
array (First_Stage_Index) of Collation_Second_Stage_Access;
type Collation_First_Stage_Access is access constant Collation_First_Stage;
-------------------------------
-- Two stage table utilities --
-------------------------------
generic
type Element_Type is private;
type Second_Stage_Array is
array (Second_Stage_Index) of Element_Type;
type Second_Stage_Array_Access is
not null access constant Second_Stage_Array;
type First_Stage_Array is
array (First_Stage_Index) of Second_Stage_Array_Access;
function Generic_Element (Data : First_Stage_Array; Code : Code_Point)
return Element_Type;
end Matreshka.Internals.Unicode.Ucd;
|
with Ada.Directories;
with Ahven.Framework;
with Annotation.Api;
package Test_Null_Annotation.Write is
package Skill renames Annotation.Api;
use Annotation;
use Annotation.Api;
type Test is new Ahven.Framework.Test_Case with null record;
procedure Initialize (T : in out Test);
procedure Set_Up (T : in out Test);
procedure Tear_Down (T : in out Test);
procedure Read_Written (T : in out Ahven.Framework.Test_Case'Class);
procedure Null_Annotation (T : in out Ahven.Framework.Test_Case'Class);
end Test_Null_Annotation.Write;
|
-- print_ada.adb
with Ada.Text_IO; use Ada.Text_IO;
procedure print_ada is
begin
Put_Line("###############################################################");
Put_Line("###############################################################");
Put_Line("## ##");
Put_Line("## 00000000000 0000000000 00000000000 ##");
Put_Line("## 00 00 00 00 00 00 ##");
Put_Line("## 00 00 00 00 00 00 ##");
Put_Line("## 00000000000 00 00 00000000000 ##");
Put_Line("## 00 00 00 00 00 00 ##");
Put_Line("## 00 00 00 00 00 00 ##");
Put_Line("## 00 00 0000000000 00 00 ##");
Put_Line("## ##");
Put_Line("###############################################################");
Put_Line("###############################################################");
end print_ada;
|
------------------------------------------------------------------------------
-- --
-- GNAT EXAMPLE --
-- --
-- Copyright (C) 2013, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package Config is
procedure Disp_Start;
-- Configuration specific procedure called before the user command loop.
-- Can be used to display a banner.
end Config;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Elements.Expressions;
with Program.Elements.Raise_Expressions;
with Program.Element_Visitors;
package Program.Nodes.Raise_Expressions is
pragma Preelaborate;
type Raise_Expression is
new Program.Nodes.Node
and Program.Elements.Raise_Expressions.Raise_Expression
and Program.Elements.Raise_Expressions.Raise_Expression_Text
with private;
function Create
(Raise_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Exception_Name : not null Program.Elements.Expressions
.Expression_Access;
With_Token : Program.Lexical_Elements.Lexical_Element_Access;
Associated_Message : Program.Elements.Expressions.Expression_Access)
return Raise_Expression;
type Implicit_Raise_Expression is
new Program.Nodes.Node
and Program.Elements.Raise_Expressions.Raise_Expression
with private;
function Create
(Exception_Name : not null Program.Elements.Expressions
.Expression_Access;
Associated_Message : Program.Elements.Expressions.Expression_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Raise_Expression
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Raise_Expression is
abstract new Program.Nodes.Node
and Program.Elements.Raise_Expressions.Raise_Expression
with record
Exception_Name : not null Program.Elements.Expressions
.Expression_Access;
Associated_Message : Program.Elements.Expressions.Expression_Access;
end record;
procedure Initialize (Self : aliased in out Base_Raise_Expression'Class);
overriding procedure Visit
(Self : not null access Base_Raise_Expression;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Exception_Name
(Self : Base_Raise_Expression)
return not null Program.Elements.Expressions.Expression_Access;
overriding function Associated_Message
(Self : Base_Raise_Expression)
return Program.Elements.Expressions.Expression_Access;
overriding function Is_Raise_Expression_Element
(Self : Base_Raise_Expression)
return Boolean;
overriding function Is_Expression_Element
(Self : Base_Raise_Expression)
return Boolean;
type Raise_Expression is
new Base_Raise_Expression
and Program.Elements.Raise_Expressions.Raise_Expression_Text
with record
Raise_Token : not null Program.Lexical_Elements.Lexical_Element_Access;
With_Token : Program.Lexical_Elements.Lexical_Element_Access;
end record;
overriding function To_Raise_Expression_Text
(Self : aliased in out Raise_Expression)
return Program.Elements.Raise_Expressions.Raise_Expression_Text_Access;
overriding function Raise_Token
(Self : Raise_Expression)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function With_Token
(Self : Raise_Expression)
return Program.Lexical_Elements.Lexical_Element_Access;
type Implicit_Raise_Expression is
new Base_Raise_Expression
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Raise_Expression_Text
(Self : aliased in out Implicit_Raise_Expression)
return Program.Elements.Raise_Expressions.Raise_Expression_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Raise_Expression)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Raise_Expression)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Raise_Expression)
return Boolean;
end Program.Nodes.Raise_Expressions;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2019, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
package body AdaFruit.CharlieWing is
-----------------
-- LED_Address --
-----------------
overriding
function LED_Address (This : Device;
X : IS31FL3731.X_Coord;
Y : IS31FL3731.Y_Coord)
return IS31FL3731.LED_Id
is
pragma Unreferenced (This);
X2 : Natural := X;
Y2 : Natural := Y;
begin
if X2 > 7 then
X2 := 15 - X2;
Y2 := Y2 + 8;
else
Y2 := 7 - Y2;
end if;
return IS31FL3731.LED_Id (X2 * 16 + Y2);
end LED_Address;
end AdaFruit.CharlieWing;
|
-- This spec has been automatically generated from STM32F0xx.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package STM32_SVD.CEC is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_CECEN_Field is STM32_SVD.Bit;
subtype CR_TXSOM_Field is STM32_SVD.Bit;
subtype CR_TXEOM_Field is STM32_SVD.Bit;
-- control register
type CR_Register is record
-- CEC Enable
CECEN : CR_CECEN_Field := 16#0#;
-- Tx start of message
TXSOM : CR_TXSOM_Field := 16#0#;
-- Tx End Of Message
TXEOM : CR_TXEOM_Field := 16#0#;
-- unspecified
Reserved_3_31 : STM32_SVD.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
CECEN at 0 range 0 .. 0;
TXSOM at 0 range 1 .. 1;
TXEOM at 0 range 2 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype CFGR_OAR_Field is STM32_SVD.UInt4;
subtype CFGR_LSTN_Field is STM32_SVD.Bit;
subtype CFGR_SFT_Field is STM32_SVD.UInt3;
subtype CFGR_RXTOL_Field is STM32_SVD.Bit;
subtype CFGR_BRESTP_Field is STM32_SVD.Bit;
subtype CFGR_BREGEN_Field is STM32_SVD.Bit;
subtype CFGR_LBPEGEN_Field is STM32_SVD.Bit;
-- configuration register
type CFGR_Register is record
-- Own Address
OAR : CFGR_OAR_Field := 16#0#;
-- Listen mode
LSTN : CFGR_LSTN_Field := 16#0#;
-- Signal Free Time
SFT : CFGR_SFT_Field := 16#0#;
-- Rx-Tolerance
RXTOL : CFGR_RXTOL_Field := 16#0#;
-- Rx-stop on bit rising error
BRESTP : CFGR_BRESTP_Field := 16#0#;
-- Generate error-bit on bit rising error
BREGEN : CFGR_BREGEN_Field := 16#0#;
-- Generate Error-Bit on Long Bit Period Error
LBPEGEN : CFGR_LBPEGEN_Field := 16#0#;
-- unspecified
Reserved_12_31 : STM32_SVD.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CFGR_Register use record
OAR at 0 range 0 .. 3;
LSTN at 0 range 4 .. 4;
SFT at 0 range 5 .. 7;
RXTOL at 0 range 8 .. 8;
BRESTP at 0 range 9 .. 9;
BREGEN at 0 range 10 .. 10;
LBPEGEN at 0 range 11 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype TXDR_TXD_Field is STM32_SVD.Byte;
-- Tx data register
type TXDR_Register is record
-- Write-only. Tx Data register
TXD : TXDR_TXD_Field := 16#0#;
-- unspecified
Reserved_8_31 : STM32_SVD.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TXDR_Register use record
TXD at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype RXDR_RXDR_Field is STM32_SVD.Byte;
-- Rx Data Register
type RXDR_Register is record
-- Read-only. CEC Rx Data Register
RXDR : RXDR_RXDR_Field;
-- unspecified
Reserved_8_31 : STM32_SVD.UInt24;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RXDR_Register use record
RXDR at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype ISR_RXBR_Field is STM32_SVD.Bit;
subtype ISR_RXEND_Field is STM32_SVD.Bit;
subtype ISR_RXOVR_Field is STM32_SVD.Bit;
subtype ISR_BRE_Field is STM32_SVD.Bit;
subtype ISR_SBPE_Field is STM32_SVD.Bit;
subtype ISR_LBPE_Field is STM32_SVD.Bit;
subtype ISR_RXACKE_Field is STM32_SVD.Bit;
subtype ISR_ARBLST_Field is STM32_SVD.Bit;
subtype ISR_TXBR_Field is STM32_SVD.Bit;
subtype ISR_TXEND_Field is STM32_SVD.Bit;
subtype ISR_TXUDR_Field is STM32_SVD.Bit;
subtype ISR_TXERR_Field is STM32_SVD.Bit;
subtype ISR_TXACKE_Field is STM32_SVD.Bit;
-- Interrupt and Status Register
type ISR_Register is record
-- Rx-Byte Received
RXBR : ISR_RXBR_Field := 16#0#;
-- End Of Reception
RXEND : ISR_RXEND_Field := 16#0#;
-- Rx-Overrun
RXOVR : ISR_RXOVR_Field := 16#0#;
-- Rx-Bit rising error
BRE : ISR_BRE_Field := 16#0#;
-- Rx-Short Bit period error
SBPE : ISR_SBPE_Field := 16#0#;
-- Rx-Long Bit Period Error
LBPE : ISR_LBPE_Field := 16#0#;
-- Rx-Missing Acknowledge
RXACKE : ISR_RXACKE_Field := 16#0#;
-- Arbitration Lost
ARBLST : ISR_ARBLST_Field := 16#0#;
-- Tx-Byte Request
TXBR : ISR_TXBR_Field := 16#0#;
-- End of Transmission
TXEND : ISR_TXEND_Field := 16#0#;
-- Tx-Buffer Underrun
TXUDR : ISR_TXUDR_Field := 16#0#;
-- Tx-Error
TXERR : ISR_TXERR_Field := 16#0#;
-- Tx-Missing acknowledge error
TXACKE : ISR_TXACKE_Field := 16#0#;
-- unspecified
Reserved_13_31 : STM32_SVD.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ISR_Register use record
RXBR at 0 range 0 .. 0;
RXEND at 0 range 1 .. 1;
RXOVR at 0 range 2 .. 2;
BRE at 0 range 3 .. 3;
SBPE at 0 range 4 .. 4;
LBPE at 0 range 5 .. 5;
RXACKE at 0 range 6 .. 6;
ARBLST at 0 range 7 .. 7;
TXBR at 0 range 8 .. 8;
TXEND at 0 range 9 .. 9;
TXUDR at 0 range 10 .. 10;
TXERR at 0 range 11 .. 11;
TXACKE at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
subtype IER_RXBRIE_Field is STM32_SVD.Bit;
subtype IER_RXENDIE_Field is STM32_SVD.Bit;
subtype IER_RXOVRIE_Field is STM32_SVD.Bit;
subtype IER_BREIE_Field is STM32_SVD.Bit;
subtype IER_SBPEIE_Field is STM32_SVD.Bit;
subtype IER_LBPEIE_Field is STM32_SVD.Bit;
subtype IER_RXACKIE_Field is STM32_SVD.Bit;
subtype IER_ARBLSTIE_Field is STM32_SVD.Bit;
subtype IER_TXBRIE_Field is STM32_SVD.Bit;
subtype IER_TXENDIE_Field is STM32_SVD.Bit;
subtype IER_TXUDRIE_Field is STM32_SVD.Bit;
subtype IER_TXERRIE_Field is STM32_SVD.Bit;
subtype IER_TXACKIE_Field is STM32_SVD.Bit;
-- interrupt enable register
type IER_Register is record
-- Rx-Byte Received Interrupt Enable
RXBRIE : IER_RXBRIE_Field := 16#0#;
-- End Of Reception Interrupt Enable
RXENDIE : IER_RXENDIE_Field := 16#0#;
-- Rx-Buffer Overrun Interrupt Enable
RXOVRIE : IER_RXOVRIE_Field := 16#0#;
-- Bit Rising Error Interrupt Enable
BREIE : IER_BREIE_Field := 16#0#;
-- Short Bit Period Error Interrupt Enable
SBPEIE : IER_SBPEIE_Field := 16#0#;
-- Long Bit Period Error Interrupt Enable
LBPEIE : IER_LBPEIE_Field := 16#0#;
-- Rx-Missing Acknowledge Error Interrupt Enable
RXACKIE : IER_RXACKIE_Field := 16#0#;
-- Arbitration Lost Interrupt Enable
ARBLSTIE : IER_ARBLSTIE_Field := 16#0#;
-- Tx-Byte Request Interrupt Enable
TXBRIE : IER_TXBRIE_Field := 16#0#;
-- Tx-End of message interrupt enable
TXENDIE : IER_TXENDIE_Field := 16#0#;
-- Tx-Underrun interrupt enable
TXUDRIE : IER_TXUDRIE_Field := 16#0#;
-- Tx-Error Interrupt Enable
TXERRIE : IER_TXERRIE_Field := 16#0#;
-- Tx-Missing Acknowledge Error Interrupt Enable
TXACKIE : IER_TXACKIE_Field := 16#0#;
-- unspecified
Reserved_13_31 : STM32_SVD.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IER_Register use record
RXBRIE at 0 range 0 .. 0;
RXENDIE at 0 range 1 .. 1;
RXOVRIE at 0 range 2 .. 2;
BREIE at 0 range 3 .. 3;
SBPEIE at 0 range 4 .. 4;
LBPEIE at 0 range 5 .. 5;
RXACKIE at 0 range 6 .. 6;
ARBLSTIE at 0 range 7 .. 7;
TXBRIE at 0 range 8 .. 8;
TXENDIE at 0 range 9 .. 9;
TXUDRIE at 0 range 10 .. 10;
TXERRIE at 0 range 11 .. 11;
TXACKIE at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- HDMI-CEC controller
type CEC_Peripheral is record
-- control register
CR : aliased CR_Register;
-- configuration register
CFGR : aliased CFGR_Register;
-- Tx data register
TXDR : aliased TXDR_Register;
-- Rx Data Register
RXDR : aliased RXDR_Register;
-- Interrupt and Status Register
ISR : aliased ISR_Register;
-- interrupt enable register
IER : aliased IER_Register;
end record
with Volatile;
for CEC_Peripheral use record
CR at 16#0# range 0 .. 31;
CFGR at 16#4# range 0 .. 31;
TXDR at 16#8# range 0 .. 31;
RXDR at 16#C# range 0 .. 31;
ISR at 16#10# range 0 .. 31;
IER at 16#14# range 0 .. 31;
end record;
-- HDMI-CEC controller
CEC_Periph : aliased CEC_Peripheral
with Import, Address => System'To_Address (16#40007800#);
end STM32_SVD.CEC;
|
-- Copyright 2019-2021 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with System;
package Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
|
pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with System;
package sys_upthread_upthread_types_h is
-- * Copyright (c) 2003-2013 Apple Inc. All rights reserved.
-- *
-- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
-- *
-- * This file contains Original Code and/or Modifications of Original Code
-- * as defined in and that are subject to the Apple Public Source License
-- * Version 2.0 (the 'License'). You may not use this file except in
-- * compliance with the License. The rights granted to you under the License
-- * may not be used to create, or enable the creation or redistribution of,
-- * unlawful or unlicensed copies of an Apple operating system, or to
-- * circumvent, violate, or enable the circumvention or violation of, any
-- * terms of an Apple operating system software license agreement.
-- *
-- * Please obtain a copy of the License at
-- * http://www.opensource.apple.com/apsl/ and read it before using this file.
-- *
-- * The Original Code and all software distributed under the License are
-- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
-- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
-- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
-- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
-- * Please see the License for the specific language governing rights and
-- * limitations under the License.
-- *
-- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
--
-- pthread opaque structures
-- Routine to call
type uu_darwin_pthread_handler_rec;
type uu_darwin_pthread_handler_rec is record
uu_routine : access procedure (arg1 : System.Address); -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:58
uu_arg : System.Address; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:59
uu_next : access uu_darwin_pthread_handler_rec; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:60
end record
with Convention => C_Pass_By_Copy; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:57
-- Argument to pass
subtype anon820_array822 is Interfaces.C.char_array (0 .. 55);
type u_opaque_pthread_attr_t is record
uu_sig : aliased long; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:64
uu_opaque : aliased anon820_array822; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:65
end record
with Convention => C_Pass_By_Copy; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:63
subtype anon823_array825 is Interfaces.C.char_array (0 .. 39);
type u_opaque_pthread_cond_t is record
uu_sig : aliased long; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:69
uu_opaque : aliased anon823_array825; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:70
end record
with Convention => C_Pass_By_Copy; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:68
subtype anon826_array828 is Interfaces.C.char_array (0 .. 7);
type u_opaque_pthread_condattr_t is record
uu_sig : aliased long; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:74
uu_opaque : aliased anon826_array828; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:75
end record
with Convention => C_Pass_By_Copy; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:73
subtype anon829_array822 is Interfaces.C.char_array (0 .. 55);
type u_opaque_pthread_mutex_t is record
uu_sig : aliased long; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:79
uu_opaque : aliased anon829_array822; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:80
end record
with Convention => C_Pass_By_Copy; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:78
subtype anon830_array828 is Interfaces.C.char_array (0 .. 7);
type u_opaque_pthread_mutexattr_t is record
uu_sig : aliased long; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:84
uu_opaque : aliased anon830_array828; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:85
end record
with Convention => C_Pass_By_Copy; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:83
subtype anon831_array828 is Interfaces.C.char_array (0 .. 7);
type u_opaque_pthread_once_t is record
uu_sig : aliased long; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:89
uu_opaque : aliased anon831_array828; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:90
end record
with Convention => C_Pass_By_Copy; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:88
subtype anon832_array834 is Interfaces.C.char_array (0 .. 191);
type u_opaque_pthread_rwlock_t is record
uu_sig : aliased long; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:94
uu_opaque : aliased anon832_array834; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:95
end record
with Convention => C_Pass_By_Copy; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:93
subtype anon835_array836 is Interfaces.C.char_array (0 .. 15);
type u_opaque_pthread_rwlockattr_t is record
uu_sig : aliased long; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:99
uu_opaque : aliased anon835_array836; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:100
end record
with Convention => C_Pass_By_Copy; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:98
subtype anon837_array839 is Interfaces.C.char_array (0 .. 8175);
type u_opaque_pthread_t is record
uu_sig : aliased long; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:104
uu_cleanup_stack : access uu_darwin_pthread_handler_rec; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:105
uu_opaque : aliased anon837_array839; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:106
end record
with Convention => C_Pass_By_Copy; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:103
subtype uu_darwin_pthread_attr_t is u_opaque_pthread_attr_t; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:109
subtype uu_darwin_pthread_cond_t is u_opaque_pthread_cond_t; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:110
subtype uu_darwin_pthread_condattr_t is u_opaque_pthread_condattr_t; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:111
subtype uu_darwin_pthread_key_t is unsigned_long; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:112
subtype uu_darwin_pthread_mutex_t is u_opaque_pthread_mutex_t; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:113
subtype uu_darwin_pthread_mutexattr_t is u_opaque_pthread_mutexattr_t; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:114
subtype uu_darwin_pthread_once_t is u_opaque_pthread_once_t; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:115
subtype uu_darwin_pthread_rwlock_t is u_opaque_pthread_rwlock_t; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:116
subtype uu_darwin_pthread_rwlockattr_t is u_opaque_pthread_rwlockattr_t; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:117
type uu_darwin_pthread_t is access all u_opaque_pthread_t; -- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h:118
end sys_upthread_upthread_types_h;
|
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Command_Line; use Ada.Command_Line;
with AWS.Response;
with AWS.Client;
with AWS.Messages;
with AWS.URL;
with AWS.Status;
procedure Wttr is
Not_Enough_Arguments: exception;
Response : AWS.Response.Data;
begin
if Argument_Count < 1 then
raise Not_Enough_Arguments;
end if;
declare
URL : String := "https://wttr.in/" & AWS.URL.Encode(Argument(1)) & "?format=4";
begin
Put_Line("Requesting " & URL);
Response := AWS.Client.Get(URL => URL);
Put_Line(AWS.Messages.Image(AWS.Response.Status_Code(Response)));
Put_Line(AWS.Response.Message_Body(Response));
end;
end;
|
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . O S _ I N T E R F A C E --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1997-2001, Florida State University --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. It is --
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
-- State University (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
-- This is a AIX (Native) version of this package
pragma Polling (Off);
-- Turn off polling, we do not want ATC polling to take place during
-- tasking operations. It causes infinite loops and other problems.
with Interfaces.C;
package body System.OS_Interface is
use Interfaces.C;
-----------------
-- To_Duration --
-----------------
function To_Duration (TS : timespec) return Duration is
begin
return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9;
end To_Duration;
function To_Duration (TV : struct_timeval) return Duration is
begin
return Duration (TV.tv_sec) + Duration (TV.tv_usec) / 10#1#E6;
end To_Duration;
-----------------
-- To_Timespec --
-----------------
function To_Timespec (D : Duration) return timespec is
S : time_t;
F : Duration;
begin
S := time_t (Long_Long_Integer (D));
F := D - Duration (S);
-- If F has negative value due to a round-up, adjust for positive F
-- value.
if F < 0.0 then
S := S - 1;
F := F + 1.0;
end if;
return timespec' (tv_sec => S,
tv_nsec => long (Long_Long_Integer (F * 10#1#E9)));
end To_Timespec;
----------------
-- To_Timeval --
----------------
function To_Timeval (D : Duration) return struct_timeval is
S : long;
F : Duration;
begin
S := long (Long_Long_Integer (D));
F := D - Duration (S);
-- If F has negative value due to a round-up, adjust for positive F
-- value.
if F < 0.0 then
S := S - 1;
F := F + 1.0;
end if;
return struct_timeval' (tv_sec => S,
tv_usec => long (Long_Long_Integer (F * 10#1#E6)));
end To_Timeval;
-------------------
-- clock_gettime --
-------------------
function clock_gettime
(clock_id : clockid_t;
tp : access timespec)
return int
is
Result : int;
tv : aliased struct_timeval;
function gettimeofday
(tv : access struct_timeval;
tz : System.Address := System.Null_Address) return int;
pragma Import (C, gettimeofday, "gettimeofday");
begin
Result := gettimeofday (tv'Unchecked_Access);
tp.all := To_Timespec (To_Duration (tv));
return Result;
end clock_gettime;
-----------------
-- sched_yield --
-----------------
-- AIX Thread does not have sched_yield;
function sched_yield return int is
procedure pthread_yield;
pragma Import (C, pthread_yield, "pthread_yield");
begin
pthread_yield;
return 0;
end sched_yield;
function Get_Stack_Base (thread : pthread_t) return Address is
begin
return Null_Address;
end Get_Stack_Base;
end System.OS_Interface;
|
-- -*- Mode: Ada -*-
-- Filename : ether.ads
-- Description : Root of the Ether SCGI library.
-- Author : Luke A. Guest
-- Created On : Mon Mar 28 11:43:06 2011
with Ada.Strings.Unbounded;
package Ether is
Initialisation_Error : exception;
-- Initialise the library with the max umber of bytes a request can have as content-type
-- and the library's upload directory, i.e. where to save files to.
procedure Initialise
(Bytes : in Positive;
Upload_Dir : in String;
Temp_Dir : in String);
-- Has the library been initialisied?
function Is_Initialised return Boolean;
-- Return the max number of bytes a request can have as it's content-type.
function Max_Request_Size return Positive;
-- Get the directory to where the uploaded files are saved to.
function Upload_Dir return String;
-- Get the directory where temporary files go.
function Temp_Dir return String;
private
package US renames Ada.Strings.Unbounded;
Initialised : Boolean := False;
Max_Request_Bytes : Positive := 2000;
Uploads : US.Unbounded_String := US.Null_Unbounded_String;
Temps : US.Unbounded_String := US.Null_Unbounded_String;
end Ether;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.Utp.Get_Timezone_Actions.Collections is
pragma Preelaborate;
package Utp_Get_Timezone_Action_Collections is
new AMF.Generic_Collections
(Utp_Get_Timezone_Action,
Utp_Get_Timezone_Action_Access);
type Set_Of_Utp_Get_Timezone_Action is
new Utp_Get_Timezone_Action_Collections.Set with null record;
Empty_Set_Of_Utp_Get_Timezone_Action : constant Set_Of_Utp_Get_Timezone_Action;
type Ordered_Set_Of_Utp_Get_Timezone_Action is
new Utp_Get_Timezone_Action_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_Utp_Get_Timezone_Action : constant Ordered_Set_Of_Utp_Get_Timezone_Action;
type Bag_Of_Utp_Get_Timezone_Action is
new Utp_Get_Timezone_Action_Collections.Bag with null record;
Empty_Bag_Of_Utp_Get_Timezone_Action : constant Bag_Of_Utp_Get_Timezone_Action;
type Sequence_Of_Utp_Get_Timezone_Action is
new Utp_Get_Timezone_Action_Collections.Sequence with null record;
Empty_Sequence_Of_Utp_Get_Timezone_Action : constant Sequence_Of_Utp_Get_Timezone_Action;
private
Empty_Set_Of_Utp_Get_Timezone_Action : constant Set_Of_Utp_Get_Timezone_Action
:= (Utp_Get_Timezone_Action_Collections.Set with null record);
Empty_Ordered_Set_Of_Utp_Get_Timezone_Action : constant Ordered_Set_Of_Utp_Get_Timezone_Action
:= (Utp_Get_Timezone_Action_Collections.Ordered_Set with null record);
Empty_Bag_Of_Utp_Get_Timezone_Action : constant Bag_Of_Utp_Get_Timezone_Action
:= (Utp_Get_Timezone_Action_Collections.Bag with null record);
Empty_Sequence_Of_Utp_Get_Timezone_Action : constant Sequence_Of_Utp_Get_Timezone_Action
:= (Utp_Get_Timezone_Action_Collections.Sequence with null record);
end AMF.Utp.Get_Timezone_Actions.Collections;
|
-- { dg-do run }
with GNAT.MD5; use GNAT.MD5;
procedure md5_test is
TEST7 : constant String := "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
Expected : constant Message_Digest :=
"8215ef0796a20bcaaae116d3876c664a";
MD : Context;
begin
Update (MD, TEST7);
if Digest (MD) /= Expected then
raise Program_Error;
end if;
end;
|
-- test for deflating and inflating
with Ada.Command_Line;
with Ada.Directories;
with Ada.Environment_Variables;
with Ada.Text_IO;
with Ada.Streams.Stream_IO;
with zlib;
procedure test_di is
use type Ada.Streams.Stream_Element;
use type Ada.Streams.Stream_Element_Offset;
Verbose : Boolean := False;
begin
for I in 1 .. Ada.Command_Line.Argument_Count loop
if Ada.Command_Line.Argument (I) = "-v" then
Verbose := True;
end if;
end loop;
declare
Source_File : Ada.Streams.Stream_IO.File_Type;
begin
Ada.Streams.Stream_IO.Open (
Source_File,
Ada.Streams.Stream_IO.In_File,
"test_di.adb");
declare
Compressed_File_Name : constant String :=
Ada.Directories.Compose (
Ada.Environment_Variables.Value ("TMPDIR", Default => "/tmp"),
"test_di.gz");
Size : constant Ada.Streams.Stream_IO.Count :=
Ada.Streams.Stream_IO.Size (Source_File);
Source :
Ada.Streams.Stream_Element_Array
(1 .. Ada.Streams.Stream_Element_Offset (Size));
Reading_Last : Ada.Streams.Stream_Element_Offset;
begin
Ada.Streams.Stream_IO.Read (Source_File, Source, Reading_Last);
Ada.Streams.Stream_IO.Close (Source_File);
declare
Gz_File : Ada.Streams.Stream_IO.File_Type;
Stream : zlib.Stream := zlib.Deflate_Init (Header => zlib.GZip);
First : Ada.Streams.Stream_Element_Offset := Source'First;
In_Last : Ada.Streams.Stream_Element_Offset;
Output : Ada.Streams.Stream_Element_Array (1 .. 10);
Out_Last : Ada.Streams.Stream_Element_Offset;
Finished : Boolean;
begin
Ada.Streams.Stream_IO.Create (Gz_File, Name => Compressed_File_Name);
loop
if Verbose then
Ada.Text_IO.Put ('*');
end if;
zlib.Deflate (
Stream,
Source (First .. Source'Last),
In_Last,
Output,
Out_Last,
Finish => True,
Finished => Finished);
Ada.Streams.Stream_IO.Write (Gz_File, Output (Output'First .. Out_Last));
exit when Finished;
First := In_Last + 1;
end loop;
Ada.Streams.Stream_IO.Close (Gz_File);
if Verbose then
Ada.Text_IO.New_Line;
end if;
end;
declare
Gz_File : Ada.Streams.Stream_IO.File_Type;
Stream : zlib.Stream := zlib.Inflate_Init (Header => zlib.GZip);
Input : Ada.Streams.Stream_Element_Array (1 .. 10);
In_First : Ada.Streams.Stream_Element_Offset := Input'Last + 1;
In_Last : Ada.Streams.Stream_Element_Offset;
In_Used : Ada.Streams.Stream_Element_Offset;
Output : Ada.Streams.Stream_Element_Array (1 .. 10);
Out_Last : Ada.Streams.Stream_Element_Offset;
Finished : Boolean;
Index : Ada.Streams.Stream_Element_Offset := Source'First;
begin
Ada.Streams.Stream_IO.Open (
Gz_File,
Ada.Streams.Stream_IO.In_File,
Name => Compressed_File_Name);
loop
if Verbose then
Ada.Text_IO.Put ('*');
end if;
if In_First > Input'Last then
Ada.Streams.Stream_IO.Read (Gz_File, Input, In_Last);
In_First := Input'First;
end if;
zlib.Inflate (
Stream,
Input (In_First .. In_Last),
In_Used,
Output,
Out_Last,
Finish => In_Last < Input'Last,
Finished => Finished);
for I in Output'First .. Out_Last loop
if Output (I) /= Source (Index) then
raise Program_Error;
end if;
Index := Index + 1;
end loop;
exit when Finished;
In_First := In_Used + 1;
end loop;
Ada.Streams.Stream_IO.Close (Gz_File);
if Verbose then
Ada.Text_IO.New_Line;
end if;
if Index /= Source'Last + 1 then
raise Program_Error;
end if;
end;
end;
end;
-- finish
Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error.all, "ok");
end test_di;
|
-- Copyright 2017-2021 Bartek thindil Jasicki
--
-- This file is part of Steam Sky.
--
-- Steam Sky 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.
--
-- Steam Sky 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 Steam Sky. If not, see <http://www.gnu.org/licenses/>.
with Messages; use Messages;
with ShipModules; use ShipModules;
with Ships.Cargo; use Ships.Cargo;
with Ships.Crew; use Ships.Crew;
with Crew.Inventory; use Crew.Inventory;
package body Ships.Repairs is
procedure RepairShip(Minutes: Positive) is
OrderTime, CurrentMinutes, RepairPoints: Integer;
RepairNeeded, RepairStopped: Boolean := False;
CrewRepairPoints: Natural_Container.Vector;
procedure RepairModule(ModuleIndex: Positive) is
PointsIndex, PointsBonus, RepairValue: Natural;
RepairMaterial, ToolsIndex: Inventory_Container.Extended_Index;
begin
PointsIndex := 0;
RepairNeeded := True;
RepairStopped := False;
Repair_Module_Loop :
for J in Player_Ship.Crew.Iterate loop
if Player_Ship.Crew(J).Order /= Repair then
goto End_Of_Loop;
end if;
PointsIndex := PointsIndex + 1;
if CrewRepairPoints(PointsIndex) > 0 then
PointsBonus :=
(GetSkillLevel
(Player_Ship.Crew(J),
Modules_List(Player_Ship.Modules(ModuleIndex).Proto_Index)
.RepairSkill) /
10) *
CrewRepairPoints(PointsIndex);
RepairPoints := CrewRepairPoints(PointsIndex) + PointsBonus;
ToolsIndex :=
FindTools(Crew_Container.To_Index(J), Repair_Tools, Repair);
if ToolsIndex = 0 then
if PointsIndex = 1 then
AddMessage
("You don't have the proper repair tools to continue repairs of " &
To_String(Player_Ship.Modules(ModuleIndex).Name) & ".",
OrderMessage, RED);
else
AddMessage
(To_String(Player_Ship.Crew(J).Name) &
" can't continue repairs due to a lack of repair tools.",
OrderMessage, RED);
end if;
RepairStopped := True;
return;
end if;
RepairMaterial :=
FindItem
(Inventory => Player_Ship.Cargo,
ItemType =>
Modules_List
(Player_Ship.Modules(ModuleIndex).Proto_Index)
.RepairMaterial);
if RepairMaterial > 0
and then Player_Ship.Cargo(RepairMaterial).Amount <
RepairPoints then
RepairPoints := Player_Ship.Cargo(RepairMaterial).Amount;
end if;
if RepairMaterial = 0 then
AddMessage
("You don't have the proper repair materials to continue repairs of " &
To_String(Player_Ship.Modules(ModuleIndex).Name) & ".",
OrderMessage, RED);
RepairStopped := True;
return;
end if;
-- Repair module
if Player_Ship.Modules(ModuleIndex).Durability + RepairPoints >=
Player_Ship.Modules(ModuleIndex).Max_Durability then
RepairValue :=
Player_Ship.Modules(ModuleIndex).Max_Durability -
Player_Ship.Modules(ModuleIndex).Durability;
RepairNeeded := False;
else
RepairValue := RepairPoints;
end if;
if RepairValue = Player_Ship.Cargo(RepairMaterial).Amount and
ToolsIndex > RepairMaterial then
ToolsIndex := ToolsIndex - 1;
end if;
UpdateCargo
(Ship => Player_Ship, CargoIndex => RepairMaterial,
Amount => (0 - RepairValue));
Player_Ship.Modules(ModuleIndex).Durability :=
Player_Ship.Modules(ModuleIndex).Durability + RepairValue;
if RepairValue > CrewRepairPoints(PointsIndex) then
RepairValue := CrewRepairPoints(PointsIndex);
RepairPoints := 0;
else
RepairPoints := CrewRepairPoints(PointsIndex) - RepairValue;
end if;
GainExp
(RepairValue,
Modules_List(Player_Ship.Modules(ModuleIndex).Proto_Index)
.RepairSkill,
Crew_Container.To_Index(J));
CrewRepairPoints(PointsIndex) := RepairPoints;
DamageItem
(Player_Ship.Crew(J).Inventory, ToolsIndex,
GetSkillLevel
(Player_Ship.Crew(J),
Modules_List(Player_Ship.Modules(ModuleIndex).Proto_Index)
.RepairSkill),
Crew_Container.To_Index(J));
exit Repair_Module_Loop when not RepairNeeded;
end if;
<<End_Of_Loop>>
end loop Repair_Module_Loop;
end RepairModule;
begin
Count_Repair_Workers_Loop :
for Member of Player_Ship.Crew loop
if Member.Order = Repair then
CurrentMinutes := Minutes;
OrderTime := Member.OrderTime;
RepairPoints := 0;
Count_Repair_Points_Loop :
while CurrentMinutes > 0 loop
if CurrentMinutes >= OrderTime then
CurrentMinutes := CurrentMinutes - OrderTime;
RepairPoints := RepairPoints + 1;
OrderTime := 15;
else
OrderTime := OrderTime - CurrentMinutes;
CurrentMinutes := 0;
end if;
end loop Count_Repair_Points_Loop;
CrewRepairPoints.Append(New_Item => RepairPoints);
Member.OrderTime := OrderTime;
end if;
end loop Count_Repair_Workers_Loop;
if CrewRepairPoints.Length = 0 then
return;
end if;
if Player_Ship.Repair_Module > 0
and then Player_Ship.Modules(Player_Ship.Repair_Module).Durability <
Player_Ship.Modules(Player_Ship.Repair_Module).Max_Durability then
RepairModule(Player_Ship.Repair_Module);
end if;
Repair_Loop :
for I in Player_Ship.Modules.Iterate loop
if Player_Ship.Modules(I).Durability <
Player_Ship.Modules(I).Max_Durability then
RepairModule(Modules_Container.To_Index(I));
end if;
end loop Repair_Loop;
-- Send repair team on break if all is ok
if not RepairNeeded or RepairStopped then
if not RepairNeeded then
AddMessage("All repairs have been finished.", OrderMessage, GREEN);
end if;
Give_Orders_Loop :
for I in Player_Ship.Crew.Iterate loop
if Player_Ship.Crew(I).Order = Repair then
GiveOrders(Player_Ship, Crew_Container.To_Index(I), Rest);
end if;
end loop Give_Orders_Loop;
end if;
end RepairShip;
end Ships.Repairs;
|
-- Copyright 2010, 2011 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck; use Pck;
procedure Foo is
My_Shape : Circle := (X => 1, Y => 2, R => 3);
X : Integer;
begin
X := Position_X (My_Shape);
end Foo;
|
with
openGL.Texture;
package openGL.Frame_Buffer
is
type Item is tagged private;
null_Buffer : constant Item;
---------
--- Forge
--
package Forge
is
function to_Frame_Buffer return Item;
function to_Frame_Buffer (Width,
Height : in Positive) return Item;
end Forge;
procedure destruct (Self : in out Item);
--------------
--- Attributes
--
subtype Buffer_Name is GL.GLuint; -- An openGL frame buffer 'Name'.
function Name (Self : in Item) return Buffer_Name;
function Texture (Self : in Item) return openGL.Texture.Object;
procedure Texture_is (Self : in out Item; now : in openGL.Texture.Object);
function is_complete (Self : in Item) return Boolean;
--------------
--- Operations
--
procedure enable (Self : in Item);
procedure disable (Self : in Item);
--
-- Unbind the frame buffer so rendering will return to the backbuffer.
private
type Item is tagged
record
Name : aliased buffer_Name;
Texture : openGL.Texture.Object;
end record;
null_Buffer : constant Item := (Name => 0,
Texture => openGL.Texture.null_Object);
end openGL.Frame_Buffer;
|
package body Sensors.Conversions is
use Sensors.LibSensors.Sensors_Sensors_H;
----------------
-- Convert_Up --
----------------
function Convert_Up
(Source : Interfaces.C.Short)
return Natural is (Natural (Source));
function Convert_Up
(Source : Interfaces.C.Int)
return Natural is (Natural (Source));
function Convert_Up
(Source : Sensors_Feature_Type)
return Feature_Type is
(case Source is
when SENSORS_FEATURE_IN => FEATURE_IN,
when SENSORS_FEATURE_FAN => FEATURE_FAN,
when SENSORS_FEATURE_TEMP => FEATURE_TEMP,
when SENSORS_FEATURE_POWER => FEATURE_POWER,
when SENSORS_FEATURE_ENERGY => FEATURE_ENERGY,
when SENSORS_FEATURE_CURR => FEATURE_CURR,
when SENSORS_FEATURE_HUMIDITY => FEATURE_HUMIDITY,
when SENSORS_FEATURE_MAX_MAIN => FEATURE_MAX_MAIN,
when SENSORS_FEATURE_VID => FEATURE_VID,
when SENSORS_FEATURE_INTRUSION => FEATURE_INTRUSION,
when SENSORS_FEATURE_MAX_OTHER => FEATURE_MAX_OTHER,
when SENSORS_FEATURE_MAX => FEATURE_MAX,
when others => FEATURE_UNKNOWN);
function Convert_Up
(Source : Interfaces.C.Strings.Chars_Ptr)
return Ada.Strings.Unbounded.Unbounded_String is (Ada.Strings.Unbounded.To_Unbounded_String (Interfaces.C.Strings.Value (Source)));
function Convert_Up
(Source : Sensors.LibSensors.Sensors_Sensors_H.Sensors_Bus_Id)
return Bus_Id
is
begin
return Bus_Id'(Sensor_Type => Convert_Up (Source.C_Type),
Nr => Convert_Up (Source.Nr));
end Convert_Up;
----------------
-- Convert_Up --
----------------
function Convert_Up
(Source : Sensors.LibSensors.Sensors_Sensors_H.Sensors_Chip_Name)
return Chip_Name
is
begin
return Chip_Name'(Prefix => Convert_Up (Source.Prefix),
Bus => Convert_Up (Source.Bus),
Addr => Convert_Up (Source.Addr),
Path => Convert_Up (Source.Path));
end Convert_Up;
----------------
-- Convert_Up --
----------------
function Convert_Up
(Source : Sensors.LibSensors.Sensors_Sensors_H.Sensors_Feature)
return Feature
is
begin
return Feature'(Name => Convert_Up (Source.Name),
Number => Convert_Up (Source.Number),
Kind => Convert_Up (Source.C_Type),
First_Subfeature => Convert_Up (Source.First_Subfeature));
end Convert_Up;
function Convert_Down (Source : Bus_Id) return Sensors.LibSensors.Sensors_Sensors_H.Sensors_Bus_Id is
begin
return Sensors.LibSensors.Sensors_Sensors_H.Sensors_Bus_Id'(C_Type => Convert_Down (Source.Sensor_Type),
Nr => Convert_Down (Source.Nr));
end;
function Convert_Down (Source : Chip_Name) return Sensors.LibSensors.Sensors_Sensors_H.Sensors_Chip_Name is
begin
return Sensors.LibSensors.Sensors_Sensors_H.Sensors_Chip_Name'(Prefix => Convert_Down (Source.Prefix),
Bus => Convert_Down (Source.Bus),
Addr => Convert_Down (Source.Addr),
Path => Convert_Down (Source.Path));
end;
function Convert_Down (Source : Feature_Type)return Sensors.LibSensors.Sensors_Sensors_H.Sensors_Feature_Type is
(case Source is
when FEATURE_IN => SENSORS_FEATURE_IN,
when FEATURE_FAN => SENSORS_FEATURE_FAN,
when FEATURE_TEMP => SENSORS_FEATURE_TEMP,
when FEATURE_POWER => SENSORS_FEATURE_POWER,
when FEATURE_ENERGY => SENSORS_FEATURE_ENERGY,
when FEATURE_CURR => SENSORS_FEATURE_CURR,
when FEATURE_HUMIDITY => SENSORS_FEATURE_HUMIDITY,
when FEATURE_MAX_MAIN => SENSORS_FEATURE_MAX_MAIN,
when FEATURE_VID => SENSORS_FEATURE_VID,
when FEATURE_INTRUSION => SENSORS_FEATURE_INTRUSION,
when FEATURE_MAX_OTHER => SENSORS_FEATURE_MAX_OTHER,
when FEATURE_MAX => SENSORS_FEATURE_MAX,
when others => SENSORS_FEATURE_UNKNOWN);
function Convert_Down (Source : Feature)return Sensors.LibSensors.Sensors_Sensors_H.Sensors_Feature is
begin
return Sensors.LibSensors.Sensors_Sensors_H.Sensors_Feature'(Name => Convert_Down (Source.Name),
Number => Convert_Down (Source.Number),
C_Type => Convert_Down (Source.Kind),
First_Subfeature => Convert_Down (Source.First_Subfeature),
Padding1 => 0);
end;
function Convert_Down (Source : Natural) return Interfaces.C.Short is (Interfaces.C.Short (Source));
function Convert_Down (Source : Natural) return Interfaces.C.Int is (Interfaces.C.Int (Source));
function Convert_Down (Source : Ada.Strings.Unbounded.Unbounded_String)return Interfaces.C.Strings.Chars_Ptr is
(Interfaces.C.Strings.New_String (Ada.Strings.Unbounded.To_String (Source)));
end Sensors.Conversions;
|
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Numerics.Real_Arrays; use Ada.Numerics.Real_Arrays;
procedure Matrix_Product is
procedure Put (X : Real_Matrix) is
type Fixed is delta 0.01 range -100.0..100.0;
begin
for I in X'Range (1) loop
for J in X'Range (2) loop
Put (Fixed'Image (Fixed (X (I, J))));
end loop;
New_Line;
end loop;
end Put;
A : constant Real_Matrix :=
( ( 1.0, 1.0, 1.0, 1.0),
( 2.0, 4.0, 8.0, 16.0),
( 3.0, 9.0, 27.0, 81.0),
( 4.0, 16.0, 64.0, 256.0)
);
B : constant Real_Matrix :=
( ( 4.0, -3.0, 4.0/3.0, -1.0/4.0 ),
(-13.0/3.0, 19.0/4.0, -7.0/3.0, 11.0/24.0),
( 3.0/2.0, -2.0, 7.0/6.0, -1.0/4.0 ),
( -1.0/6.0, 1.0/4.0, -1.0/6.0, 1.0/24.0)
);
begin
Put (A * B);
end Matrix_Product;
|
-----------------------------------------------------------------------
-- asf-lifecycles -- Lifecycle
-- Copyright (C) 2010, 2011, 2012, 2018 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
with ASF.Contexts.Exceptions;
with ASF.Contexts.Flash;
package body ASF.Lifecycles is
-- ------------------------------
-- Initialize the the lifecycle handler.
-- ------------------------------
procedure Initialize (Controller : in out Lifecycle;
Views : ASF.Applications.Views.View_Handler_Access) is
begin
-- Create the phase controllers.
Lifecycle'Class (Controller).Create_Phase_Controllers;
-- Initialize the phase controllers.
for Phase in Controller.Controllers'Range loop
Controller.Controllers (Phase).Initialize (Views);
end loop;
end Initialize;
-- ------------------------------
-- Finalize the lifecycle handler, freeing the allocated storage.
-- ------------------------------
overriding
procedure Finalize (Controller : in out Lifecycle) is
procedure Free is new Ada.Unchecked_Deallocation (Phase_Controller'Class,
Phase_Controller_Access);
begin
-- Free the phase controllers.
for Phase in Controller.Controllers'Range loop
Free (Controller.Controllers (Phase));
end loop;
end Finalize;
-- ------------------------------
-- Set the controller to be used for the given phase.
-- ------------------------------
procedure Set_Controller (Controller : in out Lifecycle;
Phase : in Phase_Type;
Instance : in Phase_Controller_Access) is
begin
Controller.Controllers (Phase) := Instance;
end Set_Controller;
-- ------------------------------
-- Execute the lifecycle controller associated with the phase defined in <b>Phase</b>.
-- Before processing, setup the faces context to update the current phase, then invoke
-- the <b>Before_Phase</b> actions of the phase listeners. After execution of the controller
-- invoke the <b>After_Phase</b> actions of the phase listeners.
-- If an exception is raised, catch it and save it in the faces context.
-- ------------------------------
procedure Execute (Controller : in Lifecycle;
Context : in out ASF.Contexts.Faces.Faces_Context'Class;
Listeners : in Listener_Vectors.Ref;
Phase : in Phase_Type) is
use type ASF.Events.Phases.Phase_Type;
use type ASF.Contexts.Exceptions.Exception_Handler_Access;
-- Execute the before phase listener action.
procedure Before_Phase (Listener : in ASF.Events.Phases.Phase_Listener_Access);
-- Execute the after phase listener action.
procedure After_Phase (Listener : in ASF.Events.Phases.Phase_Listener_Access);
Event : ASF.Events.Phases.Phase_Event (Phase);
Flash : constant ASF.Contexts.Faces.Flash_Context_Access := Context.Get_Flash;
-- ------------------------------
-- Execute the before phase listener action.
-- ------------------------------
procedure Before_Phase (Listener : in ASF.Events.Phases.Phase_Listener_Access) is
P : constant ASF.Events.Phases.Phase_Type := Listener.Get_Phase;
begin
if P = Event.Phase or P = ASF.Events.Phases.ANY_PHASE then
Listener.Before_Phase (Event);
end if;
exception
when E : others =>
Context.Queue_Exception (E);
end Before_Phase;
-- ------------------------------
-- Execute the after phase listener action.
-- ------------------------------
procedure After_Phase (Listener : in ASF.Events.Phases.Phase_Listener_Access) is
P : constant ASF.Events.Phases.Phase_Type := Listener.Get_Phase;
begin
if P = Event.Phase or P = ASF.Events.Phases.ANY_PHASE then
Listener.After_Phase (Event);
end if;
exception
when E : others =>
Context.Queue_Exception (E);
end After_Phase;
begin
Context.Set_Current_Phase (Phase);
Flash.Do_Pre_Phase_Actions (Phase, Context);
-- Call the before phase listeners if there are some.
Listeners.Iterate (Before_Phase'Access);
begin
Controller.Controllers (Phase).Execute (Context);
exception
when E : others =>
Context.Queue_Exception (E);
end;
Flash.Do_Post_Phase_Actions (Phase, Context);
Listeners.Iterate (After_Phase'Access);
-- If exceptions have been raised and queued during the current phase, process them.
-- An exception handler could use them to redirect the current request to another
-- page or navigate to a specific view.
declare
Ex : constant ASF.Contexts.Exceptions.Exception_Handler_Access
:= Context.Get_Exception_Handler;
begin
if Ex /= null then
Ex.Handle;
end if;
end;
end Execute;
-- ------------------------------
-- Register a bundle and bind it to a facelet variable.
-- ------------------------------
procedure Execute (Controller : in Lifecycle;
Context : in out ASF.Contexts.Faces.Faces_Context'Class) is
use ASF.Events.Phases;
Listeners : constant Listener_Vectors.Ref := Controller.Listeners.Get;
begin
for Phase in RESTORE_VIEW .. INVOKE_APPLICATION loop
if Context.Get_Render_Response or Context.Get_Response_Completed then
return;
end if;
Controller.Execute (Context, Listeners, Phase);
end loop;
end Execute;
-- ------------------------------
-- Render the response by executing the response phase.
-- ------------------------------
procedure Render (Controller : in Lifecycle;
Context : in out ASF.Contexts.Faces.Faces_Context'Class) is
Listeners : constant Listener_Vectors.Ref := Controller.Listeners.Get;
begin
Controller.Execute (Context, Listeners, ASF.Events.Phases.RENDER_RESPONSE);
end Render;
-- ------------------------------
-- Add a phase listener in the lifecycle controller.
-- ------------------------------
procedure Add_Phase_Listener (Controller : in out Lifecycle;
Listener : in ASF.Events.Phases.Phase_Listener_Access) is
begin
Controller.Listeners.Append (Listener);
end Add_Phase_Listener;
-- ------------------------------
-- Remove a phase listener that was registered in the lifecycle controller.
-- ------------------------------
procedure Remove_Phase_Listener (Controller : in out Lifecycle;
Listener : in ASF.Events.Phases.Phase_Listener_Access) is
begin
Controller.Listeners.Remove (Listener);
end Remove_Phase_Listener;
end ASF.Lifecycles;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 2 4 --
-- --
-- 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 = 24
package System.Pack_24 is
pragma Preelaborate;
Bits : constant := 24;
type Bits_24 is mod 2 ** Bits;
for Bits_24'Size use Bits;
-- In all subprograms below, Rev_SSO is set True if the array has the
-- non-default scalar storage order.
function Get_24
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_24 with Inline;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is extracted and returned.
procedure Set_24
(Arr : System.Address;
N : Natural;
E : Bits_24;
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.
function GetU_24
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_24 with Inline;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is extracted and returned. This version
-- is used when Arr may represent an unaligned address.
procedure SetU_24
(Arr : System.Address;
N : Natural;
E : Bits_24;
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. This version
-- is used when Arr may represent an unaligned address
end System.Pack_24;
|
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- Terminal_Interface.Curses.Forms.Field_Types.Enumeration --
-- --
-- S P E C --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998-2003,2009 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.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C.Strings;
package Terminal_Interface.Curses.Forms.Field_Types.Enumeration is
pragma Preelaborate
(Terminal_Interface.Curses.Forms.Field_Types.Enumeration);
type String_Access is access String;
-- Type_Set is used by the child package Ada
type Type_Set is (Lower_Case, Upper_Case, Mixed_Case);
type Enum_Array is array (Positive range <>)
of String_Access;
type Enumeration_Info (C : Positive) is
record
Names : Enum_Array (1 .. C);
Case_Sensitive : Boolean := False;
Match_Must_Be_Unique : Boolean := False;
end record;
type Enumeration_Field is new Field_Type with private;
function Create (Info : Enumeration_Info;
Auto_Release_Names : Boolean := False)
return Enumeration_Field;
-- Make an fieldtype from the info. Enumerations are special, because
-- they normally don't copy the enum values into a private store, so
-- we have to care for the lifetime of the info we provide.
-- The Auto_Release_Names flag may be used to automatically releases
-- the strings in the Names array of the Enumeration_Info.
function Make_Enumeration_Type (Info : Enumeration_Info;
Auto_Release_Names : Boolean := False)
return Enumeration_Field renames Create;
procedure Release (Enum : in out Enumeration_Field);
-- But we may want to release the field to release the memory allocated
-- by it internally. After that the Enumeration field is no longer usable.
-- The next type defintions are all ncurses extensions. They are typically
-- not available in other curses implementations.
procedure Set_Field_Type (Fld : Field;
Typ : Enumeration_Field);
pragma Inline (Set_Field_Type);
private
type CPA_Access is access Interfaces.C.Strings.chars_ptr_array;
type Enumeration_Field is new Field_Type with
record
Case_Sensitive : Boolean := False;
Match_Must_Be_Unique : Boolean := False;
Arr : CPA_Access := null;
end record;
end Terminal_Interface.Curses.Forms.Field_Types.Enumeration;
|
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- Terminal_Interface.Curses.Text_IO.Integer_IO --
-- --
-- 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.10 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO;
with Terminal_Interface.Curses.Text_IO.Aux;
package body Terminal_Interface.Curses.Text_IO.Integer_IO is
package Aux renames Terminal_Interface.Curses.Text_IO.Aux;
package IIO is new Ada.Text_IO.Integer_IO (Num);
procedure Put
(Win : in Window;
Item : in Num;
Width : in Field := Default_Width;
Base : in Number_Base := Default_Base)
is
Buf : String (1 .. Field'Last);
begin
IIO.Put (Buf, Item, Base);
Aux.Put_Buf (Win, Buf, Width);
end Put;
procedure Put
(Item : in Num;
Width : in Field := Default_Width;
Base : in Number_Base := Default_Base)
is
begin
Put (Get_Window, Item, Width, Base);
end Put;
end Terminal_Interface.Curses.Text_IO.Integer_IO;
|
--::::::::::
--screen.ads
--::::::::::
PACKAGE Screen IS
-- Procedures for drawing pictures on ANSI Terminal Screen
ScreenDepth : CONSTANT Integer := 24;
ScreenWidth : CONSTANT Integer := 80;
SUBTYPE Depth IS Integer RANGE 1..ScreenDepth;
SUBTYPE Width IS Integer RANGE 1..ScreenWidth;
PROCEDURE Beep;
PROCEDURE ClearScreen;
PROCEDURE MoveCursor (Column : Width; Row : Depth);
END Screen;
--::::::::::
--windows.ads
--::::::::::
WITH Screen;
USE Screen;
PACKAGE Windows IS
TYPE Window IS PRIVATE;
PROCEDURE Open (W : IN OUT Window; -- Window variable returned
Row : Depth; -- Upper left corner
Column : Width;
Height : Depth; -- Size of window
Width : Screen.Width);
-- Create a window variable and open the window for writing.
-- No checks for overlap of windows are made.
PROCEDURE Close (W : IN OUT Window);
-- Close window and clear window variable.
PROCEDURE Title (W : IN OUT Window;
Name : String;
Under : Character);
-- Put a title name at the top of the window. If the parameter
-- under <> 0C or ' ', underline the title with the specified character.
PROCEDURE Borders (W : IN OUT Window;
Corner, Down, Across : Character);
-- Draw border around current writable area in window with characters
-- specified. Call this BEFORE Title.
PROCEDURE Gotorowcolumn (W : IN OUT Window;
Row : Depth;
Column : Width);
-- Goto the row and column specified. Coordinates are relative to the
-- upper left corner of window, which is (1, 1)
PROCEDURE Put (W : IN OUT Window;
Ch : Character);
-- put one character to the window.
-- If end of column, go to the next row.
-- If end of window, go to the top of the window.
PROCEDURE Put_String (W : IN OUT Window;
S : String);
-- put a string to window.
PROCEDURE New_Line (W : IN OUT Window);
-- Go to beginning of next line. Next line is
-- not blanked until next character is written
PRIVATE
TYPE Window IS
RECORD
Currentrow, -- Current cursor row
Firstrow,
Lastrow : Depth;
Currentcolumn, -- Current cursor column
Firstcolumn,
Lastcolumn : Width;
END RECORD;
END Windows;
--::::::::::
--screen.adb
--::::::::::
WITH Text_IO;
WITH My_Int_IO;
PACKAGE BODY Screen IS
-- Procedures for drawing pictures on ANSI Terminal Screen
PROCEDURE Beep IS
BEGIN
Text_IO.Put (Item => ASCII.BEL);
END Beep;
PROCEDURE ClearScreen IS
BEGIN
Text_IO.Put (Item => ASCII.ESC);
Text_IO.Put (Item => "[2J");
END ClearScreen;
PROCEDURE MoveCursor (Column : Width; Row : Depth) IS
BEGIN
Text_IO.New_Line;
Text_IO.Put (Item => ASCII.ESC);
Text_IO.Put ("[");
My_Int_IO.Put (Item => Row, Width => 1);
Text_IO.Put (Item => ';');
My_Int_IO.Put (Item => Column, Width => 1);
Text_IO.Put (Item => 'f');
END MoveCursor;
END Screen;
--::::::::::
--windows.adb
--::::::::::
WITH Text_IO, My_Int_IO, Screen;
USE Text_IO, My_Int_IO, Screen;
PACKAGE BODY Windows IS
CursorRow : Depth := 1; -- Current cursor position
CursorCol : Width := 1;
PROCEDURE Open (W : IN OUT Window;
Row : Depth;
Column : Width;
Height : Depth;
Width : Screen.Width) IS
--Put the Window's cursor in upper left corner
BEGIN
W.CurrentRow := Row;
W.FirstRow := Row;
W.LastRow := Row + Height - 1;
W.CurrentColumn := Column;
W.FirstColumn := Column;
W.LastColumn := Column + Width - 1;
END Open;
PROCEDURE Close (W : IN OUT Window) IS
BEGIN
NULL;
END Close;
PROCEDURE Title (W : IN OUT Window;
name : String;
under : CHARACTER) IS
-- Put name at the top of the Window. If under <> ' ', underline
-- the title.
i : Width;
BEGIN
-- Put name on top line
W.CurrentColumn := W.FirstColumn;
W.CurrentRow := W.FirstRow;
Put_String (w, name);
new_line (w);
-- Underline name if desired, and move the First line of the Window
-- below the title
IF under = ' ' THEN
W.FirstRow := W.FirstRow + 1;
ELSE
FOR i IN W.FirstColumn .. W.LastColumn LOOP
Put (w, under);
END LOOP;
new_line (w);
W.FirstRow := W.FirstRow + 2;
END IF;
END Title;
PROCEDURE GotoRowColumn (w : IN OUT Window;
Row : Depth;
Column : Width) IS
-- Relative to writable Window boundaries, of course
BEGIN
W.CurrentRow := W.FirstRow + Row;
W.CurrentColumn := W.FirstColumn + Column;
END GotoRowColumn;
PROCEDURE Borders (w : IN OUT Window;
corner, down, across : CHARACTER) IS
-- Draw border around current writable area in Window with characters.
-- Call this BEFORE Title.
i : Depth;
j : Width;
BEGIN
-- Put top line of border
MoveCursor (W.FirstColumn, W.FirstRow);
Text_IO.Put (corner);
FOR j IN W.FirstColumn + 1 .. W.LastColumn - 1 LOOP
Text_IO.Put (across);
END LOOP;
Text_IO.Put (corner);
-- Put the two side lines
FOR i IN W.FirstRow + 1 .. W.LastRow - 1 LOOP
MoveCursor (W.FirstColumn, i);
Text_IO.Put (down);
MoveCursor (W.LastColumn, i);
Text_IO.Put (down);
END LOOP;
-- Put the bottom line of the border
MoveCursor (W.FirstColumn, W.LastRow);
Text_IO.Put (corner);
FOR j IN W.FirstColumn + 1 .. W.LastColumn - 1 LOOP
Text_IO.Put (across);
END LOOP;
Text_IO.Put (corner);
-- Put the cursor at the very end of the Window
CursorRow := W.LastRow;
CursorCol := W.LastColumn + 1;
-- Make the Window smaller by one character on each side
W.FirstRow := W.FirstRow + 1;
W.CurrentRow := W.FirstRow;
W.LastRow := W.LastRow - 1;
W.FirstColumn := W.FirstColumn + 1;
W.CurrentColumn := W.FirstColumn;
W.LastColumn := W.LastColumn - 1;
END Borders;
PROCEDURE EraseToEndOfLine (W : IN OUT Window) IS
i : Width;
BEGIN
MoveCursor (W.CurrentColumn, W.CurrentRow);
FOR i IN W.CurrentColumn .. W.LastColumn LOOP
Text_IO.Put (' ');
END LOOP;
MoveCursor (W.CurrentColumn, W.CurrentRow);
CursorCol := W.CurrentColumn;
CursorRow := W.CurrentRow;
END EraseToEndOfLine;
PROCEDURE Put (W : IN OUT Window;
ch : CHARACTER) IS
-- If after end of line, move to First character of next line
-- If about to write First character on line, blank rest of line.
-- Put character.
BEGIN
IF Ch = ASCII.CR THEN
New_Line (W);
RETURN;
END IF;
-- If at end of current line, move to next line
IF W.CurrentColumn > W.LastColumn THEN
IF W.CurrentRow = W.LastRow THEN
W.CurrentRow := W.FirstRow;
ELSE
W.CurrentRow := W.CurrentRow + 1;
END IF;
W.CurrentColumn := W.FirstColumn;
END IF;
-- If at W.First char, erase line
IF W.CurrentColumn = W.FirstColumn THEN
EraseToEndOfLine (W);
END IF;
-- Put physical cursor at Window's cursor
IF (CursorCol /= W.CurrentColumn) OR (CursorRow /= W.CurrentRow) THEN
MoveCursor (W.CurrentColumn, W.CurrentRow);
CursorRow := W.CurrentRow;
END IF;
IF Ch = ASCII.BS THEN
-- Special backspace handling
IF W.CurrentColumn /= W.FirstColumn THEN
Text_IO.Put (Ch);
W.CurrentColumn := W.CurrentColumn - 1;
END IF;
ELSE
Text_IO.Put (Ch);
W.CurrentColumn := W.CurrentColumn + 1;
END IF;
CursorCol := W.CurrentColumn;
END Put;
PROCEDURE new_line (W : IN OUT Window) IS
col : Width;
-- If not after line, blank rest of line.
-- Move to First character of next line
BEGIN
IF W.CurrentColumn = 0 THEN
EraseToEndOfLine (W);
END IF;
IF W.CurrentRow = W.LastRow THEN
W.CurrentRow := W.FirstRow;
ELSE
W.CurrentRow := W.CurrentRow + 1;
END IF;
W.CurrentColumn := W.FirstColumn;
END new_line;
PROCEDURE Put_String (W : IN OUT Window;
S : String) IS
BEGIN
FOR I IN S'FIRST .. S'LAST LOOP
Put (W, S (i));
END LOOP;
END Put_String;
BEGIN -- Windows
ClearScreen;
MoveCursor (1, 1);
END Windows;
--::::::::::
--roomwind.adb
--::::::::::
WITH Windows;
WITH Chop;
WITH Phil;
WITH Calendar;
PRAGMA Elaborate(Phil);
PACKAGE BODY Room IS
Phils: ARRAY(Table_Type) OF Phil.Philosopher;
Phil_Windows: ARRAY(Table_Type) OF Windows.Window;
TYPE Phil_Names IS (Dijkstra, Texel, Booch, Ichbiah, Stroustrup);
TASK BODY Head_Waiter IS
T : Integer;
Start_Time: Calendar.Time;
BEGIN
ACCEPT Open_The_Room;
Start_Time := Calendar.Clock;
Windows.Open(Phil_Windows(1),1,23,7,30);
Windows.Borders(Phil_Windows(1),'+','|','-');
Windows.Title(Phil_Windows(1), "Eddy Dijkstra",'-');
Phils(1).Come_To_Life(1,1,2);
Windows.Open(Phil_Windows(3),9,50,7,30);
Windows.Borders(Phil_Windows(3),'+','|','-');
Windows.Title(Phil_Windows(3), "Grady Booch",'-');
Phils(3).Come_To_Life(3,3,4);
Windows.Open(Phil_Windows(2),9,2,7,30);
Windows.Borders(Phil_Windows(2),'+','|','-');
Windows.Title(Phil_Windows(2), "Putnam Texel",'-');
Phils(2).Come_To_Life(2,2,3);
Windows.Open(Phil_Windows(5),17,41,7,30);
Windows.Borders(Phil_Windows(5),'+','|','-');
Windows.Title(Phil_Windows(5), "Bjarne Stroustrup",'-');
Phils(5).Come_To_Life(5,1,5);
Windows.Open(Phil_Windows(4),17,8,7,30);
Windows.Borders(Phil_Windows(4),'+','|','-');
Windows.Title(Phil_Windows(4), "Jean Ichbiah",'-');
Phils(4).Come_To_Life(4,4,5);
LOOP
SELECT
ACCEPT Report_State(Which_Phil: Table_Type;
State: Phil.States;
How_Long: Natural := 0) DO
T := Integer(Calendar."-"(Calendar.Clock,Start_Time));
Windows.Put_String(Phil_Windows(Which_Phil),
"T=" & Integer'Image(T) & " ");
CASE State IS
WHEN Phil.Breathing =>
Windows.Put_String(Phil_Windows(Which_Phil), "Breathing...");
Windows.New_Line(Phil_Windows(Which_Phil));
WHEN Phil.Thinking =>
Windows.Put_String(Phil_Windows(Which_Phil),
"Thinking"
& Integer'Image(How_Long)
& " seconds.");
Windows.New_Line(Phil_Windows(Which_Phil));
WHEN Phil.Eating =>
Windows.Put_String(Phil_Windows(Which_Phil),
"Eating"
& Integer'Image(How_Long)
& " seconds.");
Windows.New_Line(Phil_Windows(Which_Phil));
WHEN Phil.Done_Eating =>
Windows.Put_String(Phil_Windows(Which_Phil), "Yum-yum (burp)");
Windows.New_Line(Phil_Windows(Which_Phil));
WHEN Phil.Got_One_Stick =>
Windows.Put_String(Phil_Windows(Which_Phil),
"First chopstick"
& Integer'Image(How_Long));
Windows.New_Line(Phil_Windows(Which_Phil));
WHEN Phil.Got_Other_Stick =>
Windows.Put_String(Phil_Windows(Which_Phil),
"Second chopstick"
& Integer'Image(How_Long));
Windows.New_Line(Phil_Windows(Which_Phil));
END CASE;
END Report_State;
OR
TERMINATE;
END SELECT;
END LOOP;
END Head_Waiter;
END Room;
|
-- This spec has been automatically generated from out.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
-- Timer0_A3
package MSP430_SVD.TIMER_0_A3 is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Timer A mode control 1
type TA0CTL_MC_Field is
(-- Timer A mode control: 0 - Stop
Mc_0,
-- Timer A mode control: 1 - Up to CCR0
Mc_1,
-- Timer A mode control: 2 - Continous up
Mc_2,
-- Timer A mode control: 3 - Up/Down
Mc_3)
with Size => 2;
for TA0CTL_MC_Field use
(Mc_0 => 0,
Mc_1 => 1,
Mc_2 => 2,
Mc_3 => 3);
-- Timer A clock input divider 1
type TA0CTL_ID_Field is
(-- Timer A input divider: 0 - /1
Id_0,
-- Timer A input divider: 1 - /2
Id_1,
-- Timer A input divider: 2 - /4
Id_2,
-- Timer A input divider: 3 - /8
Id_3)
with Size => 2;
for TA0CTL_ID_Field use
(Id_0 => 0,
Id_1 => 1,
Id_2 => 2,
Id_3 => 3);
-- Timer A clock source select 1
type TA0CTL_TASSEL_Field is
(-- Timer A clock source select: 0 - TACLK
Tassel_0,
-- Timer A clock source select: 1 - ACLK
Tassel_1,
-- Timer A clock source select: 2 - SMCLK
Tassel_2,
-- Timer A clock source select: 3 - INCLK
Tassel_3)
with Size => 2;
for TA0CTL_TASSEL_Field use
(Tassel_0 => 0,
Tassel_1 => 1,
Tassel_2 => 2,
Tassel_3 => 3);
-- Timer0_A3 Control
type TA0CTL_Register is record
-- Timer A counter interrupt flag
TAIFG : MSP430_SVD.Bit := 16#0#;
-- Timer A counter interrupt enable
TAIE : MSP430_SVD.Bit := 16#0#;
-- Timer A counter clear
TACLR : MSP430_SVD.Bit := 16#0#;
-- unspecified
Reserved_3_3 : MSP430_SVD.Bit := 16#0#;
-- Timer A mode control 1
MC : TA0CTL_MC_Field := MSP430_SVD.TIMER_0_A3.Mc_0;
-- Timer A clock input divider 1
ID : TA0CTL_ID_Field := MSP430_SVD.TIMER_0_A3.Id_0;
-- Timer A clock source select 1
TASSEL : TA0CTL_TASSEL_Field := MSP430_SVD.TIMER_0_A3.Tassel_0;
-- unspecified
Reserved_10_15 : MSP430_SVD.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 16,
Bit_Order => System.Low_Order_First;
for TA0CTL_Register use record
TAIFG at 0 range 0 .. 0;
TAIE at 0 range 1 .. 1;
TACLR at 0 range 2 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
MC at 0 range 4 .. 5;
ID at 0 range 6 .. 7;
TASSEL at 0 range 8 .. 9;
Reserved_10_15 at 0 range 10 .. 15;
end record;
-- Output mode 2
type TA0CCTL0_OUTMOD_Field is
(-- PWM output mode: 0 - output only
Outmod_0,
-- PWM output mode: 1 - set
Outmod_1,
-- PWM output mode: 2 - PWM toggle/reset
Outmod_2,
-- PWM output mode: 3 - PWM set/reset
Outmod_3,
-- PWM output mode: 4 - toggle
Outmod_4,
-- PWM output mode: 5 - Reset
Outmod_5,
-- PWM output mode: 6 - PWM toggle/set
Outmod_6,
-- PWM output mode: 7 - PWM reset/set
Outmod_7)
with Size => 3;
for TA0CCTL0_OUTMOD_Field use
(Outmod_0 => 0,
Outmod_1 => 1,
Outmod_2 => 2,
Outmod_3 => 3,
Outmod_4 => 4,
Outmod_5 => 5,
Outmod_6 => 6,
Outmod_7 => 7);
-- Capture input select 1
type TA0CCTL0_CCIS_Field is
(-- Capture input select: 0 - CCIxA
Ccis_0,
-- Capture input select: 1 - CCIxB
Ccis_1,
-- Capture input select: 2 - GND
Ccis_2,
-- Capture input select: 3 - Vcc
Ccis_3)
with Size => 2;
for TA0CCTL0_CCIS_Field use
(Ccis_0 => 0,
Ccis_1 => 1,
Ccis_2 => 2,
Ccis_3 => 3);
-- Capture mode 1
type TA0CCTL0_CM_Field is
(-- Capture mode: 0 - disabled
Cm_0,
-- Capture mode: 1 - pos. edge
Cm_1,
-- Capture mode: 1 - neg. edge
Cm_2,
-- Capture mode: 1 - both edges
Cm_3)
with Size => 2;
for TA0CCTL0_CM_Field use
(Cm_0 => 0,
Cm_1 => 1,
Cm_2 => 2,
Cm_3 => 3);
-- Timer0_A3 Capture/Compare Control 0
type TA0CCTL_Register is record
-- Capture/compare interrupt flag
CCIFG : MSP430_SVD.Bit := 16#0#;
-- Capture/compare overflow flag
COV : MSP430_SVD.Bit := 16#0#;
-- PWM Output signal if output mode 0
OUT_k : MSP430_SVD.Bit := 16#0#;
-- Capture input signal (read)
CCI : MSP430_SVD.Bit := 16#0#;
-- Capture/compare interrupt enable
CCIE : MSP430_SVD.Bit := 16#0#;
-- Output mode 2
OUTMOD : TA0CCTL0_OUTMOD_Field := MSP430_SVD.TIMER_0_A3.Outmod_0;
-- Capture mode: 1 /Compare mode : 0
CAP : MSP430_SVD.Bit := 16#0#;
-- unspecified
Reserved_9_9 : MSP430_SVD.Bit := 16#0#;
-- Latched capture signal (read)
SCCI : MSP430_SVD.Bit := 16#0#;
-- Capture sychronize
SCS : MSP430_SVD.Bit := 16#0#;
-- Capture input select 1
CCIS : TA0CCTL0_CCIS_Field := MSP430_SVD.TIMER_0_A3.Ccis_0;
-- Capture mode 1
CM : TA0CCTL0_CM_Field := MSP430_SVD.TIMER_0_A3.Cm_0;
end record
with Volatile_Full_Access, Object_Size => 16,
Bit_Order => System.Low_Order_First;
for TA0CCTL_Register use record
CCIFG at 0 range 0 .. 0;
COV at 0 range 1 .. 1;
OUT_k at 0 range 2 .. 2;
CCI at 0 range 3 .. 3;
CCIE at 0 range 4 .. 4;
OUTMOD at 0 range 5 .. 7;
CAP at 0 range 8 .. 8;
Reserved_9_9 at 0 range 9 .. 9;
SCCI at 0 range 10 .. 10;
SCS at 0 range 11 .. 11;
CCIS at 0 range 12 .. 13;
CM at 0 range 14 .. 15;
end record;
-----------------
-- Peripherals --
-----------------
-- Timer0_A3
type TIMER_0_A3_Peripheral is record
-- Timer0_A3 Interrupt Vector Word
TA0IV : aliased MSP430_SVD.UInt16;
-- Timer0_A3 Control
TA0CTL : aliased TA0CTL_Register;
-- Timer0_A3 Capture/Compare Control 0
TA0CCTL0 : aliased TA0CCTL_Register;
-- Timer0_A3 Capture/Compare Control 1
TA0CCTL1 : aliased TA0CCTL_Register;
-- Timer0_A3 Capture/Compare Control 2
TA0CCTL2 : aliased TA0CCTL_Register;
-- Timer0_A3 Counter Register
TA0R : aliased MSP430_SVD.UInt16;
-- Timer0_A3 Capture/Compare 0
TA0CCR0 : aliased MSP430_SVD.UInt16;
-- Timer0_A3 Capture/Compare 1
TA0CCR1 : aliased MSP430_SVD.UInt16;
-- Timer0_A3 Capture/Compare 2
TA0CCR2 : aliased MSP430_SVD.UInt16;
end record
with Volatile;
for TIMER_0_A3_Peripheral use record
TA0IV at 16#0# range 0 .. 15;
TA0CTL at 16#32# range 0 .. 15;
TA0CCTL0 at 16#34# range 0 .. 15;
TA0CCTL1 at 16#36# range 0 .. 15;
TA0CCTL2 at 16#38# range 0 .. 15;
TA0R at 16#42# range 0 .. 15;
TA0CCR0 at 16#44# range 0 .. 15;
TA0CCR1 at 16#46# range 0 .. 15;
TA0CCR2 at 16#48# range 0 .. 15;
end record;
-- Timer0_A3
TIMER_0_A3_Periph : aliased TIMER_0_A3_Peripheral
with Import, Address => TIMER_0_A3_Base;
end MSP430_SVD.TIMER_0_A3;
|
with Bitmaps.RGB;
with Simulated_Annealing;
generic
type Image_Access is access Bitmaps.RGB.Image;
package Problem is
subtype Direction is Integer range -1 .. 1;
type State is record
Img : Image_Access;
E : Long_Integer;
X, Y : Natural;
DX, DY : Direction;
Visited : Boolean;
end record;
function Objective (S : in State) return Float;
procedure Shuffle (S : in State);
procedure Roll (S : in out State);
function Mutate (S : in out State) return State;
package Opt is new Simulated_Annealing.Optimization (State, Objective,
Mutate);
end Problem;
|
package GESTE_Fonts.FreeSansBoldOblique5pt7b is
Font : constant Bitmap_Font_Ref;
private
FreeSansBoldOblique5pt7bBitmaps : aliased constant Font_Bitmap := (
16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#01#, 16#80#, 16#80#, 16#40#,
16#20#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#05#,
16#02#, 16#81#, 16#40#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#A1#, 16#F0#,
16#50#, 16#FC#, 16#28#, 16#14#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#01#, 16#03#, 16#C1#, 16#A1#, 16#C0#, 16#70#, 16#1C#, 16#36#, 16#1E#,
16#04#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#93#, 16#51#,
16#30#, 16#70#, 16#0B#, 16#8A#, 16#48#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#01#, 16#C1#, 16#A0#, 16#70#, 16#74#, 16#4E#, 16#26#,
16#1F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#02#, 16#01#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#02#, 16#03#, 16#01#, 16#01#, 16#80#, 16#80#, 16#40#,
16#20#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#01#, 16#00#, 16#80#, 16#40#, 16#20#, 16#10#, 16#18#, 16#08#, 16#00#,
16#00#, 16#00#, 16#00#, 16#02#, 16#05#, 16#81#, 16#80#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#40#, 16#20#, 16#7C#, 16#08#, 16#0C#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#20#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#01#, 16#01#, 16#00#, 16#80#, 16#80#, 16#40#, 16#40#,
16#20#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C1#,
16#21#, 16#90#, 16#98#, 16#4C#, 16#24#, 16#1C#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#81#, 16#C0#, 16#60#, 16#30#, 16#10#,
16#08#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#,
16#C1#, 16#20#, 16#10#, 16#18#, 16#30#, 16#30#, 16#3E#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C1#, 16#20#, 16#30#, 16#30#,
16#0C#, 16#24#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#C0#, 16#E0#, 16#A0#, 16#90#, 16#7C#, 16#0C#, 16#06#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C1#, 16#00#, 16#E0#,
16#98#, 16#0C#, 16#24#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#01#, 16#C1#, 16#21#, 16#E0#, 16#D8#, 16#4C#, 16#24#, 16#1C#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#20#,
16#20#, 16#20#, 16#30#, 16#10#, 16#18#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#01#, 16#C1#, 16#20#, 16#90#, 16#70#, 16#4C#, 16#26#,
16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C1#,
16#21#, 16#90#, 16#D8#, 16#3C#, 16#24#, 16#1C#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#,
16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#20#, 16#10#, 16#08#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#10#, 16#78#,
16#60#, 16#1C#, 16#02#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#3E#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#80#,
16#70#, 16#0C#, 16#3C#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#01#, 16#C1#, 16#30#, 16#18#, 16#18#, 16#18#, 16#00#, 16#04#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#F1#, 16#89#, 16#01#,
16#1C#, 16#92#, 16#52#, 16#2F#, 16#D8#, 16#07#, 16#C0#, 16#00#, 16#00#,
16#00#, 16#01#, 16#80#, 16#C0#, 16#E0#, 16#50#, 16#6C#, 16#3E#, 16#23#,
16#11#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C3#, 16#31#,
16#18#, 16#88#, 16#FC#, 16#62#, 16#33#, 16#1F#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#03#, 16#C3#, 16#31#, 16#01#, 16#80#, 16#C0#, 16#60#,
16#31#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C2#,
16#31#, 16#18#, 16#8C#, 16#C6#, 16#62#, 16#33#, 16#1F#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#07#, 16#C3#, 16#01#, 16#00#, 16#80#, 16#FC#,
16#60#, 16#30#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#,
16#C2#, 16#01#, 16#00#, 16#80#, 16#F8#, 16#60#, 16#30#, 16#10#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C3#, 16#11#, 16#01#, 16#80#,
16#CE#, 16#63#, 16#31#, 16#0F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#,
16#06#, 16#22#, 16#31#, 16#18#, 16#F8#, 16#C4#, 16#62#, 16#23#, 16#11#,
16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#02#, 16#01#, 16#00#,
16#80#, 16#C0#, 16#60#, 16#20#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#80#, 16#40#, 16#60#, 16#30#, 16#18#, 16#48#, 16#24#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#63#, 16#61#,
16#60#, 16#E0#, 16#F0#, 16#6C#, 16#32#, 16#11#, 16#80#, 16#00#, 16#00#,
16#00#, 16#00#, 16#06#, 16#03#, 16#01#, 16#00#, 16#80#, 16#C0#, 16#60#,
16#30#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#33#,
16#19#, 16#94#, 16#CE#, 16#FA#, 16#7D#, 16#2E#, 16#96#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#00#, 16#06#, 16#23#, 16#31#, 16#D8#, 16#E8#, 16#D4#,
16#6E#, 16#23#, 16#11#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#,
16#C3#, 16#31#, 16#09#, 16#84#, 16#C2#, 16#63#, 16#31#, 16#0F#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C2#, 16#21#, 16#10#, 16#88#,
16#F8#, 16#60#, 16#30#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#01#, 16#C3#, 16#31#, 16#09#, 16#84#, 16#C2#, 16#67#, 16#33#, 16#0F#,
16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#E2#, 16#31#, 16#10#,
16#F0#, 16#CC#, 16#66#, 16#33#, 16#11#, 16#80#, 16#00#, 16#00#, 16#00#,
16#00#, 16#03#, 16#C2#, 16#21#, 16#00#, 16#C0#, 16#7C#, 16#06#, 16#23#,
16#1F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#80#,
16#C0#, 16#60#, 16#20#, 16#10#, 16#08#, 16#0C#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#06#, 16#23#, 16#31#, 16#18#, 16#88#, 16#C4#, 16#62#,
16#33#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#62#,
16#21#, 16#30#, 16#D0#, 16#78#, 16#38#, 16#0C#, 16#04#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#04#, 16#C2#, 16#61#, 16#34#, 16#AA#, 16#55#,
16#3B#, 16#19#, 16#8C#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#,
16#63#, 16#60#, 16#A0#, 16#60#, 16#30#, 16#3C#, 16#36#, 16#11#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#63#, 16#61#, 16#A0#, 16#70#,
16#30#, 16#18#, 16#0C#, 16#04#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#07#, 16#C0#, 16#60#, 16#60#, 16#60#, 16#20#, 16#30#, 16#30#, 16#3F#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#02#, 16#01#, 16#00#,
16#80#, 16#C0#, 16#40#, 16#20#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#04#, 16#02#, 16#01#, 16#00#, 16#80#, 16#20#, 16#10#,
16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#01#,
16#00#, 16#80#, 16#40#, 16#20#, 16#30#, 16#10#, 16#08#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#C0#, 16#A0#, 16#48#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#01#, 16#E1#, 16#B0#, 16#18#, 16#78#, 16#24#, 16#1E#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#02#, 16#01#, 16#E1#, 16#90#,
16#C8#, 16#44#, 16#36#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#01#, 16#C1#, 16#90#, 16#80#, 16#40#, 16#24#, 16#1E#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#61#, 16#F1#,
16#90#, 16#88#, 16#44#, 16#26#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#01#, 16#C1#, 16#B0#, 16#F8#, 16#40#, 16#24#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#03#, 16#03#,
16#80#, 16#80#, 16#40#, 16#60#, 16#30#, 16#10#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#90#, 16#88#, 16#44#,
16#26#, 16#1F#, 16#19#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#02#,
16#01#, 16#60#, 16#D0#, 16#C8#, 16#64#, 16#26#, 16#13#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#04#, 16#00#, 16#01#, 16#00#, 16#80#, 16#C0#,
16#60#, 16#20#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#,
16#00#, 16#01#, 16#00#, 16#80#, 16#C0#, 16#60#, 16#20#, 16#10#, 16#08#,
16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#02#, 16#01#, 16#61#, 16#A0#,
16#E0#, 16#78#, 16#2C#, 16#12#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#06#, 16#02#, 16#01#, 16#00#, 16#80#, 16#C0#, 16#60#, 16#20#, 16#10#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#FD#,
16#B2#, 16#D9#, 16#4D#, 16#A4#, 16#D2#, 16#40#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#01#, 16#E1#, 16#90#, 16#C8#, 16#64#, 16#26#,
16#13#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#,
16#E1#, 16#90#, 16#88#, 16#44#, 16#26#, 16#1E#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#E1#, 16#90#, 16#C8#, 16#44#,
16#36#, 16#1E#, 16#18#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#01#, 16#E1#, 16#90#, 16#88#, 16#4C#, 16#26#, 16#1E#, 16#01#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#41#, 16#C0#, 16#C0#,
16#60#, 16#20#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#01#, 16#E1#, 16#90#, 16#C0#, 16#38#, 16#26#, 16#1E#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#81#, 16#C0#,
16#40#, 16#60#, 16#30#, 16#18#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#01#, 16#21#, 16#90#, 16#C8#, 16#6C#, 16#26#, 16#1F#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#21#,
16#B0#, 16#50#, 16#38#, 16#18#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#03#, 16#6D#, 16#B4#, 16#EE#, 16#76#, 16#3B#,
16#09#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#,
16#60#, 16#A0#, 16#60#, 16#30#, 16#3C#, 16#16#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#21#, 16#B0#, 16#50#, 16#38#,
16#18#, 16#0C#, 16#04#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#03#, 16#E0#, 16#60#, 16#20#, 16#20#, 16#30#, 16#3E#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#03#, 16#01#, 16#01#, 16#00#, 16#80#, 16#40#,
16#40#, 16#30#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#04#,
16#02#, 16#01#, 16#00#, 16#80#, 16#80#, 16#40#, 16#20#, 16#10#, 16#08#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#80#, 16#40#,
16#60#, 16#10#, 16#10#, 16#08#, 16#04#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#24#, 16#2C#, 16#00#,
16#00#, 16#00#);
Font_D : aliased constant Bitmap_Font :=
(
Bytes_Per_Glyph => 14,
Glyph_Width => 9,
Glyph_Height => 12,
Data => FreeSansBoldOblique5pt7bBitmaps'Access);
Font : constant Bitmap_Font_Ref := Font_D'Access;
end GESTE_Fonts.FreeSansBoldOblique5pt7b;
|
pragma License (Unrestricted);
-- implementation unit
package System.Growth is
pragma Preelaborate;
generic
type Count_Type is range <>;
function Fast_Grow (Capacity : Count_Type) return Count_Type;
generic
type Count_Type is range <>;
Component_Size : Positive;
function Good_Grow (Capacity : Count_Type) return Count_Type;
generic
type Count_Type is range <>;
Component_Size : Positive;
package Scoped_Holder is
function Capacity return Count_Type;
procedure Reserve_Capacity (Capacity : Count_Type);
function Storage_Address return Address;
end Scoped_Holder;
end System.Growth;
|
-- Copyright 2010-2020 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck; use Pck;
procedure Foo is
New_Node : Node_Id;
begin
New_Node := Pn (1234); -- STOP
end Foo;
|
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with soc.gpio; use soc.gpio;
with soc.exti; use soc.exti;
with soc.syscfg;
with soc.nvic;
with soc.interrupts;
with ewok.interrupts;
with ewok.exported.gpios; use type ewok.exported.gpios.t_gpio_config_access;
use type ewok.exported.gpios.t_interface_gpio_exti_lock;
with ewok.gpio;
with ewok.tasks_shared;
with ewok.devices_shared;
with ewok.isr;
with ewok.debug;
package body ewok.exti.handler
with spark_mode => off
is
procedure init
is
ok : boolean;
begin
ewok.interrupts.set_interrupt_handler
(soc.interrupts.INT_EXTI0,
exti_handler'access,
ewok.tasks_shared.ID_KERNEL,
ewok.devices_shared.ID_DEV_UNUSED,
ok);
if not ok then raise program_error; end if;
ewok.interrupts.set_interrupt_handler
(soc.interrupts.INT_EXTI1,
exti_handler'access,
ewok.tasks_shared.ID_KERNEL,
ewok.devices_shared.ID_DEV_UNUSED,
ok);
if not ok then raise program_error; end if;
ewok.interrupts.set_interrupt_handler
(soc.interrupts.INT_EXTI2,
exti_handler'access,
ewok.tasks_shared.ID_KERNEL,
ewok.devices_shared.ID_DEV_UNUSED,
ok);
if not ok then raise program_error; end if;
ewok.interrupts.set_interrupt_handler
(soc.interrupts.INT_EXTI3,
exti_handler'access,
ewok.tasks_shared.ID_KERNEL,
ewok.devices_shared.ID_DEV_UNUSED,
ok);
if not ok then raise program_error; end if;
ewok.interrupts.set_interrupt_handler
(soc.interrupts.INT_EXTI4,
exti_handler'access,
ewok.tasks_shared.ID_KERNEL,
ewok.devices_shared.ID_DEV_UNUSED,
ok);
if not ok then raise program_error; end if;
ewok.interrupts.set_interrupt_handler
(soc.interrupts.INT_EXTI9_5,
exti_handler'access,
ewok.tasks_shared.ID_KERNEL,
ewok.devices_shared.ID_DEV_UNUSED,
ok);
if not ok then raise program_error; end if;
ewok.interrupts.set_interrupt_handler
(soc.interrupts.INT_EXTI15_10,
exti_handler'access,
ewok.tasks_shared.ID_KERNEL,
ewok.devices_shared.ID_DEV_UNUSED,
ok);
if not ok then raise program_error; end if;
end init;
procedure handle_line
(line : in soc.exti.t_exti_line_index;
interrupt : in soc.interrupts.t_interrupt)
is
ref : ewok.exported.gpios.t_gpio_ref;
conf : ewok.exported.gpios.t_gpio_config_access;
task_id : ewok.tasks_shared.t_task_id;
begin
-- Clear the EXTI pending bit for this line
soc.exti.clear_pending (line);
-- Retrieve the configured GPIO point associated to this line
ref.pin := t_gpio_pin_index'val (t_exti_line_index'pos (line));
soc.syscfg.get_exti_port
(ref.pin, -- input
ref.port); -- output
-- Retrieving the GPIO configuration associated to that GPIO point.
-- Permit to get the "real" user ISR.
conf := ewok.gpio.get_config (ref);
if conf = NULL then
soc.nvic.clear_pending_irq (soc.nvic.to_irq_number (interrupt));
pragma DEBUG (debug.log (debug.ERROR, "unable to find GPIO informations for port" &
t_gpio_port_index'image (ref.port) & ", pin" &
t_gpio_pin_index'image (ref.pin)));
else
task_id := ewok.gpio.get_task_id (ref);
ewok.isr.postpone_isr
(interrupt,
ewok.interrupts.to_handler_access (conf.all.exti_handler),
task_id);
-- if the EXTI line is configured as lockable by the kernel, the
-- EXTI line is disabled here, and must be unabled later by the
-- userspace using gpio_unlock_exti(). This permit to support
-- external devices that generates regular EXTI events which are
-- not correctly filtered
if conf.all.exti_lock = ewok.exported.gpios.GPIO_EXTI_LOCKED then
ewok.exti.disable(ref);
end if;
end if;
end handle_line;
procedure exti_handler
(frame_a : in ewok.t_stack_frame_access)
is
pragma unreferenced (frame_a);
intr : soc.interrupts.t_interrupt;
begin
intr := soc.interrupts.get_interrupt;
case intr is
when soc.interrupts.INT_EXTI0 =>
handle_line (0, intr);
when soc.interrupts.INT_EXTI1 =>
handle_line (1, intr);
when soc.interrupts.INT_EXTI2 =>
handle_line (2, intr);
when soc.interrupts.INT_EXTI3 =>
handle_line (3, intr);
when soc.interrupts.INT_EXTI4 =>
handle_line (4, intr);
when soc.interrupts.INT_EXTI9_5 =>
for line in t_exti_line_index range 5 .. 9 loop
if soc.exti.is_line_pending (line) then
handle_line (line, intr);
end if;
end loop;
when soc.interrupts.INT_EXTI15_10 =>
for line in t_exti_line_index range 10 .. 15 loop
if soc.exti.is_line_pending (line) then
handle_line (line, intr);
end if;
end loop;
when others => raise program_error;
end case;
end exti_handler;
end ewok.exti.handler;
|
-- POK header
--
-- The following file is a part of the POK project. Any modification should
-- be made according to the POK licence. You CANNOT use this file or a part
-- of a file for your own project.
--
-- For more information on the POK licence, please see our LICENCE FILE
--
-- Please follow the coding guidelines described in doc/CODING_GUIDELINES
--
-- Copyright (c) 2007-2022 POK team
-- ---------------------------------------------------------------------------
-- --
-- SEMAPHORE constant and type definitions and management services --
-- --
-- ---------------------------------------------------------------------------
with APEX.Processes;
package APEX.Semaphores is
Max_Number_Of_Semaphores : constant := System_Limit_Number_Of_Semaphores;
Max_Semaphore_Value : constant := 32_767;
subtype Semaphore_Name_Type is Name_Type;
type Semaphore_Id_Type is private;
Null_Semaphore_Id : constant Semaphore_Id_Type;
type Semaphore_Value_Type is new APEX_Integer range
0 .. Max_Semaphore_Value;
type Semaphore_Status_Type is record
Current_Value : Semaphore_Value_Type;
Maximum_Value : Semaphore_Value_Type;
Waiting_Processes : APEX.Processes.Waiting_Range_Type;
end record;
procedure Create_Semaphore
(Semaphore_Name : in Semaphore_Name_Type;
Current_Value : in Semaphore_Value_Type;
Maximum_Value : in Semaphore_Value_Type;
Queuing_Discipline : in Queuing_Discipline_Type;
Semaphore_Id : out Semaphore_Id_Type;
Return_Code : out Return_Code_Type);
procedure Wait_Semaphore
(Semaphore_Id : in Semaphore_Id_Type;
Time_Out : in System_Time_Type;
Return_Code : out Return_Code_Type);
procedure Signal_Semaphore
(Semaphore_Id : in Semaphore_Id_Type;
Return_Code : out Return_Code_Type);
procedure Get_Semaphore_Id
(Semaphore_Name : in Semaphore_Name_Type;
Semaphore_Id : out Semaphore_Id_Type;
Return_Code : out Return_Code_Type);
procedure Get_Semaphore_Status
(Semaphore_Id : in Semaphore_Id_Type;
Semaphore_Status : out Semaphore_Status_Type;
Return_Code : out Return_Code_Type);
private
type Semaphore_Id_Type is new APEX_Integer;
Null_Semaphore_Id : constant Semaphore_Id_Type := 0;
pragma Convention (C, Semaphore_Status_Type);
-- POK BINDINGS
pragma Import (C, Create_Semaphore, "CREATE_SEMAPHORE");
pragma Import (C, Wait_Semaphore, "WAIT_SEMAPHORE");
pragma Import (C, Signal_Semaphore, "SIGNAL_SEMAPHORE");
pragma Import (C, Get_Semaphore_Id, "GET_SEMAPHORE_ID");
pragma Import (C, Get_Semaphore_Status, "GET_SEMAPHORE_STATUS");
-- END OF POK BINDINGS
end APEX.Semaphores;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . W I N 3 2 --
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package plus its child provide the low level interface to the Win32
-- API. The core part of the Win32 API (common to RTX and Win32) is in this
-- package, and an additional part of the Win32 API which is not supported by
-- RTX is in package System.Win32.Ext.
with Interfaces.C;
package System.Win32 is
pragma Pure;
-------------------
-- General Types --
-------------------
-- The LARGE_INTEGER type is actually a fixed point type
-- that only can represent integers. The reason for this is
-- easier conversion to Duration or other fixed point types.
-- (See System.OS_Primitives.Clock, mingw and rtx versions.)
type LARGE_INTEGER is delta 1.0 range -2.0**63 .. 2.0**63 - 1.0;
subtype PVOID is Address;
type HANDLE is new Interfaces.C.ptrdiff_t;
INVALID_HANDLE_VALUE : constant HANDLE := -1;
INVALID_FILE_SIZE : constant := 16#FFFFFFFF#;
type DWORD is new Interfaces.C.unsigned_long;
type WORD is new Interfaces.C.unsigned_short;
type BYTE is new Interfaces.C.unsigned_char;
type LONG is new Interfaces.C.long;
type CHAR is new Interfaces.C.char;
type BOOL is new Interfaces.C.int;
for BOOL'Size use Interfaces.C.int'Size;
type Bits1 is range 0 .. 2 ** 1 - 1;
type Bits2 is range 0 .. 2 ** 2 - 1;
type Bits17 is range 0 .. 2 ** 17 - 1;
for Bits1'Size use 1;
for Bits2'Size use 2;
for Bits17'Size use 17;
-- Note that the following clashes with standard names are to stay
-- compatible with the historical choice of following the C names.
pragma Warnings (Off);
FALSE : constant := 0;
TRUE : constant := 1;
pragma Warnings (On);
function GetLastError return DWORD;
pragma Import (Stdcall, GetLastError, "GetLastError");
-----------
-- Files --
-----------
CP_UTF8 : constant := 65001;
CP_ACP : constant := 0;
GENERIC_READ : constant := 16#80000000#;
GENERIC_WRITE : constant := 16#40000000#;
CREATE_NEW : constant := 1;
CREATE_ALWAYS : constant := 2;
OPEN_EXISTING : constant := 3;
OPEN_ALWAYS : constant := 4;
TRUNCATE_EXISTING : constant := 5;
FILE_SHARE_DELETE : constant := 16#00000004#;
FILE_SHARE_READ : constant := 16#00000001#;
FILE_SHARE_WRITE : constant := 16#00000002#;
FILE_BEGIN : constant := 0;
FILE_CURRENT : constant := 1;
FILE_END : constant := 2;
PAGE_NOACCESS : constant := 16#0001#;
PAGE_READONLY : constant := 16#0002#;
PAGE_READWRITE : constant := 16#0004#;
PAGE_WRITECOPY : constant := 16#0008#;
PAGE_EXECUTE : constant := 16#0010#;
FILE_MAP_ALL_ACCESS : constant := 16#F001f#;
FILE_MAP_READ : constant := 4;
FILE_MAP_WRITE : constant := 2;
FILE_MAP_COPY : constant := 1;
FILE_ADD_FILE : constant := 16#0002#;
FILE_ADD_SUBDIRECTORY : constant := 16#0004#;
FILE_APPEND_DATA : constant := 16#0004#;
FILE_CREATE_PIPE_INSTANCE : constant := 16#0004#;
FILE_DELETE_CHILD : constant := 16#0040#;
FILE_EXECUTE : constant := 16#0020#;
FILE_LIST_DIRECTORY : constant := 16#0001#;
FILE_READ_ATTRIBUTES : constant := 16#0080#;
FILE_READ_DATA : constant := 16#0001#;
FILE_READ_EA : constant := 16#0008#;
FILE_TRAVERSE : constant := 16#0020#;
FILE_WRITE_ATTRIBUTES : constant := 16#0100#;
FILE_WRITE_DATA : constant := 16#0002#;
FILE_WRITE_EA : constant := 16#0010#;
STANDARD_RIGHTS_READ : constant := 16#20000#;
STANDARD_RIGHTS_WRITE : constant := 16#20000#;
SYNCHRONIZE : constant := 16#100000#;
FILE_ATTRIBUTE_READONLY : constant := 16#00000001#;
FILE_ATTRIBUTE_HIDDEN : constant := 16#00000002#;
FILE_ATTRIBUTE_SYSTEM : constant := 16#00000004#;
FILE_ATTRIBUTE_DIRECTORY : constant := 16#00000010#;
FILE_ATTRIBUTE_ARCHIVE : constant := 16#00000020#;
FILE_ATTRIBUTE_DEVICE : constant := 16#00000040#;
FILE_ATTRIBUTE_NORMAL : constant := 16#00000080#;
FILE_ATTRIBUTE_TEMPORARY : constant := 16#00000100#;
FILE_ATTRIBUTE_SPARSE_FILE : constant := 16#00000200#;
FILE_ATTRIBUTE_REPARSE_POINT : constant := 16#00000400#;
FILE_ATTRIBUTE_COMPRESSED : constant := 16#00000800#;
FILE_ATTRIBUTE_OFFLINE : constant := 16#00001000#;
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED : constant := 16#00002000#;
FILE_ATTRIBUTE_ENCRYPTED : constant := 16#00004000#;
FILE_ATTRIBUTE_VALID_FLAGS : constant := 16#00007fb7#;
FILE_ATTRIBUTE_VALID_SET_FLAGS : constant := 16#000031a7#;
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS : constant := 16#00000004#;
type OVERLAPPED is record
Internal : DWORD;
InternalHigh : DWORD;
Offset : DWORD;
OffsetHigh : DWORD;
hEvent : HANDLE;
end record;
type SECURITY_ATTRIBUTES is record
nLength : DWORD;
pSecurityDescriptor : PVOID;
bInheritHandle : BOOL;
end record;
function CreateFileA
(lpFileName : Address;
dwDesiredAccess : DWORD;
dwShareMode : DWORD;
lpSecurityAttributes : access SECURITY_ATTRIBUTES;
dwCreationDisposition : DWORD;
dwFlagsAndAttributes : DWORD;
hTemplateFile : HANDLE) return HANDLE;
pragma Import (Stdcall, CreateFileA, "CreateFileA");
function CreateFile
(lpFileName : Address;
dwDesiredAccess : DWORD;
dwShareMode : DWORD;
lpSecurityAttributes : access SECURITY_ATTRIBUTES;
dwCreationDisposition : DWORD;
dwFlagsAndAttributes : DWORD;
hTemplateFile : HANDLE) return HANDLE;
pragma Import (Stdcall, CreateFile, "CreateFileW");
function GetFileSize
(hFile : HANDLE;
lpFileSizeHigh : access DWORD) return BOOL;
pragma Import (Stdcall, GetFileSize, "GetFileSize");
function SetFilePointer
(hFile : HANDLE;
lDistanceToMove : LONG;
lpDistanceToMoveHigh : access LONG;
dwMoveMethod : DWORD) return DWORD;
pragma Import (Stdcall, SetFilePointer, "SetFilePointer");
function WriteFile
(hFile : HANDLE;
lpBuffer : Address;
nNumberOfBytesToWrite : DWORD;
lpNumberOfBytesWritten : access DWORD;
lpOverlapped : access OVERLAPPED) return BOOL;
pragma Import (Stdcall, WriteFile, "WriteFile");
function ReadFile
(hFile : HANDLE;
lpBuffer : Address;
nNumberOfBytesToRead : DWORD;
lpNumberOfBytesRead : access DWORD;
lpOverlapped : access OVERLAPPED) return BOOL;
pragma Import (Stdcall, ReadFile, "ReadFile");
function CloseHandle (hObject : HANDLE) return BOOL;
pragma Import (Stdcall, CloseHandle, "CloseHandle");
function CreateFileMapping
(hFile : HANDLE;
lpSecurityAttributes : access SECURITY_ATTRIBUTES;
flProtect : DWORD;
dwMaximumSizeHigh : DWORD;
dwMaximumSizeLow : DWORD;
lpName : Address) return HANDLE;
pragma Import (Stdcall, CreateFileMapping, "CreateFileMappingA");
function MapViewOfFile
(hFileMappingObject : HANDLE;
dwDesiredAccess : DWORD;
dwFileOffsetHigh : DWORD;
dwFileOffsetLow : DWORD;
dwNumberOfBytesToMap : DWORD) return System.Address;
pragma Import (Stdcall, MapViewOfFile, "MapViewOfFile");
function UnmapViewOfFile (lpBaseAddress : System.Address) return BOOL;
pragma Import (Stdcall, UnmapViewOfFile, "UnmapViewOfFile");
function MultiByteToWideChar
(CodePage : WORD;
dwFlags : DWORD;
lpMultiByteStr : System.Address;
cchMultiByte : WORD;
lpWideCharStr : System.Address;
cchWideChar : WORD) return WORD;
pragma Import (Stdcall, MultiByteToWideChar, "MultiByteToWideChar");
------------------------
-- System Information --
------------------------
subtype ProcessorId is DWORD;
type SYSTEM_INFO is record
dwOemId : DWORD;
dwPageSize : DWORD;
lpMinimumApplicationAddress : PVOID;
lpMaximumApplicationAddress : PVOID;
dwActiveProcessorMask : DWORD;
dwNumberOfProcessors : DWORD;
dwProcessorType : DWORD;
dwAllocationGranularity : DWORD;
dwReserved : DWORD;
end record;
procedure GetSystemInfo (SI : access SYSTEM_INFO);
pragma Import (Stdcall, GetSystemInfo, "GetSystemInfo");
---------------------
-- Time Management --
---------------------
type SYSTEMTIME is record
wYear : WORD;
wMonth : WORD;
wDayOfWeek : WORD;
wDay : WORD;
wHour : WORD;
wMinute : WORD;
wSecond : WORD;
wMilliseconds : WORD;
end record;
procedure GetSystemTime (pSystemTime : access SYSTEMTIME);
pragma Import (Stdcall, GetSystemTime, "GetSystemTime");
procedure GetSystemTimeAsFileTime (lpFileTime : access Long_Long_Integer);
pragma Import (Stdcall, GetSystemTimeAsFileTime, "GetSystemTimeAsFileTime");
function FileTimeToSystemTime
(lpFileTime : access Long_Long_Integer;
lpSystemTime : access SYSTEMTIME) return BOOL;
pragma Import (Stdcall, FileTimeToSystemTime, "FileTimeToSystemTime");
function SystemTimeToFileTime
(lpSystemTime : access SYSTEMTIME;
lpFileTime : access Long_Long_Integer) return BOOL;
pragma Import (Stdcall, SystemTimeToFileTime, "SystemTimeToFileTime");
function FileTimeToLocalFileTime
(lpFileTime : access Long_Long_Integer;
lpLocalFileTime : access Long_Long_Integer) return BOOL;
pragma Import (Stdcall, FileTimeToLocalFileTime, "FileTimeToLocalFileTime");
function LocalFileTimeToFileTime
(lpFileTime : access Long_Long_Integer;
lpLocalFileTime : access Long_Long_Integer) return BOOL;
pragma Import (Stdcall, LocalFileTimeToFileTime, "LocalFileTimeToFileTime");
procedure Sleep (dwMilliseconds : DWORD);
pragma Import (Stdcall, Sleep, External_Name => "Sleep");
function QueryPerformanceCounter
(lpPerformanceCount : access LARGE_INTEGER) return BOOL;
pragma Import
(Stdcall, QueryPerformanceCounter, "QueryPerformanceCounter");
------------
-- Module --
------------
function GetModuleHandleEx
(dwFlags : DWORD;
lpModuleName : Address;
phModule : access HANDLE) return BOOL;
pragma Import (Stdcall, GetModuleHandleEx, "GetModuleHandleExA");
function GetModuleFileName
(hModule : HANDLE;
lpFilename : Address;
nSize : DWORD) return DWORD;
pragma Import (Stdcall, GetModuleFileName, "GetModuleFileNameA");
function FreeLibrary (hModule : HANDLE) return BOOL;
pragma Import (Stdcall, FreeLibrary, "FreeLibrary");
end System.Win32;
|
with
ada.Numerics.generic_elementary_Functions,
ada.Numerics.generic_complex_Types,
ada.Numerics.generic_real_Arrays,
ada.Containers;
generic
type Real_t is digits <>;
package any_Math
--
-- Provides math for any given floating point type.
--
is
pragma Pure;
----------
-- Indices
--
subtype Index is standard.Integer;
type Indices is array (Index range <>) of Index;
-----------
-- Counters
--
subtype Counter is ada.Containers.Count_Type;
procedure increment (Self : in out Counter; By : in Counter := 1);
procedure decrement (Self : in out Counter; By : in Counter := 1);
-----------
-- Integers
--
procedure increment (Self : in out Integer; By : in Integer := 1);
procedure decrement (Self : in out Integer; By : in Integer := 1);
procedure swap (Left, Right : in out Integer);
type Integers is array (Index range <>) of aliased Integer;
type Naturals is array (Index range <>) of aliased Natural;
type Positives is array (Index range <>) of aliased Positive;
--------
-- Reals
--
subtype Real is Real_t;
subtype Percentage is Real range 0.0 .. 100.0;
subtype unit_Interval is Real range 0.0 .. 1.0;
function almost_Zero (Self : in Real) return Boolean;
function Clamped (Self : in Real; Low, High : in Real) return Real;
procedure clamp (Self : in out Real; Low, High : in Real);
function Image (Self : in Real; Precision : in Natural := 5) return String;
------------
-- Functions
--
package Functions is new ada.Numerics.generic_elementary_Functions (Real);
------------------
-- Complex Numbers
--
package complex_Reals is new ada.Numerics.generic_complex_Types (Real);
---------
-- Angles
--
subtype Radians is Real;
type Degrees is new Real;
function to_Radians (Self : in Degrees) return Radians;
function to_Degrees (Self : in Radians) return Degrees;
----------
-- Vectors
--
package Vectors is new ada.Numerics.generic_real_Arrays (Real'Base);
subtype Vector is Vectors.real_Vector;
function Sum (Self : in Vector) return Real;
function Average (Self : in Vector) return Real;
function Max (Self : in Vector) return Real;
function Min (Self : in Vector) return Real;
function Image (Self : in Vector; Precision : in Natural := 5) return String;
type Vector_1 is new Vector (1 .. 1);
type Vector_2 is new Vector (1 .. 2);
type Vector_3 is new Vector (1 .. 3);
type Vector_4 is new Vector (1 .. 4);
type Vector_8 is new Vector (1 .. 8);
type Vector_12 is new Vector (1 .. 12);
type Vector_16 is new Vector (1 .. 16);
-----------
-- Vector_2
--
function to_Vector_2 (Self : in Vector_3) return Vector_2;
function Image (Self : in Vector_2; Precision : in Natural := 5) return String;
overriding
function "+" (Left, Right : in Vector_2) return Vector_2;
overriding
function "-" (Left, Right : in Vector_2) return Vector_2;
overriding
function "*" (Left : in Real; Right : in Vector_2) return Vector_2;
overriding
function "*" (Left : in Vector_2; Right : in Real) return Vector_2;
overriding
function "/" (Left : in Vector_2; Right : in Real) return Vector_2;
-----------
-- Vector_3
--
function to_Vector_3 (Self : in Vector_2; Z : in Real := 0.0) return Vector_3;
function Image (Self : in Vector_3; Precision : in Natural := 5) return String;
overriding
function "*" (Left : in Real; Right : in Vector_3) return Vector_3;
overriding
function "*" (Left : in Vector_3; Right : in Real) return Vector_3;
function "*" (Left, Right : in Vector_3) return Vector_3; -- Cross product.
overriding
function "+" (Left, Right : in Vector_3) return Vector_3;
overriding
function "-" (Left, Right : in Vector_3) return Vector_3;
overriding
function "-" (Right : in Vector_3) return Vector_3;
overriding
function "/" (Left : in Vector_3; Right : in Real) return Vector_3;
overriding
function "abs" (Right : in Vector_3) return Vector_3;
-----------
-- Matrices
--
-- Memory layout is row-major.
subtype Matrix is Vectors.real_Matrix;
type Matrix_2x2 is new Matrix (1 .. 2, 1 .. 2);
type Matrix_3x3 is new Matrix (1 .. 3, 1 .. 3);
type Matrix_4x4 is new Matrix (1 .. 4, 1 .. 4);
Identity_2x2 : aliased constant Matrix_2x2;
Identity_3x3 : constant Matrix_3x3;
Identity_4x4 : constant Matrix_4x4;
function Image (Self : in Matrix) return String;
-------------
-- Matrix_2x2
--
overriding
function Transpose (Self : in Matrix_2x2) return Matrix_2x2;
function "*" (Left : in Vector_2; Right : in Matrix_2x2) return Vector_2;
function "*" (Left : in Matrix_2x2; Right : in Vector_2) return Vector_2;
function Row (Self : in Matrix_2x2; row_Id : in Index) return Vector_2;
function Col (Self : in Matrix_2x2; col_Id : in Index) return Vector_2;
-------------
-- Matrix_3x3
--
overriding
function Transpose (Self : in Matrix_3x3) return Matrix_3x3;
function "*" (Left : in Vector_3; Right : in Matrix_3x3) return Vector_3;
function "*" (Left : in Matrix_3x3; Right : in Vector_3) return Vector_3;
function Row (Self : in Matrix_3x3; row_Id : in Index) return Vector_3;
function Col (Self : in Matrix_3x3; col_Id : in Index) return Vector_3;
-------------
-- Matrix_4x4
--
overriding
function Transpose (Self : in Matrix_4x4) return Matrix_4x4;
function "*" (Left : in Vector_4; Right : in Matrix_4x4) return Vector_4;
function "*" (Left : in Matrix_4x4; Right : in Vector_4) return Vector_4;
function "*" (Left : in Matrix_4x4; Right : in Vector_3) return Vector_3;
function "*" (Left : in Vector_3; Right : in Matrix_4x4) return Vector_4;
function "*" (Left : in Matrix_4x4; Right : in Vector_3) return Vector_4;
overriding
function "*" (Left : in Matrix_4x4; Right : in Matrix_4x4) return Matrix_4x4;
function Row (Self : in Matrix_4x4; row_Id : in Index) return Vector_4;
function Col (Self : in Matrix_4x4; col_Id : in Index) return Vector_4;
function to_Vector_16 (Self : in Matrix_4x4) return Vector_16;
function to_Matrix_4x4 (Self : in Vector_16) return Matrix_4x4;
--------------
-- Quaternions
--
type Quaternion is
record
R : Real; -- Scalar part.
V : Vector_3; -- Vector part.
end record;
function to_Quaternion (From : in Vector_4) return Quaternion;
function to_Vector (From : in Quaternion) return Vector_4;
function "*" (Left : in Quaternion; Right : in Real) return Quaternion;
function "*" (Left : in Real; Right : in Quaternion) return Quaternion;
function "/" (Left : in Quaternion; Right : in Real) return Quaternion;
function "+" (Left, Right : in Quaternion) return Quaternion;
function "-" (Left, Right : in Quaternion) return Quaternion;
function Image (Self : in Quaternion; Precision : in Natural := 5) return String;
-------------
-- Transforms
--
type Transform_2d is
record
Rotation : aliased Matrix_2x2;
Translation : aliased Vector_2;
end record;
type Transform_3d is
record
Rotation : aliased Matrix_3x3;
Translation : aliased Vector_3;
end record;
null_Transform_2d : constant Transform_2d; -- No translation and no rotation.
null_Transform_3d : constant Transform_3d; --
------------
-- Constants
--
Infinity : constant Real;
Pi : constant := ada.numerics.Pi;
Phi : constant := 1.6180339887_4989484820_4586834365_6381177203_0917980576_2862135448_6227052604_6281890244_9707207204_1893911374;
--
-- The 'Golden' ratio.
Origin_2D : constant Vector_2;
Origin_3D : constant Vector_3;
private
Infinity : constant Real := Real'Last;
Origin_2D : constant Vector_2 := (0.0, 0.0);
Origin_3D : constant Vector_3 := (0.0, 0.0, 0.0);
Identity_2x2 : aliased constant Matrix_2x2 := ((1.0, 0.0),
(0.0, 1.0));
Identity_3x3 : constant Matrix_3x3 := ((1.0, 0.0, 0.0),
(0.0, 1.0, 0.0),
(0.0, 0.0, 1.0));
Identity_4x4 : constant Matrix_4x4 := ((1.0, 0.0, 0.0, 0.0),
(0.0, 1.0, 0.0, 0.0),
(0.0, 0.0, 1.0, 0.0),
(0.0, 0.0, 0.0, 1.0));
null_Transform_2d : constant Transform_2d := (translation => (0.0, 0.0),
rotation => ((1.0, 0.0),
(0.0, 1.0)));
null_Transform_3d : constant Transform_3d := (translation => (0.0, 0.0, 0.0),
rotation => ((1.0, 0.0, 0.0),
(0.0, 1.0, 0.0),
(0.0, 0.0, 1.0)));
pragma Inline_Always (increment);
pragma Inline_Always (decrement);
pragma Inline_Always (Clamped);
end any_Math;
|
-- This file is generated by SWIG. Please do not modify by hand.
--
with xcb.xcb_glx_generic_error_t;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_glx_bad_drawable_error_t is
-- Item
--
subtype Item is xcb.xcb_glx_generic_error_t.Item;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_glx_bad_drawable_error_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_bad_drawable_error_t.Item,
Element_Array => xcb.xcb_glx_bad_drawable_error_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_glx_bad_drawable_error_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_bad_drawable_error_t.Pointer,
Element_Array => xcb.xcb_glx_bad_drawable_error_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_glx_bad_drawable_error_t;
|
-- WORDS, a Latin dictionary, by Colonel William Whitaker (USAF, Retired)
--
-- Copyright William A. Whitaker (1936–2010)
--
-- This is a free program, which means it is proper to copy it and pass
-- it on to your friends. Consider it a developmental item for which
-- there is no charge. However, just for form, it is Copyrighted
-- (c). Permission is hereby freely given for any and all use of program
-- and data. You can sell it as your own, but at least tell me.
--
-- This version is distributed without obligation, but the developer
-- would appreciate comments and suggestions.
--
-- All Parts of the WORDS system, source code and data files, are made freely
-- available to anyone who wishes to use them, for whatever purpose.
with Latin_Utils.Strings_Package; use Latin_Utils.Strings_Package;
with Latin_Utils.Inflections_Package; use Latin_Utils.Inflections_Package;
with Latin_Utils.Dictionary_Package; use Latin_Utils.Dictionary_Package;
function Support_Utils.Dictionary_Form (De : Dictionary_Entry) return String is
Null_Ox : constant String (1 .. 24) := (others => ' ');
Ox : array (1 .. 4) of String (1 .. 24) := (others => Null_Ox);
Form : String (1 .. 100) := (others => ' ');
Fst : constant array (Which_Type range 1 .. 5) of String (1 .. 3) :=
("1st", "2nd", "3rd", "4th", "5th");
Not_Found : exception;
function Add (Stem, Infl : String) return String is
begin
return Head (Trim (Stem) & Trim (Infl), 24);
end Add;
procedure Add_Up (Factor : String) is
begin
Form := Head (Trim (Form) & Trim (Factor), 100);
end Add_Up;
procedure Add_To (Factor : String) is
begin
Form := Head (Trim (Form) & Factor, 100);
end Add_To;
begin
--DICTIONARY_ENTRY_IO.PUT (DE);
-- So I can call with a NULL_DICTIONARY_ENTRY and not bomb
if De = Null_Dictionary_Entry then
return "";
end if;
if De.Part.Pofs = Prep then
return Trim (De.Stems (1)) & " " &
Part_Of_Speech_Type'Image (De.Part.Pofs) &
" " & Case_Type'Image (De.Part.Prep.Obj);
end if;
if De.Stems (2 .. 4) = (Null_Stem_Type, Null_Stem_Type, Null_Stem_Type) and
not (((De.Part.Pofs = N) and then (De.Part.N.Decl.Which = 9)) or
((De.Part.Pofs = Adj) and then
((De.Part.Adj.Decl.Which = 9) or
(De.Part.Adj.Co = Comp or De.Part.Adj.Co = Super))) or
((De.Part.Pofs = V) and then (De.Part.V.Con = (9, 8))) or
((De.Part.Pofs = V) and then (De.Part.V.Con = (9, 9))))
then
return Trim (De.Stems (1)) & " " &
Part_Of_Speech_Type'Image (De.Part.Pofs);
-- For UNIQUES, CONJ, INTERJ, . ..
end if;
if De.Part.Pofs = N then
case De.Part.N.Decl.Which is
-- First declension noun
when 1 =>
case De.Part.N.Decl.Var is
when 1 =>
Ox (1) := Add (De.Stems (1), "a");
Ox (2) := Add (De.Stems (2), "ae");
-- Greek nouns
when 6 =>
Ox (1) := Add (De.Stems (1), "e");
Ox (2) := Add (De.Stems (2), "es");
when 7 =>
Ox (1) := Add (De.Stems (1), "es");
Ox (2) := Add (De.Stems (2), "ae");
when 8 =>
Ox (1) := Add (De.Stems (1), "as");
Ox (2) := Add (De.Stems (2), "ae");
when others => null;
end case;
-- Second declension noun
when 2 =>
case De.Part.N.Decl.Var is
when 1 =>
Ox (1) := Add (De.Stems (1), "us");
Ox (2) := Add (De.Stems (2), "i");
when 2 =>
Ox (1) := Add (De.Stems (1), "um");
Ox (2) := Add (De.Stems (2), "i");
when 3 =>
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (De.Stems (2), "i");
when 4 =>
if De.Part.N.Gender = N then
Ox (1) := Add (De.Stems (1), "um");
else
Ox (1) := Add (De.Stems (1), "us");
end if;
Ox (2) := Add (De.Stems (2), "(i)");
when 5 =>
Ox (1) := Add (De.Stems (1), "us");
Ox (2) := Add (De.Stems (2), "");
when 6 =>
Ox (1) := Add (De.Stems (1), "os");
Ox (2) := Add (De.Stems (2), "i");
when 7 =>
Ox (1) := Add (De.Stems (1), "os");
Ox (2) := Add (De.Stems (2), "i");
when 8 =>
Ox (1) := Add (De.Stems (1), "on");
Ox (2) := Add (De.Stems (2), "i");
when 9 =>
Ox (1) := Add (De.Stems (1), "us");
Ox (2) := Add (De.Stems (2), "i");
when others => null;
end case;
-- Third declension noun
when 3 =>
Ox (1) := Add (De.Stems (1), "");
if (De.Part.N.Decl.Var = 7) or
(De.Part.N.Decl.Var = 9)
then
Ox (2) := Add (De.Stems (2), "os/is");
else
Ox (2) := Add (De.Stems (2), "is");
end if;
-- Fourth declension noun
when 4 =>
case De.Part.N.Decl.Var is
when 1 =>
Ox (1) := Add (De.Stems (1), "us");
Ox (2) := Add (De.Stems (2), "us");
when 2 =>
Ox (1) := Add (De.Stems (1), "u");
Ox (2) := Add (De.Stems (2), "us");
when 3 =>
Ox (1) := Add (De.Stems (1), "us");
Ox (2) := Add (De.Stems (2), "u");
when others => null;
end case;
-- Fifth decelnsion noun
when 5 =>
Ox (1) := Add (De.Stems (1), "es");
Ox (2) := Add (De.Stems (2), "ei");
when 9 =>
case De.Part.N.Decl.Var is
when 8 =>
Ox (1) := Add (De.Stems (1), ".");
Ox (2) := Add (Null_Ox, "abb.");
when 9 =>
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (Null_Ox, "undeclined");
when others => null;
end case;
when others =>
raise Not_Found;
end case;
elsif De.Part.Pofs = Pron then
case De.Part.Pron.Decl.Which is
-- Proximal demonstrative pronoun (hic, haec, hoc)
when 3 =>
Ox (1) := Add (De.Stems (1), "ic");
Ox (2) := Add (De.Stems (1), "aec");
if De.Part.Pron.Decl.Var = 1 then
Ox (3) := Add (De.Stems (1), "oc");
elsif De.Part.Pron.Decl.Var = 2 then
Ox (3) := Add (De.Stems (1), "uc");
end if;
when 4 =>
if De.Part.Pron.Decl.Var = 1 then
Ox (1) := Add (De.Stems (1), "s");
Ox (2) := Add (De.Stems (2), "a");
Ox (3) := Add (De.Stems (1), "d");
elsif De.Part.Pron.Decl.Var = 2 then
Ox (1) := Add (De.Stems (1), "dem");
Ox (2) := Add (De.Stems (2), "adem");
Ox (3) := Add (De.Stems (1), "dem");
end if;
-- Distal (ille, illa, illud) and medial (iste, ista, istud)
-- demonstrative pronoun
when 6 =>
Ox (1) := Add (De.Stems (1), "e");
Ox (2) := Add (De.Stems (1), "a");
if De.Part.Pron.Decl.Var = 1 then
Ox (3) := Add (De.Stems (1), "ud");
elsif De.Part.Pron.Decl.Var = 2 then
Ox (3) := Add (De.Stems (1), "um");
end if;
when 9 =>
if De.Part.Pron.Decl.Var = 8 then
Ox (1) := Add (De.Stems (1), ".");
Ox (2) := Add (Null_Ox, "abb.");
elsif De.Part.Pron.Decl.Var = 9 then
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (Null_Ox, "undeclined");
end if;
when others =>
raise Not_Found;
end case;
elsif De.Part.Pofs = Adj then
--TEXT_IO.NEW_LINE;
--DICTIONARY_ENTRY_IO.PUT (DE);
--TEXT_IO.NEW_LINE;
case De.Part.Adj.Co is
when Comp =>
Ox (1) := Add (De.Stems (1), "or");
Ox (2) := Add (De.Stems (1), "or");
Ox (3) := Add (De.Stems (1), "us");
when Super =>
Ox (1) := Add (De.Stems (1), "mus");
Ox (2) := Add (De.Stems (1), "ma");
Ox (3) := Add (De.Stems (1), "mum");
when Pos =>
-- First declension adjective
if De.Part.Adj.Decl.Which = 1 then
case De.Part.Adj.Decl.Var is
when 1 =>
Ox (1) := Add (De.Stems (1), "us");
Ox (2) := Add (De.Stems (2), "a");
Ox (3) := Add (De.Stems (2), "um");
when 2 =>
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (De.Stems (2), "a");
Ox (3) := Add (De.Stems (2), "um");
when 3 =>
Ox (1) := Add (De.Stems (1), "us");
Ox (2) := Add (De.Stems (2), "a");
Ox (3) := Add (De.Stems (2), "um (gen -ius)");
when 4 =>
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (De.Stems (2), "a");
Ox (3) := Add (De.Stems (2), "um");
when 5 =>
Ox (1) := Add (De.Stems (1), "us");
Ox (2) := Add (De.Stems (2), "a");
Ox (3) := Add (De.Stems (2), "ud");
when others =>
raise Not_Found;
end case;
-- Second declension adjective
elsif De.Part.Adj.Decl.Which = 2 then
case De.Part.Adj.Decl.Var is
when 1 =>
Ox (1) := Add (Null_Ox, "-");
Ox (2) := Add (De.Stems (1), "e");
Ox (3) := Add (Null_Ox, "-");
when 2 =>
Ox (1) := Add (Null_Ox, "-");
Ox (2) := Add (Null_Ox, "a");
Ox (3) := Add (Null_Ox, "-");
when 3 =>
Ox (1) := Add (De.Stems (1), "es");
Ox (2) := Add (De.Stems (1), "es");
Ox (3) := Add (De.Stems (1), "es");
when 6 =>
Ox (1) := Add (De.Stems (1), "os");
Ox (2) := Add (De.Stems (1), "os");
Ox (3) := Add (Null_Ox, "-");
when 7 =>
Ox (1) := Add (De.Stems (1), "os");
Ox (2) := Add (Null_Ox, "-");
Ox (3) := Add (Null_Ox, "-");
when 8 =>
Ox (1) := Add (Null_Ox, "-");
Ox (2) := Add (Null_Ox, "-");
Ox (3) := Add (De.Stems (2), "on");
when others => null;
end case;
-- Third declension adjective
elsif De.Part.Adj.Decl.Which = 3 then
case De.Part.Adj.Decl.Var is
when 1 =>
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (Null_Ox, "(gen.)");
Ox (3) := Add (De.Stems (2), "is");
when 2 =>
Ox (1) := Add (De.Stems (1), "is");
Ox (2) := Add (De.Stems (2), "is");
Ox (3) := Add (De.Stems (2), "e");
when 3 =>
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (De.Stems (2), "is");
Ox (3) := Add (De.Stems (2), "e");
when 6 =>
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (Null_Ox, "(gen.)");
Ox (3) := Add (De.Stems (2), "os");
when others => null;
end case;
elsif De.Part.Adj.Decl = (9, 8) then
Ox (1) := Add (De.Stems (1), ".");
Ox (2) := Add (Null_Ox, "abb.");
elsif De.Part.Adj.Decl = (9, 9) then
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (Null_Ox, "undeclined");
else
raise Not_Found;
end if;
when X =>
case De.Part.Adj.Decl.Which is
when 1 =>
if De.Part.Adj.Decl.Var = 1 then
Ox (1) := Add (De.Stems (1), "us");
Ox (2) := Add (De.Stems (2), "a -um");
Ox (3) := Add (De.Stems (3), "or -or -us");
Ox (4) := Add (De.Stems (4), "mus -a -um");
elsif De.Part.Adj.Decl.Var = 2 then
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (De.Stems (2), "a -um");
Ox (3) := Add (De.Stems (3), "or -or -us");
Ox (4) := Add (De.Stems (4), "mus -a -um");
end if;
when 3 =>
case De.Part.Adj.Decl.Var is
when 1 =>
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (De.Stems (2), "is (gen.)");
Ox (3) := Add (De.Stems (3), "or -or -us");
Ox (4) := Add (De.Stems (4), "mus -a -um");
when 2 =>
Ox (1) := Add (De.Stems (1), "is");
Ox (2) := Add (De.Stems (2), "e");
Ox (3) := Add (De.Stems (3), "or -or -us");
Ox (4) := Add (De.Stems (4), "mus -a -um");
when 3 =>
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (De.Stems (2), "is -e");
Ox (3) := Add (De.Stems (3), "or -or -us");
Ox (4) := Add (De.Stems (4), "mus -a -um");
when others => null;
end case;
when 9 =>
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (Null_Ox, "undeclined");
Ox (3) := Add (De.Stems (3), "or -or -us");
Ox (4) := Add (De.Stems (4), "mus -a -um");
when others =>
raise Not_Found;
end case;
end case;
elsif (De.Part.Pofs = Adv) and then (De.Part.Adv.Co = X) then
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (De.Stems (2), "");
Ox (3) := Add (De.Stems (3), "");
elsif De.Part.Pofs = V then
if De.Part.V.Kind = Dep then -- all DEP
Ox (3) := Add (Null_Ox, "DEP"); -- Flag for later use
Ox (4) := Add (De.Stems (4), "us sum");
case De.Part.V.Con.Which is
when 1 =>
Ox (1) := Add (De.Stems (1), "or");
Ox (2) := Add (De.Stems (2), "ari");
when 2 =>
Ox (1) := Add (De.Stems (1), "eor");
Ox (2) := Add (De.Stems (2), "eri");
when 3 =>
Ox (1) := Add (De.Stems (1), "or");
-- Would be wrong for 3 3, but no 3 3 DEP
if De.Part.V.Con.Var = 4 then
Ox (2) := Add (De.Stems (2), "iri");
else
Ox (2) := Add (De.Stems (2), "i");
end if;
when others =>
raise Not_Found;
end case; -- all DEP handled
elsif De.Part.V.Kind = Perfdef then -- all PERFDEF handled
Ox (1) := Add (De.Stems (3), "i");
Ox (2) := Add (De.Stems (3), "isse");
Ox (3) := Add (De.Stems (4), "us");
Ox (4) := Null_Ox; -- Flag for later use
elsif De.Part.V.Kind = Impers and then
((De.Stems (1)(1 .. 3) = "zzz") and -- Recognize as PERFDEF IMPERS
(De.Stems (2)(1 .. 3) = "zzz"))
then
Ox (1) := Add (De.Stems (3), "it");
Ox (2) := Add (De.Stems (3), "isse");
Ox (3) := Add (De.Stems (4), "us est");
-- OX (4) := ADD (NULL_OX, "PERFDEF");
else -- Not DEP/PERFDEF/IMPERS
if De.Part.V.Kind = Impers then
case De.Part.V.Con.Which is
when 1 =>
Ox (1) := Add (De.Stems (1), "at");
when 2 =>
Ox (1) := Add (De.Stems (1), "et");
when 3 =>
if De.Part.V.Con.Var = 2 then
Ox (1) := Add (De.Stems (1), "t");
else
if De.Stems (1)(Trim (De.Stems (1))'Last) = 'i' then
Ox (1) := Add (De.Stems (1), "t");
else
Ox (1) := Add (De.Stems (1), "it");
end if;
end if;
when 5 =>
if De.Part.V.Con.Var = 1 then
Ox (1) := Add (De.Stems (1), "est");
end if;
when 7 =>
if De.Part.V.Con.Var = 1 or
De.Part.V.Con.Var = 2
then
Ox (1) := Add (De.Stems (1), "t");
end if;
when others => null;
end case;
else
-- OX 1
if De.Part.V.Con.Which = 2 then
Ox (1) := Add (De.Stems (1), "eo");
elsif De.Part.V.Con.Which = 5 then
Ox (1) := Add (De.Stems (1), "um");
elsif De.Part.V.Con = (7, 2) then
Ox (1) := Add (De.Stems (1), "am");
else
Ox (1) := Add (De.Stems (1), "o");
end if;
end if;
-- OX 2
case De.Part.V.Con.Which is
when 1 =>
Ox (2) := Add (De.Stems (2), "are");
when 2 =>
Ox (2) := Add (De.Stems (2), "ere");
when 3 =>
case De.Part.V.Con.Var is
when 2 =>
Ox (2) := Add (De.Stems (2), "re");
when 3 =>
-- Special case for fio, fieri: it follows the usual
-- conjugation everywhere except for present infinitive
if Trim (De.Stems (2)) = "f" then
Ox (2) := Add (De.Stems (2), "ieri");
else
Ox (2) := Add (De.Stems (2), "eri");
end if;
when 4 =>
Ox (2) := Add (De.Stems (2), "ire");
when others =>
Ox (2) := Add (De.Stems (2), "ere");
end case;
-- elsif DE.PART.V.CON.WHICH = 4 then
-- OX (2) := ADD (DE.STEMS (2), "ire");
when 5 =>
if De.Part.V.Con.Var = 1 then
Ox (2) := Add (De.Stems (2), "esse");
elsif De.Part.V.Con.Var = 2 then
Ox (2) := Add (De.Stems (1), "e"); -- tricky, but it is 1
end if;
when 6 =>
if De.Part.V.Con.Var = 1 then
Ox (2) := Add (De.Stems (2), "re");
elsif De.Part.V.Con.Var = 2 then
Ox (2) := Add (De.Stems (2), "le");
end if;
when 7 =>
if De.Part.V.Con.Var = 3 then
Ox (2) := Add (De.Stems (2), "se");
end if;
when 8 =>
case De.Part.V.Con.Var is
when 1 =>
Ox (2) := Add (De.Stems (2), "are");
when 2 =>
Ox (2) := Add (De.Stems (2), "ere");
when 3 =>
Ox (2) := Add (De.Stems (2), "ere");
when 4 =>
Ox (2) := Add (De.Stems (2), "ire");
when others =>
Ox (2) := Add (De.Stems (2), "ere");
end case;
when 9 =>
if De.Part.V.Con.Var = 8 then
Ox (1) := Add (De.Stems (1), ".");
Ox (2) := Add (Null_Ox, "abb.");
elsif De.Part.V.Con.Var = 9 then
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (Null_Ox, "undeclined");
end if;
when others => null;
end case; -- OX (2) handled
-- OX 3 & 4
if De.Part.V.Kind = Impers then
if Ox (3)(1 .. 7) /= "PERFDEF" then
Ox (3) := Add (De.Stems (3), "it");
end if;
Ox (4) := Add (De.Stems (4), "us est");
elsif De.Part.V.Kind = Semidep then -- Finalization correction
Ox (4) := Add (De.Stems (4), "us sum");
elsif De.Part.V.Con = (5, 1) then
Ox (3) := Add (De.Stems (3), "i");
Ox (4) := Add (De.Stems (4), "urus");
elsif De.Part.V.Con.Which = 8 then
Ox (3) := Add ("", "additional");
Ox (4) := Add ("", "forms");
elsif De.Part.V.Con.Which = 9 then
Ox (3) := Add (Null_Ox, "BLANK"); -- Flag for later use
Ox (4) := Add (Null_Ox, "BLANK"); -- Flag for later use
else
Ox (3) := Add (De.Stems (3), "i");
Ox (4) := Add (De.Stems (4), "us");
end if; -- OX (3 & 4) handled
end if; -- On V KIND
if De.Part.V.Con = (6, 1) then -- Finalization correction
Ox (3) := Add (Ox (3), " (ii)");
end if;
elsif (De.Part.Pofs = Num) and then (De.Part.Num.Sort = X) then
if De.Part.Num.Decl.Which = 1 then
case De.Part.Num.Decl.Var is
when 1 =>
Ox (1) := Add (De.Stems (1), "us -a -um");
Ox (2) := Add (De.Stems (2), "us -a -um");
Ox (3) := Add (De.Stems (3), "i -ae -a");
Ox (4) := Add (De.Stems (4), "");
when 2 =>
Ox (1) := Add (De.Stems (1), "o -ae o");
Ox (2) := Add (De.Stems (2), "us -a -um");
Ox (3) := Add (De.Stems (3), "i -ae -a");
Ox (4) := Add (De.Stems (4), "");
when 3 =>
Ox (1) := Add (De.Stems (1), "es -es -ia");
Ox (2) := Add (De.Stems (2), "us -a -um");
Ox (3) := Add (De.Stems (3), "i -ae -a");
Ox (4) := Add (De.Stems (4), "");
when 4 =>
Ox (1) := Add (De.Stems (1), "i -ae -a");
Ox (2) := Add (De.Stems (2), "us -a -um");
Ox (3) := Add (De.Stems (3), "i -ae -a");
Ox (4) := Add (De.Stems (4), "ie (n)s");
when others => null;
end case;
elsif De.Part.Num.Decl.Which = 2 then
Ox (1) := Add (De.Stems (1), "");
Ox (2) := Add (De.Stems (2), "us -a -um");
Ox (3) := Add (De.Stems (3), "i -ae -a");
Ox (4) := Add (De.Stems (4), "ie (n)s");
end if;
elsif (De.Part.Pofs = Num) and then (De.Part.Num.Sort = Card) then
if De.Part.Num.Decl.Which = 1 then
case De.Part.Num.Decl.Var is
when 1 =>
Ox (1) := Add (De.Stems (1), "us");
Ox (2) := Add (De.Stems (1), "a");
Ox (3) := Add (De.Stems (1), "um");
when 2 =>
Ox (1) := Add (De.Stems (1), "o");
Ox (2) := Add (De.Stems (1), "ae");
Ox (3) := Add (De.Stems (1), "o");
when 3 =>
Ox (1) := Add (De.Stems (1), "es");
Ox (2) := Add (De.Stems (1), "es");
Ox (3) := Add (De.Stems (1), "ia");
when 4 =>
Ox (1) := Add (De.Stems (1), "i");
Ox (2) := Add (De.Stems (1), "ae");
Ox (3) := Add (De.Stems (1), "a");
when others => null;
end case;
elsif De.Part.Num.Decl.Which = 2 then
Ox (1) := Add (De.Stems (1), "");
end if;
elsif (De.Part.Pofs = Num) and then (De.Part.Num.Sort = Ord) then
Ox (1) := Add (De.Stems (1), "us");
Ox (2) := Add (De.Stems (1), "a");
Ox (3) := Add (De.Stems (1), "um");
elsif (De.Part.Pofs = Num) and then (De.Part.Num.Sort = Dist) then
Ox (1) := Add (De.Stems (1), "i");
Ox (2) := Add (De.Stems (1), "ae");
Ox (3) := Add (De.Stems (1), "a");
else
Ox (1) := Add (De.Stems (1), "");
end if; -- On PART
--TEXT_IO.PUT_LINE (OX (1) & "+" & OX (2) & "+" & OX (3) & "+" & OX (4));
-- Now clean up and Output
-- Several flags have been set which modify OX's
if Ox (1)(1 .. 3) = "zzz" then
Add_Up (" - ");
elsif Ox (1) /= Null_Ox then
Add_Up (Trim (Ox (1)));
end if;
if Ox (2)(1 .. 3) = "zzz" then
Add_Up (", - ");
elsif Ox (2) /= Null_Ox then
Add_Up (", " & Trim (Ox (2)));
end if;
if Ox (3)(1 .. 3) = "zzz" then
Add_Up (", - ");
elsif Ox (3)(1 .. 3) = "DEP" then
null;
elsif Ox (3)(1 .. 7) = "PERFDEF" then
null;
elsif Ox (3)(1 .. 5) = "BLANK" then
null;
elsif Ox (3) /= Null_Ox then
Add_Up (", " & Trim (Ox (3)));
end if;
if Ox (4)(1 .. 3) = "zzz" then
Add_Up (", - ");
elsif Ox (4)(1 .. 5) = "BLANK" then
null;
elsif Ox (4) /= Null_Ox then
Add_Up (", " & Trim (Ox (4)));
end if;
Add_To (" " & Part_Of_Speech_Type'Image (De.Part.Pofs) & " ");
if De.Part.Pofs = N then
-- For DICTPAGE
if De.Part.N.Decl.Which in 1 .. 5 and
De.Part.N.Decl.Var in 1 .. 5
then
Add_To (" (" & Fst (De.Part.N.Decl.Which) & ")");
end if;
Add_To (" " & Gender_Type'Image (De.Part.N.Gender) & " ");
end if;
if De.Part.Pofs = V then
-- For DICTPAGE
if De.Part.V.Con.Which in 1 .. 3 then
if De.Part.V.Con.Var = 1 then
Add_To (" (" & Fst (De.Part.V.Con.Which) & ")");
elsif De.Part.V.Con = (3, 4) then
Add_To (" (" & Fst (4) & ")");
end if;
end if;
if De.Part.V.Kind in Gen .. Perfdef then
Add_To (" " & Verb_Kind_Type'Image (De.Part.V.Kind) & " ");
end if;
end if;
--TEXT_IO.PUT_LINE (">>>>" & TRIM (FORM));
return Trim (Form);
exception
when Not_Found =>
return "";
when others =>
return "";
end Support_Utils.Dictionary_Form;
|
-- { dg-do run }
-- { dg-options "-O" }
with Loop_Optimization3_Pkg; use Loop_Optimization3_Pkg;
procedure Loop_Optimization3 is
type Arr is array (Integer range -3 .. 3) of Integer;
C : constant Arr := (1, others => F(2));
begin
if C /= (1, 2, 2, 2, 2, 2, 2) then
raise Program_Error;
end if;
end;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T C M D --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1996-2001 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Command_Line; use Ada.Command_Line;
with Ada.Text_IO; use Ada.Text_IO;
with Osint; use Osint;
with Sdefault; use Sdefault;
with Hostparm; use Hostparm;
-- Used to determine if we are in VMS or not for error message purposes
with Gnatvsn;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with Table;
procedure GNATCmd is
pragma Ident (Gnatvsn.Gnat_Version_String);
------------------
-- SWITCH TABLE --
------------------
-- The switch tables contain an entry for each switch recognized by the
-- command processor. The syntax of entries is as follows:
-- SWITCH_STRING ::= "/ command-qualifier-name TRANSLATION"
-- TRANSLATION ::=
-- DIRECT_TRANSLATION
-- | DIRECTORIES_TRANSLATION
-- | FILE_TRANSLATION
-- | NUMERIC_TRANSLATION
-- | STRING_TRANSLATION
-- | OPTIONS_TRANSLATION
-- | COMMANDS_TRANSLATION
-- | ALPHANUMPLUS_TRANSLATION
-- | OTHER_TRANSLATION
-- DIRECT_TRANSLATION ::= space UNIX_SWITCHES
-- DIRECTORIES_TRANSLATION ::= =* UNIX_SWITCH *
-- DIRECTORY_TRANSLATION ::= =% UNIX_SWITCH %
-- FILE_TRANSLATION ::= =@ UNIX_SWITCH @
-- NUMERIC_TRANSLATION ::= =# UNIX_SWITCH # | # number #
-- STRING_TRANSLATION ::= =" UNIX_SWITCH "
-- OPTIONS_TRANSLATION ::= =OPTION {space OPTION}
-- COMMANDS_TRANSLATION ::= =? ARGS space command-name
-- ALPHANUMPLUS_TRANSLATION ::= =| UNIX_SWITCH |
-- UNIX_SWITCHES ::= UNIX_SWITCH {, UNIX_SWITCH}
-- UNIX_SWITCH ::= unix-switch-string | !unix-switch-string | `string'
-- OPTION ::= option-name space UNIX_SWITCHES
-- ARGS ::= -cargs | -bargs | -largs
-- Here command-qual is the name of the switch recognized by the GNATCmd.
-- This is always given in upper case in the templates, although in the
-- actual commands, either upper or lower case is allowed.
-- The unix-switch-string always starts with a minus, and has no commas
-- or spaces in it. Case is significant in the unix switch string. If a
-- unix switch string is preceded by the not sign (!) it means that the
-- effect of the corresponding command qualifer is to remove any previous
-- occurrence of the given switch in the command line.
-- The DIRECTORIES_TRANSLATION format is used where a list of directories
-- is given. This possible corresponding formats recognized by GNATCmd are
-- as shown by the following example for the case of PATH
-- PATH=direc
-- PATH=(direc,direc,direc,direc)
-- When more than one directory is present for the DIRECTORIES case, then
-- multiple instances of the corresponding unix switch are generated,
-- with the file name being substituted for the occurrence of *.
-- The FILE_TRANSLATION format is similar except that only a single
-- file is allowed, not a list of files, and only one unix switch is
-- generated as a result.
-- The NUMERIC_TRANSLATION format is similar to the FILE_TRANSLATION case
-- except that the parameter is a decimal integer in the range 0 to 999.
-- For the OPTIONS_TRANSLATION case, GNATCmd similarly permits one or
-- more options to appear (although only in some cases does the use of
-- multiple options make logical sense). For example, taking the
-- case of ERRORS for GCC, the following are all allowed:
-- /ERRORS=BRIEF
-- /ERRORS=(FULL,VERBOSE)
-- /ERRORS=(BRIEF IMMEDIATE)
-- If no option is provided (e.g. just /ERRORS is written), then the
-- first option in the list is the default option. For /ERRORS this
-- is NORMAL, so /ERRORS with no option is equivalent to /ERRORS=NORMAL.
-- The COMMANDS_TRANSLATION case is only used for gnatmake, to correspond
-- to the use of -cargs, -bargs and -largs (the ARGS string as indicated
-- is one of these three possibilities). The name given by COMMAND is the
-- corresponding command name to be used to interprete the switches to be
-- passed on. Switches of this type set modes, e.g. /COMPILER_QUALIFIERS
-- sets the mode so that all subsequent switches, up to another switch
-- with COMMANDS_TRANSLATION apply to the corresponding commands issued
-- by the make utility. For example
-- /COMPILER_QUALIFIERS /LIST /BINDER_QUALIFIERS /MAIN
-- /COMPILER_QUALIFIERS /NOLIST /COMPILE_CHECKS=SYNTAX
-- Clearly these switches must come at the end of the list of switches
-- since all subsequent switches apply to an issued command.
-- For the DIRECT_TRANSLATION case, an implicit additional entry is
-- created by prepending NO to the name of the qualifer, and then
-- inverting the sense of the UNIX_SWITCHES string. For example,
-- given the entry:
-- "/LIST -gnatl"
-- An implicit entry is created:
-- "/NOLIST !-gnatl"
-- In the case where, a ! is already present, inverting the sense of the
-- switch means removing it.
subtype S is String;
-- A synonym to shorten the table
type String_Ptr is access constant String;
-- String pointer type used throughout
type Switches is array (Natural range <>) of String_Ptr;
-- Type used for array of swtiches
type Switches_Ptr is access constant Switches;
--------------------------------
-- Switches for project files --
--------------------------------
S_Ext_Ref : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
"-X" & '"';
S_Project_File : aliased constant S := "/PROJECT_FILE=*" &
"-P*";
S_Project_Verb : aliased constant S := "/PROJECT_FILE_VERBOSITY=" &
"DEFAULT " &
"-vP0 " &
"MEDIUM " &
"-vP1 " &
"HIGH " &
"-vP2";
----------------------------
-- Switches for GNAT BIND --
----------------------------
S_Bind_Bind : aliased constant S := "/BIND_FILE=" &
"ADA " &
"-A " &
"C " &
"-C";
S_Bind_Build : aliased constant S := "/BUILD_LIBRARY=|" &
"-L|";
S_Bind_Current : aliased constant S := "/CURRENT_DIRECTORY " &
"!-I-";
S_Bind_Debug : aliased constant S := "/DEBUG=" &
"TRACEBACK " &
"-g2 " &
"ALL " &
"-g3 " &
"NONE " &
"-g0 " &
"SYMBOLS " &
"-g1 " &
"NOSYMBOLS " &
"!-g1 " &
"LINK " &
"-g3 " &
"NOTRACEBACK " &
"!-g2";
S_Bind_DebugX : aliased constant S := "/NODEBUG " &
"!-g";
S_Bind_Elab : aliased constant S := "/ELABORATION_DEPENDENCIES " &
"-e";
S_Bind_Error : aliased constant S := "/ERROR_LIMIT=#" &
"-m#";
S_Bind_Library : aliased constant S := "/LIBRARY_SEARCH=*" &
"-aO*";
S_Bind_Linker : aliased constant S := "/LINKER_OPTION_LIST " &
"-K";
S_Bind_Main : aliased constant S := "/MAIN " &
"!-n";
S_Bind_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
"-nostdinc";
S_Bind_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
"-nostdlib";
S_Bind_Object : aliased constant S := "/OBJECT_LIST " &
"-O";
S_Bind_Order : aliased constant S := "/ORDER_OF_ELABORATION " &
"-l";
S_Bind_Output : aliased constant S := "/OUTPUT=@" &
"-o@";
S_Bind_OutputX : aliased constant S := "/NOOUTPUT " &
"-c";
S_Bind_Pess : aliased constant S := "/PESSIMISTIC_ELABORATION " &
"-p";
S_Bind_Read : aliased constant S := "/READ_SOURCES=" &
"ALL " &
"-s " &
"NONE " &
"-x " &
"AVAILABLE " &
"!-x,!-s";
S_Bind_ReadX : aliased constant S := "/NOREAD_SOURCES " &
"-x";
S_Bind_Rename : aliased constant S := "/RENAME_MAIN " &
"-r";
S_Bind_Report : aliased constant S := "/REPORT_ERRORS=" &
"VERBOSE " &
"-v " &
"BRIEF " &
"-b " &
"DEFAULT " &
"!-b,!-v";
S_Bind_ReportX : aliased constant S := "/NOREPORT_ERRORS " &
"!-b,!-v";
S_Bind_Search : aliased constant S := "/SEARCH=*" &
"-I*";
S_Bind_Shared : aliased constant S := "/SHARED " &
"-shared";
S_Bind_Source : aliased constant S := "/SOURCE_SEARCH=*" &
"-aI*";
S_Bind_Time : aliased constant S := "/TIME_STAMP_CHECK " &
"!-t";
S_Bind_Verbose : aliased constant S := "/VERBOSE " &
"-v";
S_Bind_Warn : aliased constant S := "/WARNINGS=" &
"NORMAL " &
"!-ws,!-we " &
"SUPPRESS " &
"-ws " &
"ERROR " &
"-we";
S_Bind_WarnX : aliased constant S := "/NOWARNINGS " &
"-ws";
Bind_Switches : aliased constant Switches := (
S_Bind_Bind 'Access,
S_Bind_Build 'Access,
S_Bind_Current 'Access,
S_Bind_Debug 'Access,
S_Bind_DebugX 'Access,
S_Bind_Elab 'Access,
S_Bind_Error 'Access,
S_Ext_Ref 'Access,
S_Bind_Library 'Access,
S_Bind_Linker 'Access,
S_Bind_Main 'Access,
S_Bind_Nostinc 'Access,
S_Bind_Nostlib 'Access,
S_Bind_Object 'Access,
S_Bind_Order 'Access,
S_Bind_Output 'Access,
S_Bind_OutputX 'Access,
S_Bind_Pess 'Access,
S_Project_File 'Access,
S_Project_Verb 'Access,
S_Bind_Read 'Access,
S_Bind_ReadX 'Access,
S_Bind_Rename 'Access,
S_Bind_Report 'Access,
S_Bind_ReportX 'Access,
S_Bind_Search 'Access,
S_Bind_Shared 'Access,
S_Bind_Source 'Access,
S_Bind_Time 'Access,
S_Bind_Verbose 'Access,
S_Bind_Warn 'Access,
S_Bind_WarnX 'Access);
----------------------------
-- Switches for GNAT CHOP --
----------------------------
S_Chop_Comp : aliased constant S := "/COMPILATION " &
"-c";
S_Chop_File : aliased constant S := "/FILE_NAME_MAX_LENGTH=#" &
"-k#";
S_Chop_Help : aliased constant S := "/HELP " &
"-h";
S_Chop_Over : aliased constant S := "/OVERWRITE " &
"-w";
S_Chop_Pres : aliased constant S := "/PRESERVE " &
"-p";
S_Chop_Quiet : aliased constant S := "/QUIET " &
"-q";
S_Chop_Ref : aliased constant S := "/REFERENCE " &
"-r";
S_Chop_Verb : aliased constant S := "/VERBOSE " &
"-v";
Chop_Switches : aliased constant Switches := (
S_Chop_Comp 'Access,
S_Chop_File 'Access,
S_Chop_Help 'Access,
S_Chop_Over 'Access,
S_Chop_Pres 'Access,
S_Chop_Quiet 'Access,
S_Chop_Ref 'Access,
S_Chop_Verb 'Access);
-------------------------------
-- Switches for GNAT COMPILE --
-------------------------------
S_GCC_Ada_83 : aliased constant S := "/83 " &
"-gnat83";
S_GCC_Ada_95 : aliased constant S := "/95 " &
"!-gnat83";
S_GCC_Asm : aliased constant S := "/ASM " &
"-S,!-c";
S_GCC_Checks : aliased constant S := "/CHECKS=" &
"FULL " &
"-gnato,!-gnatE,!-gnatp " &
"OVERFLOW " &
"-gnato " &
"ELABORATION " &
"-gnatE " &
"ASSERTIONS " &
"-gnata " &
"DEFAULT " &
"!-gnato,!-gnatp " &
"SUPPRESS_ALL " &
"-gnatp";
S_GCC_ChecksX : aliased constant S := "/NOCHECKS " &
"-gnatp,!-gnato,!-gnatE";
S_GCC_Compres : aliased constant S := "/COMPRESS_NAMES " &
"-gnatC";
S_GCC_Current : aliased constant S := "/CURRENT_DIRECTORY " &
"!-I-";
S_GCC_Debug : aliased constant S := "/DEBUG=" &
"SYMBOLS " &
"-g2 " &
"NOSYMBOLS " &
"!-g2 " &
"TRACEBACK " &
"-g1 " &
"ALL " &
"-g3 " &
"NONE " &
"-g0 " &
"NOTRACEBACK " &
"-g0";
S_GCC_DebugX : aliased constant S := "/NODEBUG " &
"!-g";
S_GCC_Dist : aliased constant S := "/DISTRIBUTION_STUBS=" &
"RECEIVER " &
"-gnatzr " &
"CALLER " &
"-gnatzc";
S_GCC_DistX : aliased constant S := "/NODISTRIBUTION_STUBS " &
"!-gnatzr,!-gnatzc";
S_GCC_Error : aliased constant S := "/ERROR_LIMIT=#" &
"-gnatm#";
S_GCC_ErrorX : aliased constant S := "/NOERROR_LIMIT " &
"-gnatm999";
S_GCC_Expand : aliased constant S := "/EXPAND_SOURCE " &
"-gnatG";
S_GCC_Extend : aliased constant S := "/EXTENSIONS_ALLOWED " &
"-gnatX";
S_GCC_File : aliased constant S := "/FILE_NAME_MAX_LENGTH=#" &
"-gnatk#";
S_GCC_Force : aliased constant S := "/FORCE_ALI " &
"-gnatQ";
S_GCC_Ident : aliased constant S := "/IDENTIFIER_CHARACTER_SET=" &
"DEFAULT " &
"-gnati1 " &
"1 " &
"-gnati1 " &
"2 " &
"-gnati2 " &
"3 " &
"-gnati3 " &
"4 " &
"-gnati4 " &
"5 " &
"-gnati5 " &
"PC " &
"-gnatip " &
"PC850 " &
"-gnati8 " &
"FULL_UPPER " &
"-gnatif " &
"NO_UPPER " &
"-gnatin " &
"WIDE " &
"-gnatiw";
S_GCC_IdentX : aliased constant S := "/NOIDENTIFIER_CHARACTER_SET " &
"-gnati1";
S_GCC_Inline : aliased constant S := "/INLINE=" &
"PRAGMA " &
"-gnatn " &
"SUPPRESS " &
"-fno-inline";
S_GCC_InlineX : aliased constant S := "/NOINLINE " &
"!-gnatn";
S_GCC_List : aliased constant S := "/LIST " &
"-gnatl";
S_GCC_Noload : aliased constant S := "/NOLOAD " &
"-gnatc";
S_GCC_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
"-nostdinc";
S_GCC_Opt : aliased constant S := "/OPTIMIZE=" &
"ALL " &
"-O2,!-O0,!-O1,!-O3 " &
"NONE " &
"-O0,!-O1,!-O2,!-O3 " &
"SOME " &
"-O1,!-O0,!-O2,!-O3 " &
"DEVELOPMENT " &
"-O1,!-O0,!-O2,!-O3 " &
"UNROLL_LOOPS " &
"-funroll-loops " &
"INLINING " &
"-O3,!-O0,!-O1,!-O2";
S_GCC_OptX : aliased constant S := "/NOOPTIMIZE " &
"-O0,!-O1,!-O2,!-O3";
S_GCC_Report : aliased constant S := "/REPORT_ERRORS=" &
"VERBOSE " &
"-gnatv " &
"BRIEF " &
"-gnatb " &
"FULL " &
"-gnatf " &
"IMMEDIATE " &
"-gnate " &
"DEFAULT " &
"!-gnatb,!-gnatv";
S_GCC_ReportX : aliased constant S := "/NOREPORT_ERRORS " &
"!-gnatb,!-gnatv";
S_GCC_Repinfo : aliased constant S := "/REPRESENTATION_INFO=" &
"ARRAYS " &
"-gnatR1 " &
"NONE " &
"-gnatR0 " &
"OBJECTS " &
"-gnatR2 " &
"SYMBOLIC " &
"-gnatR3 " &
"DEFAULT " &
"-gnatR";
S_GCC_RepinfX : aliased constant S := "/NOREPRESENTATION_INFO " &
"!-gnatR";
S_GCC_Search : aliased constant S := "/SEARCH=*" &
"-I*";
S_GCC_Style : aliased constant S := "/STYLE_CHECKS=" &
"ALL_BUILTIN " &
"-gnaty " &
"1 " &
"-gnaty1 " &
"2 " &
"-gnaty2 " &
"3 " &
"-gnaty3 " &
"4 " &
"-gnaty4 " &
"5 " &
"-gnaty5 " &
"6 " &
"-gnaty6 " &
"7 " &
"-gnaty7 " &
"8 " &
"-gnaty8 " &
"9 " &
"-gnaty9 " &
"ATTRIBUTE " &
"-gnatya " &
"BLANKS " &
"-gnatyb " &
"COMMENTS " &
"-gnatyc " &
"END " &
"-gnatye " &
"VTABS " &
"-gnatyf " &
"GNAT " &
"-gnatg " &
"HTABS " &
"-gnatyh " &
"IF_THEN " &
"-gnatyi " &
"KEYWORD " &
"-gnatyk " &
"LAYOUT " &
"-gnatyl " &
"LINE_LENGTH " &
"-gnatym " &
"STANDARD_CASING " &
"-gnatyn " &
"ORDERED_SUBPROGRAMS " &
"-gnatyo " &
"NONE " &
"!-gnatg,!-gnatr " &
"PRAGMA " &
"-gnatyp " &
"REFERENCES " &
"-gnatr " &
"SPECS " &
"-gnatys " &
"TOKEN " &
"-gnatyt ";
S_GCC_StyleX : aliased constant S := "/NOSTYLE_CHECKS " &
"!-gnatg,!-gnatr";
S_GCC_Syntax : aliased constant S := "/SYNTAX_ONLY " &
"-gnats";
S_GCC_Trace : aliased constant S := "/TRACE_UNITS " &
"-gnatdc";
S_GCC_Tree : aliased constant S := "/TREE_OUTPUT " &
"-gnatt";
S_GCC_Trys : aliased constant S := "/TRY_SEMANTICS " &
"-gnatq";
S_GCC_Units : aliased constant S := "/UNITS_LIST " &
"-gnatu";
S_GCC_Unique : aliased constant S := "/UNIQUE_ERROR_TAG " &
"-gnatU";
S_GCC_Upcase : aliased constant S := "/UPPERCASE_EXTERNALS " &
"-gnatF";
S_GCC_Valid : aliased constant S := "/VALIDITY_CHECKING=" &
"DEFAULT " &
"-gnatVd " &
"NODEFAULT " &
"-gnatVD " &
"COPIES " &
"-gnatVc " &
"NOCOPIES " &
"-gnatVC " &
"FLOATS " &
"-gnatVf " &
"NOFLOATS " &
"-gnatVF " &
"IN_PARAMS " &
"-gnatVi " &
"NOIN_PARAMS " &
"-gnatVI " &
"MOD_PARAMS " &
"-gnatVm " &
"NOMOD_PARAMS " &
"-gnatVM " &
"OPERANDS " &
"-gnatVo " &
"NOOPERANDS " &
"-gnatVO " &
"RETURNS " &
"-gnatVr " &
"NORETURNS " &
"-gnatVR " &
"SUBSCRIPTS " &
"-gnatVs " &
"NOSUBSCRIPTS " &
"-gnatVS " &
"TESTS " &
"-gnatVt " &
"NOTESTS " &
"-gnatVT " &
"ALL " &
"-gnatVa " &
"NONE " &
"-gnatVn";
S_GCC_Verbose : aliased constant S := "/VERBOSE " &
"-v";
S_GCC_Warn : aliased constant S := "/WARNINGS=" &
"DEFAULT " &
"!-gnatws,!-gnatwe " &
"ALL_GCC " &
"-Wall " &
"CONDITIONALS " &
"-gnatwc " &
"NOCONDITIONALS " &
"-gnatwC " &
"ELABORATION " &
"-gnatwl " &
"NOELABORATION " &
"-gnatwL " &
"ERRORS " &
"-gnatwe " &
"HIDING " &
"-gnatwh " &
"NOHIDING " &
"-gnatwH " &
"IMPLEMENTATION " &
"-gnatwi " &
"NOIMPLEMENTATION " &
"-gnatwI " &
"OPTIONAL " &
"-gnatwa " &
"NOOPTIONAL " &
"-gnatwA " &
"OVERLAYS " &
"-gnatwo " &
"NOOVERLAYS " &
"-gnatwO " &
"REDUNDANT " &
"-gnatwr " &
"NOREDUNDANT " &
"-gnatwR " &
"SUPPRESS " &
"-gnatws " &
"UNINITIALIZED " &
"-Wuninitialized " &
"UNUSED " &
"-gnatwu " &
"NOUNUSED " &
"-gnatwU";
S_GCC_WarnX : aliased constant S := "/NOWARNINGS " &
"-gnatws";
S_GCC_Wide : aliased constant S := "/WIDE_CHARACTER_ENCODING=" &
"BRACKETS " &
"-gnatWb " &
"NONE " &
"-gnatWn " &
"HEX " &
"-gnatWh " &
"UPPER " &
"-gnatWu " &
"SHIFT_JIS " &
"-gnatWs " &
"UTF8 " &
"-gnatW8 " &
"EUC " &
"-gnatWe";
S_GCC_WideX : aliased constant S := "/NOWIDE_CHARACTER_ENCODING " &
"-gnatWn";
S_GCC_Xdebug : aliased constant S := "/XDEBUG " &
"-gnatD";
S_GCC_Xref : aliased constant S := "/XREF=" &
"GENERATE " &
"!-gnatx " &
"SUPPRESS " &
"-gnatx";
GCC_Switches : aliased constant Switches := (
S_GCC_Ada_83 'Access,
S_GCC_Ada_95 'Access,
S_GCC_Asm 'Access,
S_GCC_Checks 'Access,
S_GCC_ChecksX 'Access,
S_GCC_Compres 'Access,
S_GCC_Current 'Access,
S_GCC_Debug 'Access,
S_GCC_DebugX 'Access,
S_GCC_Dist 'Access,
S_GCC_DistX 'Access,
S_GCC_Error 'Access,
S_GCC_ErrorX 'Access,
S_GCC_Expand 'Access,
S_GCC_Extend 'Access,
S_GCC_File 'Access,
S_GCC_Force 'Access,
S_GCC_Ident 'Access,
S_GCC_IdentX 'Access,
S_GCC_Inline 'Access,
S_GCC_InlineX 'Access,
S_GCC_List 'Access,
S_GCC_Noload 'Access,
S_GCC_Nostinc 'Access,
S_GCC_Opt 'Access,
S_GCC_OptX 'Access,
S_GCC_Report 'Access,
S_GCC_ReportX 'Access,
S_GCC_Repinfo 'Access,
S_GCC_RepinfX 'Access,
S_GCC_Search 'Access,
S_GCC_Style 'Access,
S_GCC_StyleX 'Access,
S_GCC_Syntax 'Access,
S_GCC_Trace 'Access,
S_GCC_Tree 'Access,
S_GCC_Trys 'Access,
S_GCC_Units 'Access,
S_GCC_Unique 'Access,
S_GCC_Upcase 'Access,
S_GCC_Valid 'Access,
S_GCC_Verbose 'Access,
S_GCC_Warn 'Access,
S_GCC_WarnX 'Access,
S_GCC_Wide 'Access,
S_GCC_WideX 'Access,
S_GCC_Xdebug 'Access,
S_GCC_Xref 'Access);
----------------------------
-- Switches for GNAT ELIM --
----------------------------
S_Elim_All : aliased constant S := "/ALL " &
"-a";
S_Elim_Miss : aliased constant S := "/MISSED " &
"-m";
S_Elim_Verb : aliased constant S := "/VERBOSE " &
"-v";
Elim_Switches : aliased constant Switches := (
S_Elim_All 'Access,
S_Elim_Miss 'Access,
S_Elim_Verb 'Access);
----------------------------
-- Switches for GNAT FIND --
----------------------------
S_Find_All : aliased constant S := "/ALL_FILES " &
"-a";
S_Find_Expr : aliased constant S := "/EXPRESSIONS " &
"-e";
S_Find_Full : aliased constant S := "/FULL_PATHNAME " &
"-f";
S_Find_Ignore : aliased constant S := "/IGNORE_LOCALS " &
"-g";
S_Find_Object : aliased constant S := "/OBJECT_SEARCH=*" &
"-aO*";
S_Find_Print : aliased constant S := "/PRINT_LINES " &
"-s";
S_Find_Project : aliased constant S := "/PROJECT=@" &
"-p@";
S_Find_Ref : aliased constant S := "/REFERENCES " &
"-r";
S_Find_Search : aliased constant S := "/SEARCH=*" &
"-I*";
S_Find_Source : aliased constant S := "/SOURCE_SEARCH=*" &
"-aI*";
Find_Switches : aliased constant Switches := (
S_Find_All 'Access,
S_Find_Expr 'Access,
S_Ext_Ref 'Access,
S_Find_Full 'Access,
S_Find_Ignore 'Access,
S_Find_Object 'Access,
S_Find_Print 'Access,
S_Find_Project 'Access,
S_Project_File 'Access,
S_Project_Verb 'Access,
S_Find_Ref 'Access,
S_Find_Search 'Access,
S_Find_Source 'Access);
------------------------------
-- Switches for GNAT KRUNCH --
------------------------------
S_Krunch_Count : aliased constant S := "/COUNT=#" &
"`#";
Krunch_Switches : aliased constant Switches := (1 .. 1 =>
S_Krunch_Count 'Access);
-------------------------------
-- Switches for GNAT LIBRARY --
-------------------------------
S_Lbr_Config : aliased constant S := "/CONFIG=@" &
"--config=@";
S_Lbr_Create : aliased constant S := "/CREATE=%" &
"--create=%";
S_Lbr_Delete : aliased constant S := "/DELETE=%" &
"--delete=%";
S_Lbr_Set : aliased constant S := "/SET=%" &
"--set=%";
Lbr_Switches : aliased constant Switches := (
S_Lbr_Config 'Access,
S_Lbr_Create 'Access,
S_Lbr_Delete 'Access,
S_Lbr_Set 'Access);
----------------------------
-- Switches for GNAT LINK --
----------------------------
S_Link_Bind : aliased constant S := "/BIND_FILE=" &
"ADA " &
"-A " &
"C " &
"-C";
S_Link_Debug : aliased constant S := "/DEBUG=" &
"ALL " &
"-g3 " &
"NONE " &
"-g0 " &
"TRACEBACK " &
"-g1 " &
"NOTRACEBACK " &
"-g0";
S_Link_Execut : aliased constant S := "/EXECUTABLE=@" &
"-o@";
S_Link_Ident : aliased constant S := "/IDENTIFICATION=" & '"' &
"--for-linker=IDENT=" &
'"';
S_Link_Nocomp : aliased constant S := "/NOCOMPILE " &
"-n";
S_Link_Nofiles : aliased constant S := "/NOSTART_FILES " &
"-nostartfiles";
S_Link_Noinhib : aliased constant S := "/NOINHIBIT-EXEC " &
"--for-linker=--noinhibit-exec";
S_Link_Static : aliased constant S := "/STATIC " &
"--for-linker=-static";
S_Link_Verb : aliased constant S := "/VERBOSE " &
"-v";
S_Link_ZZZZZ : aliased constant S := "/<other> " &
"--for-linker=";
Link_Switches : aliased constant Switches := (
S_Link_Bind 'Access,
S_Link_Debug 'Access,
S_Link_Execut 'Access,
S_Ext_Ref 'Access,
S_Link_Ident 'Access,
S_Link_Nocomp 'Access,
S_Link_Nofiles 'Access,
S_Link_Noinhib 'Access,
S_Project_File 'Access,
S_Project_Verb 'Access,
S_Link_Static 'Access,
S_Link_Verb 'Access,
S_Link_ZZZZZ 'Access);
----------------------------
-- Switches for GNAT LIST --
----------------------------
S_List_All : aliased constant S := "/ALL_UNITS " &
"-a";
S_List_Current : aliased constant S := "/CURRENT_DIRECTORY " &
"!-I-";
S_List_Depend : aliased constant S := "/DEPENDENCIES " &
"-d";
S_List_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
"-nostdinc";
S_List_Object : aliased constant S := "/OBJECT_SEARCH=*" &
"-aO*";
S_List_Output : aliased constant S := "/OUTPUT=" &
"SOURCES " &
"-s " &
"OBJECTS " &
"-o " &
"UNITS " &
"-u " &
"OPTIONS " &
"-h " &
"VERBOSE " &
"-v ";
S_List_Search : aliased constant S := "/SEARCH=*" &
"-I*";
S_List_Source : aliased constant S := "/SOURCE_SEARCH=*" &
"-aI*";
List_Switches : aliased constant Switches := (
S_List_All 'Access,
S_List_Current 'Access,
S_List_Depend 'Access,
S_Ext_Ref 'Access,
S_List_Nostinc 'Access,
S_List_Object 'Access,
S_List_Output 'Access,
S_Project_File 'Access,
S_Project_Verb 'Access,
S_List_Search 'Access,
S_List_Source 'Access);
----------------------------
-- Switches for GNAT MAKE --
----------------------------
S_Make_Actions : aliased constant S := "/ACTIONS=" &
"COMPILE " &
"-c " &
"BIND " &
"-b " &
"LINK " &
"-l ";
S_Make_All : aliased constant S := "/ALL_FILES " &
"-a";
S_Make_Bind : aliased constant S := "/BINDER_QUALIFIERS=?" &
"-bargs BIND";
S_Make_Comp : aliased constant S := "/COMPILER_QUALIFIERS=?" &
"-cargs COMPILE";
S_Make_Cond : aliased constant S := "/CONDITIONAL_SOURCE_SEARCH=*" &
"-A*";
S_Make_Cont : aliased constant S := "/CONTINUE_ON_ERROR " &
"-k";
S_Make_Current : aliased constant S := "/CURRENT_DIRECTORY " &
"!-I-";
S_Make_Dep : aliased constant S := "/DEPENDENCIES_LIST " &
"-M";
S_Make_Doobj : aliased constant S := "/DO_OBJECT_CHECK " &
"-n";
S_Make_Execut : aliased constant S := "/EXECUTABLE=@" &
"-o@";
S_Make_Force : aliased constant S := "/FORCE_COMPILE " &
"-f";
S_Make_Inplace : aliased constant S := "/IN_PLACE " &
"-i";
S_Make_Library : aliased constant S := "/LIBRARY_SEARCH=*" &
"-L*";
S_Make_Link : aliased constant S := "/LINKER_QUALIFIERS=?" &
"-largs LINK";
S_Make_Minimal : aliased constant S := "/MINIMAL_RECOMPILATION " &
"-m";
S_Make_Nolink : aliased constant S := "/NOLINK " &
"-c";
S_Make_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
"-nostdinc";
S_Make_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
"-nostdlib";
S_Make_Object : aliased constant S := "/OBJECT_SEARCH=*" &
"-aO*";
S_Make_Proc : aliased constant S := "/PROCESSES=#" &
"-j#";
S_Make_Nojobs : aliased constant S := "/NOPROCESSES " &
"-j1";
S_Make_Quiet : aliased constant S := "/QUIET " &
"-q";
S_Make_Reason : aliased constant S := "/REASONS " &
"-v";
S_Make_Search : aliased constant S := "/SEARCH=*" &
"-I*";
S_Make_Skip : aliased constant S := "/SKIP_MISSING=*" &
"-aL*";
S_Make_Source : aliased constant S := "/SOURCE_SEARCH=*" &
"-aI*";
S_Make_Verbose : aliased constant S := "/VERBOSE " &
"-v";
Make_Switches : aliased constant Switches := (
S_Make_Actions 'Access,
S_Make_All 'Access,
S_Make_Bind 'Access,
S_Make_Comp 'Access,
S_Make_Cond 'Access,
S_Make_Cont 'Access,
S_Make_Current 'Access,
S_Make_Dep 'Access,
S_Make_Doobj 'Access,
S_Make_Execut 'Access,
S_Ext_Ref 'Access,
S_Make_Force 'Access,
S_Make_Inplace 'Access,
S_Make_Library 'Access,
S_Make_Link 'Access,
S_Make_Minimal 'Access,
S_Make_Nolink 'Access,
S_Make_Nostinc 'Access,
S_Make_Nostlib 'Access,
S_Make_Object 'Access,
S_Make_Proc 'Access,
S_Project_File 'Access,
S_Project_Verb 'Access,
S_Make_Nojobs 'Access,
S_Make_Quiet 'Access,
S_Make_Reason 'Access,
S_Make_Search 'Access,
S_Make_Skip 'Access,
S_Make_Source 'Access,
S_Make_Verbose 'Access);
----------------------------------
-- Switches for GNAT PREPROCESS --
----------------------------------
S_Prep_Blank : aliased constant S := "/BLANK_LINES " &
"-b";
S_Prep_Com : aliased constant S := "/COMMENTS " &
"-c";
S_Prep_Ref : aliased constant S := "/REFERENCE " &
"-r";
S_Prep_Remove : aliased constant S := "/REMOVE " &
"!-b,!-c";
S_Prep_Symbols : aliased constant S := "/SYMBOLS " &
"-s";
S_Prep_Undef : aliased constant S := "/UNDEFINED " &
"-u";
S_Prep_Verbose : aliased constant S := "/VERBOSE " &
"-v";
S_Prep_Version : aliased constant S := "/VERSION " &
"-v";
Prep_Switches : aliased constant Switches := (
S_Prep_Blank 'Access,
S_Prep_Com 'Access,
S_Prep_Ref 'Access,
S_Prep_Remove 'Access,
S_Prep_Symbols 'Access,
S_Prep_Undef 'Access,
S_Prep_Verbose 'Access,
S_Prep_Version 'Access);
------------------------------
-- Switches for GNAT SHARED --
------------------------------
S_Shared_Debug : aliased constant S := "/DEBUG=" &
"ALL " &
"-g3 " &
"NONE " &
"-g0 " &
"TRACEBACK " &
"-g1 " &
"NOTRACEBACK " &
"-g0";
S_Shared_Image : aliased constant S := "/IMAGE=@" &
"-o@";
S_Shared_Ident : aliased constant S := "/IDENTIFICATION=" & '"' &
"--for-linker=IDENT=" &
'"';
S_Shared_Nofiles : aliased constant S := "/NOSTART_FILES " &
"-nostartfiles";
S_Shared_Noinhib : aliased constant S := "/NOINHIBIT-IMAGE " &
"--for-linker=--noinhibit-exec";
S_Shared_Verb : aliased constant S := "/VERBOSE " &
"-v";
S_Shared_ZZZZZ : aliased constant S := "/<other> " &
"--for-linker=";
Shared_Switches : aliased constant Switches := (
S_Shared_Debug 'Access,
S_Shared_Image 'Access,
S_Shared_Ident 'Access,
S_Shared_Nofiles 'Access,
S_Shared_Noinhib 'Access,
S_Shared_Verb 'Access,
S_Shared_ZZZZZ 'Access);
--------------------------------
-- Switches for GNAT STANDARD --
--------------------------------
Standard_Switches : aliased constant Switches := (1 .. 0 => null);
----------------------------
-- Switches for GNAT STUB --
----------------------------
S_Stub_Current : aliased constant S := "/CURRENT_DIRECTORY " &
"!-I-";
S_Stub_Full : aliased constant S := "/FULL " &
"-f";
S_Stub_Header : aliased constant S := "/HEADER=" &
"GENERAL " &
"-hg " &
"SPEC " &
"-hs";
S_Stub_Indent : aliased constant S := "/INDENTATION=#" &
"-i#";
S_Stub_Length : aliased constant S := "/LINE_LENGTH=#" &
"-l#";
S_Stub_Quiet : aliased constant S := "/QUIET " &
"-q";
S_Stub_Search : aliased constant S := "/SEARCH=*" &
"-I*";
S_Stub_Tree : aliased constant S := "/TREE_FILE=" &
"OVERWRITE " &
"-t " &
"SAVE " &
"-k " &
"REUSE " &
"-r";
S_Stub_Verbose : aliased constant S := "/VERBOSE " &
"-v";
Stub_Switches : aliased constant Switches := (
S_Stub_Current 'Access,
S_Stub_Full 'Access,
S_Stub_Header 'Access,
S_Stub_Indent 'Access,
S_Stub_Length 'Access,
S_Stub_Quiet 'Access,
S_Stub_Search 'Access,
S_Stub_Tree 'Access,
S_Stub_Verbose 'Access);
------------------------------
-- Switches for GNAT SYSTEM --
------------------------------
System_Switches : aliased constant Switches := (1 .. 0 => null);
----------------------------
-- Switches for GNAT XREF --
----------------------------
S_Xref_All : aliased constant S := "/ALL_FILES " &
"-a";
S_Xref_Full : aliased constant S := "/FULL_PATHNAME " &
"-f";
S_Xref_Global : aliased constant S := "/IGNORE_LOCALS " &
"-g";
S_Xref_Object : aliased constant S := "/OBJECT_SEARCH=*" &
"-aO*";
S_Xref_Project : aliased constant S := "/PROJECT=@" &
"-p@";
S_Xref_Search : aliased constant S := "/SEARCH=*" &
"-I*";
S_Xref_Source : aliased constant S := "/SOURCE_SEARCH=*" &
"-aI*";
S_Xref_Output : aliased constant S := "/UNUSED " &
"-u";
Xref_Switches : aliased constant Switches := (
S_Xref_All 'Access,
S_Ext_Ref 'Access,
S_Xref_Full 'Access,
S_Xref_Global 'Access,
S_Xref_Object 'Access,
S_Xref_Project 'Access,
S_Project_File 'Access,
S_Project_Verb 'Access,
S_Xref_Search 'Access,
S_Xref_Source 'Access,
S_Xref_Output 'Access);
-------------------
-- COMMAND TABLE --
-------------------
-- The command table contains an entry for each command recognized by
-- GNATCmd. The entries are represented by an array of records.
type Parameter_Type is
-- A parameter is defined as a whitespace bounded string, not begining
-- with a slash. (But see note under FILES_OR_WILDCARD).
(File,
-- A required file or directory parameter.
Optional_File,
-- An optional file or directory parameter.
Other_As_Is,
-- A parameter that's passed through as is (not canonicalized)
Unlimited_Files,
-- An unlimited number of writespace separate file or directory
-- parameters including wildcard specifications.
Files_Or_Wildcard);
-- A comma separated list of files and/or wildcard file specifications.
-- A comma preceded by or followed by whitespace is considered as a
-- single comma character w/o whitespace.
type Parameter_Array is array (Natural range <>) of Parameter_Type;
type Parameter_Ref is access all Parameter_Array;
type Command_Entry is record
Cname : String_Ptr;
-- Command name for GNAT xxx command
Usage : String_Ptr;
-- A usage string, used for error messages
Unixcmd : String_Ptr;
-- Corresponding Unix command
Switches : Switches_Ptr;
-- Pointer to array of switch strings
Params : Parameter_Ref;
-- Describes the allowable types of parameters.
-- Params (1) is the type of the first parameter, etc.
-- An empty parameter array means this command takes no parameters.
Defext : String (1 .. 3);
-- Default extension. If non-blank, then this extension is supplied by
-- default as the extension for any file parameter which does not have
-- an extension already.
end record;
-------------------------
-- INTERNAL STRUCTURES --
-------------------------
-- The switches and commands are defined by strings in the previous
-- section so that they are easy to modify, but internally, they are
-- kept in a more conveniently accessible form described in this
-- section.
-- Commands, command qualifers and options have a similar common format
-- so that searching for matching names can be done in a common manner.
type Item_Id is (Id_Command, Id_Switch, Id_Option);
type Translation_Type is
(
T_Direct,
-- A qualifier with no options.
-- Example: GNAT MAKE /VERBOSE
T_Directories,
-- A qualifier followed by a list of directories
-- Example: GNAT COMPILE /SEARCH=([], [.FOO], [.BAR])
T_Directory,
-- A qualifier followed by one directory
-- Example: GNAT LIBRARY /SET=[.VAXFLOATLIB]
T_File,
-- A quailifier followed by a filename
-- Example: GNAT LINK /EXECUTABLE=FOO.EXE
T_Numeric,
-- A qualifier followed by a numeric value.
-- Example: GNAT CHOP /FILE_NAME_MAX_LENGTH=39
T_String,
-- A qualifier followed by a quoted string. Only used by
-- /IDENTIFICATION qualfier.
-- Example: GNAT LINK /IDENTIFICATION="3.14a1 version"
T_Options,
-- A qualifier followed by a list of options.
-- Example: GNAT COMPILE /REPRESENTATION_INFO=(ARRAYS,OBJECTS)
T_Commands,
-- A qualifier followed by a list. Only used for
-- MAKE /COMPILER_QUALIFIERS /BINDER_QUALIFIERS /LINKER_QUALIFIERS
-- (gnatmake -cargs -bargs -largs )
-- Example: GNAT MAKE ... /LINKER_QUALIFIERS /VERBOSE FOOBAR.OBJ
T_Other,
-- A qualifier passed directly to the linker. Only used
-- for LINK and SHARED if no other match is found.
-- Example: GNAT LINK FOO.ALI /SYSSHR
T_Alphanumplus
-- A qualifier followed by a legal linker symbol prefix. Only used
-- for BIND /BUILD_LIBRARY (gnatbind -Lxyz).
-- Example: GNAT BIND /BUILD_LIBRARY=foobar
);
type Item (Id : Item_Id);
type Item_Ptr is access all Item;
type Item (Id : Item_Id) is record
Name : String_Ptr;
-- Name of the command, switch (with slash) or option
Next : Item_Ptr;
-- Pointer to next item on list, always has the same Id value
Unix_String : String_Ptr;
-- Corresponding Unix string. For a command, this is the unix command
-- name and possible default switches. For a switch or option it is
-- the unix switch string.
case Id is
when Id_Command =>
Switches : Item_Ptr;
-- Pointer to list of switch items for the command, linked
-- through the Next fields with null terminating the list.
Usage : String_Ptr;
-- Usage information, used only for errors and the default
-- list of commands output.
Params : Parameter_Ref;
-- Array of parameters
Defext : String (1 .. 3);
-- Default extension. If non-blank, then this extension is
-- supplied by default as the extension for any file parameter
-- which does not have an extension already.
when Id_Switch =>
Translation : Translation_Type;
-- Type of switch translation. For all cases, except Options,
-- this is the only field needed, since the Unix translation
-- is found in Unix_String.
Options : Item_Ptr;
-- For the Options case, this field is set to point to a list
-- of options item (for this case Unix_String is null in the
-- main switch item). The end of the list is marked by null.
when Id_Option =>
null;
-- No special fields needed, since Name and Unix_String are
-- sufficient to completely described an option.
end case;
end record;
subtype Command_Item is Item (Id_Command);
subtype Switch_Item is Item (Id_Switch);
subtype Option_Item is Item (Id_Option);
----------------------------------
-- Declarations for GNATCMD use --
----------------------------------
Commands : Item_Ptr;
-- Pointer to head of list of command items, one for each command, with
-- the end of the list marked by a null pointer.
Last_Command : Item_Ptr;
-- Pointer to last item in Commands list
Normal_Exit : exception;
-- Raise this exception for normal program termination
Error_Exit : exception;
-- Raise this exception if error detected
Errors : Natural := 0;
-- Count errors detected
Command : Item_Ptr;
-- Pointer to command item for current command
Make_Commands_Active : Item_Ptr := null;
-- Set to point to Command entry for COMPILE, BIND, or LINK as appropriate
-- if a COMMANDS_TRANSLATION switch has been encountered while processing
-- a MAKE Command.
My_Exit_Status : Exit_Status := Success;
package Buffer is new Table.Table (
Table_Component_Type => Character,
Table_Index_Type => Integer,
Table_Low_Bound => 1,
Table_Initial => 4096,
Table_Increment => 2,
Table_Name => "Buffer");
Param_Count : Natural := 0;
-- Number of parameter arguments so far
Arg_Num : Natural;
-- Argument number
Display_Command : Boolean := False;
-- Set true if /? switch causes display of generated command
-----------------------
-- Local Subprograms --
-----------------------
function Init_Object_Dirs return String_Ptr;
function Invert_Sense (S : String) return String_Ptr;
-- Given a unix switch string S, computes the inverse (adding or
-- removing ! characters as required), and returns a pointer to
-- the allocated result on the heap.
function Is_Extensionless (F : String) return Boolean;
-- Returns true if the filename has no extension.
function Match (S1, S2 : String) return Boolean;
-- Determines whether S1 and S2 match. This is a case insensitive match.
function Match_Prefix (S1, S2 : String) return Boolean;
-- Determines whether S1 matches a prefix of S2. This is also a case
-- insensitive match (for example Match ("AB","abc") is True).
function Matching_Name
(S : String;
Itm : Item_Ptr;
Quiet : Boolean := False)
return Item_Ptr;
-- Determines if the item list headed by Itm and threaded through the
-- Next fields (with null marking the end of the list), contains an
-- entry that uniquely matches the given string. The match is case
-- insensitive and permits unique abbreviation. If the match succeeds,
-- then a pointer to the matching item is returned. Otherwise, an
-- appropriate error message is written. Note that the discriminant
-- of Itm is used to determine the appropriate form of this message.
-- Quiet is normally False as shown, if it is set to True, then no
-- error message is generated in a not found situation (null is still
-- returned to indicate the not-found situation).
function OK_Alphanumerplus (S : String) return Boolean;
-- Checks that S is a string of alphanumeric characters,
-- returning True if all alphanumeric characters,
-- False if empty or a non-alphanumeric character is present.
function OK_Integer (S : String) return Boolean;
-- Checks that S is a string of digits, returning True if all digits,
-- False if empty or a non-digit is present.
procedure Place (C : Character);
-- Place a single character in the buffer, updating Ptr
procedure Place (S : String);
-- Place a string character in the buffer, updating Ptr
procedure Place_Lower (S : String);
-- Place string in buffer, forcing letters to lower case, updating Ptr
procedure Place_Unix_Switches (S : String_Ptr);
-- Given a unix switch string, place corresponding switches in Buffer,
-- updating Ptr appropriatelly. Note that in the case of use of ! the
-- result may be to remove a previously placed switch.
procedure Validate_Command_Or_Option (N : String_Ptr);
-- Check that N is a valid command or option name, i.e. that it is of the
-- form of an Ada identifier with upper case letters and underscores.
procedure Validate_Unix_Switch (S : String_Ptr);
-- Check that S is a valid switch string as described in the syntax for
-- the switch table item UNIX_SWITCH or else begins with a backquote.
----------------------
-- Init_Object_Dirs --
----------------------
function Init_Object_Dirs return String_Ptr is
Object_Dirs : Integer;
Object_Dir : array (Integer range 1 .. 256) of String_Access;
Object_Dir_Name : String_Access;
begin
Object_Dirs := 0;
Object_Dir_Name := String_Access (Object_Dir_Default_Name);
Get_Next_Dir_In_Path_Init (Object_Dir_Name);
loop
declare
Dir : String_Access := String_Access
(Get_Next_Dir_In_Path (Object_Dir_Name));
begin
exit when Dir = null;
Object_Dirs := Object_Dirs + 1;
Object_Dir (Object_Dirs)
:= String_Access (Normalize_Directory_Name (Dir.all));
end;
end loop;
for Dirs in 1 .. Object_Dirs loop
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := '-';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'L';
Object_Dir_Name := new String'(
To_Canonical_Dir_Spec
(To_Host_Dir_Spec (Object_Dir (Dirs).all, True).all, True).all);
for J in Object_Dir_Name'Range loop
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := Object_Dir_Name (J);
end loop;
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := ' ';
end loop;
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := '-';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'l';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'g';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'n';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'a';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 't';
if Hostparm.OpenVMS then
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := ' ';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := '-';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'l';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'd';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'e';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'c';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'g';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'n';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 'a';
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := 't';
end if;
return new String'(String (Buffer.Table (1 .. Buffer.Last)));
end Init_Object_Dirs;
------------------
-- Invert_Sense --
------------------
function Invert_Sense (S : String) return String_Ptr is
Sinv : String (1 .. S'Length * 2);
-- Result (for sure long enough)
Sinvp : Natural := 0;
-- Pointer to output string
begin
for Sp in S'Range loop
if Sp = S'First or else S (Sp - 1) = ',' then
if S (Sp) = '!' then
null;
else
Sinv (Sinvp + 1) := '!';
Sinv (Sinvp + 2) := S (Sp);
Sinvp := Sinvp + 2;
end if;
else
Sinv (Sinvp + 1) := S (Sp);
Sinvp := Sinvp + 1;
end if;
end loop;
return new String'(Sinv (1 .. Sinvp));
end Invert_Sense;
----------------------
-- Is_Extensionless --
----------------------
function Is_Extensionless (F : String) return Boolean is
begin
for J in reverse F'Range loop
if F (J) = '.' then
return False;
elsif F (J) = '/' or else F (J) = ']' or else F (J) = ':' then
return True;
end if;
end loop;
return True;
end Is_Extensionless;
-----------
-- Match --
-----------
function Match (S1, S2 : String) return Boolean is
Dif : constant Integer := S2'First - S1'First;
begin
if S1'Length /= S2'Length then
return False;
else
for J in S1'Range loop
if To_Lower (S1 (J)) /= To_Lower (S2 (J + Dif)) then
return False;
end if;
end loop;
return True;
end if;
end Match;
------------------
-- Match_Prefix --
------------------
function Match_Prefix (S1, S2 : String) return Boolean is
begin
if S1'Length > S2'Length then
return False;
else
return Match (S1, S2 (S2'First .. S2'First + S1'Length - 1));
end if;
end Match_Prefix;
-------------------
-- Matching_Name --
-------------------
function Matching_Name
(S : String;
Itm : Item_Ptr;
Quiet : Boolean := False)
return Item_Ptr
is
P1, P2 : Item_Ptr;
procedure Err;
-- Little procedure to output command/qualifier/option as appropriate
-- and bump error count.
procedure Err is
begin
if Quiet then
return;
end if;
Errors := Errors + 1;
if Itm /= null then
case Itm.Id is
when Id_Command =>
Put (Standard_Error, "command");
when Id_Switch =>
if OpenVMS then
Put (Standard_Error, "qualifier");
else
Put (Standard_Error, "switch");
end if;
when Id_Option =>
Put (Standard_Error, "option");
end case;
else
Put (Standard_Error, "input");
end if;
Put (Standard_Error, ": ");
Put (Standard_Error, S);
end Err;
-- Start of processing for Matching_Name
begin
-- If exact match, that's the one we want
P1 := Itm;
while P1 /= null loop
if Match (S, P1.Name.all) then
return P1;
else
P1 := P1.Next;
end if;
end loop;
-- Now check for prefix matches
P1 := Itm;
while P1 /= null loop
if P1.Name.all = "/<other>" then
return P1;
elsif not Match_Prefix (S, P1.Name.all) then
P1 := P1.Next;
else
-- Here we have found one matching prefix, so see if there is
-- another one (which is an ambiguity)
P2 := P1.Next;
while P2 /= null loop
if Match_Prefix (S, P2.Name.all) then
if not Quiet then
Put (Standard_Error, "ambiguous ");
Err;
Put (Standard_Error, " (matches ");
Put (Standard_Error, P1.Name.all);
while P2 /= null loop
if Match_Prefix (S, P2.Name.all) then
Put (Standard_Error, ',');
Put (Standard_Error, P2.Name.all);
end if;
P2 := P2.Next;
end loop;
Put_Line (Standard_Error, ")");
end if;
return null;
end if;
P2 := P2.Next;
end loop;
-- If we fall through that loop, then there was only one match
return P1;
end if;
end loop;
-- If we fall through outer loop, there was no match
if not Quiet then
Put (Standard_Error, "unrecognized ");
Err;
New_Line (Standard_Error);
end if;
return null;
end Matching_Name;
-----------------------
-- OK_Alphanumerplus --
-----------------------
function OK_Alphanumerplus (S : String) return Boolean is
begin
if S'Length = 0 then
return False;
else
for J in S'Range loop
if not (Is_Alphanumeric (S (J)) or else
S (J) = '_' or else S (J) = '$')
then
return False;
end if;
end loop;
return True;
end if;
end OK_Alphanumerplus;
----------------
-- OK_Integer --
----------------
function OK_Integer (S : String) return Boolean is
begin
if S'Length = 0 then
return False;
else
for J in S'Range loop
if not Is_Digit (S (J)) then
return False;
end if;
end loop;
return True;
end if;
end OK_Integer;
-----------
-- Place --
-----------
procedure Place (C : Character) is
begin
Buffer.Increment_Last;
Buffer.Table (Buffer.Last) := C;
end Place;
procedure Place (S : String) is
begin
for J in S'Range loop
Place (S (J));
end loop;
end Place;
-----------------
-- Place_Lower --
-----------------
procedure Place_Lower (S : String) is
begin
for J in S'Range loop
Place (To_Lower (S (J)));
end loop;
end Place_Lower;
-------------------------
-- Place_Unix_Switches --
-------------------------
procedure Place_Unix_Switches (S : String_Ptr) is
P1, P2, P3 : Natural;
Remove : Boolean;
Slen : Natural;
begin
P1 := S'First;
while P1 <= S'Last loop
if S (P1) = '!' then
P1 := P1 + 1;
Remove := True;
else
Remove := False;
end if;
P2 := P1;
pragma Assert (S (P1) = '-' or else S (P1) = '`');
while P2 < S'Last and then S (P2 + 1) /= ',' loop
P2 := P2 + 1;
end loop;
-- Switch is now in S (P1 .. P2)
Slen := P2 - P1 + 1;
if Remove then
P3 := 2;
while P3 <= Buffer.Last - Slen loop
if Buffer.Table (P3) = ' '
and then String (Buffer.Table (P3 + 1 .. P3 + Slen))
= S (P1 .. P2)
and then (P3 + Slen = Buffer.Last
or else
Buffer.Table (P3 + Slen + 1) = ' ')
then
Buffer.Table (P3 .. Buffer.Last - Slen - 1) :=
Buffer.Table (P3 + Slen + 1 .. Buffer.Last);
Buffer.Set_Last (Buffer.Last - Slen - 1);
else
P3 := P3 + 1;
end if;
end loop;
else
Place (' ');
if S (P1) = '`' then
P1 := P1 + 1;
end if;
Place (S (P1 .. P2));
end if;
P1 := P2 + 2;
end loop;
end Place_Unix_Switches;
--------------------------------
-- Validate_Command_Or_Option --
--------------------------------
procedure Validate_Command_Or_Option (N : String_Ptr) is
begin
pragma Assert (N'Length > 0);
for J in N'Range loop
if N (J) = '_' then
pragma Assert (N (J - 1) /= '_');
null;
else
pragma Assert (Is_Upper (N (J)) or else Is_Digit (N (J)));
null;
end if;
end loop;
end Validate_Command_Or_Option;
--------------------------
-- Validate_Unix_Switch --
--------------------------
procedure Validate_Unix_Switch (S : String_Ptr) is
begin
if S (S'First) = '`' then
return;
end if;
pragma Assert (S (S'First) = '-' or else S (S'First) = '!');
for J in S'First + 1 .. S'Last loop
pragma Assert (S (J) /= ' ');
if S (J) = '!' then
pragma Assert (S (J - 1) = ',' and then S (J + 1) = '-');
null;
end if;
end loop;
end Validate_Unix_Switch;
----------------------
-- List of Commands --
----------------------
-- Note that we put this after all the local bodies to avoid
-- some access before elaboration problems.
Command_List : array (Natural range <>) of Command_Entry := (
(Cname => new S'("BIND"),
Usage => new S'("GNAT BIND file[.ali] /qualifiers"),
Unixcmd => new S'("gnatbind"),
Switches => Bind_Switches'Access,
Params => new Parameter_Array'(1 => File),
Defext => "ali"),
(Cname => new S'("CHOP"),
Usage => new S'("GNAT CHOP file [directory] /qualifiers"),
Unixcmd => new S'("gnatchop"),
Switches => Chop_Switches'Access,
Params => new Parameter_Array'(1 => File, 2 => Optional_File),
Defext => " "),
(Cname => new S'("COMPILE"),
Usage => new S'("GNAT COMPILE filespec[,...] /qualifiers"),
Unixcmd => new S'("gcc -c -x ada"),
Switches => GCC_Switches'Access,
Params => new Parameter_Array'(1 => Files_Or_Wildcard),
Defext => " "),
(Cname => new S'("ELIM"),
Usage => new S'("GNAT ELIM name /qualifiers"),
Unixcmd => new S'("gnatelim"),
Switches => Elim_Switches'Access,
Params => new Parameter_Array'(1 => Other_As_Is),
Defext => "ali"),
(Cname => new S'("FIND"),
Usage => new S'("GNAT FIND pattern[:sourcefile[:line[:column]]]" &
" filespec[,...] /qualifiers"),
Unixcmd => new S'("gnatfind"),
Switches => Find_Switches'Access,
Params => new Parameter_Array'(1 => Other_As_Is,
2 => Files_Or_Wildcard),
Defext => "ali"),
(Cname => new S'("KRUNCH"),
Usage => new S'("GNAT KRUNCH file [/COUNT=nnn]"),
Unixcmd => new S'("gnatkr"),
Switches => Krunch_Switches'Access,
Params => new Parameter_Array'(1 => File),
Defext => " "),
(Cname => new S'("LIBRARY"),
Usage => new S'("GNAT LIBRARY /[CREATE | SET | DELETE]=directory"
& " [/CONFIG=file]"),
Unixcmd => new S'("gnatlbr"),
Switches => Lbr_Switches'Access,
Params => new Parameter_Array'(1 .. 0 => File),
Defext => " "),
(Cname => new S'("LINK"),
Usage => new S'("GNAT LINK file[.ali]"
& " [extra obj_&_lib_&_exe_&_opt files]"
& " /qualifiers"),
Unixcmd => new S'("gnatlink"),
Switches => Link_Switches'Access,
Params => new Parameter_Array'(1 => Unlimited_Files),
Defext => "ali"),
(Cname => new S'("LIST"),
Usage => new S'("GNAT LIST /qualifiers object_or_ali_file"),
Unixcmd => new S'("gnatls"),
Switches => List_Switches'Access,
Params => new Parameter_Array'(1 => File),
Defext => "ali"),
(Cname => new S'("MAKE"),
Usage =>
new S'("GNAT MAKE file /qualifiers (includes COMPILE /qualifiers)"),
Unixcmd => new S'("gnatmake"),
Switches => Make_Switches'Access,
Params => new Parameter_Array'(1 => File),
Defext => " "),
(Cname => new S'("PREPROCESS"),
Usage => new S'("GNAT PREPROCESS ifile ofile dfile /qualifiers"),
Unixcmd => new S'("gnatprep"),
Switches => Prep_Switches'Access,
Params => new Parameter_Array'(1 .. 3 => File),
Defext => " "),
(Cname => new S'("SHARED"),
Usage => new S'("GNAT SHARED [obj_&_lib_&_exe_&_opt files]"
& " /qualifiers"),
Unixcmd => new S'("gcc -shared " & Init_Object_Dirs.all),
Switches => Shared_Switches'Access,
Params => new Parameter_Array'(1 => Unlimited_Files),
Defext => " "),
(Cname => new S'("STANDARD"),
Usage => new S'("GNAT STANDARD"),
Unixcmd => new S'("gnatpsta"),
Switches => Standard_Switches'Access,
Params => new Parameter_Array'(1 .. 0 => File),
Defext => " "),
(Cname => new S'("STUB"),
Usage => new S'("GNAT STUB file [directory] /qualifiers"),
Unixcmd => new S'("gnatstub"),
Switches => Stub_Switches'Access,
Params => new Parameter_Array'(1 => File, 2 => Optional_File),
Defext => " "),
(Cname => new S'("SYSTEM"),
Usage => new S'("GNAT SYSTEM"),
Unixcmd => new S'("gnatpsys"),
Switches => System_Switches'Access,
Params => new Parameter_Array'(1 .. 0 => File),
Defext => " "),
(Cname => new S'("XREF"),
Usage => new S'("GNAT XREF filespec[,...] /qualifiers"),
Unixcmd => new S'("gnatxref"),
Switches => Xref_Switches'Access,
Params => new Parameter_Array'(1 => Files_Or_Wildcard),
Defext => "ali")
);
-------------------------------------
-- Start of processing for GNATCmd --
-------------------------------------
begin
Buffer.Init;
-- First we must preprocess the string form of the command and options
-- list into the internal form that we use.
for C in Command_List'Range loop
declare
Command : Item_Ptr := new Command_Item;
Last_Switch : Item_Ptr;
-- Last switch in list
begin
-- Link new command item into list of commands
if Last_Command = null then
Commands := Command;
else
Last_Command.Next := Command;
end if;
Last_Command := Command;
-- Fill in fields of new command item
Command.Name := Command_List (C).Cname;
Command.Usage := Command_List (C).Usage;
Command.Unix_String := Command_List (C).Unixcmd;
Command.Params := Command_List (C).Params;
Command.Defext := Command_List (C).Defext;
Validate_Command_Or_Option (Command.Name);
-- Process the switch list
for S in Command_List (C).Switches'Range loop
declare
SS : constant String_Ptr := Command_List (C).Switches (S);
P : Natural := SS'First;
Sw : Item_Ptr := new Switch_Item;
Last_Opt : Item_Ptr;
-- Pointer to last option
begin
-- Link new switch item into list of switches
if Last_Switch = null then
Command.Switches := Sw;
else
Last_Switch.Next := Sw;
end if;
Last_Switch := Sw;
-- Process switch string, first get name
while SS (P) /= ' ' and SS (P) /= '=' loop
P := P + 1;
end loop;
Sw.Name := new String'(SS (SS'First .. P - 1));
-- Direct translation case
if SS (P) = ' ' then
Sw.Translation := T_Direct;
Sw.Unix_String := new String'(SS (P + 1 .. SS'Last));
Validate_Unix_Switch (Sw.Unix_String);
if SS (P - 1) = '>' then
Sw.Translation := T_Other;
elsif SS (P + 1) = '`' then
null;
-- Create the inverted case (/NO ..)
elsif SS (SS'First + 1 .. SS'First + 2) /= "NO" then
Sw := new Switch_Item;
Last_Switch.Next := Sw;
Last_Switch := Sw;
Sw.Name :=
new String'("/NO" & SS (SS'First + 1 .. P - 1));
Sw.Translation := T_Direct;
Sw.Unix_String := Invert_Sense (SS (P + 1 .. SS'Last));
Validate_Unix_Switch (Sw.Unix_String);
end if;
-- Directories translation case
elsif SS (P + 1) = '*' then
pragma Assert (SS (SS'Last) = '*');
Sw.Translation := T_Directories;
Sw.Unix_String := new String'(SS (P + 2 .. SS'Last - 1));
Validate_Unix_Switch (Sw.Unix_String);
-- Directory translation case
elsif SS (P + 1) = '%' then
pragma Assert (SS (SS'Last) = '%');
Sw.Translation := T_Directory;
Sw.Unix_String := new String'(SS (P + 2 .. SS'Last - 1));
Validate_Unix_Switch (Sw.Unix_String);
-- File translation case
elsif SS (P + 1) = '@' then
pragma Assert (SS (SS'Last) = '@');
Sw.Translation := T_File;
Sw.Unix_String := new String'(SS (P + 2 .. SS'Last - 1));
Validate_Unix_Switch (Sw.Unix_String);
-- Numeric translation case
elsif SS (P + 1) = '#' then
pragma Assert (SS (SS'Last) = '#');
Sw.Translation := T_Numeric;
Sw.Unix_String := new String'(SS (P + 2 .. SS'Last - 1));
Validate_Unix_Switch (Sw.Unix_String);
-- Alphanumerplus translation case
elsif SS (P + 1) = '|' then
pragma Assert (SS (SS'Last) = '|');
Sw.Translation := T_Alphanumplus;
Sw.Unix_String := new String'(SS (P + 2 .. SS'Last - 1));
Validate_Unix_Switch (Sw.Unix_String);
-- String translation case
elsif SS (P + 1) = '"' then
pragma Assert (SS (SS'Last) = '"');
Sw.Translation := T_String;
Sw.Unix_String := new String'(SS (P + 2 .. SS'Last - 1));
Validate_Unix_Switch (Sw.Unix_String);
-- Commands translation case
elsif SS (P + 1) = '?' then
Sw.Translation := T_Commands;
Sw.Unix_String := new String'(SS (P + 2 .. SS'Last));
-- Options translation case
else
Sw.Translation := T_Options;
Sw.Unix_String := new String'("");
P := P + 1; -- bump past =
while P <= SS'Last loop
declare
Opt : Item_Ptr := new Option_Item;
Q : Natural;
begin
-- Link new option item into options list
if Last_Opt = null then
Sw.Options := Opt;
else
Last_Opt.Next := Opt;
end if;
Last_Opt := Opt;
-- Fill in fields of new option item
Q := P;
while SS (Q) /= ' ' loop
Q := Q + 1;
end loop;
Opt.Name := new String'(SS (P .. Q - 1));
Validate_Command_Or_Option (Opt.Name);
P := Q + 1;
Q := P;
while Q <= SS'Last and then SS (Q) /= ' ' loop
Q := Q + 1;
end loop;
Opt.Unix_String := new String'(SS (P .. Q - 1));
Validate_Unix_Switch (Opt.Unix_String);
P := Q + 1;
end;
end loop;
end if;
end;
end loop;
end;
end loop;
-- If no parameters, give complete list of commands
if Argument_Count = 0 then
Put_Line ("List of available commands");
New_Line;
while Commands /= null loop
Put (Commands.Usage.all);
Set_Col (53);
Put_Line (Commands.Unix_String.all);
Commands := Commands.Next;
end loop;
raise Normal_Exit;
end if;
Arg_Num := 1;
loop
exit when Arg_Num > Argument_Count;
declare
Argv : String_Access;
Arg_Idx : Integer;
function Get_Arg_End
(Argv : String;
Arg_Idx : Integer)
return Integer;
-- Begins looking at Arg_Idx + 1 and returns the index of the
-- last character before a slash or else the index of the last
-- character in the string Argv.
function Get_Arg_End
(Argv : String;
Arg_Idx : Integer)
return Integer
is
begin
for J in Arg_Idx + 1 .. Argv'Last loop
if Argv (J) = '/' then
return J - 1;
end if;
end loop;
return Argv'Last;
end Get_Arg_End;
begin
Argv := new String'(Argument (Arg_Num));
Arg_Idx := Argv'First;
<<Tryagain_After_Coalesce>>
loop
declare
Next_Arg_Idx : Integer;
Arg : String_Access;
begin
Next_Arg_Idx := Get_Arg_End (Argv.all, Arg_Idx);
Arg := new String'(Argv (Arg_Idx .. Next_Arg_Idx));
-- The first one must be a command name
if Arg_Num = 1 and then Arg_Idx = Argv'First then
Command := Matching_Name (Arg.all, Commands);
if Command = null then
raise Error_Exit;
end if;
-- Give usage information if only command given
if Argument_Count = 1 and then Next_Arg_Idx = Argv'Last
and then
not (Command.Name.all = "SYSTEM"
or else Command.Name.all = "STANDARD")
then
Put_Line ("List of available qualifiers and options");
New_Line;
Put (Command.Usage.all);
Set_Col (53);
Put_Line (Command.Unix_String.all);
declare
Sw : Item_Ptr := Command.Switches;
begin
while Sw /= null loop
Put (" ");
Put (Sw.Name.all);
case Sw.Translation is
when T_Other =>
Set_Col (53);
Put_Line (Sw.Unix_String.all & "/<other>");
when T_Direct =>
Set_Col (53);
Put_Line (Sw.Unix_String.all);
when T_Directories =>
Put ("=(direc,direc,..direc)");
Set_Col (53);
Put (Sw.Unix_String.all);
Put (" direc ");
Put (Sw.Unix_String.all);
Put_Line (" direc ...");
when T_Directory =>
Put ("=directory");
Set_Col (53);
Put (Sw.Unix_String.all);
if Sw.Unix_String (Sw.Unix_String'Last)
/= '='
then
Put (' ');
end if;
Put_Line ("directory ");
when T_File =>
Put ("=file");
Set_Col (53);
Put (Sw.Unix_String.all);
if Sw.Unix_String (Sw.Unix_String'Last)
/= '='
then
Put (' ');
end if;
Put_Line ("file ");
when T_Numeric =>
Put ("=nnn");
Set_Col (53);
if Sw.Unix_String (Sw.Unix_String'First)
= '`'
then
Put (Sw.Unix_String
(Sw.Unix_String'First + 1
.. Sw.Unix_String'Last));
else
Put (Sw.Unix_String.all);
end if;
Put_Line ("nnn");
when T_Alphanumplus =>
Put ("=xyz");
Set_Col (53);
if Sw.Unix_String (Sw.Unix_String'First)
= '`'
then
Put (Sw.Unix_String
(Sw.Unix_String'First + 1
.. Sw.Unix_String'Last));
else
Put (Sw.Unix_String.all);
end if;
Put_Line ("xyz");
when T_String =>
Put ("=");
Put ('"');
Put ("<string>");
Put ('"');
Set_Col (53);
Put (Sw.Unix_String.all);
if Sw.Unix_String (Sw.Unix_String'Last)
/= '='
then
Put (' ');
end if;
Put ("<string>");
New_Line;
when T_Commands =>
Put (" (switches for ");
Put (Sw.Unix_String (
Sw.Unix_String'First + 7
.. Sw.Unix_String'Last));
Put (')');
Set_Col (53);
Put (Sw.Unix_String (
Sw.Unix_String'First
.. Sw.Unix_String'First + 5));
Put_Line (" switches");
when T_Options =>
declare
Opt : Item_Ptr := Sw.Options;
begin
Put_Line ("=(option,option..)");
while Opt /= null loop
Put (" ");
Put (Opt.Name.all);
if Opt = Sw.Options then
Put (" (D)");
end if;
Set_Col (53);
Put_Line (Opt.Unix_String.all);
Opt := Opt.Next;
end loop;
end;
end case;
Sw := Sw.Next;
end loop;
end;
raise Normal_Exit;
end if;
Place (Command.Unix_String.all);
-- Special handling for internal debugging switch /?
elsif Arg.all = "/?" then
Display_Command := True;
-- Copy -switch unchanged
elsif Arg (Arg'First) = '-' then
Place (' ');
Place (Arg.all);
-- Copy quoted switch with quotes stripped
elsif Arg (Arg'First) = '"' then
if Arg (Arg'Last) /= '"' then
Put (Standard_Error, "misquoted argument: ");
Put_Line (Standard_Error, Arg.all);
Errors := Errors + 1;
else
Put (Arg (Arg'First + 1 .. Arg'Last - 1));
end if;
-- Parameter Argument
elsif Arg (Arg'First) /= '/'
and then Make_Commands_Active = null
then
Param_Count := Param_Count + 1;
if Param_Count <= Command.Params'Length then
case Command.Params (Param_Count) is
when File | Optional_File =>
declare
Normal_File : String_Access
:= To_Canonical_File_Spec (Arg.all);
begin
Place (' ');
Place_Lower (Normal_File.all);
if Is_Extensionless (Normal_File.all)
and then Command.Defext /= " "
then
Place ('.');
Place (Command.Defext);
end if;
end;
when Unlimited_Files =>
declare
Normal_File : String_Access
:= To_Canonical_File_Spec (Arg.all);
File_Is_Wild : Boolean := False;
File_List : String_Access_List_Access;
begin
for I in Arg'Range loop
if Arg (I) = '*'
or else Arg (I) = '%'
then
File_Is_Wild := True;
end if;
end loop;
if File_Is_Wild then
File_List := To_Canonical_File_List
(Arg.all, False);
for I in File_List.all'Range loop
Place (' ');
Place_Lower (File_List.all (I).all);
end loop;
else
Place (' ');
Place_Lower (Normal_File.all);
if Is_Extensionless (Normal_File.all)
and then Command.Defext /= " "
then
Place ('.');
Place (Command.Defext);
end if;
end if;
Param_Count := Param_Count - 1;
end;
when Other_As_Is =>
Place (' ');
Place (Arg.all);
when Files_Or_Wildcard =>
-- Remove spaces from a comma separated list
-- of file names and adjust control variables
-- accordingly.
while Arg_Num < Argument_Count and then
(Argv (Argv'Last) = ',' xor
Argument (Arg_Num + 1)
(Argument (Arg_Num + 1)'First) = ',')
loop
Argv := new String'(Argv.all
& Argument (Arg_Num + 1));
Arg_Num := Arg_Num + 1;
Arg_Idx := Argv'First;
Next_Arg_Idx := Get_Arg_End (Argv.all, Arg_Idx);
Arg :=
new String'(Argv (Arg_Idx .. Next_Arg_Idx));
end loop;
-- Parse the comma separated list of VMS filenames
-- and place them on the command line as space
-- separated Unix style filenames. Lower case and
-- add default extension as appropriate.
declare
Arg1_Idx : Integer := Arg'First;
function Get_Arg1_End
(Arg : String; Arg_Idx : Integer)
return Integer;
-- Begins looking at Arg_Idx + 1 and
-- returns the index of the last character
-- before a comma or else the index of the
-- last character in the string Arg.
function Get_Arg1_End
(Arg : String; Arg_Idx : Integer)
return Integer
is
begin
for I in Arg_Idx + 1 .. Arg'Last loop
if Arg (I) = ',' then
return I - 1;
end if;
end loop;
return Arg'Last;
end Get_Arg1_End;
begin
loop
declare
Next_Arg1_Idx : Integer
:= Get_Arg1_End (Arg.all, Arg1_Idx);
Arg1 : String
:= Arg (Arg1_Idx .. Next_Arg1_Idx);
Normal_File : String_Access
:= To_Canonical_File_Spec (Arg1);
begin
Place (' ');
Place_Lower (Normal_File.all);
if Is_Extensionless (Normal_File.all)
and then Command.Defext /= " "
then
Place ('.');
Place (Command.Defext);
end if;
Arg1_Idx := Next_Arg1_Idx + 1;
end;
exit when Arg1_Idx > Arg'Last;
-- Don't allow two or more commas in a row
if Arg (Arg1_Idx) = ',' then
Arg1_Idx := Arg1_Idx + 1;
if Arg1_Idx > Arg'Last or else
Arg (Arg1_Idx) = ','
then
Put_Line (Standard_Error,
"Malformed Parameter: " & Arg.all);
Put (Standard_Error, "usage: ");
Put_Line (Standard_Error,
Command.Usage.all);
raise Error_Exit;
end if;
end if;
end loop;
end;
end case;
end if;
-- Qualifier argument
else
declare
Sw : Item_Ptr;
SwP : Natural;
P2 : Natural;
Endp : Natural := 0; -- avoid warning!
Opt : Item_Ptr;
begin
SwP := Arg'First;
while SwP < Arg'Last and then Arg (SwP + 1) /= '=' loop
SwP := SwP + 1;
end loop;
-- At this point, the switch name is in
-- Arg (Arg'First..SwP) and if that is not the whole
-- switch, then there is an equal sign at
-- Arg (SwP + 1) and the rest of Arg is what comes
-- after the equal sign.
-- If make commands are active, see if we have another
-- COMMANDS_TRANSLATION switch belonging to gnatmake.
if Make_Commands_Active /= null then
Sw :=
Matching_Name
(Arg (Arg'First .. SwP),
Command.Switches,
Quiet => True);
if Sw /= null and then Sw.Translation = T_Commands then
null;
else
Sw :=
Matching_Name
(Arg (Arg'First .. SwP),
Make_Commands_Active.Switches,
Quiet => False);
end if;
-- For case of GNAT MAKE or CHOP, if we cannot find the
-- switch, then see if it is a recognized compiler switch
-- instead, and if so process the compiler switch.
elsif Command.Name.all = "MAKE"
or else Command.Name.all = "CHOP" then
Sw :=
Matching_Name
(Arg (Arg'First .. SwP),
Command.Switches,
Quiet => True);
if Sw = null then
Sw :=
Matching_Name
(Arg (Arg'First .. SwP),
Matching_Name ("COMPILE", Commands).Switches,
Quiet => False);
end if;
-- For all other cases, just search the relevant command
else
Sw :=
Matching_Name
(Arg (Arg'First .. SwP),
Command.Switches,
Quiet => False);
end if;
if Sw /= null then
case Sw.Translation is
when T_Direct =>
Place_Unix_Switches (Sw.Unix_String);
if Arg (SwP + 1) = '=' then
Put (Standard_Error,
"qualifier options ignored: ");
Put_Line (Standard_Error, Arg.all);
end if;
when T_Directories =>
if SwP + 1 > Arg'Last then
Put (Standard_Error,
"missing directories for: ");
Put_Line (Standard_Error, Arg.all);
Errors := Errors + 1;
elsif Arg (SwP + 2) /= '(' then
SwP := SwP + 2;
Endp := Arg'Last;
elsif Arg (Arg'Last) /= ')' then
-- Remove spaces from a comma separated list
-- of file names and adjust control
-- variables accordingly.
if Arg_Num < Argument_Count and then
(Argv (Argv'Last) = ',' xor
Argument (Arg_Num + 1)
(Argument (Arg_Num + 1)'First) = ',')
then
Argv := new String'(Argv.all
& Argument (Arg_Num + 1));
Arg_Num := Arg_Num + 1;
Arg_Idx := Argv'First;
Next_Arg_Idx
:= Get_Arg_End (Argv.all, Arg_Idx);
Arg := new String'
(Argv (Arg_Idx .. Next_Arg_Idx));
goto Tryagain_After_Coalesce;
end if;
Put (Standard_Error,
"incorrectly parenthesized " &
"or malformed argument: ");
Put_Line (Standard_Error, Arg.all);
Errors := Errors + 1;
else
SwP := SwP + 3;
Endp := Arg'Last - 1;
end if;
while SwP <= Endp loop
declare
Dir_Is_Wild : Boolean := False;
Dir_Maybe_Is_Wild : Boolean := False;
Dir_List : String_Access_List_Access;
begin
P2 := SwP;
while P2 < Endp
and then Arg (P2 + 1) /= ','
loop
-- A wildcard directory spec on VMS
-- will contain either * or % or ...
if Arg (P2) = '*' then
Dir_Is_Wild := True;
elsif Arg (P2) = '%' then
Dir_Is_Wild := True;
elsif Dir_Maybe_Is_Wild
and then Arg (P2) = '.'
and then Arg (P2 + 1) = '.'
then
Dir_Is_Wild := True;
Dir_Maybe_Is_Wild := False;
elsif Dir_Maybe_Is_Wild then
Dir_Maybe_Is_Wild := False;
elsif Arg (P2) = '.'
and then Arg (P2 + 1) = '.'
then
Dir_Maybe_Is_Wild := True;
end if;
P2 := P2 + 1;
end loop;
if (Dir_Is_Wild) then
Dir_List := To_Canonical_File_List
(Arg (SwP .. P2), True);
for I in Dir_List.all'Range loop
Place_Unix_Switches (Sw.Unix_String);
Place_Lower (Dir_List.all (I).all);
end loop;
else
Place_Unix_Switches (Sw.Unix_String);
Place_Lower (To_Canonical_Dir_Spec
(Arg (SwP .. P2), False).all);
end if;
SwP := P2 + 2;
end;
end loop;
when T_Directory =>
if SwP + 1 > Arg'Last then
Put (Standard_Error,
"missing directory for: ");
Put_Line (Standard_Error, Arg.all);
Errors := Errors + 1;
else
Place_Unix_Switches (Sw.Unix_String);
-- Some switches end in "=". No space here
if Sw.Unix_String
(Sw.Unix_String'Last) /= '='
then
Place (' ');
end if;
Place_Lower (To_Canonical_Dir_Spec
(Arg (SwP + 2 .. Arg'Last), False).all);
end if;
when T_File =>
if SwP + 1 > Arg'Last then
Put (Standard_Error, "missing file for: ");
Put_Line (Standard_Error, Arg.all);
Errors := Errors + 1;
else
Place_Unix_Switches (Sw.Unix_String);
-- Some switches end in "=". No space here
if Sw.Unix_String
(Sw.Unix_String'Last) /= '='
then
Place (' ');
end if;
Place_Lower (To_Canonical_File_Spec
(Arg (SwP + 2 .. Arg'Last)).all);
end if;
when T_Numeric =>
if OK_Integer (Arg (SwP + 2 .. Arg'Last)) then
Place_Unix_Switches (Sw.Unix_String);
Place (Arg (SwP + 2 .. Arg'Last));
else
Put (Standard_Error, "argument for ");
Put (Standard_Error, Sw.Name.all);
Put_Line (Standard_Error, " must be numeric");
Errors := Errors + 1;
end if;
when T_Alphanumplus =>
if
OK_Alphanumerplus (Arg (SwP + 2 .. Arg'Last))
then
Place_Unix_Switches (Sw.Unix_String);
Place (Arg (SwP + 2 .. Arg'Last));
else
Put (Standard_Error, "argument for ");
Put (Standard_Error, Sw.Name.all);
Put_Line (Standard_Error,
" must be alphanumeric");
Errors := Errors + 1;
end if;
when T_String =>
-- A String value must be extended to the
-- end of the Argv, otherwise strings like
-- "foo/bar" get split at the slash.
--
-- The begining and ending of the string
-- are flagged with embedded nulls which
-- are removed when building the Spawn
-- call. Nulls are use because they won't
-- show up in a /? output. Quotes aren't
-- used because that would make it difficult
-- to embed them.
Place_Unix_Switches (Sw.Unix_String);
if Next_Arg_Idx /= Argv'Last then
Next_Arg_Idx := Argv'Last;
Arg := new String'
(Argv (Arg_Idx .. Next_Arg_Idx));
SwP := Arg'First;
while SwP < Arg'Last and then
Arg (SwP + 1) /= '=' loop
SwP := SwP + 1;
end loop;
end if;
Place (ASCII.NUL);
Place (Arg (SwP + 2 .. Arg'Last));
Place (ASCII.NUL);
when T_Commands =>
-- Output -largs/-bargs/-cargs
Place (' ');
Place (Sw.Unix_String
(Sw.Unix_String'First ..
Sw.Unix_String'First + 5));
-- Set source of new commands, also setting this
-- non-null indicates that we are in the special
-- commands mode for processing the -xargs case.
Make_Commands_Active :=
Matching_Name
(Sw.Unix_String
(Sw.Unix_String'First + 7 ..
Sw.Unix_String'Last),
Commands);
when T_Options =>
if SwP + 1 > Arg'Last then
Place_Unix_Switches (Sw.Options.Unix_String);
SwP := Endp + 1;
elsif Arg (SwP + 2) /= '(' then
SwP := SwP + 2;
Endp := Arg'Last;
elsif Arg (Arg'Last) /= ')' then
Put (Standard_Error,
"incorrectly parenthesized argument: ");
Put_Line (Standard_Error, Arg.all);
Errors := Errors + 1;
SwP := Endp + 1;
else
SwP := SwP + 3;
Endp := Arg'Last - 1;
end if;
while SwP <= Endp loop
P2 := SwP;
while P2 < Endp
and then Arg (P2 + 1) /= ','
loop
P2 := P2 + 1;
end loop;
-- Option name is in Arg (SwP .. P2)
Opt := Matching_Name (Arg (SwP .. P2),
Sw.Options);
if Opt /= null then
Place_Unix_Switches (Opt.Unix_String);
end if;
SwP := P2 + 2;
end loop;
when T_Other =>
Place_Unix_Switches
(new String'(Sw.Unix_String.all & Arg.all));
end case;
end if;
end;
end if;
Arg_Idx := Next_Arg_Idx + 1;
end;
exit when Arg_Idx > Argv'Last;
end loop;
end;
Arg_Num := Arg_Num + 1;
end loop;
if Display_Command then
Put (Standard_Error, "generated command -->");
Put (Standard_Error, String (Buffer.Table (1 .. Buffer.Last)));
Put (Standard_Error, "<--");
New_Line (Standard_Error);
raise Normal_Exit;
end if;
-- Gross error checking that the number of parameters is correct.
-- Not applicable to Unlimited_Files parameters.
if not ((Param_Count = Command.Params'Length - 1 and then
Command.Params (Param_Count + 1) = Unlimited_Files)
or else (Param_Count <= Command.Params'Length))
then
Put_Line (Standard_Error,
"Parameter count of "
& Integer'Image (Param_Count)
& " not equal to expected "
& Integer'Image (Command.Params'Length));
Put (Standard_Error, "usage: ");
Put_Line (Standard_Error, Command.Usage.all);
Errors := Errors + 1;
end if;
if Errors > 0 then
raise Error_Exit;
else
-- Prepare arguments for a call to spawn, filtering out
-- embedded nulls place there to delineate strings.
declare
Pname_Ptr : Natural;
Args : Argument_List (1 .. 500);
Nargs : Natural;
P1, P2 : Natural;
Exec_Path : String_Access;
Inside_Nul : Boolean := False;
Arg : String (1 .. 1024);
Arg_Ctr : Natural;
begin
Pname_Ptr := 1;
while Pname_Ptr < Buffer.Last
and then Buffer.Table (Pname_Ptr + 1) /= ' '
loop
Pname_Ptr := Pname_Ptr + 1;
end loop;
P1 := Pname_Ptr + 2;
Arg_Ctr := 1;
Arg (Arg_Ctr) := Buffer.Table (P1);
Nargs := 0;
while P1 <= Buffer.Last loop
if Buffer.Table (P1) = ASCII.NUL then
if Inside_Nul then
Inside_Nul := False;
else
Inside_Nul := True;
end if;
end if;
if Buffer.Table (P1) = ' ' and then not Inside_Nul then
P1 := P1 + 1;
Arg_Ctr := Arg_Ctr + 1;
Arg (Arg_Ctr) := Buffer.Table (P1);
else
Nargs := Nargs + 1;
P2 := P1;
while P2 < Buffer.Last
and then (Buffer.Table (P2 + 1) /= ' ' or else
Inside_Nul)
loop
P2 := P2 + 1;
Arg_Ctr := Arg_Ctr + 1;
Arg (Arg_Ctr) := Buffer.Table (P2);
if Buffer.Table (P2) = ASCII.NUL then
Arg_Ctr := Arg_Ctr - 1;
if Inside_Nul then
Inside_Nul := False;
else
Inside_Nul := True;
end if;
end if;
end loop;
Args (Nargs) := new String'(String (Arg (1 .. Arg_Ctr)));
P1 := P2 + 2;
Arg_Ctr := 1;
Arg (Arg_Ctr) := Buffer.Table (P1);
end if;
end loop;
Exec_Path := Locate_Exec_On_Path
(String (Buffer.Table (1 .. Pname_Ptr)));
if Exec_Path = null then
Put_Line (Standard_Error,
"Couldn't locate "
& String (Buffer.Table (1 .. Pname_Ptr)));
raise Error_Exit;
end if;
My_Exit_Status
:= Exit_Status (Spawn (Exec_Path.all, Args (1 .. Nargs)));
end;
raise Normal_Exit;
end if;
exception
when Error_Exit =>
Set_Exit_Status (Failure);
when Normal_Exit =>
Set_Exit_Status (My_Exit_Status);
end GNATCmd;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 5 3 --
-- --
-- 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. --
-- --
-- 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.Storage_Elements;
with System.Unsigned_Types;
with Unchecked_Conversion;
package body System.Pack_53 is
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_53;
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;
function To_Ref is new
Unchecked_Conversion (System.Address, Cluster_Ref);
------------
-- Get_53 --
------------
function Get_53 (Arr : System.Address; N : Natural) return Bits_53 is
C : constant Cluster_Ref := To_Ref (Arr + Bits * Ofs (Uns (N) / 8));
begin
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 Get_53;
------------
-- Set_53 --
------------
procedure Set_53 (Arr : System.Address; N : Natural; E : Bits_53) is
C : constant Cluster_Ref := To_Ref (Arr + Bits * Ofs (Uns (N) / 8));
begin
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 Set_53;
end System.Pack_53;
|
-----------------------------------------------------------------------
-- core-factory -- Factory for Core UI Components
-- Copyright (C) 2009, 2010, 2011, 2012, 2014 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with ASF.Components.Base;
with ASF.Views.Nodes;
with ASF.Views.Nodes.Jsf;
with ASF.Components.Html.Selects;
with ASF.Components.Core.Views;
package body ASF.Components.Core.Factory is
function Create_View return Base.UIComponent_Access;
function Create_ViewAction return Base.UIComponent_Access;
function Create_ViewMetaData return Base.UIComponent_Access;
function Create_ViewParameter return Base.UIComponent_Access;
function Create_Parameter return Base.UIComponent_Access;
function Create_SelectItem return Base.UIComponent_Access;
function Create_SelectItems return Base.UIComponent_Access;
-- ------------------------------
-- Create an UIView component
-- ------------------------------
function Create_View return Base.UIComponent_Access is
begin
return new ASF.Components.Core.Views.UIView;
end Create_View;
-- ------------------------------
-- Create an UIViewAction component
-- ------------------------------
function Create_ViewAction return Base.UIComponent_Access is
begin
return new ASF.Components.Core.Views.UIViewAction;
end Create_ViewAction;
-- ------------------------------
-- Create an UIViewMetaData component
-- ------------------------------
function Create_ViewMetaData return Base.UIComponent_Access is
begin
return new ASF.Components.Core.Views.UIViewMetaData;
end Create_ViewMetaData;
-- ------------------------------
-- Create an UIViewParameter component
-- ------------------------------
function Create_ViewParameter return Base.UIComponent_Access is
begin
return new ASF.Components.Core.Views.UIViewParameter;
end Create_ViewParameter;
-- ------------------------------
-- Create an UIParameter component
-- ------------------------------
function Create_Parameter return Base.UIComponent_Access is
begin
return new ASF.Components.Core.UIParameter;
end Create_Parameter;
-- ------------------------------
-- Create an UISelectItem component
-- ------------------------------
function Create_SelectItem return Base.UIComponent_Access is
begin
return new ASF.Components.Html.Selects.UISelectItem;
end Create_SelectItem;
-- ------------------------------
-- Create an UISelectItems component
-- ------------------------------
function Create_SelectItems return Base.UIComponent_Access is
begin
return new ASF.Components.Html.Selects.UISelectItems;
end Create_SelectItems;
use ASF.Views.Nodes;
URI : aliased constant String := "http://java.sun.com/jsf/core";
ATTRIBUTE_TAG : aliased constant String := "attribute";
CONVERT_DATE_TIME_TAG : aliased constant String := "convertDateTime";
CONVERTER_TAG : aliased constant String := "converter";
FACET_TAG : aliased constant String := "facet";
METADATA_TAG : aliased constant String := "metadata";
PARAM_TAG : aliased constant String := "param";
SELECT_ITEM_TAG : aliased constant String := "selectItem";
SELECT_ITEMS_TAG : aliased constant String := "selectItems";
VALIDATE_LENGTH_TAG : aliased constant String := "validateLength";
VALIDATE_LONG_RANGE_TAG : aliased constant String := "validateLongRange";
VALIDATOR_TAG : aliased constant String := "validator";
VIEW_TAG : aliased constant String := "view";
VIEW_ACTION_TAG : aliased constant String := "viewAction";
VIEW_PARAM_TAG : aliased constant String := "viewParam";
Core_Bindings : aliased constant ASF.Factory.Binding_Array
:= (1 => (Name => ATTRIBUTE_TAG'Access,
Component => null,
Tag => ASF.Views.Nodes.Jsf.Create_Attribute_Tag_Node'Access),
2 => (Name => CONVERT_DATE_TIME_TAG'Access,
Component => null,
Tag => ASF.Views.Nodes.Jsf.Create_Convert_Date_Time_Tag_Node'Access),
3 => (Name => CONVERTER_TAG'Access,
Component => null,
Tag => ASF.Views.Nodes.Jsf.Create_Converter_Tag_Node'Access),
4 => (Name => FACET_TAG'Access,
Component => null,
Tag => ASF.Views.Nodes.Jsf.Create_Facet_Tag_Node'Access),
5 => (Name => METADATA_TAG'Access,
Component => Create_ViewMetaData'Access,
Tag => ASF.Views.Nodes.Jsf.Create_Metadata_Tag_Node'Access),
6 => (Name => PARAM_TAG'Access,
Component => Create_Parameter'Access,
Tag => Create_Component_Node'Access),
7 => (Name => SELECT_ITEM_TAG'Access,
Component => Create_SelectItem'Access,
Tag => Create_Component_Node'Access),
8 => (Name => SELECT_ITEMS_TAG'Access,
Component => Create_SelectItems'Access,
Tag => Create_Component_Node'Access),
9 => (Name => VALIDATE_LENGTH_TAG'Access,
Component => null,
Tag => ASF.Views.Nodes.Jsf.Create_Length_Validator_Tag_Node'Access),
10 => (Name => VALIDATE_LONG_RANGE_TAG'Access,
Component => null,
Tag => ASF.Views.Nodes.Jsf.Create_Range_Validator_Tag_Node'Access),
11 => (Name => VALIDATOR_TAG'Access,
Component => null,
Tag => ASF.Views.Nodes.Jsf.Create_Validator_Tag_Node'Access),
12 => (Name => VIEW_TAG'Access,
Component => Create_View'Access,
Tag => Create_Component_Node'Access),
13 => (Name => VIEW_ACTION_TAG'Access,
Component => Create_ViewAction'Access,
Tag => Create_Component_Node'Access),
14 => (Name => VIEW_PARAM_TAG'Access,
Component => Create_ViewParameter'Access,
Tag => Create_Component_Node'Access)
);
Core_Factory : aliased constant ASF.Factory.Factory_Bindings
:= (URI => URI'Access, Bindings => Core_Bindings'Access);
-- ------------------------------
-- Get the HTML component factory.
-- ------------------------------
function Definition return ASF.Factory.Factory_Bindings_Access is
begin
return Core_Factory'Access;
end Definition;
end ASF.Components.Core.Factory;
|
function IsDivisible(x, y: IN Integer) return Integer is
Result : Integer;
begin
Result := 0;
if y = 0 or else x = 0 then
Result := 0;
else
Result := x / y;
end if;
return Result;
end IsDivisible;
|
-------------------------------------------------------------------------------
-- Copyright (c) 2019, Daniel King
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code must retain the above copyright
-- notice, this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * The name of the copyright holder may not be used to endorse or promote
-- Products derived from this software without specific prior written
-- permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
with Keccak.Generic_MonkeyDuplex;
with Keccak.Types;
-- @summary
-- Generic implementation of the MonkeyWrap construction.
--
-- @description
-- MonkeyWrap is an authenticated encryption scheme built on MonkeyDuplex.
-- Ketje variants are instantiations of this package.
--
-- This API is used as follows:
--
-- 1 Call Init, providing a secret encryption key and a unique
-- "number used once" (nonce).
--
-- 2 Optionally call Update_Auth_Data zero or more times to provide
-- arbitrary-length additional data that is authenticated, but
-- is not encrypted.
--
-- 3 Optionally call Update_Encrypt or Update_Decrypt (but not both)
-- zero or more times to encrypt/decrypt arbitrary-length data.
--
-- 4 Optionally call Extract_Tag or Verify_Tag (but not both)
-- zero or more times to get or check an arbitrary-length
-- authentication tag respectively.
--
-- Ketje supports the concept of sessions, where sequences of messages
-- can be authenticated rather than a single message. The first session is
-- initialised by loading the key and nonce. At the end of each message,
-- the New_Session procedure can be called to begin a new session, which
-- puts the Context back to step 2 above.
generic
Block_Size_Bytes : Positive;
with package MonkeyDuplex is new Keccak.Generic_MonkeyDuplex (<>);
package Keccak.Generic_MonkeyWrap is
Max_Rate_Bits : constant Positive :=
MonkeyDuplex.State_Size_Bits - MonkeyDuplex.Min_Padding_Bits;
-- Maximum possible rate of the underlying MonkeyDuplex.
--
-- E.g. for Keccak-p[1600] this is 1600 - 2 = 1598
Max_Block_Size_Bits : constant Positive := Max_Rate_Bits - 2;
-- MonkeyWrap specification requires: 0 < p <= b - 4
--
-- I.e. the block size does not exceed state size - 4 bits
-- (2 bits padding, 2 bits domain separation).
--
-- E.g. for Keccak-p[1600] this is 1600 - 4 = 1596
pragma Assert (Block_Size_Bytes <= Max_Block_Size_Bits / 8);
type State is (Auth_Data,
Encrypting,
Extracting_Tag,
Decrypting,
Verifying_Tag);
type Context is private;
procedure Init (Ctx : out Context;
Key : in Keccak.Types.Byte_Array;
Nonce : in Keccak.Types.Byte_Array)
with Global => null,
Depends => (Ctx => (Key, Nonce)),
Pre => (Key'Length <= (Max_Rate_Bits / 8) - 3
and then Nonce'Length <= Max_Rate_Bits / 8
and then Key'Length + 3 + Nonce'Length <= Max_Rate_Bits / 8),
Post => State_Of (Ctx) = Auth_Data;
-- Initialise the MonkeyWrap context.
--
-- The combined Key + Nonce length cannot exceed the maximum rate of the
-- underlying MonkeyDuplex instance. For example, for Keccak-p[1600] the
-- maximum Key + Nonce size is 1574 bits.
procedure Update_Auth_Data (Ctx : in out Context;
Data : in Keccak.Types.Byte_Array)
with Global => null,
Depends => (Ctx =>+ Data),
Pre => State_Of (Ctx) = Auth_Data,
Post => State_Of (Ctx) = Auth_Data;
-- Process additional authenticated data (AAD).
--
-- This procedure can be called multiple times to process a large amount
-- of AAD (streaming input).
procedure Update_Encrypt (Ctx : in out Context;
Plaintext : in Keccak.Types.Byte_Array;
Ciphertext : out Keccak.Types.Byte_Array)
with Global => null,
Depends => (Ctx =>+ Plaintext,
Ciphertext =>+ (Ctx, Plaintext)),
Pre => (Plaintext'Length = Ciphertext'Length
and (State_Of (Ctx) in Auth_Data | Encrypting)),
Post => State_Of (Ctx) = Encrypting;
pragma Annotate (GNATprove, False_Positive,
"""Ciphertext"" might not be initialized",
"Ciphertext is fully initialised by end of procedure");
-- Encrypt some plaintext and produce ciphertext.
--
-- This procedure can be called multiple times to process a large amount
-- of streaming ciphertext (streaming encryption).
procedure Update_Decrypt (Ctx : in out Context;
Ciphertext : in Keccak.Types.Byte_Array;
Plaintext : out Keccak.Types.Byte_Array)
with Global => null,
Depends => (Ctx =>+ (Plaintext, Ciphertext),
Plaintext =>+ (Ctx, Ciphertext)),
Pre => (Plaintext'Length = Ciphertext'Length
and (State_Of (Ctx) in Auth_Data | Decrypting)),
Post => State_Of (Ctx) = Decrypting;
pragma Annotate (GNATprove, False_Positive,
"""Plaintext"" might not be initialized",
"Plaintext is fully initialised by end of procedure");
procedure Extract_Tag (Ctx : in out Context;
Tag : out Keccak.Types.Byte_Array)
with Global => null,
Depends => (Ctx =>+ Tag,
Tag =>+ Ctx),
Pre => (State_Of (Ctx) in Auth_Data | Encrypting | Decrypting | Extracting_Tag),
Post => State_Of (Ctx) = Extracting_Tag;
pragma Annotate (GNATprove, False_Positive,
"""Tag"" might not be initialized",
"Tag is fully initialised by end of procedure");
-- Produce the authentication tag.
--
-- This procedure can be called multiple times to produce a tag of
-- arbitrary length (streaming output).
procedure Verify_Tag (Ctx : in out Context;
Tag : in Keccak.Types.Byte_Array;
Valid : out Boolean)
with Global => null,
Depends => (Ctx =>+ Tag,
Valid => (Ctx, Tag)),
Pre => (State_Of (Ctx) in Auth_Data | Encrypting | Decrypting | Verifying_Tag),
Post => State_Of (Ctx) = Verifying_Tag;
-- Verify whether a tag is valid.
--
-- This procedure can be called multiple times to verify artbirarily long tags.
-- At each call, Valid will be set to the result of the encryption so far.
procedure New_Session (Ctx : in out Context)
with Global => null,
Depends => (Ctx =>+ null),
Post => State_Of (Ctx) = Auth_Data;
-- Begin a new session.
--
-- This can be called at any time to start a new session, but is normally
-- called after generating or verify the tag. The ciphertexts and tags
-- generated in all future sessions depends on all previous sessions before
-- it.
function State_Of (Ctx : in Context) return State
with Global => null;
-- Get the current context state.
--
-- The state determines which API functions can be used at a point in time.
-- For example, when the Context is encrypting or decrypting data it is not
-- possible to provide further additional authenticated data.
private
Additional_Bits : constant Positive := MonkeyDuplex.Min_Padding_Bits + 2;
subtype Block_Byte_Count is Natural range 0 .. Block_Size_Bytes;
type Context is record
Inner_Ctx : MonkeyDuplex.Context;
-- The inner MonkeyDuplex instance.
Current_State : State;
-- The current context state.
In_Data : Keccak.Types.Byte_Array (Block_Byte_Count);
-- During AAD, this stores the last partial/full block of AAD.
--
-- During encryption/decryption, this stores the previous plaintext block.
In_Data_Length : Block_Byte_Count;
-- During AAD, this is the size of the pending data in 'In_Data'.
--
-- During Encryption/Decryption, this is the number of pending plaintext
-- bytes that are pending to be processed into MonkeyDuplex.
-- The number of remaining Keystream bytes is Block_Size - In_Data_Length.
--
-- During tag phases, this is the number of tag bytes that have been
-- consumed in the Keystream buffer.
Keystream : Keccak.Types.Byte_Array (Block_Byte_Count);
-- A block of keystream bits.
--
-- During encryption/decryption phases this stores the keystream data.
--
-- During the tag extraction/verification phases this stores remainder
-- tag bytes.
Tag_Accumulator : Keccak.Types.Byte;
-- An accumulator used during constant-time tag verification.
--
-- This starts of as zero, and during comparison the XOR of each
-- byte is ORed into this value, thereby accumulating differences.
-- If, at the end of verification this value is zero then the
-- expected tag and actual tag are identical. Otherwise, non-zero
-- values indicate at least 1 bit is different between the two
-- tags.
end record
with Predicate =>
(In_Data_Length <= Block_Size_Bytes
and Block_Size_Bytes = (MonkeyDuplex.Rate_Of (Inner_Ctx) - Additional_Bits) / 8
and (MonkeyDuplex.Rate_Of (Inner_Ctx) - Additional_Bits) mod 8 = 0);
function State_Of (Ctx : in Context) return State is
(Ctx.Current_State);
end Keccak.Generic_MonkeyWrap;
|
------------------------------------------------------------------------------
-- --
-- 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 Serial_IO; use Serial_IO;
with Ada.Synchronous_Task_Control; use Ada.Synchronous_Task_Control;
package Message_Buffers is
pragma Elaborate_Body;
type Message (Physical_Size : Positive) is tagged limited private;
function Content (This : Message) return String with Inline;
function Length (This : Message) return Natural with Inline;
function Content_At (This : Message; Index : Positive) return Character with
Pre => Index <= Length (This),
Inline;
procedure Clear (This : in out Message) with
Post => Length (This) = 0 and Content (This) = "",
Inline;
procedure Append (This : in out Message; Value : Character) with
Pre => Length (This) < This.Physical_Size,
Post => Content_At (This, Length (This)) = Value,
Inline;
procedure Set (This : in out Message; To : String) with
Pre => To'Length <= This.Physical_Size,
Post => Length (This) = To'Length and Content (This) = To,
Inline;
procedure Set (This : in out Message; To : Character) with
Post => Length (This) = 1 and Content_At (This, 1) = To,
Inline;
procedure Set_Terminator (This : in out Message; To : Character) with
Post => Terminator (This) = To,
Inline;
-- Specify the character that signals the end of an incoming message
-- from the sender's point of view, ie the "logical" end of a message,
-- as opposed to the physical capacity.
function Terminator (This : Message) return Character with Inline;
-- The logical end of message character (eg, CR). Either the value of a
-- prior call to Set_Terminator, or the character Nul if no terminator has
-- ever been set. The terminator character, if received, is not stored in
-- the message into which characters are being received.
procedure Await_Transmission_Complete (This : in out Message) with Inline;
-- Used for non-blocking output, to wait until the last char has been sent.
procedure Await_Reception_Complete (This : in out Message) with Inline;
-- Used for non-blocking input, to wait until the last char has been
-- received.
procedure Signal_Transmission_Complete (This : in out Message) with Inline;
procedure Signal_Reception_Complete (This : in out Message) with Inline;
procedure Note_Error (This : in out Message; Condition : Error_Conditions)
with Inline;
function Errors_Detected (This : Message) return Error_Conditions with Inline;
procedure Clear_Errors (This : in out Message) with Inline;
function Has_Error (This : Message; Condition : Error_Conditions)
return Boolean with Inline;
private
type Message (Physical_Size : Positive) is tagged limited record
Content : String (1 .. Physical_Size);
Length : Natural := 0;
Reception_Complete : Suspension_Object;
Transmission_Complete : Suspension_Object;
Terminator : Character := ASCII.NUL;
Error_Status : Error_Conditions := No_Error_Detected;
end record;
end Message_Buffers;
|
-- C41303V.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT THE NOTATION L.ALL IS ALLOWED IF L IS THE NAME OF AN
-- ACCESS OBJECT DESIGNATING A RECORD, AN ARRAY, A SCALAR, OR
-- ANOTHER ACCESS OBJECT.
-- CHECK THAT IF A IS AN IDENTIFIER DENOTING AN ACCESS OBJECT WHICH
-- IN TURN DESIGNATES AN ACCESS OBJECT, THE FORM A.ALL.ALL IS
-- ACCEPTED.
-- THIS OBJECTIVE IS COVERED IN SEVERAL TESTS. IN THE FOLLOWING DIAGRAM,
-- THE PORTION COVERED BY THE CURRENT TEST IS MARKED BY 'X' .
-- || ASSIGNMT | PROC. PARAMETERS
-- || ():= :=() | IN OUT IN OUT
-- ========================||=============|====================
-- ACC REC || |
-- --------------||-------------|--------------------
-- 1 '.ALL' ACC ARR || |
-- --------------||-------------|--------------------
-- ACC SCLR || |
-- ========================||=============|====================
-- ACC ACC REC || |
-- --------------||-------------|--------------------
-- 1 '.ALL' ACC ACC ARR || |
-- --------------||-------------|--------------------
-- ACC ACC SCLR || |
-- ========================||=============|====================
-- ACC ACC REC || |
-- --------------||-------------|--------------------
-- 2 '.ALL' ACC ACC ARR || | XXXXXXXXX
-- --------------||-------------|--------------------
-- ACC ACC SCLR || |
-- ============================================================
-- RM 1/29/82
-- SPS 12/2/82
WITH REPORT;
USE REPORT;
PROCEDURE C41303V IS
BEGIN
TEST ( "C41303V" , "CHECK THAT IF A IS AN IDENTIFIER DENOTING" &
" AN ACCESS OBJECT WHICH IN TURN DESIGNATES" &
" AN ACCESS OBJECT, THE FORM A.ALL.ALL IS" &
" ACCEPTED" );
-------------------------------------------------------------------
--------------- ACCESS TO ACCESS TO ARRAY -----------------------
DECLARE
TYPE ARR IS ARRAY(1..2) OF BOOLEAN ;
ARR_CONST : ARR := ( TRUE , FALSE );
ARR_VAR : ARR := ARR_CONST ;
ARR_VAR0 : ARR := ARR_CONST ;
ARR_CONST2 : ARR := ( FALSE , TRUE );
TYPE ACCARR IS ACCESS ARR ;
TYPE ACC_ACCARR IS ACCESS ACCARR ;
ACC_ACCARR_VAR : ACC_ACCARR := NEW ACCARR'(
NEW ARR'( ARR_CONST2 )
);
ACC_ACCARR_VAR0 : ACC_ACCARR := NEW ACCARR'(
NEW ARR'( ARR_CONST2 )
);
PROCEDURE R_ASSIGN( R_IN : IN ARR ;
R_INOUT : IN OUT ARR ) IS
BEGIN
ARR_VAR := R_IN ;
ARR_VAR0 := R_INOUT ;
END ;
PROCEDURE L_ASSIGN( L_OUT : OUT ARR ;
L_INOUT : IN OUT ARR ) IS
BEGIN
L_OUT := ARR_CONST ;
L_INOUT := ARR_CONST ;
END ;
BEGIN
R_ASSIGN( ACC_ACCARR_VAR.ALL.ALL , ACC_ACCARR_VAR0.ALL.ALL );
IF ARR_VAR /= ARR_CONST2
THEN
FAILED( "ACC2 ARRAY, RIGHT SIDE (1), WRONG VAL." );
END IF;
IF ARR_VAR0 /= ARR_CONST2
THEN
FAILED( "ACC2 ARRAY, RIGHT SIDE (2), WRONG VAL." );
END IF;
L_ASSIGN( ACC_ACCARR_VAR.ALL.ALL , ACC_ACCARR_VAR0.ALL.ALL );
IF ( TRUE , FALSE ) /= ACC_ACCARR_VAR.ALL.ALL
THEN
FAILED( "ACC2 ARRAY, LEFT SIDE (1), WRONG VAL." );
END IF;
IF ( TRUE , FALSE ) /= ACC_ACCARR_VAR0.ALL.ALL
THEN
FAILED( "ACC2 ARRAY, LEFT SIDE (2), WRONG VAL." );
END IF;
END ;
-------------------------------------------------------------------
RESULT;
END C41303V;
|
<Diagramm>
<AdditionalSQLCode>
<SQLCode></SQLCode>
</AdditionalSQLCode>
<Colors>
<Anzahl>23</Anzahl>
<Color0>
<B>255</B>
<G>0</G>
<Name>blau</Name>
<R>0</R>
</Color0>
<Color1>
<B>221</B>
<G>212</G>
<Name>blaugrau</Name>
<R>175</R>
</Color1>
<Color10>
<B>192</B>
<G>192</G>
<Name>hellgrau</Name>
<R>192</R>
</Color10>
<Color11>
<B>255</B>
<G>0</G>
<Name>kamesinrot</Name>
<R>255</R>
</Color11>
<Color12>
<B>0</B>
<G>200</G>
<Name>orange</Name>
<R>255</R>
</Color12>
<Color13>
<B>255</B>
<G>247</G>
<Name>pastell-blau</Name>
<R>211</R>
</Color13>
<Color14>
<B>186</B>
<G>245</G>
<Name>pastell-gelb</Name>
<R>255</R>
</Color14>
<Color15>
<B>234</B>
<G>255</G>
<Name>pastell-gr&uuml;n</Name>
<R>211</R>
</Color15>
<Color16>
<B>255</B>
<G>211</G>
<Name>pastell-lila</Name>
<R>244</R>
</Color16>
<Color17>
<B>191</B>
<G>165</G>
<Name>pastell-rot</Name>
<R>244</R>
</Color17>
<Color18>
<B>175</B>
<G>175</G>
<Name>pink</Name>
<R>255</R>
</Color18>
<Color19>
<B>0</B>
<G>0</G>
<Name>rot</Name>
<R>255</R>
</Color19>
<Color2>
<B>61</B>
<G>125</G>
<Name>braun</Name>
<R>170</R>
</Color2>
<Color20>
<B>0</B>
<G>0</G>
<Name>schwarz</Name>
<R>0</R>
</Color20>
<Color21>
<B>255</B>
<G>255</G>
<Name>t&uuml;rkis</Name>
<R>0</R>
</Color21>
<Color22>
<B>255</B>
<G>255</G>
<Name>wei&szlig;</Name>
<R>255</R>
</Color22>
<Color3>
<B>64</B>
<G>64</G>
<Name>dunkelgrau</Name>
<R>64</R>
</Color3>
<Color4>
<B>84</B>
<G>132</G>
<Name>dunkelgr&uuml;n</Name>
<R>94</R>
</Color4>
<Color5>
<B>0</B>
<G>255</G>
<Name>gelb</Name>
<R>255</R>
</Color5>
<Color6>
<B>0</B>
<G>225</G>
<Name>goldgelb</Name>
<R>255</R>
</Color6>
<Color7>
<B>128</B>
<G>128</G>
<Name>grau</Name>
<R>128</R>
</Color7>
<Color8>
<B>0</B>
<G>255</G>
<Name>gr&uuml;n</Name>
<R>0</R>
</Color8>
<Color9>
<B>255</B>
<G>212</G>
<Name>hellblau</Name>
<R>191</R>
</Color9>
</Colors>
<ComplexIndices>
<IndexCount>0</IndexCount>
</ComplexIndices>
<DataSource>
<Import>
<DBName></DBName>
<Description></Description>
<Domains>false</Domains>
<Driver></Driver>
<Name></Name>
<Referenzen>false</Referenzen>
<User></User>
</Import>
<Update>
<DBMode>POSTGRESQL</DBMode>
<DBName>jdbc:postgresql://mykene/TEST_OLI_ISIS</DBName>
<Description></Description>
<DomainFaehig>false</DomainFaehig>
<Driver>org.postgresql.Driver</Driver>
<FkNotNullBeachten>false</FkNotNullBeachten>
<Name></Name>
<ReferenzenSetzen>false</ReferenzenSetzen>
<User>op1</User>
</Update>
</DataSource>
<DefaultComment>
<Anzahl>0</Anzahl>
</DefaultComment>
<Domains>
<Anzahl>5</Anzahl>
<Domain0>
<Datatype>4</Datatype>
<History></History>
<Initialwert>0</Initialwert>
<Kommentar></Kommentar>
<Length>0</Length>
<NKS>0</NKS>
<Name>Boolean</Name>
</Domain0>
<Domain1>
<Datatype>4</Datatype>
<History></History>
<Initialwert>0</Initialwert>
<Kommentar></Kommentar>
<Length>0</Length>
<NKS>0</NKS>
<Name>Ident</Name>
</Domain1>
<Domain2>
<Datatype>4</Datatype>
<History></History>
<Initialwert>42</Initialwert>
<Kommentar></Kommentar>
<Length>0</Length>
<NKS>0</NKS>
<Name>Integer</Name>
</Domain2>
<Domain3>
<Datatype>-5</Datatype>
<History></History>
<Initialwert>NULL</Initialwert>
<Kommentar></Kommentar>
<Length>0</Length>
<NKS>0</NKS>
<Name>PTimestamp</Name>
</Domain3>
<Domain4>
<Datatype>12</Datatype>
<History></History>
<Initialwert>NULL</Initialwert>
<Kommentar></Kommentar>
<Length>20</Length>
<NKS>0</NKS>
<Name>Token</Name>
</Domain4>
</Domains>
<Factories>
<Object>archimedes.legacy.scheme.DefaultObjectFactory</Object>
</Factories>
<Pages>
<PerColumn>5</PerColumn>
<PerRow>10</PerRow>
</Pages>
<Parameter>
<AdditionalSQLScriptListener></AdditionalSQLScriptListener>
<Applicationname></Applicationname>
<AufgehobeneAusblenden>false</AufgehobeneAusblenden>
<Autor>E.Presley</Autor>
<Basepackagename>com.moppelsoft.project</Basepackagename>
<CodeFactoryClassName></CodeFactoryClassName>
<Codebasispfad>.\</Codebasispfad>
<DBVersionDBVersionColumn></DBVersionDBVersionColumn>
<DBVersionDescriptionColumn></DBVersionDescriptionColumn>
<DBVersionTablename></DBVersionTablename>
<History></History>
<Kommentar>&lt;null&gt;</Kommentar>
<Name>TestDiagram (FOR SCHEMA TESTS)</Name>
<PflichtfelderMarkieren>false</PflichtfelderMarkieren>
<ReferenzierteSpaltenAnzeigen>true</ReferenzierteSpaltenAnzeigen>
<SchemaName>TestSchema</SchemaName>
<Schriftgroessen>
<Tabelleninhalte>12</Tabelleninhalte>
<Ueberschriften>24</Ueberschriften>
<Untertitel>12</Untertitel>
</Schriftgroessen>
<Scripte>
<AfterWrite>&lt;null&gt;</AfterWrite>
</Scripte>
<TechnischeFelderAusgrauen>true</TechnischeFelderAusgrauen>
<UdschebtiBaseClassName></UdschebtiBaseClassName>
<Version>1</Version>
<Versionsdatum>07.01.2011</Versionsdatum>
<Versionskommentar>&lt;null&gt;</Versionskommentar>
</Parameter>
<Sequences>
<Count>0</Count>
</Sequences>
<Stereotype>
<Anzahl>4</Anzahl>
<Stereotype0>
<DoNotPrint>false</DoNotPrint>
<HideTable>false</HideTable>
<History></History>
<Kommentar>-/-</Kommentar>
<Name>A</Name>
</Stereotype0>
<Stereotype1>
<DoNotPrint>false</DoNotPrint>
<HideTable>false</HideTable>
<History></History>
<Kommentar>-/-</Kommentar>
<Name>B</Name>
</Stereotype1>
<Stereotype2>
<DoNotPrint>false</DoNotPrint>
<HideTable>false</HideTable>
<History></History>
<Kommentar>-/-</Kommentar>
<Name>C</Name>
</Stereotype2>
<Stereotype3>
<DoNotPrint>false</DoNotPrint>
<HideTable>false</HideTable>
<History></History>
<Kommentar>-/-</Kommentar>
<Name>D</Name>
</Stereotype3>
</Stereotype>
<Tabellen>
<Anzahl>5</Anzahl>
<Tabelle0>
<Aufgehoben>false</Aufgehoben>
<Codegenerator>
<AuswahlMembers>
<Anzahl>0</Anzahl>
</AuswahlMembers>
<CompareMembers>
<Anzahl>0</Anzahl>
</CompareMembers>
<Equalsmembers>
<Anzahl>0</Anzahl>
</Equalsmembers>
<HashCodeMembers>
<Anzahl>0</Anzahl>
</HashCodeMembers>
<NReferenzen>
<Anzahl>0</Anzahl>
</NReferenzen>
<OrderMembers>
<Anzahl>0</Anzahl>
</OrderMembers>
<ToComboStringMembers>
<Anzahl>0</Anzahl>
</ToComboStringMembers>
<ToStringMembers>
<Anzahl>0</Anzahl>
</ToStringMembers>
</Codegenerator>
<Farben>
<Hintergrund>wei&szlig;</Hintergrund>
<Schrift>schwarz</Schrift>
</Farben>
<FirstGenerationDone>false</FirstGenerationDone>
<History></History>
<InDevelopment>false</InDevelopment>
<Kommentar></Kommentar>
<NMRelation>false</NMRelation>
<Name>TableClass</Name>
<Panels>
<Anzahl>1</Anzahl>
<Panel0>
<PanelClass></PanelClass>
<PanelNumber>0</PanelNumber>
<TabMnemonic>1</TabMnemonic>
<TabTitle>1.Daten</TabTitle>
<TabToolTipText>Hier können Sie die Daten des Objekt warten</TabToolTipText>
</Panel0>
</Panels>
<Spalten>
<Anzahl>3</Anzahl>
<Codegenerator>
<ActiveInApplication>false</ActiveInApplication>
<Codegeneratoroptionen></Codegeneratoroptionen>
<Codeverzeichnis>.</Codeverzeichnis>
<Codieren>true</Codieren>
<DynamicCode>true</DynamicCode>
<Inherited>false</Inherited>
<Kontextname></Kontextname>
<UniqueFormula></UniqueFormula>
</Codegenerator>
<Spalte0>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Boolean</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Active</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte0>
<Spalte1>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Integer</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Counter</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte1>
<Spalte2>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Ident</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>true</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Reference</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<Referenz>
<Direction0>RIGHT</Direction0>
<Direction1>LEFT</Direction1>
<Offset0>25</Offset0>
<Offset1>25</Offset1>
<Spalte>Id</Spalte>
<Tabelle>AnotherTableClass</Tabelle>
<Views>
<Anzahl>2</Anzahl>
<View0>
<Direction0>LEFT</Direction0>
<Direction1>UP</Direction1>
<Name>Subview</Name>
<Offset0>25</Offset0>
<Offset1>25</Offset1>
<Points>
<Anzahl>2</Anzahl>
<Point1>
<X>475</X>
<Y>100</Y>
</Point1>
<Point2>
<X>425</X>
<Y>150</Y>
</Point2>
</Points>
</View0>
<View1>
<Direction0>RIGHT</Direction0>
<Direction1>LEFT</Direction1>
<Name>Main</Name>
<Offset0>25</Offset0>
<Offset1>25</Offset1>
<Points>
<Anzahl>0</Anzahl>
</Points>
</View1>
</Views>
</Referenz>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte2>
</Spalten>
<Stereotype>
<Anzahl>2</Anzahl>
</Stereotype>
<Stereotype0>A</Stereotype0>
<Stereotype1>B</Stereotype1>
<Views>
<Anzahl>2</Anzahl>
<View0>
<Name>Subview</Name>
<X>725</X>
<Y>75</Y>
</View0>
<View1>
<Name>Main</Name>
<X>125</X>
<Y>125</Y>
</View1>
</Views>
</Tabelle0>
<Tabelle1>
<Aufgehoben>false</Aufgehoben>
<Codegenerator>
<AuswahlMembers>
<Anzahl>0</Anzahl>
</AuswahlMembers>
<CompareMembers>
<Anzahl>0</Anzahl>
</CompareMembers>
<Equalsmembers>
<Anzahl>0</Anzahl>
</Equalsmembers>
<HashCodeMembers>
<Anzahl>0</Anzahl>
</HashCodeMembers>
<NReferenzen>
<Anzahl>0</Anzahl>
</NReferenzen>
<OrderMembers>
<Anzahl>0</Anzahl>
</OrderMembers>
<ToComboStringMembers>
<Anzahl>0</Anzahl>
</ToComboStringMembers>
<ToStringMembers>
<Anzahl>0</Anzahl>
</ToStringMembers>
</Codegenerator>
<Farben>
<Hintergrund>wei&szlig;</Hintergrund>
<Schrift>schwarz</Schrift>
</Farben>
<FirstGenerationDone>false</FirstGenerationDone>
<History></History>
<InDevelopment>false</InDevelopment>
<Kommentar></Kommentar>
<NMRelation>false</NMRelation>
<Name>AnotherTableClass</Name>
<Panels>
<Anzahl>1</Anzahl>
<Panel0>
<PanelClass></PanelClass>
<PanelNumber>0</PanelNumber>
<TabMnemonic>1</TabMnemonic>
<TabTitle>1.Daten</TabTitle>
<TabToolTipText>Hier können Sie die Daten des Objekt warten</TabToolTipText>
</Panel0>
</Panels>
<Spalten>
<Anzahl>4</Anzahl>
<Codegenerator>
<ActiveInApplication>false</ActiveInApplication>
<Codegeneratoroptionen></Codegeneratoroptionen>
<Codeverzeichnis>.</Codeverzeichnis>
<Codieren>true</Codieren>
<DynamicCode>true</DynamicCode>
<Inherited>false</Inherited>
<Kontextname></Kontextname>
<UniqueFormula></UniqueFormula>
</Codegenerator>
<Spalte0>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>true</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Ident</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Id</Name>
<NotNull>true</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>true</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte0>
<Spalte1>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>PTimestamp</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Timestamp</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte1>
<Spalte2>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Token</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue>""</IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Token</Name>
<NotNull>true</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte2>
<Spalte3>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Ident</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>true</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Reference</Name>
<NotNull>true</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<Referenz>
<Direction0>RIGHT</Direction0>
<Direction1>UP</Direction1>
<Offset0>25</Offset0>
<Offset1>250</Offset1>
<Spalte>Id</Spalte>
<Tabelle>ReferencedTableClass</Tabelle>
<Views>
<Anzahl>2</Anzahl>
<View0>
<Direction0>RIGHT</Direction0>
<Direction1>UP</Direction1>
<Name>Subview</Name>
<Offset0>25</Offset0>
<Offset1>31</Offset1>
<Points>
<Anzahl>2</Anzahl>
<Point1>
<X>675</X>
<Y>350</Y>
</Point1>
<Point2>
<X>700</X>
<Y>375</Y>
</Point2>
</Points>
</View0>
<View1>
<Direction0>RIGHT</Direction0>
<Direction1>UP</Direction1>
<Name>Main</Name>
<Offset0>25</Offset0>
<Offset1>250</Offset1>
<Points>
<Anzahl>2</Anzahl>
<Point1>
<X>800</X>
<Y>150</Y>
</Point1>
<Point2>
<X>850</X>
<Y>200</Y>
</Point2>
</Points>
</View1>
</Views>
</Referenz>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte3>
</Spalten>
<Stereotype>
<Anzahl>1</Anzahl>
</Stereotype>
<Stereotype0>A</Stereotype0>
<Views>
<Anzahl>2</Anzahl>
<View0>
<Name>Subview</Name>
<X>400</X>
<Y>325</Y>
</View0>
<View1>
<Name>Main</Name>
<X>400</X>
<Y>125</Y>
</View1>
</Views>
</Tabelle1>
<Tabelle2>
<Aufgehoben>false</Aufgehoben>
<Codegenerator>
<AuswahlMembers>
<Anzahl>0</Anzahl>
</AuswahlMembers>
<CompareMembers>
<Anzahl>0</Anzahl>
</CompareMembers>
<Equalsmembers>
<Anzahl>0</Anzahl>
</Equalsmembers>
<HashCodeMembers>
<Anzahl>0</Anzahl>
</HashCodeMembers>
<NReferenzen>
<Anzahl>0</Anzahl>
</NReferenzen>
<OrderMembers>
<Anzahl>0</Anzahl>
</OrderMembers>
<ToComboStringMembers>
<Anzahl>0</Anzahl>
</ToComboStringMembers>
<ToStringMembers>
<Anzahl>0</Anzahl>
</ToStringMembers>
</Codegenerator>
<Farben>
<Hintergrund>wei&szlig;</Hintergrund>
<Schrift>schwarz</Schrift>
</Farben>
<FirstGenerationDone>false</FirstGenerationDone>
<History></History>
<InDevelopment>false</InDevelopment>
<Kommentar></Kommentar>
<NMRelation>false</NMRelation>
<Name>UpdateMethodTableClass</Name>
<Panels>
<Anzahl>1</Anzahl>
<Panel0>
<PanelClass></PanelClass>
<PanelNumber>0</PanelNumber>
<TabMnemonic>1</TabMnemonic>
<TabTitle>1.Daten</TabTitle>
<TabToolTipText>Hier können Sie die Daten des Objekt warten</TabToolTipText>
</Panel0>
</Panels>
<Spalten>
<Anzahl>6</Anzahl>
<Codegenerator>
<ActiveInApplication>false</ActiveInApplication>
<Codegeneratoroptionen></Codegeneratoroptionen>
<Codeverzeichnis>.</Codeverzeichnis>
<Codieren>true</Codieren>
<DynamicCode>true</DynamicCode>
<Inherited>false</Inherited>
<Kontextname></Kontextname>
<UniqueFormula></UniqueFormula>
</Codegenerator>
<Spalte0>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Boolean</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue>1</IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Active</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte0>
<Spalte1>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Integer</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Counter</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte1>
<Spalte2>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Boolean</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Deleted</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>true</TechnicalField>
<Unique>false</Unique>
</Spalte2>
<Spalte3>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>PTimestamp</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Timestamp</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte3>
<Spalte4>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Token</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Token</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte4>
<Spalte5>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Ident</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>true</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Reference</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<Referenz>
<Direction0>RIGHT</Direction0>
<Direction1>DOWN</Direction1>
<Offset0>25</Offset0>
<Offset1>25</Offset1>
<Spalte>Id</Spalte>
<Tabelle>AnotherTableClass</Tabelle>
<Views>
<Anzahl>2</Anzahl>
<View0>
<Direction0>UP</Direction0>
<Direction1>LEFT</Direction1>
<Name>Subview</Name>
<Offset0>25</Offset0>
<Offset1>25</Offset1>
<Points>
<Anzahl>3</Anzahl>
<Point1>
<X>150</X>
<Y>425</Y>
</Point1>
<Point2>
<X>175</X>
<Y>375</Y>
</Point2>
<Point3>
<X>225</X>
<Y>350</Y>
</Point3>
</Points>
</View0>
<View1>
<Direction0>RIGHT</Direction0>
<Direction1>DOWN</Direction1>
<Name>Main</Name>
<Offset0>25</Offset0>
<Offset1>25</Offset1>
<Points>
<Anzahl>0</Anzahl>
</Points>
</View1>
</Views>
</Referenz>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte5>
</Spalten>
<Stereotype>
<Anzahl>1</Anzahl>
</Stereotype>
<Stereotype0>C</Stereotype0>
<Views>
<Anzahl>2</Anzahl>
<View0>
<Name>Subview</Name>
<X>125</X>
<Y>575</Y>
</View0>
<View1>
<Name>Main</Name>
<X>125</X>
<Y>350</Y>
</View1>
</Views>
</Tabelle2>
<Tabelle3>
<Aufgehoben>false</Aufgehoben>
<Codegenerator>
<AuswahlMembers>
<Anzahl>0</Anzahl>
</AuswahlMembers>
<CompareMembers>
<Anzahl>0</Anzahl>
</CompareMembers>
<Equalsmembers>
<Anzahl>0</Anzahl>
</Equalsmembers>
<HashCodeMembers>
<Anzahl>0</Anzahl>
</HashCodeMembers>
<NReferenzen>
<Anzahl>1</Anzahl>
<NReferenz0>
<Alterable>true</Alterable>
<Extensible>true</Extensible>
<Id>1</Id>
<Panel>1</Panel>
<PanelType>auswählbar</PanelType>
<PermitCreate>true</PermitCreate>
<Spalte>Reference</Spalte>
<Tabelle>AnotherTableClass</Tabelle>
</NReferenz0>
</NReferenzen>
<OrderMembers>
<Anzahl>0</Anzahl>
</OrderMembers>
<ToComboStringMembers>
<Anzahl>0</Anzahl>
</ToComboStringMembers>
<ToStringMembers>
<Anzahl>0</Anzahl>
</ToStringMembers>
</Codegenerator>
<Farben>
<Hintergrund>rot</Hintergrund>
<Schrift>dunkelgrau</Schrift>
</Farben>
<FirstGenerationDone>false</FirstGenerationDone>
<History></History>
<InDevelopment>true</InDevelopment>
<Kommentar></Kommentar>
<NMRelation>true</NMRelation>
<Name>ReferencedTableClass</Name>
<Panels>
<Anzahl>2</Anzahl>
<Panel0>
<PanelClass></PanelClass>
<PanelNumber>0</PanelNumber>
<TabMnemonic>1</TabMnemonic>
<TabTitle>1.Daten</TabTitle>
<TabToolTipText>Hier können Sie die Daten des Objekt warten</TabToolTipText>
</Panel0>
<Panel1>
<PanelClass>PanelClass</PanelClass>
<PanelNumber>1</PanelNumber>
<TabMnemonic>N</TabMnemonic>
<TabTitle>2. Noch ein Panel</TabTitle>
<TabToolTipText>Und noch ein Panel</TabToolTipText>
</Panel1>
</Panels>
<Spalten>
<Anzahl>3</Anzahl>
<Codegenerator>
<ActiveInApplication>false</ActiveInApplication>
<Codegeneratoroptionen></Codegeneratoroptionen>
<Codeverzeichnis>.</Codeverzeichnis>
<Codieren>true</Codieren>
<DynamicCode>true</DynamicCode>
<Inherited>false</Inherited>
<Kontextname></Kontextname>
<UniqueFormula></UniqueFormula>
</Codegenerator>
<Spalte0>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>true</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Ident</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Id</Name>
<NotNull>true</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>true</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte0>
<Spalte1>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Token</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>false</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>Token</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte1>
<Spalte2>
<AlterInBatch>true</AlterInBatch>
<Aufgehoben>true</Aufgehoben>
<CanBeReferenced>true</CanBeReferenced>
<Disabled>true</Disabled>
<Domain>PTimestamp</Domain>
<Editordescriptor>
<Editormember>true</Editormember>
<LabelText>Dingsbums</LabelText>
<MaxCharacters>4711</MaxCharacters>
<Mnemonic>D</Mnemonic>
<Position>42</Position>
<ReferenceWeight>massiv</ReferenceWeight>
<RessourceIdentifier>DingsbumsEingabefeld</RessourceIdentifier>
<ToolTipText>la la la bla bla bla</ToolTipText>
</Editordescriptor>
<ForeignKey>true</ForeignKey>
<Global>true</Global>
<GlobalId>true</GlobalId>
<HideReference>false</HideReference>
<History>;op</History>
<IndexSearchMember>true</IndexSearchMember>
<Indexed>true</Indexed>
<IndividualDefaultValue>20130403084700</IndividualDefaultValue>
<Kodiert>true</Kodiert>
<Kommentar>:o)</Kommentar>
<Konsistenz>
<Writeablemember>true</Writeablemember>
</Konsistenz>
<LastModificationField>true</LastModificationField>
<ListItemField>true</ListItemField>
<Name>NEU</Name>
<NotNull>true</NotNull>
<PanelNumber>1</PanelNumber>
<Parameter>laber</Parameter>
<PrimaryKey>true</PrimaryKey>
<Referenz>
<Direction0>UP</Direction0>
<Direction1>RIGHT</Direction1>
<Offset0>75</Offset0>
<Offset1>50</Offset1>
<Spalte>Id</Spalte>
<Tabelle>AnotherTableClass</Tabelle>
<Views>
<Anzahl>2</Anzahl>
<View0>
<Direction0>LEFT</Direction0>
<Direction1>DOWN</Direction1>
<Name>Subview</Name>
<Offset0>25</Offset0>
<Offset1>25</Offset1>
<Points>
<Anzahl>2</Anzahl>
<Point1>
<X>475</X>
<Y>575</Y>
</Point1>
<Point2>
<X>425</X>
<Y>525</Y>
</Point2>
</Points>
</View0>
<View1>
<Direction0>UP</Direction0>
<Direction1>RIGHT</Direction1>
<Name>Main</Name>
<Offset0>75</Offset0>
<Offset1>50</Offset1>
<Points>
<Anzahl>1</Anzahl>
<Point1>
<X>675</X>
<Y>175</Y>
</Point1>
</Points>
</View1>
</Views>
</Referenz>
<RemovedStateField>true</RemovedStateField>
<TechnicalField>true</TechnicalField>
<Unique>true</Unique>
</Spalte2>
</Spalten>
<Stereotype>
<Anzahl>0</Anzahl>
</Stereotype>
<Views>
<Anzahl>2</Anzahl>
<View0>
<Name>Subview</Name>
<X>675</X>
<Y>550</Y>
</View0>
<View1>
<Name>Main</Name>
<X>600</X>
<Y>400</Y>
</View1>
</Views>
</Tabelle3>
<Tabelle4>
<Aufgehoben>false</Aufgehoben>
<Codegenerator>
<AuswahlMembers>
<Anzahl>0</Anzahl>
</AuswahlMembers>
<CompareMembers>
<Anzahl>0</Anzahl>
</CompareMembers>
<Equalsmembers>
<Anzahl>0</Anzahl>
</Equalsmembers>
<HashCodeMembers>
<Anzahl>0</Anzahl>
</HashCodeMembers>
<NReferenzen>
<Anzahl>0</Anzahl>
</NReferenzen>
<OrderMembers>
<Anzahl>0</Anzahl>
</OrderMembers>
<ToComboStringMembers>
<Anzahl>0</Anzahl>
</ToComboStringMembers>
<ToStringMembers>
<Anzahl>0</Anzahl>
</ToStringMembers>
</Codegenerator>
<Farben>
<Hintergrund>wei&szlig;</Hintergrund>
<Schrift>schwarz</Schrift>
</Farben>
<FirstGenerationDone>false</FirstGenerationDone>
<History></History>
<InDevelopment>true</InDevelopment>
<Kommentar></Kommentar>
<NMRelation>false</NMRelation>
<Name>Tabelle5</Name>
<Panels>
<Anzahl>1</Anzahl>
<Panel0>
<PanelClass></PanelClass>
<PanelNumber>0</PanelNumber>
<TabMnemonic>1</TabMnemonic>
<TabTitle>1.Daten</TabTitle>
<TabToolTipText>Hier können Sie die Daten des Objekt warten</TabToolTipText>
</Panel0>
</Panels>
<Spalten>
<Anzahl>2</Anzahl>
<Codegenerator>
<ActiveInApplication>false</ActiveInApplication>
<Codegeneratoroptionen></Codegeneratoroptionen>
<Codeverzeichnis>.</Codeverzeichnis>
<Codieren>true</Codieren>
<DynamicCode>true</DynamicCode>
<Inherited>false</Inherited>
<Kontextname></Kontextname>
<UniqueFormula></UniqueFormula>
</Codegenerator>
<Spalte0>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Integer</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>true</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>neu</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<Referenz>
<Direction0>UP</Direction0>
<Direction1>DOWN</Direction1>
<Offset0>50</Offset0>
<Offset1>100</Offset1>
<Spalte>Id</Spalte>
<Tabelle>AnotherTableClass</Tabelle>
<Views>
<Anzahl>1</Anzahl>
<View0>
<Direction0>UP</Direction0>
<Direction1>DOWN</Direction1>
<Name>Main</Name>
<Offset0>50</Offset0>
<Offset1>100</Offset1>
<Points>
<Anzahl>4</Anzahl>
<Point1>
<X>500</X>
<Y>600</Y>
</Point1>
<Point2>
<X>450</X>
<Y>550</Y>
</Point2>
<Point3>
<X>450</X>
<Y>350</Y>
</Point3>
<Point4>
<X>500</X>
<Y>300</Y>
</Point4>
</Points>
</View0>
</Views>
</Referenz>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte0>
<Spalte1>
<AlterInBatch>false</AlterInBatch>
<Aufgehoben>false</Aufgehoben>
<CanBeReferenced>false</CanBeReferenced>
<Disabled>false</Disabled>
<Domain>Ident</Domain>
<Editordescriptor>
<Editormember>false</Editormember>
<LabelText></LabelText>
<MaxCharacters>0</MaxCharacters>
<Mnemonic></Mnemonic>
<Position>0</Position>
<ReferenceWeight>keine</ReferenceWeight>
<RessourceIdentifier></RessourceIdentifier>
<ToolTipText></ToolTipText>
</Editordescriptor>
<ForeignKey>true</ForeignKey>
<Global>false</Global>
<GlobalId>false</GlobalId>
<HideReference>false</HideReference>
<History></History>
<IndexSearchMember>false</IndexSearchMember>
<Indexed>false</Indexed>
<IndividualDefaultValue></IndividualDefaultValue>
<Kodiert>false</Kodiert>
<Kommentar></Kommentar>
<Konsistenz>
<Writeablemember>false</Writeablemember>
</Konsistenz>
<LastModificationField>false</LastModificationField>
<ListItemField>false</ListItemField>
<Name>neu1</Name>
<NotNull>false</NotNull>
<PanelNumber>0</PanelNumber>
<Parameter></Parameter>
<PrimaryKey>false</PrimaryKey>
<Referenz>
<Direction0>UP</Direction0>
<Direction1>DOWN</Direction1>
<Offset0>100</Offset0>
<Offset1>150</Offset1>
<Spalte>Id</Spalte>
<Tabelle>AnotherTableClass</Tabelle>
<Views>
<Anzahl>1</Anzahl>
<View0>
<Direction0>UP</Direction0>
<Direction1>DOWN</Direction1>
<Name>Main</Name>
<Offset0>100</Offset0>
<Offset1>150</Offset1>
<Points>
<Anzahl>0</Anzahl>
</Points>
</View0>
</Views>
</Referenz>
<RemovedStateField>false</RemovedStateField>
<TechnicalField>false</TechnicalField>
<Unique>false</Unique>
</Spalte1>
</Spalten>
<Stereotype>
<Anzahl>0</Anzahl>
</Stereotype>
<Views>
<Anzahl>1</Anzahl>
<View0>
<Name>Main</Name>
<X>450</X>
<Y>650</Y>
</View0>
</Views>
</Tabelle4>
</Tabellen>
<Views>
<Anzahl>2</Anzahl>
<View0>
<Beschreibung>Diese Sicht beinhaltet alle Tabellen des Schemas</Beschreibung>
<Name>Main</Name>
<ReferenzierteSpaltenAnzeigen>true</ReferenzierteSpaltenAnzeigen>
<Tabelle0>TableClass</Tabelle0>
<Tabelle1>AnotherTableClass</Tabelle1>
<Tabelle2>UpdateMethodTableClass</Tabelle2>
<Tabelle3>ReferencedTableClass</Tabelle3>
<Tabelle4>Tabelle5</Tabelle4>
<Tabellenanzahl>5</Tabellenanzahl>
<TechnischeSpaltenVerstecken>false</TechnischeSpaltenVerstecken>
</View0>
<View1>
<Beschreibung>-/-</Beschreibung>
<Name>Subview</Name>
<ReferenzierteSpaltenAnzeigen>true</ReferenzierteSpaltenAnzeigen>
<Tabelle0>TableClass</Tabelle0>
<Tabelle1>AnotherTableClass</Tabelle1>
<Tabelle2>UpdateMethodTableClass</Tabelle2>
<Tabelle3>ReferencedTableClass</Tabelle3>
<Tabellenanzahl>4</Tabellenanzahl>
<TechnischeSpaltenVerstecken>true</TechnischeSpaltenVerstecken>
</View1>
</Views>
</Diagramm>
|
------------------------------------------------------------------------------
-- 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. --
------------------------------------------------------------------------------
with Natools.S_Expressions.Encodings;
package body Natools.GNAT_HMAC is
----------------------------
-- Generic Implementation --
----------------------------
function Generic_Digest (C : Context)
return Ada.Streams.Stream_Element_Array is
begin
return S_Expressions.Encodings.Decode_Hex
(S_Expressions.To_Atom (Hex_Digest (C)));
end Generic_Digest;
---------------------------
-- Specialized Instances --
---------------------------
function MD5_Digest is new Generic_Digest
(GNAT.MD5.Context, GNAT.MD5.Digest);
function Digest (C : GNAT.MD5.Context)
return Ada.Streams.Stream_Element_Array
renames MD5_Digest;
function SHA1_Digest is new Generic_Digest
(GNAT.SHA1.Context, GNAT.SHA1.Digest);
function Digest (C : GNAT.SHA1.Context)
return Ada.Streams.Stream_Element_Array
renames SHA1_Digest;
function SHA256_Digest is new Generic_Digest
(GNAT.SHA256.Context, GNAT.SHA256.Digest);
function Digest (C : GNAT.SHA256.Context)
return Ada.Streams.Stream_Element_Array
renames SHA256_Digest;
end Natools.GNAT_HMAC;
|
--with Ada.Text_IO;
with Ada.Command_Line; use Ada.Command_Line;
separate (Command_Line_Interface)
procedure Read_Command_Line (Command_Args : out Command_Line_Type) is
-- mytest
--Maximum_Command_Length : constant := 1024;
--subtype Command_Line_Type is String (1 .. Maximum_Command_Length);
--Command_Args : Command_Line_Type;
-- mytest
last : integer := command_args'first - 1;
procedure put ( s : string ) is
begin
command_args ( last+1.. last+s'length) := s;
last := last + s'length;
end;
begin
for i in 1 .. Ada.Command_Line.Argument_count -- - 1
loop
if i/=1 then
put(" "); end if;
put ( Ada.Command_Line.argument(i) );
end loop;
command_args (last+1..command_args'last) := ( others => ' ' );
-- Ada.Text_IO.Put_Line(Command_Args);
end Read_Command_Line;
|
--------------------------------------------------------------------------------
-- --
-- Copyright (C) 2004, RISC OS Ada Library (RASCAL) developers. --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU Lesser General Public --
-- License as published by the Free Software Foundation; either --
-- version 2.1 of the License, or (at your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- Lesser General Public License for more details. --
-- --
-- You should have received a copy of the GNU Lesser General Public --
-- License along with this library; if not, write to the Free Software --
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --
-- --
--------------------------------------------------------------------------------
-- @brief This is the parent package for RASCAL.
-- $Author$
-- $Date$
-- $Revision$
package RASCAL is
pragma Pure (RASCAL);
private
end RASCAL;
|
with Yeison; use Yeison.Operators;
with Ada.Text_IO; use Ada.Text_IO;
with Alire_Crate;
procedure Demo is
A1 : constant Yeison.Int := 1;
-- An integer atom;
A2 : constant Yeison.Str := "string";
-- A string atom
A3 : constant Yeison.Bool := Yeison.True;
-- A Boolean atom
A4 : constant Yeison.Real := 3.14;
-- A real atom
M1 : constant Yeison.Map := ("one" => A1, "two" => A2) with Unreferenced;
-- A map initialized with yeison atoms
M2 : constant Yeison.Map := ("one" => 1, "two" => "two");
-- A map initialized with literals
M3 : constant Yeison.Map := ("one" => A1, "two" => "two", "three" => M2);
-- A map containing other maps
V1 : constant Yeison.Vec := (A1, A2) with Unreferenced;
-- A vector initialized with atoms
V2 : constant Yeison.Vec := (1, 2, 3) with Unreferenced;
-- A vector initialized with integer literals
V3 : constant Yeison.Vec := ("one", "two", "three") with Unreferenced;
-- A vector initialized with string literals
V4 : constant Yeison.Vec := ("one", 2, "three", 4.0);
-- A vector made of mixed atoms/literals
M4 : constant Yeison.Map := ("one" => A1, "two" => 2, "three" => M3, "four" => V4);
-- A map initialized with all kinds of elements
V5 : constant Yeison.Vec := (A1, 2, M3, V4, "five");
-- A vector initialized with all kinds of elements
M5 : constant Yeison.Map := ("one" => 1,
"two" => Yeison.Map'("two" => 2,
"three" => M3),
"zri" => Yeison.Vec'(1, 2, 3));
-- Inline declaration of nested maps/vectors. Unfortunately the qualification is mandatory.
M6 : constant Yeison.Map := ("one" => 1,
"two" => Yeison.Map'("two" => 2,
"three" => M3),
"zri" => Yeison.Vec'(1, M2, 3));
-- Inline declaration of nested maps/vectors. Unfortunately the qualification is mandatory.
V6 : constant Yeison.Vec := (1,
Yeison.Vec'(1, 2),
Yeison.Map'("one" => 1,
"two" => M2));
-- A vector with a nested vector/map. Same problem as with maps.
X0 : Yeison.Any;
X1 : constant Yeison.Any'Class := 1;
X2 : constant Yeison.Any'Class := "two";
X3 : constant Yeison.Any'Class := M4;
X4 : constant Yeison.Any'Class := V5;
-- Storing any kind of value in a variable
begin
Put_Line ("X0: " & X0.Image);
X0 := "changed";
Put_Line ("X0: " & X0.Image);
X0 := 1;
Put_Line ("X0: " & X0.Image);
Put_Line ("X1: " & X1.Image);
Put_Line ("X2: " & X2.Image);
Put_Line ("X3: " & X3.Image);
Put_Line ("X4: " & X4.Image);
Put_Line ("M5: " & M5.Image);
Put_Line ("V6: " & V6.Image);
Put_Line ("Crate: " & Alire_Crate.Crate.Image);
Put_Line ("Map indexing: M4 (""one"") => " & M4 ("one").Image);
Put_Line ("Map nested indexing: Crate (""depends-on"") (""aaa"") => "
& Alire_Crate.Crate ("depends-on").As_Map ("aaa").Image);
Put_Line ("Map nested indexing alt syntax: "
& M5 ("two")("two").Image);
Put_Line ("Map nested indexing alt alt syntax: " & M5 ("two" / "two").Image);
Put_Line ("Nested mixed indexing alt: " & M6 ("zri")(2)("one").Image);
Put_Line ("Map nested indexing w vec: " & M6 (Yeison.Vec'("zri", 2)).Image);
Put_Line ("Nested mixed indexing alt: " & M6 ("zri" / 2 / "one").Image);
Put_Line ("Vec indexing: V6 (1) = " & V6 (1).Image);
Put_Line ("Vec nested indexing V6 (2) (2) = "
& V6 (2).As_Vec (2).Image);
Put_Line ("Vec nested indexing alt syntax V6 ((2, 2)) = " & V6 (2)(2).Image);
Put_Line ("Vec mixed indexing: " & V6.Get (3 / "one").Image);
Put_Line ("Real image: " & A4.Image);
end Demo;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . M U L T I W A Y _ T R E E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-2019, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Finalization;
private with Ada.Streams;
generic
type Element_Type is private;
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Multiway_Trees is
pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
type Tree is tagged private
with Constant_Indexing => Constant_Reference,
Variable_Indexing => Reference,
Default_Iterator => Iterate,
Iterator_Element => Element_Type;
pragma Preelaborable_Initialization (Tree);
type Cursor is private;
pragma Preelaborable_Initialization (Cursor);
Empty_Tree : constant Tree;
No_Element : constant Cursor;
function Has_Element (Position : Cursor) return Boolean;
package Tree_Iterator_Interfaces is new
Ada.Iterator_Interfaces (Cursor, Has_Element);
function Equal_Subtree
(Left_Position : Cursor;
Right_Position : Cursor) return Boolean;
function "=" (Left, Right : Tree) return Boolean;
function Is_Empty (Container : Tree) return Boolean;
function Node_Count (Container : Tree) return Count_Type;
function Subtree_Node_Count (Position : Cursor) return Count_Type;
function Depth (Position : Cursor) return Count_Type;
function Is_Root (Position : Cursor) return Boolean;
function Is_Leaf (Position : Cursor) return Boolean;
function Root (Container : Tree) return Cursor;
procedure Clear (Container : in out Tree);
function Element (Position : Cursor) return Element_Type;
procedure Replace_Element
(Container : in out Tree;
Position : Cursor;
New_Item : Element_Type);
procedure Query_Element
(Position : Cursor;
Process : not null access procedure (Element : Element_Type));
procedure Update_Element
(Container : in out Tree;
Position : Cursor;
Process : not null access procedure (Element : in out Element_Type));
type Constant_Reference_Type
(Element : not null access constant Element_Type) is private
with Implicit_Dereference => Element;
type Reference_Type
(Element : not null access Element_Type) is private
with Implicit_Dereference => Element;
function Constant_Reference
(Container : aliased Tree;
Position : Cursor) return Constant_Reference_Type;
pragma Inline (Constant_Reference);
function Reference
(Container : aliased in out Tree;
Position : Cursor) return Reference_Type;
pragma Inline (Reference);
procedure Assign (Target : in out Tree; Source : Tree);
function Copy (Source : Tree) return Tree;
procedure Move (Target : in out Tree; Source : in out Tree);
procedure Delete_Leaf
(Container : in out Tree;
Position : in out Cursor);
procedure Delete_Subtree
(Container : in out Tree;
Position : in out Cursor);
procedure Swap
(Container : in out Tree;
I, J : Cursor);
function Find
(Container : Tree;
Item : Element_Type) return Cursor;
-- This version of the AI:
-- 10-06-02 AI05-0136-1/07
-- declares Find_In_Subtree this way:
--
-- function Find_In_Subtree
-- (Container : Tree;
-- Item : Element_Type;
-- Position : Cursor) return Cursor;
--
-- It seems that the Container parameter is there by mistake, but we need
-- an official ruling from the ARG. ???
function Find_In_Subtree
(Position : Cursor;
Item : Element_Type) return Cursor;
-- This version of the AI:
-- 10-06-02 AI05-0136-1/07
-- declares Ancestor_Find this way:
--
-- function Ancestor_Find
-- (Container : Tree;
-- Item : Element_Type;
-- Position : Cursor) return Cursor;
--
-- It seems that the Container parameter is there by mistake, but we need
-- an official ruling from the ARG. ???
function Ancestor_Find
(Position : Cursor;
Item : Element_Type) return Cursor;
function Contains
(Container : Tree;
Item : Element_Type) return Boolean;
procedure Iterate
(Container : Tree;
Process : not null access procedure (Position : Cursor));
procedure Iterate_Subtree
(Position : Cursor;
Process : not null access procedure (Position : Cursor));
function Iterate (Container : Tree)
return Tree_Iterator_Interfaces.Forward_Iterator'Class;
function Iterate_Subtree (Position : Cursor)
return Tree_Iterator_Interfaces.Forward_Iterator'Class;
function Iterate_Children
(Container : Tree;
Parent : Cursor)
return Tree_Iterator_Interfaces.Reversible_Iterator'Class;
function Child_Count (Parent : Cursor) return Count_Type;
function Child_Depth (Parent, Child : Cursor) return Count_Type;
procedure Insert_Child
(Container : in out Tree;
Parent : Cursor;
Before : Cursor;
New_Item : Element_Type;
Count : Count_Type := 1);
procedure Insert_Child
(Container : in out Tree;
Parent : Cursor;
Before : Cursor;
New_Item : Element_Type;
Position : out Cursor;
Count : Count_Type := 1);
procedure Insert_Child
(Container : in out Tree;
Parent : Cursor;
Before : Cursor;
Position : out Cursor;
Count : Count_Type := 1);
procedure Prepend_Child
(Container : in out Tree;
Parent : Cursor;
New_Item : Element_Type;
Count : Count_Type := 1);
procedure Append_Child
(Container : in out Tree;
Parent : Cursor;
New_Item : Element_Type;
Count : Count_Type := 1);
procedure Delete_Children
(Container : in out Tree;
Parent : Cursor);
procedure Copy_Subtree
(Target : in out Tree;
Parent : Cursor;
Before : Cursor;
Source : Cursor);
procedure Splice_Subtree
(Target : in out Tree;
Parent : Cursor;
Before : Cursor;
Source : in out Tree;
Position : in out Cursor);
procedure Splice_Subtree
(Container : in out Tree;
Parent : Cursor;
Before : Cursor;
Position : Cursor);
procedure Splice_Children
(Target : in out Tree;
Target_Parent : Cursor;
Before : Cursor;
Source : in out Tree;
Source_Parent : Cursor);
procedure Splice_Children
(Container : in out Tree;
Target_Parent : Cursor;
Before : Cursor;
Source_Parent : Cursor);
function Parent (Position : Cursor) return Cursor;
function First_Child (Parent : Cursor) return Cursor;
function First_Child_Element (Parent : Cursor) return Element_Type;
function Last_Child (Parent : Cursor) return Cursor;
function Last_Child_Element (Parent : Cursor) return Element_Type;
function Next_Sibling (Position : Cursor) return Cursor;
function Previous_Sibling (Position : Cursor) return Cursor;
procedure Next_Sibling (Position : in out Cursor);
procedure Previous_Sibling (Position : in out Cursor);
-- This version of the AI:
-- 10-06-02 AI05-0136-1/07
-- declares Iterate_Children this way:
--
-- procedure Iterate_Children
-- (Container : Tree;
-- Parent : Cursor;
-- Process : not null access procedure (Position : Cursor));
--
-- It seems that the Container parameter is there by mistake, but we need
-- an official ruling from the ARG. ???
procedure Iterate_Children
(Parent : Cursor;
Process : not null access procedure (Position : Cursor));
procedure Reverse_Iterate_Children
(Parent : Cursor;
Process : not null access procedure (Position : Cursor));
private
-- A node of this multiway tree comprises an element and a list of children
-- (that are themselves trees). The root node is distinguished because it
-- contains only children: it does not have an element itself.
-- This design feature puts two design goals in tension with one another:
-- (1) treat the root node the same as any other node
-- (2) not declare any objects of type Element_Type unnecessarily
-- To satisfy (1), we could simply declare the Root node of the tree
-- using the normal Tree_Node_Type, but that would mean that (2) is not
-- satisfied. To resolve the tension (in favor of (2)), we declare the
-- component Root as having a different node type, without an Element
-- component (thus satisfying goal (2)) but otherwise identical to a normal
-- node, and then use Unchecked_Conversion to convert an access object
-- designating the Root node component to the access type designating a
-- normal, non-root node (thus satisfying goal (1)). We make an explicit
-- check for Root when there is any attempt to manipulate the Element
-- component of the node (a check required by the RM anyway).
-- In order to be explicit about node (and pointer) representation, we
-- specify that the respective node types have convention C, to ensure
-- that the layout of the components of the node records is the same,
-- thus guaranteeing that (unchecked) conversions between access types
-- designating each kind of node type is a meaningful conversion.
use Ada.Containers.Helpers;
package Implementation is new Generic_Implementation;
use Implementation;
type Tree_Node_Type;
type Tree_Node_Access is access all Tree_Node_Type;
pragma Convention (C, Tree_Node_Access);
pragma No_Strict_Aliasing (Tree_Node_Access);
-- The above-mentioned Unchecked_Conversion is a violation of the normal
-- aliasing rules.
type Children_Type is record
First : Tree_Node_Access;
Last : Tree_Node_Access;
end record;
-- See the comment above. This declaration must exactly match the
-- declaration of Root_Node_Type (except for the Element component).
type Tree_Node_Type is record
Parent : Tree_Node_Access;
Prev : Tree_Node_Access;
Next : Tree_Node_Access;
Children : Children_Type;
Element : aliased Element_Type;
end record;
pragma Convention (C, Tree_Node_Type);
-- See the comment above. This declaration must match the declaration of
-- Tree_Node_Type (except for the Element component).
type Root_Node_Type is record
Parent : Tree_Node_Access;
Prev : Tree_Node_Access;
Next : Tree_Node_Access;
Children : Children_Type;
end record;
pragma Convention (C, Root_Node_Type);
for Root_Node_Type'Alignment use Standard'Maximum_Alignment;
-- The alignment has to be large enough to allow Root_Node to Tree_Node
-- access value conversions, and Tree_Node_Type's alignment may be bumped
-- up by the Element component.
use Ada.Finalization;
-- The Count component of type Tree represents the number of nodes that
-- have been (dynamically) allocated. It does not include the root node
-- itself. As implementors, we decide to cache this value, so that the
-- selector function Node_Count can execute in O(1) time, in order to be
-- consistent with the behavior of the Length selector function for other
-- standard container library units. This does mean, however, that the
-- two-container forms for Splice_XXX (that move subtrees across tree
-- containers) will execute in O(n) time, because we must count the number
-- of nodes in the subtree(s) that get moved. (We resolve the tension
-- between Node_Count and Splice_XXX in favor of Node_Count, under the
-- assumption that Node_Count is the more common operation).
type Tree is new Controlled with record
Root : aliased Root_Node_Type;
TC : aliased Tamper_Counts;
Count : Count_Type := 0;
end record;
overriding procedure Adjust (Container : in out Tree);
overriding procedure Finalize (Container : in out Tree) renames Clear;
use Ada.Streams;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Container : Tree);
for Tree'Write use Write;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Container : out Tree);
for Tree'Read use Read;
type Tree_Access is access all Tree;
for Tree_Access'Storage_Size use 0;
type Cursor is record
Container : Tree_Access;
Node : Tree_Node_Access;
end record;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Position : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Position : out Cursor);
for Cursor'Read use Read;
subtype Reference_Control_Type is Implementation.Reference_Control_Type;
-- It is necessary to rename this here, so that the compiler can find it
type Constant_Reference_Type
(Element : not null access constant Element_Type) is
record
Control : Reference_Control_Type :=
raise Program_Error with "uninitialized reference";
-- The RM says, "The default initialization of an object of
-- type Constant_Reference_Type or Reference_Type propagates
-- Program_Error."
end record;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Constant_Reference_Type);
for Constant_Reference_Type'Read use Read;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Constant_Reference_Type);
for Constant_Reference_Type'Write use Write;
type Reference_Type
(Element : not null access Element_Type) is
record
Control : Reference_Control_Type :=
raise Program_Error with "uninitialized reference";
-- The RM says, "The default initialization of an object of
-- type Constant_Reference_Type or Reference_Type propagates
-- Program_Error."
end record;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Reference_Type);
for Reference_Type'Read use Read;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Reference_Type);
for Reference_Type'Write use Write;
-- Three operations are used to optimize in the expansion of "for ... of"
-- loops: the Next(Cursor) procedure in the visible part, and the following
-- Pseudo_Reference and Get_Element_Access functions. See Exp_Ch5 for
-- details.
function Pseudo_Reference
(Container : aliased Tree'Class) return Reference_Control_Type;
pragma Inline (Pseudo_Reference);
-- Creates an object of type Reference_Control_Type pointing to the
-- container, and increments the Lock. Finalization of this object will
-- decrement the Lock.
type Element_Access is access all Element_Type with
Storage_Size => 0;
function Get_Element_Access
(Position : Cursor) return not null Element_Access;
-- Returns a pointer to the element designated by Position.
Empty_Tree : constant Tree := (Controlled with others => <>);
No_Element : constant Cursor := (others => <>);
end Ada.Containers.Multiway_Trees;
|
with Ada.Containers.Ordered_Sets,
Ada.Containers.Vectors; use Ada.Containers;
with Ada.Text_IO; use Ada.Text_IO;
with Interfaces; use Interfaces;
with Input16; use Input16, Input16.OH;
procedure Day16 is
subtype Op_String is String (1 .. 4);
package String_Sets is new Ordered_Sets (Element_Type => Op_String);
package String_Set_Vectors is new Vectors
(Index_Type => Positive,
Element_Type => String_Sets.Set,
"=" => String_Sets."=");
Opcodes : array (Natural range 0 .. 15) of String_Set_Vectors.Vector;
Opcode_Lookup : array (Natural range 0 .. 15) of Op_String :=
("addr", "addi", "mulr", "muli", "banr", "bani", "borr", "bori",
"setr", "seti", "gtir", "gtri", "gtrr", "eqir", "eqri", "eqrr");
Part1_Count : Natural := 0;
begin
-- Part 1
for I in Part1_Input'Range loop
declare
Sample : constant Sample_Record := Part1_Input (I);
A : constant Unsigned_64 := Sample.Instr (1);
B : constant Unsigned_64 := Sample.Instr (2);
C : constant Unsigned_64 := Sample.Instr (3);
Match_Count : Natural := 0;
Possible_Opcodes : String_Sets.Set;
begin
for I in Opcode_Lookup'Range loop
declare
Op : constant Op_String := Opcode_Lookup (I);
begin
if Execute_Instruction (Op, Sample.Before, A, B, C) = Sample.After
then
Match_Count := Match_Count + 1;
Possible_Opcodes.Insert (Op);
end if;
end;
end loop;
Opcodes (Natural (Sample.Instr (0))).Append (Possible_Opcodes);
if Match_Count >= 3 then
Part1_Count := Part1_Count + 1;
end if;
end;
end loop;
Put_Line ("Part 1 =" & Natural'Image (Part1_Count));
-- Part 2 Setup (find the opcode values)
declare
Opcode : array (Natural range 0 .. 15) of String_Sets.Set;
Is_Finished : Boolean := False;
begin
for Op in Opcodes'Range loop
declare
Set : String_Sets.Set := Opcodes (Op).First_Element;
begin
for I in Opcodes (Op).First_Index + 1 .. Opcodes (Op).Last_Index
loop
Set := String_Sets.Intersection (Set, Opcodes (Op) (I));
end loop;
Opcode (Op) := Set;
end;
end loop;
while not Is_Finished loop
Is_Finished := True;
for I in Opcode'Range loop
if Opcode (I).Length = 1 then
Opcode_Lookup (I) := Opcode (I).First_Element;
for J in Opcode'Range loop
if J /= I then
Opcode (J).Exclude (Opcode (I).First_Element);
end if;
end loop;
else
Is_Finished := False;
end if;
end loop;
end loop;
end;
Put_Line ("Opcodes:");
for I in Opcode_Lookup'Range loop
Put_Line (Natural'Image (I) & " " & Opcode_Lookup (I));
end loop;
-- Part 2 Solution
declare
Reg : Registers := (0, 0, 0, 0);
begin
for I in Part2_Input'Range loop
declare
Op : constant Natural := Natural (Part2_Input (I) (0));
A : constant Unsigned_64 := Part2_Input (I) (1);
B : constant Unsigned_64 := Part2_Input (I) (2);
C : constant Unsigned_64 := Part2_Input (I) (3);
begin
Reg := Execute_Instruction (Opcode_Lookup (Op), Reg, A, B, C);
end;
end loop;
Put_Line ("Part 2 =" & Unsigned_64'Image (Reg (3)));
end;
end Day16;
|
-- CE2102Y.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 USE_ERROR IS RAISED IF AN IMPLEMENTATION DOES NOT
-- SUPPORT DELETION OF AN EXTERNAL DIRECT FILE.
-- APPLICABILITY CRITERIA:
-- THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
-- CREATION OF A DIRECT FILE WITH OUT_FILE MODE.
-- HISTORY:
-- TBN 09/15/87 CREATED ORIGINAL TEST.
WITH DIRECT_IO;
WITH REPORT; USE REPORT;
PROCEDURE CE2102Y IS
INCOMPLETE : EXCEPTION;
BEGIN
TEST ("CE2102Y", "CHECK THAT USE_ERROR IS RAISED IF AN " &
"IMPLEMENTATION DOES NOT SUPPORT DELETION " &
"OF AN EXTERNAL DIRECT FILE");
DECLARE
PACKAGE DIR IS NEW DIRECT_IO (INTEGER);
USE DIR;
FILE1 : FILE_TYPE;
INT1 : INTEGER := IDENT_INT(1);
BEGIN
BEGIN
CREATE (FILE1, OUT_FILE, LEGAL_FILE_NAME);
EXCEPTION
WHEN USE_ERROR =>
NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE OF " &
"DIRECT FILE WITH OUT_FILE MODE");
RAISE INCOMPLETE;
WHEN NAME_ERROR =>
NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE OF " &
"DIRECT FILE WITH OUT_FILE MODE");
RAISE INCOMPLETE;
END;
WRITE (FILE1, INT1);
BEGIN
DELETE (FILE1);
COMMENT ("DELETION OF AN EXTERNAL DIRECT FILE IS " &
"ALLOWED");
EXCEPTION
WHEN USE_ERROR =>
COMMENT ("DELETION OF AN EXTERNAL DIRECT " &
"FILE IS NOT ALLOWED");
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED WHILE " &
"DELETING AN EXTERNAL FILE");
END;
EXCEPTION
WHEN INCOMPLETE =>
NULL;
END;
RESULT;
END CE2102Y;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- G N A T . T H R E A D S --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1998-2000 Ada Core Technologies, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT is maintained by Ada Core Technologies Inc (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
with Ada.Task_Identification; use Ada.Task_Identification;
with System.Task_Primitives.Operations;
with System.Tasking;
with System.OS_Interface;
with Unchecked_Conversion;
package body GNAT.Threads is
use System;
function To_Addr is new Unchecked_Conversion (Task_Id, Address);
function To_Id is new Unchecked_Conversion (Address, Task_Id);
function To_Id is new Unchecked_Conversion (Address, Tasking.Task_ID);
type Code_Proc is access procedure (Id : Address; Parm : Void_Ptr);
task type Thread
(Stsz : Natural;
Prio : Any_Priority;
Parm : Void_Ptr;
Code : Code_Proc)
is
pragma Priority (Prio);
pragma Storage_Size (Stsz);
end Thread;
task body Thread is
begin
Code.all (To_Addr (Current_Task), Parm);
end Thread;
type Tptr is access Thread;
-------------------
-- Create_Thread --
-------------------
function Create_Thread
(Code : Address;
Parm : Void_Ptr;
Size : Natural;
Prio : Integer) return System.Address
is
TP : Tptr;
function To_CP is new Unchecked_Conversion (Address, Code_Proc);
begin
TP := new Thread (Size, Prio, Parm, To_CP (Code));
return To_Addr (TP'Identity);
end Create_Thread;
--------------------
-- Destroy_Thread --
--------------------
procedure Destroy_Thread (Id : Address) is
Tid : Task_Id := To_Id (Id);
begin
Abort_Task (Tid);
end Destroy_Thread;
----------------
-- Get_Thread --
----------------
procedure Get_Thread (Id : Address; Thread : Address) is
use System.OS_Interface;
Thr : Thread_Id;
for Thr use at Thread;
begin
Thr := Task_Primitives.Operations.Get_Thread_Id (To_Id (Id));
end Get_Thread;
end GNAT.Threads;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2019, Fabien Chouteau --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with Interfaces; use Interfaces;
with GNAT.Sockets;
with GDB_Remote.Target;
with LibRISCV.Sim.Platform;
with LibRISCV.Sim.Memory_Bus;
package LibRISCV.Sim.GDB_Remote_Target is
package Parent renames GDB_Remote.Target;
type Instance (P : not null Platform.Ptr;
Bus : not null Memory_Bus.Ptr;
Buffer_Size : GDB_Remote.Buffer_Lenght_Type)
is new Parent.Instance
with private;
subtype Class is Instance'Class;
type Ptr is access all Class;
procedure Start_Server (This : in out Instance);
procedure Poll (This : in out Instance);
overriding
procedure Detach (This : in out Instance);
overriding
procedure Send_To_Host (This : in out Instance;
C : Character);
overriding
procedure Set_Thread (This : in out Instance;
Id : Integer);
overriding
procedure Read_Memory (This : in out Instance;
Addr : GDB_Remote.Target.Address;
Data : out Unsigned_8;
Success : out Boolean);
overriding
procedure Write_Memory (This : in out Instance;
Addr : GDB_Remote.Target.Address;
Data : Unsigned_8;
Success : out Boolean);
overriding
function Last_General_Register (This : Instance) return Natural
is (31);
overriding
procedure Read_Register (This : in out Instance;
Id : Natural;
Data : out GDB_Remote.Target.Register;
Success : out Boolean);
overriding
procedure Write_Register (This : in out Instance;
Id : Natural;
Data : GDB_Remote.Target.Register;
Success : out Boolean);
overriding
procedure Continue (This : in out Instance;
Single_Step : Boolean := False);
overriding
procedure Continue_At (This : in out Instance;
Addr : GDB_Remote.Target.Address;
Single_Step : Boolean := False);
overriding
procedure Halt (This : in out Instance);
procedure Halted_On_Single_Step (This : in out Instance);
procedure Halted_On_Breakpoint (This : in out Instance);
overriding
function Supported (This : Instance;
B_Type : GDB_Remote.Breakpoint_Type)
return Boolean;
overriding
procedure Insert_Breakpoint (This : in out Instance;
B_Type : GDB_Remote.Breakpoint_Type;
Addr : GDB_Remote.Target.Address;
Kind : Natural);
overriding
procedure Remove_Breakpoint (This : in out Instance;
B_Type : GDB_Remote.Breakpoint_Type;
Addr : GDB_Remote.Target.Address;
Kind : Natural);
private
type Instance (P : not null Platform.Ptr;
Bus : not null Memory_Bus.Ptr;
Buffer_Size : GDB_Remote.Buffer_Lenght_Type)
is new Parent.Instance (Buffer_Size)
with record
Receiver : GNAT.Sockets.Socket_Type;
Connection : GNAT.Sockets.Socket_Type;
Client : GNAT.Sockets.Sock_Addr_Type;
Channel : GNAT.Sockets.Stream_Access;
Current_Hart : Platform.Hart_Id := 1;
end record;
procedure Wait_For_Connection (This : in out Instance);
end LibRISCV.Sim.GDB_Remote_Target;
|
-------------------------------------------------------------------------------
-- This file is part of libsparkcrypto.
--
-- Copyright (C) 2010, Alexander Senier
-- Copyright (C) 2010, secunet Security Networks AG
-- 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.
-------------------------------------------------------------------------------
with LSC.Internal.Types;
-------------------------------------------------------------------------------
-- Byte order conversion for 64-bit words
-------------------------------------------------------------------------------
package LSC.Internal.Byteorder64 is
pragma Pure;
-- Convert 64-bit word @Item@ from native byte order to big endian
function Native_To_BE (Item : Types.Word64) return Types.Word64;
pragma Inline (Native_To_BE);
-- Convert 64-bit word @Item@ from native byte order to little endian
function Native_To_LE (Item : Types.Word64) return Types.Word64;
pragma Inline (Native_To_LE);
-- Convert 64-bit word @Item@ from big endian to native byte order
function BE_To_Native (Item : Types.Word64) return Types.Word64;
pragma Inline (BE_To_Native);
-- Convert 64-bit word @Item@ from little endian to native byte order
function LE_To_Native (Item : Types.Word64) return Types.Word64;
pragma Inline (LE_To_Native);
end LSC.Internal.Byteorder64;
|
------------------------------------------------------------------------------
-- --
-- THIS IS AN AUTOMATICALLY GENERATED FILE! DO NOT EDIT! --
-- --
-- WAVEFILES --
-- --
-- Test application --
-- --
-- The MIT License (MIT) --
-- --
-- Copyright (c) 2015 -- 2020 Gustavo A. Hoffmann --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining --
-- a copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, sublicense, and / or sell copies of the Software, and to --
-- permit persons to whom the Software is furnished to do so, subject to --
-- the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be --
-- included in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, --
-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY --
-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, --
-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE --
-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
------------------------------------------------------------------------------
generic
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
type PCM_Sample is digits <>;
#else
type PCM_Sample is delta <>;
#end if;
type PCM_MC_Sample is array (Positive range <>) of PCM_Sample;
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
package Generic_Float_Wave_Test is
#else
package Generic_Fixed_Wave_Test is
#end if;
procedure Display_Info_File
(File_In : String);
procedure Copy_File
(File_In : String;
File_Out : String);
procedure Compare_Files
(File_Ref : String;
File_DUT : String);
procedure Diff_Files
(File_Ref : String;
File_DUT : String;
File_Diff : String);
procedure Mix_Files
(File_Ref : String;
File_DUT : String;
File_Mix : String);
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
end Generic_Float_Wave_Test;
#else
end Generic_Fixed_Wave_Test;
#end if;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- SYSTEM.STORAGE_POOLS.SUBPOOLS.FINALIZATION --
-- --
-- B o d y --
-- --
-- Copyright (C) 2011-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. --
-- --
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
with System.Finalization_Masters; use System.Finalization_Masters;
package body System.Storage_Pools.Subpools.Finalization is
-----------------------------
-- Finalize_And_Deallocate --
-----------------------------
procedure Finalize_And_Deallocate (Subpool : in out Subpool_Handle) is
procedure Free is new Ada.Unchecked_Deallocation (SP_Node, SP_Node_Ptr);
begin
-- Do nothing if the subpool was never created or never used. The latter
-- case may arise with an array of subpool implementations.
if Subpool = null
or else Subpool.Owner = null
or else Subpool.Node = null
then
return;
end if;
-- Clean up all controlled objects chained on the subpool's master
Finalize (Subpool.Master);
-- Remove the subpool from its owner's list of subpools
Detach (Subpool.Node);
-- Destroy the associated doubly linked list node which was created in
-- Set_Pool_Of_Subpools.
Free (Subpool.Node);
-- Dispatch to the user-defined implementation of Deallocate_Subpool. It
-- is important to first set Subpool.Owner to null, because RM-13.11.5
-- requires that "The subpool no longer belongs to any pool" BEFORE
-- calling Deallocate_Subpool. The actual dispatching call required is:
--
-- Deallocate_Subpool(Pool_of_Subpool(Subpool).all, Subpool);
--
-- but that can't be taken literally, because Pool_of_Subpool will
-- return null.
declare
Owner : constant Any_Storage_Pool_With_Subpools_Ptr := Subpool.Owner;
begin
Subpool.Owner := null;
Deallocate_Subpool (Owner.all, Subpool);
end;
Subpool := null;
end Finalize_And_Deallocate;
end System.Storage_Pools.Subpools.Finalization;
|
with Ada.Text_IO;
with Ada.Integer_Text_IO;
with Ada.Strings.Unbounded;
with Ada.Strings.Fixed;
with Ada.Command_Line;
procedure Main is
p : Long_Long_Integer;
q : Long_Long_Integer;
phi : Long_Long_Integer;
n : Long_Long_Integer;
e : Long_Long_Integer;
d : Long_Long_Integer;
message : Long_Long_Integer;
encryptedMessage : Long_Long_Integer;
decryptedMessage : Long_Long_Integer;
-------------------
-- IsPrimeNumber --
-------------------
function IsPrimeNumber (N : Long_Long_Integer) return Boolean
is
isPrime : Boolean := true;
begin
if N = 0 or N = 1 then
return false;
end if;
for i in 1 .. N / 2 loop
if (N mod (i + 1)) = 0 then
isPrime := false;
exit;
end if;
end loop;
return isPrime;
end IsPrimeNumber;
-----------
-- IsOdd --
-----------
function IsOdd (N : Long_Long_Integer) return Boolean
is
begin
return (N mod 2 = 1);
end IsOdd;
---------
-- gcd --
---------
function gcd (A, B : Long_Long_Integer) return Long_Long_Integer
is
begin
if A = 0 then
return B;
end if;
return gcd(B mod A, A);
end gcd;
------------------------
-- GetPrivateExponent --
------------------------
function GetPrivateExponent (Phi, E : Long_Long_Integer) return Long_Long_Integer
is
K : Long_Long_Integer := 1;
ans : Float;
begin
loop
ans := ((Float(K)*Float(Phi)) + 1.0) / Float(E);
if not (ans = Float(Integer(ans))) then
K := K + 1;
else
return ((K*Phi) + 1) / E;
end if;
end loop;
end GetPrivateExponent;
---------------------
-- DecimalToBinary --
---------------------
function DecimalToBinary (N : Natural) return String
is
ret : Ada.Strings.Unbounded.Unbounded_String;
begin
if N < 2 then
return "1";
else
Ada.Strings.Unbounded.Append(ret, Ada.Strings.Unbounded.To_Unbounded_String(decimalToBinary (N / 2)));
Ada.Strings.Unbounded.Append(ret, Ada.Strings.Fixed.Trim(Integer'Image(N mod 2), Ada.Strings.Left));
end if;
return Ada.Strings.Unbounded.To_String(ret);
end decimalToBinary;
-------------------------------
-- FastModularExponentiation --
-------------------------------
function FastModularExponentiation (b, exp, m : Long_Long_Integer) return Long_Long_Integer
is
x : Long_Long_Integer := 1;
power : Long_Long_Integer;
str : String := DecimalToBinary (Integer(exp));
begin
power := b mod m;
for i in 0 .. (str'Length - 1) loop
if str(str'Last - i) = '1' then
x := (x * power) mod m;
end if;
power := (power*power) mod m;
--power := FastModularExponentiation(power, power, m);
end loop;
return x;
end FastModularExponentiation;
-------------
-- Encrypt --
-------------
function Encrypt (M, N, E : Long_Long_Integer) return Long_Long_Integer
is
begin
return FastModularExponentiation(M, E, N);
end Encrypt;
-------------
-- Decrypt --
-------------
function Decrypt (C, D, N : Long_Long_Integer) return Long_Long_Integer
is
begin
return FastModularExponentiation(C, D, N);
end Decrypt;
begin
if Ada.Command_Line.Argument_Count < 1 then
Ada.Text_IO.Put_Line("You forgot to pass in all the arguments! Try --help.");
return;
end if;
if Ada.Command_Line.Argument(1) = "--help" then
Ada.Text_IO.Put_Line("A simple CLI RSA program.");
Ada.Text_IO.New_Line;
Ada.Text_IO.Put_Line("Usage: ");
Ada.Text_IO.Put_Line(" rsa <p> <q> <e> <message>");
Ada.Text_IO.Put_Line(" rsa encrypt <n> <e> <message>");
Ada.Text_IO.Put_Line(" rsa decrypt <d> <n> <message>");
return;
end if;
if Ada.Command_Line.Argument(1) = "encrypt" then
n := Long_Long_Integer'Value(Ada.Command_Line.Argument(2));
e := Long_Long_Integer'Value(Ada.Command_Line.Argument(3));
message := Long_Long_Integer'Value(Ada.Command_Line.Argument(4));
encryptedMessage := Encrypt(message, n, e);
Ada.Text_IO.Put("encrypted message = ");
Ada.Text_IO.Put_Line(Long_Long_Integer'Image(encryptedMessage));
return;
end if;
if Ada.Command_Line.Argument(1) = "decrypt" then
d := Long_Long_Integer'Value(Ada.Command_Line.Argument(2));
n := Long_Long_Integer'Value(Ada.Command_Line.Argument(3));
encryptedMessage := Long_Long_Integer'Value(Ada.Command_Line.Argument(4));
decryptedMessage := Decrypt(encryptedMessage, d, n);
Ada.Text_IO.Put("decrypted message = ");
Ada.Text_IO.Put_Line(Long_Long_Integer'Image(decryptedMessage));
return;
end if;
if Ada.Command_Line.Argument_Count < 4 then
Ada.Text_IO.Put_Line("You forgot to pass in all the arguments! Try --help.");
return;
end if;
p := Long_Long_Integer'Value(Ada.Command_Line.Argument(1));
q := Long_Long_Integer'Value(Ada.Command_Line.Argument(2));
e := Long_Long_Integer'Value(Ada.Command_Line.Argument(3));
message := Long_Long_Integer'Value(Ada.Command_Line.Argument(4));
if not (IsPrimeNumber(p) and IsPrimeNumber(q)) then
Ada.Text_IO.Put_Line("p and q has to be prime numbers.");
return;
end if;
n := p * q;
if message >= n - 1 then
Ada.Text_IO.Put_Line("The message has to be smaller than n");
return;
end if;
phi := (p - 1) * (q - 1);
if not (IsOdd(e) and (gcd(e, phi) = 1) and e > 1) then
Ada.Text_IO.Put_Line("e has to be 1 < e < λ(n) and gcd(e, λ(n)) = 1");
return;
end if;
d := GetPrivateExponent(phi, e);
encryptedMessage := Encrypt(message, n, e);
decryptedMessage := Decrypt(encryptedMessage, d, n);
Ada.Text_IO.Put("p =");
Ada.Text_IO.Put_Line(Long_Long_Integer'Image(p));
Ada.Text_IO.Put("q =");
Ada.Text_IO.Put_Line(Long_Long_Integer'Image(q));
Ada.Text_IO.Put("e =");
Ada.Text_IO.Put_Line(Long_Long_Integer'Image(e));
Ada.Text_IO.Put("n =");
Ada.Text_IO.Put_Line(Long_Long_Integer'Image(n));
Ada.Text_IO.Put("phi =");
Ada.Text_IO.Put_Line(Long_Long_Integer'Image(phi));
Ada.Text_IO.Put("d =");
Ada.Text_IO.Put_Line(Long_Long_Integer'Image(d));
Ada.Text_IO.Put("message = ");
Ada.Text_IO.Put_Line(Long_Long_Integer'Image(message));
Ada.Text_IO.Put("encrypted message = ");
Ada.Text_IO.Put_Line(Long_Long_Integer'Image(encryptedMessage));
Ada.Text_IO.Put("decrypted message = ");
Ada.Text_IO.Put_Line(Long_Long_Integer'Image(decryptedMessage));
null;
end Main;
|
-------------------------------------------------------------------------------
-- Copyright (c) 2019, Daniel King
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code must retain the above copyright
-- notice, this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * The name of the copyright holder may not be used to endorse or promote
-- Products derived from this software without specific prior written
-- permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
with Interfaces; use Interfaces;
package body Keccak.Generic_MonkeyDuplex is
-------------
-- Start --
-------------
procedure Start (Ctx : out Context;
Rate : in Rate_Bits_Number;
Data : in Keccak.Types.Byte_Array;
Bit_Len : in Natural) is
begin
Ctx.Rate := Rate;
Init_State (Ctx.State);
XOR_Bits_Into_State (A => Ctx.State,
Data => Data,
Bit_Len => Bit_Len);
XOR_Padding_Into_State (A => Ctx.State,
First_Bit => Bit_Len,
Last_Bit => State_Size_Bits - 1);
Permute_Start (Ctx.State);
end Start;
-------------
-- Start --
-------------
function Start (Rate : in Rate_Bits_Number;
Data : in Keccak.Types.Byte_Array;
Bit_Len : in Natural) return Context is
begin
return Ctx : Context do
Start (Ctx, Rate, Data, Bit_Len);
end return;
end Start;
------------
-- Step --
------------
procedure Step (Ctx : in out Context;
In_Data : in Keccak.Types.Byte_Array;
In_Data_Bit_Length : in Natural;
Suffix : in Keccak.Types.Byte;
Suffix_Bit_Length : in Natural;
Out_Data : out Keccak.Types.Byte_Array;
Out_Data_Bit_Length : in Natural) is
begin
Step_Mute (Ctx => Ctx,
In_Data => In_Data,
In_Data_Bit_Length => In_Data_Bit_Length,
Suffix => Suffix,
Suffix_Bit_Length => Suffix_Bit_Length);
Extract_Bits (A => Ctx.State,
Data => Out_Data,
Bit_Len => Out_Data_Bit_Length);
end Step;
-----------------
-- Step_Mute --
-----------------
procedure Step_Mute (Ctx : in out Context;
In_Data : in Keccak.Types.Byte_Array;
In_Data_Bit_Length : in Natural;
Suffix : in Keccak.Types.Byte;
Suffix_Bit_Length : in Natural) is
First_Suffix_Byte : constant Natural := In_Data_Bit_Length / 8;
Last_Suffix_Byte : constant Natural := (In_Data_Bit_Length + Suffix_Bit_Length - 1) / 8;
begin
XOR_Bits_Into_State (Ctx.State, In_Data, In_Data_Bit_Length);
XOR_Byte_Into_State (A => Ctx.State,
Offset => First_Suffix_Byte,
Value => Shift_Left (Suffix, In_Data_Bit_Length mod 8));
if Last_Suffix_Byte /= First_Suffix_Byte then
XOR_Byte_Into_State (A => Ctx.State,
Offset => Last_Suffix_Byte,
Value => Shift_Right (Suffix, 8 - (In_Data_Bit_Length mod 8)));
end if;
XOR_Padding_Into_State (A => Ctx.State,
First_Bit => In_Data_Bit_Length + Suffix_Bit_Length,
Last_Bit => Rate_Of (Ctx) - 1);
Permute_Step (Ctx.State);
end Step_Mute;
--------------
-- Stride --
--------------
procedure Stride (Ctx : in out Context;
In_Data : in Keccak.Types.Byte_Array;
In_Data_Bit_Length : in Natural;
Suffix : in Keccak.Types.Byte;
Suffix_Bit_Length : in Natural;
Out_Data : out Keccak.Types.Byte_Array;
Out_Data_Bit_Length : in Natural) is
First_Suffix_Byte : constant Natural := In_Data_Bit_Length / 8;
Last_Suffix_Byte : constant Natural := (In_Data_Bit_Length + Suffix_Bit_Length - 1) / 8;
begin
XOR_Bits_Into_State (Ctx.State, In_Data, In_Data_Bit_Length);
XOR_Byte_Into_State (A => Ctx.State,
Offset => First_Suffix_Byte,
Value => Shift_Left (Suffix, In_Data_Bit_Length mod 8));
if Last_Suffix_Byte /= First_Suffix_Byte then
XOR_Byte_Into_State (A => Ctx.State,
Offset => Last_Suffix_Byte,
Value => Shift_Right (Suffix, 8 - (In_Data_Bit_Length mod 8)));
end if;
XOR_Padding_Into_State (A => Ctx.State,
First_Bit => In_Data_Bit_Length + Suffix_Bit_Length,
Last_Bit => Rate_Of (Ctx) - 1);
Permute_Stride (Ctx.State);
Extract_Bits (A => Ctx.State,
Data => Out_Data,
Bit_Len => Out_Data_Bit_Length);
end Stride;
end Keccak.Generic_MonkeyDuplex;
|
pragma License (Unrestricted);
-- implementation unit specialized for Linux
package System.Native_IO.Names is
pragma Preelaborate;
procedure Open_Ordinary (
Method : Open_Method;
Handle : aliased out Handle_Type;
Mode : File_Mode;
Name : String;
Out_Name : aliased out Name_Pointer; -- null
Form : Packed_Form);
procedure Get_Full_Name (
Handle : Handle_Type;
Has_Full_Name : in out Boolean;
Name : in out Name_Pointer;
Is_Standard : Boolean;
Raise_On_Error : Boolean);
end System.Native_IO.Names;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- A D A . T E X T _ I O . C O M P L E X _ I O --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992,1993,1994,1995,1996 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Text_IO;
with Ada.Text_IO.Complex_Aux;
package body Ada.Text_IO.Complex_IO is
package Aux renames Ada.Text_IO.Complex_Aux;
subtype LLF is Long_Long_Float;
-- Type used for calls to routines in Aux
---------
-- Get --
---------
procedure Get
(File : in File_Type;
Item : out Complex_Types.Complex;
Width : in Field := 0)
is
Real_Item : Real'Base;
Imag_Item : Real'Base;
begin
Aux.Get (File, LLF (Real_Item), LLF (Imag_Item), Width);
Item := (Real_Item, Imag_Item);
exception
when Constraint_Error => raise Data_Error;
end Get;
---------
-- Get --
---------
procedure Get
(Item : out Complex_Types.Complex;
Width : in Field := 0)
is
begin
Get (Current_In, Item, Width);
end Get;
---------
-- Get --
---------
procedure Get
(From : in String;
Item : out Complex_Types.Complex;
Last : out Positive)
is
Real_Item : Real'Base;
Imag_Item : Real'Base;
begin
Aux.Gets (From, LLF (Real_Item), LLF (Imag_Item), Last);
Item := (Real_Item, Imag_Item);
exception
when Data_Error => raise Constraint_Error;
end Get;
---------
-- Put --
---------
procedure Put
(File : in File_Type;
Item : in Complex_Types.Complex;
Fore : in Field := Default_Fore;
Aft : in Field := Default_Aft;
Exp : in Field := Default_Exp)
is
begin
Aux.Put (File, LLF (Re (Item)), LLF (Im (Item)), Fore, Aft, Exp);
end Put;
---------
-- Put --
---------
procedure Put
(Item : in Complex_Types.Complex;
Fore : in Field := Default_Fore;
Aft : in Field := Default_Aft;
Exp : in Field := Default_Exp)
is
begin
Put (Current_Out, Item, Fore, Aft, Exp);
end Put;
---------
-- Put --
---------
procedure Put
(To : out String;
Item : in Complex_Types.Complex;
Aft : in Field := Default_Aft;
Exp : in Field := Default_Exp)
is
begin
Aux.Puts (To, LLF (Re (Item)), LLF (Im (Item)), Aft, Exp);
end Put;
end Ada.Text_IO.Complex_IO;
|
-----------------------------------------------------------------------
-- gen-model-xmi -- UML-XMI model
-- Copyright (C) 2012, 2013, 2015, 2016, 2021 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Tags;
with Util.Strings;
with Util.Log.Loggers;
package body Gen.Model.XMI is
use Ada.Strings.Unbounded;
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Gen.Model.XMI");
procedure Append_Message (Into : in out UString;
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 UString;
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 UString;
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_UString (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_UString (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 UString)
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 UString := 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 UString;
Map : in out Model_Map.Map);
procedure Reconcile_Model (Key : in UString;
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 UBO.Object) is
begin
if not UBO.Is_Null (Value) then
Node.Set_Name (UBO.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 UBO.Object) is
begin
Node.XMI_Id := UBO.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 : UString;
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 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 UString;
Item : in Model_Element_Access);
Doc : constant Tagged_Value_Element_Access := Node.Find_Tag_Value (TAG_DOCUMENTATION);
Result : UString;
procedure Collect_Comment (Id : in UString;
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
Append (Result, Comment.Text);
end if;
end Collect_Comment;
begin
Iterate (Node.Model.all, XMI_COMMENT, Collect_Comment'Access);
if Doc /= null then
Append (Result, Doc.Value);
end if;
return 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_UString (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 : UString;
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 UBO.Object;
Name : in UBO.Object;
Literal : out Literal_Element_Access) is
begin
Literal := new Literal_Element (Node.Model);
Literal.XMI_Id := UBO.To_Unbounded_String (Id);
Literal.Set_Name (UBO.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 : UString;
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;
elsif Node.Child_Class.all in Data_Type_Element'Class then
Data_Type_Element'Class (Node.Child_Class.all).Parent_Type := 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}",
To_String (Item.Name),
Ada.Tags.Expanded_Name (Item'Tag),
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;
|
pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
limited with tileset_h;
with utypes_uuint32_t_h;
limited with context_h;
with System;
package renderer_gl_h is
-- BSD 3-Clause License
-- *
-- * Copyright © 2008-2021, Jice and the libtcod contributors.
-- * All rights reserved.
-- *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions are met:
-- *
-- * 1. Redistributions of source code must retain the above copyright notice,
-- * this list of conditions and the following disclaimer.
-- *
-- * 2. Redistributions in binary form must reproduce the above copyright notice,
-- * this list of conditions and the following disclaimer in the documentation
-- * and/or other materials provided with the distribution.
-- *
-- * 3. Neither the name of 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.
--
type TCOD_TilesetAtlasOpenGL is record
tileset : access tileset_h.TCOD_Tileset; -- renderer_gl.h:40
observer : access tileset_h.TCOD_TilesetObserver; -- renderer_gl.h:41
texture : aliased utypes_uuint32_t_h.uint32_t; -- renderer_gl.h:42
texture_size : aliased int; -- renderer_gl.h:43
texture_columns : aliased int; -- renderer_gl.h:44
texture_rows : aliased int; -- renderer_gl.h:45
end record
with Convention => C_Pass_By_Copy; -- renderer_gl.h:39
type TCOD_RendererGLCommon is record
window : access context_h.SDL_Window; -- renderer_gl.h:49
glcontext : System.Address; -- renderer_gl.h:50
atlas : access TCOD_TilesetAtlasOpenGL; -- renderer_gl.h:51
sdl_subsystems : aliased utypes_uuint32_t_h.uint32_t; -- renderer_gl.h:52
last_offset_x : aliased double; -- renderer_gl.h:54
last_offset_y : aliased double; -- renderer_gl.h:55
last_scale_x : aliased double; -- renderer_gl.h:56
last_scale_y : aliased double; -- renderer_gl.h:57
end record
with Convention => C_Pass_By_Copy; -- renderer_gl.h:48
-- Mouse cursor transform values of the last viewport used.
function TCOD_gl_atlas_new (arg1 : access tileset_h.TCOD_Tileset) return access TCOD_TilesetAtlasOpenGL -- renderer_gl.h:63
with Import => True,
Convention => C,
External_Name => "TCOD_gl_atlas_new";
procedure TCOD_gl_atlas_delete (atlas : access TCOD_TilesetAtlasOpenGL) -- renderer_gl.h:64
with Import => True,
Convention => C,
External_Name => "TCOD_gl_atlas_delete";
-- extern "C"
end renderer_gl_h;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Elements.Formal_Type_Definitions;
with Program.Lexical_Elements;
with Program.Elements.Discrete_Ranges;
with Program.Elements.Component_Definitions;
package Program.Elements.Formal_Constrained_Array_Types is
pragma Pure (Program.Elements.Formal_Constrained_Array_Types);
type Formal_Constrained_Array_Type is
limited interface
and Program.Elements.Formal_Type_Definitions.Formal_Type_Definition;
type Formal_Constrained_Array_Type_Access is
access all Formal_Constrained_Array_Type'Class with Storage_Size => 0;
not overriding function Index_Subtypes
(Self : Formal_Constrained_Array_Type)
return not null Program.Elements.Discrete_Ranges
.Discrete_Range_Vector_Access is abstract;
not overriding function Component_Definition
(Self : Formal_Constrained_Array_Type)
return not null Program.Elements.Component_Definitions
.Component_Definition_Access is abstract;
type Formal_Constrained_Array_Type_Text is limited interface;
type Formal_Constrained_Array_Type_Text_Access is
access all Formal_Constrained_Array_Type_Text'Class
with Storage_Size => 0;
not overriding function To_Formal_Constrained_Array_Type_Text
(Self : aliased in out Formal_Constrained_Array_Type)
return Formal_Constrained_Array_Type_Text_Access is abstract;
not overriding function Array_Token
(Self : Formal_Constrained_Array_Type_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Left_Bracket_Token
(Self : Formal_Constrained_Array_Type_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Right_Bracket_Token
(Self : Formal_Constrained_Array_Type_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Of_Token
(Self : Formal_Constrained_Array_Type_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
end Program.Elements.Formal_Constrained_Array_Types;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S T R I N G S . W I D E _ B O U N D E D --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Wide_Maps;
with Ada.Strings.Wide_Superbounded;
package Ada.Strings.Wide_Bounded is
pragma Preelaborate;
generic
Max : Positive;
-- Maximum length of a Bounded_Wide_String
package Generic_Bounded_Length is
Max_Length : constant Positive := Max;
type Bounded_Wide_String is private;
pragma Preelaborable_Initialization (Bounded_Wide_String);
Null_Bounded_Wide_String : constant Bounded_Wide_String;
subtype Length_Range is Natural range 0 .. Max_Length;
function Length (Source : Bounded_Wide_String) return Length_Range;
--------------------------------------------------------
-- Conversion, Concatenation, and Selection Functions --
--------------------------------------------------------
function To_Bounded_Wide_String
(Source : Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String;
function To_Wide_String
(Source : Bounded_Wide_String) return Wide_String;
procedure Set_Bounded_Wide_String
(Target : out Bounded_Wide_String;
Source : Wide_String;
Drop : Truncation := Error);
pragma Ada_05 (Set_Bounded_Wide_String);
function Append
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String;
function Append
(Left : Bounded_Wide_String;
Right : Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String;
function Append
(Left : Wide_String;
Right : Bounded_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String;
function Append
(Left : Bounded_Wide_String;
Right : Wide_Character;
Drop : Truncation := Error) return Bounded_Wide_String;
function Append
(Left : Wide_Character;
Right : Bounded_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String;
procedure Append
(Source : in out Bounded_Wide_String;
New_Item : Bounded_Wide_String;
Drop : Truncation := Error);
procedure Append
(Source : in out Bounded_Wide_String;
New_Item : Wide_String;
Drop : Truncation := Error);
procedure Append
(Source : in out Bounded_Wide_String;
New_Item : Wide_Character;
Drop : Truncation := Error);
function "&"
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Bounded_Wide_String;
function "&"
(Left : Bounded_Wide_String;
Right : Wide_String) return Bounded_Wide_String;
function "&"
(Left : Wide_String;
Right : Bounded_Wide_String) return Bounded_Wide_String;
function "&"
(Left : Bounded_Wide_String;
Right : Wide_Character) return Bounded_Wide_String;
function "&"
(Left : Wide_Character;
Right : Bounded_Wide_String) return Bounded_Wide_String;
function Element
(Source : Bounded_Wide_String;
Index : Positive) return Wide_Character;
procedure Replace_Element
(Source : in out Bounded_Wide_String;
Index : Positive;
By : Wide_Character);
function Slice
(Source : Bounded_Wide_String;
Low : Positive;
High : Natural) return Wide_String;
function Bounded_Slice
(Source : Bounded_Wide_String;
Low : Positive;
High : Natural) return Bounded_Wide_String;
pragma Ada_05 (Bounded_Slice);
procedure Bounded_Slice
(Source : Bounded_Wide_String;
Target : out Bounded_Wide_String;
Low : Positive;
High : Natural);
pragma Ada_05 (Bounded_Slice);
function "="
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Boolean;
function "="
(Left : Bounded_Wide_String;
Right : Wide_String) return Boolean;
function "="
(Left : Wide_String;
Right : Bounded_Wide_String) return Boolean;
function "<"
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Boolean;
function "<"
(Left : Bounded_Wide_String;
Right : Wide_String) return Boolean;
function "<"
(Left : Wide_String;
Right : Bounded_Wide_String) return Boolean;
function "<="
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Boolean;
function "<="
(Left : Bounded_Wide_String;
Right : Wide_String) return Boolean;
function "<="
(Left : Wide_String;
Right : Bounded_Wide_String) return Boolean;
function ">"
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Boolean;
function ">"
(Left : Bounded_Wide_String;
Right : Wide_String) return Boolean;
function ">"
(Left : Wide_String;
Right : Bounded_Wide_String) return Boolean;
function ">="
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Boolean;
function ">="
(Left : Bounded_Wide_String;
Right : Wide_String) return Boolean;
function ">="
(Left : Wide_String;
Right : Bounded_Wide_String) return Boolean;
----------------------
-- Search Functions --
----------------------
function Index
(Source : Bounded_Wide_String;
Pattern : Wide_String;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
return Natural;
function Index
(Source : Bounded_Wide_String;
Pattern : Wide_String;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
function Index
(Source : Bounded_Wide_String;
Set : Wide_Maps.Wide_Character_Set;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
function Index
(Source : Bounded_Wide_String;
Pattern : Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
return Natural;
pragma Ada_05 (Index);
function Index
(Source : Bounded_Wide_String;
Pattern : Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
pragma Ada_05 (Index);
function Index
(Source : Bounded_Wide_String;
Set : Wide_Maps.Wide_Character_Set;
From : Positive;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
pragma Ada_05 (Index);
function Index_Non_Blank
(Source : Bounded_Wide_String;
Going : Direction := Forward) return Natural;
function Index_Non_Blank
(Source : Bounded_Wide_String;
From : Positive;
Going : Direction := Forward) return Natural;
pragma Ada_05 (Index_Non_Blank);
function Count
(Source : Bounded_Wide_String;
Pattern : Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
return Natural;
function Count
(Source : Bounded_Wide_String;
Pattern : Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
function Count
(Source : Bounded_Wide_String;
Set : Wide_Maps.Wide_Character_Set) return Natural;
procedure Find_Token
(Source : Bounded_Wide_String;
Set : Wide_Maps.Wide_Character_Set;
From : Positive;
Test : Membership;
First : out Positive;
Last : out Natural);
pragma Ada_2012 (Find_Token);
procedure Find_Token
(Source : Bounded_Wide_String;
Set : Wide_Maps.Wide_Character_Set;
Test : Membership;
First : out Positive;
Last : out Natural);
------------------------------------
-- String Translation Subprograms --
------------------------------------
function Translate
(Source : Bounded_Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping)
return Bounded_Wide_String;
procedure Translate
(Source : in out Bounded_Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping);
function Translate
(Source : Bounded_Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping_Function)
return Bounded_Wide_String;
procedure Translate
(Source : in out Bounded_Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping_Function);
---------------------------------------
-- String Transformation Subprograms --
---------------------------------------
function Replace_Slice
(Source : Bounded_Wide_String;
Low : Positive;
High : Natural;
By : Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String;
procedure Replace_Slice
(Source : in out Bounded_Wide_String;
Low : Positive;
High : Natural;
By : Wide_String;
Drop : Truncation := Error);
function Insert
(Source : Bounded_Wide_String;
Before : Positive;
New_Item : Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String;
procedure Insert
(Source : in out Bounded_Wide_String;
Before : Positive;
New_Item : Wide_String;
Drop : Truncation := Error);
function Overwrite
(Source : Bounded_Wide_String;
Position : Positive;
New_Item : Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String;
procedure Overwrite
(Source : in out Bounded_Wide_String;
Position : Positive;
New_Item : Wide_String;
Drop : Truncation := Error);
function Delete
(Source : Bounded_Wide_String;
From : Positive;
Through : Natural) return Bounded_Wide_String;
procedure Delete
(Source : in out Bounded_Wide_String;
From : Positive;
Through : Natural);
---------------------------------
-- String Selector Subprograms --
---------------------------------
function Trim
(Source : Bounded_Wide_String;
Side : Trim_End) return Bounded_Wide_String;
procedure Trim
(Source : in out Bounded_Wide_String;
Side : Trim_End);
function Trim
(Source : Bounded_Wide_String;
Left : Wide_Maps.Wide_Character_Set;
Right : Wide_Maps.Wide_Character_Set) return Bounded_Wide_String;
procedure Trim
(Source : in out Bounded_Wide_String;
Left : Wide_Maps.Wide_Character_Set;
Right : Wide_Maps.Wide_Character_Set);
function Head
(Source : Bounded_Wide_String;
Count : Natural;
Pad : Wide_Character := Wide_Space;
Drop : Truncation := Error) return Bounded_Wide_String;
procedure Head
(Source : in out Bounded_Wide_String;
Count : Natural;
Pad : Wide_Character := Wide_Space;
Drop : Truncation := Error);
function Tail
(Source : Bounded_Wide_String;
Count : Natural;
Pad : Wide_Character := Wide_Space;
Drop : Truncation := Error) return Bounded_Wide_String;
procedure Tail
(Source : in out Bounded_Wide_String;
Count : Natural;
Pad : Wide_Character := Wide_Space;
Drop : Truncation := Error);
------------------------------------
-- String Constructor Subprograms --
------------------------------------
function "*"
(Left : Natural;
Right : Wide_Character) return Bounded_Wide_String;
function "*"
(Left : Natural;
Right : Wide_String) return Bounded_Wide_String;
function "*"
(Left : Natural;
Right : Bounded_Wide_String) return Bounded_Wide_String;
function Replicate
(Count : Natural;
Item : Wide_Character;
Drop : Truncation := Error) return Bounded_Wide_String;
function Replicate
(Count : Natural;
Item : Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String;
function Replicate
(Count : Natural;
Item : Bounded_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String;
private
-- Most of the implementation is in the separate non generic package
-- Ada.Strings.Wide_Superbounded. Type Bounded_Wide_String is derived
-- from type Wide_Superbounded.Super_String with the maximum length
-- constraint. In almost all cases, the routines in Wide_Superbounded
-- can be called with no requirement to pass the maximum length
-- explicitly, since there is at least one Bounded_Wide_String argument
-- from which the maximum length can be obtained. For all such
-- routines, the implementation in this private part is simply a
-- renaming of the corresponding routine in the super bouded package.
-- The five exceptions are the * and Replicate routines operating on
-- character values. For these cases, we have a routine in the body
-- that calls the superbounded routine passing the maximum length
-- explicitly as an extra parameter.
type Bounded_Wide_String is
new Wide_Superbounded.Super_String (Max_Length);
-- Deriving Bounded_Wide_String from Wide_Superbounded.Super_String is
-- the real trick, it ensures that the type Bounded_Wide_String
-- declared in the generic instantiation is compatible with the
-- Super_String type declared in the Wide_Superbounded package.
Null_Bounded_Wide_String : constant Bounded_Wide_String :=
(Max_Length => Max_Length,
Current_Length => 0,
Data =>
(1 .. Max_Length =>
Wide_Superbounded.Wide_NUL));
pragma Inline (To_Bounded_Wide_String);
procedure Set_Bounded_Wide_String
(Target : out Bounded_Wide_String;
Source : Wide_String;
Drop : Truncation := Error)
renames Set_Super_String;
function Length
(Source : Bounded_Wide_String) return Length_Range
renames Super_Length;
function To_Wide_String
(Source : Bounded_Wide_String) return Wide_String
renames Super_To_String;
function Append
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String
renames Super_Append;
function Append
(Left : Bounded_Wide_String;
Right : Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String
renames Super_Append;
function Append
(Left : Wide_String;
Right : Bounded_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String
renames Super_Append;
function Append
(Left : Bounded_Wide_String;
Right : Wide_Character;
Drop : Truncation := Error) return Bounded_Wide_String
renames Super_Append;
function Append
(Left : Wide_Character;
Right : Bounded_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String
renames Super_Append;
procedure Append
(Source : in out Bounded_Wide_String;
New_Item : Bounded_Wide_String;
Drop : Truncation := Error)
renames Super_Append;
procedure Append
(Source : in out Bounded_Wide_String;
New_Item : Wide_String;
Drop : Truncation := Error)
renames Super_Append;
procedure Append
(Source : in out Bounded_Wide_String;
New_Item : Wide_Character;
Drop : Truncation := Error)
renames Super_Append;
function "&"
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Bounded_Wide_String
renames Concat;
function "&"
(Left : Bounded_Wide_String;
Right : Wide_String) return Bounded_Wide_String
renames Concat;
function "&"
(Left : Wide_String;
Right : Bounded_Wide_String) return Bounded_Wide_String
renames Concat;
function "&"
(Left : Bounded_Wide_String;
Right : Wide_Character) return Bounded_Wide_String
renames Concat;
function "&"
(Left : Wide_Character;
Right : Bounded_Wide_String) return Bounded_Wide_String
renames Concat;
function Element
(Source : Bounded_Wide_String;
Index : Positive) return Wide_Character
renames Super_Element;
procedure Replace_Element
(Source : in out Bounded_Wide_String;
Index : Positive;
By : Wide_Character)
renames Super_Replace_Element;
function Slice
(Source : Bounded_Wide_String;
Low : Positive;
High : Natural) return Wide_String
renames Super_Slice;
function Bounded_Slice
(Source : Bounded_Wide_String;
Low : Positive;
High : Natural) return Bounded_Wide_String
renames Super_Slice;
procedure Bounded_Slice
(Source : Bounded_Wide_String;
Target : out Bounded_Wide_String;
Low : Positive;
High : Natural)
renames Super_Slice;
overriding function "="
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Boolean
renames Equal;
function "="
(Left : Bounded_Wide_String;
Right : Wide_String) return Boolean
renames Equal;
function "="
(Left : Wide_String;
Right : Bounded_Wide_String) return Boolean
renames Equal;
function "<"
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Boolean
renames Less;
function "<"
(Left : Bounded_Wide_String;
Right : Wide_String) return Boolean
renames Less;
function "<"
(Left : Wide_String;
Right : Bounded_Wide_String) return Boolean
renames Less;
function "<="
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Boolean
renames Less_Or_Equal;
function "<="
(Left : Bounded_Wide_String;
Right : Wide_String) return Boolean
renames Less_Or_Equal;
function "<="
(Left : Wide_String;
Right : Bounded_Wide_String) return Boolean
renames Less_Or_Equal;
function ">"
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Boolean
renames Greater;
function ">"
(Left : Bounded_Wide_String;
Right : Wide_String) return Boolean
renames Greater;
function ">"
(Left : Wide_String;
Right : Bounded_Wide_String) return Boolean
renames Greater;
function ">="
(Left : Bounded_Wide_String;
Right : Bounded_Wide_String) return Boolean
renames Greater_Or_Equal;
function ">="
(Left : Bounded_Wide_String;
Right : Wide_String) return Boolean
renames Greater_Or_Equal;
function ">="
(Left : Wide_String;
Right : Bounded_Wide_String) return Boolean
renames Greater_Or_Equal;
function Index
(Source : Bounded_Wide_String;
Pattern : Wide_String;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
return Natural
renames Super_Index;
function Index
(Source : Bounded_Wide_String;
Pattern : Wide_String;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural
renames Super_Index;
function Index
(Source : Bounded_Wide_String;
Set : Wide_Maps.Wide_Character_Set;
Test : Membership := Inside;
Going : Direction := Forward) return Natural
renames Super_Index;
function Index
(Source : Bounded_Wide_String;
Pattern : Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
return Natural
renames Super_Index;
function Index
(Source : Bounded_Wide_String;
Pattern : Wide_String;
From : Positive;
Going : Direction := Forward;
Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural
renames Super_Index;
function Index
(Source : Bounded_Wide_String;
Set : Wide_Maps.Wide_Character_Set;
From : Positive;
Test : Membership := Inside;
Going : Direction := Forward) return Natural
renames Super_Index;
function Index_Non_Blank
(Source : Bounded_Wide_String;
Going : Direction := Forward) return Natural
renames Super_Index_Non_Blank;
function Index_Non_Blank
(Source : Bounded_Wide_String;
From : Positive;
Going : Direction := Forward) return Natural
renames Super_Index_Non_Blank;
function Count
(Source : Bounded_Wide_String;
Pattern : Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
return Natural
renames Super_Count;
function Count
(Source : Bounded_Wide_String;
Pattern : Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural
renames Super_Count;
function Count
(Source : Bounded_Wide_String;
Set : Wide_Maps.Wide_Character_Set) return Natural
renames Super_Count;
procedure Find_Token
(Source : Bounded_Wide_String;
Set : Wide_Maps.Wide_Character_Set;
From : Positive;
Test : Membership;
First : out Positive;
Last : out Natural)
renames Super_Find_Token;
procedure Find_Token
(Source : Bounded_Wide_String;
Set : Wide_Maps.Wide_Character_Set;
Test : Membership;
First : out Positive;
Last : out Natural)
renames Super_Find_Token;
function Translate
(Source : Bounded_Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping)
return Bounded_Wide_String
renames Super_Translate;
procedure Translate
(Source : in out Bounded_Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping)
renames Super_Translate;
function Translate
(Source : Bounded_Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping_Function)
return Bounded_Wide_String
renames Super_Translate;
procedure Translate
(Source : in out Bounded_Wide_String;
Mapping : Wide_Maps.Wide_Character_Mapping_Function)
renames Super_Translate;
function Replace_Slice
(Source : Bounded_Wide_String;
Low : Positive;
High : Natural;
By : Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String
renames Super_Replace_Slice;
procedure Replace_Slice
(Source : in out Bounded_Wide_String;
Low : Positive;
High : Natural;
By : Wide_String;
Drop : Truncation := Error)
renames Super_Replace_Slice;
function Insert
(Source : Bounded_Wide_String;
Before : Positive;
New_Item : Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String
renames Super_Insert;
procedure Insert
(Source : in out Bounded_Wide_String;
Before : Positive;
New_Item : Wide_String;
Drop : Truncation := Error)
renames Super_Insert;
function Overwrite
(Source : Bounded_Wide_String;
Position : Positive;
New_Item : Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String
renames Super_Overwrite;
procedure Overwrite
(Source : in out Bounded_Wide_String;
Position : Positive;
New_Item : Wide_String;
Drop : Truncation := Error)
renames Super_Overwrite;
function Delete
(Source : Bounded_Wide_String;
From : Positive;
Through : Natural) return Bounded_Wide_String
renames Super_Delete;
procedure Delete
(Source : in out Bounded_Wide_String;
From : Positive;
Through : Natural)
renames Super_Delete;
function Trim
(Source : Bounded_Wide_String;
Side : Trim_End) return Bounded_Wide_String
renames Super_Trim;
procedure Trim
(Source : in out Bounded_Wide_String;
Side : Trim_End)
renames Super_Trim;
function Trim
(Source : Bounded_Wide_String;
Left : Wide_Maps.Wide_Character_Set;
Right : Wide_Maps.Wide_Character_Set) return Bounded_Wide_String
renames Super_Trim;
procedure Trim
(Source : in out Bounded_Wide_String;
Left : Wide_Maps.Wide_Character_Set;
Right : Wide_Maps.Wide_Character_Set)
renames Super_Trim;
function Head
(Source : Bounded_Wide_String;
Count : Natural;
Pad : Wide_Character := Wide_Space;
Drop : Truncation := Error) return Bounded_Wide_String
renames Super_Head;
procedure Head
(Source : in out Bounded_Wide_String;
Count : Natural;
Pad : Wide_Character := Wide_Space;
Drop : Truncation := Error)
renames Super_Head;
function Tail
(Source : Bounded_Wide_String;
Count : Natural;
Pad : Wide_Character := Wide_Space;
Drop : Truncation := Error) return Bounded_Wide_String
renames Super_Tail;
procedure Tail
(Source : in out Bounded_Wide_String;
Count : Natural;
Pad : Wide_Character := Wide_Space;
Drop : Truncation := Error)
renames Super_Tail;
function "*"
(Left : Natural;
Right : Bounded_Wide_String) return Bounded_Wide_String
renames Times;
function Replicate
(Count : Natural;
Item : Bounded_Wide_String;
Drop : Truncation := Error) return Bounded_Wide_String
renames Super_Replicate;
end Generic_Bounded_Length;
end Ada.Strings.Wide_Bounded;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>Loop_3_proc</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>3</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>p_p2_mul1_stencil_stream_V_value_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName>FIFO_SRL</coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>hw_output_V_value_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream&lt;AxiPackedStencil&lt;unsigned int, 1, 1, 1, 1&gt; &gt;.V.value.V</originalName>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>hw_output_V_last_V</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>stream&lt;AxiPackedStencil&lt;unsigned int, 1, 1, 1, 1&gt; &gt;.V.last.V</originalName>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<direction>1</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>23</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_4">
<Value>
<Obj>
<type>0</type>
<id>6</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>8</id>
<name>indvar_flatten</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>21</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>85</item>
<item>86</item>
<item>87</item>
<item>88</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>9</id>
<name>p_hw_output_y_scan_1</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>213</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</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>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>213</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>89</item>
<item>90</item>
<item>91</item>
<item>92</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>10</id>
<name>p_hw_output_x_scan_2</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>_hw_output_x___scan_dim_0</originalName>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>93</item>
<item>94</item>
<item>95</item>
<item>96</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>exitcond_flatten</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName>exitcond_flatten_fu_114_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>97</item>
<item>99</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name>indvar_flatten_next</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName>indvar_flatten_next_fu_120_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>21</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>100</item>
<item>102</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>103</item>
<item>104</item>
<item>105</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name>exitcond7</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>213</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>213</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>exitcond7_fu_126_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>38</item>
<item>40</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>17</id>
<name>p_hw_output_x_scan_s</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>213</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>213</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>p_hw_output_x_scan_s_fu_132_p3</rtlName>
<coreName/>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>41</item>
<item>43</item>
<item>44</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>18</id>
<name>p_hw_output_y_scan_2</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>211</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>211</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>p_hw_output_y_scan_2_fu_146_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>45</item>
<item>47</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>19</id>
<name>tmp_7_mid1</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>229</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>229</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_7_mid1_fu_170_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>48</item>
<item>50</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name>tmp_1</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>229</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>229</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_1_fu_152_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>51</item>
<item>52</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>tmp_7_mid2</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>229</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>229</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_7_mid2_fu_175_p3</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>53</item>
<item>54</item>
<item>55</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name>p_hw_output_y_scan_s</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>213</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>213</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>p_hw_output_y_scan_s_fu_158_p3</rtlName>
<coreName/>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>56</item>
<item>57</item>
<item>58</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>tmp_value_V_5</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>219</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>219</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.value.V</originalName>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>60</item>
<item>61</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>tmp_3</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>225</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>225</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_3_fu_180_p4</rtlName>
<coreName/>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>63</item>
<item>64</item>
<item>66</item>
<item>68</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>27</id>
<name>p_405</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>225</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>225</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>_405</originalName>
<rtlName>hw_output_V_value_V</rtlName>
<coreName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name>tmp_2</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>229</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>229</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_2_fu_165_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>70</item>
<item>72</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>29</id>
<name>tmp_last_V</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>229</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>229</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.last.V</originalName>
<rtlName>hw_output_V_last_V</rtlName>
<coreName/>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>73</item>
<item>74</item>
</oprand_edges>
<opcode>and</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name/>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>234</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>234</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>5</count>
<item_version>0</item_version>
<item>76</item>
<item>77</item>
<item>78</item>
<item>79</item>
<item>80</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>32</id>
<name>p_hw_output_x_scan_1</name>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>213</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>213</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>_hw_output_x___scan_dim_0</originalName>
<rtlName>p_hw_output_x_scan_1_fu_140_p2</rtlName>
<coreName/>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>81</item>
<item>82</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>33</id>
<name/>
<fileName>hls_target.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>213</lineNumber>
<contextFuncName>hls_target</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_target.cpp</first>
<second>hls_target</second>
</first>
<second>213</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>83</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>10</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_27">
<Value>
<Obj>
<type>2</type>
<id>39</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>1917</content>
</item>
<item class_id_reference="16" object_id="_28">
<Value>
<Obj>
<type>2</type>
<id>42</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_29">
<Value>
<Obj>
<type>2</type>
<id>46</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_30">
<Value>
<Obj>
<type>2</type>
<id>49</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>1076</content>
</item>
<item class_id_reference="16" object_id="_31">
<Value>
<Obj>
<type>2</type>
<id>65</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>3</content>
</item>
<item class_id_reference="16" object_id="_32">
<Value>
<Obj>
<type>2</type>
<id>67</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>31</content>
</item>
<item class_id_reference="16" object_id="_33">
<Value>
<Obj>
<type>2</type>
<id>71</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>1916</content>
</item>
<item class_id_reference="16" object_id="_34">
<Value>
<Obj>
<type>2</type>
<id>84</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>21</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_35">
<Value>
<Obj>
<type>2</type>
<id>98</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>21</bitwidth>
</Value>
<const_type>0</const_type>
<content>2064609</content>
</item>
<item class_id_reference="16" object_id="_36">
<Value>
<Obj>
<type>2</type>
<id>101</id>
<name>empty</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<bitwidth>21</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_37">
<Obj>
<type>3</type>
<id>7</id>
<name>newFuncRoot</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_38">
<Obj>
<type>3</type>
<id>14</id>
<name>.preheader</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>6</count>
<item_version>0</item_version>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_39">
<Obj>
<type>3</type>
<id>34</id>
<name>.preheader37</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>15</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>25</item>
<item>26</item>
<item>27</item>
<item>28</item>
<item>29</item>
<item>30</item>
<item>32</item>
<item>33</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_40">
<Obj>
<type>3</type>
<id>36</id>
<name>.exitStub</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>57</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_41">
<id>37</id>
<edge_type>2</edge_type>
<source_obj>14</source_obj>
<sink_obj>6</sink_obj>
</item>
<item class_id_reference="20" object_id="_42">
<id>38</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_43">
<id>40</id>
<edge_type>1</edge_type>
<source_obj>39</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_44">
<id>41</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_45">
<id>43</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_46">
<id>44</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_47">
<id>45</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_48">
<id>47</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_49">
<id>48</id>
<edge_type>1</edge_type>
<source_obj>18</source_obj>
<sink_obj>19</sink_obj>
</item>
<item class_id_reference="20" object_id="_50">
<id>50</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>19</sink_obj>
</item>
<item class_id_reference="20" object_id="_51">
<id>51</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_52">
<id>52</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_53">
<id>53</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_54">
<id>54</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_55">
<id>55</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_56">
<id>56</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_57">
<id>57</id>
<edge_type>1</edge_type>
<source_obj>18</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_58">
<id>58</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_59">
<id>61</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_60">
<id>64</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_61">
<id>66</id>
<edge_type>1</edge_type>
<source_obj>65</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_62">
<id>68</id>
<edge_type>1</edge_type>
<source_obj>67</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_63">
<id>69</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_64">
<id>70</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_65">
<id>72</id>
<edge_type>1</edge_type>
<source_obj>71</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_66">
<id>73</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_67">
<id>74</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_68">
<id>77</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_69">
<id>78</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_70">
<id>79</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_71">
<id>80</id>
<edge_type>1</edge_type>
<source_obj>29</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_72">
<id>81</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>32</sink_obj>
</item>
<item class_id_reference="20" object_id="_73">
<id>82</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>32</sink_obj>
</item>
<item class_id_reference="20" object_id="_74">
<id>83</id>
<edge_type>2</edge_type>
<source_obj>14</source_obj>
<sink_obj>33</sink_obj>
</item>
<item class_id_reference="20" object_id="_75">
<id>85</id>
<edge_type>1</edge_type>
<source_obj>84</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_76">
<id>86</id>
<edge_type>2</edge_type>
<source_obj>7</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_77">
<id>87</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_78">
<id>88</id>
<edge_type>2</edge_type>
<source_obj>34</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_79">
<id>89</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_80">
<id>90</id>
<edge_type>2</edge_type>
<source_obj>7</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_81">
<id>91</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_82">
<id>92</id>
<edge_type>2</edge_type>
<source_obj>34</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_83">
<id>93</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_84">
<id>94</id>
<edge_type>2</edge_type>
<source_obj>7</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_85">
<id>95</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_86">
<id>96</id>
<edge_type>2</edge_type>
<source_obj>34</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_87">
<id>97</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_88">
<id>99</id>
<edge_type>1</edge_type>
<source_obj>98</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_89">
<id>100</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_90">
<id>102</id>
<edge_type>1</edge_type>
<source_obj>101</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_91">
<id>103</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_92">
<id>104</id>
<edge_type>2</edge_type>
<source_obj>34</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_93">
<id>105</id>
<edge_type>2</edge_type>
<source_obj>36</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_94">
<id>165</id>
<edge_type>2</edge_type>
<source_obj>7</source_obj>
<sink_obj>14</sink_obj>
</item>
<item class_id_reference="20" object_id="_95">
<id>166</id>
<edge_type>2</edge_type>
<source_obj>14</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_96">
<id>167</id>
<edge_type>2</edge_type>
<source_obj>14</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_97">
<id>168</id>
<edge_type>2</edge_type>
<source_obj>34</source_obj>
<sink_obj>14</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="_98">
<mId>1</mId>
<mTag>Loop_3_proc</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>2064613</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_99">
<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>7</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_100">
<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>2</count>
<item_version>0</item_version>
<item>14</item>
<item>34</item>
</basic_blocks>
<mII>1</mII>
<mDepth>4</mDepth>
<mMinTripCount>2064609</mMinTripCount>
<mMaxTripCount>2064609</mMaxTripCount>
<mMinLatency>2064611</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
<item class_id_reference="22" object_id="_101">
<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>36</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_102">
<states class_id="25" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_103">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_104">
<id>4</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_105">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_106">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_107">
<id>2</id>
<operations>
<count>9</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_108">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_109">
<id>9</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_110">
<id>10</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_111">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_112">
<id>12</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_113">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_114">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_115">
<id>17</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_116">
<id>32</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_117">
<id>3</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_118">
<id>18</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_119">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_120">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_121">
<id>28</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_122">
<id>4</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_123">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_124">
<id>5</id>
<operations>
<count>11</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_125">
<id>15</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_126">
<id>21</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_127">
<id>23</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_128">
<id>24</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_129">
<id>25</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_130">
<id>26</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_131">
<id>27</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_132">
<id>29</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_133">
<id>30</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_134">
<id>31</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_135">
<id>33</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_136">
<id>6</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_137">
<id>35</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_138">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>20</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="_139">
<inState>3</inState>
<outState>4</outState>
<condition>
<id>30</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="_140">
<inState>4</inState>
<outState>5</outState>
<condition>
<id>31</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="_141">
<inState>5</inState>
<outState>2</outState>
<condition>
<id>32</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="_142">
<inState>2</inState>
<outState>6</outState>
<condition>
<id>29</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>11</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_143">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>33</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>11</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
</transitions>
</fsm>
<res class_id="36" tracking_level="1" version="0" object_id="_144">
<dp_component_resource class_id="37" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_resource>
<dp_expression_resource>
<count>19</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>ap_block_pp0_stage0_flag00001001 ( and ) </first>
<second class_id="39" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="40" tracking_level="0" version="0">
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_pp0_stage0_flag00011001 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_state1 ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_state5_io ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_block_state5_pp0_stage0_iter3 ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_enable_pp0 ( xor ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>2</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1 ( xor ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>2</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>exitcond7_fu_126_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>11</second>
</item>
<item>
<first>(1P1)</first>
<second>9</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>6</second>
</item>
</second>
</item>
<item>
<first>exitcond_flatten_fu_114_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>21</second>
</item>
<item>
<first>(1P1)</first>
<second>16</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>13</second>
</item>
</second>
</item>
<item>
<first>hw_output_V_last_V ( and ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>indvar_flatten_next_fu_120_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>21</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>68</second>
</item>
<item>
<first>LUT</first>
<second>26</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_1_fu_140_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>11</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>38</second>
</item>
<item>
<first>LUT</first>
<second>16</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_s_fu_132_p3 ( select ) </first>
<second>
<count>5</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>(2P2)</first>
<second>11</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>11</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_2_fu_146_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>11</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>38</second>
</item>
<item>
<first>LUT</first>
<second>16</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_s_fu_158_p3 ( select ) </first>
<second>
<count>5</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>11</second>
</item>
<item>
<first>(2P2)</first>
<second>11</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>11</second>
</item>
</second>
</item>
<item>
<first>tmp_1_fu_152_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>11</second>
</item>
<item>
<first>(1P1)</first>
<second>11</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>6</second>
</item>
</second>
</item>
<item>
<first>tmp_2_fu_165_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>11</second>
</item>
<item>
<first>(1P1)</first>
<second>9</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>6</second>
</item>
</second>
</item>
<item>
<first>tmp_7_mid1_fu_170_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>11</second>
</item>
<item>
<first>(1P1)</first>
<second>11</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>6</second>
</item>
</second>
</item>
<item>
<first>tmp_7_mid2_fu_175_p3 ( select ) </first>
<second>
<count>5</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>(2P2)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
</dp_expression_resource>
<dp_fifo_resource>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_resource>
<dp_memory_resource>
<count>0</count>
<item_version>0</item_version>
</dp_memory_resource>
<dp_multiplexer_resource>
<count>12</count>
<item_version>0</item_version>
<item>
<first>ap_NS_fsm</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>4</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>4</second>
</item>
<item>
<first>LUT</first>
<second>21</second>
</item>
</second>
</item>
<item>
<first>ap_done</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter3</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>ap_sig_ioackin_hw_output_V_value_V_ap_ack</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>hw_output_V_last_V_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>hw_output_V_value_V_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>indvar_flatten_reg_80</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>21</second>
</item>
<item>
<first>(2Count)</first>
<second>42</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_2_reg_103</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>11</second>
</item>
<item>
<first>(2Count)</first>
<second>22</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_1_phi_fu_95_p4</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>11</second>
</item>
<item>
<first>(2Count)</first>
<second>22</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_1_reg_91</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>11</second>
</item>
<item>
<first>(2Count)</first>
<second>22</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>p_p2_mul1_stencil_stream_V_value_V_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
</dp_multiplexer_resource>
<dp_register_resource>
<count>21</count>
<item_version>0</item_version>
<item>
<first>ap_CS_fsm</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>ap_done_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter0</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter2</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter3</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_reg_ioackin_hw_output_V_last_V_ap_ack</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_reg_ioackin_hw_output_V_value_V_ap_ack</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_reg_pp0_iter2_tmp_1_reg_231</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>ap_reg_pp0_iter2_tmp_2_reg_241</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>exitcond7_reg_210</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>exitcond_flatten_reg_201</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>indvar_flatten_reg_80</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>21</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>21</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_2_reg_103</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>11</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>11</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_s_reg_216</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>11</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>11</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_1_reg_91</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>11</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>11</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_2_reg_226</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>11</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>11</second>
</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_s_reg_236</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>11</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>11</second>
</item>
</second>
</item>
<item>
<first>tmp_1_reg_231</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>tmp_2_reg_241</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>tmp_7_mid1_reg_246</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
</dp_register_resource>
<dp_component_map class_id="41" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_map>
<dp_expression_map>
<count>12</count>
<item_version>0</item_version>
<item class_id="42" tracking_level="0" version="0">
<first>exitcond7_fu_126_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>exitcond_flatten_fu_114_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>hw_output_V_last_V ( and ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>indvar_flatten_next_fu_120_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_1_fu_140_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_s_fu_132_p3 ( select ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_2_fu_146_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_s_fu_158_p3 ( select ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>tmp_1_fu_152_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>tmp_2_fu_165_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>tmp_7_mid1_fu_170_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
<item>
<first>tmp_7_mid2_fu_175_p3 ( select ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
</dp_expression_map>
<dp_fifo_map>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_map>
<dp_memory_map>
<count>0</count>
<item_version>0</item_version>
</dp_memory_map>
</res>
<node_label_latency class_id="43" tracking_level="0" version="0">
<count>23</count>
<item_version>0</item_version>
<item class_id="44" tracking_level="0" version="0">
<first>6</first>
<second class_id="45" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>8</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>9</first>
<second>
<first>1</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>16</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>18</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>19</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>4</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>4</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>32</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>33</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="46" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="47" tracking_level="0" version="0">
<first>7</first>
<second class_id="48" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>14</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>34</first>
<second>
<first>1</first>
<second>4</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="49" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="50" tracking_level="1" version="0" object_id="_145">
<region_name>Loop 1</region_name>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>14</item>
<item>34</item>
</basic_blocks>
<nodes>
<count>0</count>
<item_version>0</item_version>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>8</region_type>
<interval>1</interval>
<pipe_depth>4</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="51" tracking_level="0" version="0">
<count>19</count>
<item_version>0</item_version>
<item class_id="52" tracking_level="0" version="0">
<first>64</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>70</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>84</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>95</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>107</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>114</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>120</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>126</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>132</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>140</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>146</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>152</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>158</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>165</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>170</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
<item>
<first>175</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>180</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>190</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>195</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="54" tracking_level="0" version="0">
<count>17</count>
<item_version>0</item_version>
<item class_id="55" tracking_level="0" version="0">
<first>exitcond7_fu_126</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>exitcond_flatten_fu_114</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>indvar_flatten_next_fu_120</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>indvar_flatten_phi_fu_84</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>p_405_fu_190</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_1_fu_140</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_2_phi_fu_107</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_s_fu_132</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_1_phi_fu_95</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_2_fu_146</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_s_fu_158</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>tmp_1_fu_152</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>tmp_2_fu_165</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>tmp_3_fu_180</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>tmp_7_mid1_fu_170</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
<item>
<first>tmp_7_mid2_fu_175</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>tmp_last_V_fu_195</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>2</count>
<item_version>0</item_version>
<item>
<first>StgValue_32_write_fu_70</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>tmp_value_V_5_read_fu_64</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="56" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>13</count>
<item_version>0</item_version>
<item>
<first>80</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>91</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>201</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>205</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>210</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>216</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>221</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>226</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>231</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>236</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>28</item>
</second>
</item>
<item>
<first>246</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>13</count>
<item_version>0</item_version>
<item>
<first>exitcond7_reg_210</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>exitcond_flatten_reg_201</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>indvar_flatten_next_reg_205</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>indvar_flatten_reg_80</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_1_reg_221</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_2_reg_103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_s_reg_216</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_1_reg_91</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_2_reg_226</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_s_reg_236</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>tmp_1_reg_231</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>tmp_2_reg_241</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>tmp_7_mid1_reg_246</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>3</count>
<item_version>0</item_version>
<item>
<first>80</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>91</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
<item>
<first>103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>3</count>
<item_version>0</item_version>
<item>
<first>indvar_flatten_reg_80</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>p_hw_output_x_scan_2_reg_103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>p_hw_output_y_scan_1_reg_91</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="57" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="58" tracking_level="0" version="0">
<first>hw_output_V_last_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
</second>
</item>
<item>
<first>hw_output_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>write</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
</second>
</item>
<item>
<first>p_p2_mul1_stencil_stream_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="59" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="60" tracking_level="0" version="0">
<first>1</first>
<second>FIFO_SRL</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
-----------------------------------------------------------------------
-- users-tests-helpers -- Helpers for user creation
-- Copyright (C) 2011, 2012, 2013, 2014, 2017, 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Finalization;
with Security.Contexts;
with ASF.Requests.Mockup;
with AWA.Users.Models;
with AWA.Users.Services;
with AWA.Services.Contexts;
with AWA.Users.Principals;
package AWA.Tests.Helpers.Users is
type Test_User is new Ada.Finalization.Limited_Controlled with record
Context : AWA.Services.Contexts.Service_Context;
Manager : AWA.Users.Services.User_Service_Access := null;
User : AWA.Users.Models.User_Ref;
Email : AWA.Users.Models.Email_Ref;
Session : AWA.Users.Models.Session_Ref;
Principal : AWA.Users.Principals.Principal_Access;
end record;
-- Initialize the service context.
procedure Initialize (Principal : in out Test_User);
-- Create a test user associated with the given email address.
-- Get an open session for that user. If the user already exists, no error is reported.
procedure Create_User (Principal : in out Test_User;
Email : in String);
-- Create a test user for a new test and get an open session.
procedure Create_User (Principal : in out Test_User);
-- Find the access key associated with a user (if any).
procedure Find_Access_Key (Principal : in out Test_User;
Email : in String;
Key : in out AWA.Users.Models.Access_Key_Ref);
-- Login a user and create a session
procedure Login (Principal : in out Test_User);
-- Logout the user and closes the current session.
procedure Logout (Principal : in out Test_User);
-- Simulate a user login in the given service context.
procedure Login (Context : in out AWA.Services.Contexts.Service_Context'Class;
Sec_Context : in out Security.Contexts.Security_Context;
Email : in String);
-- Simulate a user login on the request. Upon successful login, a session that is
-- authentified is associated with the request object.
procedure Login (Email : in String;
Request : in out ASF.Requests.Mockup.Request'Class);
-- Setup the context and security context to simulate an anonymous user.
procedure Anonymous (Context : in out AWA.Services.Contexts.Service_Context'Class;
Sec_Context : in out Security.Contexts.Security_Context);
-- Simulate the recovery password process for the given user.
procedure Recover_Password (Email : in String);
overriding
procedure Finalize (Principal : in out Test_User);
-- Cleanup and release the Principal that have been allocated from the Login session
-- but not released because the Logout is not called from the unit test.
procedure Tear_Down;
end AWA.Tests.Helpers.Users;
|
package kv.avm.Log is
Verbose : Boolean := False;
procedure Put(Str : String);
procedure Put_Line(Str : String);
procedure Log_If(Callback : access function return String);
procedure Put_Error(Str : String);
procedure New_Line(Count : Positive := 1);
function Get_Last_Log_Line return String;
function Get_Last_Error_Line return String;
end kv.avm.Log;
|
-- Copyright (c) 1990 Regents of the University of California.
-- All rights reserved.
--
-- The primary authors of ayacc were David Taback and Deepak Tolani.
-- Enhancements were made by Ronald J. Schmalz.
--
-- Send requests for ayacc information to ayacc-info@ics.uci.edu
-- Send bug reports for ayacc to ayacc-bugs@ics.uci.edu
--
-- Redistribution and use in source and binary forms are permitted
-- provided that the above copyright notice and this paragraph are
-- duplicated in all such forms and that any documentation,
-- advertising materials, and other materials related to such
-- distribution and use acknowledge that the software was developed
-- by the University of California, Irvine. The name of the
-- University may not be used to endorse or promote products derived
-- from this software without specific prior written permission.
-- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-- Module : parse_table_body.ada
-- Component of : ayacc
-- Version : 1.2
-- Date : 11/21/86 12:33:16
-- SCCS File : disk21~/rschm/hasee/sccs/ayacc/sccs/sxparse_table_body.ada
-- $Header: parse_table_body.a,v 0.1 86/04/01 15:08:38 ada Exp $
-- $Log: parse_table_body.a,v $
-- Revision 0.1 86/04/01 15:08:38 ada
-- This version fixes some minor bugs with empty grammars
-- and $$ expansion. It also uses vads5.1b enhancements
-- such as pragma inline.
--
--
-- Revision 0.0 86/02/19 18:39:53 ada
--
-- These files comprise the initial version of Ayacc
-- designed and implemented by David Taback and Deepak Tolani.
-- Ayacc has been compiled and tested under the Verdix Ada compiler
-- version 4.06 on a vax 11/750 running Unix 4.2BSD.
--
with LALR_Symbol_Info, LR0_Machine, Symbol_Table, Rule_Table,
Text_IO, Symbol_Info, Verbose_File, Options, Goto_File,
Shift_Reduce_File;
use LALR_Symbol_Info, LR0_Machine, Symbol_Table, Rule_Table,
Text_IO, Symbol_Info, Options;
package body Parse_Table is
SCCS_ID : constant String := "@(#) parse_table_body.ada, Version 1.2";
Rcs_ID : constant String := "$Header: parse_table_body.a,v 0.1 86/04/01 15:08:38 ada Exp $";
Show_Verbose : Boolean; -- Set to options.verbose
--
-- The following declarations are for the "action" table.
--
type Action_Type is (Undefined, Error, Shift, Reduce, Accept_Input);
-- UNDEFINED and ERROR are the same accept you cannot replace
-- ERROR entries by a default reduction.
type Action_Table_Entry(Action : Action_Type := Undefined) is
record
case Action is
when Shift =>
State_ID : Parse_State;
when Reduce =>
Rule_ID : Rule;
when Accept_Input | Error | Undefined =>
null;
end case;
end record;
type Action_Table_Array is
array(Grammar_Symbol range <>) of Action_Table_Entry;
type Action_Table_Array_Pointer is access Action_Table_Array;
Action_Table_Row : Action_Table_Array_Pointer;
Default_Action : Action_Table_Entry;
--
-- The following declarations are for the "goto" table
--
type Goto_Table_Array is
array(Grammar_Symbol range <>) of Parse_State;
type Goto_Table_Array_Pointer is access Goto_Table_Array;
Goto_Table_Row : Goto_Table_Array_Pointer;
--
type Goto_Offset_Array is array(Parse_State range <>) of Integer;
type Goto_Offset_Array_Pointer is access Goto_Offset_Array;
Goto_Offset : Goto_Offset_Array_Pointer;
type Action_Offset_Array is array(Parse_State range <>) of Integer;
type Action_Offset_Array_Pointer is access Action_Offset_Array;
Action_Offset : Action_Offset_Array_Pointer;
--
Error_Code : constant := -3000; -- generated parser must use these
Accept_Code : constant := -3001;
Num_of_Goto_Entries : Integer := 0;
Num_of_Action_Entries : Integer := 0;
Num_Shift_Reduce_Conflicts : Natural := 0;
Num_Reduce_Reduce_Conflicts : Natural := 0;
function Shift_Reduce_Conflicts return Natural is
begin
return Num_Shift_Reduce_Conflicts;
end;
function Reduce_Reduce_Conflicts return Natural is
begin
return Num_Reduce_Reduce_Conflicts;
end;
function Number_of_States return Natural is
begin
return Natural(LR0_Machine.Last_Parse_State + 1);
end;
function Size_of_Goto_Table return Natural is
begin
return Num_of_Goto_Entries;
end;
function Size_of_Action_Table return Natural is
begin
return Num_of_Action_Entries;
end;
procedure Print_Goto_Row_Verbose is
begin
for Sym in Goto_Table_Row.all'range loop
if Goto_Table_Row(Sym) /= Null_Parse_State then
Verbose_File.Write(Ascii.Ht);
Verbose_File.Print_Grammar_Symbol(Sym);
Verbose_File.Write(" " & Ascii.Ht);
Verbose_File.Write_Line
("goto " & Parse_State'Image(Goto_Table_Row(Sym)));
end if;
end loop;
end Print_Goto_Row_Verbose;
procedure Print_Goto_Row(State: in Parse_State) is
S: Parse_State;
begin
Goto_Offset(State) := Num_of_Goto_Entries;
Goto_File.Write_Line
("-- State " & Parse_State'Image(State));
for I in Goto_Table_Row.all'range loop
S := Goto_Table_Row(I);
if S /= -1 then
Goto_File.Write(",");
Goto_File.Write("(" & Grammar_Symbol'Image(I) & "," &
Parse_State'Image(S) & ")" );
Num_of_Goto_Entries := Num_of_Goto_Entries + 1;
if Num_of_Goto_Entries mod 4 = 0 then
Goto_File.Write_Line("");
end if;
end if;
end loop;
Goto_File.Write_Line("");
end Print_Goto_Row;
-----------------------------------------------------------------------
procedure Print_Action_Row(State: in Parse_State) is
Temp : Action_Table_Entry;
X : Integer;
Default : Integer;
function Get_Default_Entry return Integer is
begin
for I in Action_Table_Row.all'range loop
if Action_Table_Row(I).Action = Reduce then
return -Integer(Action_Table_Row(I).Rule_ID);
end if;
end loop;
return Error_Code;
end Get_Default_Entry;
begin
Action_Offset(State) := Num_of_Action_Entries;
Shift_Reduce_File.Write_Line
("-- state " & Parse_State'Image(State));
Default := Get_Default_Entry;
for I in Action_Table_Row.all'range loop
Temp := Action_Table_Row(I);
case Temp.Action is
when Undefined =>
X := Default;
when Shift =>
X := Integer(Temp.State_ID);
when Reduce =>
X := - Integer(Temp.Rule_ID);
when Accept_Input =>
X := Accept_Code;
when Error =>
X := Error_Code;
end case;
if X /= Default then
Shift_Reduce_File.Write(",");
Shift_Reduce_File.Write("(" & Grammar_Symbol'Image(I) & ",");
Shift_Reduce_File.Write(Integer'Image(X) & ")" );
Num_of_Action_Entries := Num_of_Action_Entries + 1;
if Num_of_Action_Entries mod 4 = 0 then
Shift_Reduce_File.Write_Line("");
end if;
if Show_Verbose then
Verbose_File.Write(" " & Ascii.Ht);
Verbose_File.Print_Grammar_Symbol(I);
Verbose_File.Write(" " & Ascii.Ht);
if X = Accept_Code then
Verbose_File.Write_Line("accept");
elsif X = Error_Code then
Verbose_File.Write_Line("error");
elsif X > 0 then -- SHIFT
Verbose_File.Write_Line("shift " & Integer'Image(X));
else -- REDUCE
Verbose_File.Write_Line("reduce " & Integer'Image(-X));
end if;
end if;
end if;
end loop;
if Show_Verbose then
Verbose_File.Write(" " & Ascii.Ht);
Verbose_File.Write("default " & Ascii.Ht);
if Default = Accept_Code then
Verbose_File.Write_Line("accept");
elsif Default = Error_Code then
Verbose_File.Write_Line("error");
else -- reduce. never shift
Verbose_File.Write_Line("reduce " & Integer'Image(-Default));
end if;
end if;
Shift_Reduce_File.Write(",");
Shift_Reduce_File.Write("(" & Grammar_Symbol'Image(-1) & ",");
Shift_Reduce_File.Write(Integer'Image(Default) & ")" );
Num_of_Action_Entries := Num_of_Action_Entries + 1;
if Num_of_Action_Entries mod 4 = 0 then
Shift_Reduce_File.Write_Line("");
end if;
Shift_Reduce_File.Write_Line("");
end Print_Action_Row;
-----------------------------------------------------------------------
procedure Init_Table_Files is
begin
Goto_Offset := new Goto_Offset_Array
(First_Parse_State..Last_Parse_State);
Action_Offset := new Action_Offset_Array
(First_Parse_State..Last_Parse_State);
Goto_File.Open_Write;
Shift_Reduce_File.Open_Write;
end Init_Table_Files;
procedure Finish_Table_Files is
begin
Goto_File.Write_Line(");");
Goto_File.Write_Line("-- The offset vector");
Goto_File.Write("GOTO_OFFSET : array (0..");
Goto_File.Write(Parse_State'Image(Goto_Offset.all'Last) & ')');
Goto_File.Write_Line(" of Integer :=");
Goto_File.Write("(");
for I in Goto_Offset.all'First .. Goto_Offset.all'Last-1 loop
Goto_File.Write(Integer'Image(Goto_Offset(I)) & ",");
if I mod 10 = 0 then Goto_File.Write_Line(""); end if;
end loop;
Goto_File.Write
(Integer'Image(Goto_Offset(Goto_Offset.all'Last)));
Goto_File.Write_Line(");");
Goto_File.Close_Write;
Shift_Reduce_File.Write_Line(");");
Shift_Reduce_File.Write_Line("-- The offset vector");
Shift_Reduce_File.Write("SHIFT_REDUCE_OFFSET : array (0..");
Shift_Reduce_File.Write
(Parse_State'Image(Action_Offset.all'Last) & ')');
Shift_Reduce_File.Write_Line(" of Integer :=");
Shift_Reduce_File.Write("(");
for I in Action_Offset.all'First..Action_Offset.all'Last-1
loop
Shift_Reduce_File.Write
(Integer'Image(Action_Offset(I)) & ",");
if I mod 10 = 0 then Shift_Reduce_File.Write_Line(""); end if;
end loop;
Shift_Reduce_File.Write
(Integer'Image(Action_Offset(Action_Offset.all'Last)));
Shift_Reduce_File.Write_Line(");");
Shift_Reduce_File.Close_Write;
end Finish_Table_Files;
procedure Compute_Parse_Table is
use Transition_Set_Pack;
use Item_Set_Pack;
use Grammar_Symbol_Set_Pack;
Trans : Transition;
Nonterm_Iter : Nt_Transition_Iterator;
Term_Iter : T_Transition_Iterator;
Item_Set_1 : Item_Set;
Item_Iter : Item_Iterator;
Temp_Item : Item;
Lookahead_Set : Grammar_Symbol_Set;
Sym_Iter : Grammar_Symbol_Iterator;
Sym : Grammar_Symbol;
-- these variables are used for resolving conflicts
Sym_Prec : Precedence;
Rule_Prec : Precedence;
Sym_Assoc : Associativity;
-- recduce by r or action in action_table_row(sym);
procedure Report_Conflict(R: Rule; Sym : in Grammar_Symbol) is
begin
if Show_Verbose then
Verbose_File.Write("*** Conflict on input ");
Verbose_File.Print_Grammar_Symbol(Sym);
Verbose_File.Write_Line;
Verbose_File.Write(Ascii.Ht);
Verbose_File.Write("Reduce " & Rule'Image(R));
Verbose_File.Write(Ascii.Ht);
Verbose_File.Write("or");
Verbose_File.Write(Ascii.Ht);
end if;
case Action_Table_Row(Sym).Action is
when Shift =>
Num_Shift_Reduce_Conflicts :=
Num_Shift_Reduce_Conflicts + 1;
if Show_Verbose then
Verbose_File.Write("Shift ");
Verbose_File.Write_Line
(Parse_State'Image(Action_Table_Row(Sym).State_ID));
end if;
when Reduce =>
Num_Reduce_Reduce_Conflicts :=
Num_Reduce_Reduce_Conflicts + 1;
if Show_Verbose then
Verbose_File.Write("Reduce ");
Verbose_File.Write_Line
(Rule'Image(Action_Table_Row(Sym).Rule_ID));
end if;
when Accept_Input =>
if Show_Verbose then
Verbose_File.Write("Accept???"); -- won't happen
end if;
Put_Line("Ayacc: Internal Error in Report Conflict!");
when Error =>
if Show_Verbose then
Verbose_File.Write_Line("Error???"); -- won't happen
end if;
Put_Line("Ayacc: Internal Error in Report Conflict!");
when Undefined =>
Put_Line("Ayacc: Internal Error in Report Conflict!");
end case;
if Show_Verbose then
Verbose_File.Write_Line;
end if;
end;
begin
Action_Table_Row := new Action_Table_Array
(First_Symbol(Terminal)..Last_Symbol(Terminal));
Goto_Table_Row := new Goto_Table_Array
(First_Symbol(Nonterminal)..Last_Symbol(Nonterminal));
Init_Table_Files;
for S in First_Parse_State..Last_Parse_State loop
--& The verdix compiler apparently ALOCATES more memory for the following
--& assignments. We commented them out and replaced these statements by
--& the for loops
--& action_table_row.all :=
--& (action_table_row.all'range => (action => undefined));
--& goto_table_row.all :=
--& (goto_table_row.all'range => null_parse_state);
for I in Action_Table_Row.all'range loop
Action_Table_Row(I) := (Action => Undefined);
end loop;
for I in Goto_Table_Row.all'range loop
Goto_Table_Row(I) := Null_Parse_State;
end loop;
Make_Null(Item_Set_1);
Get_Kernel(S, Item_Set_1);
if Show_Verbose then
Verbose_File.Write_Line("------------------");
Verbose_File.Write_Line("State " & Parse_State'Image(S));
Verbose_File.Write_Line;
Verbose_File.Write_Line("Kernel");
Verbose_File.Print_Item_Set(Item_Set_1);
end if;
Closure(Item_Set_1);
if Show_Verbose then
Verbose_File.Write_Line;
Verbose_File.Write_Line("Closure");
Verbose_File.Print_Item_Set(Item_Set_1);
Verbose_File.Write_Line;
Verbose_File.Write_Line;
end if;
-- Make Shift Entries --
Initialize(Term_Iter, S);
while More(Term_Iter) loop
Next(Term_Iter, Trans);
if Trans.Symbol = End_Symbol then
Action_Table_Row(Trans.Symbol) :=
(Action => Accept_Input);
else
Action_Table_Row(Trans.Symbol) :=
(Action => Shift, State_ID => Trans.State_ID);
end if;
end loop;
-- Make Goto Entries --
Initialize(Nonterm_Iter, S);
while More(Nonterm_Iter) loop
Next(Nonterm_Iter, Trans);
Goto_Table_Row(Trans.Symbol) := Trans.State_ID;
end loop;
-- Make Reduce Entries ----
Initialize(Item_Iter, Item_Set_1);
-- check for degenerate reduce --
if Size_of(Item_Set_1) = 1 then
Next(Item_Iter, Temp_Item);
if Temp_Item.Dot_Position = Length_of(Temp_Item.Rule_ID)
and then Temp_Item.Rule_ID /= First_Rule
then
Action_Table_Row(First_Symbol(Terminal)) :=
(Action => Reduce,
Rule_ID => Temp_Item.Rule_ID);
end if;
goto Continue_Loop;
end if;
-- The following is really messy. It used to be ok before
-- we added precedence. Some day we should rewrite it.
while More(Item_Iter) loop
Next(Item_Iter, Temp_Item);
if Temp_Item.Dot_Position = Length_of(Temp_Item.Rule_ID)
and then Temp_Item.Rule_ID /= First_Rule
then
Make_Null(Lookahead_Set);
Get_LA(S, Temp_Item, Lookahead_Set);
Initialize(Sym_Iter, Lookahead_Set);
while More(Sym_Iter) loop
Next(Sym_Iter, Sym);
case Action_Table_Row(Sym).Action is
when Undefined =>
Action_Table_Row(Sym) :=
(Action => Reduce,
Rule_ID => Temp_Item.Rule_ID);
when Shift =>
Sym_Prec :=
Get_Precedence(Sym);
Rule_Prec :=
Get_Rule_Precedence(Temp_Item.Rule_ID);
if Sym_Prec = 0 or else Rule_Prec = 0 then
Report_Conflict(Temp_Item.Rule_ID, Sym);
elsif Rule_Prec > Sym_Prec then
Action_Table_Row(Sym) :=
(Action => Reduce,
Rule_ID => Temp_Item.Rule_ID);
elsif Sym_Prec > Rule_Prec then
null; -- already ok
else
Sym_Assoc :=
Get_Associativity(Sym);
if Sym_Assoc = Left_Associative then
Action_Table_Row(Sym) :=
(Action => Reduce,
Rule_ID => Temp_Item.Rule_ID);
elsif Sym_Assoc = Right_Associative then
null;
elsif Sym_Assoc = Nonassociative then
Action_Table_Row(Sym) :=
(Action => Error);
else
Put_Line("Ayacc: Possible Error in " &
"Conflict Resolution.");
end if;
end if;
when Reduce =>
Report_Conflict(Temp_Item.Rule_ID, Sym);
when Error =>
Put_Line("Ayacc: Internal Error in Conflict!!!");
Put_Line("Ayacc: Use Verbose Option!");
Report_Conflict(Temp_Item.Rule_ID, Sym);
when Accept_Input =>
Put_Line("Ayacc: Internal Error in Conflict!!!");
Put_Line("Ayacc: Use Verbose Option!");
Report_Conflict(Temp_Item.Rule_ID, Sym);
end case;
end loop;
end if;
end loop;
<<Continue_Loop>>
if Show_Verbose then
Print_Goto_Row_Verbose;
end if;
Print_Goto_Row(S);
Print_Action_Row(S);
end loop;
Finish_Table_Files;
end Compute_Parse_Table;
procedure Make_Parse_Table is
begin
Show_Verbose := Options.Verbose;
if Show_Verbose then
Verbose_File.Open;
end if;
Symbol_Info.Initialize;
if Options.Loud then
Put_Line("Ayacc: Making LR(0) Machine.");
end if;
LR0_Machine.LR0_Initialize;
if Options.Loud then
Put_Line("Ayacc: Making Follow Sets.");
end if;
Make_LALR_Sets;
if Options.Loud then
Put_Line("Ayacc: Making Parse Table.");
end if;
Compute_Parse_Table;
if Show_Verbose then
Verbose_File.Close;
end if;
end Make_Parse_Table;
end Parse_Table;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . V A L _ L L U --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains routines for scanning modular Long_Long_Unsigned
-- values for use in Text_IO.Modular_IO, and the Value attribute.
with System.Unsigned_Types;
package System.Val_LLU is
pragma Pure;
function Scan_Raw_Long_Long_Unsigned
(Str : String;
Ptr : access Integer;
Max : Integer) return System.Unsigned_Types.Long_Long_Unsigned;
-- This function scans the string starting at Str (Ptr.all) for a valid
-- integer according to the syntax described in (RM 3.5(43)). The substring
-- scanned extends no further than Str (Max). Note: this does not scan
-- leading or trailing blanks, nor leading sign.
--
-- There are three cases for the return:
--
-- If a valid integer is found, then Ptr.all is updated past the last
-- character of the integer.
--
-- If no valid integer 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 empty, 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 Scan_Long_Long_Unsigned
(Str : String;
Ptr : access Integer;
Max : Integer) return System.Unsigned_Types.Long_Long_Unsigned;
-- Same as Scan_Raw_Long_Long_Unsigned, except scans optional leading
-- blanks, and an optional leading plus sign.
-- Note: if a minus sign is present, Constraint_Error will be raised.
-- Note: trailing blanks are not scanned.
function Value_Long_Long_Unsigned
(Str : String) return System.Unsigned_Types.Long_Long_Unsigned;
-- Used in computing X'Value (Str) where X is a modular integer type whose
-- modulus exceeds the range of System.Unsigned_Types.Unsigned. 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.
end System.Val_LLU;
|
-----------------------------------------------------------------------
-- util-streams -- Stream utilities
-- Copyright (C) 2010, 2011, 2016, 2018, 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Interfaces;
package body Util.Streams is
use Ada.Streams;
subtype Offset is Ada.Streams.Stream_Element_Offset;
-- ------------------------------
-- Copy the input stream to the output stream until the end of the input stream
-- is reached.
-- ------------------------------
procedure Copy (From : in out Input_Stream'Class;
Into : in out Output_Stream'Class) is
Buffer : Stream_Element_Array (0 .. 4_096);
Last : Stream_Element_Offset;
begin
loop
From.Read (Buffer, Last);
if Last > Buffer'First then
Into.Write (Buffer (Buffer'First .. Last));
end if;
exit when Last < Buffer'Last;
end loop;
end Copy;
-- ------------------------------
-- Copy the stream array to the string.
-- The string must be large enough to hold the stream array
-- or a Constraint_Error exception is raised.
-- ------------------------------
procedure Copy (From : in Ada.Streams.Stream_Element_Array;
Into : in out String) is
Pos : Positive := Into'First;
begin
for I in From'Range loop
Into (Pos) := Character'Val (From (I));
Pos := Pos + 1;
end loop;
end Copy;
-- ------------------------------
-- Copy the string to the stream array.
-- The stream array must be large enough to hold the string
-- or a Constraint_Error exception is raised.
-- ------------------------------
procedure Copy (From : in String;
Into : in out Ada.Streams.Stream_Element_Array) is
Pos : Ada.Streams.Stream_Element_Offset := Into'First;
begin
for I in From'Range loop
Into (Pos) := Character'Pos (From (I));
Pos := Pos + 1;
end loop;
end Copy;
-- ------------------------------
-- Write a raw character on the stream.
-- ------------------------------
procedure Write (Stream : in out Output_Stream'Class;
Item : in Character) is
Buf : constant Ada.Streams.Stream_Element_Array (1 .. 1)
:= (1 => Ada.Streams.Stream_Element (Character'Pos (Item)));
begin
Stream.Write (Buf);
end Write;
-- ------------------------------
-- Write a wide character on the stream doing some conversion if necessary.
-- The default implementation translates the wide character to a UTF-8 sequence.
-- ------------------------------
procedure Write_Wide (Stream : in out Output_Stream'Class;
Item : in Wide_Wide_Character) is
use Interfaces;
Val : Unsigned_32;
Buf : Ada.Streams.Stream_Element_Array (1 .. 4);
begin
-- UTF-8 conversion
-- 7 U+0000 U+007F 1 0xxxxxxx
-- 11 U+0080 U+07FF 2 110xxxxx 10xxxxxx
-- 16 U+0800 U+FFFF 3 1110xxxx 10xxxxxx 10xxxxxx
-- 21 U+10000 U+1FFFFF 4 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
Val := Wide_Wide_Character'Pos (Item);
if Val <= 16#7f# then
Buf (1) := Ada.Streams.Stream_Element (Val);
Stream.Write (Buf (1 .. 1));
elsif Val <= 16#07FF# then
Buf (1) := Stream_Element (16#C0# or Shift_Right (Val, 6));
Buf (2) := Stream_Element (16#80# or (Val and 16#03F#));
Stream.Write (Buf (1 .. 2));
elsif Val <= 16#0FFFF# then
Buf (1) := Stream_Element (16#E0# or Shift_Right (Val, 12));
Val := Val and 16#0FFF#;
Buf (2) := Stream_Element (16#80# or Shift_Right (Val, 6));
Buf (3) := Stream_Element (16#80# or (Val and 16#03F#));
Stream.Write (Buf (1 .. 3));
else
Val := Val and 16#1FFFFF#;
Buf (1) := Stream_Element (16#F0# or Shift_Right (Val, 18));
Val := Val and 16#3FFFF#;
Buf (2) := Stream_Element (16#80# or Shift_Right (Val, 12));
Val := Val and 16#0FFF#;
Buf (3) := Stream_Element (16#80# or Shift_Right (Val, 6));
Buf (4) := Stream_Element (16#80# or (Val and 16#03F#));
Stream.Write (Buf (1 .. 4));
end if;
end Write_Wide;
procedure Write_Wide (Stream : in out Output_Stream'Class;
Item : in Wide_Wide_String) is
begin
for C of Item loop
Stream.Write_Wide (C);
end loop;
end Write_Wide;
-- ------------------------------
-- Write a raw string on the stream.
-- ------------------------------
procedure Write (Stream : in out Output_Stream'Class;
Item : in String) is
Buf : Ada.Streams.Stream_Element_Array (Offset (Item'First) .. Offset (Item'Last));
for Buf'Address use Item'Address;
begin
Stream.Write (Buf);
end Write;
end Util.Streams;
|
package Load_Environment_Variables is
pragma Elaborate_Body;
end Load_Environment_Variables;
|
-- CD1009Q.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 A 'SIZE' SPECIFICATION MAY BE GIVEN IN THE PRIVATE
-- PART OF A PACKAGE FOR AN INCOMPLETE TYPE, WHOSE FULL DECLARATION
-- IS A FIXED POINT TYPE, DECLARED IN THE VISIBLE PART OF THE SAME
-- PACKAGE.
-- HISTORY:
-- PWB 03/25/89 MODIFIED METHOD OF CHECKING OBJECT SIZE AGAINST
-- TYPE SIZE; CHANGED EXTENSION FROM '.ADA' TO '.DEP'.
-- VCL 10/21/87 CREATED ORIGINAL TEST.
WITH REPORT; USE REPORT;
PROCEDURE CD1009Q IS
BEGIN
TEST ("CD1009Q", "A 'SIZE' CLAUSE MAY BE GIVEN IN THE " &
"PRIVATE PART OF A PACKAGE FOR A AN " &
"INCOMPLETE TYPE, WHOSE FULL DECLARATION IS A " &
"FIXED POINT TYPE, DECLARED IN THE VISIBLE " &
"PART OF THE SAME PACKAGE");
DECLARE
PACKAGE PACK IS
TYPE SPECIFIED IS DELTA 2.0 ** (-4) RANGE 0.0 .. 10.0;
SPECIFIED_SIZE : CONSTANT := SPECIFIED'SIZE;
TYPE CHECK_TYPE_1;
TYPE ACC IS ACCESS CHECK_TYPE_1;
TYPE CHECK_TYPE_1 IS DELTA 2.0 ** (-1) RANGE 0.0 .. 2.0;
PRIVATE
FOR CHECK_TYPE_1'SIZE
USE SPECIFIED_SIZE;
END PACK;
USE PACK;
X : CHECK_TYPE_1 := CHECK_TYPE_1 ( IDENT_INT (1) );
BEGIN
IF CHECK_TYPE_1'SIZE /= SPECIFIED_SIZE THEN
FAILED ("CHECK_TYPE_1'SIZE IS INCORRECT");
END IF;
IF X'SIZE < SPECIFIED_SIZE THEN
FAILED ("OBJECT SIZE TOO SMALL -- CHECK_TYPE_1. " &
"VALUE IS" & INTEGER'IMAGE ( INTEGER(X) ) );
END IF;
END;
RESULT;
END CD1009Q;
|
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package Vulkan.Low_Level.vulkan_ios_h is
VULKAN_IOS_H_u : constant := 1; -- vulkan_ios.h:2
VK_MVK_ios_surface : constant := 1; -- vulkan_ios.h:32
VK_MVK_IOS_SURFACE_SPEC_VERSION : constant := 2; -- vulkan_ios.h:33
VK_MVK_IOS_SURFACE_EXTENSION_NAME : aliased constant String := "VK_MVK_ios_surface" & ASCII.NUL; -- vulkan_ios.h:34
--** Copyright (c) 2015-2019 The Khronos Group Inc.
--**
--** 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.
--
--** This header is generated from the Khronos Vulkan XML API Registry.
--**
--
type VkIOSSurfaceCreateInfoMVK is record
pNext : System.Address; -- vulkan_ios.h:38
pView : System.Address; -- vulkan_ios.h:40
end record
with Convention => C_Pass_By_Copy; -- vulkan_ios.h:36
end Vulkan.Low_Level.vulkan_ios_h;
|
-- { dg-do compile }
-- { dg-options "-fdump-tree-gimple" }
with VFA1_Pkg; use VFA1_Pkg;
procedure VFA1_3 is
Temp : Short_Integer;
function F (I : Short_Integer) return Short_Integer is
begin
return I;
end;
function F2 return Short_Integer is
begin
return Short_Integer(Buffer1.A);
end;
procedure P3 (I : out Short_Integer) is
begin
null;
end;
begin
Temp := Buffer1.A;
Buffer1.B := Temp;
Temp := Buffer2.A;
Buffer2.B := Temp;
Temp := Buffer1.A + Buffer2.B;
if Buffer1.A /= Buffer2.B then
raise Program_Error;
end if;
Temp := F(Buffer1.A);
Buffer2.B := F(Temp);
Temp := F(Buffer2.B);
Buffer1.A := F(Temp);
Temp := F2;
P3 (Buffer2.B);
end;
-- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&vfa1_pkg__buffer1" 7 "gimple"} }
-- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&vfa1_pkg__buffer2" 7 "gimple"} }
-- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&temp" 0 "gimple"} }
-- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&vfa1_pkg__buffer1" 2 "gimple"} }
-- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&vfa1_pkg__buffer2" 3 "gimple"} }
-- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&temp" 0 "gimple"} }
|
package body World is
---------------
-- New_World --
---------------
function New_World (Size : Positive) return World_Grid is
begin
return World_Grid'(Size => Size,
Grid1 => (others => (others => False)),
Grid2 => (others => (others => False)),
Step => 0);
end;
--------------
-- Get_Spot --
--------------
function Get_Spot (W : World_Grid; X, Y : Positive) return Boolean is
begin
if X not in 1 .. W.Size or Y not in 1 .. W.Size then
return False;
elsif W.Size mod 2 = 1 then
return W.Grid1 (X, Y);
else
return W.Grid2 (X, Y);
end if;
end;
--------------
-- Set_Spot --
--------------
procedure Set_Spot (W : in out World_Grid; X, Y : Positive; B : Boolean) is
begin
if W.Size mod 2 = 1 then
W.Grid2 (X, Y) := B;
else
W.Grid1 (X, Y) := B;
end if;
end;
--------------
-- Run_Step --
--------------
procedure Run_Step (W : in out World_Grid) is
Count : Natural;
begin
W.Step := W.Step + 1;
for X in Positive range 1 .. W.Size loop
for Y in Positive range 1 .. W.Size loop
Count := Live_Neighbors (W, X, Y);
if Count < 2 then
Set_Spot (W, X, Y, False); -- Underpopulation
elsif Count = 2 then
Set_Spot (W, X, Y, Get_Spot (W, X, Y)); -- Survival
elsif Count = 3 then
Set_Spot (W, X, Y, True); -- Reproduction
elsif Count > 3 then
Set_Spot (W, X, Y, False); -- Overpopulation
end if;
end loop;
end loop;
end;
--------------------
-- Live_Neighbors --
--------------------
function Live_Neighbors (W : World_Grid; X, Y : Positive) return Natural is
Count : Natural := 0;
procedure Count_Neighbor (W : World_Grid; Count : in out Natural; X, Y : Positive) is
begin
if Get_Spot (W, X, Y) then
Count := Count + 1;
end if;
end Count_Neighbor;
begin
Count_Neighbor (W, Count, X - 1, Y - 1);
Count_Neighbor (W, Count, X, Y - 1);
Count_Neighbor (W, Count, X + 1, Y - 1);
Count_Neighbor (W, Count, X - 1, Y);
Count_Neighbor (W, Count, X + 1, Y);
Count_Neighbor (W, Count, X - 1, Y + 1);
Count_Neighbor (W, Count, X, Y + 1);
Count_Neighbor (W, Count, X + 1, Y + 1);
return Count;
end;
end;
|
-- SPDX-FileCopyrightText: 2019-2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
package Program.Lexical_Elements is
pragma Pure;
type Lexical_Element is limited interface;
type Lexical_Element_Access is
access all Lexical_Element'Class with Storage_Size => 0;
function Assigned (Self : access Lexical_Element'Class) return Boolean
is (Self /= null);
not overriding function Image (Self : Lexical_Element) return Text
is abstract;
-- Return text of the lexical element.
type Lexical_Element_Kind is
(Less, Equal, Greater, Hyphen, Slash,
Star, Ampersand, Plus,
Less_Or_Equal, Greater_Or_Equal, Inequality,
Double_Star,
Or_Keyword, And_Keyword, Xor_Keyword, Mod_Keyword, Rem_Keyword,
Abs_Keyword, Not_Keyword,
Right_Label,
Box, Left_Label,
Assignment, Arrow,
Double_Dot,
Apostrophe, Left_Parenthesis,
Right_Parenthesis,
Comma, Dot,
Colon, Semicolon,
Vertical_Line,
Abort_Keyword,
Abstract_Keyword, Accept_Keyword,
Access_Keyword, Aliased_Keyword, All_Keyword,
Array_Keyword, At_Keyword,
Begin_Keyword, Body_Keyword, Case_Keyword,
Constant_Keyword, Declare_Keyword, Delay_Keyword,
Delta_Keyword, Digits_Keyword, Do_Keyword,
Else_Keyword, Elsif_Keyword, End_Keyword,
Entry_Keyword, Exception_Keyword, Exit_Keyword,
For_Keyword, Function_Keyword, Generic_Keyword,
Goto_Keyword, If_Keyword, In_Keyword,
Interface_Keyword, Is_Keyword, Limited_Keyword,
Loop_Keyword, New_Keyword,
Null_Keyword, Of_Keyword,
Others_Keyword, Out_Keyword,
Overriding_Keyword, Package_Keyword, Pragma_Keyword,
Private_Keyword, Procedure_Keyword, Protected_Keyword,
Raise_Keyword, Range_Keyword, Record_Keyword,
Renames_Keyword, Requeue_Keyword,
Return_Keyword, Reverse_Keyword, Select_Keyword,
Separate_Keyword, Some_Keyword, Subtype_Keyword, Synchronized_Keyword,
Tagged_Keyword, Task_Keyword, Terminate_Keyword,
Then_Keyword, Type_Keyword, Until_Keyword,
Use_Keyword, When_Keyword, While_Keyword,
With_Keyword,
Comment, Identifier, Numeric_Literal,
Character_Literal, String_Literal,
Error, End_Of_Input);
subtype Operator_Kind is Lexical_Element_Kind range Less .. Not_Keyword;
subtype Keyword_Operator_Kind is Lexical_Element_Kind
range Or_Keyword .. Not_Keyword;
subtype Keyword_Kind is Lexical_Element_Kind
range Abort_Keyword .. With_Keyword;
not overriding function Kind (Self : Lexical_Element)
return Lexical_Element_Kind is abstract;
type Location is record
Line : Positive;
Column : Positive;
end record;
function "<" (Left, Right : Location) return Boolean with Inline;
function ">" (Left, Right : Location) return Boolean with Inline;
function "<=" (Left, Right : Location) return Boolean with Inline;
function ">=" (Left, Right : Location) return Boolean with Inline;
not overriding function From (Self : Lexical_Element) return Location
is abstract;
-- Line and column where the lexical element is located.
function From_Image (Self : Lexical_Element'Class) return Program.Text;
-- Line:column where the lexical element is located as a string.
type Lexical_Element_Vector is limited interface;
-- Vector of lexical elements.
type Lexical_Element_Vector_Access is
access all Lexical_Element_Vector'Class
with Storage_Size => 0;
not overriding function First_Index (Self : Lexical_Element_Vector)
return Positive is abstract;
not overriding function Last_Index (Self : Lexical_Element_Vector)
return Positive is abstract;
-- The vector always has at least one element.
function Length (Self : Lexical_Element_Vector'Class)
return Positive is (Self.Last_Index - Self.First_Index + 1);
-- Return number of elements in the vector
not overriding function Element
(Self : Lexical_Element_Vector;
Index : Positive)
return not null Lexical_Element_Access
is abstract
with Pre'Class => Index in Self.First_Index .. Self.Last_Index;
-- Return an element of the vector
function First
(Self : Lexical_Element_Vector'Class)
return not null Program.Lexical_Elements.Lexical_Element_Access
with Inline;
-- Get the first element of the vector
function Last
(Self : Lexical_Element_Vector'Class)
return not null Program.Lexical_Elements.Lexical_Element_Access
with Inline;
-- Get the last element of the vector
end Program.Lexical_Elements;
|
-------------------------------------------------------------------------------
-- This file is part of libsparkcrypto.
--
-- Copyright (C) 2010, Alexander Senier
-- Copyright (C) 2010, secunet Security Networks AG
-- 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.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- AES Debug package
--
-- Debug is done through Debug pragmas. As the compiler has to with the debug
-- package to make it available to this pragma, this is an empty package which
-- makes the SPARK Examiner accept the respective with clause. Debug functions,
-- however, cannot (and should not) be use from within SPARK.
-------------------------------------------------------------------------------
private package LSC.Internal.AES.Print
is
pragma Pure;
end LSC.Internal.AES.Print;
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Elements.Defining_Identifiers;
with Program.Lexical_Elements;
with Program.Elements.Discrete_Ranges;
with Program.Elements.Loop_Parameter_Specifications;
with Program.Element_Visitors;
package Program.Nodes.Loop_Parameter_Specifications is
pragma Preelaborate;
type Loop_Parameter_Specification is
new Program.Nodes.Node
and Program.Elements.Loop_Parameter_Specifications
.Loop_Parameter_Specification
and Program.Elements.Loop_Parameter_Specifications
.Loop_Parameter_Specification_Text
with private;
function Create
(Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
In_Token : not null Program.Lexical_Elements.Lexical_Element_Access;
Reverse_Token : Program.Lexical_Elements.Lexical_Element_Access;
Definition : not null Program.Elements.Discrete_Ranges
.Discrete_Range_Access)
return Loop_Parameter_Specification;
type Implicit_Loop_Parameter_Specification is
new Program.Nodes.Node
and Program.Elements.Loop_Parameter_Specifications
.Loop_Parameter_Specification
with private;
function Create
(Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
Definition : not null Program.Elements.Discrete_Ranges
.Discrete_Range_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False;
Has_Reverse : Boolean := False)
return Implicit_Loop_Parameter_Specification
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Loop_Parameter_Specification is
abstract new Program.Nodes.Node
and Program.Elements.Loop_Parameter_Specifications
.Loop_Parameter_Specification
with record
Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
Definition : not null Program.Elements.Discrete_Ranges
.Discrete_Range_Access;
end record;
procedure Initialize
(Self : in out Base_Loop_Parameter_Specification'Class);
overriding procedure Visit
(Self : not null access Base_Loop_Parameter_Specification;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Name
(Self : Base_Loop_Parameter_Specification)
return not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
overriding function Definition
(Self : Base_Loop_Parameter_Specification)
return not null Program.Elements.Discrete_Ranges.Discrete_Range_Access;
overriding function Is_Loop_Parameter_Specification
(Self : Base_Loop_Parameter_Specification)
return Boolean;
overriding function Is_Declaration
(Self : Base_Loop_Parameter_Specification)
return Boolean;
type Loop_Parameter_Specification is
new Base_Loop_Parameter_Specification
and Program.Elements.Loop_Parameter_Specifications
.Loop_Parameter_Specification_Text
with record
In_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Reverse_Token : Program.Lexical_Elements.Lexical_Element_Access;
end record;
overriding function To_Loop_Parameter_Specification_Text
(Self : in out Loop_Parameter_Specification)
return Program.Elements.Loop_Parameter_Specifications
.Loop_Parameter_Specification_Text_Access;
overriding function In_Token
(Self : Loop_Parameter_Specification)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Reverse_Token
(Self : Loop_Parameter_Specification)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Has_Reverse
(Self : Loop_Parameter_Specification)
return Boolean;
type Implicit_Loop_Parameter_Specification is
new Base_Loop_Parameter_Specification
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
Has_Reverse : Boolean;
end record;
overriding function To_Loop_Parameter_Specification_Text
(Self : in out Implicit_Loop_Parameter_Specification)
return Program.Elements.Loop_Parameter_Specifications
.Loop_Parameter_Specification_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Loop_Parameter_Specification)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Loop_Parameter_Specification)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Loop_Parameter_Specification)
return Boolean;
overriding function Has_Reverse
(Self : Implicit_Loop_Parameter_Specification)
return Boolean;
end Program.Nodes.Loop_Parameter_Specifications;
|
with Ada.Text_Io; use Ada.Text_Io;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
package body Synchronous_Concurrent is
task body Printer is
Num_Iter : Natural := 0;
Line : Unbounded_String;
begin
loop
select
accept Put(Item : in String) do
Line := To_Unbounded_String(Item);
end Put;
Put_Line(To_String(Line));
Num_Iter := Num_Iter + 1;
or
accept Get_Count(Count : out Natural) do
Count := Num_Iter;
end Get_Count;
or terminate;
end select;
end loop;
end Printer;
end Synchronous_Concurrent;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Internals.UML_Classifiers;
with AMF.String_Collections;
with AMF.UML.Classifier_Template_Parameters;
with AMF.UML.Classifiers.Collections;
with AMF.UML.Collaboration_Uses.Collections;
with AMF.UML.Constraints.Collections;
with AMF.UML.Dependencies.Collections;
with AMF.UML.Element_Imports.Collections;
with AMF.UML.Features.Collections;
with AMF.UML.Generalization_Sets.Collections;
with AMF.UML.Generalizations.Collections;
with AMF.UML.Named_Elements.Collections;
with AMF.UML.Namespaces;
with AMF.UML.Package_Imports.Collections;
with AMF.UML.Packageable_Elements.Collections;
with AMF.UML.Packages.Collections;
with AMF.UML.Parameterable_Elements.Collections;
with AMF.UML.Properties.Collections;
with AMF.UML.Redefinable_Elements.Collections;
with AMF.UML.Redefinable_Template_Signatures;
with AMF.UML.Signals;
with AMF.UML.String_Expressions;
with AMF.UML.Substitutions.Collections;
with AMF.UML.Template_Bindings.Collections;
with AMF.UML.Template_Parameters;
with AMF.UML.Template_Signatures;
with AMF.UML.Types;
with AMF.UML.Use_Cases.Collections;
with AMF.Visitors;
package AMF.Internals.UML_Signals is
type UML_Signal_Proxy is
limited new AMF.Internals.UML_Classifiers.UML_Classifier_Proxy
and AMF.UML.Signals.UML_Signal with null record;
overriding function Get_Owned_Attribute
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Properties.Collections.Ordered_Set_Of_UML_Property;
-- Getter of Signal::ownedAttribute.
--
-- The attributes owned by the signal.
overriding function Get_Attribute
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Properties.Collections.Set_Of_UML_Property;
-- Getter of Classifier::attribute.
--
-- Refers to all of the Properties that are direct (i.e. not inherited or
-- imported) attributes of the classifier.
overriding function Get_Collaboration_Use
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Collaboration_Uses.Collections.Set_Of_UML_Collaboration_Use;
-- Getter of Classifier::collaborationUse.
--
-- References the collaboration uses owned by the classifier.
overriding function Get_Feature
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Features.Collections.Set_Of_UML_Feature;
-- Getter of Classifier::feature.
--
-- Specifies each feature defined in the classifier.
-- Note that there may be members of the Classifier that are of the type
-- Feature but are not included in this association, e.g. inherited
-- features.
overriding function Get_General
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Getter of Classifier::general.
--
-- Specifies the general Classifiers for this Classifier.
-- References the general classifier in the Generalization relationship.
overriding function Get_Generalization
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Generalizations.Collections.Set_Of_UML_Generalization;
-- Getter of Classifier::generalization.
--
-- Specifies the Generalization relationships for this Classifier. These
-- Generalizations navigaten to more general classifiers in the
-- generalization hierarchy.
overriding function Get_Inherited_Member
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Classifier::inheritedMember.
--
-- Specifies all elements inherited by this classifier from the general
-- classifiers.
overriding function Get_Is_Abstract
(Self : not null access constant UML_Signal_Proxy)
return Boolean;
-- Getter of Classifier::isAbstract.
--
-- If true, the Classifier does not provide a complete declaration and can
-- typically not be instantiated. An abstract classifier is intended to be
-- used by other classifiers e.g. as the target of general
-- metarelationships or generalization relationships.
overriding function Get_Is_Final_Specialization
(Self : not null access constant UML_Signal_Proxy)
return Boolean;
-- Getter of Classifier::isFinalSpecialization.
--
-- If true, the Classifier cannot be specialized by generalization. Note
-- that this property is preserved through package merge operations; that
-- is, the capability to specialize a Classifier (i.e.,
-- isFinalSpecialization =false) must be preserved in the resulting
-- Classifier of a package merge operation where a Classifier with
-- isFinalSpecialization =false is merged with a matching Classifier with
-- isFinalSpecialization =true: the resulting Classifier will have
-- isFinalSpecialization =false.
overriding procedure Set_Is_Final_Specialization
(Self : not null access UML_Signal_Proxy;
To : Boolean);
-- Setter of Classifier::isFinalSpecialization.
--
-- If true, the Classifier cannot be specialized by generalization. Note
-- that this property is preserved through package merge operations; that
-- is, the capability to specialize a Classifier (i.e.,
-- isFinalSpecialization =false) must be preserved in the resulting
-- Classifier of a package merge operation where a Classifier with
-- isFinalSpecialization =false is merged with a matching Classifier with
-- isFinalSpecialization =true: the resulting Classifier will have
-- isFinalSpecialization =false.
overriding function Get_Owned_Template_Signature
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access;
-- Getter of Classifier::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding procedure Set_Owned_Template_Signature
(Self : not null access UML_Signal_Proxy;
To : AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access);
-- Setter of Classifier::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding function Get_Owned_Use_Case
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case;
-- Getter of Classifier::ownedUseCase.
--
-- References the use cases owned by this classifier.
overriding function Get_Powertype_Extent
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Generalization_Sets.Collections.Set_Of_UML_Generalization_Set;
-- Getter of Classifier::powertypeExtent.
--
-- Designates the GeneralizationSet of which the associated Classifier is
-- a power type.
overriding function Get_Redefined_Classifier
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Getter of Classifier::redefinedClassifier.
--
-- References the Classifiers that are redefined by this Classifier.
overriding function Get_Representation
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access;
-- Getter of Classifier::representation.
--
-- References a collaboration use which indicates the collaboration that
-- represents this classifier.
overriding procedure Set_Representation
(Self : not null access UML_Signal_Proxy;
To : AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access);
-- Setter of Classifier::representation.
--
-- References a collaboration use which indicates the collaboration that
-- represents this classifier.
overriding function Get_Substitution
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Substitutions.Collections.Set_Of_UML_Substitution;
-- Getter of Classifier::substitution.
--
-- References the substitutions that are owned by this Classifier.
overriding function Get_Template_Parameter
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access;
-- Getter of Classifier::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding procedure Set_Template_Parameter
(Self : not null access UML_Signal_Proxy;
To : AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access);
-- Setter of Classifier::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding function Get_Use_Case
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case;
-- Getter of Classifier::useCase.
--
-- The set of use cases for which this Classifier is the subject.
overriding function Get_Element_Import
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Element_Imports.Collections.Set_Of_UML_Element_Import;
-- Getter of Namespace::elementImport.
--
-- References the ElementImports owned by the Namespace.
overriding function Get_Imported_Member
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Getter of Namespace::importedMember.
--
-- References the PackageableElements that are members of this Namespace
-- as a result of either PackageImports or ElementImports.
overriding function Get_Member
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Namespace::member.
--
-- A collection of NamedElements identifiable within the Namespace, either
-- by being owned or by being introduced by importing or inheritance.
overriding function Get_Owned_Member
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Namespace::ownedMember.
--
-- A collection of NamedElements owned by the Namespace.
overriding function Get_Owned_Rule
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
-- Getter of Namespace::ownedRule.
--
-- Specifies a set of Constraints owned by this Namespace.
overriding function Get_Package_Import
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Package_Imports.Collections.Set_Of_UML_Package_Import;
-- Getter of Namespace::packageImport.
--
-- References the PackageImports owned by the Namespace.
overriding function Get_Client_Dependency
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
-- Getter of NamedElement::clientDependency.
--
-- Indicates the dependencies that reference the client.
overriding function Get_Name_Expression
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access;
-- Getter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding procedure Set_Name_Expression
(Self : not null access UML_Signal_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access);
-- Setter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding function Get_Namespace
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Getter of NamedElement::namespace.
--
-- Specifies the namespace that owns the NamedElement.
overriding function Get_Qualified_Name
(Self : not null access constant UML_Signal_Proxy)
return AMF.Optional_String;
-- Getter of NamedElement::qualifiedName.
--
-- A name which allows the NamedElement to be identified within a
-- hierarchy of nested Namespaces. It is constructed from the names of the
-- containing namespaces starting at the root of the hierarchy and ending
-- with the name of the NamedElement itself.
overriding function Get_Package
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Packages.UML_Package_Access;
-- Getter of Type::package.
--
-- Specifies the owning package of this classifier, if any.
overriding procedure Set_Package
(Self : not null access UML_Signal_Proxy;
To : AMF.UML.Packages.UML_Package_Access);
-- Setter of Type::package.
--
-- Specifies the owning package of this classifier, if any.
overriding function Get_Owning_Template_Parameter
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
-- Getter of ParameterableElement::owningTemplateParameter.
--
-- The formal template parameter that owns this element.
overriding procedure Set_Owning_Template_Parameter
(Self : not null access UML_Signal_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
-- Setter of ParameterableElement::owningTemplateParameter.
--
-- The formal template parameter that owns this element.
overriding function Get_Template_Parameter
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
-- Getter of ParameterableElement::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding procedure Set_Template_Parameter
(Self : not null access UML_Signal_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
-- Setter of ParameterableElement::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding function Get_Owned_Template_Signature
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Template_Signatures.UML_Template_Signature_Access;
-- Getter of TemplateableElement::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding procedure Set_Owned_Template_Signature
(Self : not null access UML_Signal_Proxy;
To : AMF.UML.Template_Signatures.UML_Template_Signature_Access);
-- Setter of TemplateableElement::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding function Get_Template_Binding
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Template_Bindings.Collections.Set_Of_UML_Template_Binding;
-- Getter of TemplateableElement::templateBinding.
--
-- The optional bindings from this element to templates.
overriding function Get_Is_Leaf
(Self : not null access constant UML_Signal_Proxy)
return Boolean;
-- Getter of RedefinableElement::isLeaf.
--
-- Indicates whether it is possible to further redefine a
-- RedefinableElement. If the value is true, then it is not possible to
-- further redefine the RedefinableElement. Note that this property is
-- preserved through package merge operations; that is, the capability to
-- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
-- the resulting RedefinableElement of a package merge operation where a
-- RedefinableElement with isLeaf=false is merged with a matching
-- RedefinableElement with isLeaf=true: the resulting RedefinableElement
-- will have isLeaf=false. Default value is false.
overriding procedure Set_Is_Leaf
(Self : not null access UML_Signal_Proxy;
To : Boolean);
-- Setter of RedefinableElement::isLeaf.
--
-- Indicates whether it is possible to further redefine a
-- RedefinableElement. If the value is true, then it is not possible to
-- further redefine the RedefinableElement. Note that this property is
-- preserved through package merge operations; that is, the capability to
-- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
-- the resulting RedefinableElement of a package merge operation where a
-- RedefinableElement with isLeaf=false is merged with a matching
-- RedefinableElement with isLeaf=true: the resulting RedefinableElement
-- will have isLeaf=false. Default value is false.
overriding function Get_Redefined_Element
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element;
-- Getter of RedefinableElement::redefinedElement.
--
-- The redefinable element that is being redefined by this element.
overriding function Get_Redefinition_Context
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Getter of RedefinableElement::redefinitionContext.
--
-- References the contexts that this element may be redefined from.
overriding function All_Features
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Features.Collections.Set_Of_UML_Feature;
-- Operation Classifier::allFeatures.
--
-- The query allFeatures() gives all of the features in the namespace of
-- the classifier. In general, through mechanisms such as inheritance,
-- this will be a larger set than feature.
overriding function Conforms_To
(Self : not null access constant UML_Signal_Proxy;
Other : AMF.UML.Classifiers.UML_Classifier_Access)
return Boolean;
-- Operation Classifier::conformsTo.
--
-- The query conformsTo() gives true for a classifier that defines a type
-- that conforms to another. This is used, for example, in the
-- specification of signature conformance for operations.
overriding function General
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Operation Classifier::general.
--
-- The general classifiers are the classifiers referenced by the
-- generalization relationships.
overriding function Has_Visibility_Of
(Self : not null access constant UML_Signal_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access)
return Boolean;
-- Operation Classifier::hasVisibilityOf.
--
-- The query hasVisibilityOf() determines whether a named element is
-- visible in the classifier. By default all are visible. It is only
-- called when the argument is something owned by a parent.
overriding function Inherit
(Self : not null access constant UML_Signal_Proxy;
Inhs : AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Classifier::inherit.
--
-- The query inherit() defines how to inherit a set of elements. Here the
-- operation is defined to inherit them all. It is intended to be
-- redefined in circumstances where inheritance is affected by
-- redefinition.
-- The inherit operation is overridden to exclude redefined properties.
overriding function Inheritable_Members
(Self : not null access constant UML_Signal_Proxy;
C : AMF.UML.Classifiers.UML_Classifier_Access)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Classifier::inheritableMembers.
--
-- The query inheritableMembers() gives all of the members of a classifier
-- that may be inherited in one of its descendants, subject to whatever
-- visibility restrictions apply.
overriding function Inherited_Member
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Classifier::inheritedMember.
--
-- The inheritedMember association is derived by inheriting the
-- inheritable members of the parents.
-- The inheritedMember association is derived by inheriting the
-- inheritable members of the parents.
overriding function Is_Template
(Self : not null access constant UML_Signal_Proxy)
return Boolean;
-- Operation Classifier::isTemplate.
--
-- The query isTemplate() returns whether this templateable element is
-- actually a template.
overriding function May_Specialize_Type
(Self : not null access constant UML_Signal_Proxy;
C : AMF.UML.Classifiers.UML_Classifier_Access)
return Boolean;
-- Operation Classifier::maySpecializeType.
--
-- The query maySpecializeType() determines whether this classifier may
-- have a generalization relationship to classifiers of the specified
-- type. By default a classifier may specialize classifiers of the same or
-- a more general type. It is intended to be redefined by classifiers that
-- have different specialization constraints.
overriding function Exclude_Collisions
(Self : not null access constant UML_Signal_Proxy;
Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Operation Namespace::excludeCollisions.
--
-- The query excludeCollisions() excludes from a set of
-- PackageableElements any that would not be distinguishable from each
-- other in this namespace.
overriding function Get_Names_Of_Member
(Self : not null access constant UML_Signal_Proxy;
Element : AMF.UML.Named_Elements.UML_Named_Element_Access)
return AMF.String_Collections.Set_Of_String;
-- Operation Namespace::getNamesOfMember.
--
-- The query getNamesOfMember() takes importing into account. It gives
-- back the set of names that an element would have in an importing
-- namespace, either because it is owned, or if not owned then imported
-- individually, or if not individually then from a package.
-- The query getNamesOfMember() gives a set of all of the names that a
-- member would have in a Namespace. In general a member can have multiple
-- names in a Namespace if it is imported more than once with different
-- aliases. The query takes account of importing. It gives back the set of
-- names that an element would have in an importing namespace, either
-- because it is owned, or if not owned then imported individually, or if
-- not individually then from a package.
overriding function Import_Members
(Self : not null access constant UML_Signal_Proxy;
Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Operation Namespace::importMembers.
--
-- The query importMembers() defines which of a set of PackageableElements
-- are actually imported into the namespace. This excludes hidden ones,
-- i.e., those which have names that conflict with names of owned members,
-- and also excludes elements which would have the same name when imported.
overriding function Imported_Member
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Operation Namespace::importedMember.
--
-- The importedMember property is derived from the ElementImports and the
-- PackageImports. References the PackageableElements that are members of
-- this Namespace as a result of either PackageImports or ElementImports.
overriding function Members_Are_Distinguishable
(Self : not null access constant UML_Signal_Proxy)
return Boolean;
-- Operation Namespace::membersAreDistinguishable.
--
-- The Boolean query membersAreDistinguishable() determines whether all of
-- the namespace's members are distinguishable within it.
overriding function Owned_Member
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Namespace::ownedMember.
--
-- Missing derivation for Namespace::/ownedMember : NamedElement
overriding function All_Owning_Packages
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package;
-- Operation NamedElement::allOwningPackages.
--
-- The query allOwningPackages() returns all the directly or indirectly
-- owning packages.
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Signal_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean;
-- Operation NamedElement::isDistinguishableFrom.
--
-- The query isDistinguishableFrom() determines whether two NamedElements
-- may logically co-exist within a Namespace. By default, two named
-- elements are distinguishable if (a) they have unrelated types or (b)
-- they have related types but different names.
overriding function Namespace
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Operation NamedElement::namespace.
--
-- Missing derivation for NamedElement::/namespace : Namespace
overriding function Conforms_To
(Self : not null access constant UML_Signal_Proxy;
Other : AMF.UML.Types.UML_Type_Access)
return Boolean;
-- Operation Type::conformsTo.
--
-- The query conformsTo() gives true for a type that conforms to another.
-- By default, two types do not conform to each other. This query is
-- intended to be redefined for specific conformance situations.
overriding function Is_Compatible_With
(Self : not null access constant UML_Signal_Proxy;
P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
return Boolean;
-- Operation ParameterableElement::isCompatibleWith.
--
-- The query isCompatibleWith() determines if this parameterable element
-- is compatible with the specified parameterable element. By default
-- parameterable element P is compatible with parameterable element Q if
-- the kind of P is the same or a subtype as the kind of Q. Subclasses
-- should override this operation to specify different compatibility
-- constraints.
overriding function Is_Template_Parameter
(Self : not null access constant UML_Signal_Proxy)
return Boolean;
-- Operation ParameterableElement::isTemplateParameter.
--
-- The query isTemplateParameter() determines if this parameterable
-- element is exposed as a formal template parameter.
overriding function Parameterable_Elements
(Self : not null access constant UML_Signal_Proxy)
return AMF.UML.Parameterable_Elements.Collections.Set_Of_UML_Parameterable_Element;
-- Operation TemplateableElement::parameterableElements.
--
-- The query parameterableElements() returns the set of elements that may
-- be used as the parametered elements for a template parameter of this
-- templateable element. By default, this set includes all the owned
-- elements. Subclasses may override this operation if they choose to
-- restrict the set of parameterable elements.
overriding function Is_Consistent_With
(Self : not null access constant UML_Signal_Proxy;
Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean;
-- Operation RedefinableElement::isConsistentWith.
--
-- The query isConsistentWith() specifies, for any two RedefinableElements
-- in a context in which redefinition is possible, whether redefinition
-- would be logically consistent. By default, this is false; this
-- operation must be overridden for subclasses of RedefinableElement to
-- define the consistency conditions.
overriding function Is_Redefinition_Context_Valid
(Self : not null access constant UML_Signal_Proxy;
Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean;
-- Operation RedefinableElement::isRedefinitionContextValid.
--
-- The query isRedefinitionContextValid() specifies whether the
-- redefinition contexts of this RedefinableElement are properly related
-- to the redefinition contexts of the specified RedefinableElement to
-- allow this element to redefine the other. By default at least one of
-- the redefinition contexts of this element must be a specialization of
-- at least one of the redefinition contexts of the specified element.
overriding procedure Enter_Element
(Self : not null access constant UML_Signal_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Leave_Element
(Self : not null access constant UML_Signal_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Visit_Element
(Self : not null access constant UML_Signal_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of iterator interface.
end AMF.Internals.UML_Signals;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Elements.Expressions;
with Program.Lexical_Elements;
with Program.Elements.Aspect_Specifications;
with Program.Element_Visitors;
package Program.Nodes.Aspect_Specifications is
pragma Preelaborate;
type Aspect_Specification is
new Program.Nodes.Node
and Program.Elements.Aspect_Specifications.Aspect_Specification
and Program.Elements.Aspect_Specifications.Aspect_Specification_Text
with private;
function Create
(Aspect_Mark : not null Program.Elements.Expressions
.Expression_Access;
Arrow_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Aspect_Definition : not null Program.Elements.Expressions
.Expression_Access)
return Aspect_Specification;
type Implicit_Aspect_Specification is
new Program.Nodes.Node
and Program.Elements.Aspect_Specifications.Aspect_Specification
with private;
function Create
(Aspect_Mark : not null Program.Elements.Expressions
.Expression_Access;
Aspect_Definition : not null Program.Elements.Expressions
.Expression_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Aspect_Specification
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Aspect_Specification is
abstract new Program.Nodes.Node
and Program.Elements.Aspect_Specifications.Aspect_Specification
with record
Aspect_Mark : not null Program.Elements.Expressions
.Expression_Access;
Aspect_Definition : not null Program.Elements.Expressions
.Expression_Access;
end record;
procedure Initialize
(Self : aliased in out Base_Aspect_Specification'Class);
overriding procedure Visit
(Self : not null access Base_Aspect_Specification;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Aspect_Mark
(Self : Base_Aspect_Specification)
return not null Program.Elements.Expressions.Expression_Access;
overriding function Aspect_Definition
(Self : Base_Aspect_Specification)
return not null Program.Elements.Expressions.Expression_Access;
overriding function Is_Aspect_Specification_Element
(Self : Base_Aspect_Specification)
return Boolean;
overriding function Is_Definition_Element
(Self : Base_Aspect_Specification)
return Boolean;
type Aspect_Specification is
new Base_Aspect_Specification
and Program.Elements.Aspect_Specifications.Aspect_Specification_Text
with record
Arrow_Token : not null Program.Lexical_Elements.Lexical_Element_Access;
end record;
overriding function To_Aspect_Specification_Text
(Self : aliased in out Aspect_Specification)
return Program.Elements.Aspect_Specifications
.Aspect_Specification_Text_Access;
overriding function Arrow_Token
(Self : Aspect_Specification)
return not null Program.Lexical_Elements.Lexical_Element_Access;
type Implicit_Aspect_Specification is
new Base_Aspect_Specification
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Aspect_Specification_Text
(Self : aliased in out Implicit_Aspect_Specification)
return Program.Elements.Aspect_Specifications
.Aspect_Specification_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Aspect_Specification)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Aspect_Specification)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Aspect_Specification)
return Boolean;
end Program.Nodes.Aspect_Specifications;
|
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with ewok.tasks; use ewok.tasks;
with ewok.devices_shared; use ewok.devices_shared;
with ewok.debug;
with ewok.devices;
with ewok.exported.interrupts;
use type ewok.exported.interrupts.t_interrupt_config_access;
with ewok.interrupts;
with ewok.layout;
with ewok.sched;
with soc.interrupts; use type soc.interrupts.t_interrupt;
with soc.nvic;
with m4.cpu;
#if CONFIG_DBGLEVEL >= 7
with types.c; use types.c;
#end if;
package body ewok.softirq
with spark_mode => off
is
package TSK renames ewok.tasks;
procedure init
is
begin
p_isr_requests.init (isr_queue);
pragma DEBUG (debug.log (debug.INFO, "SOFTIRQ initialized"));
end init;
procedure push_isr
(task_id : in ewok.tasks_shared.t_task_id;
params : in t_isr_parameters)
is
req : constant t_isr_request := (task_id, params);
ok : boolean;
begin
#if CONFIG_KERNEL_EXP_REENTRANCY
-- accessing the softirq input queue is not reentrant
m4.cpu.disable_irq;
#end if;
p_isr_requests.write (isr_queue, req, ok);
if not ok then
#if CONFIG_KERNEL_EXP_REENTRANCY
m4.cpu.enable_irq;
#end if;
debug.panic ("push_isr() failed.");
end if;
#if CONFIG_KERNEL_EXP_REENTRANCY
m4.cpu.enable_irq;
#end if;
ewok.tasks.set_state
(ID_SOFTIRQ, TASK_MODE_MAINTHREAD, TASK_STATE_RUNNABLE);
end push_isr;
procedure push_soft
(task_id : in ewok.tasks_shared.t_task_id;
params : in t_soft_parameters)
is
req : constant t_soft_request := (task_id, params);
ok : boolean;
begin
#if CONFIG_KERNEL_EXP_REENTRANCY
-- accessing the softirq input queue is not reentrant
m4.cpu.disable_irq;
#end if;
p_soft_requests.write (soft_queue, req, ok);
if not ok then
#if CONFIG_KERNEL_EXP_REENTRANCY
m4.cpu.enable_irq;
#end if;
debug.panic ("push_isr() failed.");
end if;
#if CONFIG_KERNEL_EXP_REENTRANCY
m4.cpu.enable_irq;
#end if;
ewok.tasks.set_state
(ID_SOFTIRQ, TASK_MODE_MAINTHREAD, TASK_STATE_RUNNABLE);
end push_soft;
procedure isr_handler (req : in t_isr_request)
is
params : t_parameters;
config_a : ewok.exported.interrupts.t_interrupt_config_access;
begin
-- For further MPU mapping of the device, we need to know which device
-- triggered that interrupt.
-- Note
-- - EXTIs are not associated to any device because they can be
-- associated to several GPIO pins
-- - DMAs are not considered as devices because a single controller
-- can be used by several drivers. DMA streams are registered in a
-- specific table
TSK.tasks_list(req.caller_id).isr_ctx.device_id :=
ewok.interrupts.get_device_from_interrupt (req.params.interrupt);
-- Keep track of some hint about scheduling policy to apply after the end
-- of the ISR execution
-- Note - see above
config_a :=
ewok.devices.get_interrupt_config_from_interrupt (req.params.interrupt);
if config_a /= NULL then
TSK.tasks_list(req.caller_id).isr_ctx.sched_policy := config_a.all.mode;
else
TSK.tasks_list(req.caller_id).isr_ctx.sched_policy := ISR_STANDARD;
end if;
-- Zeroing the ISR stack if the ISR previously executed belongs to
-- another task
if previous_isr_owner /= req.caller_id then
declare
stack : byte_array(1 .. ewok.layout.STACK_SIZE_TASK_ISR)
with address => to_address (ewok.layout.STACK_BOTTOM_TASK_ISR);
begin
stack := (others => 0);
end;
previous_isr_owner := req.caller_id;
end if;
--
-- Note - isr_ctx.entry_point is a wrapper. The real ISR entry
-- point is defined in params(0)
--
-- User defined ISR handler
params(1) := req.params.handler;
-- IRQ
params(2) := unsigned_32'val
(soc.nvic.to_irq_number (req.params.interrupt));
-- Status and data returned by the 'posthook' treatement
-- (cf. ewok.posthook.exec)
params(3) := req.params.posthook_status;
params(4) := req.params.posthook_data;
create_stack
(ewok.layout.STACK_TOP_TASK_ISR,
TSK.tasks_list(req.caller_id).isr_ctx.entry_point, -- Wrapper
params,
TSK.tasks_list(req.caller_id).isr_ctx.frame_a);
ewok.tasks.set_mode (req.caller_id, TASK_MODE_ISRTHREAD);
ewok.tasks.set_state
(req.caller_id, TASK_MODE_ISRTHREAD, TASK_STATE_RUNNABLE);
end isr_handler;
procedure soft_handler (req : in t_soft_request)
is
params : t_parameters;
begin
TSK.tasks_list(req.caller_id).isr_ctx.device_id := ID_DEV_UNUSED;
TSK.tasks_list(req.caller_id).isr_ctx.sched_policy := ISR_STANDARD;
-- Zeroing the ISR stack if the ISR previously executed belongs to
-- another task
if previous_isr_owner /= req.caller_id then
declare
stack : byte_array(1 .. ewok.layout.STACK_SIZE_TASK_ISR)
with address => to_address (ewok.layout.STACK_BOTTOM_TASK_ISR);
begin
stack := (others => 0);
end;
previous_isr_owner := req.caller_id;
end if;
-- User defined ISR handler
params(1) := req.params.handler;
-- Args
params(2) := req.params.param1;
params(3) := req.params.param2;
params(4) := req.params.param3;
--
-- Note - soft_ctx.entry_point is a wrapper. The real ISR entry
-- point is defined in params(1)
--
create_stack
(ewok.layout.STACK_TOP_TASK_ISR,
TSK.tasks_list(req.caller_id).isr_ctx.entry_point, -- Wrapper
params,
TSK.tasks_list(req.caller_id).isr_ctx.frame_a);
ewok.tasks.set_mode (req.caller_id, TASK_MODE_ISRTHREAD);
ewok.tasks.set_state
(req.caller_id, TASK_MODE_ISRTHREAD, TASK_STATE_RUNNABLE);
end soft_handler;
procedure main_task
is
isr_req : t_isr_request;
soft_req : t_soft_request;
ok : boolean;
begin
loop
-- Read pending user ISRs
loop
m4.cpu.disable_irq;
p_isr_requests.read (isr_queue, isr_req, ok);
if not ok then
exit;
end if;
if TSK.tasks_list(isr_req.caller_id).state /= TASK_STATE_LOCKED and
TSK.tasks_list(isr_req.caller_id).state /= TASK_STATE_SLEEPING_DEEP
then
isr_handler (isr_req);
ewok.sched.request_schedule;
m4.cpu.enable_irq;
else
p_isr_requests.write (isr_queue, isr_req, ok);
if not ok then
debug.panic ("SOFTIRQ failed to add ISR request");
end if;
ewok.sched.request_schedule;
m4.cpu.enable_irq;
end if;
end loop;
-- Read pending user soft ISRs
loop
m4.cpu.disable_irq;
p_soft_requests.read (soft_queue, soft_req, ok);
if not ok then
exit;
end if;
if TSK.tasks_list(soft_req.caller_id).state /= TASK_STATE_LOCKED and
TSK.tasks_list(soft_req.caller_id).state /= TASK_STATE_SLEEPING_DEEP
then
soft_handler (soft_req);
ewok.sched.request_schedule;
m4.cpu.enable_irq;
else
p_soft_requests.write (soft_queue, soft_req, ok);
if not ok then
debug.panic ("SOFTIRQ failed to add ISR request");
end if;
ewok.sched.request_schedule;
m4.cpu.enable_irq;
end if;
end loop;
-- No more pending request: Softirq task is IDLE
if p_isr_requests.state (isr_queue) = p_isr_requests.EMPTY and
p_soft_requests.state (soft_queue) = p_soft_requests.EMPTY
then
ewok.tasks.set_state
(ID_SOFTIRQ, TASK_MODE_MAINTHREAD, TASK_STATE_IDLE);
ewok.sched.request_schedule;
end if;
m4.cpu.enable_irq;
end loop;
end main_task;
end ewok.softirq;
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Elements.Expressions;
with Program.Lexical_Elements;
with Program.Elements.Identifiers;
with Program.Elements.Attribute_References;
with Program.Element_Visitors;
package Program.Nodes.Attribute_References is
pragma Preelaborate;
type Attribute_Reference is
new Program.Nodes.Node
and Program.Elements.Attribute_References.Attribute_Reference
and Program.Elements.Attribute_References.Attribute_Reference_Text
with private;
function Create
(Prefix : not null Program.Elements.Expressions
.Expression_Access;
Apostrophe_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Attribute_Designator : not null Program.Elements.Identifiers
.Identifier_Access;
Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Expressions : Program.Elements.Expressions.Expression_Access;
Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access)
return Attribute_Reference;
type Implicit_Attribute_Reference is
new Program.Nodes.Node
and Program.Elements.Attribute_References.Attribute_Reference
with private;
function Create
(Prefix : not null Program.Elements.Expressions
.Expression_Access;
Attribute_Designator : not null Program.Elements.Identifiers
.Identifier_Access;
Expressions : Program.Elements.Expressions.Expression_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Attribute_Reference
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Attribute_Reference is
abstract new Program.Nodes.Node
and Program.Elements.Attribute_References.Attribute_Reference
with record
Prefix : not null Program.Elements.Expressions
.Expression_Access;
Attribute_Designator : not null Program.Elements.Identifiers
.Identifier_Access;
Expressions : Program.Elements.Expressions.Expression_Access;
end record;
procedure Initialize (Self : in out Base_Attribute_Reference'Class);
overriding procedure Visit
(Self : not null access Base_Attribute_Reference;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Prefix
(Self : Base_Attribute_Reference)
return not null Program.Elements.Expressions.Expression_Access;
overriding function Attribute_Designator
(Self : Base_Attribute_Reference)
return not null Program.Elements.Identifiers.Identifier_Access;
overriding function Expressions
(Self : Base_Attribute_Reference)
return Program.Elements.Expressions.Expression_Access;
overriding function Is_Attribute_Reference
(Self : Base_Attribute_Reference)
return Boolean;
overriding function Is_Expression
(Self : Base_Attribute_Reference)
return Boolean;
type Attribute_Reference is
new Base_Attribute_Reference
and Program.Elements.Attribute_References.Attribute_Reference_Text
with record
Apostrophe_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
end record;
overriding function To_Attribute_Reference_Text
(Self : in out Attribute_Reference)
return Program.Elements.Attribute_References
.Attribute_Reference_Text_Access;
overriding function Apostrophe_Token
(Self : Attribute_Reference)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Left_Bracket_Token
(Self : Attribute_Reference)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Right_Bracket_Token
(Self : Attribute_Reference)
return Program.Lexical_Elements.Lexical_Element_Access;
type Implicit_Attribute_Reference is
new Base_Attribute_Reference
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Attribute_Reference_Text
(Self : in out Implicit_Attribute_Reference)
return Program.Elements.Attribute_References
.Attribute_Reference_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Attribute_Reference)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Attribute_Reference)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Attribute_Reference)
return Boolean;
end Program.Nodes.Attribute_References;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="15">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>im2col_2d_cl_1</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>data_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data.V</originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>1024</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>data_col_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>data_col.V</originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<direction>1</direction>
<if_type>1</if_type>
<array_size>16</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>row</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>row</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</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>col</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>col</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>47</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>col_read</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>152</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second class_id="11" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="12" tracking_level="0" version="0">
<first class_id="13" tracking_level="0" version="0">
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>152</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>col</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>68</item>
<item>69</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>1</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>6</id>
<name>row_read</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>152</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>152</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>row</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>70</item>
<item>71</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>2</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>7</id>
<name>row_cast</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>161</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>161</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>3</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>8</id>
<name>col_cast</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>166</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>166</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>4</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>9</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>160</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>160</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>74</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.76</m_delay>
<m_topoIndex>5</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>index_1</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>164</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>164</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>77</item>
<item>78</item>
<item>79</item>
<item>80</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>6</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name>kernel_row</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>160</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>160</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>82</item>
<item>83</item>
<item>84</item>
<item>85</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>7</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name>kernel_row_cast</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>160</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>160</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>86</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>8</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>14</id>
<name>tmp_s</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>160</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>160</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>87</item>
<item>89</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.13</m_delay>
<m_topoIndex>9</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name>kernel_row_2</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>160</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>160</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>90</item>
<item>92</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.65</m_delay>
<m_topoIndex>10</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>17</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>160</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>160</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>93</item>
<item>94</item>
<item>95</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>11</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>19</id>
<name>input_row</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>161</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>161</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>112</item>
<item>113</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.78</m_delay>
<m_topoIndex>12</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name>tmp_30</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>164</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>164</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>114</item>
<item>116</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.78</m_delay>
<m_topoIndex>13</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>tmp</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>163</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>163</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>118</item>
<item>119</item>
<item>121</item>
</oprand_edges>
<opcode>bitselect</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>14</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name>tmp_31</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>169</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>169</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>123</item>
<item>124</item>
<item>125</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>15</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>162</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>162</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>126</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.76</m_delay>
<m_topoIndex>16</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>index_2</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>164</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>164</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>96</item>
<item>97</item>
<item>98</item>
<item>99</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>18</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>kernel_col</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>162</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>162</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>100</item>
<item>101</item>
<item>102</item>
<item>103</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>19</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>27</id>
<name>kernel_col_cast</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>162</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>162</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>20</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name>tmp_32</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>162</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>162</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>105</item>
<item>106</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.13</m_delay>
<m_topoIndex>21</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name>kernel_col_2</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>162</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>162</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>107</item>
<item>108</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.65</m_delay>
<m_topoIndex>22</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>31</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>162</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>162</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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>23</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>33</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>163</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>163</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>140</item>
<item>141</item>
<item>142</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>24</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name>input_col</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>166</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>166</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>157</item>
<item>158</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.78</m_delay>
<m_topoIndex>25</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>input_col_cast_cast</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>167</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>167</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>159</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>26</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>37</id>
<name>tmp_34</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>167</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>167</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>160</item>
<item>161</item>
<item>162</item>
</oprand_edges>
<opcode>bitselect</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>27</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name>tmp_35</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>169</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>169</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>163</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>28</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>39</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>167</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>167</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>164</item>
<item>165</item>
<item>166</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>29</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>41</id>
<name>tmp_36</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>169</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>169</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>144</item>
<item>145</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.63</m_delay>
<m_topoIndex>30</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>42</id>
<name>tmp_37</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>169</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>169</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>146</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>39</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>43</id>
<name>data_V_addr</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>169</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>169</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>10</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>147</item>
<item>148</item>
<item>149</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>40</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>44</id>
<name>data_V_load</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>169</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>169</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>150</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>3.25</m_delay>
<m_topoIndex>41</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>45</id>
<name>data_col_V_addr_1</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>169</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>169</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>151</item>
<item>152</item>
<item>153</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>42</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>46</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>169</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>169</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>154</item>
<item>155</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.32</m_delay>
<m_topoIndex>43</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>47</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>170</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>170</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>156</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>44</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>49</id>
<name>data_col_V_addr_2</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>172</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>172</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>167</item>
<item>168</item>
<item>169</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>31</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>50</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>172</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>172</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>170</item>
<item>171</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.32</m_delay>
<m_topoIndex>32</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</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>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>172</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>33</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>53</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>143</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>45</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>55</id>
<name>tmp_33</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>164</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>164</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>131</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>34</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>56</id>
<name>data_col_V_addr</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>164</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>164</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>132</item>
<item>134</item>
<item>135</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>35</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_46">
<Value>
<Obj>
<type>0</type>
<id>57</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>164</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>164</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>137</item>
<item>138</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.32</m_delay>
<m_topoIndex>36</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_47">
<Value>
<Obj>
<type>0</type>
<id>58</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>165</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>165</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>139</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>37</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_48">
<Value>
<Obj>
<type>0</type>
<id>60</id>
<name>index_4</name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>164</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>164</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>127</item>
<item>129</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.78</m_delay>
<m_topoIndex>46</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_49">
<Value>
<Obj>
<type>0</type>
<id>61</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>162</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>162</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>130</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>47</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_50">
<Value>
<Obj>
<type>0</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>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>75</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>38</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_51">
<Value>
<Obj>
<type>0</type>
<id>65</id>
<name></name>
<fileName>firmware/nnet_utils/nnet_conv2d_large.h</fileName>
<fileDirectory>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</fileDirectory>
<lineNumber>178</lineNumber>
<contextFuncName>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/filipe/MEGA/GitHub/nas-hls4ml/model_multistart/0/hls4ml_prj</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>firmware/nnet_utils/nnet_conv2d_large.h</first>
<second>im2col_2d_cl&lt;ap_fixed&lt;14, 2, 0, 0, 0&gt;, config3&gt;</second>
</first>
<second>178</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>17</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_52">
<Value>
<Obj>
<type>2</type>
<id>76</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_53">
<Value>
<Obj>
<type>2</type>
<id>81</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="_54">
<Value>
<Obj>
<type>2</type>
<id>88</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>4</content>
</item>
<item class_id_reference="16" object_id="_55">
<Value>
<Obj>
<type>2</type>
<id>91</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="_56">
<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>5</bitwidth>
</Value>
<const_type>0</const_type>
<content>4</content>
</item>
<item class_id_reference="16" object_id="_57">
<Value>
<Obj>
<type>2</type>
<id>120</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>5</content>
</item>
<item class_id_reference="16" object_id="_58">
<Value>
<Obj>
<type>2</type>
<id>128</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_59">
<Value>
<Obj>
<type>2</type>
<id>133</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="_60">
<Value>
<Obj>
<type>2</type>
<id>136</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>13</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_61">
<Obj>
<type>3</type>
<id>10</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>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_62">
<Obj>
<type>3</type>
<id>18</id>
<name>.loopexit</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>6</count>
<item_version>0</item_version>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
<item>16</item>
<item>17</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_63">
<Obj>
<type>3</type>
<id>24</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>19</item>
<item>20</item>
<item>21</item>
<item>22</item>
<item>23</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_64">
<Obj>
<type>3</type>
<id>32</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>6</count>
<item_version>0</item_version>
<item>25</item>
<item>26</item>
<item>27</item>
<item>28</item>
<item>30</item>
<item>31</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_65">
<Obj>
<type>3</type>
<id>34</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_66">
<Obj>
<type>3</type>
<id>40</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>35</item>
<item>36</item>
<item>37</item>
<item>38</item>
<item>39</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_67">
<Obj>
<type>3</type>
<id>48</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>7</count>
<item_version>0</item_version>
<item>41</item>
<item>42</item>
<item>43</item>
<item>44</item>
<item>45</item>
<item>46</item>
<item>47</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_68">
<Obj>
<type>3</type>
<id>52</id>
<name>_ZrsILi32ELb0EEN11ap_int_baseIXT_EXT0_EE5RTypeIXT_EXT0_EE4arg1ERKS1_i.exit2.i.i.i.i35.0</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>49</item>
<item>50</item>
<item>51</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_69">
<Obj>
<type>3</type>
<id>54</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_70">
<Obj>
<type>3</type>
<id>59</id>
<name>_ZrsILi32ELb0EEN11ap_int_baseIXT_EXT0_EE5RTypeIXT_EXT0_EE4arg1ERKS1_i.exit2.i.i.i.i.0</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>55</item>
<item>56</item>
<item>57</item>
<item>58</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_71">
<Obj>
<type>3</type>
<id>62</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>2</count>
<item_version>0</item_version>
<item>60</item>
<item>61</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_72">
<Obj>
<type>3</type>
<id>64</id>
<name>.loopexit.loopexit</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>63</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_73">
<Obj>
<type>3</type>
<id>66</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>105</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_74">
<id>69</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>5</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_75">
<id>71</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>6</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_76">
<id>72</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>7</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_77">
<id>73</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>8</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_78">
<id>74</id>
<edge_type>2</edge_type>
<source_obj>18</source_obj>
<sink_obj>9</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_79">
<id>75</id>
<edge_type>2</edge_type>
<source_obj>18</source_obj>
<sink_obj>63</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_80">
<id>77</id>
<edge_type>1</edge_type>
<source_obj>76</source_obj>
<sink_obj>11</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_81">
<id>78</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>11</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_82">
<id>79</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>11</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_83">
<id>80</id>
<edge_type>2</edge_type>
<source_obj>64</source_obj>
<sink_obj>11</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_84">
<id>82</id>
<edge_type>1</edge_type>
<source_obj>81</source_obj>
<sink_obj>12</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_85">
<id>83</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>12</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_86">
<id>84</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>12</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_87">
<id>85</id>
<edge_type>2</edge_type>
<source_obj>64</source_obj>
<sink_obj>12</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_88">
<id>86</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>13</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_89">
<id>87</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>14</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_90">
<id>89</id>
<edge_type>1</edge_type>
<source_obj>88</source_obj>
<sink_obj>14</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_91">
<id>90</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>16</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_92">
<id>92</id>
<edge_type>1</edge_type>
<source_obj>91</source_obj>
<sink_obj>16</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_93">
<id>93</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>17</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_94">
<id>94</id>
<edge_type>2</edge_type>
<source_obj>24</source_obj>
<sink_obj>17</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_95">
<id>95</id>
<edge_type>2</edge_type>
<source_obj>66</source_obj>
<sink_obj>17</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_96">
<id>96</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>25</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_97">
<id>97</id>
<edge_type>2</edge_type>
<source_obj>24</source_obj>
<sink_obj>25</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_98">
<id>98</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>25</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_99">
<id>99</id>
<edge_type>2</edge_type>
<source_obj>62</source_obj>
<sink_obj>25</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_100">
<id>100</id>
<edge_type>1</edge_type>
<source_obj>81</source_obj>
<sink_obj>26</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_101">
<id>101</id>
<edge_type>2</edge_type>
<source_obj>24</source_obj>
<sink_obj>26</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_102">
<id>102</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>26</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_103">
<id>103</id>
<edge_type>2</edge_type>
<source_obj>62</source_obj>
<sink_obj>26</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_104">
<id>104</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>27</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_105">
<id>105</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>28</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_106">
<id>106</id>
<edge_type>1</edge_type>
<source_obj>88</source_obj>
<sink_obj>28</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_107">
<id>107</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>30</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_108">
<id>108</id>
<edge_type>1</edge_type>
<source_obj>91</source_obj>
<sink_obj>30</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_109">
<id>109</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>31</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_110">
<id>110</id>
<edge_type>2</edge_type>
<source_obj>34</source_obj>
<sink_obj>31</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_111">
<id>111</id>
<edge_type>2</edge_type>
<source_obj>64</source_obj>
<sink_obj>31</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_112">
<id>112</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>19</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_113">
<id>113</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>19</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_114">
<id>114</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>20</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_115">
<id>116</id>
<edge_type>1</edge_type>
<source_obj>115</source_obj>
<sink_obj>20</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_116">
<id>119</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>21</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_117">
<id>121</id>
<edge_type>1</edge_type>
<source_obj>120</source_obj>
<sink_obj>21</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_118">
<id>124</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>22</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_119">
<id>125</id>
<edge_type>1</edge_type>
<source_obj>76</source_obj>
<sink_obj>22</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_120">
<id>126</id>
<edge_type>2</edge_type>
<source_obj>32</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_121">
<id>127</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_122">
<id>129</id>
<edge_type>1</edge_type>
<source_obj>128</source_obj>
<sink_obj>60</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_123">
<id>130</id>
<edge_type>2</edge_type>
<source_obj>32</source_obj>
<sink_obj>61</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_124">
<id>131</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>55</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_125">
<id>132</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>56</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_126">
<id>134</id>
<edge_type>1</edge_type>
<source_obj>133</source_obj>
<sink_obj>56</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_127">
<id>135</id>
<edge_type>1</edge_type>
<source_obj>55</source_obj>
<sink_obj>56</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_128">
<id>137</id>
<edge_type>1</edge_type>
<source_obj>136</source_obj>
<sink_obj>57</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_129">
<id>138</id>
<edge_type>1</edge_type>
<source_obj>56</source_obj>
<sink_obj>57</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_130">
<id>139</id>
<edge_type>2</edge_type>
<source_obj>62</source_obj>
<sink_obj>58</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_131">
<id>140</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>33</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_132">
<id>141</id>
<edge_type>2</edge_type>
<source_obj>40</source_obj>
<sink_obj>33</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_133">
<id>142</id>
<edge_type>2</edge_type>
<source_obj>59</source_obj>
<sink_obj>33</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_134">
<id>143</id>
<edge_type>2</edge_type>
<source_obj>62</source_obj>
<sink_obj>53</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_135">
<id>144</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>41</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_136">
<id>145</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>41</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_137">
<id>146</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>42</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_138">
<id>147</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>43</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_139">
<id>148</id>
<edge_type>1</edge_type>
<source_obj>133</source_obj>
<sink_obj>43</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_140">
<id>149</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>43</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_141">
<id>150</id>
<edge_type>1</edge_type>
<source_obj>43</source_obj>
<sink_obj>44</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_142">
<id>151</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>45</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_143">
<id>152</id>
<edge_type>1</edge_type>
<source_obj>133</source_obj>
<sink_obj>45</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_144">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>45</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_145">
<id>154</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>46</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_146">
<id>155</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>46</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_147">
<id>156</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>47</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_148">
<id>157</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>35</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_149">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>35</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_150">
<id>159</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>36</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_151">
<id>161</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>37</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_152">
<id>162</id>
<edge_type>1</edge_type>
<source_obj>120</source_obj>
<sink_obj>37</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_153">
<id>163</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>38</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_154">
<id>164</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>39</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_155">
<id>165</id>
<edge_type>2</edge_type>
<source_obj>48</source_obj>
<sink_obj>39</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_156">
<id>166</id>
<edge_type>2</edge_type>
<source_obj>52</source_obj>
<sink_obj>39</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_157">
<id>167</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>49</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_158">
<id>168</id>
<edge_type>1</edge_type>
<source_obj>133</source_obj>
<sink_obj>49</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_159">
<id>169</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>49</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_160">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>136</source_obj>
<sink_obj>50</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_161">
<id>171</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>50</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_162">
<id>172</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>51</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_163">
<id>183</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>18</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_164">
<id>184</id>
<edge_type>2</edge_type>
<source_obj>18</source_obj>
<sink_obj>66</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_165">
<id>185</id>
<edge_type>2</edge_type>
<source_obj>18</source_obj>
<sink_obj>24</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_166">
<id>186</id>
<edge_type>2</edge_type>
<source_obj>24</source_obj>
<sink_obj>32</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_167">
<id>187</id>
<edge_type>2</edge_type>
<source_obj>32</source_obj>
<sink_obj>64</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_168">
<id>188</id>
<edge_type>2</edge_type>
<source_obj>32</source_obj>
<sink_obj>34</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_169">
<id>189</id>
<edge_type>2</edge_type>
<source_obj>34</source_obj>
<sink_obj>59</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_170">
<id>190</id>
<edge_type>2</edge_type>
<source_obj>34</source_obj>
<sink_obj>40</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_171">
<id>191</id>
<edge_type>2</edge_type>
<source_obj>40</source_obj>
<sink_obj>52</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_172">
<id>192</id>
<edge_type>2</edge_type>
<source_obj>40</source_obj>
<sink_obj>48</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_173">
<id>193</id>
<edge_type>2</edge_type>
<source_obj>48</source_obj>
<sink_obj>54</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_174">
<id>194</id>
<edge_type>2</edge_type>
<source_obj>52</source_obj>
<sink_obj>54</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_175">
<id>195</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>62</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_176">
<id>196</id>
<edge_type>2</edge_type>
<source_obj>59</source_obj>
<sink_obj>62</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_177">
<id>197</id>
<edge_type>2</edge_type>
<source_obj>62</source_obj>
<sink_obj>32</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_178">
<id>198</id>
<edge_type>2</edge_type>
<source_obj>64</source_obj>
<sink_obj>18</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_179">
<mId>1</mId>
<mTag>im2col_2d_cl.1</mTag>
<mType>0</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>7</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>41</mMinLatency>
<mMaxLatency>73</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_180">
<mId>2</mId>
<mTag>Entry</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_181">
<mId>3</mId>
<mTag>Loop 1</mTag>
<mType>1</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>4</item>
<item>5</item>
<item>6</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>4</mMinTripCount>
<mMaxTripCount>4</mMaxTripCount>
<mMinLatency>40</mMinLatency>
<mMaxLatency>72</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_182">
<mId>4</mId>
<mTag>Region 1</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>18</item>
<item>24</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_183">
<mId>5</mId>
<mTag>Loop 1.1</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>8</count>
<item_version>0</item_version>
<item>32</item>
<item>34</item>
<item>40</item>
<item>48</item>
<item>52</item>
<item>54</item>
<item>59</item>
<item>62</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>4</mMinTripCount>
<mMaxTripCount>4</mMaxTripCount>
<mMinLatency>8</mMinLatency>
<mMaxLatency>16</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_184">
<mId>6</mId>
<mTag>Region 2</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_185">
<mId>7</mId>
<mTag>Return</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>66</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_186">
<states class_id="25" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_187">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_188">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_189">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_190">
<id>7</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_191">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_192">
<id>9</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_193">
<id>2</id>
<operations>
<count>13</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_194">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_195">
<id>12</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_196">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_197">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_198">
<id>15</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_199">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_200">
<id>17</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_201">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_202">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_203">
<id>21</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_204">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_205">
<id>23</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_206">
<id>65</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_207">
<id>3</id>
<operations>
<count>22</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_208">
<id>25</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_209">
<id>26</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_210">
<id>27</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_211">
<id>28</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_212">
<id>29</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_213">
<id>30</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_214">
<id>31</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_215">
<id>33</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_216">
<id>35</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_217">
<id>36</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_218">
<id>37</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_219">
<id>38</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_220">
<id>39</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_221">
<id>41</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_222">
<id>49</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_223">
<id>50</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_224">
<id>51</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_225">
<id>55</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_226">
<id>56</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_227">
<id>57</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_228">
<id>58</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_229">
<id>63</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_230">
<id>4</id>
<operations>
<count>3</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_231">
<id>42</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_232">
<id>43</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_233">
<id>44</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_234">
<id>5</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_235">
<id>44</id>
<stage>1</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_236">
<id>6</id>
<operations>
<count>6</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_237">
<id>45</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_238">
<id>46</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_239">
<id>47</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_240">
<id>53</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_241">
<id>60</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_242">
<id>61</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>8</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_243">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>-1</id>
<sop class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_244">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>-1</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>14</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_245">
<inState>3</inState>
<outState>4</outState>
<condition>
<id>-1</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>3</count>
<item_version>0</item_version>
<item>
<first>
<first>28</first>
<second>0</second>
</first>
<second>1</second>
</item>
<item>
<first>
<first>21</first>
<second>0</second>
</first>
<second>1</second>
</item>
<item>
<first>
<first>37</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_246">
<inState>4</inState>
<outState>5</outState>
<condition>
<id>-1</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="_247">
<inState>5</inState>
<outState>6</outState>
<condition>
<id>-1</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="_248">
<inState>3</inState>
<outState>6</outState>
<condition>
<id>-1</id>
<sop>
<count>2</count>
<item_version>0</item_version>
<item>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>28</first>
<second>0</second>
</first>
<second>1</second>
</item>
<item>
<first>
<first>37</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
<item>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>28</first>
<second>0</second>
</first>
<second>1</second>
</item>
<item>
<first>
<first>21</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_249">
<inState>6</inState>
<outState>3</outState>
<condition>
<id>-1</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_250">
<inState>3</inState>
<outState>2</outState>
<condition>
<id>-1</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>28</first>
<second>0</second>
</first>
<second>0</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>47</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>9</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>11</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>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>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>1</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>31</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>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>41</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>42</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>43</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>44</first>
<second>
<first>3</first>
<second>1</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>46</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>47</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>53</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>55</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>56</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>58</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>61</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>65</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="40" tracking_level="0" version="0">
<count>13</count>
<item_version>0</item_version>
<item class_id="41" tracking_level="0" version="0">
<first>10</first>
<second class_id="42" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>18</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>32</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>34</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>2</first>
<second>5</second>
</second>
</item>
<item>
<first>52</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>5</first>
<second>5</second>
</second>
</item>
<item>
<first>59</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>5</first>
<second>5</second>
</second>
</item>
<item>
<first>64</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>1</first>
<second>1</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>32</count>
<item_version>0</item_version>
<item class_id="45" tracking_level="0" version="0">
<first>36</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
<item>
<first>42</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
<item>
<first>48</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>55</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>50</item>
<item>57</item>
<item>46</item>
</second>
</item>
<item>
<first>62</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>56</item>
</second>
</item>
<item>
<first>70</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>77</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>44</item>
<item>44</item>
</second>
</item>
<item>
<first>83</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</item>
</second>
</item>
<item>
<first>95</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>107</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>117</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>129</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>136</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>140</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>144</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>148</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
<item>
<first>154</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>160</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
<item>
<first>165</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>171</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>179</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>187</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>191</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>197</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>203</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>208</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>212</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>220</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>225</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>230</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>235</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>42</item>
</second>
</item>
<item>
<first>239</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="47" tracking_level="0" version="0">
<count>28</count>
<item_version>0</item_version>
<item class_id="48" tracking_level="0" version="0">
<first>col_cast_fu_140</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>data_V_addr_gep_fu_70</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>data_col_V_addr_1_gep_fu_83</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</item>
</second>
</item>
<item>
<first>data_col_V_addr_2_gep_fu_48</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>data_col_V_addr_gep_fu_62</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>56</item>
</second>
</item>
<item>
<first>index_1_phi_fu_95</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>index_2_phi_fu_117</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>index_4_fu_239</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>input_col_cast_cast_fu_208</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>input_col_fu_203</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>input_row_fu_160</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
<item>
<first>kernel_col_2_fu_197</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>kernel_col_cast_fu_187</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>kernel_col_phi_fu_129</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>kernel_row_2_fu_154</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>kernel_row_cast_fu_144</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>kernel_row_phi_fu_107</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>row_cast_fu_136</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>tmp_30_fu_165</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>tmp_31_fu_179</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>tmp_32_fu_191</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>tmp_33_fu_230</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>tmp_34_fu_212</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>tmp_35_fu_220</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>tmp_36_fu_225</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>tmp_37_fu_235</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>42</item>
</second>
</item>
<item>
<first>tmp_fu_171</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>tmp_s_fu_148</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>2</count>
<item_version>0</item_version>
<item>
<first>col_read_read_fu_36</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
<item>
<first>row_read_read_fu_42</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</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>2</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>data_V</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>44</item>
<item>44</item>
</second>
</item>
<item>
<first>
<first>data_col_V</first>
<second>0</second>
</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>50</item>
<item>57</item>
<item>46</item>
</second>
</item>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>17</count>
<item_version>0</item_version>
<item>
<first>91</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>114</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>125</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>245</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>250</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>258</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>263</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>268</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>272</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>280</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>285</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>289</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>294</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>299</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>304</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
<item>
<first>309</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>17</count>
<item_version>0</item_version>
<item>
<first>col_cast_reg_250</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>8</item>
</second>
</item>
<item>
<first>data_V_addr_reg_299</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>43</item>
</second>
</item>
<item>
<first>data_V_load_reg_304</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
<item>
<first>index_1_reg_91</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>index_2_reg_114</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>index_4_reg_309</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>kernel_col_2_reg_280</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>kernel_col_reg_125</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>kernel_row_2_reg_258</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>kernel_row_reg_103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>row_cast_reg_245</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>tmp_30_reg_263</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>tmp_31_reg_272</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>tmp_34_reg_285</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>tmp_35_reg_289</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>tmp_36_reg_294</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>tmp_reg_268</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>4</count>
<item_version>0</item_version>
<item>
<first>91</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>114</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>125</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>4</count>
<item_version>0</item_version>
<item>
<first>index_1_reg_91</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>index_2_reg_114</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>kernel_col_reg_125</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>kernel_row_reg_103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</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>col</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>
<item>
<first>data_V(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>44</item>
<item>44</item>
</second>
</item>
</second>
</item>
<item>
<first>data_col_V(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>store</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>50</item>
<item>57</item>
<item>46</item>
</second>
</item>
</second>
</item>
<item>
<first>row</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>
</dp_port_io_nodes>
<port2core class_id="54" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="55" tracking_level="0" version="0">
<first>1</first>
<second>RAM</second>
</item>
<item>
<first>2</first>
<second>RAM</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- G N A T . S E M A P H O R E S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2003-2010, 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. --
-- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
package body GNAT.Semaphores is
------------------------
-- Counting_Semaphore --
------------------------
protected body Counting_Semaphore is
-----------
-- Seize --
-----------
entry Seize when Count > 0 is
begin
Count := Count - 1;
end Seize;
-------------
-- Release --
-------------
procedure Release is
begin
Count := Count + 1;
end Release;
end Counting_Semaphore;
----------------------
-- Binary_Semaphore --
----------------------
protected body Binary_Semaphore is
-----------
-- Seize --
-----------
entry Seize when Available is
begin
Available := False;
end Seize;
-------------
-- Release --
-------------
procedure Release is
begin
Available := True;
end Release;
end Binary_Semaphore;
end GNAT.Semaphores;
|
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with m4.cpu;
package body soc.interrupts
with spark_mode => on
is
function get_interrupt
return t_interrupt
is
ipsr : constant m4.cpu.t_IPSR_register := m4.cpu.get_ipsr_register;
begin
return t_interrupt'val (ipsr.ISR_NUMBER);
end get_interrupt;
end soc.interrupts;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- S Y S T E M . W I D _ L L I --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- This package contains the routine used for WIdth attribute for all
-- non-static signed integer subtypes. Note we only have one routine,
-- since this seems a fairly marginal function.
package System.Wid_LLI is
pragma Pure (Wid_LLI);
function Width_Long_Long_Integer
(Lo, Hi : Long_Long_Integer)
return Natural;
-- Compute Width attribute for non-static type derived from a signed
-- Integer type. The arguments Lo, Hi are the bounds of the type.
end System.Wid_LLI;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.