CVS difference for ai12s/ai12-0079-1.txt

Differences between 1.25 and version 1.26
Log of other versions for file ai12s/ai12-0079-1.txt

--- ai12s/ai12-0079-1.txt	2019/01/04 23:34:40	1.25
+++ ai12s/ai12-0079-1.txt	2019/02/01 06:59:17	1.26
@@ -1,4 +1,4 @@
-!standard 6.1.2(0)                                  19-01-04    AI12-0079-1/11
+!standard 6.1.2(0)                                  19-01-31    AI12-0079-1/12
 !standard 13.1.1(4/3)
 !standard 13.1.1(11/3)
 !standard 13.14(3/5)
@@ -365,7 +365,6 @@
 between the calls.
 End AARM Discussion.
  
-
 Modify 13.1.1(4/3)
 
   aspect_definition ::= name | expression | identifier{
@@ -469,6 +468,267 @@
 Hash, and as a result of dereferencing access objects within the
 representation of a Set. The default initialization, adjustment, and
 finalization of a Set indirectly uses the corresponding operations of T.
+
+!corrigendum 6.1.2(0)
+
+@dinsc
+
+For a program unit, formal package, formal subprogram, formal
+object of an anonymous access-to-subprogram type, and for a named
+access-to-subprogram type or composite type (including a formal type),
+the following language-defined aspect may be specified
+with an @fa<aspect_specification> (see 13.1.1):
+
+@xhang<@xterm<Global>The syntax for the @fa<aspect_definition> used to 
+define a Global aspect is as follows:>
+
+@xindent<@fa<global_aspect_definition>@fa<@ ::=@ >@hr
+@ @ @ @ @fa<primitive_global_aspect_definition>@hr
+@ @ |@ @i<global_>@fa<attribute_reference>@hr
+@ @ |@ @fa<global_aspect_definition> & @i<global_>@fa<attribute_reference>>
+
+@xindent<@fa<primitive_global_aspect_definition>@fa<@ ::=@ >@hr
+@ @ @ @ @b<null>@hr
+@ @ |@ @fa<global_mode> @fa<global_name>@hr
+@ @ |@ @fa<global_mode> @fa<global_designator>@hr
+@ @ |@ (@fa<global_mode> @fa<global_set>{, @fa<global_mode> @fa<global_set>})>
+
+@xindent<@fa<global_mode>@fa<@ ::=@ >[ @fa<global_mode_qualifier> ] @fa<basic_global_mode>>
+
+@xindent<@fa<global_mode_qualifier>@fa<@ ::=@ >@hr
+@ @ @ @ @b<synchronized>@hr
+@ @ |@ @i<implementation-defined_>@fa<identifier>>
+
+@xindent<@fa<basic_global_mode>@fa<@ ::=@ >@b<in> | @b<in out> | @b<out>>
+
+@xindent<@fa<global_set>@fa<@ ::=@ >@hr
+@ @ @ @ @fa<global_name> {, @fa<global_name>}@hr
+@ @ |@ @fa<global_designator>>
+
+@xindent<@fa<global_designator>@fa<@ ::=@ >@b<all> | @b<null>>
+
+@xindent<@fa<global_name>@fa<@ ::=@ >@hr
+@ @ @ @ @i<object_>@fa<name>@hr
+@ @ |@ @i<package_>@fa<name> [ @b<private> ]@hr
+@ @ |@ @i<access_>@fa<subtype_mark>@hr
+@ @ |@ @b<access> @fa<subtype_mark>>
+
+@xindent<A @i<global_>@fa<attribute_reference> is an @fa<attribute_reference>
+whose @fa<attribute_designator> is Global.>
+
+@xindent<The Global aspect identifies the set of variables (which, for the purposes
+of this clause includes all task objects) global to a callable
+entity that are potentially read or updated as part of the execution
+of a call on the entity. If not specified, the aspect defaults to the
+Global aspect for the nearest enclosing program unit. If not
+specified for a library unit, the aspect defaults to @fc<Global =@> @b<null>>
+for a nongeneric library unit that is declared Pure, and to @fc<Global
+=@> @b<in out all>> otherwise.>
+
+For a dispatching subprogram or a tagged type, the following language-defined
+aspect may be specified with an @fa<aspect_specification> (see 13.1.1):
+
+@xhang<@xterm<Global'Class>The syntax for the @fa<aspect_definition> used to 
+define a Global'Class aspect is the same as that defined above for 
+@fa<global_aspect_definition>. This aspect identifies an upper bound on the
+set of variables global to a dispatching operation that can be read
+or updated as a result of a dispatching call on the operation. If not
+specified, the aspect defaults to the Global aspect for the
+nearest enclosing program unit.>
+
+@s8<@i<Name Resolution Rules>>
+
+A @fa<global_name> that does not have the reserved word @b<access> shall 
+resolve to statically denote an object, a
+package (including a limited view of a package), or an
+access-to-variable subtype. The @fa<subtype_mark> of a @fa<global_name>
+that has the reserved word @b<access> shall resolve to denote a subtype 
+(possibly an incomplete type).
+
+@s8<@i<Static Semantics>>
+
+A @fa<global_aspect_definition> defines the Global or Global'Class aspect of
+some entity. The Global aspect identifies the sets of global variables
+that can be read, written, or modified as a side effect of some
+operation. The Global'Class aspect associated with a tagged
+type @i<T> (or one of its dispatching operations) represents a restriction on
+the Global aspect on any descendant of type @i<T> (or its corresponding
+operation).
+
+The Global aspect for a callable entity defines the global variables
+that might be referenced as part of a call on the entity. The Global
+aspect for a composite type identifies the global variables that might
+be referenced during default initialization, adjustment as part of
+assignment, or finalization of an object of the type. The Global aspect
+for an access-to-subprogram object (or type) identifies the global
+variables that might be referenced when calling via the object (or any
+object of that type). The Global aspect for any other elementary
+type is null.
+
+The following is defined in terms of operations; the rules apply to all
+of the above kinds of entities.
+
+The sets of global variables associated with a Global aspect can be
+defined explicitly with a @fa<primitive_global_aspect_definition> or can be
+defined by combining with the sets specified for other entities by
+referring to their Global attribute.
+
+The global variables associated with any mode can be read as a side
+effect of an operation. The @b<in out> and @b<out> @fa<global_mode>s together
+identify the set of global variables that can be updated as a side
+effect of an operation. The @fa<global_mode_qualifier> @b<synchronized> 
+reduces the set to those objects that are of one of the following sort of 
+types:
+
+@xbullet<a protected, task, or synchronized tagged type;>
+@xbullet<an atomic type;>
+@xbullet<a descendant of the language-defined types Suspension_Object
+or Synchronous_Barrier;>
+@xbullet<a record type all of whose components are @i<sychronized> in this 
+sense;>
+@xbullet<an array type whose component type is @i<sychronized> in this 
+sense.>
+
+An implementation-defined @fa<global_mode_qualifier> may be specified, which
+reduces the set according to an implementation-defined rule.
+
+The overall set of objects associated with each @fa<global_mode> includes all
+objects identified for the mode in the
+@fa<primitive_global_aspect_definition> (subject to the
+@fa<global_mode_qualifier>), if any, plus all objects associated with the
+given mode for the entities identified by the @fa<prefix>es of the
+@i<global_>@fa<attribute_reference>s, if any.
+
+A @fa<global_set> identifies a @i<global variable set> as follows:
+
+@xbullet<@b<null> identifies the empty set of global variables;>
+@xbullet<@b<all> identifies the set of all global variables;>
+@xbullet<@fa<global_name>{, @fa<global_name>} identifies the union of the
+sets of variables identified by the @fa<global_name>s in the list,
+for the following forms of @fa<global_name>:>
+
+@xinbull<@i<object_>@fa<name> identifies the specified global variable (or
+nonpreelaborable constant);>
+
+@xinbull<@i<package_>@fa<name> identifies the set of all variables declared 
+within the declarative region of the package having the same accessibility
+level as the package, but not including those within the declarative
+region of a public child of the package; if the reserved word @b<private>
+follows the @i<package_>@fa<name>, the set is reduced to those variables
+declared in the private part or body of the package or within
+a private descendant of the package;>
+
+@xinbull<@i<access_>@fa<subtype_mark> identifies the set of (aliased) 
+variables that can be designated by values of the given access-to-variable 
+type;>
+
+@xinbull<@b<access> @fa<subtype_mark> identifies the set of (aliased) objects 
+that can be designated by values of an access-to-variable type with a
+designated subtype statically matching the given @fa<subtype_mark>.>
+
+@s8<@i<Legality Rules>>
+
+Within a @fa<primitive_global_aspect_definition>, a given @fa<global_mode> shall
+be specified at most once without a @fa<global_mode_qualifier>, and at most
+once with any given @fa<global_mode_qualifier>. Similarly, within a
+@fa<primitive_global_aspect_definition>, a given entity shall be named at
+most once by a @fa<global_name>.
+
+If an entity has a Global aspect other than @b<in out all>, then the
+associated operation(s) shall read only those variables global to the
+entity that are within the global variable set associated with the @b<in>,
+@b<in out>, or @b<out> modes, and the operation(s) shall update only those
+variables global to the entity that are within the global variable set
+associated with either the @b<in out> or @b<out> @fa<global_mode>s. This 
+includes any calls occurring during the execution of the operation, 
+presuming those
+calls read and update all global variables permitted by their Global
+aspect (or Global'Class aspect, if a dispatching call).
+
+If a variable global to the entity is read that is within the global variable
+set associated with the @b<out> @fa<global_mode>, it shall be updated 
+somewhere within the callable entity (or an entity it calls).
+
+If an implementation-defined @fa<global_mode_qualifier> applies to a given
+set of variables, an implementation-defined rule determines what sort
+of references to them are permitted.
+
+For a subprogram that is a dispatching operation of a tagged type @i<T>,
+each mode of its Global aspect shall identify a subset of the variables
+identified by the corresponding mode, or by the @b<in out> mode, of the
+Global'Class aspect of a corresponding dispatching subprogram of any
+ancestor of @i<T>. A corresponding rule applies to the Global aspect of a
+tagged type @i<T> relative to the Global'Class aspect of any ancestor of @i<T>.
+
+For a @fa<prefix> S that statically denotes a subprogram (including a formal
+subprogram), formal object of an anonymous access-to-subprogram type, or a type
+(including a formal type), the following attribute is defined:
+
+@xhang<@xterm<S'Global>Identifies the global variable set for each of the three
+@fa<global_mode>s, for the given subprogram, object, or type;
+a reference to this attribute may only appear within
+a @fa<global_aspect_definition>.>
+
+@s8<@i<Implementation Permissions>>
+
+For a call on a subprogram that has a Global aspect that indicates 
+that there are no references to global variables, the implementation 
+may omit the call:
+
+@xbullet<if the results are not needed after the call; or>
+
+@xbullet<simply reuse the results produced by an earlier call on the same 
+   subprogram, provided that none of the parameters nor any object 
+   accessible via access values from the parameters have any part that is 
+   of a type whose full type is an immutably limited type, and the 
+   addresses and values of all by-reference actual parameters, the values 
+   of all by-copy-in actual parameters, and the values of all objects 
+   accessible via access values from the parameters, are the same as they 
+   were at the earlier call.>
+
+This permission applies even if the 
+subprogram produces other side effects when called.
+ 
+!corrigendum 13.1.1(4/3)
+
+@drepl
+@xindent<@fa<aspect_definition>@fa<@ ::=@ @fa<name> | @fa<expression> | @fa<identifier>>
+@dby
+@xindent<@fa<aspect_definition>@fa<@ ::=@ >@hr
+@ @ @ @ @fa<name>@ |@ @fa<expression>@ |@ @fa<identifier>@ |@ @fa<aggregate>@ |@ @fa<global_aspect_definition>>
+
+!corrigendum 13.1.1(11/3)
+
+@drepl
+The usage names in an @fa<aspect_definition> are not resolved at the
+point of the associated declaration, but rather are resolved at the
+end of the immediately enclosing declaration list.
+@dby
+The usage names in an @fa<aspect_definition> are not resolved at the
+point of the associated declaration, but rather are resolved at the
+end of the immediately enclosing declaration list, or in the
+case of the declaration of a library unit, at the end of the visible
+part of the entity.
+
+!corrigendum 13.14(3/5)
+
+@drepl
+The end of a @fa<declarative_part>, @fa<protected_body>, or a declaration of a
+library package or generic library package, causes @i<freezing> of each entity
+and profile declared within it, except for incomplete types. A @fa<proper_body>,
+@fa<body_stub>, or @fa<entry_body> causes freezing of each entity and profile
+declared before it within the same @fa<declarative_part> that is not an
+incomplete type; it only causes freezing of an incomplete type if the body is
+within the immediate scope of the incomplete type.
+@dby
+The end of a @fa<declarative_part>, @fa<protected_body>, or a declaration of a
+library package or generic library package, causes @i<freezing> of each entity
+and profile declared within it, as well as the entity itself
+in the case of the declaration of a library unit. A noninstance @fa<proper_body>,
+@fa<body_stub>, or @fa<entry_body> causes freezing of each entity and profile
+declared before it within the same @fa<declarative_part>.
+
+
 
 !ASIS
 

Questions? Ask the ACAA Technical Agent