CVS difference for ais/ai-00279.txt

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

--- ais/ai-00279.txt	2003/03/04 04:56:22	1.6
+++ ais/ai-00279.txt	2004/02/07 01:11:23	1.7
@@ -1,6 +1,7 @@
-!standard  13.13.02 (34)                              03-02-20  AI95-00279/03
+!standard  13.13.02 (34)                              04-02-06  AI95-00279/04
 !standard  3.09 (12)
 !standard  13.13.02 (36/1)
+!standard  13.14 (19/1)
 !class binding interpretation 01-12-21
 !status work item 01-12-21
 !status received 01-11-08
@@ -10,8 +11,8 @@
 !subject Tag read by T'Class'Input
 !summary
 
-If Ada.Tags.Internal_Tag is given a string identifying a type in the partition
-which never has been frozen, Tag_Error is raised.
+If Ada.Tags.Internal_Tag is given a string identifying a library-level type in
+which has not yet been frozen, Tag_Error is raised.
 
 If the tag identified by T'Class'Input identifies a type:
    -- that is the tag of some type not covered by T'Class, Constraint_Error
@@ -27,7 +28,7 @@
 T'Class'Input reads in a string, maps it to a tag by calling Tags.Internal_Tag,
 and dispatches accordingly.
 
-What happens if the the call to Tags.Internal_Tag yields either
+What happens if the call to Tags.Internal_Tag yields either
    a) the tag of some type not covered by T'Class
 or
    b) the tag of an abstract type
@@ -45,7 +46,7 @@
 Add to 3.9(12):
 
 Tag_Error is also raised if the specific type identified is a library-level
-type whose freezing point has not yet been elaborated.
+type whose tag has not yet been elaborated.
 
 Add to 13.13.2(34):
 
@@ -60,13 +61,18 @@
 freezing point has not been elaborated, or does not exist in the partition at
 the time of the call, execution is erroneous.
 
-
 AARM Note
 
 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.
 
+Add after 13.14(19/1):
+
+Dynamic Semantics
+
+The tag of a tagged type T is elaborated at the point where T is frozen.
+
 !discussion
 
 The exact wording of 13.13.2(34) is "...dispatches to the subprogram denoted
@@ -124,9 +130,10 @@
 tasks at the same time. In this case, a single Boolean does not work.
 
 However, nested tagged types are exceedingly rare. We do not lose much by not
-covering them. Therefore, we adopt the rule that Internal_Tag must raise
-Tag_Error if the string identifies a library-level type whose freezing
-point has not been elaborated. This rule allows a single Boolean value to be
+covering them. Therefore, we define that a tag is elaborated at the freezing
+point of the tagged type, and then adopt the rule that Internal_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, and does not have any race conditions.
 
 With this rule, the erroneous case can only occur for nested tagged types (that
@@ -141,6 +148,22 @@
 be a problem if it is derived from a type which now exists (presumably just
 below the call to T'Class'Input).
 
+
+We considered simplifying the check to make it easier to implement. The
+initial suggestion was to have an implementation permission for Internal_Tag
+to raise Tag_Error if the main program has not yet started execution. This
+is easy to implement, and has the added benefit (when used) of insuring that
+the problem is caught early. However, used alone, it reintroduces the hole,
+because an implementation not taking advantage of the permission could still
+return the tag of an unfrozen type.
+
+Alternatively, we could simply always require this behavior. That would
+simplify the wording. But it also would mean that any use of T'Class'Input
+during elaboration time would raise Tag_Error (whether or not a problem is
+possible). That would mean that T'Class'Input could not be used to read
+configuration files and the like. That seems like too strong of a restriction.
+
+
 !corrigendum 3.09(12)
 
 @drepl
@@ -151,7 +174,7 @@
 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. Tag_Error is also raised if the
-specific type identified is a library-level type whose freezing point has not
+specific type identified is a library-level type whose tag has not
 yet been elaborated.
 
 !corrigendum 13.13.02(34)
@@ -187,8 +210,19 @@
 @i<@s8<Erroneous Execution>>
 
 If the internal tag provided to T'Class'Input identifies a specific type whose
-freezing point has not been elaborated, or does not exist in the partition at
+tag has not been elaborated, or does not exist in the partition at
 the time of the call, execution is erroneous.
+
+!corrigendum 13.14(19/1)
+
+@dinsa
+An operational or representation item that directly specifies an aspect of an
+entity shall appear before the entity is frozen (see 13.1).
+@dinst
+@i<@s8<Dynamic Semantics>>
+
+The tag (see 3.9) of a tagged type T is elaborated at the point where T is
+frozen.
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent