12. The GNAT Library

The GNAT library contains a number of general and special purpose packages. It represents functionality that the GNAT developers have found useful, and which is made available to GNAT users. The packages described here are fully supported, and upwards compatibility will be maintained in future releases, so you can use these facilities with the confidence that the same functionality will be available in future releases.

The chapter here simply gives a brief summary of the facilities available. The full documentation is found in the spec file for the package. The full sources of these library packages, including both spec and body, are provided with all GNAT releases. For example, to find out the full specifications of the SPITBOL pattern matching capability, including a full tutorial and extensive examples, look in the g-spipat.ads file in the library.

For each entry here, the package name (as it would appear in a with clause) is given, followed by the name of the corresponding spec file in parentheses. The packages are children in four hierarchies, Ada, Interfaces, System, and GNAT, the latter being a GNAT-specific hierarchy.

Note that an application program should only use packages in one of these four hierarchies if the package is defined in the Ada Reference Manual, or is listed in this section of the GNAT Programmers Reference Manual. All other units should be considered internal implementation units and should not be directly withed by application code. The use of a with clause that references one of these internal implementation units makes an application potentially dependent on changes in versions of GNAT, and will generate a warning message.

12.1. Ada.Characters.Latin_9 (a-chlat9.ads)

This child of Ada.Characters provides a set of definitions corresponding to those in the RM-defined package Ada.Characters.Latin_1 but with the few modifications required for Latin-9 The provision of such a package is specifically authorized by the Ada Reference Manual (RM A.3.3(27)).

12.2. Ada.Characters.Wide_Latin_1 (a-cwila1.ads)

This child of Ada.Characters provides a set of definitions corresponding to those in the RM-defined package Ada.Characters.Latin_1 but with the types of the constants being Wide_Character instead of Character. The provision of such a package is specifically authorized by the Ada Reference Manual (RM A.3.3(27)).

12.3. Ada.Characters.Wide_Latin_9 (a-cwila1.ads)

This child of Ada.Characters provides a set of definitions corresponding to those in the GNAT defined package Ada.Characters.Latin_9 but with the types of the constants being Wide_Character instead of Character. The provision of such a package is specifically authorized by the Ada Reference Manual (RM A.3.3(27)).

12.4. Ada.Characters.Wide_Wide_Latin_1 (a-chzla1.ads)

This child of Ada.Characters provides a set of definitions corresponding to those in the RM-defined package Ada.Characters.Latin_1 but with the types of the constants being Wide_Wide_Character instead of Character. The provision of such a package is specifically authorized by the Ada Reference Manual (RM A.3.3(27)).

12.5. Ada.Characters.Wide_Wide_Latin_9 (a-chzla9.ads)

This child of Ada.Characters provides a set of definitions corresponding to those in the GNAT defined package Ada.Characters.Latin_9 but with the types of the constants being Wide_Wide_Character instead of Character. The provision of such a package is specifically authorized by the Ada Reference Manual (RM A.3.3(27)).

12.6. Ada.Containers.Formal_Doubly_Linked_Lists (a-cfdlli.ads)

This child of Ada.Containers defines a modified version of the Ada 2005 container for doubly linked lists, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014.

Note that although this container was designed with formal verification in mind, it may well be generally useful in that it is a simplified more efficient version than the one defined in the standard. In particular it does not have the complex overhead required to detect cursor tampering.

12.7. Ada.Containers.Formal_Hashed_Maps (a-cfhama.ads)

This child of Ada.Containers defines a modified version of the Ada 2005 container for hashed maps, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014.

Note that although this container was designed with formal verification in mind, it may well be generally useful in that it is a simplified more efficient version than the one defined in the standard. In particular it does not have the complex overhead required to detect cursor tampering.

12.8. Ada.Containers.Formal_Hashed_Sets (a-cfhase.ads)

This child of Ada.Containers defines a modified version of the Ada 2005 container for hashed sets, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014.

Note that although this container was designed with formal verification in mind, it may well be generally useful in that it is a simplified more efficient version than the one defined in the standard. In particular it does not have the complex overhead required to detect cursor tampering.

12.9. Ada.Containers.Formal_Ordered_Maps (a-cforma.ads)

This child of Ada.Containers defines a modified version of the Ada 2005 container for ordered maps, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014.

Note that although this container was designed with formal verification in mind, it may well be generally useful in that it is a simplified more efficient version than the one defined in the standard. In particular it does not have the complex overhead required to detect cursor tampering.

12.10. Ada.Containers.Formal_Ordered_Sets (a-cforse.ads)

This child of Ada.Containers defines a modified version of the Ada 2005 container for ordered sets, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014.

Note that although this container was designed with formal verification in mind, it may well be generally useful in that it is a simplified more efficient version than the one defined in the standard. In particular it does not have the complex overhead required to detect cursor tampering.

12.11. Ada.Containers.Formal_Vectors (a-cofove.ads)

This child of Ada.Containers defines a modified version of the Ada 2005 container for vectors, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014.

Note that although this container was designed with formal verification in mind, it may well be generally useful in that it is a simplified more efficient version than the one defined in the standard. In particular it does not have the complex overhead required to detect cursor tampering.

12.12. Ada.Containers.Formal_Indefinite_Vectors (a-cfinve.ads)

This child of Ada.Containers defines a modified version of the Ada 2005 container for vectors of indefinite elements, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014.

Note that although this container was designed with formal verification in mind, it may well be generally useful in that it is a simplified more efficient version than the one defined in the standard. In particular it does not have the complex overhead required to detect cursor tampering.

12.13. Ada.Containers.Functional_Vectors (a-cofuve.ads)

This child of Ada.Containers defines immutable vectors. These containers are unbounded and may contain indefinite elements. Furthermore, to be usable in every context, they are neither controlled nor limited. As they are functional, that is, no primitives are provided which would allow modifying an existing container, these containers can still be used safely.

Their API features functions creating new containers from existing ones. As a consequence, these containers are highly inefficient. They are also memory consuming, as the allocated memory is not reclaimed when the container is no longer referenced. Thus, they should in general be used in ghost code and annotations, so that they can be removed from the final executable. The specification of this unit is compatible with SPARK 2014.

12.14. Ada.Containers.Functional_Sets (a-cofuse.ads)

This child of Ada.Containers defines immutable sets. These containers are unbounded and may contain indefinite elements. Furthermore, to be usable in every context, they are neither controlled nor limited. As they are functional, that is, no primitives are provided which would allow modifying an existing container, these containers can still be used safely.

Their API features functions creating new containers from existing ones. As a consequence, these containers are highly inefficient. They are also memory consuming, as the allocated memory is not reclaimed when the container is no longer referenced. Thus, they should in general be used in ghost code and annotations, so that they can be removed from the final executable. The specification of this unit is compatible with SPARK 2014.

12.15. Ada.Containers.Functional_Maps (a-cofuma.ads)

This child of Ada.Containers defines immutable maps. These containers are unbounded and may contain indefinite elements. Furthermore, to be usable in every context, they are neither controlled nor limited. As they are functional, that is, no primitives are provided which would allow modifying an existing container, these containers can still be used safely.

Their API features functions creating new containers from existing ones. As a consequence, these containers are highly inefficient. They are also memory consuming, as the allocated memory is not reclaimed when the container is no longer referenced. Thus, they should in general be used in ghost code and annotations, so that they can be removed from the final executable. The specification of this unit is compatible with SPARK 2014.

12.16. Ada.Containers.Bounded_Holders (a-coboho.ads)

This child of Ada.Containers defines a modified version of Indefinite_Holders that avoids heap allocation.

12.17. Ada.Command_Line.Environment (a-colien.ads)

This child of Ada.Command_Line provides a mechanism for obtaining environment values on systems where this concept makes sense.

12.18. Ada.Command_Line.Remove (a-colire.ads)

This child of Ada.Command_Line provides a mechanism for logically removing arguments from the argument list. Once removed, an argument is not visible to further calls on the subprograms in Ada.Command_Line will not see the removed argument.

12.19. Ada.Command_Line.Response_File (a-clrefi.ads)

This child of Ada.Command_Line provides a mechanism facilities for getting command line arguments from a text file, called a “response file”. Using a response file allow passing a set of arguments to an executable longer than the maximum allowed by the system on the command line.

12.20. Ada.Direct_IO.C_Streams (a-diocst.ads)

This package provides subprograms that allow interfacing between C streams and Direct_IO. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side.

12.21. Ada.Exceptions.Is_Null_Occurrence (a-einuoc.ads)

This child subprogram provides a way of testing for the null exception occurrence (Null_Occurrence) without raising an exception.

12.22. Ada.Exceptions.Last_Chance_Handler (a-elchha.ads)

This child subprogram is used for handling otherwise unhandled exceptions (hence the name last chance), and perform clean ups before terminating the program. Note that this subprogram never returns.

12.23. Ada.Exceptions.Traceback (a-exctra.ads)

This child package provides the subprogram (Tracebacks) to give a traceback array of addresses based on an exception occurrence.

12.24. Ada.Sequential_IO.C_Streams (a-siocst.ads)

This package provides subprograms that allow interfacing between C streams and Sequential_IO. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side.

12.25. Ada.Streams.Stream_IO.C_Streams (a-ssicst.ads)

This package provides subprograms that allow interfacing between C streams and Stream_IO. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side.

12.26. Ada.Strings.Unbounded.Text_IO (a-suteio.ads)

This package provides subprograms for Text_IO for unbounded strings, avoiding the necessity for an intermediate operation with ordinary strings.

