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

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

--- ai22s/ai22-0051-1.html	2022/10/29 04:38:05	1.1
+++ ai22s/ai22-0051-1.html	2023/01/13 02:43:47	1.2
@@ -1,20 +1,43 @@
-<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0051-1/01</title>
+<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0051-1/02</title>
 <style type="text/css">
+ol.lst-kix_fognbq43wb1d-1.start{counter-reset:lst-ctn-kix_fognbq43wb1d-1 0}
+.lst-kix_fognbq43wb1d-1>li{counter-increment:lst-ctn-kix_fognbq43wb1d-1}
+.lst-kix_fognbq43wb1d-8>li{counter-increment:lst-ctn-kix_fognbq43wb1d-8}
+ol.lst-kix_fognbq43wb1d-5.start{counter-reset:lst-ctn-kix_fognbq43wb1d-5 0}
+.lst-kix_fognbq43wb1d-2>li{counter-increment:lst-ctn-kix_fognbq43wb1d-2}
+ol.lst-kix_fognbq43wb1d-8.start{counter-reset:lst-ctn-kix_fognbq43wb1d-8 0}
+ol.lst-kix_fognbq43wb1d-7.start{counter-reset:lst-ctn-kix_fognbq43wb1d-7 0}
+ol.lst-kix_fognbq43wb1d-4.start{counter-reset:lst-ctn-kix_fognbq43wb1d-4 0}
+.lst-kix_fognbq43wb1d-7>li{counter-increment:lst-ctn-kix_fognbq43wb1d-7}
+ol.lst-kix_fognbq43wb1d-3.start{counter-reset:lst-ctn-kix_fognbq43wb1d-3 0}
+.lst-kix_fognbq43wb1d-4>li{counter-increment:lst-ctn-kix_fognbq43wb1d-4}
+ol.lst-kix_fognbq43wb1d-6.start{counter-reset:lst-ctn-kix_fognbq43wb1d-6 0}
+ol.lst-kix_fognbq43wb1d-0.start{counter-reset:lst-ctn-kix_fognbq43wb1d-0 0}
+.lst-kix_fognbq43wb1d-5>li{counter-increment:lst-ctn-kix_fognbq43wb1d-5}
+.lst-kix_fognbq43wb1d-0>li{counter-increment:lst-ctn-kix_fognbq43wb1d-0}
+.lst-kix_fognbq43wb1d-3>li{counter-increment:lst-ctn-kix_fognbq43wb1d-3}
+ol.lst-kix_fognbq43wb1d-2.start{counter-reset:lst-ctn-kix_fognbq43wb1d-2 0}
+.lst-kix_fognbq43wb1d-6>li{counter-increment:lst-ctn-kix_fognbq43wb1d-6}
 table td,table th{padding:0}
