J3/16-261r1 To: J3 From: Van Snyder & Malcolm Cohen Subject: Comments on Clause 10 Date: 2016 October 11 1a. Edits accepted (with modifications) [155:19] 10.1.5.2.4 Evaluation of numeric intrinsic operations, p1 "negative-valued primary of type real" -> "negative real value". {Replace convoluted wording with simpler.} [159:6-9] 10.1.5.5.1 Interpretation of relational intrinsic operations, Merge paragraphs 6 and 7 into a single paragraph, removing excessive vertical space. {NEW EDIT. Paragraph numbering done wrong here.} [521:32+] 19.5.2.5 Events that cause the association status of pointers to become undefined, end of subclause, Insert new list item "(17) If a statement contains a function reference in a part of an expression that need not be evaluated, and execution of that function would change the association status of a pointer, the pointer becomes undefined at the completion of evaluation of the expression containing the function reference." {One could possibly deduce this from the text in 10.1.7, but it should be clearly stated and this is where it needs to be stated.} [163:5] 10.1.9.2 Type, type parameters, and shape of a primary, p4, After "declared to be a pointer," delete "or", after "pointer assignment statement" insert ", or as explicitly permitted elsewhere in this document". {The current text prohibits lots of things we explicitly allow.} 1b. Edits rejected [151:2 10.1.3p1] Replace "extension" with "defined" because neither "extension operation" nor "extension operator" is a term that exists anywhere other than here and in the index (which refers only to here). REJECTED: "extension" is used consistently within this subclause and does not have the same meaning as "defined". [151:5 10.1.3p2] Replace "a defined" with "an" because the precedence of any operation depends upon the precedence of its operator. REJECTED: Intrinsic operations have their precedence specified elsewhere, we do not want to specify it again here. [153:14+4 NOTE 10.13] Before "produces" insert "where A and B are both arrays of the same shape" REJECTED: Note is perhaps not very useful, but the meaning is clear. [157:8 10.1.5.3.1p3] "$x_1$ concatenated on the right" could be perversely read to be the opposite of what we intend. Replace "right" with left" and after $x_2$ insert "on the right,". REJECTED: For the same reasons as last meeting. [161:15 10.1.7p2] Append a sentence "If execution of that function could have resulted in the change in allocation or pointer association status of any entity, the allocation status of such an entity is processor dependent, and the pointer association status is undefined." REJECTED: This is handled elsewhere already (9.7.1.3) for allocatables, an edit is included to clause 19 for pointers. [523:21 Annex A] Insert a list item: " o the allocation status of an entity that might have been changed by execution of a function that is not executed because the processor determines that its result is not necessary to evaluate an expression (10.1.7);" REJECTED: This already appears (with a different cross-ref). [162:28 10.1.9.2p1] After "array constructor," insert "the primary is an array and". REJECTED: Unnecessary. [162:32 10.1.9.2p1] Before "If it is" insert "If it is a complex part designator (9.4.4) its type is real and it has the same kind, rank, and shape as the ." [172:28+5 NOTE 10.44] Replace "will be" with "is". REJECTED: Correct as is. [175:0+5 NOTE 10.47] After "some reason" insert ", for example to compute the trace". REJECTED: "some reason" is totally adequate. [175:0+16 last line of NOTE 10.47] Replace "Linear" with "Rank-1". 2. Integer division ------------------- The quotient of an integer division is an integer. For positive dividend and divisor, it is the number of times that the divisor can be subtracted from the dividend without the result becoming negative. The "number of times" is necessarily an integer. With a bit of gynmastics, this can be extended to signed division. The magnitude of the result is in fact the quotient of the absolute values of the divisor and divident. The remainder is discarded. [155:9-13 10.1.5.2.2p1] Replace "mathematical quotient" with "result of mathematical division". Replace "The result of such ... inclusively" with "If the division operation is $x/y$, where $x$ is the first operand and $y$ is the second operand, the magnitude of the result is $q$ where $|q| \times |y| + r = |x|$, with $0 \leq r < |y|$, and the sign of $q$ is the sign of $x \times y$. The second operand, $y$, shall not be zero." REJECTED: Correct as is, we do not want to embark on redefining the fundamentals. 3. "Mathematical equivalence" rule ---------------------------------- 10.1.3p3 states that the general form of an expression establishes a precedence among operators in the same syntactic class. NOTE 10.9 states, for example, that if a containing two or more binary operations + or -, each operand is combined from left to right. This contradicts the discussions of evaluation of intrinsic operations, e.g. 10.1.5.2.4p2, wherein one sees, e.g., "Once the interpretation of a numeric intrinsic operation is established, the processor may evaluate any mathematically equivalent epxression...." The examples in NOTE 10.18 contradict 10.1.3p3 and NOTE 10.9. I think we want to retain the "mathematical equivalence" rule. [151:7-8 10.1.3p3] Replace " order ... determining the" with "mathematical". REJECTED: This is establishing the interpretation. One cannot apply any mathematical equivalence rules until the interpretation has been established. 4. Questions without answers ---------------------------- [10.2.2.3 somewhere] Do we need to say that deferred type parameter values of a pointer object are undefined if the pointer association status of the target is undefined? 16-260 does this in a note, with a remark to the reader of a hope that it's normative somewhere. RESPONSE: Not needed. [179:2-6 10.2.4.2p5] Does this paragraph admit the kinds of race conditions that result in the description of the DO CONCURRENT construct specifying that certain things become undefined, or the restrictions thereon specify that certain things shall not be referenced in a different iteration? The remainder of subclause 10.2.4.2 seems not to admit these problems. RESPONSE: FORALL is slow enough that race conditions do not occur. 5. FORALL statement is still useful ----------------------------------- Are we preparing to throw out the baby with the bath water by making the FORALL statement obsolescent? By extending the argument that it's functionally equivalent to a DO CONCURRENT construct, perhaps we should also make the IF statement obsolescent. Or create a DO CONCURRENT statement that's not a construct, similar to the FORALL statement and IF statement. RESPONSE: obsolescent = a sign saying "this bath water is dirty". ===END===