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

Differences between 1.1 and version 1.2
Log of other versions for file ai12s/ai12-0116-1.txt

--- ai12s/ai12-0116-1.txt	2014/06/20 00:51:49	1.1
+++ ai12s/ai12-0116-1.txt	2014/06/20 02:15:15	1.2
@@ -11,12 +11,35 @@
 
 !summary
 
+A subtype predicate aspect can only be specified once per type or subtype.
 
 !question 
 
+The following appears to be legal:
 
+    package P is
+       type Priv is private
+          with Dynamic_Predicate => Is_OK (Priv);
+       function Is_OK (P : Priv) return Boolean;
+    private
+       function Is_Great (P : Priv) return Boolean;
+       type Priv is private
+          with Dynamic_Predicate => Is_Great (Priv);
+    end P;
+
+Both the private type and the full type are of course type declarations, and
+there doesn't seem to be anything preventing this. In particular,
+13.1.1(14/3) only applies in a single aspect_specification, and these clearly
+are two different aspect_specifications. We *don't* have a rule preventing
+specifying the same aspect twice for the same entity (we do have such a rule
+for representation aspects and for operational aspects, but predicates are
+never clearly defined to be either of those kinds of aspects).
+
+Should this be legal? (No.)
+
 !recommendation
 
+(See summary.)
 
 !wording
 
@@ -40,7 +63,6 @@
   give another operational item or aspect_specification that directly
   specifies the same aspect of the entity
 
-
 !discussion 
 
 Aspects are one per type, not one per view, so we need to prevent giving
@@ -74,10 +96,12 @@
 Categorization aspects are required to be given in specifications.
 
 We make a minor correction to 13.1(9/3) and 13.1(9.1/3). When these were
-reworded to cover aspects, the rewording can be read to cover all aspects.
-This makes 13.1(9/3) conflict with 13.1(9.1/3), so we clarify each so that
-they only cover representation aspects and operational aspects respectively:
-this just keeps the rules at the meaning that they had in Ada 2005.
+reworded to cover aspects as well as other kinds of representation/operational
+items, the rewording doesn't restrict the kinds of aspects involved. Thus,
+the rewording can be read to cover all aspects. This makes 13.1(9/3) conflict
+with 13.1(9.1/3), so we clarify each so that they only cover representation
+aspects and operational aspects respectively: this just keeps the rules at the
+meaning that they had in Ada 2005.
 
 !ASIS
 

Questions? Ask the ACAA Technical Agent