summaryrefslogtreecommitdiff
path: root/gcc/ada/a-cforse.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-02 09:46:08 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-02 09:46:08 +0000
commit4a3ade652da8276a8249df55677f56eda9246b6f (patch)
tree7565c6dfc947d8f0a5501798efa5d1258d38e9ef /gcc/ada/a-cforse.ads
parent8398ba2ca240874953d4838e7c0f9aba7a164359 (diff)
downloadgcc-4a3ade652da8276a8249df55677f56eda9246b6f.tar.gz
2011-08-02 Claire Dross <dross@adacore.com>
* a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads, a-cofove.ads: Add comments. 2011-08-02 Yannick Moy <moy@adacore.com> * gnat_rm.texi: Document formal containers. 2011-08-02 Emmanuel Briot <briot@adacore.com> * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there are empty sections. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177111 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-cforse.ads')
-rw-r--r--gcc/ada/a-cforse.ads25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/ada/a-cforse.ads b/gcc/ada/a-cforse.ads
index 92c4e93497f..71eab933034 100644
--- a/gcc/ada/a-cforse.ads
+++ b/gcc/ada/a-cforse.ads
@@ -29,6 +29,31 @@
-- <http://www.gnu.org/licenses/>. --
------------------------------------------------------------------------------
+-- The specification of this package is derived from the specification
+-- of package Ada.Containers.Bounded_Ordered_Sets in the Ada 2012 RM.
+-- The changes are
+
+-- A parameter for the container is added to every function reading the
+-- content of a container: Key, Element, Next, Query_Element, Previous,
+-- Has_Element, Iterate, Reverse_Iterate. This change is
+-- motivated by the need to have cursors which are valid on different
+-- containers (typically a container C and its previous version C'Old) for
+-- expressing properties, which is not possible if cursors encapsulate an
+-- access to the underlying container. The operators "<" and ">" that could
+-- not be modified that way have been removed.
+
+-- There are two new functions
+
+-- function Left (Container : Set; Position : Cursor) return Set;
+-- function Right (Container : Set; Position : Cursor) return Set;
+
+-- Left returns a container containing all elements preceding Position
+-- (excluded) in Container. Right returns a container containing all
+-- elements following Position (included) in Container. These two new
+-- functions are useful to express invariant properties in loops which
+-- iterate over containers. Left returns the part of the container already
+-- scanned and Right the part not scanned yet.
+
private with Ada.Containers.Red_Black_Trees;
private with Ada.Streams;