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

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

--- ai22s/ai22-0045-1.html	2022/06/17 06:12:19	1.1
+++ ai22s/ai22-0045-1.html	2022/09/03 05:35:45	1.2
@@ -1,27 +1,45 @@
-<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0045-1/01</title>
+<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0045-1/02</title>
 <style type="text/css">
 table td,table th{padding:0}
-.c17{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}
-.c13{text-decoration-skip-ink:none;-webkit-text-decoration-skip:none;color:#1155cc;text-decoration:underline}
-.c15{border-spacing:0;border-collapse:collapse;margin-right:auto}
-.c14{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
-.c6{color:inherit;text-decoration:inherit}
-.c16{height:0pt}
+.c26{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}
+.c16{border-spacing:0;border-collapse:collapse;margin-right:auto}
+.c25{text-decoration-skip-ink:none;-webkit-text-decoration-skip:none;text-decoration:underline}
+.c2{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
+.c24{color:inherit;text-decoration:inherit}
+.c18{border:1px solid black;margin:5px}
+.c6{color:#999999}
+.c19{color:#006600}
+.c34{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}
+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}
 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:#005500}
+SPAN.del{color:#880000}
 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}
+SPAN.a4{text-decoration-skip-ink:none; -webkit-text-decoration-skip:none; text-decoration:underline; color:#006600}
+P.a9{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.a34{text-decoration-skip-ink:none; -webkit-text-decoration-skip:none; text-decoration:underline; color:#1155cc}
+SPAN.a51{text-decoration-skip-ink:none; -webkit-text-decoration-skip:none; text-decoration:underline;font-family:"Arial","Liberation Sans",sans-serif; color:#999999}
+SPAN.a52{color:#666666}
+SPAN.a53{font-family:"Arial","Liberation Sans",sans-serif; color:#888888}
+SPAN.a54{font-family:"Arial","Liberation Sans",sans-serif; font-style:italic}
+SPAN.a55{font-family:"Arial","Liberation Sans",sans-serif; color:#b7b7b7}
+SPAN.a56{font-family:"Arial","Liberation Sans",sans-serif; color:#999999}
+SPAN.a57{color:#999999}
+SPAN.a58{text-decoration-skip-ink:none; -webkit-text-decoration-skip:none; text-decoration:underline;font-family:"Arial","Liberation Sans",sans-serif}
+SPAN.a59{text-decoration-skip-ink:none; -webkit-text-decoration-skip:none; text-decoration:underline}
+P.a60{margin-bottom:0; margin-top:0; margin-left:42pt; margin-right:0; color:#000000; font-size:11pt; font-family:"Times New Roman","Times",serif; padding-top:0pt; padding-bottom:20pt; line-height:1.330909090909091; orphans:2; widows:2; text-align:left; t
ext-decoration:none; vertical-align:baseline; font-style:normal; font-weight:400}
 </style>
-</head><body class="c14"><p class="a1">AI22-0045-1</p>
+</head><body class="c2 doc-content"><p class="a9">AI22-0045-1</p>
 <p class="head">!standard 2.8(6/5) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;22-06-16 &nbsp;AI22-0045-1/01</p>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;22-08-30 &nbsp;AI22-0045-1/02</p>
 <p class="head">!standard 2.8(7/3)</p>
 <p class="head">!standard 2.8(7.1/3)</p>
 <p class="head">!standard 2.8(7.2/3)</p>
@@ -34,8 +52,42 @@
 <p class="head">!qualifier Clarification</p>
 <p class="head">!subject Issues with pragma placement</p>
 <h2 class="head">!summary</h2>
-<p class="text">*** TBD.</p>
+<p class="text">Five kinds of pragmas are identified, with their own placement restrictions.
+&nbsp;Pragma Assert and pragma Inspection_Point are executable pragmas. &nbsp;The other kinds are
+configuration, context, aspect-related, and control.</p>
 <h2 class="head">!issue</h2>
+<p class="text">Pragma placement is currently defined in RM 2.8 (5-8) as follows:</p>
+<p class="word"><span class="ntrm">Pragma</span>s are only allowed at the following places in a
+program: </p>
+<p class="wind">6/5 &nbsp; &nbsp; &nbsp; &nbsp;After a semicolon delimiter, but not within a
+<span class="ntrm">fo</span><span class="ntrm">rmal_part</span><span class="c25">,
+</span><span class="a58">discriminant_part</span><span class="a59">, or
+</span><span class="a58">declare_expression</span>.</p>
+<p class="wind">7/3 &nbsp; &nbsp; &nbsp; &nbsp;At any place where the syntax rules allow a
+construct defined by a syntactic category whose name ends with
+&ldquo;<span class="ntrm">declaration</span>&rdquo;, &ldquo;<span class="ntrm">item</span>&rdquo;,
+&ldquo;<span class="ntrm">statement</span>&rdquo;, &ldquo;<span class="ntrm">clause</span>&rdquo;,
+or &ldquo;<span class="ntrm">alternative</span>&rdquo;, or one of the syntactic categories
+<span class="ntrm">variant</span><span class="ntrm"> </span>or
+<span class="ntrm">exception_handler</span>; but not in place of such a construct if the construct
+is required, or is part of a list that is required to have at least one such construct.</p>
+<p class="word">7.1/3 &nbsp; &nbsp; &nbsp; &nbsp;In place of a <span class="ntrm">statement</span>
+in a <span class="ntrm">sequence_of_statements</span>.</p>
+<p class="word">7.2/3 &nbsp; &nbsp; &nbsp; &nbsp;At any place where a
+<span class="ntrm">compilation_unit</span> is allowed. </p>
+<p class="wrds">8 &nbsp; Additional syntax rules and placement restrictions exist for specific
+pragmas. </p>
+
+<p class="txts">These rules overlap with one another, and do not make sense for certain kinds of
+pragmas. &nbsp;Pragmas that are &quot;lexical&quot; in nature, such as turning on and off compiler
+modes of various sorts, such as listing or optimization, can be accommodated almost anywhere.
+&nbsp;On the other hand, pragmas that have some executable semantics only make sense in places
+where execution is normally occurring, such as in a sequence of statements or declarative_items.
+Should we distinguish such kinds of pragmas here, or rely on additional rules scattered throughout
+the manual? (define most of the basic rules here)</p>
+
+<p class="txts">Other more specific issues:</p>
+
 <p class="txts">(1) One would expect that a pragma Assert is a master. We would not want function
 results from the evaluation of an Assert expression hanging around. AI22-0013-2 attempted to
 clarify this by modifying 2.8(12) to say:</p>
@@ -65,7 +117,7 @@
 <p class="text">For example, 2.8(7/3) allows a pragma at the place of an _alternative; this allows
 a pragma at the head of a case statement:</p>
 <p class="text">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</p>
-<a id="t.024f980dd1c2e583552258bb124aff053df8ef8b"></a><a id="t.0"></a><table class="c15"><tr class="c16"><td class="c17">
+<a id="t.024f980dd1c2e583552258bb124aff053df8ef8b"></a><a id="t.0"></a><table class="c16"><tr class="c34"><td class="c26">
 <p class="codt"><b>case</b> P <b>is</b><br>
  &nbsp; <b>pragma</b> Assert (...) &nbsp;-- (1)<br>
  &nbsp; <b>when</b> 1 =&gt; ... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -- (2)<br>
@@ -83,48 +135,136 @@
 in the list of declare_items, specifically the place that 2.8(6/5) is trying to disallow. Something
 is wrong here.</p>
 <h2 class="head">!recommendation</h2>
-<p class="txts">For (1), we explicitly state the kinds of constructs that are being executed.</p>
+<p class="txts">In general, we propose to provide more guidelines about pragmas in 2.8.</p>
 
-<p class="txts">For (3), we make no change, as only pragma Assert is involved and it specifically
-has a rule to prevent this problem.</p>
+<p class="txts">For (1), we explicitly state the kinds of constructs that are being executed.</p>
 
-<p class="txts">For (2), this version of the AI makes no recommendation. [** the ARG needs to
-decide on an approach and assign someone to complete a proposal. **]</p>
+<p class="txts">For (2), we propose to identify multiple kinds of pragmas, and limit which
+placement rules apply to each kind of pragma.</p>
 
-<p class="text">For (4), this version of the AI makes no recommendation; possibly the solution to
-(2) will also solve (4). [** The ARG needs to decide whether some or all pragmas should be allowed
-in declare_expressions **]</p>
+<p class="txts">For (3), we propose to introduce the notion of an executable pragma as one of the
+kinds of pragmas (as mentioned in (2) above), and then indicate that the Assert pragma is an
+executable pragma as is an Inspection_Point pragma.</p>
+
+<p class="text">For (4), we permit pragmas within declare expressions, but allow implementations to
+ignore pragmas that are not executable (pragma Assert and pragma Inspection_Point are the only
+language-defined executable pragmas).</p>
 <h2 class="head">!wording</h2>
+<p class="inst">[Author&#39;s NOTE: I have <span class="c6">grayed out</span>&nbsp;the parts of the
+RM wording that are proposed to be deleted, to ease reading. &nbsp;Does it
+help?]<sup><a href="#cmnt1">[a]</a></sup></p>
+<p class="inst">Modify 2.8(5-8) as follows:</p>
+<p class="word"><span class="ins">{There are five kinds of pragmas: configuration pragmas, context
+pragmas, aspect-related pragmas, executable pragmas, and control pragmas, and each has its own
+placement restrictions:</span></p>
+<ul class="wbl"><li>A <i>configuration</i> pragma is allowed at the beginning of a compilation,
+preceded only by other pragmas. &nbsp;In addition, certain pragmas usable as configuration pragmas
+can also control configuration more locally, and as such can appear immediately within a
+<span class="ntrm">declarative_part</span> or a <span class="ntrm">package_specification </span>at
+the place of a <span class="ntrm">basic_declaration</span>, as defined for specific pragmas.</li>
+<li>A <i>context</i> pragma is allowed at the place of a <span class="ntrm">use_clause</span> in a
+<span class="ntrm">context_clause.</span>&nbsp; </li>
+<li>An <i>aspect-related</i> pragma is allowed in place of an
+<span class="ntrm">aspect_clause</span>, or immediately following (except for other pragmas) a
+compilation unit. &nbsp;</li>
+<li>An <i>executable</i> pragma is allowed in place of a
+<span class="ntrm">simple_statement</span>, or in place of a
+<span class="ntrm">basic_declaration</span> or a <span class="ntrm">declare_item</span>.
+&nbsp;</li>
+<li>A <i>control</i> pragma is allowed any place where any other kind of pragma is permitted, and
+in addition is <span class="del">[<span class="a55">Pragma</span><span class="c6">s are
+only</span>]</span> allowed at the following places in a program: </li>
+</ul>
+<ul class="wbl"><li>After a semicolon delimiter, but not within a
+<span class="ntrm">formal_part</span><span class="a4">[</span><span class="c6">,</span><span class="c19">]
+</span>{or} <span class="ntrm">discriminant_part</span><span class="c19">[</span><span class="c6">,
+or </span><span class="a56">declare_expression</span>].</li>
+<li>At any place where the syntax rules allow a construct defined by a syntactic category whose
+name ends with &ldquo;<span class="ntrm">declaration</span>&rdquo;,
+&ldquo;<span class="ntrm">item</span>&rdquo;, &ldquo;<span class="ntrm">statement</span>&rdquo;,
+&ldquo;<span class="ntrm">clause</span>&rdquo;, or
+&ldquo;<span class="ntrm">alternative</span>&rdquo;, or one of the syntactic categories
+<span class="ntrm">variant</span> or <span class="ntrm">exception_handler</span>; but not in place
+of such a construct if the construct is required, or is part of a list that is required to have at
+least one such construct. [</li>
+<li><span class="c6">In place of a
+</span><span class="c6"><a class="c24" href="http://www.ada-auth.org/standards/2xaarm/html/AA-5-1.html#S0167">statement</a></span><span class="c6">
+in a </span><span class="a56">sequence_of_statements</span><span class="a57">.</span></li>
+<li><span class="c6">At any place where a
+</span><span class="a56">compilation_unit</span><span class="c6"> is allowed.</span>]</li>
+</ul>
+<p class="a60">Additional syntax rules and placement restrictions exist for specific pragmas. </p>
+
+
 <p class="inst">Modify 2.8(12): (Note: This includes the approved &nbsp;modification of &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AI22-0013-2, which is not yet in any
 published draft).</p>
 
-<p class="wrds">Any pragma that appears at the place of an executable construct is
-executed<span class="ins">{, and is treated for the purposes of other rules of the language as
-being a <span class="ntrm">simple_statement</span> if it appears at the place of a
-<span class="ntrm">statement</span>, or a <span class="ntrm">basic_declaration</span> if it appears
-at the place of a <span class="ntrm">declarative_item</span>}</span>. Unless otherwise specified
-for a particular pragma, this execution consists of the evaluation of each evaluable pragma
-argument in an arbitrary order.</p>
-
-<p class="text">*** TBD: A fix for (2) and for (4).</p>
+<p class="wrds">An<span class="del">[<span class="c6">y</span>]</span>
+<span class="ins">{executable or aspect-related}</span> pragma that appears
+<span class="del">[<span class="c6">at the</span>]</span><span class="ins">{in}</span> place of an
+executable construct is executed<span class="ins">{, and is treated for the purposes of other rules
+of the language as being a <span class="ntrm">simple_statement, basic_declarative_item</span>, or
+<span class="ntrm">declare_item </span>according to where it appears}</span>. Unless otherwise
+specified for a particular pragma, this execution consists of the evaluation of each evaluable
+pragma argument in an arbitrary order.</p>
+
+<p class="inst">Add after 2.8(15):</p>
+<p class="wrds">An implementation may ignore a non-executable pragma within a
+<span class="ntrm">declare_expression</span>.</p>
+
+<p class="wrds">AARM note: This is simply to ease implementation. &nbsp;A warning should be
+provided.</p>
+
+<p class="inst">Modify 2.8(20):</p>
+<p class="word">The forms of <span class="ins">{the}</span> List, Page, and Optimize
+<span class="ins">{<i>control</i>}</span> <span class="ntrm">pragma</span>s are as follows:</p>
+<p class="inst">Modify 10.2.1(23):</p>
+<p class="word">A <span class="ntrm">pragma</span> Elaborate or Elaborate_All <span class="ins">{is
+a <i>context</i> pragma (see 2.8)[Redundant:, and}</span> is only allowed within a
+<span class="ntrm">context_clause</span><span class="ins">{]}</span>.</p>
+<p class="inst">Modify 11.4.2(4/2):</p>
+<p class="word">A <span class="ntrm">pragma</span> Assert <span class="ins">{is an
+<i>executable</i> pragma (see 2.8)[Redundant:, and}</span> is allowed at the place where a
+<span class="del">[<span class="a51"><a class="c24" href="http://www.ada-auth.org/standards/2xaarm/html/AA-3-11.html#S0087">declarative_item</a></span>]</span><span class="ins">{<span class="ntrm">basic_declaration</span>,
+<span class="ntrm">declare_item</span>,}</span> or
+<span class="del">[<span class="a52">a</span>]</span>
+<span class="ntrm">statement</span><span class="ntrm"> </span>is
+allowed<span class="ins">{]}</span>.</p>
+<p class="inst">Modify 13.1(4/1):</p>
+<p class="word">A representation pragma <span class="ins">{is an <i>aspect-relate</i><i>d</i>
+pragma (see 2.8)[Redundant:, and}</span> is allowed only at places where an
+<span class="ntrm">aspect_clause</span> or <span class="ntrm">compilation_unit</span> is
+allowed<span class="ins">{]}</span>.</p>
+<p class="inst">Modify H.3.2(4):</p>
+<p class="word">A pragma Inspection_Point<span class="ins">{is an <i>execu</i><i>table</i> pragma
+(see 2.8)[Redundant:, and}</span> is allowed wherever a
+<span class="del">[<span class="a53">declarative_item</span>]</span><span class="ins">{<span class="ntrm">basic_declaration</span>,
+<span class="ntrm">declare_item</span>,}</span> or
+<span class="ntrm">statement</span><span class="ntrm"> </span>is
+allowed<span class="ins">{]}</span>. Each
+<i>object</i><span class="a54">_</span><span class="ntrm">name</span> shall statically denote the
+declaration of an object. </p>
+<p class="inst">Modify J.15(1/3):</p>
+<p class="word">Pragmas can be used as an alternative to
+<span class="ntrm">aspect_specification</span>s to specify certain aspects. <span class="ins">{Such
+pragmas are <i>aspect-related</i> pragmas (see 2.8).}</span></p>
 <h2 class="head">!discussion</h2>
-<p class="txts">For (1), we should explicitly state the sort of constructs that we are &quot;in the
-place of&quot;. This should eliminate any grey area when answering semantic questions about the
-execution of a pragma.</p>
-
-<p class="txts">For (2), the least obtrusive fix would be to attempt to eliminate 2.8(6/5)
-altogether. The author does not know of any places allowed by that rule that are not allowed by
-some other rule (especially 2.8(7/3)). (If we go this way, this would need to be checked
-carefully.) In the absence of that rule, the other rules all provide at least some idea of what
-construct is being replaced by a pragma. If there are places allowed by 2.8(6/5) that aren&#39;t
-allowed by one of the other rules, we could add rule(s) for those explicitly.</p>
+<p class="txts">For (1), we now limit &quot;executable&quot; pragmas to being in place of a
+simple_statement, a basic_declaration, or a declare_item. &nbsp;As mentioned the only
+language-defined executable pragmas are Assert and Inspection_Point, and these will be treated as
+the kind of construct they replace, so you could, for example, put a statement label on an
+Inspection_Point.</p>
+
+<p class="txts">For (2), we define five kinds of pragmas. &nbsp;The term &quot;control&quot; pragma
+is not ideal, but since it included the List pragma, and the Optimize pragma, it seemed reasonable.
+&nbsp;&quot;Lexical&quot; pragma seemed like a misnomer for an Optimize pragma.</p>
 
 <p class="txts">A more general fix would be to replace 2.8(6/5, 7/3, 7.1/3, and 7.2/3) with actual
-syntax placement rules. This idea was rejected in AI05-0163-1 was &quot;requiring the inspection of
-more than 100 BNF rules&quot;. Tucker Taft suggests that modification of 5 rules would allow all of
-the places people really care about.</p>
+syntax placement rules. This idea was rejected in AI05-0163-1 because it was &quot;requiring the
+inspection of more than 100 BNF rules&quot;. Tucker Taft suggests that modification of 5 rules
+would allow all of the places people really care about.</p>
 
 <p class="text">&nbsp; &nbsp; &nbsp; &nbsp; simple_statement ::= ... | pragma</p>
 <p class="text">&nbsp; &nbsp; &nbsp; &nbsp; library_unit_declaration ::= ... | pragma</p>
@@ -140,49 +280,26 @@
 <p class="txts">However, these rules would not allow pragmas in a few places the current rules
 allow, including between the &quot;is&quot; and first &quot;when&quot; of a case statement, between
 the &quot;select&quot; and an alternative for select_statements. These positions are only likely to
-be useful for lexical pragmas like pragma Page and pragma List(Off), and even then it seems bizarre
-to split a statement in a listing. Can we eliminate these locations? (Tucker suggested checking the
-GNAT code database for such placements; an AdaCore employee needs to volunteer to do that if we
-want to consider this.)</p>
-
-<p class="txts">For (3), pragmas that require execution, but that are not at the place of an
-executable construct, should be illegal. Implementations should not be required to invent
-mechanisms solely to ensure that oddly placed can be executed.</p>
+be useful for control pragmas like pragma Page and pragma List(Off), and even then it seems a bit
+bizarre to split a statement in a listing. However, now that we have multiple kinds of pragmas,
+using syntax rules gets more complicated, so we have decided to stick with English-based syntax
+rules.</p>
+
+<p class="txts">For (3), we now limit executable pragmas to appearing in place of a
+simple_statement, a basic_declaration, or a declare_item, so that eliminates the danger of having
+masters appearing in weird places.</p>
 
 <p class="txts">For pragma Assert, there already is a rule (11.4.2(4/2)) which prevents pragma
 placements like the first one in the third Issue. There are not any other language-defined pragmas
-that need to execute, so there is not actually a language problem.</p>
+that need to execute, though Inspection_Point is almost like an executable construct, since it
+represents a &quot;break&quot; in the flow of code to allow inspection of an intermediate state. In
+any case, it is unusual to have two closely related rules in very different parts of the RM,
+especially as it would be easy for new pragmas to forget the required placement rule. So we have
+moved the special placement rules for pragma Assert and Inspection_Point to 2.8, but we leave
+behind redundant versions of them.</p>
 
-<p class="txts">However, it still is unusual to have two necessary rules in very different parts of
-the RM, especially as it would be easy for new pragmas to forget the required placement rule. We
-could fix this by defining a name for such pragmas, perhaps as the follows:</p>
-
-<p class="wrds">A pragma that *requires execution* shall appear in the place of an executable
-construct. Specific pragmas that require execution are identified throughout this document.</p>
-
-<p class="txts">And then replace 11.4.2(5/2) with &quot;Pragma Assert requires
-execution.&quot;.</p>
-
-<p class="txts">This isn&#39;t obviously better, so the author is not proposing it.</p>
-
-<p class="text">For (4), the appropriate fix depends on two factors:</p>
-<p class="text">&nbsp; &nbsp;(A) Whether we still want to ban pragmas in declare_expressions;
-and</p>
-<p class="txts">&nbsp; &nbsp;(B) how we chose to solve issue (2).</p>
-
-<p class="text">Assuming that we still want to ban pragmas in declare_expressions, then if, for
-(2), we decide to explicit add pragmas to the grammar, then we need to do nothing (as pragmas would
-need to be explicitly added to declare_expressions to allow them). If we do not, then we need to
-add an</p>
-<p class="txts">exception to 2.8(7/3) excluding declare_expressions from this rule.</p>
-
-<p class="txts">At press-time, a suggestion was made to allow pragmas in declare expressions so
-that a pragma Assert could be included. (Author&#39;s aside: note that the placement rule
-11.4.2(5/2) would not allow pragma Assert in a declare expression even if it was included in the
-grammar and/or the placement rules of 2.8, since a declare expression does not contain
-basic_declarative_items. Both this rule and the proposed 2.8(12) would need modification to allow
-pragma Assert in a declare expresion. This issue was included in this AI in part because it affects
-the wording needed for solving the other issues.)</p>
+<p class="txts">For (4), we choose to allow pragmas in declare_expressions, but permit
+implementations to ignore (with a warning, presumably) anything but executable pragmas. </p>
 
 <p class="txts">The intent of all of the rules surrounding declare expressions was to keep the
 implementation extremely simple, and to allow an entire expression to be the smallest unit of
@@ -190,11 +307,11 @@
 some implementations, and it did not seem important enough of a capability to require
 implementation to change their basic design.</p>
 
-<p class="txts">For example, is it important to allow the specification of pragma Suppress and
+<p class="txts">For example, how important is it to allow the specification of pragma Suppress and
 (especially, since it cannot be ignored) pragma Unsuppress in the middle of an expression? Consider
 this:</p>
 
-<a id="t.a96c388e7f2a605d95fd8ae0714da66c1e098d80"></a><a id="t.1"></a><table class="c15"><tr class="c16"><td class="c17">
+<a id="t.a96c388e7f2a605d95fd8ae0714da66c1e098d80"></a><a id="t.1"></a><table class="c16"><tr class="c34"><td class="c26">
 <p class="codt"><b>procedure</b> P <b>is</b><br>
  &nbsp; &nbsp;<b>pragma</b> Suppress (All_Checks);<br>
 <b>begin</b><br>
@@ -207,19 +324,14 @@
 <p class="txts">If the implementation normally suppresses overflow checks in the scope of a pragma
 Suppress, the pragma Unsuppress would have to turn the checks back on - an overflow check is
 required at the multiply in the above. However, if the implementation uses global flags to control
-overflow and expressions are evaluated at one time, it would require substantial efforts to get
+overflow and expressions are evaluated at one time, it might require substantial efforts to get
 this example to work. (Similar issues apply to other pragmas that affect global settings, such as
 Optimize.)</p>
 
-<p class="txts">These sorts of expressions were designed to be used in assertions like predicates
+<p class="text">These sorts of expressions were designed to be used in assertions like predicates
 and preconditions. Those are not even evaluated where they are declared, so one would have to be
 able to defer the effect of a pragma until some later point. For some pragmas, that would be a new
-capability. (The author also wonders about putting an (pragma) assertion inside of another
-assertion; it seems unusual.)</p>
-
-<p class="text">The author believes that allowing pragmas in declare expressions should be limited
-only to specific pragmas that have been determined to be safe, and others not be allowed (or at
-least, not be required to be allowed).</p>
+capability.</p>
 <h2 class="head">!examples</h2>
 <p class="text">(See Issue and Discussion.)</p>
 <h2 class="head">!ACATS test</h2>
@@ -227,10 +339,14 @@
 <h2 class="head">!appendix</h2>
 
 <p class="txts">This AI in partially in response to ARG Github Issues #7
-(<span class="c13"><a class="c6" href="https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/7">https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/7</a></span>)
+(<span class="a34"><a class="c24" href="https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/7">https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/7</a></span>)
 and #9
-(<span class="c13"><a class="c6" href="https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/9">https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/9</a></span>).</p>
+(<span class="a34"><a class="c24" href="https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/9">https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/9</a></span>).</p>
 
 <p class="txts">*********************************************************</p>
 
-</body></html> 
+<div class="c18"><p class="text"><a href="#cmnt_ref1">[a]</a>The HTML converter automatically puts
+deletions in dark red and insertions in dark green (and I&#39;ve found several errors in AIs
+because of this). Doing this by hand as you did however disables that capability and also
+eliminates the check for errors that the automated conversion implies.</p>
+</div></body></html> 

Questions? Ask the ACAA Technical Agent