To: J3 J3/25-173r1 From: generics Subject: Edits for TEMPLATES: REQUIREMENT and REQUIRE Date: 2025-October-14 References: 25-135r2, 25-136r2, 25-172, 25-138r1 Introduction ============ This is the 4th of 6 papers that provide edits for the approved syntax for templates. Straw vote: The REQUIRE statement does not need "[::]" at this time, but we note that various other bits of the BNF also have unnecesary optional "[::]". E.g., various attribute specification statements: DIMENSION, INTENT, SAVE, ... Should the optional "::" be removed from the BNF for the REQUIRE statement? YES 0 NO 12 UNDECIDED 4 Section 1 ========= * Append the following at the end of the clause from paper 25-137. tt.6 REQUIREMENT construct A REQUIREMENT construct specifies characteristics of a set of deferred arguments, and is intended to facilitate reuse of patterns within templates and other requirements. A REQUIREMENT construct is a specification construct and a scoping unit. Rtt30 <> [ ] ... ... Rtt30a <> REQUIREMENT { [] } Rtt30b <> END [REQUIREMENT []] Ctt63 (Rtt30) A shall only appear in the of a main program or module. Ctt65 (Rtt30b) If a appears in the , it shall be identical to the specified in the . Rtt31 <> <> Ctt66 (Rtt31) The within an shall include ABSTRACT or DEFERRED. NOTE Each is local to the REQUIREMENT construct. tt.7 REQUIRE statement A REQUIRE statement provides specifications of deferred arguments by associating them with the deferred arguments of a REQUIREMENT. A REQUIRE statement is a specification statement. Rtt32 <> REQUIRE [::] { [] } Ctt67 (Rtt32) A shall be the name of a REQUIREMENT that is ultimately defined prior to the . NOTE 1 Instantiation arguments in a REQUIRE statement are not required to be deferred arguments. NOTE 2 An instantiation argument that appears in a REQUIRE statement is only given an ultimate specification if it is a deferred argument of the scoping unit in which the REQUIRE statement appears. See tt.2.2.1. {tt.2.2.1 is "General" in consistency.txt} NOTE 3 Examples of REQUIREMENT and REQUIRE: REQUIREMENT R1{U, V, G} DEFERRED TYPE :: U, V DEFERRED INTERFACE FUNCTION G(X) TYPE(U), INTENT(IN) :: X TYPE(V) :: G END FUNCTION END INTERFACE END REQUIREMENT REQUIREMENT R2{U, G} REQUIRE R1{U, U, G} END REQUIREMENT Example REQUIRE statements for the above requirements are shown below, which could appear together in the same template, although they are redundant in this case. REQUIRE R1{T, T, F} REQUIRE R2{T, F} ===END===