Rationale for Ada 2005

John Barnes
Contents   Index   References   Search   Previous   Next 

7.1 Ada Issues: Predefined library

The WG9 guidance document [1] says
"The main purpose of the Amendment is to address identified problems in Ada that are interfering with Ada's usage or adoption, especially in its major application areas (such as high-reliability, long-lived real-time and/or embedded applications and very large complex systems). The resulting changes may range from relatively minor, to more substantial."
Certainly one of the stated advantages of languages such as Java is that they come with a huge predefined library. By contrast the Ada library is somewhat Spartan and extensions to it should make Ada more accessible.
The guidance document also warns about secondary standards. Its essence is don't use secondary standards if you can get the material into the RM itself. And please put the stuff on vectors and matrices from ISO/IEC 13813 [5] into the RM. The reason for this exhortation is that secondary standards have proved themselves to be almost invisible and hence virtually useless.
We have already discussed the additional library packages in the area of tasking and real time in Sections 5.2, 5.5, and 5.6. The following Ada issues cover the relevant changes in other areas and are described in detail in this chapter:
Preelaborable initialization
Directory operations
Stream item size control
Use of PCS should not be normative
Support for 16-bit and 32-bit characters
Vector and matrix operations
Operations on language-defined strings
Container library
Non-generic version of Complex_IO
Time operations
Some predefined packages should be recategorized
More liberal rules for Pure units
Add standard interface for environment variables
Add Greek pi to Ada.Numerics
Clarifications concerning 16- and 32-bit characters
Wide and wide-wide images
Vector norm
Default parameters and Calendar operations
Input–output for bounded strings
Null streams 
These changes can be grouped as follows.
First the container library is rather extensive and merits a whole chapter alone (302). We only refer to it here for completeness.
New child packages of Calendar provide extra facilities for manipulating times and dates (351, 427).
There are additional packages in the core library providing access to aspects of the operational environment. These concern directory operations (248) and environment variables (370).
There are changes concerning characters both for writing program text itself and for handling characters and strings at run time. There is now support for 16- and 32-bit characters (285, 388, 395, 400), and there are additional operations in the string packages (301, 428).
The Numerics annex is enhanced by the addition of the vector and matrix material previously in ISO/IEC 13813 plus some commonly required linear algebra algorithms (296, 418) and a trivial addition concerning complex input–output (328).
The categorization of various predefined units has been changed in order to remove unnecessary restrictions on their use in distributed systems and similar applications (362, 366). The new pragma Preelaborable_Initialization is introduced as well for similar reasons (161). We can also group a minor change to the Distributed Systems annex here (273).
Finally there is new attribute Stream_Size in order to increase the portability of streams (270) and the parameter Stream of Read, Write etc now has a null exclusion (441).

Contents   Index   References   Search   Previous   Next 
© 2005, 2006, 2007 John Barnes Informatics.
Sponsored in part by:
The Ada Resource Association and its member companies: ARA Members AdaCore Polyspace Technologies Praxis Critical Systems IBM Rational Sofcheck and   Ada-Europe: