CVS difference for ai12s/ai12-0280-2.txt

Differences between 1.10 and version 1.11
Log of other versions for file ai12s/ai12-0280-2.txt

--- ai12s/ai12-0280-2.txt	2019/11/15 05:18:42	1.10
+++ ai12s/ai12-0280-2.txt	2021/01/15 04:26:54	1.11
@@ -1,4 +1,4 @@
-!standard 6.1.1(20/3)                                  19-11-08  AI12-0280-2/07
+!standard 6.1.1(20/3)                                  21-01-14  AI12-0280-2/08
 !standard 6.1.1(21/3)
 !standard 6.1.1(22/3)
 !standard 6.1.1(22.1/4)
@@ -121,6 +121,9 @@
 
    A subexpression of a postcondition expression is /unconditionally
    evaluated/, /conditionally evaluated/, or /repeatedly evaluated/.
+   A subexpression is considered unconditionally evaluated unless it 
+   is conditionally evaluated or repeatedly evaluated.
+
    The following subexpressions are repeatedly evaluated:
 
     * A subexpression of a predicate of a quantified_expression;
@@ -129,11 +132,10 @@
 
     * A subexpression of the expression of a container_element_association.
 
-   If a subexpression is not repeatedly evaluated, and not evaluated
-   unconditionally, then it is /conditionally evaluated/, and there is a
-   set of /determining expressions/ that determine whether the
-   subexpression is actually evaluated at run time. Such subexpressions
-   and their determining expressions are as follows:
+   For a subexpression that is conditionally evaluated, there is a set of 
+   /determining expressions/ that determine whether the subexpression is 
+   actually evaluated at run time. Subexpressions that are conditionally
+   evaluated and their determining expressions are as follows:
 
     * For an if_expression that is not repeatedly evaluated, a
       subexpression of any part other than the first condition is
@@ -514,5 +516,58 @@
 "case select" expressions. Since we voted to remove those from the language in 
 Lexington, we need to remove that wording from this AI as well. (I noticed 
 this because of errors from the RM formatting tool.) I've done this.
+
+****************************************************************
+
+From the AARM review of Steve Baird, October 2020
+
+The phrasing in 6.1.1(22.15/5) is peculiar. We stated earlier that we are
+classifying things into three categories:
+    A subexpression of a postcondition expression is unconditionally
+    evaluated, conditionally evaluated, or repeatedly evaluated.
+and then we listed all the things in the "repeatedly evaluated"
+category. So the task at hand is to classify the remaining cases into
+one or the other of the two remaining categories. So we start out with:
+     If a subexpression is not repeatedly evaluated, and not evaluated
+     unconditionally, then it is conditionally evaluated, and  ...
+
+I am concerned about the "and not evaluated unconditionally" wording
+here. It seems like we are assuming that this term has already been
+defined and then using it prematurely. We should not mention
+unconditionally evaluated expressions at all here; just say "here is
+the complete list of repeatedly evaluated expressions" and, after
+that list is given, state that any subexpression of a postcondition
+expression that is neither repeatedly evaluated nor conditionally
+evaluated is defined to be "evaluated unconditionally".
+
+[Editor's response: This sentence was intended to define "evaluated 
+unconditionally", but it is trying to do too much. However, it's too late
+to put a statement about "evaluated unconditionally" at the end, there's 
+way too much text ahead of it.
+
+I think Tucker was trying to do it at the start (that's where the italics are),
+but he tried to do too little there. I think the statement that expressions
+are unconditionally evaluated unless they are one of the other kinds belongs
+at the start.
+
+So I'd suggest splitting 22.11/5 into two paragraphs:
+
+  A subexpression of a postcondition expression is unconditionally evaluated, 
+  conditionally evaluated, or repeatedly evaluated. A subexpression is
+  considered unconditionally evaluated unless it is conditionally evaluated
+  or repeatedly evaluated.
+
+  The following subexpressions are repeatedly evaluated:
+
+And then simplifying 22.15/5 to:
+
+  For a subexpression that is conditionally evaluated, there is a set of 
+  determining expressions that determine whether the subexpression is 
+  actually evaluated at run time. Subexpressions that are conditionally
+  evaluated and their determining expressions are as follows:
+
+Tucker agrees this is an improvement. It was processed as an
+Editorial Review on AI12-0280-2, since no meaning has changed. 
+End Editor's Response.]
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent