overview

Please note that this web page is a work-in-progress. Some documentation, commentaries, statistics, source code, etc. will change over the course of time. If anything is updated on the Booch Components, you'll see it here first, so be sure to check from time to time.

To help, there's a registration facility for the NetMind Mind-it service on the Release Notes page.

--

History

The Ada 95 Booch Components began in late 1994 when David Weller began a port of Grady Booch's C++ components.

A first beta release was soon available, followed by a release in February 1997.

In December of that year, David concluded that he wouldn't be able to continue with the Components and appealed on the Team Ada mailing list for a volunteer. Having already found the Components very useful, I got my employers' permission to take them on (not a speedy process); work began 18.vii.98.

Storage Management was added in August 1998 by Pat Rogers, thanks very much Pat! (you may like to visit Pat's web site).

License

The Components are issued under the Ada Community License. You can read David Weller's FAQ on the ACL.

Schedule

(Please note, the Components are likely to change fairly dramatically between releases over the next few iterations. You'll probably need to change your source at each issue; you'll certainly need to recompile).

The current version has the following components available (the red parts are new since the last release):

See the Component Documentation for the details.

Tests, demonstrations and contributions

The Components come with test and demonstration code samples.

There is also a collection of contributions.

Issues

Please feel free to mail me with any thoughts you may have!

Iterators
I've reworked Iteration throughout.

For active iterators, the new style uses a "factory" function New_Iterator, which dispatches on the concrete Container and returns an Iterator. This uses the fact that tagged types are passed by reference to allow a reference to the concrete Container to be kept behind the scenes.

You can see an example of this style in Map_Test;

  procedure Test_Active_Iterator (M : in out Maps.Map'Class) is
    use Containers; use Maps; use MB;
    Iter : Containers.Iterator := New_Iterator (M);
  begin
    while not Containers.Is_Done (Iter) loop
      Put_Line ("      Item: "
                & Containers.Current_Item (Iter)
                & " Value: "
                & Image (Maps.Current_Value (Iter).all));
      Containers.Next (Iter);
    end loop;
  end Test_Active_Iterator;
Passive iteration is handled via generics. In the same test, we might have had
  procedure Test_Passive_Iterator (M : in out Maps.Map'Class) is
    procedure Visitor is new Maps.Visit (Process, M);
    Iter : Containers.Iterator := New_Iterator (M);
  begin
    Visitor (using => Iter);
  end Test_Passive_Iterator;
Note, however, that iteration is broken under GNAT 3.10p! Please use GNAT 3.11p (or later).

Hierarchy, Graphs and Trees
Most of the Components are derived from BC.Containers.Container (and are in packages that are children of BC.Containers). The only feature common at this level is iteration; implicit in the fact that BC.Containers is a generic package parameterised by the type Item is that Containers contain just one sort of thing.

This works fine except for Graphs; a Graph is a collection of Vertices (OK so far), while Vertices are connected by (not collections of) Arcs. Unless I can think of a sensible way of doing things, Graphs will remain outside the Containers hierarchy.

Although Trees come under the Container hierarchy, they aren't Containers. This is largely because of the difficulty of supporting standard Iterators in a non-linear structure like a Tree.

That said, I've tried to use a common style throughout.

Synchronization
As discussed elsewhere, there are two forms of support for concurrency:
guarded
where objects must be locked by the client, and
synchronized
where each operation provides its own internal locking
Some synchronized objects additionally provide a form of queuing control; an attempt to read from an empty Container will result in blocking until an entry is added to the Container.

Compilers
I've been looking at adding concurrency support to Maps. This has turned up some GNAT problems, which I've reported, and has pretty well blown the Aonix ObjectAda 7.1 demo compiler out of the water (it has trouble with AVL Trees too). I understand from Aonix that they're considering a demo version of the latest compiler release; until then, support for newer BC features under OA will be low-priority.

--

[index]