J3/13-238r1 To: J3 From: Malcolm Cohen Subject: Control of host association Date: 2013 February 12 1. Introduction We have frequently been asked for "better" control over host association. Indeed, this is one of the problematic items identified by the WG23 vulnerabilities annex (as "YOW"). 2. Requirements To extend host association so as to be able to control both importation and "shadowing" (hiding a host entity). Unlike use association, host association can only import entities from (or through) a single host scope, so there is no need for the renaming facility of use association. 3. Specifications (a) To be able to specify that an entity is host-associated. (b) To be able to limit host association to a specific list of names; this shall include the empty set. (c) To be able to prevent inadvertent "shadowing" of host names. (d) No renaming. 4. Syntax (a) Allow IMPORT to be used in a hosted subprogram or BLOCK construct, not just in interface bodies. But not in derived types or in any other construct. (b) Add an "ONLY" clause to IMPORT. To avoid confusion, if any IMPORT statement in a scoping unit has an "ONLY" clause, all the IMPORT statements in that scoping unit shall have ONLY clauses. Although "IMPORT,ONLY:" specifying no entities would appear to satisfy the requirement for preventing import, it does not do so clearly as a subsequent "IMPORT,ONLY: ..." might extend that empty set. Therefore a specific "IMPORT,NONE" statement should be added; if an IMPORT,NONE statement appears in a scoping unit, no other IMPORT statement shall appear in that scoping unit. (c) Add an "IMPORT,ALL", which explicitly imports every host entity; it differs from a blank "IMPORT" (or the default host association) which only imports entities that are not locally declared. An entity imported with IMPORT,ALL shall not be declared locally except to have the ASYNCHRONOUS or VOLATILE attribute. ::= IMPORT [[ :: ] ] | IMPORT, ONLY : | IMPORT, NONE | IMPORT, ALL The prohibitions listed in (a)-(c) shall be constraints. 5. Estimated impact On standard: minor. On processors: relatively minor but not trivial. Conformance with Markham resolution: arguably yes, improves feature consistency vis-a-vis use association. ===END===