TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Corey Minyard <[log in to unmask]>
Reply To:
Thu, 27 Aug 1998 23:03:06 -0500
text/plain (149 lines)
A new version of the ASL (Ada Structured Library) has been put on to
my web page -  The changes are
numerous, see the changelog below.

The ASL containers are a set of container classes for Ada95.  See the
web page for more details.  A few library functions are now available.

Major changes in this release are:
  * Added semaphore types
  * Storage management added for all the containers.
  * A memory leak detection storage pool was added.
  * A major rework of the test programs.
  * A krunched (short filename) version is available for DOS users
A list of all changes is in a changelog at the end of the email.

I'll probably make the next release of the containers 1.0.  I plan to
add Btrees and update the user documentation to something better than
a text file.

                      What Is the ASL?


The container classes consist of the main container types:

      Vector - A variable-sized array
      AList - A list based upon an array.  This is good for stacks
        and queues that don't require insertions in the middle.
      DList - A doubly linked list, also good for stacks and queues.
        This one is good at insertions in the middle.
      Tree - An ordered binary tree, balance or unbalanced.
      List - A singly linked list, good for traversing in order, but
        you can't go backwards.
      Hash - A hash table.  Good for fast lookups, sets, and bags.
      Heap - An ordered heap.  Good for finding the largest or smallest
        value in a set.
      Graph - A standard graph.  The links are all bidirectional
      DiGraph - A directed graph.  The links are uni-directional.
      BTree - Good for fast lookups.  Not quite as fast as heaps, but
        more deterministic (not yet implemented)

Containers come in three flavors:

      Fixed - Implemented using a fixed size array.  These containers
        are guaranteed to not allocate any dynamic store for their
      Expandable - Implemented using a pointer to an array that will
        be reallocated as necessary.
      Dynamic - Each node in the container is dynamically allocated.

All containers come in all flavors, except a few do not have dynamic
flavors because it doesn't make sense.  Actually, some other
combinations don't seem to make much sense, but someone might use them
so they are provided.

All containers come in versions that use the default storage
management or allow the user to specify the storage management.

The containers are quite functional, each has a rich set of functions.
Tests and example programs are provided as well as some reasonable


The ASL contains several semaphore objects implemented using protected types:

      Binary - A standard binary semaphore
      Counting - A standard counting semaphore
      Nested - A binary semaphore, but the same task can claim it
        multiple times.  It must be released the same number of times
        (by that task) to release the semaphore.
      Nested_Prio - A nested semaphore, but it does priority
        inheritance.  This doesn't really work yet because setting
        dynamic priorities in Ada doesn't work immediately.  If anyone
        has an idea how to make it work, I'd like to know.

Leak Detection Storage Manager

A storage manager that tracks all the allocated data and lets the user
iterate over it.  Useful for finding memory leaks.  It has found a few
for me :-).

Changelog for this release

Release 0.6a - 08/22/1998

* 08/22/1998 - Created scripts and makefiles to make a krunch-ed
  version of the packages.  Unfortunately, they were not clean for
  direct krunching by gnatchop, I had to make a gnat.adc file to
  translate filenames.

* 08/22/1998 - Baseclass.Limited_Object didn't derive from
  Limited controlled, that was corrected.

Release 0.7 - 08/27/1998

* 08/23/1998 - Moved the set operations from Asgc to Asgc.Setops,
  since they didn't really belong in Asgc directly.

* 08/23/1998 - Added a bunch of semaphores.

* 08/25/1998 - Created a set of managed containers, ones that have a storage
  pool specified for them.  These exactly mimick the regular containers
  except that they have "_Managed" appended to their name.

* 08/25/1998 - Modified the sed scripts to split out the functionality, so
  that, for instance, instead of using dynamic-digraph.sed you would use
  the dynamic.sed hen the digraph.sed.

* 08/25/1998 - Created a special storage pool for detecting memory leaks.

* 08/26/1998 - Added a new Add operation that adds a value to a container
  using an iterator.  The item is added to the iterator's container and the
  iterator is positioned on the new item.

* 08/26/1998 - Added two Add_Link routines to the graph container to add
  links between iterators and values.

* 08/26/1998 - Worked on tests for graphs, they are updated.

* 08/26/1998 - Fixed some leaks in the graph packages.

* 08/27/1998 - Finished up the most of the updates to the tests.  Just a few
  more small things to do.

* 08/27/1998 - Fixed some bugs the new tests found in the ordered packages.

* 08/27/1998 - Modified the quicksort to speed it up some and to elminate
  anything but swaps to move data.  This avoids calls to the callbacks
  since we are not really adding or removing data elements.

* 08/27/1998 - Added some routines to find links between iterators and
  contained types.

* 08/27/1998 - Finished up the tests and made the makefile run them all

Corey Minyard               Internet:  [log in to unmask]
  Work: [log in to unmask]       UUCP:  [log in to unmask]