To: J3 J3/22-180 From: Malcolm Cohen Subject: Response to Japanese comment JP-004 on the CD Date: 2022-July-20 1. Introduction This is the J3 paper with edits, responding to the comments. It is not the official response document. 2. The comment "According to the definitions in 3.27 and 5.4.7, only data entity can be a coarray, but here it is explained as if a derived type component can be a coarray. Alternatively, if the definition of coarray would be extended to include derived type component, 3.27, 5.4.7 and many other parts should be modified." 3. The suggestions Change "a derived type definition with a coarray component" to "a derived type definition with a component specified with a CODIMENSION clause" Alternatively, change "data entity that has nonzero corank" to "entity that has nonzero corank" in 3.27 and 5.4.7, and change "coarray" to "coarray object" in many parts of 5.4.7 and other clauses. 4. Concise ambiguity There is a general ambiguity in our style in the document, where we have "component" meaning component of a type, "structure component" meaning that part of an object of the type, and finally "component" is short for "structure component" when we are talking about objects (of a type that has components). This extends to all the useful variations, e.g. we have "ultimate component" meaning both the component of a type, and the corresponding part of an object of the type. 5. Discussion of the problem In 5.4.7, where it says "A coarray is a data entity that has nonzero corank" it is likely that "data entity" was intended to capture components of a type, otherwise it could have just said "variable". That is, none of the other possibilities of data entity may have corank nonzero; viz data entity is data object, or result of the evaluation of an expression, or the result of the execution of a function reference; ...only "data object" can have nonzero corank. Furthermore, data object is constant, or variable, or subobject of a constant And of those, only "variable" can have nonzero corank. But the whole rest of 5.4.7 is just about coarray variables. "coarray component" appears at [xii] Foreword [xiii] Introduction [74:1] 7.5.4.3 Coarray components - this is mostly talking about components of types, thus not objects [115:10] 10.2.1.3 Interpretation of intrinsic assignments, p15 - these are structure components, thus objects "coarray potential subobject" appears at [67:29] 7.5.2.1 Syntax of a derived-type definition, C741 - this is components of types, not objects [72] C753, similar [101] C825, similar but would work if reworded for objects [113] C869, structure components [114] C871, C872, ditto [142] C953, components of types [147] p10. structure components [148] similar [170] Intrinsic assignment, components of types, could be reworded [211] structure components [323] ditto [455] C1603,C1604 etc. 6. Proposed solution As suggested in the comment, either we make "coarray component" work, or we change it to something else, perhaps the ugly "component with nonzero corank". This paper suggests that we should indeed allow components (of a type) to be coarrays, and that to avoid changing many "coarray" occurrences to "coarray object", we simply say that requirements and semantics for a "coarray" that only apply to a data object, do not apply to components of a type. This is the minimal change to the standard. 7. Edits to 22-007r1 [6:28] 3.27 coarray, definition, "data entity" -> "component, or variable," making the whole definition read "component, or variable, that has nonzero corank (5.4.7)" {Allow coarray components.} [42:22] 5.4.7 Coarray, p1, first paragraph "data entity" -> "component (ref 7.5.4.3 Coarray components), or variable,", "; it" -> ". A coarray variable", "It" -> "A coarray", making the whole first paragraph read "A coarray is a component (7.5.4.3), or variable, that has nonzero corank. A coarray variable can be directly referenced or defined by other images. A coarray may be a scalar or an array." [42:23+] Insert new paragraph "Requirements and semantics for coarrays that refer to properties that are possessed by variables, but not components, only apply to coarray variables." {Remove need to review every occurrence of "coarray" in the standard to work out whether it applies to components or not.} ===END===