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

Differences between 1.7 and version 1.8
Log of other versions for file ai22s/ai22-0036-1.html

--- ai22s/ai22-0036-1.html	2023/01/21 09:32:06	1.7
+++ ai22s/ai22-0036-1.html	2023/04/28 02:30:03	1.8
@@ -1,31 +1,31 @@
-<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>13.14(4/1)</title>
+<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0036-1/08</title>
 <style type="text/css">
 table td,table th{padding:0}
-.c27{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}
-.c4{border-spacing:0;border-collapse:collapse;margin-right:auto}
-.c29{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
-.c22{height:0pt}
+.c13{border-spacing:0;border-collapse:collapse;margin-right:auto}
+BODY.body{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.codt{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:"Courier New",monospace; line-height:1.15; text-align:left; background-color:#f0f0f0; font-weight:400; tex
t-decoration:none; vertical-align:baseline; font-style:normal}
+UL.wbi{margin-bottom:0; margin-top:0; margin-left:66pt; 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.win2{margin-bottom:0; margin-top:0; margin-left:84pt; 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.win3{margin-bottom:0; margin-top:0; margin-left:108pt; 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:4
00; text-decoration:none; vertical-align:baseline; font-style:normal}
+P.codb{margin-bottom:0; margin-top:0; margin-left:12pt; margin-right:0; padding-left:4pt; padding-top:4pt; color:#000000; font-size:10pt; padding-bottom:4pt; font-family:"Courier New",monospace; line-height:1.15; text-align:left; background-color:#f0f0f0;
 font-weight:400; 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}
 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:#008800}
-SPAN.del{color:#880000}
+SPAN.ins{color:#007700}
+SPAN.del{color:#cc8888}
 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.1500000000000001; page-break-after:avoid; orphans:2; widows
:2; text-align:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
+P.sfq{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.1500000000000001; page-break-after:avoid; orphans:2; widow
s:2; text-align:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
 </style>
-</head><body class="c29 doc-content"><p class="a3">AI22-0036-1</p>
+</head><body class="body"><p class="sfq">AI22-0036-1</p>
 <p class="head">!standard 8.6(17/3)&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 23-01-20 &nbsp;AI22-0036-1/07</p>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 23-04-27 &nbsp;AI22-0036-1/08</p>
 <p class="head">!standard 13.14(4/1)</p>
 <p class="head">!standard 13.14(7.2/5)</p>
 <p class="head">!standard 13.14(8/4)</p>
@@ -38,7 +38,7 @@
 <p class="head">!status work item 22-01-26</p>
 <p class="head">!status received 21-04-28</p>
 <p class="head">!priority Low</p>
-<p class="head">!difficulty Easy</p>
+<p class="head">!difficulty Medium</p>
 <p class="head">!qualifier Omission</p>
 <p class="head">!subject Attributes in the expression of Default_Value</p>
 <h2 class="head">!summary</h2>
@@ -58,10 +58,10 @@
 so it is not inherited), but all such conversions are illegal.</p>
 
 <p class="text">For instance:</p>
-<a id="t.95917217e1d5f0ad5def57a7c4bf5b8bfff0930c"></a><a id="t.1"></a><table class="c4"><tr class="c22"><td class="c27">
-<p class="codt">&nbsp; <b>type</b> Char <b>is</b> <b>new</b> Character &nbsp;<br>
- &nbsp; &nbsp; <b>with</b> Default_Value =&gt; Char (Ada.Characters.Latin_1.Nul);</p>
-</td></tr></table><p class="text">&nbsp;</p>
+<table class="c13"></table><p class="text">&nbsp;</p>
+<p class="codb">&nbsp; <b>type</b> Char <b>is</b> <b>new</b> Character &nbsp;<br>
+&nbsp; &nbsp; &nbsp;<b>with</b> Default_Value =&gt; Char (Ada.Characters.Latin_1.Nul);</p>
+<p class="text">&nbsp;</p>
 <p class="txts">This is illegal because Char is a constant object (the current instance of type
 Char), and thus cannot be used as the prefix of a type conversion.</p>
 
@@ -84,10 +84,10 @@
 attribute which is defined for (at least some) scalar subtypes and is not defined for (any) scalar
 objects [redundant: (for example, the Val attribute)].</li>
 </ul>
-<p class="wind">{AARM Discussion: Language-defined scalar subtype attributes that might be used
-here include First, Last, Val, and Pos. Enum_Val and Enum_Rep could not be used as they would
-freeze the type.}</p>
-<p class="inst">Modify and reorder 13.14, starting at (4/1) and continuing through (15.3/5)):</p>
+<p class="win2">{AARM Discussion: Language-defined scalar subtype attributes that might be used
+here include First, Last, Val, and Pos. However, Enum_Val and Enum_Rep could not be used as they
+would freeze the type.}</p>
+<p class="inst">Modify and reorder 13.14, starting at (4/1) and continuing through (15.3/5):</p>
 
 <p class="word">A construct that (explicitly or implicitly) references an entity can cause the
 <i>freezing </i>of the entity, as defined by subsequent paragraphs. At the place where a construct
@@ -112,15 +112,16 @@
 freezing of any progenitor types specified in the declaration. </li>
 <li>&lt;&lt;Was (8/4)&gt;&gt;A static expression <span class="del">[(other than within an
 <span class="ntrm">aspect_specification</span>)]</span> causes freezing where it
-occurs<span class="ins">{ with the following exceptions:}</span>
-<ul class="wbl"><li><span class="ins">{Any freezing caused by a static expression occurring within
+occurs<span class="ins">{ with the following exceptions:}</span></li>
+</ul>
+<ul class="wbi"><li><span class="ins">{Any freezing caused by a static expression occurring within
 an <span class="ntrm">aspect_specification</span> is postponed at least until the
 <span class="ntrm">aspect_specification</span> is resolved (see below);</span></li>
 <li><span class="ins">An enumeration literal used as a <span class="ntrm">discrete_choice</span> of
 the <span class="ntrm">array_aggregate</span> of an
 <span class="ntrm">enumeration_representation_clause </span>does not cause freezing}</span>.</li>
-</ul></li>
-<li>&lt;&lt;Was second half of (8/4)&gt;&gt;An object name or nonstatic expression
+</ul>
+<ul class="wbl"><li>&lt;&lt;Was second half of (8/4)&gt;&gt;An object name or nonstatic expression
 causes freezing where it occurs, unless the name or expression is part of a
 <span class="ntrm">default_expression</span>, a <span class="ntrm">default_name,</span> the return
 expression of an expression function, an <span class="ntrm">aspect_specification</span>, or a
@@ -146,19 +147,21 @@
 <span class="ntrm">aspect_specification</span> <span class="del">[also]</span> cause
 freezing<span class="ins">{ both at the freezing point of the entity associated with the
 <span class="ntrm">aspect_specification</span>, and}</span> at the end of the immediately enclosing
-declaration list<span class="ins">{, with the following exceptions:}</span>
-<ul class="wbl"><li><span class="ins">{static expressions of the form S&#39;First, S&#39;Last,
+declaration list<span class="ins">{, with the following exceptions:}</span></li>
+</ul>
+<ul class="wbi"><li><span class="ins">{static expressions of the form S&#39;First, S&#39;Last,
 S&#39;Val(...), S&#39;Pos(...), S&rsquo;Succ(...), or S&rsquo;Pred(...), and static ranges of the
 form S&#39;Range do not cause freezing if they occur within an
 <span class="ntrm">aspect_definition</span> for the Default_Value aspect of a type <i>T</i>, where
-S is a static subtype of <i>T</i>;}</span>
-<p class="wind"><span class="ins">{AARM Reason: These attributes are well defined independent of
-the representation of the type.}</span></p></li>
-<li><span class="ins">{an enumeration literal does not cause freezing if it occurs
+S is a static subtype of <i>T</i>;}</span></li>
+</ul>
+<p class="win3"><span class="ins">{AARM Reason: These attributes are well defined independent of
+the representation of the type.}</span></p>
+<ul class="wbi"><li><span class="ins">{an enumeration literal does not cause freezing if it occurs
 within an <span class="ntrm">aspect_definition</span> for the Default_Value aspect of its
 type}</span>.</li>
-</ul></li>
-<li>&lt;&lt;Was (15.2/5&gt;&gt;At the place where a construct causes freezing, if
+</ul>
+<ul class="wbl"><li>&lt;&lt;Was (15.2/5&gt;&gt;At the place where a construct causes freezing, if
 the construct includes a check associated with some assertion aspect (independent of whether the
 check is enabled), or depends on the definition of some operational aspect as part of its Dynamic
 Semantics, any names or expressions in the <span class="ntrm">aspect_definition</span> for the
@@ -225,13 +228,12 @@
 typically not the case because of the possibility of bypassing the current instance rule by means
 of a partial view and a subtype, as in</p>
 <p class="text">&nbsp; </p>
-<a id="t.c711c9e162ca63b8a855ee8735fafaf3f57c4794"></a><a id="t.2"></a><table class="c4"><tr class="c22"><td class="c27">
-<p class="codt">&nbsp; &nbsp; &nbsp; <b>type</b> T <b>is</b> <b>private</b>;<br>
- &nbsp; <b>private</b><br>
- &nbsp; &nbsp; &nbsp;<b>subtype</b> S <b>is</b> T;<br>
- &nbsp; &nbsp; &nbsp;<b>type</b> T <b>is</b> <b>range</b> 1 .. S&#39;Last;<br>
- &nbsp; &nbsp; &nbsp; &nbsp; -- illegal, but not because of the current instance rule</p>
-</td></tr></table><p class="text">&nbsp;</p>
+<p class="codb">&nbsp; &nbsp; &nbsp; <b>type</b> T <b>is</b> <b>private</b>;<br>
+&nbsp; &nbsp;<b>private</b><br>
+&nbsp; &nbsp; &nbsp; <b>subtype</b> S <b>is</b> T;<br>
+&nbsp; &nbsp; &nbsp; <b>type</b> T <b>is</b> <b>range</b> 1 .. S&#39;Last;<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- illegal, but not because of the current instance rule</p>
+<p class="text">&nbsp;</p>
 <p class="txts">Most constructs one might attempt which become illegal as a result of the current
 instance rule can be reformulated to use the name of a subtype instead of a name that denotes the
 current instance. In such cases, changing the current instance rule to apply in fewer cases would
@@ -240,10 +242,10 @@
 <p class="txts">However, since it is illegal for an aspect specification to contain something that
 would freeze the entity itself (directly or indirectly), we also need to create an additional
 &ldquo;hole&rdquo; in the freezing rules in order to achieve the intended effect. We noted that the
-position numbers of a type are determined solely by the type&rsquo;s definition: the literals and
+position numbers of a type are determined solely by the definition of the type: the literals and
 their order for an enumeration definition, and static expressions for an integer definition. Thus
 it is safe to allow Pos and Val in such contexts. Similarly, the values for First and Last are
-determined by the type&rsquo;s definition.</p>
+determined by the definition of the type.</p>
 
 <p class="txts">We make the &ldquo;hole&rdquo; as small as possible, so we only allow those
 attributes (and the equivalent Range) and only in the expression of Default_Value. Having
@@ -251,29 +253,28 @@
 other contexts, and there is no obvious additional expressivity in allowing them.</p>
 
 <p class="text">In general we considered two ways of creating &quot;holes&quot; in the freezing
-rules. &nbsp;One is to say that certain entities are not frozen even though they are used in a
-construct that causes freezing. &nbsp;The alternative is to say that certain constructs do not
-cause freezing, so it doesn&#39;t matter what entities they use, since no freezing is caused by the
-construct. &nbsp;After trying both ways, we settled on specifying that certain (parts of)
-constructs do <i>not</i> cause freezing. &nbsp;This was simpler because constructs like
-S&#39;Pos(...) can reference multiple entities, and we didn&#39;t want to have to add special cases
-for each such entity. &nbsp;Instead, we simply said that when such expressions appear as part of a
-static expression within a certain context, they do not cause freezing.</p>
+rules. One is to say that certain entities are not frozen even though they are used in a construct
+that causes freezing. &nbsp;The alternative is to say that certain constructs do not cause
+freezing, so it doesn&#39;t matter what entities they use, since no freezing is caused by the
+construct. After trying both ways, we settled on specifying that certain (parts of) constructs do
+<i>not</i> cause freezing. &nbsp;This was simpler because constructs like S&#39;Pos(...) can
+reference multiple entities, and we didn&#39;t want to have to add special cases for each such
+entity. &nbsp;Instead, we simply said that when such expressions appear as part of a static
+expression within a certain context, they do not cause freezing.</p>
 <h2 class="head">!example</h2>
-<p class="txts">This AI would allow the following declarations to be legal:</p>
+<p class="txts">This AI allows the following declarations to be legal:</p>
 
-<a id="t.fae934939e8c2de6b602a6bb51ec41e348890373"></a><a id="t.3"></a><table class="c4"><tr class="c22"><td class="c27">
-<p class="codt">Nul_Pos : <b>constant</b> Integer := <br>
- &nbsp; &nbsp;Character&#39;Pos (Ada.Characters.Latin_1.NUL); &nbsp; -- &nbsp;equals 0<br>
- &nbsp; <br>
+<p class="codb">Nul_Pos : <b>constant</b> Integer := <br>
+&nbsp; &nbsp; Character&#39;Pos (Ada.Characters.Latin_1.NUL); &nbsp; -- &nbsp;equals 0<br>
+&nbsp; &nbsp;<br>
 <b>type</b> Char <b>is</b> <b>new</b> Character<br>
- &nbsp; &nbsp;<b>with</b> Default_Value =&gt; Char&#39;Val (Nul_Pos);<br>
+&nbsp; &nbsp; <b>with</b> Default_Value =&gt; Char&#39;Val (Nul_Pos);<br>
 <br>
 -- Or alternatively...<br>
 <br>
 <b>type</b> Char2 <b>is</b> <b>new</b> Character<br>
- &nbsp; &nbsp;<b>with</b> Default_Value =&gt; Char&#39;First;</p>
-</td></tr></table><h2 class="head">!ACATS test</h2>
+&nbsp; &nbsp; <b>with</b> Default_Value =&gt; Char&#39;First;</p>
+<h2 class="head">!ACATS test</h2>
 <p class="text">An ACATS C-Test is needed to check that these attributes are allowed for a
 Default_Value aspect specification.</p>
 <h2 class="head">!appendix</h2>

Questions? Ask the ACAA Technical Agent