CVS difference for ais/ai-00317.txt

Differences between 1.6 and version 1.7
Log of other versions for file ais/ai-00317.txt

--- ais/ai-00317.txt	2003/10/29 00:41:22	1.6
+++ ais/ai-00317.txt	2003/12/07 05:00:33	1.7
@@ -1,4 +1,4 @@
-!standard  12.07 (03)                                  03-10-23  AI95-00317/04
+!standard  12.07 (03)                                  03-12-03  AI95-00317/05
 !standard  12.07 (05)
 !standard  12.07 (10)
 !class amendment
@@ -58,7 +58,7 @@
 The parameters which are not specified may be referenced by name as
 expanded names using the formal package as its prefix. For example,
 Inst2.FT3 and Inst2.FT4 may be used later in the formal generic part
-of GP or within the spec or body of GP. By contrast, the specified
+of GP or within the specification or body of GP. By contrast, the specified
 actuals may not be so named, to avoid confusion between the properties
 of the actual and those of the formal.
 
@@ -119,7 +119,6 @@
 useful, without measurably increasing the complexity of supporting the
 capability.
 
-------------
 
 There is an issue of which names are visible outside an instance:
 
@@ -141,17 +140,17 @@
 
 !example
 
--- ure package with
--- 
+Imagine a generic signature package with two formal parameters:
+
 generic
     type T is private;
     Obj : T
 package Sig is end;
+
+Now imagine there is a layered abstraction that wants two instances of this
+signature, and wants them to share the same type T, but not necessarily the
+same object "Obj".
 
--- ayered abstraction that
--- his signature, and
--- same type T, but not
--- ect "Obj."
 generic
     with package P1 is new Sig(<>);
     with package P2 is new Sig(P1.T, others => <>);
@@ -162,15 +161,12 @@
                          -- is required to match P1.T
     ...
 end Layered_Abstraction;
-
----------
 
-Note that this exact situation came up while I was
-working on the physical units AI. I wanted to pull
-out some of the nested generics from the large "System_Of_Units"
-generic. This would require the Unit_Signature generic
-signature to have at least one additional parameter,
-the Names_Of_Dimensions:
+Note that this exact situation came up during the design of the physical units
+AI (AI-324). We wanted to pull out some of the nested generics from the large
+"System_Of_Units" generic. This would require the Unit_Signature generic
+signature package to have at least one additional parameter, the
+Names_Of_Dimensions:
 
 generic
     type Names_Of_Dimensions is (<>);
@@ -180,22 +176,21 @@
     type Value is digits <>;
 package Unit_Signature is end;
 
-But if I wanted to use this in something that
-constructed a "product" unit from two individual
-units:
+But the use of these generics causes problems. If a "product" unit is
+constructed from two individual units:
 
 generic
     with package Unit_A is new Unit_Signature(<>);
-    with package Unit_B is new Unit_Signature(Unit_A.Names_Of_Dimensions, others => <>);
+    with package Unit_B is new Unit_Signature(Unit_A.Names_Of_Dimensions,
+                                              others => <>);
 package Product_Unit is
     type Value is ...
     ...
 end Product_Unit;
 
-I would need to be sure that the Names_Of_Dimensions types were
-the same. With the Ada 95 rule, I would have to pass in all of the
-other parameters separately to be able to force a match on
-just one of them:
+It is necessary that the Names_Of_Dimensions types are the same. With the Ada
+95 rule, we'd have to pass in all of the other parameters separately to be able
+to force a match on just one of them:
 
 generic
     with package Unit_A is new Unit_Signature(<>);

Questions? Ask the ACAA Technical Agent