CVS difference for ais/ai-20302.txt
--- ais/ai-20302.txt 2005/11/16 06:51:21 1.24
+++ ais/ai-20302.txt 2005/12/15 02:44:25 1.25
@@ -1,4 +1,4 @@
-!standard A.18 (00) 05-11-15 AI95-00302-03/16
+!standard A.18 (00) 05-12-02 AI95-00302-03/17
!standard A.18.1 (00)
!standard A.18.2 (00)
!standard A.18.3 (00)
@@ -730,10 +730,16 @@
existence of Index_Type'Last + 1, as it is only used as the position of
insertions (and needs to be allowed only when inserting an empty vector).
-Some operations are assumed to work on a constant set of elements. During the
-execution of such an operation, a subprogram is said to *tamper with cursors*
-of a vector object V if:
+Redundant[Some operations of this generic package have access-to-subprogram
+parameters. To ensure such operations are well-defined, they guard
+against certain actions by the designated subprogram. In particular, some
+operations check for "tampering with cursors" of a container because they
+depend on the set of elements of the container remaining constant, and others
+check for "tampering with elements" of a container because they depend on
+elements of the container not being replaced.]
+A subprogram is said to *tamper with cursors* of a vector object V if:
+
* it inserts or deletes elements of V, that is, it calls the Insert,
Insert_Space, Clear, Delete, or Set_Length procedures with V
as a parameter; or
@@ -749,8 +755,7 @@
Swap, Sort, and Merge copy elements rather than reordering them, so
they do not tamper with cursors.
-Some operations are assumed not to replace elements. During the execution of such an operation, a
-subprogram is said to *tamper with elements* of a vector object V if:
+A subprogram is said to *tamper with elements* of a vector object V if:
* it tampers with cursors of V; or
* it replaces one or more elements of V, that is, it calls the
@@ -1222,7 +1227,7 @@
If either I or J is No_Element, then Constraint_Error is propagated. If either
I or J do not designate an element in Container, then Program_Error is
-propagated. Otherwise Swap exchanges the values of the elements designated by I
+propagated. Otherwise, Swap exchanges the values of the elements designated by I
and J.
AARM Notes:
@@ -1574,7 +1579,7 @@
the proportionality constant and caching effects are likely to be larger than
the log factor, and we don't want to discourage innovative implementations.
-The worst-case time complexity of a call on procedure Sort of an instantiation
+The worst-case time complexity of a call on procedure Sort of an instance
of Containers.Vectors.Generic_Sorting should be O(N**2), and the average time
complexity should be better than O(N**2).
@@ -1834,10 +1839,16 @@
Execution of the default implementation of the Input, Output, Read, or Write
attribute of type Cursor raises Program_Error.
+
+Redundant[Some operations of this generic package have access-to-subprogram
+parameters. To ensure such operations are well-defined, they guard
+against certain actions by the designated subprogram. In particular, some
+operations check for "tampering with cursors" of a container because they
+depend on the set of elements of the container remaining constant, and others
+check for "tampering with elements" of a container because they depend on
+elements of the container not being replaced.]
-Some operations are assumed to work on a constant set of elements. During the
-execution of such an operation, a subprogram is said to *tamper with cursors*
-of a list object L if:
+A subprogram is said to *tamper with cursors* of a list object L if:
* it inserts or deletes elements of L, that is, it calls the Insert,
Clear, Delete, or Delete_Last procedures with L as a parameter; or
@@ -1857,8 +1868,7 @@
Swap copies elements rather than reordering them, so it doesn't tamper
with cursors.
-Some operations are assumed not to replace elements. During the execution of such an operation, a
-subprogram is said to *tamper with elements* of a list object L if:
+A subprogram is said to *tamper with elements* of a list object L if:
* it tampers with cursors of L; or
* it replaces one or more elements of L, that is, it calls the
@@ -2034,7 +2044,7 @@
If either I or J is No_Element, then Constraint_Error is propagated. If either
I or J do not designate an element in Container, then Program_Error is
-propagated. Otherwise Swap exchanges the values of the elements designated by
+propagated. Otherwise, Swap exchanges the values of the elements designated by
I and J.
AARM Notes:
@@ -2311,7 +2321,7 @@
proportionality constant and caching effects are likely to be larger than the
log factor, and we don't want to discourage innovative implementations.
-The worst-case time complexity of a call on procedure Sort of an instantiation
+The worst-case time complexity of a call on procedure Sort of an instance
of Containers.Doubly_Linked_Lists.Generic_Sorting should be O(N**2), and
the average time complexity should be better than O(N**2).
@@ -2390,10 +2400,16 @@
in the map exactly once until the last node is reached. The exact definition of
these terms is different for hashed maps and ordered maps.
-Some operations are assumed to work on a constant set of elements. During the
-execution of such an operation, a subprogram is said to *tamper with cursors*
-of a map object M if:
+Redundant[Some operations of these generic packages have access-to-subprogram
+parameters. To ensure such operations are well-defined, they guard
+against certain actions by the designated subprogram. In particular, some
+operations check for "tampering with cursors" of a container because they
+depend on the set of elements of the container remaining constant, and others
+check for "tampering with elements" of a container because they depend on
+elements of the container not being replaced.]
+A subprogram is said to *tamper with cursors* of a map object M if:
+
* it inserts or deletes elements of M, that is, it calls the Insert,
Include, Clear, Delete, or Exclude procedures with M as a parameter; or
@@ -2409,8 +2425,7 @@
Replace only modifies a key and element rather than rehashing, so it does
not tamper with cursors.
-Some operations are assumed not to replace elements. During the execution of such an operation, a
-subprogram is said to *tamper with elements* of a map object M if:
+A subprogram is said to *tamper with elements* of a map object M if:
* it tampers with cursors of M; or
* it replaces one or more elements of M, that is, it calls the
@@ -3457,10 +3472,16 @@
successor element will visit each element in the set exactly once until the
last element is reached. The exact definition of these terms is different for
hashed sets and ordered sets.
+
+Redundant[Some operations of these generic packages have access-to-subprogram
+parameters. To ensure such operations are well-defined, they guard
+against certain actions by the designated subprogram. In particular, some
+operations check for "tampering with cursors" of a container because they
+depend on the set of elements of the container remaining constant, and others
+check for "tampering with elements" of a container because they depend on
+elements of the container not being replaced.]
-Some operations are assumed to work on a constant set of elements. During the
-execution of such an operation, a subprogram is said to *tamper with cursors*
-of a set object S if:
+A subprogram is said to *tamper with cursors* of a set object S if:
* it inserts or deletes elements of S, that is, it calls the Insert,
Include, Clear, Delete, Exclude, or Replace_Element procedures with S as
@@ -3480,8 +3501,7 @@
* it calls the Move procedure with S as a parameter; or
* it calls one of the operations defined to tamper with cursors of S.
-Some operations are assumed not to replace elements. During the execution of such an operation, a
-subprogram is said to *tamper with elements* of a set object S if:
+A subprogram is said to *tamper with elements* of a set object S if:
* it tampers with cursors of S.
@@ -6799,12 +6819,14 @@
@b<procedure> Update_Element
(Container : @b<in out> Vector;
Index : @b<in> Index_Type;
- Process : @b<not null access procedure> (Element : @b<in out> Element_Type));
+ Process : @b<not null access procedure>
+ (Element : @b<in out> Element_Type));
@b<procedure> Update_Element
(Container : @b<in out> Vector;
Position : @b<in> Cursor;
- Process : @b<not null access procedure> (Element : @b<in out> Element_Type));
+ Process : @b<not null access procedure>
+ (Element : @b<in out> Element_Type));
@b<procedure> Move (Target : @b<in out> Vector;
Source : @b<in out> Vector);
@@ -6997,10 +7019,16 @@
subtype Extended_Index includes the indices covered by Index_Type plus the
value No_Index and, if it exists, the successor to the Index_Type'Last.
-Some operations are assumed to work on a constant set of elements. During the
-execution of such an operation, a subprogram is said to @i<tamper with cursors>
-of a vector object @i<V> if:
+Some operations of this generic package have access-to-subprogram
+parameters. To ensure such operations are well-defined, they guard
+against certain actions by the designated subprogram. In particular, some
+operations check for "tampering with cursors" of a container because they
+depend on the set of elements of the container remaining constant, and others
+check for "tampering with elements" of a container because they depend on
+elements of the container not being replaced.
+A subprogram is said to @i<tamper with cursors> of a vector object @i<V> if:
+
@xbullet<it inserts or deletes elements of @i<V>, that is, it calls the Insert,
Insert_Space, Clear, Delete, or Set_Length procedures with @i<V> as a
parameter; or>
@@ -7010,8 +7038,7 @@
@xbullet<it calls the Move procedure with @i<V> as
a parameter.>
-Some operations are assumed not to replace elements. During the execution of such an operation, a
-subprogram is said to @i<tamper with elements> of a vector object @i<V> if:
+A subprogram is said to @i<tamper with elements> of a vector object @i<V> if:
@xbullet<it tampers with cursors of @i<V>; or>
@xbullet<it replaces one or more elements of @i<V>, that is, it calls the
@@ -7392,7 +7419,7 @@
@xindent<If either I or J is No_Element, then Constraint_Error is propagated.
If either I or J do not designate an element in Container, then Program_Error
-is propagated. Otherwise Swap exchanges the values of the elements designated
+is propagated. Otherwise, Swap exchanges the values of the elements designated
by I and J.>
@xcode<@b<function> First_Index (Container : Vector) @b<return> Index_Type;>
@@ -7618,7 +7645,7 @@
@xbullet<the worst-case time complexity of Prepend with Count=1 and Delete_First
with Count=1 should be @i<O>(@i<N> log @i<N>).>
-The worst-case time complexity of a call on procedure Sort of an instantiation
+The worst-case time complexity of a call on procedure Sort of an instance
of Containers.Vectors.Generic_Sorting should be @i<O>(@i<N>**2), and
the average time complexity should be better than @i<O>(@i<N>**2).
@@ -7702,7 +7729,8 @@
@b<procedure> Update_Element
(Container : @b<in out> List;
Position : @b<in> Cursor;
- Process : @b<not null access procedure> (Element : @b<in out> Element_Type));
+ Process : @b<not null access procedure>
+ (Element : @b<in out> Element_Type));
@b<procedure> Move (Target : @b<in out> List;
Source : @b<in out> List);
@@ -7847,10 +7875,16 @@
Execution of the default implementation of the Input, Output, Read, or Write
attribute of type Cursor raises Program_Error.
+
+Some operations of this generic package have access-to-subprogram
+parameters. To ensure such operations are well-defined, they guard
+against certain actions by the designated subprogram. In particular, some
+operations check for "tampering with cursors" of a container because they
+depend on the set of elements of the container remaining constant, and others
+check for "tampering with elements" of a container because they depend on
+elements of the container not being replaced.
-Some operations are assumed to work on a constant set of elements. During the
-execution of such an operation, a subprogram is said to @i<tamper with cursors>
-of a list object @i<L> if:
+A subprogram is said to @i<tamper with cursors> of a list object @i<L> if:
@xbullet<it inserts or deletes elements of @i<L>, that is, it calls the Insert,
Clear, Delete, or Delete_Last procedures with @i<L> as a parameter; or>
@@ -7862,8 +7896,7 @@
@xbullet<it finalizes @i<L>; or>
@xbullet<it calls the Move procedure with @i<L> as a parameter.>
-Some operations are assumed not to replace elements. During the execution of such an operation, a
-subprogram is said to @i<tamper with elements> of a list object @i<L> if:
+A subprogram is said to @i<tamper with elements> of a list object @i<L> if:
@xbullet<it tampers with cursors of @i<L>; or>
@xbullet<it replaces one or more elements of @i<L>, that is, it calls the
@@ -8022,7 +8055,7 @@
@xindent<If either I or J is No_Element, then Constraint_Error is propagated.
If either I or J do not designate an element in Container, then Program_Error
-is propagated. Otherwise Swap exchanges the values of the elements designated
+is propagated. Otherwise, Swap exchanges the values of the elements designated
by I and J.>
@xcode<@b<procedure> Swap_Links (Container : @b<in out> List;
@@ -8287,10 +8320,16 @@
in the map exactly once until the last node is reached. The exact definition of
these terms is different for hashed maps and ordered maps.
-Some operations are assumed to work on a constant set of elements. During the
-execution of such an operation, a subprogram is said to @i<tamper with cursors>
-of a map object @i<M> if:
+Some operations of these generic packages have access-to-subprogram
+parameters. To ensure such operations are well-defined, they guard
+against certain actions by the designated subprogram. In particular, some
+operations check for "tampering with cursors" of a container because they
+depend on the set of elements of the container remaining constant, and others
+check for "tampering with elements" of a container because they depend on
+elements of the container not being replaced.
+A subprogram is said to @i<tamper with cursors> of a map object @i<M> if:
+
@xbullet<it inserts or deletes elements of @i<M>, that is, it calls the Insert,
Include, Clear, Delete, or Exclude procedures with @i<M> as a parameter; or>
@@ -8300,8 +8339,7 @@
@xbullet<it calls one of the operations defined to tamper with the cursors of @i<M>.>
-Some operations are assumed not to replace elements. During the execution of such an operation, a
-subprogram is said to @i<tamper with elements> of a map object @i<M> if:
+A subprogram is said to @i<tamper with elements> of a map object @i<M> if:
@xbullet<it tampers with cursors of @i<M>; or>
@@ -8608,8 +8646,9 @@
@b<procedure> Update_Element
(Container : @b<in out> Map;
Position : @b<in> Cursor;
- Process : @b<not null access procedure> (Key : @b<in> Key_Type;
- Element : @b<in out> Element_Type));
+ Process : @b<not null access procedure>
+ (Key : @b<in> Key_Type;
+ Element : @b<in out> Element_Type));
@b<procedure> Move (Target : @b<in out> Map;
Source : @b<in out> Map);
@@ -8826,8 +8865,9 @@
@b<procedure> Update_Element
(Container : @b<in out> Map;
Position : @b<in> Cursor;
- Process : @b<not null access procedure> (Key : @b<in> Key_Type;
- Element : @b<in out> Element_Type));
+ Process : @b<not null access procedure>
+ (Key : @b<in> Key_Type;
+ Element : @b<in out> Element_Type));
@b<procedure> Move (Target : @b<in out> Map;
Source : @b<in out> Map);
@@ -9092,10 +9132,16 @@
successor element will visit each element in the set exactly once until the
last element is reached. The exact definition of these terms is different for
hashed sets and ordered sets.
+
+Some operations of these generic packages have access-to-subprogram
+parameters. To ensure such operations are well-defined, they guard
+against certain actions by the designated subprogram. In particular, some
+operations check for "tampering with cursors" of a container because they
+depend on the set of elements of the container remaining constant, and others
+check for "tampering with elements" of a container because they depend on
+elements of the container not being replaced.
-Some operations are assumed to work on a constant set of elements. During the
-execution of such an operation, a subprogram is said to @i<tamper with cursors>
-of a set object @i<S> if:
+A subprogram is said to @i<tamper with cursors> of a set object @i<S> if:
@xbullet<it inserts or deletes elements of @i<S>, that is, it calls the Insert,
Include, Clear, Delete, Exclude, or Replace_Element procedures with @i<S> as
@@ -9107,8 +9153,7 @@
@xbullet<it calls one of the operations defined to tamper with cursors of @i<S>.>
-Some operations are assumed not to replace elements. During the execution of such an operation, a
-subprogram is said to @i<tamper with elements> of a set object @i<S> if:
+A subprogram is said to @i<tamper with elements> of a set object @i<S> if:
@xbullet<it tampers with cursors of @i<S>.>
@@ -9610,7 +9655,7 @@
(Container : @b<in out> Set;
Position : @b<in> Cursor;
Process : @b<not null access procedure>
- (Element : @b<in out> Element_Type));
+ (Element : @b<in out> Element_Type));
@b<end> Generic_Keys;
@@ -9938,7 +9983,7 @@
(Container : @b<in out> Set;
Position : @b<in> Cursor;
Process : @b<not null access procedure>
- (Element : @b<in out> Element_Type));
+ (Element : @b<in out> Element_Type));
@b<end> Generic_Keys;
Questions? Ask the ACAA Technical Agent