Rationale Update for Ada 2012
Chapter 8: Containers
The container library was considerably enhanced in
Ada 2012. A few issues have arisen since.
The following Ada Issues
cover this area:
Accessibility checks for indefinite elements of containers
Inconsistency in Tree container definition
Definition of node for tree container is confusing
Tampering checks are performed first
These changes can be grouped as follows.
AI-69
and
AI-78
both address the same issue regarding the fact that the root node of
a tree has no element.
AI-35
concerns problems with accessibility checks necessary to prevent dangling
references when using the indefinite containers.
AI-110
addresses the question of when tampering checks are performed.
It is fundamental to the organization of trees that
each node of the tree has an associated element containing a value except
the root node which has no such associated element. Both
AI-69
and
AI-78
make various corrections to the wording such as to point out that an
iterator never visits the root node.
AI-35
addresses the question of accessibility checks when manipulating indefinite
containers (these containers were introduced in Ada 2005).
Certain operations of instances of the indefinite container packages
require accessibility checks to prevent dangling references. The term
"perform indefinite insertion" is defined and then this is
used in the description of the various operations. Thus in the case of
Indefinite_Doubly_Linked_Lists we are told
that
Append,
Insert,
Prepend, and
Replace_Element
that have a parameter of the
Element_Type
perform indefinite insertion.
AI-110
concerns the order of making various checks. The conclusion is that tampering
checks are always performed before any other checks such as that for
capacity.
© 2016 John Barnes Informatics.