J3/13-208 To: J3 From: Van Snyder Subject: Reduce restrictions on specification functions Date: 2013 December 19 Title: Reduce restrictions on specification functions Submitted by: Van Snyder Status: For consideration Basic functionality: Allow specification functions to have procedure arguments. Allow optional dummy arguments of a procedure to be actual arguments to specification functions referenced in restricted expressions. Prohibit specification functions from being internal only to a procedure containing a reference to them. Rationale: Reduces the need for wrappers, and thereby long-term cost. Markham M6 conformance: Remove simple deficiencies. Estimated impact: Minor Detailed specification: Allow a specification function to have procedure dummy arguments, provided the procedure actual arguments are not internal to the procedure in which the reference appears. Allow a specification function to be an internal procedure, provided it is not internal to the procedure containing a reference to it. Allow optional dummy arguments of a procedure to be actual arguments to specification functions referenced in restricted expressions. Draft edits: To estimate scope of project Replace item (11) in the list in 7.1.11p2 with (11) a reference to a specification function where (a) each argument corresponding to a dummy data object is a restricted expression or a dummy argument that does not have the INTENT(OUT) attribute, (b) an optional argument of the procedure containing the reference that is an actual argument to the specification function corresponds to an optional dummy argument of the specification function, and (c) any procededure corresponding to a dummy procedure is not an internal procedure of the scoping unit containing the reference, Replace 7.1.11p5 with "A function is a specification function if it is a pure function \obs{, is not a statement function}, and is not an internal function in a procedure in which it is referenced."