To: J3 J3/19-190r1 From: Malcolm Cohen Subject: Interp on NUM_IMAGES and IMAGE_INDEX Date: 2019-August-07 ---------------------------------------------------------------------- NUMBER: F18/013 TITLE: TEAM_NUMBER arguments and intrinsic function are ambiguous KEYWORDS: NUM_IMAGES, IMAGE_INDEX, TEAM_NUMBER, teams DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Consider PROGRAM p n = NUM_IMAGES() n1 = MERGE(1,2,THIS_IMAGE()<2) n2 = MERGE(1,3,THIS_IMAGE()<3) FORM TEAM(n1,x) FORM TEAM(n2,y) IF (n1==1) THEN CHANGE TEAM (x) PRINT *,NUM_IMAGES(TEAM_NUMBER=1) !(A) PRINT *,NUM_IMAGES(TEAM_NUMBER=3) !(B) END TEAM END IF END PROGRAM According to 16.9.145 NUM_IMAGES, the TEAM_NUMBER argument "shall identify the initial team or a team whose parent is the same as that of the current team". However, at (A), there are two teams with team number 1 and the same parent, one created by the FORM TEAM with "n1", the other created by the FORM TEAM with "n2". At (B), there is only one team with team number 3 and the same parent as the current team, however, it is not a "sibling" team in that it was not created by the same FORM TEAM statement. Referring to the definition of the term "team number" at 3.145.4: "-1 which identifies the initial team, or positive integer that identifies a team within its parent team" which has the same flaw in that there could be multiple teams within the parent team that have that number. Q1. Was TEAM_NUMBER in NUM_IMAGES, and the "team number" definition, intended to limit the identification to teams created by corresponding FORM TEAM statement executions? Q2. The TEAM_NUMBER argument of IMAGE_INDEX suffers from similar wording. Was this also intended to be limited to "sibling" teams? ANSWER: Yes, this is the intention. Edits are provided. The edits use the terminology "corresponding" executions, as execution on more than one image can hardly be the "same" execution. The edits also use the term "sibling teams". As sibling teams are always created as a group, and really only have meaning when there are more than one, the plural form is probably most appropriate. EDITS: OPTIONAL: [20:27+] Terms and definitions: Insert after the definition of "parent team" "3.145.3+ sibling teams teams created by a single set of corresponding executions of the FORM TEAM statement (11.6.9)" {I don't think we are using "sibling teams" often enough to warrant a special term. Just indexing it should be sufficient.} [20:30] 3.145.4 team number, definition, change "within its parent team" -> "among its sibling teams" making the definition read "-1 which identifies the initial team, or a positive integer that identifies a team among its sibling teams (5.3.4) [same place] Append a (normative) note "Note 1 to entry: Teams are siblings when they were created by corresponding FORM TEAM statement executions." and index "sibling teams" here. {The Note should only be added if we don't make a separate team for sibling teams.} [36:23] 5.3.4 Program execution, para 2, final sentence Replace "Within its parent team," with "Among its sibling teams," making the whole sentence read "Among its sibling teams, each team is identified by its team_number; this is the integer value that was specified in the FORM TEAM statement." {This is just waffle, no need to index "sibling teams".} OPTIONAL: [131:18-19] In 9.6 Image selectors, p3 second sentence Replace "one of the teams that were formed by execution of the FORM TEAM statement for" with "a sibling team of" making the whole sentence read "If a TEAM_NUMBER= specifier appears in an image-selector and the current team is not the initial team, the value of scalar-int-expr shall be equal to the value of a team number for a sibling team of the current team, and the team of the image selector is that team; the object shall be an established coarray in an ancestor team of the current team, or an associating entity of the CHANGE TEAM construct." {Optional because the existing wording seems to be okay as is. This is merely an editorial improvement.} [204:35] 11.6.9 FORM TEAM statement, p1, change "creates new teams" to "creates a set of sibling teams" and index "sibling teams" here. This makes that whole paragraph read: "The FORM TEAM statement creates a set of sibling teams whose parent team is the current team." [380:12-13] In 16.9.97 IMAGE_INDEX, p3 TEAM_NUMBER Change "team whose parent is the same as that of the current team" to "sibling team of the current team" and index "sibling teams" here. making the whole argument read: "TEAM_NUMBER shall be an integer scalar. It shall identify the initial team or a sibling team of the current team." [401:24-25] 16.9.145 NUM_IMAGES, p3 Arguments, TEAM_NUMBER argument, Change "team whose parent is the same as that of the current team" to "sibling team of the current team" and index "sibling teams" here. This makes that whole argument read: "TEAM_NUMBER shall be an integer scalar. It shall identify the initial team or a sibling team of the current team." [421:9]16.9.189 TEAM_NUMBER([TEAM]), p5 Result Value, Change "within its parent team" to "among its sibling teams", and index "sibling teams" here. This makes that whole paragraph read: "The result has the value -1 if the specified team is the initial team; otherwise, the result value is equal to the positive integer that identifies the specified team among its sibling teams." SUBMITTED BY: Malcolm Cohen, Jon Steidel, and John Reid HISTORY: 19-190 m219 Submitted 19-190r1 m219 Merged with 19-178. ----------------------------------------------------------------------