International Standard ISO/IEC 8652:1995
Information technology -- Programming languages -- Ada
AMENDMENT 1 (Draft 8)
Technologies de l'information -- Langages de programmation -- Ada
AMENDEMENT 1
Amendment 1 to International Standard ISO/IEC 8652:1995 was
prepared by AXE Consultants.
© 2004, AXE Consultants. All Rights Reserved.
This document may be copied, in whole or in part, in any form or by any
means, as is, or with alterations, provided that (1) alterations are
clearly marked as alterations and (2) this copyright notice is included
unmodified in any copy. Compiled copies of standard library units and
examples need not contain this copyright notice so long as the notice is
included in all copies of the source code and documentation. Any other use
or distribution of this document is prohibited without the prior express
permission of AXE.
Introduction
International Standard ISO/IEC 8652:1995 defines the Ada programming language.
This amendment modifies Ada by making changes and additions that improve:
- The safety of applications written in Ada;
- The portability of applications written in Ada;
- Interoperability with other languages and systems; and
- Accessibility and ease of transition from idioms in other programming
and modeling languages.
This amendment incorporates the following major additions to the International Standard:
- The Ravenscar profile to provide a simplified tasking system for high-integrity systems (see clause D.13);
- A non-preemptive task dispatching policy (see clause D.2.4);
- Aggregates, constructor functions, and constants for limited types (see clauses 4.3.1, 6.5, and 7.5);
- Control of overriding to eliminate errors (see clause 8.3);
- Improvements for access types, such as null excluding subtypes (see clause 3.10), additional uses for anonymous access types (see clauses 3.6 and 8.5.1), and anonymous access-to-subprogram subtypes to support 'downward closures' (see clauses 3.10 and 3.10.2);
- Additional context clause capabilities: limited views to allow mutually dependent types (see clauses 3.10.1 and 10.1.2) and private context clauses that apply only in the private part of a package (see clause 10.1.2);
- Added standard packages, including time management (see 9.6), file directory and name management (see clause A.16), execution-time clocks (see clause D.14), timing events (see clause D.15), and array and vector operations (see clause G.3);
- Interfaces, to provide a limited form of multiple inheritance of operations (see clause 3.9.4); and
- A mechanism for writing C unions to make interfaces with C systems easier (see clause B.3.3).
This Amendment is organized by sections corresponding to those in the International
Standard. These sections include wording changes and additions to the International
Standard. Clause and subclause headings are given for each clause that contains a
wording change. Clauses and subclauses that do not contain any change or addition
are omitted.
For each change, an anchor paragraph from the International Standard (as corrected
by Technical Corrigendum 1) is given. New or revised text and instructions are
given with each change. The anchor paragraph can be
replaced or deleted, or text can be inserted before or after it. When a heading immediately
precedes the anchor paragraph, any text inserted before the paragraph is intended
to appear under the heading.
Typographical conventions:
Instructions about the text changes are in this font.
The actual text changes are in the same fonts as the International Standard -
this font for text,
this font for syntax,
and this font for Ada source code.
Note that this document is designed to be viewed with the default font as some Roman font,
similar to the Ada 95 standard. This may require some adjustments to your browser.
Disclaimer:
This document is a draft of a possible amendment to Ada 95 (International
Standard ISO/IEC 8652:1995). This draft contains only proposals substantially
approved by the ISO/IEC JTC 1/SC 22/WG 9 Ada Rapporteur Group (ARG). Many
other important proposals are under consideration by the ARG. Neither
the ARG nor any other group has determined which, if any, of these
proposals will be included in the amendment. Any proposal may be
substantially changed or withdrawn before this document begins
standardization, and other proposals may be added. This document is not an
official publication or work product of the ARG.
Forward and Introduction
Introduction
Replace paragraph 32: [AI95-00285-01]
An enumeration type defines an ordered set of distinct enumeration literals,
for example a list of states or an alphabet of characters. The enumeration
types Boolean, Character, and Wide_Character are predefined.
by:
An enumeration type defines an ordered set of distinct enumeration literals,
for example a list of states or an alphabet of characters. The enumeration
types Boolean, Character, Wide_Character, and Wide_Wide_Character are
predefined.
Replace paragraph 34: [AI95-00285-01]
Composite types allow definitions of structured objects with related
components. The composite types in the language include arrays and records. An
array is an object with indexed components of the same type. A record is an
object with named components of possibly different types. Task and protected
types are also forms of composite types. The array types String and Wide_String
are predefined.
by:
Composite types allow definitions of structured objects with related
components. The composite types in the language include arrays and records. An
array is an object with indexed components of the same type. A record is an
object with named components of possibly different types. Task and protected
types are also forms of composite types. The array types String, Wide_String,
and Wide_Wide_String are predefined.
Section 1: General
1.1.2 Structure
Replace paragraph 13: [AI95-00347-01]
-
Annex H, ``Safety and Security''
by:
-
Annex H, ``High Integrity Systems''
1.1.4 Method of Description and Syntax Notation
Insert after paragraph 14: [AI95-00285-01]
-
If the name of any syntactic category starts with an italicized part,
it is equivalent to the category name without the italicized part. The
italicized part is intended to convey some semantic information. For example
subtype_name and task_name are both equivalent to name alone.
the new paragraph:
The terminals of the grammar, including reserved words, punctuation and
components of lexical elements, are exclusively made of the characters whose
code position is between 16#20# and 16#7E#, inclusively. For example, the
character E in the definition of exponent is the character whose name is "LATIN
CAPITAL LETTER E", not "GREEK CAPITAL LETTER EPSILON".
Section 2: Lexical Elements
2.1 Character Set
Replace paragraph 1: [AI95-00285-01]
The only characters allowed outside of comments are the
graphic_characters and format_effectors.
by:
The characters whose code position is 16#FFFE# or 16#FFFF# are not allowed
anywhere in the text of a program. The characters in categories
other_control, other_private_use, and other_surrogate are only
allowed in comments.
Delete paragraph 2: [AI95-00285-01]
character ::= graphic_character | format_effector | other_control_function
Delete paragraph 3: [AI95-00285-01]
graphic_character ::= identifier_letter | digit | space_character | special_character
Replace paragraph 4: [AI95-00285-01]
The character repertoire for the text of an Ada program consists of the
collection of characters called the Basic Multilingual Plane (BMP) of the ISO
10646 Universal Multiple-Octet Coded Character Set, plus a set of
format_effectors and, in comments only, a set of
other_control_functions; the coded representation for these characters is
implementation defined (it need not be a representation defined within
ISO-10646-1).
by:
The character repertoire for the text of an Ada program consists of the
collection of characters described by the ISO/IEC 10646:2003 Universal
Multiple-Octet Coded Character Set. The coded representation for these
characters is implementation defined (it need not be a representation defined
within ISO/IEC 10646:2003).
The semantics of an Ada program whose text is not in Normalization Form KC (as
defined by section 24 of ISO/IEC 10646:2003) are implementation-defined.
Replace paragraph 5: [AI95-00285-01]
The description of the language definition in this International Standard uses
the graphic symbols defined for Row 00: Basic Latin and Row 00: Latin-1
Supplement of the ISO 10646 BMP; these correspond to the graphic symbols of ISO
8859-1 (Latin-1); no graphic symbols are used in this International Standard
for characters outside of Row 00 of the BMP. The actual set of graphic symbols
used by an implementation for the visual representation of the text of an Ada
program is not specified.
by:
The description of the language definition in this International Standard uses
the character properties General Category and Decimal Digit Value of the
documents referenced by the note in section 1 of ISO/IEC 10646:2003. The actual
set of graphic symbols used by an implementation for the visual representation
of the text of an Ada program is not specified.
Delete paragraph 7: [AI95-00285-01]
- identifier_letter
-
upper_case_identifier_letter | lower_case_identifier_letter
Replace paragraph 8: [AI95-00285-01]
- upper_case_identifier_letter
-
Any character of Row 00 of ISO 10646 BMP whose name begins ``Latin Capital Letter''.
by:
- letter_uppercase
-
Any character whose General Category is defined to be "Letter, Uppercase".
Replace paragraph 9: [AI95-00285-01]
- lower_case_identifier_letter
-
Any character of Row 00 of ISO 10646 BMP whose name begins ``Latin Small Letter''.
by:
- letter_lowercase
-
Any character whose General Category is defined to be "Letter, Lowercase".
- letter_titlecase
-
Any character whose General Category is defined to be "Letter, Titlecase".
- letter_modifier
-
Any character whose General Category is defined to be "Letter, Modifier".
- letter_other
-
Any character whose General Category is defined to be "Letter, Other".
- mark_non_spacing
-
Any character whose General Category is defined to be "Mark, Non-Spacing".
- mark_spacing_combining
-
Any character whose General Category is defined to be "Mark, Spacing Combining".
Replace paragraph 10: [AI95-00285-01]
- digit
-
One of the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9.
by:
- number_decimal_digit
-
Any character whose General Category is defined to be "Number, Decimal Digit".
- number_letter
-
Any character whose General Category is defined to be "Number, Letter".
Delete paragraph 11: [AI95-00285-01]
- space_character
-
The character of ISO 10646 BMP named ``Space''.
Replace paragraph 12: [AI95-00285-01]
- special_character
-
Any character of the ISO 10646 BMP that is not reserved for a control function,
and is not the space_character, an identifier_letter, or a
digit.
by:
- other_control
-
Any character whose General Category is defined to be "Other, Control".
- other_format
-
Any character whose General Category is defined to be "Other, Format".
- other_private_use
-
Any character whose General Category is defined to be "Other, Private Use".
- other_surrogate
-
Any character whose General Category is defined to be "Other, Surrogate".
- punctuation_connector
-
Any character whose General Category is defined to be "Punctuation, Connector".
- separator_space
-
Any character whose General Category is defined to be "Separator, Space".
- separator_line
-
Any character whose General Category is defined to be "Separator, Line".
- separator_paragraph
-
Any character whose General Category is defined to be "Separator, Paragraph".
Replace paragraph 13: [AI95-00285-01]
- format_effector
-
The control functions of ISO 6429 called character tabulation (HT), line
tabulation (VT), carriage return (CR), line feed (LF), and form feed (FF).
by:
- format_effector
-
The characters whose code position is 16#09# (CHARACTER TABULATION), 16#0A#
(LINE FEED(LF)), 16#0B# (LINE TABULATION), 16#0C# (FORM FEED(FF)), 16#0D#
(CARRIAGE RETURN(CR)), 16#85# (NEXT LINE(NEL)), and the characters in
categories separator_line and separator_paragraph. The names
mentioned in parenthese in this list are not defined by ISO/IEC 10646:2003;
they are only used for convenience in this International Standard.
Replace paragraph 14: [AI95-00285-01]
- other_control_function
-
Any control function, other than a format_effector, that is allowed in a
comment; the set of other_control_functions allowed in comments is
implementation defined.
by:
- graphic_character
-
Any character which is not in the categories other_control,
other_private_use, other_surrogate, other_format,
format_effector, and whose code position is neither 16#FFFE# nor
16#FFFF#.
Replace paragraph 15: [AI95-00285-01]
The following names are used when referring to certain special_characters:
by:
The following names are used when referring to certain characters (the first
name is that given in ISO/IEC 10646:2003):
Delete paragraph 16: [AI95-00285-01]
In a nonstandard mode, the implementation may support a different character
repertoire; in particular, the set of characters that are considered
identifier_letters can be extended or changed to conform to local
conventions.
Delete paragraph 17: [AI95-00285-01]
1 Every code position of ISO 10646 BMP that is not reserved for a
control function is defined to be a graphic_character by this International
Standard. This includes all code positions other than 0000 - 001F, 007F -
009F, and FFFE - FFFF.
2.2 Lexical Elements, Separators, and Delimiters
Replace paragraph 3: [AI95-00285-01]
In some cases an explicit separator is required to separate adjacent
lexical elements. A separator is any of a space character, a format effector,
or the end of a line, as follows:
by:
In some cases an explicit separator is required to separate adjacent
lexical elements. A separator is any of a separator_space, a
format_effector or the end of a line, as follows:
Replace paragraph 4: [AI95-00285-01]
-
A space character is a separator except within a comment,
a string_literal, or a character_literal.
by:
-
A separator_space is a separator except within a comment, a
string_literal, or a character_literal.
Replace paragraph 5: [AI95-00285-01]
-
Character tabulation (HT) is a separator except within a comment.
by:
-
Character Tabulation is a separator except within a comment.
Replace paragraph 8: [AI95-00285-01]
A delimiter is either one of the following special characters:
by:
A delimiter is either one of the following characters:
2.3 Identifiers
Replace paragraph 2: [AI95-00285-01]
identifier ::=
identifier_letter {[underline] letter_or_digit}
by:
identifier_start ::= letter_uppercase |
letter_lowercase |
letter_titlecase |
letter_modifier |
letter_other |
number_letter
identifier_extend ::= identifier_start |
mark_non_spacing |
mark_spacing_combining |
number_decimal_digit |
other_format
identifier ::= identifier_start {[punctuation_connector] identifier_extend}
Delete paragraph 3: [AI95-00285-01]
letter_or_digit ::= identifier_letter | digit
Replace paragraph 5: [AI95-00285-01]
All characters of an identifier are significant, including any underline
character. Identifiers differing only in the use of corresponding upper
and lower case letters are considered the same.
by:
Two identifiers are considered the same if they consist of same sequence of
characters after applying the following transformations (in this order):
-
The characters in category other_format are eliminated.
-
Full case folding, as defined by documents referenced in the note in
section 1 of ISO/IEC 10646:2003, is applied to obtain the uppercase version
of each character.
2.6 String Literals
Insert after paragraph 6: [AI95-00285-01]
A null string literal is a string_literal with no string_elements
between the quotation marks.
the new paragraph:
No modification is performed on the sequence of characters in a
string_literal.
2.9 Reserved Words
In the list in paragraph 2, add: [AI95-00284-02]
interface
overriding
synchronized
Section 3: Declarations and Types
3.1 Declarations
Replace paragraph 3: [AI95-00348-01]
basic_declaration ::=
type_declaration | subtype_declaration
| object_declaration | number_declaration
| subprogram_declaration | abstract_subprogram_declaration
| package_declaration | renaming_declaration
| exception_declaration | generic_declaration
| generic_instantiation
by:
basic_declaration ::=
type_declaration | subtype_declaration
| object_declaration | number_declaration
| subprogram_declaration | abstract_subprogram_declaration
| null_procedure_declaration | package_declaration
| renaming_declaration | exception_declaration
| generic_declaration | generic_instantiation
3.2 Types and Subtypes
Replace paragraph 4: [AI95-00326-01]
The composite types are the record types, record extensions, array
types, task types, and protected types. A private type or
private extension represents a partial view (see 7.3) of a type, providing
support for data abstraction. A partial view is a composite type.
by:
The composite types are the record types, record extensions, array
types, task types, and protected types.
There can be multiple views of a type with varying sets of operations. An
incomplete type represents an incomplete view (see 3.10.1) of a type with a
very restricted usage, providing support for recursive data structures. A
private type or private extension represents a partial view (see 7.3)
of a type, providing support for data abstraction. The full view (see 3.2.1) of
a type provides its complete declaration. An incomplete or partial view is
considered a composite type.
Replace paragraph 5: [AI95-00326-01]
Certain composite types (and partial views thereof) have special components
called discriminants whose values affect the presence, constraints, or
initialization of other components. Discriminants can be thought of as
parameters of the type.
by:
Certain composite types (and views thereof) have special components
called discriminants whose values affect the presence, constraints, or
initialization of other components. Discriminants can be thought of as
parameters of the type.
3.2.1 Type Declarations
Replace paragraph 4: [AI95-00251-01]
type_definition ::=
enumeration_type_definition | integer_type_definition
| real_type_definition | array_type_definition
| record_type_definition | access_type_definition
| derived_type_definition
by:
type_definition ::=
enumeration_type_definition | integer_type_definition
| real_type_definition | array_type_definition
| record_type_definition | access_type_definition
| derived_type_definition | interface_type_definition
Replace paragraph 8: [AI95-00326-01]
A named type that is declared by a full_type_declaration, or an anonymous
type that is defined as part of declaring an object of the type, is called a
full type. The type_definition, task_definition,
protected_definition, or access_definition that defines a full type
is called a full type definition. Types declared by other forms of
type_declaration are not separate types; they are partial or incomplete
views of some full type.
by:
A named type that is declared by a full_type_declaration, or an anonymous
type that is defined as part of declaring an object of the type, is called a
full type. A full type defines the full view of a type. The
type_definition, task_definition, protected_definition, or
access_definition that defines a full type is called a full type
definition. Types declared by other forms of type_declaration are not
separate types; they are partial or incomplete views of some full type.
3.2.2 Subtype Declarations
Replace paragraph 3: [AI95-00231-01]
subtype_indication ::= subtype_mark [constraint]
by:
subtype_indication ::=
[null_exclusion] subtype_mark [scalar_constraint | composite_constraint]
Delete paragraph 5: [AI95-00231-01]
constraint ::= scalar_constraint | composite_constraint
3.2.3 Classification of Operations
Insert after paragraph 6: [AI95-00335-01]
-
For a specific type declared immediately within a
package_specification, any subprograms (in addition to the enumeration
literals) that are explicitly declared immediately within the same
package_specification and that operate on the type;
the new paragraph:
-
For a specific type, the stream-oriented attributes of the type that
are available (see 13.13.2) at the end of the list of declarative_items
where the type is declared;
Replace paragraph 7: [AI95-00200-01]
-
Any subprograms not covered above that are explicitly declared
immediately within the same declarative region as the type and that override
(see 8.3) other implicitly declared primitive subprograms of the type.
by:
-
In the case of a nonformal type, any subprograms not covered above
that are explicitly declared immediately within the same declarative region as
the type and that override (see 8.3) other implicitly declared primitive
subprograms of the type.
3.3.1 Object Declarations
Replace paragraph 5: [AI95-00287-01]
An object_declaration without the reserved word constant declares a
variable object. If it has a subtype_indication or an
array_type_definition that defines an indefinite subtype, then there shall
be an initialization expression. An initialization expression shall not be
given if the object is of a limited type.
by:
An object_declaration without the reserved word constant declares a
variable object. If it has a subtype_indication or an
array_type_definition that defines an indefinite subtype, then there shall
be an initialization expression.
Replace paragraph 9: [AI95-00363-01]
If a composite object declared by an object_declaration has an
unconstrained nominal subtype, then if this subtype is indefinite or the object
is constant or aliased (see 3.10) the actual subtype of this object is
constrained. The constraint is determined by the bounds or discriminants (if
any) of its initial value; the object is said to be constrained by its
initial value. In the case of an aliased object, this initial value may be
either explicit or implicit; in the other cases, an explicit initial value is
required. When not constrained by its initial value, the actual and nominal
subtypes of the object are the same. If its actual subtype is constrained, the
object is called a constrained object.
by:
If a composite object declared by an object_declaration has an
unconstrained nominal subtype, then if this subtype is indefinite or the object
is constant the actual subtype of this object is constrained. The constraint is
determined by the bounds or discriminants (if any) of its initial value; the
object is said to be constrained by its initial value. When not constrained
by its initial value, the actual and nominal subtypes of the object are the
same. If its actual subtype is constrained, the object is called a
constrained object.
3.4 Derived Types and Classes
Replace paragraph 2: [AI95-00251-01]
derived_type_definition ::= [abstract] new parent_subtype_indication [record_extension_part]
by:
interface_list ::= interface_subtype_mark {and interface_subtype_mark}
derived_type_definition ::=
[abstract] new parent_subtype_indication [[and interface_list] record_extension_part]
Replace paragraph 3: [AI95-00251-01]
The parent_subtype_indication defines the parent subtype; its type is
the parent type.
by:
The parent_subtype_indication defines the parent subtype; its type is
the parent type. A derived type has one parent type and zero or more interface
ancestor types.
Replace paragraph 8: [AI95-00251-01]
-
Each class of types that includes the parent type also includes the
derived type.
by:
-
Each class of types that includes the parent type or an interface
ancestor type also includes the derived type.
Insert after paragraph 23: [AI95-00251-01]
If a primitive subprogram of the parent type is visible at the place of the
derived_type_definition, then the corresponding inherited subprogram is
implicitly declared immediately after the derived_type_definition.
Otherwise, the inherited subprogram is implicitly declared later or not at all,
as explained in 7.3.1.
the new paragraph:
If a type declaration names an interface type in an interface_list, then
the declared type inherits any user-defined primitive subprograms of the
interface type in the same way.
Insert after paragraph 35: [AI95-00251-01]
17 If the reserved word abstract is given in the declaration
of a type, the type is abstract (see 3.9.3).
the new paragraph:
18 An interface type which has an interface ancestor "is derived
from" that type, and therefore is a derived type. A
derived_type_definition, however, never defines an interface type.
3.4.1 Derivation Classes
Replace paragraph 2: [AI95-00251-01]
A derived type is derived from its parent type directly; it is derived
indirectly from any type from which its parent type is derived. The
derivation class of types for a type T (also called the class rooted
at T) is the set consisting of T (the root type of the class) and
all types derived from T (directly or indirectly) plus any associated
universal or class-wide types (defined below).
by:
A derived type is derived from its parent type directly; it is derived
indirectly from any type from which its parent type is derived. A derived
type or interface type is also derived from each of its interface ancestor
types, if any. The derivation class of types for a type T (also called the
class rooted at T) is the set consisting of T (the root type of
the class) and all types derived from T (directly or indirectly) plus any
associated universal or class-wide types (defined below).
Replace paragraph 6: [AI95-00230-01]
- Universal types
-
Universal types are defined for (and belong to) the integer, real, and fixed
point classes, and are referred to in this standard as respectively,
universal_integer, universal_real, and universal_fixed. These are
analogous to class-wide types for these language-defined numeric classes. As
with class-wide types, if a formal parameter is of a universal type, then an
actual parameter of any type in the corresponding class is acceptable. In
addition, a value of a universal type (including an integer or real
numeric_literal) is ``universal'' in that it is acceptable where some
particular type in the class is expected (see 8.6).
by:
- Universal types
-
Universal types are defined for (and belong to) the integer, real, fixed point,
and access classes, and are referred to in this standard as respectively,
universal_integer, universal_real, universal_fixed, and
universal_access. These are analogous to class-wide types for these
language-defined classes. As with class-wide types, if a formal parameter is of
a universal type, then an actual parameter of any type in the corresponding
class is acceptable. In addition, a value of a universal type (including an
integer or real numeric_literal) is ``universal'' in that it is acceptable
where some particular type in the class is expected (see 8.6).
Replace paragraph 10: [AI95-00251-01]
A specific type T2 is defined to be a descendant of a type T1 if
T2 is the same as T1, or if T2 is derived (directly or indirectly)
from T1. A class-wide type T2'Class is defined to be a descendant of
type T1 if T2 is a descendant of T1. Similarly, the universal types
are defined to be descendants of the root types of their classes. If a type
T2 is a descendant of a type T1, then T1 is called an ancestor
of T2. The ultimate ancestor of a type is the ancestor of the type that
is not a descendant of any other type.
by:
A specific type T2 is defined to be a descendant of a type T1 if
T2 is the same as T1, or if T2 is derived (directly or indirectly)
from T1. A class-wide type T2'Class is defined to be a descendant of
type T1 if T2 is a descendant of T1. Similarly, the universal types
are defined to be descendants of the root types of their classes. If a type
T2 is a descendant of a type T1, then T1 is called an ancestor
of T2. An ultimate ancestor of a type is an ancestor of that type that
is not a descendant of any other type. Each untagged type has a unique
ultimate ancestor.
3.5 Scalar Types
Replace paragraph 28: [AI95-00285-01]
- S'Wide_Image
-
S'Wide_Image denotes a function with the following specification:
by:
- S'Wide_Wide_Image
-
S'Wide_Wide_Image denotes a function with the following specification:
Replace paragraph 29: [AI95-00285-01]
function S'Wide_Image(Arg : S'Base)
return Wide_String
by:
function S'Wide_Wide_Image(Arg : S'Base)
return Wide_Wide_String
Insert after paragraph 34: [AI95-00285-01]
The image of a fixed point value is a decimal real literal best
approximating the value (rounded away from zero if halfway between) with a
single leading character that is either a minus sign or a space, one or more
digits before the decimal point (with no redundant leading zeros), a decimal
point, and S'Aft (see 3.5.10) digits after the decimal point.
the new paragraphs:
- S'Wide_Image
-
S'Wide_Image denotes a function with the following specification:
function S'Wide_Image(Arg : S'Base)
return Wide_String
The function returns an image of the value of Arg as a Wide_String. The lower
bound of the result is one. The image has the same sequence of character as
defined for S'Wide_Wide_Image if all the graphic characters are defined in
Wide_Character; otherwise the sequence of characters is implementation defined
(but no shorter than that of S'Wide_Wide_Image for the same value of Arg).
Replace paragraph 37: [AI95-00285-01]
The function returns an image of the value of Arg as a String. The
lower bound of the result is one. The image has the same sequence of graphic
characters as that defined for S'Wide_Image if all the graphic characters are
defined in Character; otherwise the sequence of characters is implementation
defined (but no shorter than that of S'Wide_Image for the same value of Arg).
by:
The function returns an image of the value of Arg as a String. The
lower bound of the result is one. The image has the same sequence of character
as defined for S'Wide_Wide_Image if all the graphic characters are defined in
Character; otherwise the sequence of characters is implementation defined (but
no shorter than that of S'Wide_Wide_Image for the same value of Arg).
- S'Wide_Wide_Width
-
S'Wide_Wide_Width denotes the maximum length of a Wide_Wide_String returned by
S'Wide_Wide_Image over all the values of S. It denotes zero for a subtype that
has a null range. Its type is universal_integer.
Replace paragraph 40: [AI95-00285-01]
- S'Wide_Value
-
S'Wide_Value denotes a function with the following specification:
by:
- S'Wide_Wide_Value
-
S'Wide_Wide_Value denotes a function with the following specification:
Replace paragraph 41: [AI95-00285-01]
function S'Wide_Value(Arg : Wide_String)
return S'Base
by:
function S'Wide_Wide_Value(Arg : Wide_Wide_String)
return S'Base
Replace paragraph 42: [AI95-00285-01]
This function returns a value given an image of the value as a
Wide_String, ignoring any leading or trailing spaces.
by:
This function returns a value given an image of the value as a
Wide_Wide_String, ignoring any leading or trailing spaces.
Replace paragraph 43: [AI95-00285-01]
For the evaluation of a call on S'Wide_Value for an enumeration subtype S,
if the sequence of characters of the parameter (ignoring leading and trailing
spaces) has the syntax of an enumeration literal and if it corresponds to a
literal of the type of S (or corresponds to the result of S'Wide_Image
for a nongraphic character of the type), the result is the corresponding
enumeration value; otherwise Constraint_Error is raised.
by:
For the evaluation of a call on S'Wide_Wide_Value for an enumeration subtype S,
if the sequence of characters of the parameter (ignoring leading and trailing
spaces) has the syntax of an enumeration literal and if it corresponds to a
literal of the type of S (or corresponds to the result of S'Wide_Wide_Image
for a nongraphic character of the type), the result is the corresponding
enumeration value; otherwise Constraint_Error is raised.
Replace paragraph 44: [AI95-00285-01]
For the evaluation of a call on S'Wide_Value (or S'Value) for an integer
subtype S, if the sequence of characters of the parameter (ignoring leading and
trailing spaces) has the syntax of an integer literal, with an optional leading
sign character (plus or minus for a signed type; only plus for a modular type),
and the corresponding numeric value belongs to the base range of the type of S,
then that value is the result; otherwise Constraint_Error is raised.
by:
For the evaluation of a call on S'Wide_Wide_Value for an integer subtype S, if
the sequence of characters of the parameter (ignoring leading and trailing
spaces) has the syntax of an integer literal, with an optional leading sign
character (plus or minus for a signed type; only plus for a modular type), and
the corresponding numeric value belongs to the base range of the type of S,
then that value is the result; otherwise Constraint_Error is raised.
Replace paragraph 45: [AI95-00285-01]
For the evaluation of a call on S'Wide_Value (or S'Value) for a real
subtype S, if the sequence of characters of the parameter (ignoring leading and
trailing spaces) has the syntax of one of the following:
by:
For the evaluation of a call on S'Wide_Wide_Value for a real subtype
S, if the sequence of characters of the parameter (ignoring leading and
trailing spaces) has the syntax of one of the following:
Insert after paragraph 51: [AI95-00285-01]
with an optional leading sign character (plus or minus), and if the
corresponding numeric value belongs to the base range of the type of S, then
that value is the result; otherwise Constraint_Error is raised. The sign of a
zero value is preserved (positive if none has been specified) if S'Signed_Zeros
is True.
the new paragraphs:
- S'Wide_Value
-
S'Wide_Value denotes a function with the following specification:
function S'Wide_Value(Arg : Wide_String)
return S'Base
This function returns a value given an image of the value as a
Wide_String, ignoring any leading or trailing spaces. For the evaluation of a
call on S'Wide_Value for an enumeration subtype S, if the sequence of
characters of the parameter (ignoring leading and trailing spaces) has the
syntax of an enumeration literal and if it corresponds to a literal of the type
of S (or corresponds to the result of S'Wide_Image for a value of the type),
the result is the corresponding enumeration value; otherwise Constraint_Error
is raised. For a numeric subtype S, the evaluation of a call on S'Wide_Value
with Arg of type Wide_String is equivalent to a call on S'Wide_Wide_Value for a
corresponding Arg of type Wide_Wide_String.
Replace paragraph 55: [AI95-00285-01]
For the evaluation of a call on S'Value for an enumeration subtype S,
if the sequence of characters of the parameter (ignoring leading and trailing
spaces) has the syntax of an enumeration literal and if it corresponds to a
literal of the type of S (or corresponds to the result of S'Image for a value
of the type), the result is the corresponding enumeration value; otherwise
Constraint_Error is raised. For a numeric subtype S, the evaluation of a call
on S'Value with Arg of type String is equivalent to a call on S'Wide_Value for
a corresponding Arg of type Wide_String.
by:
For the evaluation of a call on S'Value for an enumeration subtype S,
if the sequence of characters of the parameter (ignoring leading and trailing
spaces) has the syntax of an enumeration literal and if it corresponds to a
literal of the type of S (or corresponds to the result of S'Image for a value
of the type), the result is the corresponding enumeration value; otherwise
Constraint_Error is raised. For a numeric subtype S, the evaluation of a call
on S'Value with Arg of type String is equivalent to a call on S'Wide_Wide_Value
for a corresponding Arg of type Wide_Wide_String.
Replace paragraph 56: [AI95-00285-01]
An implementation may extend the Wide_Value, Value, Wide_Image, and Image
attributes of a floating point type to support special values such as
infinities and NaNs.
by:
An implementation may extend the Wide_Wide_Value, Wide_Value, Value,
Wide_Wide_Image, Wide_Image, and Image attributes of a floating point type to
support special values such as infinities and NaNs.
Replace paragraph 59: [AI95-00285-01]
21 For any value V (including any nongraphic character) of an
enumeration subtype S, S'Value(S'Image(V)) equals V, as does
S'Wide_Value(S'Wide_Image(V)). Neither expression ever raises
Constraint_Error.
by:
21 For any value V (including any nongraphic character) of an
enumeration subtype S, S'Value(S'Image(V)) equals V, as do
S'Wide_Value(S'Wide_Image(V)) and S'Wide_Wide_Value(S'Wide_Wide_Image(V)).
Neither expression ever raises Constraint_Error.
3.5.2 Character Types
Replace paragraph 2: [AI95-00285-01]
The predefined type Character is a character type whose values correspond to
the 256 code positions of Row 00 (also known as Latin-1) of the ISO 10646 Basic
Multilingual Plane (BMP). Each of the graphic characters of Row 00 of the BMP
has a corresponding character_literal in Character. Each of the nongraphic
positions of Row 00 (0000-001F and 007F-009F) has a corresponding
language-defined name, which is not usable as an enumeration literal, but which
is usable with the attributes (Wide_)Image and (Wide_)Value; these names are
given in the definition of type Character in A.1, ``The Package Standard'', but
are set in italics.
by:
The predefined type Character is a character type whose values correspond to
the 256 code positions of Row 00 (also known as Latin-1) of the ISO/IEC 10646:2003 Basic
Multilingual Plane (BMP). Each of the graphic characters of Row 00 of the BMP
has a corresponding character_literal in Character. Each of the nongraphic
positions of Row 00 (0000-001F and 007F-009F) has a corresponding
language-defined name, which is not usable as an enumeration literal, but which
is usable with the attributes Image, Wide_Image,
Wide_Wide_Image, Value, Wide_Value, and Wide_Wide_Value; these names are
given in the definition of type Character in A.1, ``The Package Standard'', but
are set in italics.
Replace paragraph 3: [AI95-00285-01]
The predefined type Wide_Character is a character type whose values correspond
to the 65536 code positions of the ISO 10646 Basic Multilingual Plane (BMP).
Each of the graphic characters of the BMP has a corresponding character_literal
in Wide_Character. The first 256 values of Wide_Character have the same
character_literal or language-defined name as defined for Character. The last 2
values of Wide_Character correspond to the nongraphic positions FFFE and FFFF
of the BMP, and are assigned the language-defined names FFFE and FFFF. As with
the other language-defined names for nongraphic characters, the names FFFE and
FFFF are usable only with the attributes (Wide_)Image and (Wide_)Value; they
are not usable as enumeration literals. All other values of Wide_Character are
considered graphic characters, and have a corresponding character_literal.
by:
The predefined type Wide_Character is a character type whose values correspond
to the 65536 code positions of the ISO/IEC 10646:2003 Basic Multilingual Plane (BMP).
Each of the graphic characters of the BMP has a corresponding character_literal
in Wide_Character. The first 256 values of Wide_Character have the same
character_literal or language-defined name as defined for Character.
Each of the graphic_characters has a corresponding character_literal.
The predefined type Wide_Wide_Character is a character type whose values
correspond to the 2147483648 code positions of the ISO/IEC 10646:2003 character
set. Each of the graphic_characters has a corresponding character_literal
in Wide_Wide_Character. The first 65536 values of Wide_Wide_Character have the
same character_literal or language-defined name as defined for
Wide_Character.
In types Wide_Character and Wide_Wide_Character, the characters whose code
positions are 16#FFFE# and 16#FFFF# are assigned the language-defined names FFFE
and FFFF. The other characters whose code position is larger than 16#FF# and
which are not graphic_characters have language-defined names which are formed by
appending to the string "Character_" the representation of their code position
in hexadecimal as eight extended digits. As with other language-defined names,
these names are usable only with the attributes (Wide_)Wide_Image and
(Wide_)Wide_Value; they are not usable as enumeration literals.
Replace paragraph 4: [AI95-00285-01]
In a nonstandard mode, an implementation may provide other interpretations for
the predefined types Character and Wide_Character, to conform to local
conventions.
by:
In a nonstandard mode, an implementation may provide other interpretations for
the predefined types Character, Wide_Character, and Wide_Wide_Character to
conform to local conventions.
Delete paragraph 5: [AI95-00285-01]
If an implementation supports a mode with alternative interpretations for
Character and Wide_Character, the set of graphic characters of Character should
nevertheless remain a proper subset of the set of graphic characters of
Wide_Character. Any character set ``localizations'' should be reflected in the
results of the subprograms defined in the language-defined package
Characters.Handling (see A.3) available in such a mode. In a mode with an
alternative interpretation of Character, the implementation should also support
a corresponding change in what is a legal identifier_letter.
3.5.4 Integer Types
Replace paragraph 16: [AI95-00340-01]
For every modular subtype S, the following attribute is defined:
by:
For every modular subtype S, the following attributes are defined:
S'Mod denotes a function with the following specification:
function S'Mod (Arg : universal_integer)
return S'Base
This function returns Arg mod S'Modulus.
3.5.9 Fixed Point Types
Replace paragraph 8: [AI95-00100-01]
The set of values of a fixed point type comprise the integral multiples of a
number called the small of the type. For a type defined by an
ordinary_fixed_point_definition (an ordinary fixed point type), the
small may be specified by an attribute_definition_clause (see 13.3); if so
specified, it shall be no greater than the delta of the type. If not
specified, the small of an ordinary fixed point type is an
implementation-defined power of two less than or equal to the delta.
by:
The set of values of a fixed point type comprise the integral multiples of a
number called the small of the type. The machine numbers of a fixed
point type are the values of the type that can be represented exactly in every
unconstrained variable of the type. For a type defined by an
ordinary_fixed_point_definition (an ordinary fixed point type), the
small may be specified by an attribute_definition_clause (see 13.3);
if so specified, it shall be no greater than the delta of the type. If not
specified, the small of an ordinary fixed point type is an
implementation-defined power of two less than or equal to the delta.
3.6 Array Types
Replace paragraph 7: [AI95-00230-01]
component_definition ::= [aliased] subtype_indication
by:
component_definition ::= [aliased] subtype_indication | access_definition
Delete paragraph 11: [AI95-00363-01]
Within the definition of a nonlimited composite type (or a limited composite
type that later in its immediate scope becomes nonlimited -- see 7.3.1 and
7.5), if a component_definition contains the reserved word aliased and
the type of the component is discriminated, then the nominal subtype of the
component shall be constrained.
Replace paragraph 22: [AI95-00230-01]
The elaboration of a discrete_subtype_definition that does not contain
any per-object expressions creates the discrete
subtype, and consists of the elaboration of the subtype_indication or the
evaluation of the range. The elaboration of a
discrete_subtype_definition that contains one or more per-object
expressions is defined in 3.8. The elaboration of a component_definition
in an array_type_definition consists of the elaboration of the
subtype_indication. The elaboration of any
discrete_subtype_definitions and the elaboration of
the component_definition are performed in an arbitrary order.
by:
The elaboration of a discrete_subtype_definition that does not contain
any per-object expressions creates the discrete
subtype, and consists of the elaboration of the subtype_indication or the
evaluation of the range. The elaboration of a
discrete_subtype_definition that contains one or more per-object
expressions is defined in 3.8. The elaboration of a component_definition
in an array_type_definition consists of the elaboration of the
subtype_indication or access_definition. The elaboration of any
discrete_subtype_definitions and the elaboration of
the component_definition are performed in an arbitrary order.
3.6.2 Operations of Array Types
Replace paragraph 16: [AI95-00287-01]
48 A component of an array can be named with an indexed_component.
A value of an array type can be specified with an array_aggregate, unless
the array type is limited. For a one-dimensional array type, a slice of the array
can be named; also, string literals are defined if the component type is a
character type.
by:
48 A component of an array can be named with an indexed_component.
A value of an array type can be specified with an array_aggregate. For a
one-dimensional array type, a slice of the array can be named; also, string
literals are defined if the component type is a character type.
3.6.3 String Types
Replace paragraph 2: [AI95-00285-01]
There are two predefined string types, String and Wide_String, each indexed by
values of the predefined subtype Positive; these are declared in the visible
part of package Standard:
by:
There are three predefined string types, String, Wide_String, and
Wide_Wide_String, each indexed by the value of the predefined subtype Positive;
these are declared in the visible part of package Standard:
Replace paragraph 4: [AI95-00285-01]
type String is array (Positive range <>) of Character;
type Wide_String is array (Positive range <>) of Wide_Character;
by:
type String is array (Positive range <>) of Character;
type Wide_String is array (Positive range <>) of Wide_Character;
type Wide_Wide_String is array (Positive range <>) of Wide_Wide_Character;
3.7 Discriminants
Replace paragraph 1: [AI95-00326-01]
A composite type (other than an array type) can have discriminants, which
parameterize the type. A known_discriminant_part specifies the
discriminants of a composite type. A discriminant of an object is a component
of the object, and is either of a discrete type or an access type. An
unknown_discriminant_part in the declaration of a partial view of a type
specifies that the discriminants of the type are unknown for the given view;
all subtypes of such a partial view are indefinite subtypes.
by:
A composite type (other than an array type) can have discriminants, which
parameterize the type. A known_discriminant_part specifies the
discriminants of a composite type. A discriminant of an object is a component
of the object, and is either of a discrete type or an access type. An
unknown_discriminant_part in the declaration of a view of a type
specifies that the discriminants of the type are unknown for the given view;
all subtypes of such a view are indefinite subtypes.
Replace paragraph 5: [AI95-00231-01]
discriminant_specification ::=
defining_identifier_list : subtype_mark [:= default_expression]
| defining_identifier_list : access_definition [:= default_expression]
by:
discriminant_specification ::=
defining_identifier_list : [null_exclusion] subtype_mark [:= default_expression]
| defining_identifier_list : access_definition [:= default_expression]
Replace paragraph 9: [AI95-00231-01; AI95-00254-01]
The subtype of a discriminant may be defined by a subtype_mark, in which
case the subtype_mark shall denote a discrete or access subtype, or it may
be defined by an access_definition (in which case the subtype_mark of
the access_definition may denote any kind of subtype). A discriminant that
is defined by an access_definition is called an access discriminant and is
of an anonymous general access-to-variable type whose designated subtype is
denoted by the subtype_mark of the access_definition.
by:
The subtype of a discriminant may be defined by an optional null_exclusion
and a subtype_mark, in which case the subtype_mark shall denote a
discrete or access subtype, or it may be defined by an access_definition.
A discriminant that is defined by an access_definition is called an
access discriminant and is of an anonymous access type.
Delete paragraph 10: [AI95-00230-01]
A discriminant_specification for an access discriminant shall appear only
in the declaration for a task or protected type, or for a type with the
reserved word limited in its (full) definition or in that of one of its
ancestors. In addition to the places where Legality Rules normally apply (see
12.3), this rule applies also in the private part of an instance of a generic
unit.
3.7.1 Discriminant Constraints
Replace paragraph 7: [AI95-00363-01]
A discriminant_constraint is only allowed in a subtype_indication whose
subtype_mark denotes either an unconstrained discriminated subtype, or an
unconstrained access subtype whose designated subtype is an unconstrained
discriminated subtype. However, in the case of a general access subtype, a
discriminant_constraint is illegal if there is a place within the
immediate scope of the designated subtype where the designated subtype's view
is constrained.
by:
A discriminant_constraint is only allowed in a subtype_indication whose
subtype_mark denotes either an unconstrained discriminated subtype, or an
unconstrained access subtype whose designated subtype is an unconstrained
discriminated subtype. However, in the case of a general access subtype, a
discriminant_constraint is illegal if the designated type has defaults for
its discriminants. In addition to the places where Legality Rules normally
apply (see 12.3), these rules apply also in the private part of an instance
of a generic unit. In a generic body, this rule is checked presuming all
formal access types of the generic might be general access types, and all
untagged discriminated formal types of the generic might have defaults.
3.8 Record Types
Delete paragraph 8: [AI95-00287-01]
A default_expression is not permitted if the component is of a limited
type.
Replace paragraph 18: [AI95-00230-01]
Within the definition of a composite type, if a component_definition or
discrete_subtype_definition (see 9.5.2) includes a name that denotes
a discriminant of the type, or that is an attribute_reference whose
prefix denotes the current instance of the type, the expression containing the
name is called a per-object expression, and the constraint or
range being defined is called a per-object constraint. For the
elaboration of a component_definition of a component_declaration or
the discrete_subtype_definition of an entry_declaration for an entry
family (see 9.5.2), if the constraint or range of the
subtype_indication or discrete_subtype_definition is not a per-object
constraint, then the subtype_indication or discrete_subtype_definition
is elaborated. On the other hand, if the constraint or range is a
per-object constraint, then the elaboration consists of the evaluation of any
included expression that is not part of a per-object expression. Each such
expression is evaluated once unless it is part of a named association in a
discriminant constraint, in which case it is evaluated once for each associated
discriminant.
by:
Within the definition of a composite type, if a component_definition or
discrete_subtype_definition (see 9.5.2) includes a name that denotes
a discriminant of the type, or that is an attribute_reference whose
prefix denotes the current instance of the type, the expression containing the
name is called a per-object expression, and the constraint or
range being defined is called a per-object constraint. For the
elaboration of a component_definition of a component_declaration or
the discrete_subtype_definition of an entry_declaration for an entry
family (see 9.5.2), if the component subtype is defined by an
access_definition or if the constraint or range of the
subtype_indication or discrete_subtype_definition is not a per-object
constraint, then the access_definition, subtype_indication, or
discrete_subtype_definition is elaborated. On the other hand, if the
constraint or range is a per-object constraint, then the elaboration
consists of the evaluation of any included expression that is not part of a
per-object expression. Each such expression is evaluated once unless it is part
of a named association in a discriminant constraint, in which case it is
evaluated once for each associated discriminant.
Replace paragraph 25: [AI95-00287-01]
61 A component of a record can be named with a
selected_component. A value of a record can be specified with a
record_aggregate, unless the record type is limited.
by:
61 A component of a record can be named with a
selected_component. A value of a record can be specified with a
record_aggregate.
3.9 Tagged Types and Type Extensions
Replace paragraph 4: [AI95-00344-01]
The tag of a specific tagged type identifies the full_type_declaration of
the type. If a declaration for a tagged type occurs within a
generic_package_declaration, then the corresponding type declarations in
distinct instances of the generic package are associated with distinct tags.
For a tagged type that is local to a generic package body, the language does
not specify whether repeated instantiations of the generic body result in
distinct tags.
by:
The tag of a specific tagged type identifies the full_type_declaration of
the type, and for a type extension, is sufficient to uniquely identify the type
among all descendants of the same ancestor. If a declaration for a tagged
type occurs within a generic_package_declaration, then the
corresponding type declarations in distinct instances of the generic
package are associated with distinct tags. For a tagged type that is local to a
generic package body and with any ancestors also local to the generic body, the
language does not specify whether repeated instantiations of the generic body
result in distinct tags.
Replace paragraph 6: [AI95-00362-01]
package Ada.Tags is
type Tag is private;
by:
package Ada.Tags is
pragma Preelaborate(Tags);
type Tag is private;
Insert after paragraph 7: [AI95-00344-01]
function Expanded_Name(T : Tag) return String;
function External_Tag(T : Tag) return String;
function Internal_Tag(External : String) return Tag;
the new paragraphs:
function Descendant_Tag(External : String; Ancestor : Tag) return Tag;
function Is_Descendant_At_Same_Level(Descendant, Ancestor : Tag)
return Boolean;
Replace paragraph 12: [AI95-00279-01; AI95-00344-01]
The function Internal_Tag returns the tag that corresponds to the given
external tag, or raises Tag_Error if the given string is not the external tag
for any specific type of the partition.
by:
The function Internal_Tag returns a tag that corresponds to the given
external tag, or raises Tag_Error if the given string is not the external tag
for any specific type of the partition. Tag_Error is also raised if the
specific type identified is a library-level type whose tag has not
yet been created.
The function Descendant_Tag returns the (internal) tag for the type
that corresponds to the given external tag and is both a descendant of the
type identified by the Ancestor tag and has the same accessibility level as
the identified ancestor. Tag_Error is raised if External is not the
external tag for such a type. Tag_Error is also raised if the
specific type identified is a library-level type whose tag has not
yet been created.
The function Is_Descendant_At_Same_Level returns True if Descendant tag
identifies a type that is both a descendant of the type identified
by Ancestor and at the same accessibility level. If not, it returns False.
Insert before paragraph 14: [AI95-00318-02]
The component_definition of a component_declaration defines the
(nominal) subtype of the component. If the reserved word aliased appears
in the component_definition, then the component is aliased (see 3.10).
the new paragraph:
If a record_type_declaration includes the reserved word limited, it
is called a limited record.
Replace paragraph 26: [AI95-00279-01]
The implementation of the functions in Ada.Tags may raise Tag_Error if no
specific type corresponding to the tag passed as a parameter exists in the
partition at the time the function is called.
by:
The implementation of the functions in Ada.Tags may raise Tag_Error if no
specific type corresponding to the tag or external tag passed as a parameter
exists in the partition at the time the function is called.
3.9.1 Type Extensions
Replace paragraph 3: [AI95-00344-01; AI95-00345-01]
The parent type of a record extension shall not be a class-wide type. If the
parent type is nonlimited, then each of the components of the
record_extension_part shall be nonlimited. The accessibility level (see
3.10.2) of a record extension shall not be statically deeper than that of its
parent type. In addition to the places where Legality Rules normally apply (see
12.3), these rules apply also in the private part of an instance of a generic
unit.
by:
The parent type of a record extension shall not be a class-wide type nor
shall it be a synchronized tagged type (see 3.9.4). If the
parent type is nonlimited, then each of the components of the
record_extension_part shall be nonlimited.
Replace paragraph 4: [AI95-00344-01]
A type extension shall not be declared in a generic body if the parent type is
declared outside that body.
by:
Within the body of a generic unit, or the body of any of its descendant
library units, a tagged type shall not be declared as a descendant
of a formal type declared within the formal part of the generic unit.
3.9.2 Dispatching Operations of Tagged Types
Replace paragraph 17: [AI95-00196-01]
If all of the controlling operands are tag-indeterminate, then:
by:
If all of the controlling operands (if any) are tag-indeterminate, then:
Replace paragraph 18: [AI95-00196-01; AI95-00239-01]
-
If the call has a controlling result and is itself a (possibly
parenthesized or qualified) controlling operand of an enclosing call on a
dispatching operation of type T, then its controlling tag value is
determined by the controlling tag value of this enclosing call;
by:
-
If the call has a controlling result and is itself a (possibly
parenthesized or qualified) controlling operand of an enclosing call on a
dispatching operation of a descendant of type T, then its controlling tag
value is determined by the controlling tag value of this enclosing call;
-
If the call has a controlling result and is the (possibly
parenthesized or qualified) expression of an assignment statement whose
target is of a class-wide type, then its controlling tag value is determined
by the target;
3.9.3 Abstract Types and Subprograms
Replace paragraph 1: [AI95-00345-01]
An abstract type is a tagged type intended for use as a parent type for
type extensions, but which is not allowed to have objects of its own. An
abstract subprogram is a subprogram that has no body, but is intended to be
overridden at some point when inherited. Because objects of an abstract type
cannot be created, a dispatching call to an abstract subprogram always
dispatches to some overriding body.
by:
An abstract type is a type intended for use as an ancestor of other types,
but which is not allowed to have objects of its own. An abstract subprogram
is a subprogram that has no body, but is intended to be overridden at some
point when inherited. Because objects of an abstract type cannot be created, a
dispatching call to an abstract subprogram always dispatches to some overriding
body.
Interface types (see 3.9.4) are abstract types. In addition, a
tagged type that has the reserved word abstract in its declaration
is an abstract type. The class-wide type (see 3.4.1) rooted at an
abstract type is not itself an abstract type.
Replace paragraph 2: [AI95-00345-01]
An abstract type is a specific type that has the reserved word abstract in
its declaration. Only a tagged type is allowed to be declared abstract.
by:
Only a tagged type shall have the reserved word abstract in its
declaration.
Replace paragraph 4: [AI95-00251-01; AI95-00334-01]
For a derived type, if the parent or ancestor type has an abstract primitive
subprogram, or a primitive function with a controlling result, then:
by:
If a type has an implicitly declared primitive subprogram that is
inherited or is the predefined equality operator, and the corresponding
primitive subprogram of the parent or ancestor type is abstract or is a
function with a controlling result, then:
Replace paragraph 5: [AI95-00251-01; AI95-00334-01]
-
If the derived type is abstract or untagged, the inherited subprogram
is abstract.
by:
-
If the type is abstract or untagged, the implicitly declared
subprogram is abstract.
3.9.4 Interface Types
Insert new clause: [AI95-00251-01; AI95-00345-01]
An interface type is an abstract tagged type which provides a restricted
form of multiple inheritance. A tagged, task, or protected type may be
derived from one or more interface types.
interface_type_definition ::=
[limited | task | protected | synchronized] interface [and interface_list]
An interface type (also called an "interface") is a specific abstract
tagged type that is defined by an interface_type_definition.
An interface with the reserved word limited, task, protected, or
synchronized in its definition is termed, respectively, a limited
interface, a task interface, a protected interface, or a
synchronized interface. In addition, all task and protected interfaces
are synchronized interfaces, and all synchronized interfaces are limited
interfaces. A view of an object that is of a task interface type (or of a
corresponding class-wide type) is a task object. Similarly, a view of an
object that is of a protected interface type (or of a corresponding
class-wide type) is a protected object.
A task or protected type derived from an interface is a tagged type. Such
a tagged type is called a synchronized tagged type, as are synchronized
interfaces and private extensions derived from synchronized interfaces.
An interface type has no components.
All user-defined primitive subprograms of an interface type shall be
abstract subprograms or null procedures.
The type of a subtype named in an interface_list shall be an
interface type.
If a type declaration names an interface type in an interface_list,
then the accessibility level of the declared type shall not be
statically deeper than that of the interface type; also, the declared
type shall not be declared in a generic body if the interface type is
declared outside that body.
A descendant of a nonlimited interface shall be nonlimited. A descendant
of a task interface shall be a task type or a task interface. A descendant
of a protected interface shall be a protected type or a protected
interface. A descendant of a synchronized interface shall be a task type,
a protected type, or a synchronized interface.
A full view shall be a descendant of an interface type if and only if
the corresponding partial view (if any) is also a descendant of the
interface type.
For an interface type declared in a visible part, a primitive
subprogram shall not be declared in the private part.
In addition to the places where Legality Rules normally apply
(see 12.3), these rules apply also in the private part of an instance
of a generic unit.
3.10 Access Types
Replace paragraph 2: [AI95-00231-01]
access_type_definition ::=
access_to_object_definition
| access_to_subprogram_definition
by:
access_type_definition ::=
[null_exclusion] access_to_object_definition
| [null_exclusion] access_to_subprogram_definition
Replace paragraph 6: [AI95-00231-01; AI95-00254-01]
access_definition ::= access subtype_mark
by:
null_exclusion ::= not null
access_definition ::=
[null_exclusion] access [general_access_modifier] subtype_mark |
[null_exclusion] access [protected] procedure parameter_profile |
[null_exclusion] access [protected] function parameter_and_result_profile
Replace paragraph 9: [AI95-00225-01; AI95-00363-01]
A view of an object is defined to be aliased if it is defined by an
object_declaration or component_definition with the reserved word
aliased, or by a renaming of an aliased view. In addition, the dereference
of an access-to-object value denotes an aliased view, as does a view conversion
(see 4.6) of an aliased view. Finally, the current instance of a limited
type, and a formal parameter or generic formal object of a tagged type are
defined to be aliased. Aliased views are the ones that can be designated by
an access value. If the view defined by an object_declaration is aliased,
and the type of the object has discriminants, then the object is constrained;
if its nominal subtype is unconstrained, then the object is constrained by
its initial value. Similarly, if the object created by an allocator has
discriminants, the object is constrained, either by the designated subtype,
or by its initial value.
by:
A view of an object is defined to be aliased if it is defined by an
object_declaration or component_definition with the reserved word
aliased, or by a renaming of an aliased view. In addition, the dereference
of an access-to-object value denotes an aliased view, as does a view conversion
(see 4.6) of an aliased view. A current instance of a limited tagged type, a
protected type, a task type, or a type that has the reserved word limited
in its full definition is also defined to be aliased. Finally, a formal
parameter or generic formal object of a tagged type is defined to be aliased.
Aliased views are the ones that can be designated by an access value.
Replace paragraph 12: [AI95-00230-01; AI95-00231-01; AI95-00254-01]
An access_definition defines an anonymous general access-to-variable type;
the subtype_mark denotes its designated subtype. An
access_definition is used in the specification of an access discriminant
(see 3.7) or an access parameter (see 6.1).
by:
An access_definition defines an anonymous general access type or an
anonymous access-to-subprogram type. For a general access type, the
subtype_mark denotes its designated subtype; if the reserved word
constant appears, the type is an access-to-constant type; otherwise it is
an access-to-variable type. For an access-to-subprogram type, the
parameter_profile or parameter_and_result_profile denotes its
designated profile. If a null_exclusion is present, or the
access_definition is for a controlling access parameter (see 3.9.2), the
access_definition defines an access subtype which excludes the null value;
otherwise the subtype includes a null value.
Replace paragraph 13: [AI95-00230-01; AI95-00231-01]
For each (named) access type, there is a literal null which has a null access
value designating no entity at all. The null value of a named access type is
the default initial value of the type. Other values of an access type are
obtained by evaluating an attribute_reference for the Access or
Unchecked_Access attribute of an aliased view of an object or non-intrinsic
subprogram, or, in the case of a named access-to-object type, an allocator,
which returns an access value designating a newly created object (see 3.10.2).
by:
For each access type, there is a null access value designating no entity at
all. The null value of an access type is the default initial value of the type.
Other values of an access type are obtained by evaluating an
attribute_reference for the Access or Unchecked_Access attribute of an
aliased view of an object or non-intrinsic subprogram, or, in the case of an
access-to-object type, an allocator, which returns an access value
designating a newly created object (see 3.10.2).
Replace paragraph 14: [AI95-00231-01]
All subtypes of an access-to-subprogram type are constrained. The first subtype
of a type defined by an access_definition or an
access_to_object_definition is unconstrained if the designated subtype is
an unconstrained array or discriminated subtype; otherwise it is constrained.
by:
All subtypes of an access-to-subprogram type are constrained. The first subtype
of a type defined by an access_definition or an
access_to_object_definition is unconstrained if the designated subtype is
an unconstrained array or discriminated subtype; otherwise it is constrained.
The first subtype of a type defined by an access_type_definition excludes
the null value if a null_exclusion is present; otherwise, the first
subtype includes the null value.
A null_exclusion is only allowed in a subtype_indication whose
subtype_mark denotes an access subtype that includes a null value.
Replace paragraph 15: [AI95-00231-01]
A composite_constraint is compatible with an unconstrained access
subtype if it is compatible with the designated subtype. An access value
satisfies a composite_constraint of an access subtype if it equals the
null value of its type or if it designates an object whose value satisfies the
constraint.
by:
A composite_constraint is compatible with an unconstrained access
subtype if it is compatible with the designated subtype. A null_exclusion
is compatible with any access subtype that includes a null value. An
access value satisfies a composite_constraint of an access subtype if
it equals the null value of its type or if it designates an object whose value
satisfies the constraint. An access value satisifes a null_exclusion
imposed on an access subtype if it does not equal the null value of its type.
Replace paragraph 17: [AI95-00230-01]
The elaboration of an access_definition creates an anonymous general
access-to-variable type [(this happens as part of the initialization of an
access parameter or access discriminant)].
by:
The elaboration of an access_definition creates an anonymous general
access-to-variable type.
3.10.1 Incomplete Type Declarations
Replace paragraph 2: [AI95-00326-01]
incomplete_type_declaration ::= type defining_identifier [discriminant_part];
by:
incomplete_type_declaration ::= type defining_identifier [discriminant_part] [is tagged];
Replace paragraph 4: [AI95-00326-01]
If an incomplete_type_declaration has a known_discriminant_part, then
a full_type_declaration that completes it shall have a fully conforming
(explicit) known_discriminant_part (see 6.3.1). If an
incomplete_type_declaration has no discriminant_part (or an
unknown_discriminant_part), then a corresponding full_type_declaration
is nevertheless allowed to have discriminants, either explicitly, or inherited
via derivation.
by:
If an incomplete_type_declaration includes the reserved word tagged, then a
full_type_declaration that completes it shall declare a tagged type.
If an incomplete_type_declaration has a known_discriminant_part, then
a full_type_declaration that completes it shall have a fully conforming
(explicit) known_discriminant_part (see 6.3.1). If an
incomplete_type_declaration has no discriminant_part (or an
unknown_discriminant_part), then a corresponding full_type_declaration
is nevertheless allowed to have discriminants, either explicitly, or inherited
via derivation.
Replace paragraph 5: [AI95-00326-01]
The only allowed uses of a name that denotes an
incomplete_type_declaration are as follows:
by:
A name that denotes an incomplete view of a type may be used as follows:
Delete paragraph 7: [AI95-00326-01]
-
as the subtype_mark defining the subtype of a parameter or
result of an access_to_subprogram_definition;
Replace paragraph 8: [AI95-00326-01]
-
as the subtype_mark in an access_definition;
by:
-
as the subtype_mark in an access_definition.
If such a name denotes a tagged incomplete view, it may also be used:
-
as the subtype_mark defining the subtype of a parameter in a
formal_part;
Replace paragraph 9: [AI95-00326-01]
-
as the prefix of an attribute_reference whose
attribute_designator is Class; such an attribute_reference is
similarly restricted to the uses allowed here; when used in this way, the
corresponding full_type_declaration shall declare a tagged type, and the
attribute_reference shall occur in the same library unit as the
incomplete_type_declaration.
by:
-
as the prefix of an attribute_reference whose
attribute_designator is Class; such an attribute_reference is
restricted to the uses allowed here; it denotes a tagged incomplete view.
If such a name occurs within the list of declarative_items containing
the completion of the incomplete view, it may also be used:
-
as the subtype_mark defining the subtype of a parameter or result
of an access_to_subprogram_definition.
If any of the above uses occurs as part of the declaration of a primitive
subprogram of the incomplete view, and the declaration occurs immediately
within the private part of a package, then the completion of the incomplete
view shall also occur immediately within the private part; it may not be
deferred to the package body.
Replace paragraph 10: [AI95-00217-06; AI95-00326-01]
A dereference (whether implicit or explicit -- see 4.1) shall not be
of an incomplete type.
by:
A prefix shall not be of an incomplete view.
Replace paragraph 11: [AI95-00326-01]
An incomplete_type_declaration declares an incomplete type and its first
subtype; the first subtype is unconstrained if a known_discriminant_part
appears.
by:
An incomplete_type_declaration declares an incomplete view of a type,
and its first subtype; the first subtype is unconstrained if a
known_discriminant_part appears. If the incomplete_type_declaration
includes the reserved word tagged, it declares a tagged incomplete view.
An incomplete view of a type is a limited view of the type (see 7.5).
Given an access type A whose designated type T is an incomplete view,
a dereference of a value of type A also has this incomplete view
except when:
-
it occurs in the immediate scope of the completion of T, or
-
it occurs in the scope of a nonlimited_with_clause that mentions
a library package in whose visible part the completion of T is declared.
In these cases, the dereference has the full view of T.
3.10.2 Operations of Access Types
Replace paragraph 2: [AI95-00235-01]
For an attribute_reference with attribute_designator Access (or
Unchecked_Access -- see 13.10), the expected type shall be
a single access type; the prefix of such an attribute_reference
is never interpreted as an implicit_dereference. If the expected
type is an access-to-subprogram type, then the expected profile
of the prefix is the designated profile of the access type.
by:
For an attribute_reference with attribute_designator Access (or
Unchecked_Access -- see 13.10), the expected type shall be
a single access type A such that:
-
A is an access-to-object type with designated type D and the type of
the prefix is D'Class or is covered by D, or
-
A is an access-to-subprogram type whose designated profile is type
conformant with that of the prefix.
The prefix of such an attribute_reference is never interpreted as an
implicit_dereference or parameterless function_call (see 4.1.4).
The designated type or profile of the expected type of the
attribute_reference is the expected type or profile for the prefix.
Replace paragraph 12: [AI95-00230-01]
-
The accessibility level of the anonymous access type of an access
discriminant is the same as that of the containing object or associated
constrained subtype.
by:
-
The accessibility level of the anonymous access type defined by an
access_definition of an object_renaming_declaration is the same as
that of the renamed object (view).
-
The accessibility level of the anonymous access type of an access
discriminant specified for a limited type is the same as the
containing object or associated constrained subtype. For other
components having an anonymous access type, the accessibility level
of the access type is the same as the level of the containing
composite type.
Replace paragraph 13: [AI95-00254-01; AI95-00318-02]
-
The accessibility level of the anonymous access type of an access
parameter is the same as that of the view designated by the actual. If the
actual is an allocator, this is the accessibility level of the execution
of the called subprogram.
by:
-
The accessibility level of the anonymous access type of an access
parameter specifying an access-to-object type is the same as that of the view
designated by the actual. If the actual is an allocator, this is the
accessibility level of the execution of the called subprogram.
-
The accessibility level of the anonymous access type of an access
parameter specifying an access-to-subprogram type is infinite.
-
The accessibility level of the anonymous access type of an access
result type (see 6.5) is the same as that of the associated function or
access-to-subprogram type.
Replace paragraph 26: [AI95-00363-01]
-
The view shall not be a subcomponent that depends on discriminants of
a variable whose nominal subtype is unconstrained, unless this subtype is
indefinite, or the variable is aliased.
by:
-
The view shall not be a subcomponent that depends on discriminants of
a variable whose nominal subtype is unconstrained, unless this subtype is
indefinite, or the variable is constrained by its initial value.
Replace paragraph 27: [AI95-00363-01]
-
If A is a named access type and D is a tagged type, then the
type of the view shall be covered by D; if A is anonymous and D is
tagged, then the type of the view shall be either D'Class or a type
covered by D; if D is untagged, then the type of the view shall be
D, and A's designated subtype shall either statically match the
nominal subtype of the view or be discriminated and unconstrained;
by:
-
If A is a named access type and D is a tagged type, then the
type of the view shall be covered by D; if A is anonymous and D is
tagged, then the type of the view shall be either D'Class or a type
covered by D; if D is untagged, then the type of the view shall be
D, and either:
-
A's designated subtype shall statically match the nominal subtype
of the view; or
-
D shall be discriminated in its full view and unconstrained in any
partial view, and A's designated subtype shall be unconstrained.
Replace paragraph 32: [AI95-00229-01; AI95-00254-01]
P'Access yields an access value that designates the subprogram
denoted by P. The type of P'Access is an access-to-subprogram
type (S), as determined by the expected type. The accessibility
level of P shall not be statically deeper than that of S. In
addition to the places where Legality Rules normally apply (see
12.3), this rule applies also in the private part of an instance
of a generic unit. The profile of P shall be subtype-conformant
with the designated profile of S, and shall not be Intrinsic. If
the subprogram denoted by P is declared within a generic body, S
shall be declared within the generic body.
by:
P'Access yields an access value that designates the subprogram
denoted by P. The type of P'Access is an access-to-subprogram
type (S), as determined by the expected type. The accessibility
level of P shall not be statically deeper than that of S. In
addition to the places where Legality Rules normally apply (see
12.3), this rule applies also in the private part of an instance
of a generic unit. The profile of P shall be subtype-conformant
with the designated profile of S, and shall not be Intrinsic.
If the subprogram denoted by P is declared within a generic unit,
and the expression P'Access occurs within the body of that generic
unit or within the body of a generic unit declared within
the declarative region of the generic, then the ultimate ancestor
of S shall be either a non-formal type declared within the generic
unit or an anonymous access type of a access parameter.
Section 4: Names and Expressions
4.1.3 Selected Components
Insert after paragraph 9: [AI95-00252-01]
-
The prefix shall resolve to denote an object or value of some
task or protected type (after any implicit dereference). The selector_name
shall resolve to denote an entry_declaration or
subprogram_declaration occurring (implicitly or explicitly) within the
visible part of that type. The selected_component denotes the
corresponding entry, entry family, or protected subprogram.
the new paragraph:
-
A view of a subprogram whose first formal parameter is of a tagged
or is an access parameter whose designated type is tagged.
The prefix (after any implicit dereference) shall resolve to denote an
object or value of a specific tagged type T or class-wide type T'Class.
The selector_name shall resolve to denote a view of a subprogram declared
immediately within the region in which an ancestor of the type T is
declared. The first formal parameter of the subprogram shall be of type T,
or a class-wide type that covers T, or an access parameter designating one
of these types. The designator of the subprogram shall not be the same as
that of a component of the tagged type visible at the point of the
selected_component. The selected_component denotes a view of this
subprogram that omits the first formal parameter.
Insert after paragraph 13: [AI95-00252-01]
If the prefix does not denote a package, then it shall be a
direct_name or an expanded name, and it shall resolve to denote a program
unit (other than a package), the current instance of a type, a
block_statement, a loop_statement, or an accept_statement (in
the case of an accept_statement or