CVS difference for ais/ai-00262.txt

Differences between 1.9 and version 1.10
Log of other versions for file ais/ai-00262.txt

--- ais/ai-00262.txt	2002/03/13 00:48:28	1.9
+++ ais/ai-00262.txt	2002/05/25 03:42:18	1.10
@@ -1,6 +1,7 @@
-!standard 10.01.02 (04)                               02-02-25  AI95-00262/03
+!standard 10.01.02 (04)                               02-05-10  AI95-00262/04
 !standard 10.01.02 (08)
 !class amendment 01-02-15
+!status Amendment 200Y 02-05-10
 !status ARG Approved 7-0-0  02-02-11
 !status work item 01-02-15
 !status received 01-02-15
@@ -20,8 +21,8 @@
 and other low-level data structures.
 
 Ada 95 provides private packages to organize the implementation of a subsystem.
-Unfortunately, these packages cannot be used in the private part of a public
-package - the context clause for the private package is illegal.
+Unfortunately, these packages cannot be referenced in the private part of a
+public package - the context clause for the private package is illegal.
 
 This makes it difficult to use private packages to organize implementation
 details of a subsystem.
@@ -39,7 +40,7 @@
      could be used).
 
 All of this bending of the design was necessary because private packages
-could not be used in the private part of a public package.
+could not be referenced in the private part of a public package.
 
 !proposal
 
@@ -71,7 +72,7 @@
     * the name appears in the visible part of a package or generic package, or
     * the name appears in a use_clause in a context_clause.
 
-A with_clause which includes the reserved word private shall be appear only
+A with_clause which includes the reserved word private shall appear only
 in the context_clause of a package specification or generic package
 specification.
 
@@ -80,17 +81,17 @@
 Private withs do not allow access to the library unit in the visible part of
 the package or generic package. This rule is necessary to preserve the purpose
 of 10.1.2(8): To prevent a private child from being visible (or even
-semantically depended-on) from outside the subsystem rooted at its
+semantically depended on) from outside the subsystem rooted at its
 parent. [AARM 10.1.2(8.a)] This limitation has the pleasant side effect of
 adding another capability beyond that described in the problem statement: it
-allows the declaration that a unit of any sort) will not be used in the public
+allows the assertion that a unit (of any sort) will not be used in the public
 part of a package. This additional documentation can be valuable to both users
 and automated analysis tools. Some reviewers consider this capability more
 important than withing private units.
 
 Reference to private withed items in the private part is a legality rule,
-rather than a visibility rule, in order to avoid a form of Beaujolais when
-a declaration is moved from the visible part to the private part (or
+rather than a visibility rule, in order to avoid a form of Beaujolais effect
+when a declaration is moved from the visible part to the private part (or
 vice-versa). Since such moves are common, it is important to avoid problems
 with them. With the legality rule, the declarations will be illegal in the
 public part.
@@ -122,7 +123,7 @@
 
 Private withs are allowed only on (generic) package specifications. This avoids
 confusion as to the meaning of them on bodies and subprogram specifications.
-We could allow them on bodies, but they would have be equivalent to regular
+We could allow them on bodies, but they would have to be equivalent to regular
 withs. For subprograms, they could be defined to not have an effect in the
 subprogram specification (useful on subprogram bodies), but this is of limited
 value.
@@ -131,11 +132,11 @@
 In order to handle this, we have proposed that the legality rule is written
 so that if a unit is withed by both a regular with and a private with, the
 legality rule does not apply. Alternatively, we could have made such a
-combination illegal. But that doesn't seem to buy much, and it adds an
+combination illegal. But that doesn't seem worthwhile, and it adds an
 additional new check.
 
-The legality rule prohibits private withed units from being used in context
-clause use clauses. Allowing this would substantially complicate the legality
+The legality rule prohibits private withed units from being used in use_clauses
+in context_clauses. Allowing this would substantially complicate the legality
 rule for the use of such items, without much benefit. The user can always put
 the use clause in the private part. Private withed units are allowed in
 context clause pragmas such as Elaborate.
@@ -143,7 +144,7 @@
 !example
 
 As described in the problem statement, the low-level Win32 interface for Claw
-are defined in a series of private packages. However, Ada 95 prevents these
+is defined in a series of private packages. However, Ada 95 prevents these
 packages from being accessed in the private part of the public types. The
 proposed feature eliminates that problem.
 
@@ -177,11 +178,11 @@
        type Image_List_Type is tagged private;
        procedure Load_Image (Image_List : in out Image_List_Type;
                              Image : in String;
-			     Monochrome : in Boolean := False);
+                             Monochrome : in Boolean := False);
          ...
     private
        type Image_List_Type is tagged record
-	Handle : Claw.Low_Level_Image_Lists.HImage_List;
+         Handle : Claw.Low_Level_Image_Lists.HImage_List;
             Flags : Claw.Low_Level_Image_Lists.IL_Flags;
               ...
        end record;
@@ -190,6 +191,39 @@
 A reference to Claw.Low_Level_Image_Lists would still be illegal in the visible
 part of Claw.Image_List.
 
+!corrigendum 10.1.2(04)
+
+@drepl
+@xindent<with_clause ::= @b<with> @i<library_>unit_name {, @i<library_>unit_name}>
+@dby
+@xindent<with_clause ::= [@b<private>] @b<with> @i<library_>unit_name {, @i<library_>unit_name}>
+
+!corrigendum 10.1.2(08)
+
+@drepl
+If a @fa<with_clause> of a given @fa<compilation_unit> mentions a private child
+of some library unit, then the given @fa<compilation_unit> shall be either the
+declaration of a private descendant of that library unit or the body or subunit
+of a (public or private) descendant of that library unit.
+@dby
+If a @fa<with_clause> of a given @fa<compilation_unit> mentions a private child
+of some library unit, then the given @fa<compilation_unit> shall be one of:
+@xbullet<the declaration of a private descendant of that library unit;>
+@xbullet<the body or subunit of a (public or private) descendant of that
+library unit; or>
+@xbullet<the declaration of a public descendant of that library unit, and
+the @fa<with_clause> shall include the reserved word @b<private>.>
+
+A @fa<name> shall not denote a declaration mentioned only in a
+@fa<with_clause> which includes the reserved word @b<private> if:
+@xbullet<the @fa<name> appears in the visible part of a package or generic
+package, or>
+@xbullet<the name appears in a @fa<use_clause> in a @fa<context_clause>.>
+
+A @fa<with_clause> which includes the reserved word @b<private> shall appear
+only in the @fa<context_clause> of a package specification or generic package
+specification.
+
 !ACATS test
 
 A C-Test should be created to check that a private child can be private withed
@@ -243,11 +277,11 @@
        type Image_List_Type is tagged private;
        procedure Load_Image (Image_List : in out Image_List_Type;
                              Image : in String;
-			     Monochrome : in Boolean := False);
+                             Monochrome : in Boolean := False);
          ...
     private
        type Image_List_Type is tagged record
-	Handle : Claw.Low_Level_Image_Lists.HImage_List;
+         Handle : Claw.Low_Level_Image_Lists.HImage_List;
             Flags : Claw.Low_Level_Image_Lists.IL_Flags;
               ...
        end record;

Questions? Ask the ACAA Technical Agent