Version 1.9 of ai12s/ai12-0313-1.txt
!standard 0.2(6/3) 21-03-08 AI12-0313-1/06
!standard 0.2(10)
!standard 0.2(31)
!standard 0.2(41/2)
!standard 0.2(57.1/3)
!standard 0.2(57.2/3)
!standard 0.2(57.3/3)
!standard 0.2(57.4/3)
!standard 0.2(57.5/3)
!standard 0.2(57.6/3)
!standard 0.2(57.7/3)
!standard 0.2(57.8/3)
!standard 0.2(57.9/3)
!standard 0.2(57.10/3)
!standard 0.2(57.11/3)
!standard 0.2(57.13/3)
!standard 0.2(57.14/3)
!standard 0.2(57.15/4)
!standard 0.2(57.16/4)
!standard 0.2(57.17/3)
!standard 0.2(57.18/3)
!standard 0.2(57.19/3)
!standard 0.2(57.20/3)
!standard 0.2(57.21/3)
!class presentation 19-02-07
!status Amendment 1-2012 19-04-09
!status WG9 Approved 22-06-22
!status ARG Approved 11-0-0 19-04-09
!status work item 19-02-07
!status received 19-02-07
!priority Low
!difficulty Easy
!subject Introduction for Ada 2020
!summary
A Language Changes section for Ada 2020 is added, and the Design Goals
and Language Summary are updated for Ada 2020.
!question
The Language Changes section in the Introduction is for Ada 2012. It needs
to be replaced, right? (Yes.)
Similarly, the Design Goals and Language Summary in the Introduction should
be updated, right? (Yes.)
!response
(See Summary.)
!wording
In Design Goals:
Modify paragraph Intro(6/3):
Ada was originally designed with three overriding concerns: program
reliability and maintenance, programming as a human activity, and
efficiency. The 1995 revision to the language was designed to provide
greater flexibility and extensibility, additional control over storage
management and synchronization, and standardized packages oriented
toward supporting important application areas, while at the same time
retaining the original emphasis on reliability, maintainability, and
efficiency. [This third edition provides] {Subsequent editions, including
this fourth edition, have provided} further flexibility and add[s]{ed}
more standardized packages within the framework provided by the 1995
revision.
Modify paragraph Intro(10):
No language can avoid the problem of efficiency. Languages that
require over-elaborate compilers, or that lead to the inefficient use
of storage or execution time, force these inefficiencies on all
machines and on all programs. Every construct of the language was
examined in the light of present implementation techniques. Any
proposed construct whose implementation was unclear or that required
excessive machine resources was rejected. {Parallel constructs were
introduced to simplify making safe and efficient use of modern
multicore architectures.}
In Language Summary, Data Types:
Modify Intro(31):
Every object in the language has a type, which characterizes a set of values
and a set of applicable operations. The main {categories}[classes] of types
are elementary types (comprising enumeration, numeric, and access types)
and composite types (including array and record types).
In Language Summary, Other Facilities:
Add after paragraph Intro(41/2):
Aspect clauses can also be used to specify more abstract properties of
program entities, such as the pre- and postconditions of a subprogram,
or the invariant for a private type. Additional aspects are specifiable
to allow user-defined types to use constructs of the language,
such as literals, aggregates, or indexing, normally reserved for
particular language-defined categories of types, such as numeric
types, record types, or array types.
In Language Changes:
Replace the whole "Language Changes" section with the following:
This International Standard replaces the third edition of 2012. It modifies
the previous edition by making changes and additions that improve the
capability of the language and the reliability of programs written in the
language.
Significant changes in this edition are:
- Improved support for parallel execution is provided via the
introduction of parallel loops, parallel blocks, parallel container
iteration, and parallel reduction.
- More precise specification of subprogram interfaces is supported via
the new aspects Global, Global'Class, and Nonblocking. The Global
aspects, in particular, help to determine whether two constructs can
safely execute in parallel.
- Pre and Post aspects may now be specified for access-to-subprogram
types and for generic formal subprograms; a postcondition for a type's
default initialization may be specified using the new
Default_Initial_Condition aspect.
- The behavior of many predefined container operations is now more
precisely specified by using pre- and postcondition specifications
instead of English descriptions; a restricted ("stable") view for most
containers is introduced to support more efficient iteration.
- More flexible uses of static expressions are supported via the
introduction of static expression functions along with fewer
restrictions on static strings.
- The Image attribute is supported for nonscalar types, and a
user-specifiable attribute Put_Image is provided, which determines
the value of the Image attribute for a user-defined type.
- The use of numeric and string literals is generalized to allow their use
with other categories of types, via the new aspects Integer_Literal,
Real_Literal, and String_Literal.
- Array and record aggregates are made more flexible: index parameters
are allowed in an array aggregate to define the components as a
function of their array index; discriminants can be defined more
flexibly within an aggregate for a variant record type.
- New types of aggregates are provided: delta aggregates to allow
the construction of a new object by incremental updates to an existing
object; container aggregates to allow construction of an object
of a container type by directly specifying its elements.
- A shorthand is provided, using the token '@', to refer to the
target of an assignment statement in the expression defining its new
value.
- "Declare" expressions are provided that permit the definition and
use of local constants or renamings, to allow a large expression to be
simplified by defining common parts as named entities.
- Support for lightweight iteration is added via the introduction of
procedural iterators.
- Support for the map-reduce programming strategy is added via the
introduction of reduction expressions.
- For constructs that use iterators of any sort, a filter may be specified
that restricts the elements produced by the iteration to those that
satisfy the condition of the filter.
- Predefined packages supporting arbitrary-precision integer and real
arithmetic are provided.
- The Jorvik profile is introduced to support hard real-time
applications that need to go beyond the restrictions of the Ravenscar
profile.
!discussion
Areas that probably ought to be covered (some things are in multiple
categories):
* Parallel constructs (loops, blocks, reductions)
* Improved aggregates (delta aggregates, container aggregates,
iterators in aggregates)
* Increased abstraction (user-defined literals, user-defined image,
static expression functions, reductions)
* Additional contracts (default-initial-condition, nonblocking, global,
stable-properties)
* Additional static error detection (conflict check policies,
nonblocking, global)
* Additional expressiveness for expressions (declare expression,
reductions)
* Improved readability (target symbol, null/single element aggregate
notation [brackets!], simplified object renames)
* Real-time improvements (aspect Yield, new EDF, queue length control,
profile Yorvik)
* other (object_size, Enum_Rep/Enum_Val)
!corrigendum 0.2(6/3)
Replace the paragraph:
Ada was originally designed with three overriding concerns: program
reliability and maintenance, programming as a human activity, and
efficiency. The 1995 revision to the language was designed to provide greater
flexibility and extensibility, additional control over storage management and
synchronization, and standardized packages oriented toward supporting
important application areas, while at the same time retaining the original
emphasis on reliability, maintainability, and efficiency. This third edition
provides further flexibility and adds more standardized packages within the
framework provided by the 1995 revision.
by:
Ada was originally designed with three overriding concerns: program
reliability and maintenance, programming as a human activity, and
efficiency. The 1995 revision to the language was designed to provide greater
flexibility and extensibility, additional control over storage management and
synchronization, and standardized packages oriented toward supporting
important application areas, while at the same time retaining the original
emphasis on reliability, maintainability, and efficiency. Subsequent editions,
including this fourth edition, have provided further flexibility and added
more standardized packages within the framework provided by the 1995
revision.
!corrigendum 0.2(10)
Replace the paragraph:
No language can avoid the problem of efficiency. Languages that
require over-elaborate compilers, or that lead to the inefficient use
of storage or execution time, force these inefficiencies on all
machines and on all programs. Every construct of the language was
examined in the light of present implementation techniques. Any
proposed construct whose implementation was unclear or that required
excessive machine resources was rejected.
by:
No language can avoid the problem of efficiency. Languages that
require over-elaborate compilers, or that lead to the inefficient use
of storage or execution time, force these inefficiencies on all
machines and on all programs. Every construct of the language was
examined in the light of present implementation techniques. Any
proposed construct whose implementation was unclear or that required
excessive machine resources was rejected. Parallel constructs were
introduced to simplify making safe and efficient use of modern
multicore architectures.
!corrigendum 0.2(31)
Replace the paragraph:
Every object in the language has a type, which characterizes a set of values
and a set of applicable operations. The main classes of types are elementary
types (comprising enumeration, numeric, and access types) and composite types
(including array and record types).
by:
Every object in the language has a type, which characterizes a set of values
and a set of applicable operations. The main categories of types are elementary
types (comprising enumeration, numeric, and access types) and composite types
(including array and record types).
!corrigendum 0.2(41/2)
Insert after the paragraph:
Aspect clauses can be used to specify the mapping between types and
features of an underlying machine. For example, the user can specify that
objects of a given type must be represented with a given number of bits, or
that the components of a record are to be represented using a given storage
layout. Other features allow the controlled use of low level, nonportable, or
implementation-dependent aspects, including the direct insertion of machine
code.
the new paragraph:
Aspect clauses can also be used to specify more abstract properties of
program entities, such as the pre- and postconditions of a subprogram,
or the invariant for a private type. Additional aspects are specifiable
to allow user-defined types to use constructs of the language,
such as literals, aggregates, or indexing, normally reserved for
particular language-defined categories of types, such as numeric
types, record types, or array types.
!corrigendum 0.2(57.1/3)
Replace the paragraph:
This International Standard replaces the second edition of 1995. It modifies
the previous edition by making changes and additions that improve the
capability of the language and the reliability of programs written in the
language. This edition incorporates the changes from Amendment 1 (ISO/IEC
8652:1995:AMD 1:2007), which were designed to improve the portability of
programs, interfacing to other languages, and both the object-oriented and
real-time capabilities.
by:
This Ada Reference Manual replaces the edition of 2012. It modifies
the previous edition by making changes and additions that improve the
capability of the language and the reliability of programs written in the
language.
!corrigendum 0.2(57.2/3)
Replace the paragraph:
Significant changes originating in Amendment 1 are incorporated:
by:
Significant changes in this edition are:
!corrigendum 0.2(57.3/3)
Replace the paragraph:
- Support for program text is extended to cover the entire ISO/IEC
10646:2003 repertoire. Execution support now includes the 32-bit character set.
See subclauses 2.1, 3.5.2, 3.6.3, A.1, A.3, and A.4.
by:
- Improved support for parallel execution is provided via the
introduction of parallel loops, parallel blocks, parallel container
iteration, and parallel reduction.
!corrigendum 0.2(57.4/3)
Replace the paragraph:
- The object-oriented model has been improved by the addition of an
interface facility which provides multiple inheritance and additional
flexibility for type extensions. See subclauses 3.4, 3.9, and 7.3. An
alternative notation for calling operations more akin to that used in other
languages has also been added. See subclause 4.1.3.
by:
- More precise specification of subprogram interfaces is supported via
the new aspects Global, Global'Class, and Nonblocking. The Global
aspects, in particular, help to determine whether two constructs can
safely execute in parallel.
!corrigendum 0.2(57.5/3)
Replace the paragraph:
- Access types have been further extended to unify properties such as
the ability to access constants and to exclude null values. See clause 3.10.
Anonymous access types are now permitted more freely and anonymous
access-to-subprogram types are introduced. See subclauses 3.3, 3.6, 3.10, and
8.5.1.
by:
- Pre and Post aspects may now be specified for access-to-subprogram
types and for generic formal subprograms; a postcondition for the default
initialization of a type may be specified using the new
Default_Initial_Condition aspect.
!corrigendum 0.2(57.6/3)
Replace the paragraph:
- The control of structure and visibility has been enhanced to permit
mutually dependent references between units and finer control over access from
the private part of a package. See subclauses 3.10.1 and 10.1.2. In addition,
limited types have been made more useful by the provision of aggregates,
constants, and constructor functions. See subclauses 4.3, 6.5, and 7.5.
by:
- The behavior of many predefined container operations is now more
precisely specified by using pre- and postcondition specifications
instead of English descriptions; a restricted ("stable") view for most
containers is introduced to support more efficient iteration.
!corrigendum 0.2(57.7/3)
Replace the paragraph:
- The predefined environment has been extended to include additional
time and calendar operations, improved string handling, a comprehensive
container library, file and directory management, and access to environment
variables. See subclauses 9.6.1, A.4, A.16, A.17, and A.18.
by:
- More flexible uses of static expressions are supported via the
introduction of static expression functions along with fewer
restrictions on static strings.
!corrigendum 0.2(57.8/3)
Replace the paragraph:
- Two of the Specialized Needs Annexes have been considerably enhanced:
by:
- The Image attribute is supported for nonscalar types, and a
user-specifiable attribute Put_Image is provided, which determines
the value of the Image attribute for a user-defined type.
!corrigendum 0.2(57.9/2)
Delete the paragraph:
- The Real-Time Systems Annex now includes the Ravenscar profile for
high-integrity systems, further dispatching policies such as Round Robin and
earliest Deadline First, support for timing events, and support for control
of CPU time utilization. See subclauses D.2, D.13, D.14, and D.15.
!corrigendum 0.2(57.10/3)
Delete the paragraph:
- The Numerics Annex now includes support for real and complex vectors
and matrices as previously defined in ISO/IEC 13813:1997 plus further basic
operations for linear algebra. See subclause G.3.
!corrigendum 0.2(57.11/3)
Replace the paragraph:
- The overall reliability of the language has been enhanced by a
number of improvements. These include new syntax which detects accidental
overloading, as well as pragmas for making assertions and giving better
control over the suppression of checks. See subclauses 6.1, 11.4.2, and 11.5.
by:
- The use of numeric and string literals is generalized to allow their
use with other categories of types, via the new aspects Integer_Literal,
Real_Literal, and String_Literal.
- Array and record aggregates are made more flexible: index parameters
are allowed in an array aggregate to define the components as a
function of their array index; discriminants can be defined more
flexibly within an aggregate for a variant record type.
- New types of aggregates are provided: delta aggregates to allow
the construction of a new object by incremental updates to an existing
object; container aggregates to allow construction of an object
of a container type by directly specifying its elements.
- A shorthand is provided, using the token '@', to refer to the
target of an assignment statement in the expression defining its new value.
- Declare expressions are provided that permit the definition and
use of local constants or renamings, to allow a large expression
to be simplified by defining common parts as named entities.
- Support for lightweight iteration is added via the introduction of
procedural iterators.
- Support for the map-reduce programming strategy is added via the
introduction of reduction expressions.
- For constructs that use iterators of any sort, a filter may be specified
that restricts the elements produced by the iteration to those that
satisfy the condition of the filter.
- Predefined packages supporting arbitrary-precision integer and real
arithmetic are provided.
- The Jorvik profile is introduced to support hard real-time
applications that need to go beyond the restrictions of the Ravenscar profile.
!corrigendum 0.2(57.12/3)
Delete the paragraph:
In addition, this third edition makes enhancements to address two important
issues, namely, the particular problems of multiprocessor architectures, and
the need to further increase the capabilities regarding assertions for
correctness. It also makes additional changes and additions that improve the
capability of the language and the reliability of programs written in the
language.
!corrigendum 0.2(57.13/3)
Delete the paragraph:
The following significant changes with respect to the 1995 edition as amended
by Amendment 1 are incorporated:
!corrigendum 0.2(57.14/3)
Delete the paragraph:
- New syntax (the aspect specification) is introduced to enable
properties to be specified for various entities in a more structured
manner than through pragmas. See subclause 13.1.1.
!corrigendum 0.2(57.15/4)
Delete the paragraph:
- The concept of assertions introduced in the 2005 edition is extended with the
ability to specify preconditions and postconditions for subprograms, and
invariants for private types and interfaces. The concept of constraints in
defining subtypes is supplemented with subtype predicates that enable
subsets to be specified other than as simple ranges. These properties are
all indicated using aspect specifications. See subclauses 3.2.4, 6.1.1, and
7.3.2.
!corrigendum 0.2(57.16/4)
Delete the paragraph:
- New forms of expressions are introduced. These are if expressions, case
expressions, quantified expressions, and expression functions, and raise
expressions. As well as being useful for programming in general by avoiding
the introduction of unnecessary assignments, they are especially valuable in
conditions and invariants since they avoid the need to introduce auxiliary
functions. See subclauses 4.5.7, 4.5.8, 6.8, and 11.3. Membership tests are
also made more flexible. See subclauses 4.4 and 4.5.2.
!corrigendum 0.2(57.17/3)
Delete the paragraph:
- A number of changes are made to subprogram parameters. Functions may now have
parameters of all modes. In order to mitigate consequent (and indeed existing)
problems of inadvertent order dependence, rules are introduced to reduce
aliasing. A parameter may now be explicitly marked as aliased and the type of
a parameter may be incomplete in certain circumstances. See subclauses 3.10.1,
6.1, and 6.4.1.
!corrigendum 0.2(57.18/3)
Delete the paragraph:
- The use of access types is now more flexible. The rules for accessibility and
certain conversions are improved. See subclauses 3.10.2, 4.5.2, 4.6, and 8.6.
Furthermore, better control of storage pools is provided. See subclause
13.11.4.
!corrigendum 0.2(57.19/3)
Delete the paragraph:
- The Real-Time Systems Annex now includes facilities for defining domains of
processors and assigning tasks to them. Improvements are made to scheduling
and budgeting facilities. See subclauses D.10.1, D.14, and D.16.
!corrigendum 0.2(57.20/3)
Delete the paragraph:
- A number of important improvements are made to the standard library. These
include packages for conversions between strings and UTF encodings, and
classification functions for wide and wide wide characters.
Internationalization is catered for by a package giving locale information.
See subclauses A.3, A.4.11, and A.19. The container library is extended to
include bounded forms of the existing containers and new containers for
indefinite objects, multiway trees, and queues. See subclause A.18.
!corrigendum 0.2(57.21/3)
Delete the paragraph:
- Finally, certain features are added primarily to ease the use of containers,
such as the ability to iterate over all elements in a container without
having to encode the iteration. These can also be used for iteration over
arrays, and within quantified expressions. See subclauses 4.1.5, 4.1.6, 5.5.1,
and 5.5.2.
!ASIS
None needed.
!ACATS test
No ACATS tests needed.
!appendix
[From Gary Dismukes' RM review (October 2020). These both have been treated as
Editorial Review changes to this AI - Editor.]
57.11/5 The use of numeric and string literals is generalized to [support]
{allow their use with} other sorts of types, via the new {aspects}
Integer_Literal, Real_Literal, and String_Literal[ aspects].
57.15/5 Declare expressions are provided [which] {that} permit the definition
and use of local constants or renamings, to allow an expression used within an
aspect specification to be more concise and readable.
****************************************************************
From an informal review of the Introduction by John Barnes, March 7, 2021.
31 says “classes of types”. Maybe change that to categories of types. Not to
be confused with the technical term classes. I changed my book to say
categories in 2005
57.6/5 a stable view seems a bit technical. Sounds horsey. Maybe
just say a view of or ???
57.11/5 “sorts of types” maybe categories
57.15/5 not only in aspect specifications.
But could just say ". to allow an expression to be both more concise
and readable"
[These changes were made as editorial review fixes to this AI. - Editor.]
****************************************************************
Questions? Ask the ACAA Technical Agent