diff options
Diffstat (limited to 'gcc/ada/a-cfhama.ads')
-rw-r--r-- | gcc/ada/a-cfhama.ads | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/gcc/ada/a-cfhama.ads b/gcc/ada/a-cfhama.ads index 7880ea0fe7f..9a2b37690dd 100644 --- a/gcc/ada/a-cfhama.ads +++ b/gcc/ada/a-cfhama.ads @@ -48,8 +48,10 @@ -- function Strict_Equal (Left, Right : Map) return Boolean; -- function Overlap (Left, Right : Map) return Boolean; --- function Left (Container : Map; Position : Cursor) return Map; --- function Right (Container : Map; Position : Cursor) return Map; +-- function First_To_Previous (Container : Map; Current : Cursor) +-- return Map; +-- function Current_To_Last (Container : Map; Current : Cursor) +-- return Map; -- See detailed specifications for these subprograms @@ -243,18 +245,21 @@ package Ada.Containers.Formal_Hashed_Maps is -- they are structurally equal (function "=" returns True) and that they -- have the same set of cursors. - function Left (Container : Map; Position : Cursor) return Map with + function First_To_Previous (Container : Map; Current : Cursor) return Map + with Global => null, - Pre => Has_Element (Container, Position) or else Position = No_Element; - function Right (Container : Map; Position : Cursor) return Map with + Pre => Has_Element (Container, Current) or else Current = No_Element; + function Current_To_Last (Container : Map; Current : Cursor) return Map + with Global => null, - Pre => Has_Element (Container, Position) or else Position = No_Element; - -- 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 can be used 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. + Pre => Has_Element (Container, Current) or else Current = No_Element; + -- First_To_Previous returns a container containing all elements preceding + -- Current (excluded) in Container. Current_To_Last returns a container + -- containing all elements following Current (included) in Container. + -- These two new functions can be used to express invariant properties in + -- loops which iterate over containers. First_To_Previous returns the part + -- of the container already scanned and Current_To_Last the part not + -- scanned yet. function Overlap (Left, Right : Map) return Boolean with Global => null; |