Language Change Specification for Allow Protected Type Method Parameters to be Access Types, Protected Types (functions), and File Types

LCS Number: LCS-2016-004
Version: 2 {28-Jan-2017}
1 {08-Jan-2017}
Date: 08-Jan-2017
Status: Voting
Author: Jim Lewis
Email: Main.JimLewis
Source Doc: Method with AT and FT parms
History Doc: history
Summary: Allow Protected Type Method Parameters to be Access Types, Protected Types (functions), and File Types

Style Notes

Changes are shown in red font. Deletions are crossed out. Editing notes in green font.

Details of Language Change

Section 5.6.2 Protected type declarations

004.1: [Edit section 5.6.2 paragraph 4 (BNF counted as 1 paragraph) on page 58]

[Edit note: This edit superceeds the edit made by LCS_2016_014]

Each subprogram specified within a given protected type declaration defines an abstract operation, called a method, that operates atomically and exclusively on a single object of the protected type. In addition to the object of the protected type operated on by the subprogram, parameters may be explicitly specified in the formal parameter list of the subprogram declaration of the subprogram. Such formal parameters shall not be of an access type or a file type; moreover, they shall not have a subelement that is of an access type. Additionally, in the case of a function subprogram, the return type of the function shall not be of an access type; moreover, it shall not have a subelement that is of an access type.

004.2: [Edit Delete Note 2 on bottom of page 58]

[Edit note: This edit supercedes the edit in LCS_2016_014, however, if any of the original restrictions are maintained (no access types on parameters or return values) then, the edit in LCS_2016_014 should be used]

NOTE 2-A parameter type of a method or the return type of a function method may be a formal generic type or have a subelement of a formal generic type. However, for an instance of the enclosing declaration that defines the formal generic type, a check is required that the actual generic type is neither an access type nor contains a subelement of an access type. Depending on the implementation, this check may be done during analysis of the instantiation, or it may be deferred until the design hierarchy is elaborated.

004.3: [Add Add paragraph at bottom of page 58 - before notes and/or examples at end of 5.6.2]

After a method completes, it is erroneous if a data object internal to a protected type and a a data object external to a protected type both have a reference, either directly or through a series of references, to the same object.



Comments

Topic revision: r20 - 2017-07-16 - 19:02:51 - JimLewis
 
Copyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback