text stringlengths 437 491k | meta dict |
|---|---|
package body Bubble with SPARK_Mode is
procedure Sort (A : in out Arr) is
Tmp : Integer;
begin
Outer: for I in reverse A'First .. A'Last - 1 loop
Inner: for J in A'First .. I loop
if A(J) > A(J + 1) then
Tmp := A(J);
A(J) := A(J + 1);
A(J + 1) := Tmp;
e... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- --
------------------------------------------------------------------------------
with Ada.Unchecked_Conversion;
package body ST7735R is
---------------------------
-- Register definitions --
---------------------------
type MA... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
--*
-- OBJECTIVE:
-- CHECK THAT AN UNCONSTRAINED ARRAY TYPE OR A RECORD WITHOUT
-- DEFAULT DISCRIMINANTS CAN BE USED IN AN ACCESS_TYPE_DEFINITION
-- WITHOUT AN INDEX OR DISCRIMINANT CONSTRAINT.
--
-- CHECK THAT (NON-STATIC) INDEX OR DISCRIMINANT CONSTRAINTS CAN
-- SUBSEQUENTLY BE IMPOSED WHEN THE TY... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
------------------------------------------------------------------------------
with Ada.Containers.Hash_Tables;
with Ada.Streams;
with Ada.Finalization;
generic
type Key_Type (<>) is private;
type Element_Type (<>) is private;
with function Hash (Key : Key_Type) return Hash_Type;
with function Equivalent... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-----------------------------------------------------------------------
with Util.Log.Loggers;
with ASF.Cookies;
with AWA.Users.Services;
with AWA.Users.Modules;
package body AWA.Users.Filters is
-- The logger
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("AWA.Users.Filters");
-- ... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
----... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-----------------------------------------------------------------------
with Ada.Strings.Unbounded;
with ADO.Objects;
with ADO.Schemas;
with ADO.Queries;
with Util.Beans.Objects;
with Util.Beans.Basic;
with AWA.Counters.Modules;
with AWA.Counters.Models;
-- == Counter Bean ==
-- The <b>Counter_Bean</b> allows to r... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
With
Ada.Streams,
Ada.Strings.Less_Case_Insensitive,
Ada.Strings.Equal_Case_Insensitive,
Ada.Containers.Indefinite_Ordered_Maps;
Package INI with Preelaborate, Elaborate_Body is
Type Value_Type is ( vt_String, vt_Float, vt_Integer, vt_Boolean );
Type Instance(Convert : Boolean) is private;
Function Exis... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-----------------------------------------------------------------------
with Util.Properties;
with Util.Log.Loggers;
with Bbox.API;
with Druss.Gateways;
with Ada.Strings.Unbounded;
package body Druss.Commands.Ping is
use Ada.Strings.Unbounded;
-- The logger
Log : constant Util.Log.Loggers.Logger := Util.Log... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Common_Formal_Containers; use Common_Formal_Containers;
package afrl.impact.ImpactAutomationRequest.SPARK_Boundary with SPARK_Mode is
pragma Annotate (GNATprove, Terminating, SPARK_Boundary);
function Get_EntityList_From_TrialRequest
(Request : ImpactAutomationRequest) return Int64_Vect
with Glob... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- --
-- 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). --
-- ... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- SOFTWARE.
--------------------------------------------------------------------------------
with Vulkan.Math.GenFType;
with Vulkan.Math.GenDType;
with Vulkan.Math.Vec3;
with Vulkan.Math.Dvec3;
use Vulkan.Math.GenFType;
use Vulkan.Math.GenDType;
use Vulkan.Math.Vec3;
use Vulkan.Math.Dvec3;
--------------------------... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
--
--*
-- * A three channel color struct.
--
type TCOD_ColorRGB is record
r : aliased unsigned_char; -- color.h:47
g : aliased unsigned_char; -- color.h:48
b : aliased unsigned_char; -- color.h:49
end record
with Convention => C_Pass_By_Copy; -- color.h:42
subtype TCOD_co... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-------------------------------------------------------------
with Program.Elements.Declarations;
with Program.Lexical_Elements;
with Program.Elements.Defining_Names;
with Program.Elements.Parameter_Specifications;
with Program.Elements.Expressions;
with Program.Elements.Aspect_Specifications;
package Program.Element... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-----------------------------------------------------------------------
package body EL.Contexts.TLS is
Context : EL.Contexts.ELContext_Access := null;
pragma Thread_Local_Storage (Context);
-- ------------------------------
-- Get the current EL context associated with the current thread.
-- -----... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Containers.Functional_Maps;
with Ada.Containers.Functional_Vectors;
with Common; use Common;
with Ada.Containers; use Ada.Containers;
generic
type Element_Type is private;
package Bounded_Stack with SPARK_Mode is
Capacity : constant Integer := 200;
Empty : constant Integer := 0;
subtype Exten... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
package GBA.Audio is
type Sweep_Shift_Type is range 0 .. 7;
type Frequency_Direction is
( Increasing
, Decreasing
);
for Frequency_Direction use
( Increasing => 0
, Decreasing => 1
);
type Sweep_Duration_Type is range 0 .. 7;
type Sweep_Control_Info is
record
Shift ... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
--*
-- CHECK THAT A CASE_STATEMENT CORRECTLY HANDLES A SMALL RANGE OF
-- POTENTIAL VALUES OF TYPE INTEGER, SITUATED FAR FROM 0 AND
-- GROUPED INTO A SMALL NUMBER OF ALTERNATIVES.
-- (OPTIMIZATION TEST -- BIASED JUMP TABLE.)
-- RM 03/26/81
WITH REPORT;
PROCEDURE C54A42E IS
USE REPORT ;
BEGIN
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Orka.Futures;
with Orka.Jobs.Queues;
with Orka.Resources.Locations;
with Orka.Resources.Loaders;
generic
with package Queues is new Orka.Jobs.Queues (<>);
Job_Queue : Queues.Queue_Ptr;
Maximum_Requests : Positive;
-- Maximum number of resources waiting to be read from a file system
-- or archiv... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- Zip.Compress
-- ------------
--
-- This package facilitates the storage or compression of data.
--
-- Note that unlike decompression where the decoding is unique,
-- there is a quasi indefinite number of ways of compressing data into
-- most Zip-supported formats, including LZW (Shrink), Reduce, Deflate, or LZ... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
package body getter.macros is
function get return character is
c : character;
procedure rem_var (cur : in params_t.cursor) is
begin
environment.delete(environment_t.key(params_t.element(cur)));
end rem_var;
begin
if current_called.last > unb.length(current_macros.code) then
params_t... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Text_IO;
procedure Test_For_Primes is
type Pascal_Triangle_Type is array (Natural range <>) of Long_Long_Integer;
function Calculate_Pascal_Triangle (N : in Natural) return Pascal_Triangle_Type is
Pascal_Triangle : Pascal_Triangle_Type (0 .. N);
begin
Pascal_Triangle (0) := 1;
for... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Measure_Units; use Measure_Units;
with Ada.Text_IO; use Ada.Text_IO;
procedure Aviotest0 is
Avg_Speed : Kn := 350.0;
Travel_Time : Duration := 2.0 * 3600.0; -- two hours
CR : Climb_Rate := 1500.0;
Climb_Time : Duration := 60.0 * 20; -- 2 minutes
Alt0 : Ft := 50_000.0; -- from her... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- --
-- --
-- This file is based on: --
-- --
-- ... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
local url = require("url")
local json = require("json")
name = "Arquivo"
type = "archive"
function start()
set_rate_limit(5)
end
function vertical(ctx, domain)
local resp, err = request(ctx, {['url']=build_url(domain)})
if (err ~= nil and err ~= "") then
log(ctx, "vertical request to service fail... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
package Interfaces.C is
pragma Pure(C);
-- Declarations based on C's <limits.h>
CHAR_BIT : constant := implementation-defined; -- typically 8
SCHAR... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- E... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- SOFTWARE.
with Ada.Containers; use Ada.Containers;
with Ada.Containers.Hashed_Maps;
with Interfaces; use Interfaces;
with DG_Types; use DG_Types;
package Memory is
Words_Per_Page : constant Natural := 1024;
Ring_7_Page_0 : constant Natural := 16#001c_0000#;
-- Physical stuff that has to exist...
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Libadalang.Analysis; use Libadalang.Analysis;
with Utils.Char_Vectors; use Utils.Char_Vectors;
with Utils.Command_Lines; use Utils.Command_Lines;
with Utils.Tools; use Utils.Tools;
with Pp.Scanner; use Pp;
package JSON_Gen.Actions is
type Json_Gen_Tool is new Tool_State with private;
procedure Format_Vecto... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with impact.d3.Shape;
with impact.d3.triangle_Callback;
package impact.d3.Shape.concave
--
-- The impact.d3.Shape.concave class provides an interface for non-moving (static) concave shapes.
-- It has been implemented by the impact.d3.Shape.concave.static_plane, impact.d3.Shape.concave.triangle_mesh.bvh and impact.... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Text_IO, Miller_Rabin;
procedure Nemesis is
type Number is range 0 .. 2**40-1; -- sufficiently large for the task
function Is_Prime(N: Number) return Boolean is
package MR is new Miller_Rabin(Number); use MR;
begin
return MR.Is_Prime(N) = Probably_Prime;
end Is_Prime;
begin
for P... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- -----------------------------------------------------------------------------
with Smk.Files; use Smk.Files;
with Ada.Containers.Doubly_Linked_Lists;
private package Smk.Assertions is
-- --------------------------------------------------------------------------
type Trigger_Type is... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-----------------------------------------------------------------------
with AWA.Modules.Beans;
with AWA.Modules.Get;
with AWA.Applications;
with AWA.Users.Beans;
with Util.Log.Loggers;
package body AWA.Users.Modules is
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("AWA.Users.Module");
p... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with GBA.Input;
use GBA.Input;
package GBA.Input.Buffered is
procedure Update_Key_State;
function Is_Key_Down (K : Key) return Boolean with Inline_Always;
function Are_Any_Down (F : Key_Flags) return Boolean with Inline_Always;
function Are_All_Down (F : Key_Flags) return Boolean with Inline_Always;
func... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-----------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
with Unicode;
with Ada.Exceptions;
with Ada.Strings.Fixed;
with Util.Log.Loggers;
with Util.Serialize.IO.XML;
package body ASF.Views.Nodes.Reader is
use Sax.Readers;
use Sax.Exceptions;
use Sax.Locators;... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Text_IO; use Ada.Text_IO;
procedure Pre_Post is
package P is
type Int_Array is array (Integer range <>) of Integer;
-- Increment the input (obvious)
procedure Increment (A : in out Integer)
with
Post => A = A'Old + 1;
-- A "limited" negate (nonsense...)
proc... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- SOFTWARE.
with Ada.Text_IO; use Ada.Text_IO;
with Debug_Logs; use Debug_Logs;
with Resolver; use Resolver;
package body Processor.Eclipse_FPU_P is
procedure Debug_FPACs (CPU : in CPU_T) is
begin
Loggers.Debug_Print (Debug_Log, "FPAC0: " & CPU.FPAC(0)'Image &
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
--*
-- OBJECTIVE:
-- CHECK THAT A VARIABLE CREATED BY AN ALLOCATOR CAN BE RENAMED AND
-- HAS THE CORRECT VALUE, AND THAT THE NEW NAME CAN BE USED IN AN
-- ASSIGNMENT STATEMENT AND PASSED ON AS AN ACTUAL SUBPROGRAM OR
-- ENTRY 'IN OUT' OR 'OUT' PARAMETER, AND AS AN ACTUAL GENERIC
-- 'IN OUT' PARAMETE... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Arduino_Nano_33_Ble_Sense.IOs;
with Ada.Real_Time; use Ada.Real_Time;
procedure Main is
TimeNow : Ada.Real_Time.Time := Ada.Real_Time.Clock;
begin
loop
--6 13 41 16 24
Arduino_Nano_33_Ble_Sense.IOs.DigitalWrite(13, True);
TimeNow := Ada.Real_Time.Clock;
delay until TimeNow + Ada.Rea... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with System;
with Interfaces.C.Strings;
package AdaBase.Bindings.SQLite is
pragma Preelaborate;
package SYS renames System;
package IC renames Interfaces.C;
package ICS renames Interfaces.C.Strings;
------------------------
-- Type Definitions --
------------------------
type sql64 is ne... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-----------------------------------------------------------------------
with Util.Http.Clients;
with Ada.Strings.Unbounded;
package Util.Http.Clients.Mockups is
-- Register the Http manager.
procedure Register;
-- Set the path of the file that contains the response for the next
-- <b>Do_Get</b> and <b... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
type Verbosity_Level_Type is (None, Low, Medium, High);
Verbosity_Level : Verbosity_Level_Type := High;
-- GNATMAKE, GPRMAKE
-- Modified by gnatmake or gprmake switches -v, -vl, -vm, -vh. Indicates
-- the level of verbosity of informational messages:
--
-- In Low Verbosity, the reasons why a sourc... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
PDE at 0 range 2 .. 2;
PUE at 0 range 3 .. 3;
DRIVE at 0 range 4 .. 5;
IE at 0 range 6 .. 6;
OD at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
type PAD... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with
gel.World,
gel.Camera,
gel.Window;
package gel.Applet.gui_and_sim_world
--
-- Provides an applet configured with a single window and
-- two worlds (generally a simulation world and a gui world).
--
is
type Item is limited new gel.Applet.item with private;
type View is access all Item'Class;
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- { dg-do run }
-- { dg-options "-gnatp" }
procedure Discr24 is
type Family_Type is (Family_Inet, Family_Inet6);
type Port_Type is new Natural;
subtype Inet_Addr_Comp_Type is Natural range 0 .. 255;
type Inet_Addr_VN_Type is array (Natural range <>) of Inet_Addr_Comp_Type;
subtype Inet_Addr_V4_Type... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Numerics.Float_Random;
with Ada.Numerics.Discrete_Random;
with Ada.Numerics.Generic_Elementary_Functions;
with Ada.Containers.Vectors;
with Ada.Containers.Synchronized_Queue_Interfaces;
with Ada.Containers.Unbounded_Priority_Queues;
use type Ada.Containers.Count_Type;
with Ada.Text_IO;
use Ada.Text_IO;
wi... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Finalization;
generic
type Data_Type is private;
type Data_Access is access Data_Type;
package kv.Ref_Counting_Mixin is
type Control_Type is
record
Count : Natural := 0;
Data : Data_Access;
end record;
type Control_Access is access Control_Type;
type Ref_Type is n... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
package body Selection with SPARK_Mode is
procedure Sort (A: in out Arr) is
Tmp: Integer;
Min: Integer;
begin
for I in Integer range A'First .. A'Last loop
Min := I;
for J in Integer range I + 1 .. A'Last loop
pragma Loop_Invariant (for all K in I .. J - 1 => A (Min) <= A (K... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Calendar;
package PortScan.Log is
package CAL renames Ada.Calendar;
overall_log : exception;
-- Open log, dump diagnostic data and stop timer.
function initialize_log
(log_handle : in out TIO.File_Type;
head_time : out CAL.Time;
seq_id : port_id;
slave_root : String... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Interfaces; use Interfaces;
package body Natools.Static_Maps.Web.Fallback_Render.Commands is
P : constant array (0 .. 4) of Natural :=
(1, 4, 9, 13, 16);
T1 : constant array (0 .. 4) of Unsigned_8 :=
(34, 66, 52, 35, 47);
T2 : constant array (0 .. 4) of Unsigned_8 :=
(5, 26, 36, 26, 50)... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
--*
-- OBJECTIVE:
-- CHECK THAT FLOAT_IO GET RAISES CONSTRAINT_ERROR WHEN THE VALUE
-- SUPPLIED BY WIDTH IS NEGATIVE, WIDTH IS GREATER THAN FIELD'LAST
-- WHEN FIELD'LAST IS LESS THAN INTEGER'LAST, OR THE VALUE READ IS
-- OUT OF RANGE OF THE ITEM PARAMETER, BUT WITHIN THE RANGE OF THE
-- SUBTYPE USED... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-------------------------------------------------------------
with Ada.Iterator_Interfaces;
with Program.Elements;
limited with Program.Element_Vectors;
package Program.Element_Iterators is
pragma Pure;
type Child_Iterator is tagged;
type Property_Name is
(Aborted_Tasks,
Actual_Parameter,
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- Lambda Calculus interpreter
-- ---------------------------
-- Parses and reduces Lamdba Calculus statements.
--
-- Use a simple recursive parser for the simplest computer language.
-- It would be nice to build an ADT for Instructions and hide the Multiway tree implementation.
--
-- Source:
-- lambda - [This... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- 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. --
-- E... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-----------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
package body Atlas.Applications.Models is
use type ADO.Objects.Object_Record_Access;
use type ADO.Objects.Object_Ref;
use type ADO.Objects.Object_Record;
-- --------------------
-- Get the bean a... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Types; use Types;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
generic
type T_Element is digits <>;
package Module_IO is
-- Lire l'intégralité du fichier.
procedure Lire(Fichier: in Unbounded_String; PagesNum: out Integer; Liens: out LC_Integer_Integer.T_LC);
-- Ecrire les Pa... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
package freetype_c.FT_Size_Metrics
is
type Item is
record
X_ppem : aliased FT_UShort;
Y_ppem : aliased FT_UShort;
X_Scale : aliased FT_Fixed;
Y_Scale : aliased FT_Fixed;
Ascender : aliased FT_Pos;
Descender : aliased FT_Pos;
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Interfaces; use Interfaces;
package body Lithium.Comment_Cookie_Smaz_Hash is
P : constant array (0 .. 2) of Natural :=
(1, 2, 4);
T1 : constant array (0 .. 2) of Unsigned_8 :=
(44, 115, 66);
T2 : constant array (0 .. 2) of Unsigned_8 :=
(27, 43, 74);
G : constant array (0 .. 122) of... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- Environment
with System;
package Lumen.Internal is
---------------------------------------------------------------------------
-- Xlib stuff needed for our window info record
type Atom is new Long_Integer;
type Display_Pointer is new System.Address;
Null_Display_Pointer : constant Displa... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
end if;
end loop;
end if;
end uptate_state;
-------------------------
-- update_cov
-------------------------
procedure update_cov( P : in out State_Covariance_Matrix; K :Kalman_Gain_Matrix ) is
begin
-- update cov
P := P - (K * G.H) * P;
end update_cov;
-------... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with System;
package Init11 is
type My_Integer is new Integer;
for My_Integer'Alignment use 1;
type Arr1 is array (1 .. 3) of My_Integer;
for Arr1'Scalar_Storage_Order use System.Low_Order_First;
type R1 is record
I : My_Integer;
A : Arr1;
end record;
for R1'Bit_Order use System.Low_Order_Firs... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- with Ada.Containers.Vectors;
-- with Ada.Text_IO;
with Ada.Long_Long_Integer_Text_IO;
with Ada.Strings;
with Ada.Strings.Bounded;
with Ada.Containers; use Ada.Containers;
-- Note that this package currently only handles positive numbers.
package body BigInteger is
use BigInteger.Int_Vector;
-- Sadly we can't u... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with gnatcoll.SQL.Postgres; use gnatcoll.SQL.Postgres;
with gnatcoll.SQL.Exec; use gnatcoll.SQL.Exec;
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO.Unbounded_IO;
with Formatter;
with Ada.Containers.Doubly_Linked... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- Versions of the `struct stat' data structure.
-- i386 versions of the `xmknod' interface.
-- x86-64 versions of the `xmknod' interface.
-- Device.
type stat_uu_glibc_reserved_array is array (0 .. 2) of aliased CUPS.bits_types_h.uu_syscall_slong_t;
type stat is record
st_dev : aliased CU... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Text_IO;
procedure Hamming is
generic
type Int_Type is private;
Zero : Int_Type;
One : Int_Type;
Two : Int_Type;
Three : Int_Type;
Five : Int_Type;
with function "mod" (Left, Right : Int_Type) return Int_Type is <>;
with function "/" (Left, Right : Int... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
package body AWS.Resources.Streams.Pipes is
------------
-- Append --
------------
procedure Append
(Resource : in out Stream_Type;
Buffer : Stream_Element_Array;
Trim : Boolean := False)
is
Lock : Lock_Type (Resource.Guard'Access) with Warnings => Off;
begin
if Re... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
pragma Ada_2012;
-- with Ada.Text_Io; use Ada.Text_Io;
package body Protypo.Api.Engine_Values.Constant_Wrappers is
----------------
-- To_Handler --
----------------
function To_Handler_Value (Value : Engine_Value) return Handler_Value is
begin
if Value in Handler_Value then
return val... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
--
generic
type Element is private;
type Buffer_Index is mod <>;
package Generic_Realtime_Buffer is
pragma Elaborate_Body;
type Realtime_Buffer is private;
procedure Put (B : in out Realtime_Buffer; Item : Element);
procedure Get (B : in out Realtime_Buffer; Item : out Element);
function... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Text_IO;
with Ada.Command_Line;
with AWS.Client;
with AWS.Headers;
with AWS.Response;
with AWS.Messages;
use AWS.Messages;
procedure main is
hdrs : AWS.Headers.List := AWS.Headers.Empty_List;
server_url : constant String := Ada.Command_Line.Argument(1);
player_key : constant String := Ada.Command_Line.Argum... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
--*
-- OBJECTIVE:
-- CHECK THAT AN IMPLICIT DECLARATION OF A PREDEFINED OPERATOR OR
-- AN ENUMERATION LITERAL IS HIDDEN BY A DERIVED SUBPROGRAM
-- HOMOGRAPH.
-- HISTORY:
-- VCL 08/10/88 CREATED ORIGINAL TEST.
WITH REPORT; USE REPORT;
PROCEDURE C83032A IS
BEGIN
TEST ("C83032A", "AN IMPLICIT DECL... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
package Progress_Indicators.Work_Trackers is
-- Tracker used in the tracking of homogenous groups of work farmed out to
-- many tasks. The goal is to track the amount of outstanding elements to
-- process, without caring too much about any individual element of work.
type Status_Report is record
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Numerics.Long_Elementary_Functions;
with Ada.Text_IO; use Ada.Text_IO;
procedure Sequence_Of_Non_Squares_Test is
use Ada.Numerics.Long_Elementary_Functions;
function Non_Square (N : Positive) return Positive is
begin
return N + Positive (Long_Float'Rounding (Sqrt (Long_Float (N))));
end No... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
pragma Ada_2012;
with Protypo.Api.Engine_Values.Parameter_Lists; use Protypo.Api.Engine_Values.Parameter_Lists;
package body User_Records is
---------------
-- Split_Bit --
---------------
function Split_Bit
(Params : Protypo.Api.Engine_Values.Engine_Value_Vectors.Vector)
return Protypo.Api.Eng... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
With
EPL.Types,
EPL.Bracket,
Ada.Strings.Fixed;
Separate (Risi_Script.Types.Patterns)
Package Body Conversions is
Function Trimmed_Image( Input : Integer ) return String is
Use Ada.Strings.Fixed, Ada.Strings;
Begin
return Trim(Side => Left, Source => Integer'Image(Input));
End Trimmed_Image;
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
------------------------------------------------------------------------
-- AMD Élan(tm) SC 520 embedded microprocessor --
-- MMCR -> SDRAM Controller Registers --
-- --
-- reference: Register ... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
--
with Ada.Unchecked_Conversion;
with Interfaces;
with Interfaces.C.Strings;
with Interfaces.C_Streams;
with Interfaces.C;
with Notcurses_Thin;
package Notcurses is
type Notcurses_Context is private;
type Notcurses_Plane is private;
type Notcurses_Input is record
Id : Wide_Wide_Character;
Y ... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with OpenGL.Thin;
package body OpenGL.View is
--
-- Viewport specification.
--
procedure Depth_Range
(Near : in OpenGL.Types.Clamped_Double_t;
Far : in OpenGL.Types.Clamped_Double_t) is
begin
Thin.Depth_Range
(Near_Value => Thin.Double_t (Near),
Far_Value => Thin.Double_t (Far))... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Strings.Maps.Constants;
-- NIGET TOM PEIP2-B2
-- IMPORTANT !
-- Si vous utilisez GNAT ou une vieille version d'Ada pas aux normes,
-- décommentez la ligne ci-dessous e... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Interfaces; use Interfaces;
with HIL;
-- @summary
-- read/write from/to a non-volatile location. Every "variable"
-- has one byte. When the compilation date/time changed, all
-- variables are reset to their respective defaults. Otherwise
-- NVRAM keeps values across reboot/loss of power.
package NVRAM with ... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Exceptions;
with Ada.Strings.Equal_Case_Insensitive;
with Ada.Text_IO;
with Extraction.Bodies_For_Decls;
with Extraction.Bodies_For_Entries;
with Extraction.Decls;
with Extraction.Deferred_Constants;
with Extraction.Derived_Type_Defs;
with Extraction.Direct_Calls;
with Extraction.File_System;
with Extraction.G... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- ****h* Bases/BTrade
-- FUNCTION
-- Provide code for hiring recruits, buying recipes, heal and train crew
-- members in bases.
-- SOURCE
package Bases.Trade is
-- ****
-- ****e* BTrade/BTrade.Trade_Already_Known
-- FUNCTION
-- Raised when player known selected recipe
-- SOURCE
Trade_Already_Known: exc... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- -----------------------------------------------------------------------------
with Language_Defs, Language_Utils;
package Mapcodes.Languages is
-- The supported languages
-- The language names in Roman are the Mixed_Str images of these enums
type Language_List is new Language_Defs.Language_List;
-- Roman, ... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with foo; use foo;
with Interfaces; use Interfaces;
-- GNATprove GPL 2016 seems to miss a failed precondition check
-- in the call at line 18. Reason is insufficient knowledge on
-- others=>, causing a false negative there, which in turn hides
-- a serious bug.
-- Fixed in GNATprove Pro 18 (and presumably later i... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Parse_Args.Generic_Discrete_Array_Options;
package Parse_Args.Integer_Array_Options is
type Integer_Array is array (Integer range <>) of Integer;
type Integer_Array_Access is access Integer_Array;
package Inner is new Generic_Discrete_Array_Options(Element => Integer,
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Numerics.Generic_Real_Arrays;
with GA_Maths;
package SVD is
type Real is digits 18;
package Real_Arrays is new Ada.Numerics.Generic_Real_Arrays (Real);
type SVD (Num_Rows, Num_Cols, Num_Singular, Work_Vector_Rows : Natural) is private;
SVD_Exception : Exception;
function Condition_Num... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- DESCRIPTION used for compressed tables only
-- NOTES somewhat complicated but works fast and generates efficient scanners
-- $Header: /co/ua/self/arcadia/aflex/ada/src/RCS/tblcmpS.a,v 1.3 90/01/12 15:20:47 self Exp Locker: self $
with misc_defs; use misc_defs;
package tblcmp is
-- bldtbl - build table entries ... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Unchecked_Deallocation;
package body Regions.Shared_Lists is
procedure Reference (Self : not null List_Node_Access) with Inline;
procedure Unreference (Self : in out List_Node_Access) with Inline;
procedure Free is new Ada.Unchecked_Deallocation
(List_Node, List_Node_Access);
---------
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
------------------------------------------------------------------------------
package Asis.Gela.Elements.Defs is
--------------------------
-- Type_Definition_Node --
--------------------------
type Type_Definition_Node is abstract
new Definition_Node with private;
type Type_Definition_Ptr i... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
--
package Edc_Client.LED is
--------------------------------------------------------------------------
-- Command string for controlling the LEDs
--------------------------------------------------------------------------
subtype LED_String is String (1 .. 4);
-----------------------------------------... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive others.
-- May you share freely, not taking more than you give.
--
with Ada.Text_IO;
package body Symbols.IO is
procedure Put_Named (Session : in Sessions.Session_Type;
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- implementation unit specialized for Darwin
with System.Storage_Elements;
private with C.malloc.malloc;
package System.Unbounded_Allocators is
-- Separated storage pool for local scope.
pragma Preelaborate;
type Unbounded_Allocator is limited private;
procedure Initialize (Object : in out Unbounded_Al... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
ASSIGN (X, CREATE (30));
IF NOT EQUAL (T'(X), CON (30)) THEN
FAILED ("INCORRECT QUALIFICATION");
END IF;
IF NOT EQUAL (T (X), CON (30)) THEN
FAILED ("INCORRECT SELF CONVERSION");
END IF;
ASSIGN (W, CREATE (-30));
IF NOT EQUAL (T (W), CON (-30)) THEN
FAILED (... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
generic
type Fixed_Point_Type is delta <>;
package Fmt.Generic_Ordinary_Fixed_Point_Argument is
function To_Argument (X : Fixed_Point_Type) return Argument_Type'Class
with Inline;
function "&" (Args : Arguments; X : Fixed_Point_Type) return Arguments
with Inline;
private
type Fixed_Point_Argu... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
package body agar.gui.widget.toolbar is
package cbinds is
function allocate
(parent : widget_access_t;
bar_type : type_t;
num_rows : c.int;
flags : flags_t) return toolbar_access_t;
pragma import (c, allocate, "AG_ToolbarNew");
procedure row
(toolb... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
Function INI.Section_to_Vector( Object : in Instance;
Section: in String:= ""
) return NSO.Types.String_Vector.Vector is
Use NSO.Types.String_Vector;
Begin
Return Result : Vector do
For Item in Object(Section).Iterate loop
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
------------------------------------------------------------------------------
--
-- SPARK Proof Analysis Tool
--
-- S.P.A.T. - Object representing a JSON "proof attempt" object.
--
------------------------------------------------------------------------------
private with Ada.Tags;
with SPAT.Entity;
with SPAT.Field... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with Ada.Containers; use Ada.Containers;
with Ada.Directories; use Ada.Directories;
with Blueprint; use Blueprint;
with AAA.Strings; use AAA.Strings;
with Ada.Command_Line;
with Ada.Text_IO;
with Templates_Parser;
with CLIC.TTY;
with Filesystem;
with Commands;
package body Commands.Destroy is
-----------... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
package ANSI with Pure is
Reset_All : constant String;
-- Resets the device to its original state. This may include (if
-- applicable): reset graphic rendition, clear tabulation stops, reset
-- to default font, and more.
type States is (Off, On);
function Shorten (Sequence : String) return Strin... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
-- --
-- GNAT is maintained by AdaCore (http://www.adacore.com). --
-- --
------------------------------------------------------------------------------
-- ... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
with
ada.Text_IO,
ada.Strings.unbounded,
ada.Strings.Maps;
package body any_Math.any_Geometry.any_d3.any_Modeller.any_Forge
is
function to_Box_Model (half_Extents : in Vector_3 := (0.5, 0.5, 0.5)) return a_Model
is
pragma Unreferenced (half_Extents);
Modeller : any_Modeller.item;
... | {
"source": "starcoderdata",
"programming_language": "ada"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.