The (free) Ada95 Booch Components Get Ada 95 Booch Components at
SourceForge.net. Fast, secure and Free Open Source software downloads

Release notes

--

12 April 2019

Interface changes

None.

Implementation changes

Uses gprinstall for installation; allow installation on Debian native.

Updated for GNAT CE 2018/FSF GCC 9 compatibility. Note that GNAT CE 2018 only supports Ada 2012 (so set LANGUAGE=gnat12).

Resolves a problem with linking the static version of the library.

Documentation changes

None.

21 March 2016

Interface changes

Removed the dynamic and unmanaged forms of indefinite containers, as originally noted in the 20110612 release (thanks to David Henry for pointing this out).

Implementation changes

Small performance improvement in Clear for unbounded and unmanaged forms.

Removed warnings from GCC 4.9.0 (mainly style).

Shellsort raises Sort_Error, not Container_Error, if the wrong kind of Container is used.

The BCs can be built against the Ada 2005 or 2012 standards if required; the GNAT Project scenario variable LANGUAGE can be set to gnat95 (default), gnat05 or gnat12.

Documentation changes

To match the interface changes above.

22 March 2013

Additions:

Added BC.Indefinite_Unmanaged_Containers.Queues.Ordered.

Other changes:

A problem with building any indefinite dynamic form under GCC 4.7 has been resolved.

BC.Support.Indefinite_Dynamic was missing.

Includes a patch to allow use of bc.gpr on Debian 6.

05 December 2011

Changes to Ordered Collections:

Ordered Collections are now provided in all forms.

Although the index parameters to Append(After) and Insert(Before) were not used for Ordered Collections, there should have been checks that they were in range. Out-of-range values now cause Range_Error to be raised.

The behaviour of Append(After), Insert(Before) and Replace when the indicated location contains a value that is equivalent to the current value has been improved.

The behaviour of Replace when the new item is not equivalent to the replaced item was not specified (it was always treated as a Remove followed by an Insert). It has now been improved.

Changes to Queues:

Added Indefinite Unmanaged Queues.

Other changes:

make install didn't actually install the source code.

09 August 2011

Can be installed as a library in GCC and GNAT GPL installations.

All uses of ".all'Access" eliminated.

22 June 2011

Release 20110612 was missing the top-level bc.gpr and support files for Indefinite Maps.

Compilation warnings eliminated.

12 June 2011

There was a problem with BC.Support.High_Resolution_Time on 64-bit compilers. Cleared by doing the Right Thing and using Unchecked_Conversion instead of overlays.

On Mac OS X Snow Leopard, BC.Support.High_Resolution_Time failed because the OS stops the Time Stamp Counter while the processor is sleeping. Fortunately, on this OS, the resolution of the system clock is 1 microsecond, so an implementation is provided that uses Ada.Calendar.Time.

Pragmas Pure and Preelaborate used where possible.

Indefinite_Reference.Adjust failed if the Pointer was null (this happened wtih Null_Container).

Finalization of Smart Pointers wasn't idempotent.

Bags, Maps and Sets allowed predefined equality to emerge (for Maps, in the case of keys).

The dynamic and unmanaged forms of the Indefinite Containers have been removed; dynamic on the grounds that it's an unneeded complexity, and unmanaged in favour of Indefinite Unmanaged Containers.

A new tree of Indefinite Unmanaged Containers has been started, containing for the moment just Collections and Maps. These provide containment for indefinite types without the need for the user to provide any storage managers.

26 Feb 2009
There was a problem with Rings when the Mark denoted an internal index before the Top; Insert would improperly increment the Mark.
16 Feb 2009
Altered the directory structure to a more standard form; the top level is still bc-yyyymmdd, but under that is GNAT/ (supporting GNUAda and other Ada projects on SourceForge), src/ for source, tests/ for tests and demos/ for demos.
Some fixes for Mac OS X.
12 Dec 2007
Support release for The GNU Ada Project. This release adds support for Sun Solaris to the GNAT project files.
22 Aug 2007

