CVS difference for ai12s/cor15con.txt

Differences between 1.1 and version 1.2
Log of other versions for file ai12s/cor15con.txt

--- ai12s/cor15con.txt	2013/12/07 05:35:19	1.1
+++ ai12s/cor15con.txt	2014/01/05 04:25:25	1.2
@@ -5,6 +5,136 @@
 !comment be changed for a new Corrigendum or Amendment.
 !comment The paragraphs must be in sorted order!!
 
+!corrigendum 3.2.4(31/3)
+!AI-0054-2
+!AI-0071-1
+
+@drepl
+@xindent<On every subtype conversion, the predicate of the target subtype is
+evaluated, and a check is performed that the predicate is True. This includes all
+parameter passing, except for certain parameters passed by reference, which
+are covered by the following rule: After normal completion and leaving of a
+subprogram, for each @b<in out> or @b<out> parameter that is passed by reference, the
+predicate of the subtype of the actual is evaluated, and a check is performed that
+the predicate is True. For an object created by an @fa<object_declaration> with no
+explicit initialization @fa<expression>, or by an uninitialized @fa<allocator>,
+if any subcomponents have @fa<default_expression>s, the predicate of
+the nominal subtype of the created object is evaluated, and a
+check is performed that the predicate is True. Assertions.Assertion_Error is raised
+if any of these checks fail.>
+@dby
+@xindent<On every subtype conversion, a check is performed that the operand
+satisfies the predicates of the target subtype. This includes all
+parameter passing, except for certain parameters passed by reference, which
+are covered by the following rule: After normal completion and leaving of a
+subprogram, for each @b<in out> or @b<out> parameter that is passed by reference,
+a check is performed that the value of the parameter satisfies the predicates
+of the subtype of the actual. For an object created by an @fa<object_declaration>
+with no explicit initialization @fa<expression>, or by an uninitialized
+@fa<allocator>, if any subcomponents have @fa<default_expression>s, a check
+is performed that the value of the created object satisfies the predicates of
+the nominal subtype.>
+
+@xindent<If any of the predicate checks fail, Assertion_Error is raised, unless the
+subtype whose directly-specified predicate aspect evaluated to False
+also has a directly-specified Predicate_Failure aspect. In that case, the
+specified Predicate_Failure @fa<expression> is evaluated; if the evaluation
+of the Predicate_Failure @fa<expression> propagates an exception occurrence,
+then this occurrence is propagated for the failure of the predicate
+check; otherwise, Assertion_Error is raised, with an associated message
+string defined by the value of the Predicate_Failure @fa<expression>.
+In the absence of such a Predicate_Failure aspect, an implementation-defined
+message string is associated with the Assertion_Error exception.>
+
+!corrigendum 3.2.4(35/3)
+!AI-0054-2
+!AI-0071-1
+
+@dinsa
+@xindent<@s9<6  A Static_Predicate, like a constraint, always remains True for all
+objects of the subtype, except in the case of uninitialized variables and
+other invalid values. A Dynamic_Predicate, on the other hand, is checked as
+specified above, but can become False at other times. For example, the
+predicate of a record subtype is not checked when a subcomponent is modified.>>
+@dinss
+@xindent<@s9<7  No predicates apply to the base subtype of a scalar type;
+every value of a scalar type @i<T> is considered to satisfy the
+predicates of @i<T>'Base.>>
+
+@xindent<@s9<8  Predicate_Failure @fa<expression>s are never evaluated during
+the evaluation of a membership test (see 4.5.2) or Valid attribute
+(see 13.9.2).>>
+
+@xindent<@s9<9  A Predicate_Failure @fa<expression> can be a
+@fa<raise_expression> (see 11.3).>>
+
+@s8<@i<Examples>>
+
+@xcode<@b<subtype> Basic_Letter @b<is> Character -- @ft<@I<See A.3.2 for "basic letter".>>
+   @b<with> Static_Predicate =@> Basic_Letter @b<in> 'A'..'Z' | 'a'..'z' | '@unicode<198>' | '@unicode<230>' | '@unicode<208>' | '@unicode<240>' | '@unicode<222>' | '@unicode<254>' | '@unicode<223>';>
+
+@xcode<@b<subtype> Even_Integer @b<is> Integer
+   @b<with> Dynamic_Predicate =@> Even_Integer @b<mod> 2 = 0,
+        Predicate_Failure =@> "Even_Integer must be a multiple of 2";>
+
+@i<Text_IO (see A.10.1) could have used predicates to describe some common
+exceptional conditions as follows:>
+
+@xcode<@b<with> Ada.IO_Exceptions;
+@b<package> Ada.Text_IO @b<is>>
+
+@xcode<   @b<type> File_Type @b<is limited private>;>
+
+@xcode<   @b<subtype> Open_File_Type @b<is> File_Type
+      @b<with> Dynamic_Predicate =@> Is_Open (Open_File_Type),
+           Predicate_Failure =@> @b<raise> Status_Error @b<with> "File not open";
+   @b<subtype> Input_File_Type @b<is> Open_File_Type
+      @b<with> Dynamic_Predicate =@> Mode (Input_File_Type) = In_File,
+           Predicate_Failure =@> @b<raise> Mode_Error @b<with> "Cannot read file: " &
+              Name (Input_File_Type);
+   @b<subtype> Output_File_Type @b<is> Open_File_Type
+      @b<with> Dynamic_Predicate =@> Mode (Output_File_Type) /= In_File,
+           Predicate_Failure =@> @b<raise> Mode_Error @b<with> "Cannot write file: " &
+              Name (Output_File_Type);>
+
+@xcode<   ...>
+
+@xcode<   @b<function> Mode (File : @b<in> Open_File_Type) @b<return> File_Mode;
+   @b<function> Name (File : @b<in> Open_File_Type) @b<return> String;
+   @b<function> Form (File : @b<in> Open_File_Type) @b<return> String;>
+
+@xcode<   ...>
+
+@xcode<   @b<procedure> Get (File : @b<in> Input_File_Type; Item : @b<out> Character);>
+
+@xcode<   @b<procedure> Put (File : @b<in> Output_File_Type; Item : @b<in> Character);>
+
+@xcode<   ...>
+
+@xcode<   -- @ft<@I<Similarly for all of the other input and output subprograms.>>>
+
+!corrigendum 3.10.2(7/3)
+!AI-0067-1
+!AI-0089-1
+
+@drepl
+@xbullet<An entity or view defined by a declaration and created as part of
+its elaboration has the same accessibility
+level as the innermost master of the declaration
+except in the cases of renaming and derived access types described below.
+Other than for an explicitly aliased parameter, a formal parameter of a
+callable entity has the same accessibility level as the master representing
+the invocation of the entity.>
+@dby
+@xbullet<An entity or view defined by a declaration and created as part of
+its elaboration has the same accessibility
+level as the innermost master of the declaration
+except in the cases of renaming and derived access types described below.
+Other than for an explicitly aliased parameter of a function or generic function,
+a formal parameter of a callable entity has the same accessibility level as the
+master representing the invocation of the entity.>
+
+
 !corrigendum 4.4(3/3)
 !AI-0022-1
 !AI-0039-1
@@ -19,7 +149,69 @@
        | @i<tested_>simple_expression [>@ft<@b<not>>@fa<] >@ft<@b<in>>@fa< membership_choice_list
        | raise_expression>>
 
+!corrigendum 4.5.2(29/3)
+!AI-0039-1
+!AI-0071-1
 
+@drepl
+@xbullet<The @fa<membership_choice> is a @fa<subtype_mark>, the tested type is scalar,
+the value of the @fa<simple_expression> belongs to the range of the named subtype, and
+the predicate of the named subtype evaluates to True.>
+@dby
+@xbullet<The @fa<membership_choice> is a @fa<subtype_mark>, the tested type is scalar,
+the value of the @i<tested_>@fa<simple_expression> belongs to the range of the named
+subtype, and the value satisfies the predicates of the named subtype.>
+
+!corrigendum 4.5.2(30/3)
+!AI-0039-1
+!AI-0071-1
+
+@drepl
+@xbullet<The @fa<membership_choice> is a @fa<subtype_mark>, the tested type is not
+scalar, the value of the @fa<simple_expression> satisfies any
+constraints of the named subtype, the predicate of the named subtype
+evaluates to True, and:>
+@dby
+@xbullet<The @fa<membership_choice> is a @fa<subtype_mark>, the tested type is not
+scalar, the value of the @i<tested_>@fa<simple_expression> satisfies any
+constraints of the named subtype, the value satisfies the predicates of the named
+subtype, and:>
+
+!corrigendum 7.3.2(19/3)
+!AI-0042-1
+!AI-0044-1
+
+@drepl
+@xinbull<has a result with a part of type @i<T>, or one or more
+parameters with a part of type @i<T>, or an access to variable
+parameter whose designated type has a part of type @i<T>.>
+@dby
+@xinbull<and either:>
+
+@xi2bull<has a result with a part of type @i<T>, or>
+
+@xi2bull<has one or more @b<out> or @b<in out> parameters with a part of type
+@i<T>, or>
+
+@xi2bull<has an access-to-object parameter whose designated type has a part
+of type @i<T>, or>
+
+@xi2bull<is a procedure or entry that has an @b<in> parameter with a part of
+type @i<T>,>
+
+@xinbull<and either:>
+
+@xi2bull<@i<T> is a private type or a private extension and the subprogram
+or entry is visible outside the immediate scope of type @i<T> or
+overrides an inherited operation that is visible outside the
+immediate scope of @i<T>, or>
+
+@xi2bull<@i<T> is a record extension and the subprogram or entry is a
+primitive operation that corresponds to a visible operation of a private
+or private extension ancestor to which the same (class-wide)
+invariant applies.>
+
+
 !corrigendum 11.3(4/2)
 !AI-0022-1
 !AI-0062-1
@@ -46,3 +238,31 @@
 1  If the evaluation of a @i<string_>@fa<expression> raises an exception, that
 exception is propagated rather than the one denoted by the @i<exception_>@fa<name>
 of the @fa<raise_statement> or @fa<raise_expression>.>>
+
+
+!corrigendum E.2.2(17/2)
+!AI-0076-1
+!AI-0085-1
+
+@drepl
+@xbullet<The Storage_Pool attribute is not defined for a remote
+access-to-class-wide type; the expected type for an @fa<allocator> shall not be
+a remote access-to-class-wide type. A remote access-to-class-wide type shall
+not be an actual parameter for a generic formal access type. The Storage_Size
+attribute of a remote access-to-class-wide type yields 0; it is not allowed in
+an @fa<attribute_definition_clause>.>
+@dby
+@xbullet<The Storage_Pool attribute is not defined for a remote
+access-to-class-wide type; the expected type for an @fa<allocator> shall not be
+a remote access-to-class-wide type. A remote access-to-class-wide type shall
+not be an actual parameter for a generic formal access type. The Storage_Size
+attribute of a remote access-to-class-wide type yields 0. The Storage_Pool and
+Storage_Size aspects shall not be specified for a remote access-to-class-wide
+type.>
+
+@s8<@i<Erroneous Execution>>
+
+Execution is erroneous if some operation (other than the initialization
+or finalization of the object) modifies the value of a
+constant object declared in the visible part of a remote types package.
+

Questions? Ask the ACAA Technical Agent