CVS difference for ai05s/ai05-0153-1.txt
--- ai05s/ai05-0153-1.txt 2010/05/20 06:36:05 1.10
+++ ai05s/ai05-0153-1.txt 2010/10/22 02:49:29 1.11
@@ -1,4 +1,4 @@
-!standard 3.2.4(0) 10-05-19 AI05-0153-1/06
+!standard 3.2.4(0) 10-06-30 AI05-0153-1/07
!class Amendment 09-05-27
!status work item 09-05-27
!status received 09-05-27
@@ -54,21 +54,37 @@
3.2.4 Subtype Predicates
-The language-defined aspect Predicate is defined for subtypes.
-The expected type for a Predicate expression is any boolean type.
+For any subtype, the following language-defined aspect is defined:
-A Predicate may be specified on a type_declaration or a subtype_declaration; if
-none is given, an implicit "with Predicate => True" is assumed.
-The predicate of a subtype is defined as follows:
+ This aspect shall be specified by an expression.
+ The expected type for the expression is any boolean type.
+ A Subtype_Predicate may be specified on a type_declaration
+ or a subtype_declaration; if none is given, an implicit
+ "with Subtype_Predicate => True" is assumed.
+ Legality Rules
+Within the expression of a Subtype_Predicate aspect_specification
+for a composite type C or an access to a composite type C, the only components
+of C referenced shall be discriminants, and a name that denotes
+the current instance of the (sub)type shall be used only as a prefix (including
+a dereference) of a selected_component for a discriminant, or as a prefix (including
+a dereference) of an attribute_reference with attribute_designator being Length,
+First, Last, or Range.
+ Static Semantics
+The /predicate of a subtype/ is defined as follows:
- For a (first) subtype defined by a derived type declaration, the
- specified Predicate, and-ed with the predicate of the parent subtype,
- and-ed with the predicates of the progenitor subtypes.
+ specified Subtype_Predicate, and-ed with the predicate of the parent subtype,
+ and-ed with the predicates of any progenitor subtypes.
- For a (first) subtype defined by a non-derived type declaration,
- the specified Predicate.
+ the specified Subtype_Predicate.
- - For a subtype created by a subtype_declaration, the specified Predicate,
+ - For a subtype created by a subtype_declaration, the specified Subtype_Predicate,
and-ed with the predicate of the subtype denoted by the subtype_mark.
- For a subtype created by a subtype_indication that is not that of
@@ -80,7 +96,6 @@
[Editor's note: The predicate has no effect on the static or dynamic semantics
of the subtype indication except as noted here. In particular, it has no effect
on the range of scalar subtypes.]
Questions? Ask the ACAA Technical Agent