[Ada] Make the functional Maps and Sets unbounded
authorJulien Bortolussi <bortolussi@adacore.com>
Tue, 26 Apr 2022 10:02:59 +0000 (12:02 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 2 Jun 2022 09:06:43 +0000 (09:06 +0000)
commit2a466ee093827650cd33fe877c1043441c4e9427
tree61c4f0c2466e77c5a15281c1ea15b25b1acca73a
parent4c132238a51d407e1ab2388eaf8c6bce2fe5637f
[Ada] Make the functional Maps and Sets unbounded

Before this patch, the Functional Sets ans Maps were bounded both from
the user and the implementation points of view.  To make them closer to
mathematical Sets ans Maps, this patch removes the bounds from the
contracts. Note that, in practice, they are still bounded by
Count_Type'Last, even if the user is not aware of it anymore.

This patch removed constraints on length of sets and maps from the
preconditions of functions. The function Length and Num_Overlaps now
return a Big_Natural.

gcc/ada/

* libgnat/a-cofuse.ads, libgnat/a-cofuse.adb,
libgnat/a-cofuma.ads, libgnat/a-cofuma.adb: Make Length and
Num_Overlaps return Big_Natural.
* libgnat/a-cforse.ads, libgnat/a-cforse.adb,
libgnat/a-cforma.adb, libgnat/a-cfhase.ads,
libgnat/a-cfhase.adb, libgnat/a-cfhama.adb,
libgnat/a-cfdlli.adb: Adapt code to handle Big_Integers instead
of Count_Type.
gcc/ada/libgnat/a-cfdlli.adb
gcc/ada/libgnat/a-cfhama.adb
gcc/ada/libgnat/a-cfhase.adb
gcc/ada/libgnat/a-cfhase.ads
gcc/ada/libgnat/a-cforma.adb
gcc/ada/libgnat/a-cforse.adb
gcc/ada/libgnat/a-cforse.ads
gcc/ada/libgnat/a-cofuma.adb
gcc/ada/libgnat/a-cofuma.ads
gcc/ada/libgnat/a-cofuse.adb
gcc/ada/libgnat/a-cofuse.ads