-.c0{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:437.2pt;border-top-color:#000000;border-bottom-style:solid}
-.c9{margin-left:30.8pt;border-spacing:0;border-collapse:collapse;margin-right:auto}
-.c8{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
-.c12{height:0pt}
+.c20{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:437.2pt;border-top-color:#000000;border-bottom-style:solid}
+.c22{margin-left:30.8pt;border-spacing:0;border-collapse:collapse;margin-right:auto}
+.c19{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
+.c21{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.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.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}
+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}
+UL.blts{margin-bottom:0; margin-top:0; margin-left:12pt; margin-right:0; padding-top:0pt; color:#000000; font-size:11pt; padding-bottom:12pt; 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; list-style: disc outside}
+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}
+SPAN.a9{background-color:#fffff0; font-size:9.5pt; font-family:"Times New Roman","Times",serif;font-style:italic}
+SPAN.a10{font-family:"Courier New"}
+SPAN.a11{background-color:#fffff0; font-size:9.5pt; font-family:"Times New Roman","Times",serif}
 </style>
-</head><body class="c8 doc-content"><p class="a0">AI22-0051-1</p>
+</head><body class="c19 doc-content"><p class="a3">AI22-0051-1</p>
 <p class="head">!standard 7.3.3(7/5) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;22-10-26 &nbsp;AI22-0051-1/01</p>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;23-01-12 &nbsp;AI22-0051-1/02</p>
 <p class="head">!standard 10.2.1(5)</p>
 <p class="head">!standard 10.2.1(7/5)</p>
 <p class="head">!class Binding Interpretation 22-10-26</p>
@@ -29,14 +52,16 @@
 <h2 class="head">!issue</h2>
 
 <p class="text">A Default_Initial_Condition expression is evaluated when a default-initialized
-object is created. Aspect Preelaborable_Initialization (P_I) does not take into account any such
-evaluation when it determines whether a component has P_I. That means that such an evaluation could
-execute operations not otherwise allowed during the elaboration of a preelaborated package (in
-particular, calling a function other than the handful allowed for preelaboration). This seems
+object is created. The aspect Preelaborable_Initialization (P_I) does not take into account any
+such evaluation when it determines whether a component has P_I. That means that such an evaluation
+could execute operations not otherwise allowed during the elaboration of a preelaborated package
+(in particular, calling a function other than the handful allowed for preelaboration). This seems
 to</p>
-<p class="text">circumvent the purpose of aspect P_I.</p>
+<p class="txts">circumvent the purpose of aspect P_I.</p>
+
 <h2 class="head">!recommendation</h2>
-<p class="text">*** TBD.</p>
+<p class="txts">*** TBD.</p>
+
 <h2 class="head">!wording</h2>
 <p class="text">*** TBD.</p>
 <h2 class="head">!discussion</h2>
@@ -59,7 +84,7 @@
 3.3.1(13/5)).</p>
 
 <p class="txts">(5) A Dynamic_Predicate can be evaluated for any component of a default-initialized
-object if the component has a default expressions; again, the component is converted to the
+object if the component has a default expression; again, the component is converted to the
 appropriate subtype, see 3.3.1(13/5).</p>
 
 <p class="txts">None of these cases are covered by the current wording in 10.2.1. It might appear
@@ -67,6 +92,38 @@
 evaluation of the default expression; it does not say anything about the subtype conversion that
 happens afterward.</p>
 
+<p class="text">&mdash;-</p>
+<p class="text">Possible Solutions:</p>
+<ul class="blts"><li>Allow execution;
+<ul class="bull"><li>The last half of 10.2.1 (1.a) [AARM] says &ldquo;<span class="a9">Some
+implementations may require run-time code to be executed in some cases, but we consider these cases
+rare enough that we need not further complicate the rules.</span>&rdquo; &mdash; We could consider
+this situation as within these cases, explicitly stating it. </li>
+<li>If this is the default method, then we should have a <span class="a10">Pragma Restrictions(
+No_Preelaboration_Execution );</span> (or whatever a good restriction-name would be).</li>
+</ul></li>
+<li>Given 10.2.1 (5.a) ramification illustrates the purpose/function
+(&ldquo;<span class="a11">A </span><span class="a9">preelaborable</span><span class="a11">
+construct can be elaborated without using any information that is available only at run
+time.</span>&rdquo;), we can require the compiler to statically analyze the conditions, only
+accepting the compilation if some object defaults to those conditions;
+<ul class="bull"><li>Along this line, given a model &lsquo;default&rsquo; object, apply the
+functions [statically(?)] to <i>that</i>, to ensure they hold &ndash; this assumes that the default
+is not dynamic and thus that any object set to that default would conform. (i.e. your value
+doesn&rsquo;t change e.g. from 1 on the first defaulting, to 2 on the second, etc.)</li>
+</ul></li>
+<li>Disallow P_I with D_I_C&rsquo;s containing non-preelaboral properties;
+<ul class="bull"><li>This would require an implementation to check that D_I_C does not violate the
+constraints of Preelaborate; with the addition of static user-function this is less restrictive
+than the 2012 constraints.</li>
+</ul></li>
+<li>Disallow P_I and D_I_C together;</li>
+<li>Ignore D_I_C, using it as a hint for SPARK proof;</li>
+<li>Defer evaluation/check until the same point a TASK would begin executing. (That is at the
+<span class="a10">BEGIN</span> associated with the most enclosing declarative-region.)</li>
+</ul>
+
+
 <p class="txts">----</p>
 
 <p class="text">Note that the simple solution of not allowing a type that runs afoul of any of
@@ -79,7 +136,7 @@
 specification of the Ada.Containers.Vectors package, showing just the parts relevant to this
 discussion:</p>
 
-<a id="t.2356b49c562ccae0b7d02396514589064237165e"></a><a id="t.0"></a><table class="c9"><tr class="c12"><td class="c0">
+<a id="t.2356b49c562ccae0b7d02396514589064237165e"></a><a id="t.0"></a><table class="c22"><tr class="c21"><td class="c20">
 <p class="codt"><b>generic</b><br>
  &nbsp; ...<br>
 <b>package</b> Ada.Containers.Vectors<br>

Questions? Ask the ACAA Technical Agent