Using Grady Booch Components


This is a set of examples dedicated to the new version of the grady booch components as made public by simon wright at:
http://www.adapower.com/adapower1/booch
It is mainly a translation of the very examples given in the 83 edition by G. Booch. I believe they provide for a simple starting point for the use of these components by giving an example for the delicate instantiation process. I choose not to make use of the "use clause" to give back some visibility to the origin of all these instantiations. (anyway I do not use the "use" clause). There is no specific example for the list and queue as they are used in "analyse_communications_network", "test_graph_search" and "ref", see these for the details of their use. The ring is exemplified in "ref" together with the tree. Tasking and concurrent programming is illustrated in the "ref" program which is a source code reformat (this is a fully developed example).

- testbag

This the main procedure of the example for the bag component

- testmaps

this the main procedure of the example for the map component

testset

This the main procedure of the example for the set component

teststack

This the main procedure of the example for the set component

analyse_communications_network

This the main procedure of the example for a more complex example coming
from the end of the g.booch book exemplifying graphs


test_graph_search

This the main procedure of the example for a more complex example coming
from the last part of the G.Booch book exemplifying another aspect of
graphs.


-dictionary_tree_test

This the main procedure of the example for the tree component. It is in the
form of a complete dictionary tree with all relevant routines for use.
optional record can be attached to every word in the tree and a simple
inheritance (demonstrated as either integer or float) can be attached and
retrieved.

-ref

This the main procedure of the example for the ring component together with
full protected tasking with semaphores and watchdogs permitting concurrent
use of rings, queues and trees.

Its syntax is quite simple :

Ref xx.adb reformats the routine xx.adb and saves the previous version as
xx.olb

Ref xx.ads reformats the routine xx.adb and saves the previous version as
xx.ols

For more than one file at a time, a file (default name temp.txt) is to be
created (for pc's use the command dir *.ad* /b>temp.txt or create the ASCII
file with an editor).

Using the default file name the syntax is ref

For another file name the syntax is ref @myfile.txt

For those having a screen with Ansi capabilities(ansi.sys for pc), a full
view of the tasking process can be achieved by adding the /a switch (blank
before / mandatory) at the end of the command line.

In any case modify the routine to fit your taste.

The source editor used to create the routines is freely available at

http://www.eng.auburn.edu/department/cse/research/grasp/

both for PC (WIN95/98/nt) and unix flavors

To download the examples click here.
Contributed by: Daniel Gaudry
Contributed on: May 10, 1999
License: Public Domain
Back