Interface changes

None.

Implementation changes

Thanks to Chris Henrich for fixing a problem with BC.Support.Managed_Storage.

Top on an empty Ring now raises BC.Underflow.

User-defined equality used for BC.Containers.Trees.AVL.

Documentation changes

None.

New contributions

None.

16 Jul 2006

Interface changes

None.

Implementation changes

The implementations of Null_Container used to allocate a lot of static memory, to marginal benefit in performance. The new implementation creates an empty Container on the fly.

Documentation changes

None.

New contributions

None.

22 Dec 2005

Interface changes

This is the first release which incorporates the indefinite containers which have previously been part of AdaCL (http://adacl.sf.net/).

Implementation changes

None.

Documentation changes

None.

New contributions

None.

20 Apr 2005

Location

This is the first SourceForge release.

Interface changes

BC.Containers.Trees.AVL supports Container iteration.

BC.Containers.Trees.Multiway.Append reworked.

A new package BC.Support.Synchronization.Debug reports the use of semaphores and monitors.

Implementation changes

The support hash table packages on which Bags, Maps and Sets rely used default subprogram parameters, which would fail if compiled in the presence of (for example) an enumeration type named Location.

BC.Support.High_Resolution_Time now includes support for PowerPC G4 (eg, Apple PowerBook).

Documentation changes

None.

New contributions

None.

19 Mar 2004

Interface changes

The closed generic iterators that take an additional Param now accept limited indefinite types.

Some preliminary work has been done on moving Lists and Trees up a level; they don't come in the various forms (bounded, dynamic, unbounded, unmanaged), and Trees don't support iterators.
The older versions are still present, for the time being.

Semaphores (from BC.Support.Synchronization) are now limited private.

Implementation changes

BC.Support.Statistics used to raise Constraint_Error for negative values.

The bounded Container forms are no longer Controlled. This is an efficiency improvement.

Documentation changes

None.

New contributions

None.

23 Nov 2003

Interface changes

Added BC.Support.High_Resolution_Time, which supports sub-microsecond interval timing. This version is for GNAT on Linux or Windows on x86 processors.

Added BC.Support.Statistics, which supports collecting running mean, variance, minimum and maximum of sequences of values.

Implementation changes

BC.Support.Managed_Storage allows allocation of zero-length objects (an empty array, or an empty record). Thanks to Adam Beneschan.

BC.Support.Synchronization no longer exposes the controlledness of Semaphore.

BC.Support.Exceptions.Assert is no longer used (it turned out to be rather costly!)

Documentation changes

None.

New contributions

None.

15 Aug 2003

Interface changes

None.

Implementation changes

Minor changes to suppress warnings under GNAT 3.16.

The internal Bounded Hash Table is no longer Controlled.

Documentation changes

None.

New contributions

None.

9 Mar 2003

Interface changes

New unmanaged forms are provided for all the monolithic Containers. This means you don't need to supply a storage pool at all (and means you can use GNAT 3.12 if you have to!).

Implementation changes

In BC.Support.Memory_Streams, Write_Contents did the actual writing one storage element at a time. Read_Contents requires a supplier Stream that has datagram properties (unlike, it turns out, GNAT.Sockets streams, even if based on a datagram protocol).

Documentation changes

None.

New contributions

None.

11 Jan 2003

Licence changes

The library is now released under the GNAT-modified GPL. My test and demonstration code is released under the GPL. Contributed code's licences remain unchanged.

Interface changes

Constraints revisited

For Bags, Maps and Sets in each form, and in all Bounded forms, the basic container is now unconstrained with a constrained subtype: for Unbounded Bags, for instance, the declarations are

   generic
      with function Hash (V : Item) return Natural is <>;
      Buckets : Positive;
      Storage : in out System.Storage_Pools.Root_Storage_Pool'Class;
   package BC.Containers.Bags.Unbounded is
      ...
      type Unconstrained_Bag
        (Number_Of_Buckets : Positive) is new Abstract_Bag with private;

      subtype Bag is Unconstrained_Bag (Number_Of_Buckets => Buckets);

whereas for bounded bags the declarations are

   generic
      with function Hash (V : Item) return Natural is <>;
      Buckets : Positive;
      Maximum_Size : Positive;
   package BC.Containers.Bags.Bounded is
      ...
      type Unconstrained_Bag
        (Number_Of_Buckets : Positive;
         Maximum_Size : Positive) is new Abstract_Bag with private;

      subtype Bag is Unconstrained_Bag (Number_Of_Buckets => Buckets,
                                        Maximum_Size => Maximum_Size);

The intention is that users shouldn't need to change their source.

Iterators

Concurrency

The slender support for concurrency (Guarded and Synchronized forms) has been removed.

You may find you need concurrency support when using the Components to help implement your own abstractions. You'll probably find that the best approach is to implement the required concurrency behaviour with tasks, protected types and (if you choose) semaphores and locks from BC.Support.Synchronization, using the Components within this environment.

Memory streams

BC.Support.Memory_Streams provides in-memory stream support.

Other

BC.Containers.Maps.Hash_Statistics and BC.Containers.Sets.Hash_Statistics are withdrawn.

BC.Container_Error (raised when sorting unsortable container types) becomes Sort_Error.

The support for smart pointers (in BC.Smart) is deprecated; use BC.Support.Smart_Pointers instead.

Documentation changes

There are some brief notes on the BC.Support packages.

Implementation changes

None not already discussed.

New contributions

None.

2 Jun 2002

Interface changes

None.

Documentation changes

Noted that the Case Study is in fact meant to be a tutorial!

Added further recommendation to use Collections instead of Lists.

Implementation changes

Inserted a couple of pragma Elaborate_Bodys.

Added tests to suppress warnings when instantiating a bounded container of size 1 (I know this sounds silly, it happens with a code generator that's a bit naive still in this area).

Improved closed Iterator (Visit, Modify) performance.

Optimisations on BC.Containers.Trees.AVL.Validate, thanks to Steve Deller.

Implemented "=" properly for Bounded and Dynamic Maps. Completed implementation of Maps.Are_Equal.

Modifications to BC.Containers.Maps.Unbounded to allow the new Configuration_Demo to build with GNAT 3.14p (and GCC-3.1). It won't build with 3.13p, by the way, and has finalization problems with GNAT 3.15a.

New contributions

Anh Vo has contributed a pair of storage managers.

Other notes

The new storage pool management scheme, introduced in the 20011011 release, breaks GNAT 3.12.

Converted the Tests and Demos page to report compiler compatibility.

17 Jan 2002

Interface changes

The Containers that don't provide structural sharing (Bags, Collections, Dequeues, Maps, Queues, Rings, Sets and Stacks) now support Streams ('Input, 'Output).
Unfortunately, GNAT 3.13p doesn't support this for dynamic or unbounded forms (runtime errors), while ObjectAda fails at runtime when the Item type is a discriminated record (OK for tagged types, though). Walking on broken glass here.

Documentation changes

Corrected an error in the annotation of BC.Graphs.Destroy_Arc.

Added usage of maps to the case study.

Implementation changes

Removed BC.Support.Nodes (spreading its functionality to the using packages).

Removed unused First, Last variants in BC.Support.{Bounded,Dynamic,Unbounded}.

Dynamic Components didn't support "=" properly (predefined equality used for array comparison, LRM 4.5.2(24)).

New contributions

Pat Rogers has added a storage manager for real-time applications.

Other notes

ObjectAda, AdaMulti and Apex have a problem with BC.Copy, BC.Filter.

ObjectAda has trouble with sort_test.adb.

ObjectAda has trouble with user_map.adb.

I removed the Mind-It facility, they've decided to charge for the service.

11 Oct 2001

Interface changes

The way Storage Management is specified has changed significantly: you now supply a single generic parameter of type System.Storage_Pools.Root_Storage_Pool'Class.
This will be painful to start with, but should simplify matters in the long run.

The version of Sets.Add that doesn't tell you if the newly added Item was in fact already there becomes a primitive operation rather than a class-wide one.

BC.Containers.Maps.Hash_Statistics didn't work for Bounded Maps.

You couldn't override equality for a Map's Key.

Documentation changes

Added commentary to BC.Copy, BC.Filter.

Implementation changes

Continued indenting to the GNAT defaults.

Began rework of tests so as to give a clear pass/fail indication. So far only for Collections, Maps, Sets.

19 Aug 2001

Documentation changes

Began work on a case study.

Implementation changes

Added a with abort to a requeue in BC.Support.Synchronization.

Bounded Bags, Maps and Sets use a bounded hash table. This reduces the space requirement considerably and means that the Available function returns the correct value.

Began re-indenting to the GNAT default (basically, 3 spaces standard indent, 2 spaces for continuations).

13 May 2001

Interface changes

Added BC.Containers.Quicksort, BC.Containers.Shellsort generics (implemented as child packages, on the theory that you won't want the clutter in BC.Containers if you don't need it).

Removed BC.Containers.Copy, BC.Containers.Filter generics.

Bounded forms have an Available function, returning the number of free entries. The same function is now available for Dynamic and Unbounded forms (in which case it returns Natural'Last; just don't believe it!

Added Synchronized forms for Dynamic and Unbounded Maps.

Added BC.Containers.Maps.Hash_Statistics to report how well the hashing algorithm is doing. Easy enough to do the same for Bags, Sets ..

Implementation changes

Added noisy exception handlers to all the test programs ..

.. because an assertion in the Bounded Container support package was off by one, and the test programs were putting GNAT's exception message in a log file that was a relic of the old malloc checking.

Unbounded Maps missed out on the 20010325 change in which Containers no longer allocated their representation from the heap; fixed.

Synchronized Maps didn't allow you to override "=".

The GNAT compiler problem (GNAT was too permissive) noted in the June 1999 release is still there .. fixed, I hope, in BC.Support.Synchronization.
I think the reason I've not seen this problem is that I've never been able to get the concurrency support working with the free versions of the Aonix compiler. The least I can do is to try compiling synchronization support on its own! .. and OA 7.2 would have found it. Apologies.

25 March 2001

Containers no longer allocate their representation from the heap. This particularly affects Bounded forms, which no longer use the heap at all (at any rate in non-Guarded, non-Synchronized forms).

Bounded forms now use a strategy derived from that in the C++ Components to minimise the amount of data copying on insertion and removal.

Lists no longer allow the use of Remove to delete an element that is aliased by another List (the new exception BC.Referenced will be raised).
I hope this won't upset too many of you, but if you were using this feature you were living dangerously! miscalculated reference counts, dangling pointers, ... the simplest thing to do is to Clear the second List.

For consistency, what were the Bounded forms' Size parameters are now all Maximum_Size.

For consistency, the Dynamic forms' Create operation has been replaced by a new generic parameter Initial_Size.

Added generic Copy, Filter functions to BC; this allows you to copy or filter between different instantiations of BC.Containers (for the same Item type, of course).
I think these remove the need for BC.Containers.Copy, BC.Containers.Filter.

If AVL_Tree.Insert finds that there is already an element which compares equal to the given element, it now replaces the existing element. This is in case you have important non-key record components that you wish to change.
An alternative strategy in this situation is to make the actual item type a pointer to your record, so that you can change the indicated non-key fields as required (not the key fields, please!)

21 Jan 2001

Interface changes

For Containers with Bounded, Dynamic and Unbounded forms the concrete types no longer include the form name; thus, BC.Containers.Maps declares Abstract_Map, while BC.Containers.Maps.Unbounded declares Map.

The concrete Lists are now declared as plain List rather than Single_List, Double_List (there is no Abstract_List, perhaps there should be!).

The concrete Graphs, Vertices and Arcs are now declared as plain Graph, Vertex and Arc (and the abstract types in BC.Graphs are Abstract_Graph, Abstract_Vertex, and Abstract_Arc).

Maps now have the standard Container generic type Item as the range, and the Map generic type Key as the domain. If you are a Map user, you'll have to change your code's logic (as well as the type names, see above).

Added generic Copy, Filter functions to BC.Containers.

Implementation changes

Hash functions (for Bags, Maps, Sets) now expected to return Natural rather than Positive.

The Map comments used to claim that Maps cache references. This was not true.

Removed Dynamic Queues' Create(Size) operation (now a generic parameter); for use with synchronized Queues. The problem is that this was a function, so derived types would have had to override it.
This change will have to apply to other Dynamic forms.

Added a Pop_Value operation for Queues; semantically necessary for synchronized Queues.

Removed the unnecessary (illegal?) Initialize(Ring_Iterator) operation.

Iterators are visibly Controlled. The Controlled bit is because of work on synchronized forms, and the visible bit is because of a GNAT 3.13 problem with finalization when using a function return value to initialize a classwide value.

Lots of work on BC.Support.Synchronization.

30 Sep 2000

Implemented the remaining Bounded and Dynamic forms (Collections, Deques, Ordered Collections, Ordered Queues, Queues and Rings).

Added a Null_Container operation, so users can initialize structures containing Containers.

Began an alternative approach to the provision of Guarded and Synchronized forms. You can see this in BC.Containers.Guarded, BC.Containers.Maps.Synchronized and Map_Test_Concurrent. Unfortunately there seems to be a disagreement between compilers about this one!

Fixed an error in passive modifying iteration, where the first element was visited repeatedly. This has changed BC.Containers.Access_Current_Item's profile.

4 Jun 2000

Added Deques (in the Unbounded form only so far).

In AVL Trees and Lists, removed the aliased specification on elements, which forces the element to be constrained even if the discriminant has a default.

In response to a report from T E Dennison, speeded up the creation of Iterators. Note, this requires that iterators be declared of type Containers.Interator'Class, and initialized at the point of declaration.

Copying of Ordered Collections using Collections.Copy is now stable.

Removed unnecessary private operations on some Containers.

Synchronized Unbounded Maps had no "=" operation.

The added Map iterator features (which allow access to the Value) have been reworked in the same style as the standard Container iterators. They are only available when the Iterator concerned is viewed as a Map_Iterator.

Smart Pointers now have a Null_Pointer declaration.

Bounded forms didn't properly implement equality (thanks to Mark Bond for this one).

Hash tables now compile with APEX as well as GNAT and ObjectAda 7.1.

Reorganised the source files so that tests and demos go in subdirectories.

19 Feb 2000

Uses signature-based Hash Tables (for Bags, Maps, Sets).

Includes Guarded and Synchronized Maps.

3 Jan 2000

Added the ability to delete the item an Iterator is currently indicating (Delete_Item_At (It : Iterator)). Note, this feature doesn't yet work for Bags, Maps, Rings or Sets.

The C++ code offers two variants of accessors such as Queues.Front, one of which returns a value while the other returns a reference. The second case is now supported by generics such as eg Queues.Process_Front.

The Copy operation of Collections, Queues, Rings and Stacks checks for self-assignment before proceeding.

Synchronized Unbounded Rings now support blocking (balking); eg, an attempt to Pop will block until the Ring has something in it to pop. For related reasons, the Pop_Value operation is provided.

AVL Trees had an error (inherited from the C++) which would sometimes corrupt the Tree on deletion.

Containers have new versions of the Visit and Modify generics that include a parameter as an argument to Visit and Modify that is passed to the Apply routine. Thanks to Steve Doiel.

Added pragma Elaborate_Body throughout.

Continued the renaming of Container parameters from Obj to something slightly more mnemonic.

31 Oct 1999

Added Unbounded Ordered Queues.

AVL Trees are no longer limited.

Corrected ordering problem with Unbounded Ordered Collections when keys are equal. Insert now adds from the front of the Collection, Append from the rear.

21 Jun 1999

Added Unbounded Collections and Unbounded Ordered Collections.

BC.Support.Bounded, BC.Support.Unbounded subprogram specs were confused about whether indexing was from 0 (as in the C++) or 1 (in the Ada). BC.Support.Unbounded.Append(2) had an error when appending after the first element.

Corrected a GNAT compiler problem (GNAT was too permissive).

Added ObjectAda-special versions of the Bag test driver (avoiding compiler problems).

7 May 1999
Included the accidentally-omitted Bounded and Dynamic Bag sources.
4 May 1999
Added Bounded and Dynamic Bags.

Added Unbounded Rings in standard, Guarded and Synchronized forms.

ObjectAda problems with Semaphores.

14 Mar 1999
Eliminated a problem where a function call, used only for its side effect and not for its result, was deleted by high optimisation levels (-O3).

Passive iteration (in BC.Containers) didn't reset the passed-in Iterator.

Notes from John P. Woodruff on use with Rational Apex.

Added a word-counter demo, as suggested by John English in the Ada Standard Component Library Working Group.

Further contributions.

21 Feb 1999
Containers require a (defaultable) "=" operation for Items.

Added Bags (only in the Unbounded form so far).

Added Sets.

Reworked Iteration; passive iteration now obtains the Container over which to iterate via an Iterator bound to the container. This allows different styles of iteration with one interface.

Graphs have three Vertex iterators: incoming only, outgoing only, both ways.

Binary trees have in-order, pre-order and post-order iterators; Multiway trees have pre-order and post-order iterators. Only passive iteration is available, and the style is different from that of other Containers.

If a section of a list which didn't contain a shared node was purged, an invalid pointer access (Constraint_Error) would occur. This error was in the C++ (where it was OK, it seems, to free() a null pointer).

Assignment involving unbounded forms didn't correctly invalidate the cache in the copy.

Began a demos page.

Began a "contributions" section, with initial contributions from Daniel Gaudry.

29 Jan 1999
Corrected an error in AVL trees (only the second one that is an error in the original C++ and not in the translation!).

Added ObjectAda-special versions of test drivers (avoiding compiler problems).

Removed a use of the GNAT-special 'Img attribute.

Removed a couple of badly-placed pragma Inlines.

24 Jan 1999
Added Maps.

Added AVL Trees.

Removed some abbreviations; for instance, in BC.Containers.Stacks.Unbounded, the type Unb_Stack becomes Unbounded_Stack. These changes will break existing code.

Reworked Iteration throughout, with a vast improvement in the efficiency of List iterators. These changes will break existing code; compiler problems mean that you can't use GNAT 3.10p.

Moved Graph iterators up to the parent package (BC.Graphs), and included a little demonstration of Graph usage (Ada_Units).

For consistency, the concrete Graph, Vertex and Arc types are now prefixed with Undirected_ or Directed_ as appropriate; eg, a directed Vertex becomes Directed_Vertex.

20 Oct 1998
Added Graphs. There are more compiler problems, I'm afraid, though we have found a workround for one of the old ones.

Internal changes in Storage Management.

6 Oct 1998
Updated notes on compiler problems to give a workround for users of ObjectAda 7.1 Special Edition.
4 Oct 1998
Storage Management added, thanks to Pat Rogers. This has tickled some compiler problems, please check to see if you're affected.

Fixed inefficiency in Unbounded (and perhaps Dynamic) forms of Queues and Stacks.

Storage Management for Dynamic and Unbounded forms required that we instantiate some support packages inside the using generic rather than having the user pre-instantiate them. We decided to adopt the same policy for Bounded forms too. These changes will break existing code.

Added some comments to package specs.

Added some minor demo code (storage, time_lists and time_queues).

24 Aug 1998
Bugfix release.

There were several storage leaks.

It's illegal to declare abstract subprograms in a private part.

The Stack and Queue iterators were broken (by sjw).

1 Aug 1998
First release by Simon Wright. Added Binary and Multiway Trees, Smart Pointers.

--

[index]