Language Change Specification for Composition with Protected Types

LCS Number: LCS-2016-033
Version: 2 {11-Feb-2017}
1 {26-Dec-2016}
Date: 11-Feb-2017
Status: Voting
Author: Jim Lewis
Email: Main.JimLewis
Source Doc: Composition with Protected Types
More Doc: history
Summary: Composition with Protected Types

Style Notes

[Author Comment: author comments are shown in green]

Text changes are shown in red

Deleted text is shown in red font with a strike thru

Details of Language Change

Section 5.6 Protected Types

Section 5.6.2

033.1: Extend production for protected_type_declarative_item on page 58
protected_type_declarative_item ::= [ยง 5.6.2]
    subprogram_declaration
    | subprogram_instantiation_declaration
    | attribute_specification
    | use_clause
    | private_variable_declaration
    | alias_declaration
    
private_variable_declaration ::= 
    private variable_declaration
    

033.2: New paragraph before notes on page 58
[Note: if we do not make the variables visible in expanded names or visibility, the keyword private is probably not necessary - but it is good for readability. In addition, if we ever want to introduce public variables, this designation will be necessary]

A private variable declaration denotes a variable declaration that is only visible within the scope of the protected type. An alias declared within a protected type delcaration may make a method of the private variable visible. It is an error if an alias declared within a protected type delcaration denotes anything other than a method of a protected type.

Section 8.3

033.3: 2nd to last paragraph on page 109

An expanded name denotes a named entity declared immediately within an elaborated protected type if the prefix denotes an object of the protected type and the suffix is a simple name of a method or an alias whose declaration appears immediately within the protected type declaration.

12.3 Visibility

033.4: List item s on page 188

s) For a subprogram or alias declared immediately within a given protected type declaration: at the place of the suffix in a selected name whose prefix denotes an object of the protected type.

14.6 Dynamic elaboration

033.5: Paragraph that starts at the end of 213 and continues to page 214

Next, if the subprogram is a method of a protected type (see 5.6.2) or an implicitly declared file operation (see 5.5.2), the elaboration blocks (suspends execution while retaining all state), if necessary, until exclusive access to the object denoted by the prefix of the method or to the file object denoted by the file parameter of the file operation is secured. For a protected type method, exclusive access is required to the object denoted by the prefix of the method or alias used to call the subprogram. For a file object, exclusive access is required to the object denoted by the file parameter of the file operation.

[Add paragraph break]

Finally, if the designator of the subprogram is not decorated with the 'FOREIGN attribute defined in package STANDARD, the declarative part of the corresponding subprogram body is elaborated and the sequence of statements in the subprogram body is executed. If the designator of the subprogram is decorated with the 'FOREIGN attribute defined in package STANDARD, there are two cases:

15.10 Reserved Words

033.6: Page 236 add private to the reserved word list:

private



Topic revision: r30 - 2017-07-16 - 05:21:38 - 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