12.27. Ada.Strings.Wide_Unbounded.Wide_Text_IO (a-swuwti.ads)

This package provides subprograms for Text_IO for unbounded wide strings, avoiding the necessity for an intermediate operation with ordinary wide strings.

12.28. Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO (a-szuzti.ads)

This package provides subprograms for Text_IO for unbounded wide wide strings, avoiding the necessity for an intermediate operation with ordinary wide wide strings.

12.29. Ada.Text_IO.C_Streams (a-tiocst.ads)

This package provides subprograms that allow interfacing between C streams and Text_IO. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side.

12.30. Ada.Text_IO.Reset_Standard_Files (a-tirsfi.ads)

This procedure is used to reset the status of the standard files used by Ada.Text_IO. This is useful in a situation (such as a restart in an embedded application) where the status of the files may change during execution (for example a standard input file may be redefined to be interactive).

12.31. Ada.Wide_Characters.Unicode (a-wichun.ads)

This package provides subprograms that allow categorization of Wide_Character values according to Unicode categories.

12.32. Ada.Wide_Text_IO.C_Streams (a-wtcstr.ads)

This package provides subprograms that allow interfacing between C streams and Wide_Text_IO. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side.

12.33. Ada.Wide_Text_IO.Reset_Standard_Files (a-wrstfi.ads)

This procedure is used to reset the status of the standard files used by Ada.Wide_Text_IO. This is useful in a situation (such as a restart in an embedded application) where the status of the files may change during execution (for example a standard input file may be redefined to be interactive).

12.34. Ada.Wide_Wide_Characters.Unicode (a-zchuni.ads)

This package provides subprograms that allow categorization of Wide_Wide_Character values according to Unicode categories.

12.35. Ada.Wide_Wide_Text_IO.C_Streams (a-ztcstr.ads)

This package provides subprograms that allow interfacing between C streams and Wide_Wide_Text_IO. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side.

12.36. Ada.Wide_Wide_Text_IO.Reset_Standard_Files (a-zrstfi.ads)

This procedure is used to reset the status of the standard files used by Ada.Wide_Wide_Text_IO. This is useful in a situation (such as a restart in an embedded application) where the status of the files may change during execution (for example a standard input file may be redefined to be interactive).

12.37. GNAT.Altivec (g-altive.ads)

This is the root package of the GNAT AltiVec binding. It provides definitions of constants and types common to all the versions of the binding.

12.38. GNAT.Altivec.Conversions (g-altcon.ads)

This package provides the Vector/View conversion routines.

12.39. GNAT.Altivec.Vector_Operations (g-alveop.ads)

This package exposes the Ada interface to the AltiVec operations on vector objects. A soft emulation is included by default in the GNAT library. The hard binding is provided as a separate package. This unit is common to both bindings.

12.40. GNAT.Altivec.Vector_Types (g-alvety.ads)

This package exposes the various vector types part of the Ada binding to AltiVec facilities.

12.41. GNAT.Altivec.Vector_Views (g-alvevi.ads)

This package provides public ‘View’ data types from/to which private vector representations can be converted via GNAT.Altivec.Conversions. This allows convenient access to individual vector elements and provides a simple way to initialize vector objects.

12.42. GNAT.Array_Split (g-arrspl.ads)

Useful array-manipulation routines: given a set of separators, split an array wherever the separators appear, and provide direct access to the resulting slices.

12.43. GNAT.AWK (g-awk.ads)

Provides AWK-like parsing functions, with an easy interface for parsing one or more files containing formatted data. The file is viewed as a database where each record is a line and a field is a data element in this line.

12.44. GNAT.Bind_Environment (g-binenv.ads)

Provides access to key=value associations captured at bind time. These associations can be specified using the -V binder command line switch.

12.45. GNAT.Bounded_Buffers (g-boubuf.ads)

Provides a concurrent generic bounded buffer abstraction. Instances are useful directly or as parts of the implementations of other abstractions, such as mailboxes.

12.46. GNAT.Bounded_Mailboxes (g-boumai.ads)

Provides a thread-safe asynchronous intertask mailbox communication facility.

12.47. GNAT.Bubble_Sort (g-bubsor.ads)

Provides a general implementation of bubble sort usable for sorting arbitrary data items. Exchange and comparison procedures are provided by passing access-to-procedure values.

12.48. GNAT.Bubble_Sort_A (g-busora.ads)

Provides a general implementation of bubble sort usable for sorting arbitrary data items. Move and comparison procedures are provided by passing access-to-procedure values. This is an older version, retained for compatibility. Usually GNAT.Bubble_Sort will be preferable.

12.49. GNAT.Bubble_Sort_G (g-busorg.ads)

Similar to Bubble_Sort_A except that the move and sorting procedures are provided as generic parameters, this improves efficiency, especially if the procedures can be inlined, at the expense of duplicating code for multiple instantiations.

12.50. GNAT.Byte_Order_Mark (g-byorma.ads)

Provides a routine which given a string, reads the start of the string to see whether it is one of the standard byte order marks (BOM’s) which signal the encoding of the string. The routine includes detection of special XML sequences for various UCS input formats.

12.51. GNAT.Byte_Swapping (g-bytswa.ads)

General routines for swapping the bytes in 2-, 4-, and 8-byte quantities. Machine-specific implementations are available in some cases.

12.52. GNAT.Calendar (g-calend.ads)

Extends the facilities provided by Ada.Calendar to include handling of days of the week, an extended Split and Time_Of capability. Also provides conversion of Ada.Calendar.Time values to and from the C timeval format.

12.53. GNAT.Calendar.Time_IO (g-catiio.ads)

12.54. GNAT.CRC32 (g-crc32.ads)

This package implements the CRC-32 algorithm. For a full description of this algorithm see Computation of Cyclic Redundancy Checks via Table Look-Up, Communications of the ACM, Vol. 31 No. 8, pp. 1008-1013, Aug. 1988. Sarwate, D.V.

12.55. GNAT.Case_Util (g-casuti.ads)

A set of simple routines for handling upper and lower casing of strings without the overhead of the full casing tables in Ada.Characters.Handling.

12.56. GNAT.CGI (g-cgi.ads)

This is a package for interfacing a GNAT program with a Web server via the Common Gateway Interface (CGI). Basically this package parses the CGI parameters, which are a set of key/value pairs sent by the Web server. It builds a table whose index is the key and provides some services to deal with this table.

12.58. GNAT.CGI.Debug (g-cgideb.ads)

This is a package to help debugging CGI (Common Gateway Interface) programs written in Ada.

12.59. GNAT.Command_Line (g-comlin.ads)

Provides a high level interface to Ada.Command_Line facilities, including the ability to scan for named switches with optional parameters and expand file names using wild card notations.

12.60. GNAT.Compiler_Version (g-comver.ads)

Provides a routine for obtaining the version of the compiler used to compile the program. More accurately this is the version of the binder used to bind the program (this will normally be the same as the version of the compiler if a consistent tool set is used to compile all units of a partition).

12.61. GNAT.Ctrl_C (g-ctrl_c.ads)

Provides a simple interface to handle Ctrl-C keyboard events.

12.62. GNAT.Current_Exception (g-curexc.ads)

Provides access to information on the current exception that has been raised without the need for using the Ada 95 / Ada 2005 exception choice parameter specification syntax. This is particularly useful in simulating typical facilities for obtaining information about exceptions provided by Ada 83 compilers.

12.63. GNAT.Debug_Pools (g-debpoo.ads)

Provide a debugging storage pools that helps tracking memory corruption problems. See The GNAT Debug_Pool Facility section in the GNAT User’s Guide.

12.64. GNAT.Debug_Utilities (g-debuti.ads)

Provides a few useful utilities for debugging purposes, including conversion to and from string images of address values. Supports both C and Ada formats for hexadecimal literals.

12.65. GNAT.Decode_String (g-decstr.ads)

A generic package providing routines for decoding wide character and wide wide character strings encoded as sequences of 8-bit characters using a specified encoding method. Includes validation routines, and also routines for stepping to next or previous encoded character in an encoded string. Useful in conjunction with Unicode character coding. Note there is a preinstantiation for UTF-8. See next entry.

12.66. GNAT.Decode_UTF8_String (g-deutst.ads)

A preinstantiation of GNAT.Decode_Strings for UTF-8 encoding.

12.67. GNAT.Directory_Operations (g-dirope.ads)

Provides a set of routines for manipulating directories, including changing the current directory, making new directories, and scanning the files in a directory.

12.68. GNAT.Directory_Operations.Iteration (g-diopit.ads)

A child unit of GNAT.Directory_Operations providing additional operations for iterating through directories.

12.69. GNAT.Dynamic_HTables (g-dynhta.ads)

A generic implementation of hash tables that can be used to hash arbitrary data. Provided in two forms, a simple form with built in hash functions, and a more complex form in which the hash function is supplied.

This package provides a facility similar to that of GNAT.HTable, except that this package declares a type that can be used to define dynamic instances of the hash table, while an instantiation of GNAT.HTable creates a single instance of the hash table.

12.70. GNAT.Dynamic_Tables (g-dyntab.ads)

A generic package providing a single dimension array abstraction where the length of the array can be dynamically modified.

This package provides a facility similar to that of GNAT.Table, except that this package declares a type that can be used to define dynamic instances of the table, while an instantiation of GNAT.Table creates a single instance of the table type.

12.71. GNAT.Encode_String (g-encstr.ads)

A generic package providing routines for encoding wide character and wide wide character strings as sequences of 8-bit characters using a specified encoding method. Useful in conjunction with Unicode character coding. Note there is a preinstantiation for UTF-8. See next entry.

12.72. GNAT.Encode_UTF8_String (g-enutst.ads)

A preinstantiation of GNAT.Encode_Strings for UTF-8 encoding.

12.73. GNAT.Exception_Actions (g-excact.ads)

Provides callbacks when an exception is raised. Callbacks can be registered for specific exceptions, or when any exception is raised. This can be used for instance to force a core dump to ease debugging.

12.74. GNAT.Exception_Traces (g-exctra.ads)

Provides an interface allowing to control automatic output upon exception occurrences.

12.75. GNAT.Exceptions (g-expect.ads)

Normally it is not possible to raise an exception with a message from a subprogram in a pure package, since the necessary types and subprograms are in Ada.Exceptions which is not a pure unit. GNAT.Exceptions provides a facility for getting around this limitation for a few predefined exceptions, and for example allow raising Constraint_Error with a message from a pure subprogram.

12.76. GNAT.Expect (g-expect.ads)

Provides a set of subprograms similar to what is available with the standard Tcl Expect tool. It allows you to easily spawn and communicate with an external process. You can send commands or inputs to the process, and compare the output with some expected regular expression. Currently GNAT.Expect is implemented on all native GNAT ports. It is not implemented for cross ports, and in particular is not implemented for VxWorks or LynxOS.

12.77. GNAT.Expect.TTY (g-exptty.ads)

As GNAT.Expect but using pseudo-terminal. Currently GNAT.Expect.TTY is implemented on all native GNAT ports. It is not implemented for cross ports, and in particular is not implemented for VxWorks or LynxOS.

12.78. GNAT.Float_Control (g-flocon.ads)

Provides an interface for resetting the floating-point processor into the mode required for correct semantic operation in Ada. Some third party library calls may cause this mode to be modified, and the Reset procedure in this package can be used to reestablish the required mode.

12.79. GNAT.Formatted_String (g-forstr.ads)

Provides support for C/C++ printf() formatted strings. The format is copied from the printf() routine and should therefore gives identical output. Some generic routines are provided to be able to use types derived from Integer, Float or enumerations as values for the formatted string.

12.80. GNAT.Heap_Sort (g-heasor.ads)

Provides a general implementation of heap sort usable for sorting arbitrary data items. Exchange and comparison procedures are provided by passing access-to-procedure values. The algorithm used is a modified heap sort that performs approximately N*log(N) comparisons in the worst case.

12.81. GNAT.Heap_Sort_A (g-hesora.ads)

Provides a general implementation of heap sort usable for sorting arbitrary data items. Move and comparison procedures are provided by passing access-to-procedure values. The algorithm used is a modified heap sort that performs approximately N*log(N) comparisons in the worst case. This differs from GNAT.Heap_Sort in having a less convenient interface, but may be slightly more efficient.

12.82. GNAT.Heap_Sort_G (g-hesorg.ads)

Similar to Heap_Sort_A except that the move and sorting procedures are provided as generic parameters, this improves efficiency, especially if the procedures can be inlined, at the expense of duplicating code for multiple instantiations.

12.83. GNAT.HTable (g-htable.ads)

A generic implementation of hash tables that can be used to hash arbitrary data. Provides two approaches, one a simple static approach, and the other allowing arbitrary dynamic hash tables.

12.84. GNAT.IO (g-io.ads)

A simple preelaborable input-output package that provides a subset of simple Text_IO functions for reading characters and strings from Standard_Input, and writing characters, strings and integers to either Standard_Output or Standard_Error.

12.85. GNAT.IO_Aux (g-io_aux.ads)

Provides some auxiliary functions for use with Text_IO, including a test for whether a file exists, and functions for reading a line of text.

12.86. GNAT.Lock_Files (g-locfil.ads)

Provides a general interface for using files as locks. Can be used for providing program level synchronization.

12.87. GNAT.MBBS_Discrete_Random (g-mbdira.ads)

The original implementation of Ada.Numerics.Discrete_Random. Uses a modified version of the Blum-Blum-Shub generator.

12.88. GNAT.MBBS_Float_Random (g-mbflra.ads)

The original implementation of Ada.Numerics.Float_Random. Uses a modified version of the Blum-Blum-Shub generator.

12.89. GNAT.MD5 (g-md5.ads)

Implements the MD5 Message-Digest Algorithm as described in RFC 1321, and the HMAC-MD5 message authentication function as described in RFC 2104 and FIPS PUB 198.

12.90. GNAT.Memory_Dump (g-memdum.ads)

Provides a convenient routine for dumping raw memory to either the standard output or standard error files. Uses GNAT.IO for actual output.

12.91. GNAT.Most_Recent_Exception (g-moreex.ads)

Provides access to the most recently raised exception. Can be used for various logging purposes, including duplicating functionality of some Ada 83 implementation dependent extensions.

12.92. GNAT.OS_Lib (g-os_lib.ads)

Provides a range of target independent operating system interface functions, including time/date management, file operations, subprocess management, including a portable spawn procedure, and access to environment variables and error return codes.

12.93. GNAT.Perfect_Hash_Generators (g-pehage.ads)

Provides a generator of static minimal perfect hash functions. No collisions occur and each item can be retrieved from the table in one probe (perfect property). The hash table size corresponds to the exact size of the key set and no larger (minimal property). The key set has to be know in advance (static property). The hash functions are also order preserving. If w2 is inserted after w1 in the generator, their hashcode are in the same order. These hashing functions are very convenient for use with realtime applications.

12.94. GNAT.Random_Numbers (g-rannum.ads)

Provides random number capabilities which extend those available in the standard Ada library and are more convenient to use.

12.95. GNAT.Regexp (g-regexp.ads)

A simple implementation of regular expressions, using a subset of regular expression syntax copied from familiar Unix style utilities. This is the simplest of the three pattern matching packages provided, and is particularly suitable for ‘file globbing’ applications.

12.96. GNAT.Registry (g-regist.ads)

This is a high level binding to the Windows registry. It is possible to do simple things like reading a key value, creating a new key. For full registry API, but at a lower level of abstraction, refer to the Win32.Winreg package provided with the Win32Ada binding

12.97. GNAT.Regpat (g-regpat.ads)

A complete implementation of Unix-style regular expression matching, copied from the original V7 style regular expression library written in C by Henry Spencer (and binary compatible with this C library).

12.98. GNAT.Rewrite_Data (g-rewdat.ads)

A unit to rewrite on-the-fly string occurrences in a stream of data. The implementation has a very minimal memory footprint as the full content to be processed is not loaded into memory all at once. This makes this interface usable for large files or socket streams.

12.99. GNAT.Secondary_Stack_Info (g-sestin.ads)

Provide the capability to query the high water mark of the current task’s secondary stack.

12.100. GNAT.Semaphores (g-semaph.ads)

Provides classic counting and binary semaphores using protected types.

12.101. GNAT.Serial_Communications (g-sercom.ads)

Provides a simple interface to send and receive data over a serial port. This is only supported on GNU/Linux and Windows.

12.102. GNAT.SHA1 (g-sha1.ads)

Implements the SHA-1 Secure Hash Algorithm as described in FIPS PUB 180-3 and RFC 3174, and the HMAC-SHA1 message authentication function as described in RFC 2104 and FIPS PUB 198.

12.103. GNAT.SHA224 (g-sha224.ads)

Implements the SHA-224 Secure Hash Algorithm as described in FIPS PUB 180-3, and the HMAC-SHA224 message authentication function as described in RFC 2104 and FIPS PUB 198.

12.104. GNAT.SHA256 (g-sha256.ads)

Implements the SHA-256 Secure Hash Algorithm as described in FIPS PUB 180-3, and the HMAC-SHA256 message authentication function as described in RFC 2104 and FIPS PUB 198.

12.105. GNAT.SHA384 (g-sha384.ads)

Implements the SHA-384 Secure Hash Algorithm as described in FIPS PUB 180-3, and the HMAC-SHA384 message authentication function as described in RFC 2104 and FIPS PUB 198.

12.106. GNAT.SHA512 (g-sha512.ads)

Implements the SHA-512 Secure Hash Algorithm as described in FIPS PUB 180-3, and the HMAC-SHA512 message authentication function as described in RFC 2104 and FIPS PUB 198.

12.107. GNAT.Signals (g-signal.ads)

Provides the ability to manipulate the blocked status of signals on supported targets.

12.108. GNAT.Sockets (g-socket.ads)

A high level and portable interface to develop sockets based applications. This package is based on the sockets thin binding found in GNAT.Sockets.Thin. Currently GNAT.Sockets is implemented on all native GNAT ports and on VxWorks cross prots. It is not implemented for the LynxOS cross port.

12.109. GNAT.Source_Info (g-souinf.ads)

Provides subprograms that give access to source code information known at compile time, such as the current file name and line number. Also provides subprograms yielding the date and time of the current compilation (like the C macros __DATE__ and __TIME__)

12.110. GNAT.Spelling_Checker (g-speche.ads)

Provides a function for determining whether one string is a plausible near misspelling of another string.

12.111. GNAT.Spelling_Checker_Generic (g-spchge.ads)

Provides a generic function that can be instantiated with a string type for determining whether one string is a plausible near misspelling of another string.

12.112. GNAT.Spitbol.Patterns (g-spipat.ads)

A complete implementation of SNOBOL4 style pattern matching. This is the most elaborate of the pattern matching packages provided. It fully duplicates the SNOBOL4 dynamic pattern construction and matching capabilities, using the efficient algorithm developed by Robert Dewar for the SPITBOL system.

12.113. GNAT.Spitbol (g-spitbo.ads)

The top level package of the collection of SPITBOL-style functionality, this package provides basic SNOBOL4 string manipulation functions, such as Pad, Reverse, Trim, Substr capability, as well as a generic table function useful for constructing arbitrary mappings from strings in the style of the SNOBOL4 TABLE function.

12.114. GNAT.Spitbol.Table_Boolean (g-sptabo.ads)

A library level of instantiation of GNAT.Spitbol.Patterns.Table for type Standard.Boolean, giving an implementation of sets of string values.

12.115. GNAT.Spitbol.Table_Integer (g-sptain.ads)

A library level of instantiation of GNAT.Spitbol.Patterns.Table for type Standard.Integer, giving an implementation of maps from string to integer values.

12.116. GNAT.Spitbol.Table_VString (g-sptavs.ads)

A library level of instantiation of GNAT.Spitbol.Patterns.Table for a variable length string type, giving an implementation of general maps from strings to strings.

12.117. GNAT.SSE (g-sse.ads)

Root of a set of units aimed at offering Ada bindings to a subset of the Intel(r) Streaming SIMD Extensions with GNAT on the x86 family of targets. It exposes vector component types together with a general introduction to the binding contents and use.

12.118. GNAT.SSE.Vector_Types (g-ssvety.ads)

SSE vector types for use with SSE related intrinsics.

12.119. GNAT.String_Hash (g-strhas.ads)

Provides a generic hash function working on arrays of scalars. Both the scalar type and the hash result type are parameters.

12.120. GNAT.Strings (g-string.ads)

Common String access types and related subprograms. Basically it defines a string access and an array of string access types.

12.121. GNAT.String_Split (g-strspl.ads)

Useful string manipulation routines: given a set of separators, split a string wherever the separators appear, and provide direct access to the resulting slices. This package is instantiated from GNAT.Array_Split.

12.122. GNAT.Table (g-table.ads)

A generic package providing a single dimension array abstraction where the length of the array can be dynamically modified.

This package provides a facility similar to that of GNAT.Dynamic_Tables, except that this package declares a single instance of the table type, while an instantiation of GNAT.Dynamic_Tables creates a type that can be used to define dynamic instances of the table.

12.123. GNAT.Task_Lock (g-tasloc.ads)

A very simple facility for locking and unlocking sections of code using a single global task lock. Appropriate for use in situations where contention between tasks is very rarely expected.

12.124. GNAT.Time_Stamp (g-timsta.ads)

Provides a simple function that returns a string YYYY-MM-DD HH:MM:SS.SS that represents the current date and time in ISO 8601 format. This is a very simple routine with minimal code and there are no dependencies on any other unit.

12.125. GNAT.Threads (g-thread.ads)

Provides facilities for dealing with foreign threads which need to be known by the GNAT run-time system. Consult the documentation of this package for further details if your program has threads that are created by a non-Ada environment which then accesses Ada code.

12.126. GNAT.Traceback (g-traceb.ads)

Provides a facility for obtaining non-symbolic traceback information, useful in various debugging situations.

12.127. GNAT.Traceback.Symbolic (g-trasym.ads)

12.128. GNAT.UTF_32 (g-table.ads)

This is a package intended to be used in conjunction with the Wide_Character type in Ada 95 and the Wide_Wide_Character type in Ada 2005 (available in GNAT in Ada 2005 mode). This package contains Unicode categorization routines, as well as lexical categorization routines corresponding to the Ada 2005 lexical rules for identifiers and strings, and also a lower case to upper case fold routine corresponding to the Ada 2005 rules for identifier equivalence.

12.129. GNAT.Wide_Spelling_Checker (g-u3spch.ads)

Provides a function for determining whether one wide wide string is a plausible near misspelling of another wide wide string, where the strings are represented using the UTF_32_String type defined in System.Wch_Cnv.

12.130. GNAT.Wide_Spelling_Checker (g-wispch.ads)

Provides a function for determining whether one wide string is a plausible near misspelling of another wide string.

12.131. GNAT.Wide_String_Split (g-wistsp.ads)

Useful wide string manipulation routines: given a set of separators, split a wide string wherever the separators appear, and provide direct access to the resulting slices. This package is instantiated from GNAT.Array_Split.

12.132. GNAT.Wide_Wide_Spelling_Checker (g-zspche.ads)

Provides a function for determining whether one wide wide string is a plausible near misspelling of another wide wide string.

12.133. GNAT.Wide_Wide_String_Split (g-zistsp.ads)

Useful wide wide string manipulation routines: given a set of separators, split a wide wide string wherever the separators appear, and provide direct access to the resulting slices. This package is instantiated from GNAT.Array_Split.

12.134. Interfaces.C.Extensions (i-cexten.ads)

This package contains additional C-related definitions, intended for use with either manually or automatically generated bindings to C libraries.

12.135. Interfaces.C.Streams (i-cstrea.ads)

This package is a binding for the most commonly used operations on C streams.

12.136. Interfaces.Packed_Decimal (i-pacdec.ads)

This package provides a set of routines for conversions to and from a packed decimal format compatible with that used on IBM mainframes.

12.137. Interfaces.VxWorks (i-vxwork.ads)

This package provides a limited binding to the VxWorks API. In particular, it interfaces with the VxWorks hardware interrupt facilities.

12.138. Interfaces.VxWorks.Int_Connection (i-vxinco.ads)

This package provides a way for users to replace the use of intConnect() with a custom routine for installing interrupt handlers.

12.139. Interfaces.VxWorks.IO (i-vxwoio.ads)

This package provides a binding to the ioctl (IO/Control) function of VxWorks, defining a set of option values and function codes. A particular use of this package is to enable the use of Get_Immediate under VxWorks.

12.140. System.Address_Image (s-addima.ads)

This function provides a useful debugging function that gives an (implementation dependent) string which identifies an address.

12.141. System.Assertions (s-assert.ads)

This package provides the declaration of the exception raised by an run-time assertion failure, as well as the routine that is used internally to raise this assertion.

12.142. System.Atomic_Counters (s-atocou.ads)

This package provides the declaration of an atomic counter type, together with efficient routines (using hardware synchronization primitives) for incrementing, decrementing, and testing of these counters. This package is implemented on most targets, including all Alpha, ia64, PowerPC, SPARC V9, x86, and x86_64 platforms.

12.143. System.Memory (s-memory.ads)

This package provides the interface to the low level routines used by the generated code for allocation and freeing storage for the default storage pool (analogous to the C routines malloc and free. It also provides a reallocation interface analogous to the C routine realloc. The body of this unit may be modified to provide alternative allocation mechanisms for the default pool, and in addition, direct calls to this unit may be made for low level allocation uses (for example see the body of GNAT.Tables).

12.144. System.Multiprocessors (s-multip.ads)

This is an Ada 2012 unit defined in the Ada 2012 Reference Manual, but in GNAT we also make it available in Ada 95 and Ada 2005 (where it is technically an implementation-defined addition).

12.145. System.Multiprocessors.Dispatching_Domains (s-mudido.ads)

This is an Ada 2012 unit defined in the Ada 2012 Reference Manual, but in GNAT we also make it available in Ada 95 and Ada 2005 (where it is technically an implementation-defined addition).

12.146. System.Partition_Interface (s-parint.ads)

This package provides facilities for partition interfacing. It is used primarily in a distribution context when using Annex E with GLADE.

12.147. System.Pool_Global (s-pooglo.ads)

This package provides a storage pool that is equivalent to the default storage pool used for access types for which no pool is specifically declared. It uses malloc/free to allocate/free and does not attempt to do any automatic reclamation.

12.148. System.Pool_Local (s-pooloc.ads)

This package provides a storage pool that is intended for use with locally defined access types. It uses malloc/free for allocate/free, and maintains a list of allocated blocks, so that all storage allocated for the pool can be freed automatically when the pool is finalized.

12.149. System.Restrictions (s-restri.ads)

This package provides facilities for accessing at run time the status of restrictions specified at compile time for the partition. Information is available both with regard to actual restrictions specified, and with regard to compiler determined information on which restrictions are violated by one or more packages in the partition.

12.150. System.Rident (s-rident.ads)

This package provides definitions of the restrictions identifiers supported by GNAT, and also the format of the restrictions provided in package System.Restrictions. It is not normally necessary to with this generic package since the necessary instantiation is included in package System.Restrictions.

12.151. System.Strings.Stream_Ops (s-ststop.ads)

This package provides a set of stream subprograms for standard string types. It is intended primarily to support implicit use of such subprograms when stream attributes are applied to string types, but the subprograms in this package can be used directly by application programs.

12.152. System.Unsigned_Types (s-unstyp.ads)

This package contains definitions of standard unsigned types that correspond in size to the standard signed types declared in Standard, and (unlike the types in Interfaces) have corresponding names. It also contains some related definitions for other specialized types used by the compiler in connection with packed array types.

12.153. System.Wch_Cnv (s-wchcnv.ads)

This package provides routines for converting between wide and wide wide characters and a representation as a value of type Standard.String, using a specified wide character encoding method. It uses definitions in package System.Wch_Con.

12.154. System.Wch_Con (s-wchcon.ads)

This package provides definitions and descriptions of the various methods used for encoding wide characters in ordinary strings. These definitions are used by the package System.Wch_Cnv.