CVS difference for ais/ai-00279.txt

Differences between 1.8 and version 1.9
Log of other versions for file ais/ai-00279.txt

--- ais/ai-00279.txt	2004/09/10 00:43:33	1.8
+++ ais/ai-00279.txt	2004/10/05 22:49:09	1.9
@@ -1,8 +1,12 @@
-!standard  13.13.02 (34)                              04-09-08  AI95-00279/05
+!standard  13.13.02 (34)                              04-09-24  AI95-00279/06
 !standard  3.09 (12)
+!standard  3.09 (26)
 !standard  13.13.02 (36/1)
+!standard  13.13.02 (38)
 !standard  13.14 (19/1)
 !class binding interpretation 01-12-21
+!status Amendment 200Y 04-09-24
+!status ARG Approved 7-0-2  04-09-18
 !status work item 01-12-21
 !status received 01-11-08
 !qualifier Omission
@@ -12,7 +16,7 @@
 !summary
 
 If Ada.Tags.Internal_Tag or Ada.Tags.Descendant_Tag is given a string
-identifying a library-level type in which has not yet been frozen, Tag_Error
+identifying a library-level type which has not yet been frozen, Tag_Error
 is raised.
 
 If the tag identified by T'Class'Input identifies a type:
@@ -48,39 +52,46 @@
 AI-344):
 
 Tag_Error is also raised if the specific type identified is a library-level
-type whose tag has not yet been elaborated.
+type whose tag has not yet been created.
 
+Add "or external tag" to 3.9(26), so that the string parameters of Internal_Tag
+and Descendant_Tag are clearly covered.
+
 Add to 13.13.2(34):
 
-If the specific type identifed by the internal tag is not covered by T'Class
+If the specific type identified by the internal tag is not covered by T'Class
 or is abstract, Constraint_Error is raised.
 
-Add after 13.13.2(36/1):
+Add after 13.13.2(36/1) (If AI-344 is approved, replace Internal_Tag by
+Descendant_Tag in the wording below):
 
 Erroneous Execution
 
-If the internal tag provided to T'Class'Input identifies a specific type whose
-tag has not been elaborated, or does not exist in the partition at the time of
-the call, execution is erroneous.
+If the internal tag returned by Internal_Tag to T'Class'Input identifies a
+specific type whose tag has not been created, or does not exist in the
+partition at the time of the call, execution is erroneous.
 
 AARM Note
 
-The definition of Descendant_Tag prevents such a tag from being provided to
+The definition of Internal_Tag prevents such a tag from being provided to
 T'Class'Input if T is a library-level type. However, this is needed for nested
-tagged types and potentially for user-provided 'Tag_Read routines.
+tagged types.
+
+Add after 13.13.2(38):
 
+33 If the prefix subtype S of function S'Class'Input is a library-level
+subtype, then reading a value of a type which has not yet been frozen with the
+S'Class'Input function will always raise Tag_Error; execution cannot be
+erroneous.
+
 Add after 13.14(19/1):
 
 Dynamic Semantics
 
-The tag of a tagged type T is elaborated at the point where T is frozen.
+The tag of a tagged type T is created at the point where T is frozen.
 
 !discussion
 
-This AI assumes that AI-344 is approved and included in the Amendment.
-Version /04 contains the appropriate wording if AI-344 is not included
-in the Amendment.
-
 The exact wording of 13.13.2(34/2) is "...dispatches to the subprogram denoted
 by the Input attribute of the specific type identified by the internal tag;
 returns that result.". Reading this strictly, we would expect the appropriate
@@ -159,17 +170,17 @@
 there are no erroneous uses of T'Class'Input. For this purpose, requiring
 checks for library-level types is sufficient. If the user insures that all
 calls to T'Class'Input have a library-level type as the prefix, then no
-erroneousness can occur: either the tag has been elaborated, or Tag_Error is
+erroneousness can occur: either the tag has been created, or Tag_Error is
 raised if the tag is prematurely read. If the tag of a more nested descendant
 type is read, Descendant_Tag is defined to raise Tag_Error (whether or not the
 type exists currently). This can be checked by a static analysis tool without
 the need to simulate control flows.
 
-Therefore, we define that a tag is elaborated at the freezing
-point of the tagged type, and then adopt the rule that Descendant_Tag must
-raise Tag_Error if the string identifies a library-level type whose tag
-has not been elaborated. This rule allows a single Boolean value to be
-used in a static implementation, and does not have any race conditions.
+Therefore, we define that a tag is created at the freezing point of the tagged
+type, and then adopt the rule that Descendant_Tag must raise Tag_Error if the
+string identifies a library-level type whose tag has not been created. This
+rule allows a single Boolean value to be used in a static implementation, and
+does not have any race conditions.
 
 The Internal_Tag function also has this rule, as it eliminate erroneousness
 from user-written routines (including instances of
@@ -209,17 +220,21 @@
 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 elaborated.
+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 elaborated.
 
+!corrigendum 3.09(26)
 
+@drepl
+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.
+@dby
+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.
+
+
 !corrigendum 13.13.02(34)
 
 @drepl
@@ -231,11 +246,11 @@
 @dby
 @xindent<First reads the external tag from @i<Stream> and determines the
 corresponding internal tag (by calling
-Tags.Descendant_Tag(String'Input(@i<Stream>, @i<S>'Tag)) -- see 3.9) and then
-dispatches to the subprogram denoted by the Input attribute of the specific
-type identified by the internal tag; returns that result. If the specific type
-identified by the internal tag is not covered by T'Class or is abstract,
-Constraint_Error is raised.>
+Tags.Internal_Tag(String'Input(@i<Stream>)) -- see 3.9) and then dispatches to
+the subprogram denoted by the Input attribute of the specific type identified
+by the internal tag; returns that result. If the specific type identified by
+the internal tag is not covered by T'Class or is abstract, Constraint_Error is
+raised.>
 
 !corrigendum 13.13.02(36/1)
 
@@ -252,10 +267,21 @@
 function.
 @dinst
 @i<@s8<Erroneous Execution>>
+
+If the internal tag returned by Internal_Tag to T'Class'Input identifies a
+specific type whose tag has not been created, or does not exist in the
+partition at the time of the call, execution is erroneous.
 
-If the internal tag provided to T'Class'Input identifies a specific type whose
-tag has not been elaborated, or does not exist in the partition at
-the time of the call, execution is erroneous.
+!corrigendum 13.13.2(38)
+
+@dinsa
+@xindent<@s9<32 User-specified attributes of S'Class are not inherited by other
+class-wide types descended from S.>>
+@dinst
+@xindent<@s9<33 If the prefix subtype S of function S'Class'Input is a library-level
+subtype, then reading a value of a type which has not yet been frozen with the
+S'Class'Input function will always raise Tag_Error; execution cannot be
+erroneous.>>
 
 !corrigendum 13.14(19/1)
 
@@ -265,7 +291,7 @@
 @dinst
 @i<@s8<Dynamic Semantics>>
 
-The tag (see 3.9) of a tagged type T is elaborated at the point where T is
+The tag (see 3.9) of a tagged type T is created at the point where T is
 frozen.
 
 !ACATS test

Questions? Ask the ACAA Technical Agent