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

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

--- ai22s/ai22-0047-1.html	2022/09/03 05:35:45	1.1
+++ ai22s/ai22-0047-1.html	2022/09/10 09:05:14	1.2
@@ -1,12 +1,13 @@
-<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0047-1/01</title>
+<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0047-1/02</title>
 <style type="text/css">
 table td,table th{padding:0}
-.c9{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#000000;border-top-width:0pt;border-right-width:0pt;border-left-color:#000000;vertical-align:top;border-right-color:#000000;border-left-width:0pt;border-top-style:solid;background-co
lor:#f0f0f0;border-left-style:solid;border-bottom-width:0pt;width:468pt;border-top-color:#000000;border-bottom-style:solid}
-.c28{text-decoration-skip-ink:none;-webkit-text-decoration-skip:none;color:#1155cc;text-decoration:underline}
-.c26{border-spacing:0;border-collapse:collapse;margin-right:auto}
-.c2{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
-.c18{color:inherit;text-decoration:inherit}
-.c13{height:0pt}
+.c21{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#000000;border-top-width:0pt;border-right-width:0pt;border-left-color:#000000;vertical-align:top;border-right-color:#000000;border-left-width:0pt;border-top-style:solid;background-c
olor:#f0f0f0;border-left-style:solid;border-bottom-width:0pt;width:468pt;border-top-color:#000000;border-bottom-style:solid}
+.c20{border-spacing:0;border-collapse:collapse;margin-right:auto}
+.c17{text-decoration-skip-ink:none;-webkit-text-decoration-skip:none;color:#1155cc;text-decoration:underline}
+.c25{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
+.c10{color:inherit;text-decoration:inherit}
+.c11{height:0pt}
+.c16{font-size:12pt}
 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}
@@ -18,20 +19,21 @@
 P.inds{margin-bottom:0; margin-top:0; margin-left:24pt; 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-decorat
ion:none; vertical-align:baseline; font-style:normal}
 SPAN.del{color:#880000}
 P.a0{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}
-P.a19{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0;color:#444444;font-size:11pt;font-family:"Courier New",monospace; padding-top:0pt; padding-bottom:0pt; line-height:1.15; text-align:left; background-color:#f0f0f0; font-weight:400}
-SPAN.a20{color:#880000; font-weight:700}
-SPAN.a21{color:#bc6060}
-SPAN.a22{text-decoration:none; vertical-align:baseline;font-style:normal}
-SPAN.a23{color:#888888}
-SPAN.a24{font-size:12pt; font-family:"Times New Roman","Times",serif}
+P.a18{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0;color:#444444;font-size:11pt;font-family:"Courier New",monospace; padding-top:0pt; padding-bottom:0pt; line-height:1.15; text-align:left; background-color:#f0f0f0; font-weight:400}
+SPAN.a19{color:#880000; font-weight:700}
+SPAN.a20{color:#bc6060}
+SPAN.a21{text-decoration:none; vertical-align:baseline;font-style:normal}
+SPAN.a22{color:#888888}
 </style>
-</head><body class="c2 doc-content"><p class="a0">AI22-0047-1</p>
+</head><body class="c25 doc-content"><p class="a0">AI22-0047-1</p>
 <p class="head">!standard 4.5.10(24/5) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;22-08-08
-&nbsp;AI22-0047-1/01</p>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;22-09-08
+&nbsp;AI22-0047-1/02</p>
 <p class="head">!standard 4.5.10(25/5)</p>
 <p class="head">!standard 4.5.10(28/5)</p>
 <p class="head">!class Ramification 22-08-08</p>
+<p class="head">!status Corrigendum 1-2022 &nbsp;22-09-09</p>
+<p class="head">!status ARG Approved &nbsp;9-0-0 &nbsp;22-09-09</p>
 <p class="head">!status work item 22-08-08</p>
 <p class="head">!status received 22-08-04</p>
 <p class="head">!priority Low</p>
@@ -40,7 +42,7 @@
 <p class="head">!subject Initialization of and saving the result back in an accumulator during
 reduction</p>
 <h2 class="head">!summary</h2>
-<p class="text">Clarify with an AARM note that the phrase &quot;<span class="a24">saving the result
+<p class="text">Clarify with an AARM note that the phrase &quot;<span class="c16">saving the result
 as the new value of the accumulator&quot; appearing in 4.5.10(25/5) and a similar phrase &quot;with
 the result saved back in the overall accumulator&quot; in 4.5.1(28/5) have the semantics of an
 assignment when Reduce is a function. &nbsp;Clarify that if the accumulator subtype is indefinite,
@@ -52,10 +54,15 @@
 4.5.10(25/5, 28/5)). &nbsp;Does this have the semantics of an assignment when the Reduce subprogram
 is a function? (Yes.)</p>
 
-<p class="text">Should this be clarified somehow? (Yes.)</p>
+<p class="txts">Should this be clarified somehow? (Yes.)</p>
+
+<p class="text">Do we need to separately mention that the tag comes from the initial value in the
+class-wide case? &nbsp;Note that the class-wide case is not mentioned in the definition of
+&quot;constrained by its initial value&quot; in 3.3.1 (although it is mentioned in AARM
+3.3.1(33.b)). &nbsp;(Yes, clarify in an AARM note.)</p>
 <h2 class="head">!recommendation</h2>
 
-<p class="text">Because the wording is trying to capture the semantics of both the case where
+<p class="txts">Because the wording is trying to capture the semantics of both the case where
 Reduce is a function and Reduce is a procedure, the somewhat ambiguous term &quot;saving&quot; was
 used in the dynamic semantics. &nbsp;We should clarify with an AARM note that &quot;saving&quot; in
 the function case is performed via an assignment to the accumulator of the result returned by the
@@ -63,11 +70,14 @@
 presumably use an assignment to update the accumulator, though it might actually be a set of
 assignments to the components of the accumulator, if the accumulator is a composite type or uses a
 level of indirection.</p>
+
+<p class="text">We also propose an AARM note to clarify the issue of the tag and constraints of the
+accumulator when it is of an indefinite subtype.</p>
 <h2 class="head">!wording</h2>
 <p class="inst">Add after 4.5.10(24/5):</p>
 
 <p class="word">AARM Ramification: If Accum_Type is an indefinite subtype, the accumulator is
-constrained by, and if class-wide, takes its tag from the Initial_Value.</p>
+constrained by, and if class-wide takes its tag from, the Initial_Value.</p>
 <p class="inst">Add after&nbsp;4.5.10(25/5):</p>
 
 <p class="word">AARM To be honest: In the case where Reduce is a function, &quot;saving the result
@@ -101,7 +111,7 @@
 <p class="txts">The correct approach is to use a structure that can grow as the resulting
 concatenation grows, such as an Unbounded_String or a Vector.</p>
 
-<a id="t.7060e27765d59272fdf541669978ff0b28e8af43"></a><a id="t.0"></a><table class="c26"><tr class="c13"><td class="c9">
+<a id="t.7060e27765d59272fdf541669978ff0b28e8af43"></a><a id="t.0"></a><table class="c20"><tr class="c11"><td class="c21">
 <p class="codt"><b>procedure</b> Foo <b>is</b><br>
  &nbsp; &nbsp;<b>function</b> F (N : Natural) <b>return</b> String <b>is</b><br>
  &nbsp; &nbsp;<b>begin</b><br>
@@ -125,44 +135,44 @@
 <h2 class="head">!appendix</h2>
 
 <p class="text">Stephen Baird
-&lt;<span class="c28"><a class="c18" href="mailto:baird@adacore.com">baird@adacore.com</a></span>&gt;
+&lt;<span class="c17"><a class="c10" href="mailto:baird@adacore.com">baird@adacore.com</a></span>&gt;
 Thu, Aug 4, 2022 at 4:29 PM</p>
 <p class="txts">To: Tucker Taft &lt;taft@adacore.com&gt;, Randy Brukardt
-&lt;<span class="c28"><a class="c18" href="mailto:randy@rrsoftware.com">randy@rrsoftware.com</a></span>&gt;</p>
+&lt;<span class="c17"><a class="c10" href="mailto:randy@rrsoftware.com">randy@rrsoftware.com</a></span>&gt;</p>
 
 <p class="text">I was discussing reduction expressions with Ed, Bob, and Gary and a question came
 up.</p>
 <p class="txts">GNAT raises Constraint_Error executing the following example. It is not clear to me
 whether this is correct.</p>
 
-<a id="t.61df7d50deefc65df1940e5355bc5ad8ee00653a"></a><a id="t.1"></a><table class="c26"><tr class="c13"><td class="c9">
-<p class="a19"><b>with</b>&nbsp;Text_Io;<br>
-<b>procedure</b>&nbsp;<span class="a20">Foo</span>&nbsp;<b>is</b><br>
- &nbsp; &nbsp; <b>function</b>&nbsp;<span class="a20">F</span>&nbsp;(N :
+<a id="t.61df7d50deefc65df1940e5355bc5ad8ee00653a"></a><a id="t.1"></a><table class="c20"><tr class="c11"><td class="c21">
+<p class="a18"><b>with</b>&nbsp;Text_Io;<br>
+<b>procedure</b>&nbsp;<span class="a19">Foo</span>&nbsp;<b>is</b><br>
+ &nbsp; &nbsp; <b>function</b>&nbsp;<span class="a19">F</span>&nbsp;(N :
 <span class="del">Natural</span>)
 <b>return</b>&nbsp;<span class="del">String</span>&nbsp;<b>is</b><br>
  &nbsp; &nbsp; <b>begin</b><br>
  &nbsp; &nbsp; &nbsp; &nbsp;Text_Io.Put_Line (<span class="del">&quot;In F, N
-=&quot;</span>&nbsp;&amp; N<span class="a21">&#39;Image</span>);<br>
+=&quot;</span>&nbsp;&amp; N<span class="a20">&#39;Image</span>);<br>
  &nbsp; &nbsp; &nbsp;
-&nbsp;<b>return</b>&nbsp;String&#39;(<span class="del">1</span><span class="a22">&nbsp;.. N
+&nbsp;<b>return</b>&nbsp;String&#39;(<span class="del">1</span><span class="a21">&nbsp;.. N
 =&gt;</span></p>
-<p class="a19">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(<b>if</b>&nbsp;N
+<p class="a18">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(<b>if</b>&nbsp;N
 <b>mod</b>&nbsp;<span class="del">2</span>&nbsp;=
 <span class="del">0</span>&nbsp;<b>then</b>&nbsp;<span class="del">&#39;X&#39;</span>&nbsp;<b>else</b>&nbsp;<span class="del">&#39;Y&#39;</span>));<br>
  &nbsp; &nbsp; <b>end</b>;<br>
 <br>
- &nbsp; &nbsp;<b>function</b>&nbsp;<span class="a20">Cat</span>&nbsp;(S1, S2 :
+ &nbsp; &nbsp;<b>function</b>&nbsp;<span class="a19">Cat</span>&nbsp;(S1, S2 :
 <span class="del">String</span>)
 <b>return</b>&nbsp;<span class="del">String</span>&nbsp;<b>renames</b>&nbsp;<span class="del">&quot;&amp;&quot;</span>;<br>
- &nbsp; &nbsp;<span class="a23">-- &nbsp;eliminate any overload resolution</span><br>
- &nbsp; &nbsp;<span class="a23">-- &nbsp;questions by introducing a rename</span><br>
+ &nbsp; &nbsp;<span class="a22">-- &nbsp;eliminate any overload resolution</span><br>
+ &nbsp; &nbsp;<span class="a22">-- &nbsp;questions by introducing a rename</span><br>
 <br>
  &nbsp; &nbsp;S :
-<b>constant</b>&nbsp;<span class="del">String</span><span class="a22">&nbsp;:=</span></p>
-<p class="a19">&nbsp; &nbsp; &nbsp; &nbsp; [<b>for</b>&nbsp;I
+<b>constant</b>&nbsp;<span class="del">String</span><span class="a21">&nbsp;:=</span></p>
+<p class="a18">&nbsp; &nbsp; &nbsp; &nbsp; [<b>for</b>&nbsp;I
 <b>in</b>&nbsp;<span class="del">1</span>&nbsp;.. <span class="del">5</span>&nbsp;=&gt; F
-(I)]<span class="a21">&#39;Reduce</span>&nbsp;(Cat, <span class="del">&quot;&quot;</span>);<br>
+(I)]<span class="a20">&#39;Reduce</span>&nbsp;(Cat, <span class="del">&quot;&quot;</span>);<br>
 <b>begin</b><br>
  &nbsp; &nbsp;Text_Io.Put_Line (S);<br>
 <b>end</b>&nbsp;Foo;</p>
@@ -181,8 +191,8 @@
 <p class="txts">as an assignment. Is that a bug?</p>
 
 <p class="text">FWIW, this notion of a more general form of update reminds me of the</p>
-<a id="t.7e5e436e68d6e40d84164fa795b49fb1adcefbee"></a><a id="t.2"></a><table class="c26"><tr class="c13"><td class="c9">
-<p class="a19"><b>for</b>&nbsp;Elem
+<a id="t.7e5e436e68d6e40d84164fa795b49fb1adcefbee"></a><a id="t.2"></a><table class="c20"><tr class="c11"><td class="c21">
+<p class="a18"><b>for</b>&nbsp;Elem
 <b>of</b>&nbsp;Some_Container_With_An_Indefinite_Element_Subtype <b>loop</b>&nbsp;...<br>
 <b>end</b>&nbsp;<b>loop</b>;</p>
 </td></tr></table><p class="txts">case, where the tag/bounds/discriminants of Elem might change
@@ -212,7 +222,7 @@
 <p class="txts">-Tuck</p>
 
 <p class="text">Stephen Baird
-&lt;<span class="c28"><a class="c18" href="mailto:baird@adacore.com">baird@adacore.com</a></span>&gt;
+&lt;<span class="c17"><a class="c10" href="mailto:baird@adacore.com">baird@adacore.com</a></span>&gt;
 Thu, Aug 4, 2022 at 5:42 PM</p>
 <p class="text">To: Tucker Taft &lt;taft@adacore.com&gt;</p>
 <p class="text">Cc: Randy Brukardt &lt;randy@rrsoftware.com&gt;</p>

Questions? Ask the ACAA Technical Agent