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

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

--- ai22s/ai22-0052-1.html	2023/03/18 08:29:02	1.3
+++ ai22s/ai22-0052-1.html	2023/04/04 07:29:57	1.4
@@ -1,4 +1,4 @@
-<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0052-1/02</title>
+<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0052-1/03</title>
 <style type="text/css">
 table td,table th{padding:0}
 BODY.body{background-color:#ffffff; max-width:468pt; padding:72pt 72pt 72pt 72pt}
@@ -6,15 +6,20 @@
 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.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}
+SPAN.ins{color:#007700}
+SPAN.del{color:#cc8888}
 SPAN.ntrm{font-family:"Arial","Liberation Sans",sans-serif}
-P.xee{margin-bottom:0; margin-top:0; margin-left:0; margin-right:0;color:#000000;font-size:26pt;font-family:"Arial","Liberation Sans",sans-serif; orphans:2; widows:2; padding-top:0pt; padding-bottom:3pt; line-height:1.15; page-break-after:avoid; text-alig
n:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
+P.l3h{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-alig
n:left; font-weight:400; text-decoration:none; vertical-align:baseline; font-style:normal}
 </style>
-</head><body class="body"><p class="xee">AI22-0052-1</p>
-<p class="head">!standard H.7(4/5) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 23-02-21 &nbsp;AI22-0052-1/02</p>
+</head><body class="body"><p class="l3h">AI22-0052-1</p>
+<p class="head">!standard 13.11(17.1/5) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 23-03-17 &nbsp;AI22-0052-1/03</p>
+<p class="head">!standard 13.11(18/5)</p>
+<p class="head">!standard H.7(4/5)</p>
 <p class="head">!standard H.7(7/5)</p>
 <p class="head">!class Binding Interpretation 22-10-27</p>
 <p class="head">!status work item 22-10-27</p>
@@ -24,21 +29,62 @@
 <p class="head">!qualifier Omission</p>
 <p class="head">!subject Storage Pool-related side effects</p>
 <h2 class="head">!summary</h2>
-
-<p class="text">The Storage_Pool attribute of an access type may be used as a global name in order
+<p class="txts">The Storage_Pool attribute of an access type may be used as a global name in order
 to more conveniently describe the effects of the implicit Storage_Pool calls associated with
 constructs such as allocators and unchecked deallocations.</p>
+
+<p class="text">Standard storage pools are considered synchronized for the purposes of Global
+aspects.</p>
 <h2 class="head">!issue</h2>
+<p class="txts">Global aspects for an entity include the effect of all calls inside of that entity,
+including any implicit calls. This means that the implicit calls on the storage pool of an access
+type are included for any allocation or deallocation operations.</p>
 
-<p class="text">In the case of a formal access type, precisely describing the effects of
-allocation/deallocation-related operations is impossible without this addition. In the case of a
-non-formal access type, this change improves maintainability.</p>
+<p class="text">However, for a generic formal access-to-object type, there is no current way to
+describe this storage pool. The storage pool is that of the actual type, and the properties of that
+pool are not known in the generic template. This leaves <b>in out all</b> as the only global
+specification that can be applied to a generic operation that does any allocations or deallocations
+of a formal access type. A way to name the storage pool of an access type in a global specification
+would eliminate this problem.</p>
 <h2 class="head">!recommendation</h2>
-<p class="text">To help in describing the effects of the (implicit) storage pool calls associated
+<p class="txts">To help in describing the effects of the (implicit) storage pool calls associated
 with an allocator or an unchecked deallocation, a Storage_Pool attribute reference may be used as a
 global name. This includes the case where the attribute prefix denotes a formal
 access-to-subprogram type. This is an Annex H feature.</p>
+
+<p class="text">Additionally, standard storage pool(s) can be assumed to be synchronized objects.
+They are required to allow concurrent operation, and this should be reflected in the coverage of
+global specifications.</p>
 <h2 class="head">!wording</h2>
+<p class="inst">Modify 13.11(17.1/5):</p>
+
+<p class="wrds">The type(s) of the standard pool(s), and the primitive Allocate, Deallocate, and
+Storage_Size subprograms for the standard pool(s) are nonblocking. Concurrent invocations of these
+subprograms do not conflict with one another (see 9.10) when applied to standard storage pools.
+<span class="ins">{Standard storage pool objects are considered to be synchronized
+objects.}</span></p>
+
+<p class="wrds"><span class="ins">{AARM Discussion: This does not imply that a standard storage
+pool has to be a protected object, only that concurrent calls are supported.}</span></p>
+
+<p class="word"><span class="ins">{AARM Ramification: This implies that the global specification in
+out synchronized is sufficient to cover the implicit call on Allocate generated by an allocator for
+a standard storage pool. Alternatively, a standard storage pool can be included in a global
+specification using the attribute Storage_Pool of an appropriate access type (see H.7).}</span></p>
+<p class="inst">Modify 13.11(18/5):</p>
+<p class="word">If Storage_Size is specified for an access type T, an implementation-defined pool P
+is used for the type. The Storage_Size of P is at least that requested, and the storage for P is
+reclaimed when the master containing the declaration of the access type is left. If the
+implementation cannot satisfy the request, Storage_Error is raised at the freezing point of type T.
+The storage pool P is used only for allocators returning type T or other access types specified to
+use T&#39;Storage_Pool. Storage_Error is raised by an allocator returning such a type if the
+storage space of P is exhausted (additional memory is not allocated). The type of P, and the
+primitive Allocate, Deallocate, and Storage_Size subprograms of P are
+nonblocking.<span class="ins">{ Concurrent invocations of these subprograms do not conflict with
+one another (see 9.10) when applied to P, and P is considered a synchronized object.}</span></p>
+<p class="word"><span class="del">[Editor&rsquo;s note: The concurrent invocation wording is
+missing from this implementation-defined pool; note that this is <i>not</i> a standard storage
+pool, but we want similar rules to apply to it as do standard storage pools.]</span></p>
 <p class="inst">Add after H.7(4/5):</p>
 <p class="word">An <span class="ntrm">object_name</span> used as a
 <span class="ntrm">global_name</span> may also be an <span class="ntrm">attribute_reference</span>
@@ -57,19 +103,20 @@
 AI attempts to address this. We only enforce checks on storage pools if the restriction
 No_Hidden_Indirect_Globals is present, since without that restriction the use of access types is
 not necessarily reflected at all within global aspects.</p>
+
+<p class="txts">For standard storage pools, we define them to be synchronized objects. In
+particular, allocation needs to be included. We worry about allocation because if we were to write
+&quot;Global =&gt; <b>null</b>&quot; for a function that returns the result of an allocator, that
+implies that the function returns the same result on each invocation, which is clearly not the
+case. But this global specification would be illegal, since the implicit call on Allocate needs to
+be covered by the global specification, and the standard storage pool object is a global
+synchronized object. It either has to be named with a Storage_Pool attribute, or a more general
+specification like <b>in out synchronized</b> needs to be used. &nbsp;</p>
 
-<p class="text">For standard storage pools, we don&#39;t worry about deallocation or Storage_Size,
-as they are not presumed to have any interesting side effects. We worry about allocation because if
-we were to write &quot;Global =&gt; <b>null</b>&quot; for a function that returns the result of an
-allocator, that implies that the function returns the same result on each invocation, which is
-clearly not the case. We don&#39;t worry about subprograms whose outputs don&#39;t include any
-parts that are visibly of an access type, to be consistent with the model that such
-&quot;hidden&quot; access types are presumed to be &quot;well behaved&quot;. Clearly such an
-assumption is not always true, but we choose to follow this assumption consistently for the
-purposes of the Global aspect. Presuming they are &quot;well behaved&quot; then one would expect,
-for example, an equality operator over two &quot;compound&quot; objects involving hidden levels of
-indirection would follow those levels of indirection rather than having the equality depend on the
-particular values of the internal access values.</p>
+<p class="text">Note that AI22-0059-1 addresses a related issue, more formally defining the meaning
+of &ldquo;Concurrent invocations of these subprograms do not conflict with one another (see
+9.10)&rdquo; in the 13.11 wording above. Adoption of AI22-0059-1 does not eliminate the need to
+explicitly state that implementation-created storage pools can be treated as synchronized.</p>
 <h2 class="head">!example</h2>
 
 <p class="codb">&nbsp; &nbsp; &nbsp; &nbsp; <b>type</b> A <b>is</b> <b>access</b> Integer;<br>

Questions? Ask the ACAA Technical Agent