CVS difference for ai22s/ai22-0029-1.html

Differences between 1.2 and version 1.3
Log of other versions for file ai22s/ai22-0029-1.html

--- ai22s/ai22-0029-1.html	2022/06/24 04:08:54	1.2
+++ ai22s/ai22-0029-1.html	2022/10/29 04:38:05	1.3
@@ -1,28 +1,31 @@
-<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0029-1/04</title>
+<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0029-1/05</title>
 <style type="text/css">
 table td,table th{padding:0}
-.c10{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
+.c16{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
 P.head{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0; padding-top:0pt; color:#000000; font-size:14pt; padding-bottom:0pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15; orphans:2; widows:2; text-align:left; font-weight:
400; text-decoration:none; vertical-align:baseline; font-style:normal}
 H2.head{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0; padding-top:12pt; color:#000000; font-size:14pt; padding-bottom:6pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15; page-break-after:avoid; orphans:2; widows:2; tex
t-align:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
 P.inst{margin-bottom:0; margin-top:0; margin-left:18pt; margin-right:0; padding-top:9pt; color:#000000; font-size:12pt; padding-bottom:6pt; font-family:"Arial","Liberation Sans",sans-serif;line-height:1.15; orphans:2; widows:2; text-align:left; font-weigh
t:400; text-decoration:none; vertical-align:baseline; font-style:normal}
 P.word{margin-bottom:0; margin-top:0; margin-left:36pt; margin-right:0; padding-top:0pt; color:#000000; font-size:11pt; padding-bottom:3pt; font-family:"Times New Roman","Times",serif; line-height:1.15; orphans:2; widows:2; text-align:left; font-weight:40
0; text-decoration:none; vertical-align:baseline; font-style:normal}
-P.wrds{margin-bottom:0; margin-top:0; margin-left:36pt; margin-right:0; padding-top:0pt; color:#000000; font-size:11pt; padding-bottom:12pt; font-family:"Times New Roman","Times",serif; line-height:1.15; orphans:2; widows:2; text-align:left; font-weight:4
00; text-decoration:none; vertical-align:baseline; font-style:normal}
 UL.wbl{margin-bottom:0; margin-top:0; margin-left:42pt; margin-right:0; padding-top:0pt; color:#000000; font-size:11pt; padding-bottom:3pt; font-family:"Times New Roman","Times",serif; line-height:1.15; orphans:2; widows:2; text-align:left; font-weight:40
0; text-decoration:none; vertical-align:baseline; font-style:normal; list-style: disc outside}
+P.wind{margin-bottom:0; margin-top:0; margin-left:54pt; margin-right:0; padding-top:0pt; color:#000000; font-size:11pt; padding-bottom:3pt; font-family:"Times New Roman","Times",serif; line-height:1.15; orphans:2; widows:2; text-align:left; font-weight:40
0; text-decoration:none; vertical-align:baseline; font-style:normal}
 P.text{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0; padding-top:0pt; color:#000000; font-size:11pt; padding-bottom:0pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15; text-align:left; font-weight:400; text-decoration:
none; vertical-align:baseline; font-style:normal}
 P.txts{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0; padding-top:0pt; color:#000000; font-size:11pt; padding-bottom:11pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15; text-align:left; font-weight:400; text-decoration
:none; vertical-align:baseline; font-style:normal}
+UL.bull{margin-bottom:0; margin-top:0; margin-left:12pt; margin-right:0; padding-top:0pt; color:#000000; font-size:11pt; padding-bottom:3pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15;text-align:left; font-weight:400; text-decorati
on:none; vertical-align:baseline; font-style:normal; list-style: disc outside}
 P.from{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0; padding-top:0pt; color:#000000; font-size:10pt; padding-bottom:0pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15; orphans:2; widows:2; text-align:left; font-weight:
400; text-decoration:none; vertical-align:baseline; font-style:none}
 P.time{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0; padding-top:0pt; color:#000000; font-size:9pt; padding-bottom:9pt; font-family:"Arial","Liberation Sans",sans-serif; line-height:1.15; orphans:2; widows:2; text-align:left; font-weight:4
00; text-decoration:none; vertical-align:baseline; font-style:italic}
 SPAN.name{font-family:"Lucida Calligraphy",cursive; font-style:normal}
 SPAN.ins{color:#005500}
 SPAN.del{color:#880000}
-P.a1{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0;color:#000000;font-size:26pt;font-family:"Arial","Liberation Sans",sans-serif; padding-top:0pt; padding-bottom:3pt; line-height:1.15; page-break-after:avoid; orphans:2; widows:2; text-align
:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
+SPAN.ntrm{font-family:"Arial","Liberation Sans",sans-serif}
+P.a3{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0;color:#000000;font-size:26pt;font-family:"Arial","Liberation Sans",sans-serif; padding-top:0pt; padding-bottom:3pt; line-height:1.15; page-break-after:avoid; orphans:2; widows:2; text-align
:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
 </style>
-</head><body class="c10"><p class="a1">AI22-0029-1</p>
+</head><body class="c16 doc-content"><p class="a3">AI22-0029-1</p>
 <p class="head">!standard 13.3(75.1/3) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 22-06-23 &nbsp;AI22-0029-1/04</p>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 22-10-24 &nbsp;AI22-0029-1/05</p>
 <p class="head">!standard 13.3(76)</p>
 <p class="head">!class binding interpretation 22-01-24</p>
 <p class="head">!status Corrigendum 1-2022 22-06-23</p>
+<p class="head">!status work item 22-10-18</p>
 <p class="head">!status ARG Approved 14-0-0 &nbsp;22-06-23</p>
 <p class="head">!status work item 22-01-24</p>
 <p class="head">!status received 21-12-31</p>
@@ -61,30 +64,28 @@
 <p class="text">(See Summary.)</p>
 <h2 class="head">!wording</h2>
 <p class="inst">Replace 13.3(75.1/3):</p>
-
 <p class="word">If a user-specified external tag S&#39;External_Tag is the same as
 T&#39;External_Tag for some other tagged type declared by a different declaration in the partition,
-Program_Error is raised by the elaboration of the attribute_definition_clause.</p>
-<p class="inst">with</p>
-
-<p class="word">If both S and T exist in a given partition and S&rsquo;External_Tag is the same as
-T&rsquo;External_Tag, Program_Error is raised at one or more of the following places:</p>
-<ul class="wbl"><li>an attribute_definition_clause for S&rsquo;External_Tag;</li>
-<li>an attribute_definition_clause for T&rsquo;External_Tag;</li>
-<li>the freezing point of S;</li>
-<li>the freezing point of T.</li>
+Program_Error is raised by the elaboration of the
+<span class="ntrm">attribute_definition_clause</span>.</p>
+<p class="inst">with:</p>
+<p class="word">If two tagged types X and Y both exist in a given partition, X and Y are declared
+by different declarations, and X&rsquo;External_Tag is the same as Y&rsquo;External_Tag,
+Program_Error is raised at one or more of the following places:</p>
+<ul class="wbl"><li>an <span class="ntrm">attribute_definition_clause</span> for
+X&rsquo;External_Tag;</li>
+<li>an <span class="ntrm">attribute_definition_clause</span> for Y&rsquo;External_Tag;</li>
+<li>the freezing point of X;</li>
+<li>the freezing point of Y.</li>
 </ul>
-<p class="wrds">AARM Reason: The intent is to allow two different implementations here: a fully
+<p class="wind">AARM Reason: The intent is to allow two different implementations here: a fully
 static implementation with bind-time construction of an external tag table, and a runtime scheme
 where the elaboration of a type registers the external tag with a manager in the runtime.</p>
-
 <p class="inst">Replace AARM 13.3(75.e/3) with: [still as part of the Ramification]</p>
-
 <p class="word">This check is on a *pair* of types, and the exception can be raised at any of the
 prescribed points. Furthermore, there is a permission (below) that permits the exception to be
 raised upon elaboration of either type before the other one exists.</p>
 <p class="inst">Modify 13.3(76):</p>
-
 <p class="word">In an implementation, the default external tag for each specific tagged type
 declared in a partition shall be distinct, so long as the type is declared <span class="ins">{by a
 distinct declaration and is }</span>outside an instance of a generic body. If the compilation unit
@@ -95,20 +96,22 @@
 between building the two different partitions that include it, the compilation unit is considered
 the same in the two partitions.</p>
 <p class="inst">Add after AARM 13.3(76.e): [still as part of the Ramification]</p>
-
 <p class="word">If a single type declaration is elaborated multiple times, the default external
 tags need not be different. Note that if such identical tags are used for two different
 elaborations of the same declaration, they cannot raise Program_Error; the check that requires
 different External_Tags specifically excludes types that come from the same declaration.</p>
 <p class="inst">Modify 13.3(76.1/3):</p>
-<p class="word">If a user-specified external tag S&#39;External_Tag is the same as
-T&#39;External_Tag for some other tagged type declared by a different declaration in the partition,
-<span class="del">[the partition may be rejected]</span><span class="ins">{an implementation may
-disallow the partition, or raise Program_Error upon the elaboration of either type}</span>.</p>
+<p class="word">If a user-specified external tag
+<span class="ins">{X}</span><span class="del">[S]</span>&#39;External_Tag is the same as
+<span class="ins">{Y}</span><span class="del">[T]</span>&#39;External_Tag for some other tagged
+type declared by a different declaration in the partition, <span class="del">[the partition may be
+rejected]</span><span class="ins">{an implementation may disallow the partition, or raise
+Program_Error upon the elaboration of either type}</span>.</p>
 <h2 class="head">!discussion</h2>
 <p class="txts">The only requirement for this check is that one of the types has a user-specified
-External_Tag. The check is defined symmetrically so that it doesn&#39;t matter which type is
-elaborated first.</p>
+External_Tag (if the External_Tags are chosen by default, they are required to be chosen so that
+this check cannot fail). The check is defined symmetrically so that it doesn&#39;t matter which
+type is elaborated first.</p>
 
 <p class="text">Types are created when they are elaborated (3.2.1(11)), and cease to exist when
 their master is left (7.6.1(11/3)). The required check can only be made when both types exist, but
@@ -129,8 +132,47 @@
 to usefully meet all of 13.3(76) for a nested type declaration that could be elaborated again by a
 call from another task.]</p>
 
-<p class="text">As such, we have eliminated the requirement that the default external tags are
+<p class="txts">As such, we have eliminated the requirement that the default external tags are
 different for multiple elaborations of the same declaration.</p>
+
+<p class="txts">----</p>
+
+<p class="txts">It is important that Program_Error never be raised for tagged types that have an
+External_Tag value chosen by default. Such types may very well never have any uses of an
+External_Tag, and it would be very unfriendly for an implementation to terminate the program for a
+problem with a feature that is not being used. This implies that it is important for
+implementations that use a registration scheme and that make the check when a tagged type is
+registered to be able to turn the External_Tag check off for tags that come from different
+elaborations of the same declaration.</p>
+
+<p class="txts">We considered making the check depend instead on whether one of the External_Tags
+are user-specified. (If neither are user-specified, then no check would be made, since there would
+only be a problem for a buggy implementation). The Implementation Permission is already worded that
+way (so there is only a permission to disallow a partition when there is at least one user-defined
+External_Tag; a partition that never uses External_Tags can never be rejected).</p>
+
+<p class="txts">This would mean that multiple elaborations of a type declaration with a
+user-specified External_Tag would necessarily raise Program_Error. This would make some sense,
+since one can assume that if someone is specifying the value of an External_Tag, that is being done
+in order that streaming is certain to be compatible with another related program. Having types that
+are ambiguous in such streaming is not likely to work.</p>
+
+<p class="txts">The implementation of such a dynamic check would seem to be easier as well, since
+it would only require one additional bit passed to a tagged type manager to determine whether or
+not the tag comes from a user-specified External_Tag. Keeping track of which declaration a tagged
+type originated from would clearly take a more complex definition.</p>
+
+<p class="text">We didn&rsquo;t define the check this way for two reasons:</p>
+<ul class="bull"><li>The existing wording already had a different declaration exception. For fixing
+an omission, it seems valuable to avoid making unnecessary changes (even if they seem like an
+improvement);</li>
+<li>For an implementation that has a split tag with static and dynamic parts, the static part is
+going to be associated with exactly one declaration, and thus it can be used to identify the
+declaration with no added data passed to a tagged type manager. It&rsquo;s likely that some
+implementations are already using this property to implement the existing check. Changing the rule
+would make even more work for those implementations, while the intent of this AI is to make it
+easier to make this check and to allow additional places for it to be made.</li>
+</ul>
 <h2 class="head">!ACATS test</h2>
 <p class="text">ACATS tests CD30013 and CD30014 test this rule. One could imagine more complex</p>
 <p class="text">tests that try various corner cases of this rule (such as allowing multiple</p>
@@ -662,5 +704,10 @@
 <p class="txts">An AARM note sounds good to me.</p>
 
 <p class="txts">****************************************************************</p>
+
+<p class="txts">Version /05 of this AI includes responses to ARG Github Issue #28
+(https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/28).</p>
+
+<p class="txts">***************************************************************</p>
 
 </body></html> 

Questions? Ask the ACAA Technical Agent