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

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

--- ai22s/ai22-0019-1.html	2022/06/17 06:39:03	1.2
+++ ai22s/ai22-0019-1.html	2022/06/25 06:12:11	1.3
@@ -1,12 +1,16 @@
-<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0019-1/02</title>
+<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0019-1/03</title>
 <style type="text/css">
 table td,table th{padding:0}
-.c13{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
+.c18{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}
+.c9{border-spacing:0;border-collapse:collapse;margin-right:auto}
+.c14{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
+.c19{height:0pt}
 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}
+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}
 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}
@@ -15,11 +19,13 @@
 SPAN.ntrm{font-family:"Arial","Liberation Sans",sans-serif}
 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}
 </style>
-</head><body class="c13"><p class="a1">AI22-0019-1</p>
+</head><body class="c14"><p class="a1">AI22-0019-1</p>
 <p class="head">!standard 13.1.1(13.1/5) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23-06-05 &nbsp;AI22-0019-1/02</p>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23-06-24 &nbsp;AI22-0019-1/03</p>
 <p class="head">!class binding interpretation 21-11-12</p>
+<p class="head">!status Corrigendum 1-2022 22-06-23</p>
+<p class="head">!status ARG Approved 15-0-0 &nbsp;22-06-23</p>
 <p class="head">!status work item 21-11-12</p>
 <p class="head">!status received 21-11-09</p>
 <p class="head">!priority Low</p>
@@ -27,8 +33,8 @@
 <p class="head">!qualifier Error</p>
 <p class="head">!subject Freezing of aspect specifications</p>
 <h2 class="head">!summary</h2>
-<p class="text">The circular freezing rule for aspects only applies to aspects that are</p>
-<p class="text">frozen at the freezing point of the enclosing entity.</p>
+<p class="text">The circular freezing rule for aspects only applies to aspects that are frozen at
+the freezing point of the enclosing entity.</p>
 <h2 class="head">!issue</h2>
 
 <p class="txts">13.1.1(13.1/5) says:</p>
@@ -38,11 +44,10 @@
 <span class="ntrm">aspect_specification</span> that specifies a representation or operational
 aspect of that entity.</p>
 
-<p class="text">Since AI12-0396-1 decided that all aspects are either representation or</p>
-<p class="text">operational, it&#39;s bizarre that we mention both kinds explicitly here.</p>
-<p class="text">Moreover, the text of AI12-0396-1 says that this rule shouldn&#39;t apply to</p>
-<p class="text">at least some operational aspects. But the wording was unchanged (just moved)</p>
-<p class="txts">from the Corrigendum version.</p>
+<p class="txts">Since AI12-0396-1 decided that all aspects are either representation or
+operational, it&#39;s bizarre that we mention both kinds explicitly here. Moreover, the text of
+AI12-0396-1 says that this rule shouldn&#39;t apply to at least some operational aspects. But the
+wording was unchanged (just moved) from the Corrigendum version.</p>
 
 <p class="txts">Is something wrong here? (Yes.)</p>
 
@@ -60,8 +65,8 @@
 <p class="word">If a <span class="ntrm">name</span> or <span class="ntrm">expression</span> within
 an <span class="ntrm">aspect_specification</span> causes freezing when the entity associated with
 the <span class="ntrm">aspect_specification </span>is frozen (see 13.14), that
-<span class="ntrm">name</span> or <span class="ntrm">expression</span> shall not be one that causes
-freezing of this associated entity.</p>
+<span class="ntrm">name</span> or <span class="ntrm">expression</span> shall not cause freezing of
+this associated entity.</p>
 <h2 class="head">!discussion</h2>
 
 <p class="txts">The purpose of 13.1.1(13.1/5) is to prevent a property of an entity (which is
@@ -77,10 +82,52 @@
 at the freezing point of an entity. We definitely do not want to repeat that in this rule.
 Therefore, we use the mouthful before the comma in the proposed rewording, to refer to the rules of
 13.14(7.2/5).</p>
+<h2 class="head">!example</h2>
+<p class="txts">We need a rule like 13.1.1(13.1/5) to prevent problems for aspects that are
+evaluated at the freezing point, such as representation aspects. For example:</p>
+
+<a id="t.7762e96ebce47d1748a08870428e559da7167db6"></a><a id="t.0"></a><table class="c9"><tr class="c19"><td class="c18">
+<p class="codt"><b>type</b> My_Int <b>is</b> <b>range</b> 1 .. 100<br>
+ &nbsp; &nbsp;<b>when</b> Size =&gt; Short_Int&#39;Size;<br>
+<b>subtype</b> Short_Int <b>is</b> My_Int <b>range</b> 1 .. 50;<br>
+Obj : My_Int;</p>
+</td></tr></table><p class="text">&nbsp;</p>
+<p class="txts">Freezing Obj freezes My_Int. Freezing My_Int requires Short_Int&#39;Size.
+Short_Int&#39;Size requires freezing Short_Int. Freezing Short_Int requires freezing My_Int.
+We&#39;re back to where we started, so we will be going in circles. 13.1.1(13.1/5) makes this
+situation illegal.</p>
+
+<p class="txts">On the other hand, aspects that aren&#39;t evaluated until some later point, like
+assertion aspects, do not need such a rule. Consider:</p>
+
+<a id="t.b77fea320bf537d0ec807ca568e6dd41b1976c9b"></a><a id="t.1"></a><table class="c9"><tr class="c19"><td class="c18">
+<p class="codt"><b>type</b> My_Priv <b>is</b> <b>private</b><br>
+ &nbsp; <b>when</b> Default_Initial_Condition =&gt; Sub_Priv&#39;Size &gt; 32;<br>
+<b>subtype</b> Sub_Priv <b>is</b> My_Priv;</p>
+</td></tr></table><p class="text">&nbsp;</p>
+<p class="txts">Here, the Default_Initial_Condition is not evaluated until after a default
+initialized object of type My_Priv is created. My_Priv necessarily will be frozen before that point
+(perhaps only a little bit before). Thus there is no problem with this expression, and it should be
+legal. The newly updated version of 13.1.1(13.1/5) makes that the case.</p>
+
+<p class="txts">We&#39;re not claiming that this particular example is very useful, but other
+examples could be.</p>
+
+<p class="txts">For instance, it might be useful to refer to a subprogram from inside of a
+precondition or postcondition of that subprogram. For instance, one could write:</p>
+
+<a id="t.55ee4410f588316d5a4d0244438db446829406db"></a><a id="t.2"></a><table class="c9"><tr class="c19"><td class="c18">
+<p class="codt"><b>function</b> Factorial (N : <b>in</b> Integer) <b>return</b> Integer<br>
+ &nbsp; <b>with</b> Post =&gt; Factorial&#39;Result = Factorial(N-1)*N;</p>
+</td></tr></table><p class="text">&nbsp;</p>
+<p class="text">We would not want 13.1.1(13.1/5) to make this recursive call illegal. But it would
+if we required the expression to be frozen before the function could be frozen. We don&#39;t need
+that, as any evaluation of Post would necessarily follow a call on Factorial (which already froze
+Factorial).</p>
 <h2 class="head">!ACATS test</h2>
 
-<p class="text">Any ACATS B-Tests for this rule should be revised with this change in mind</p>
-<p class="txts">(but they probably don&#39;t try cases like this anyway).</p>
+<p class="txts">Any ACATS B-Tests for this rule should be revised with this change in mind (but
+they probably don&#39;t try cases like this anyway).</p>
 
 <h2 class="head">!appendix</h2>
 <p class="from">From:<span class="name"> Randy Brukardt [privately]</span></p>

Questions? Ask the ACAA Technical Agent