Repository of useful software components
For several years I have been teaching 1st year students how to program
in Ada. Over the years I have written numerous little packages that
have proved their worth. Thought I had better share them with you!
All are released into the public domain, except Ada.Text_IO visualisation tool
(GPL), and the Simple Prolog Interpreter, which is a derived work from
Stanford. It retains whatever rights they require.
Family of packages (a rather nuclear family :-).
Strings empty package
Fields selecting fields in strings (AWK like)
IO padded Put routines
HTML output routines
(Requires the Ada CGI package)
HTML I/O routines
HTML HTML.* implement simple procedures to output HTML strings
One_Of_Many Translation from radio buttons to enumerated types
Many_Of_Many Translation from check boxes to boolean arrays, indexed by an enumerated type
Ada.Text_IO visualisation tool
io_view demonstrates how Ada's input
model works when reading from a standard text file. Allows you to view the
effect of reading
strings (using get)
strings (using get_line)
Displays file pointer, EOL, EOF status, and allows multi level undo.
Forms based programming
forms sits on top of curses, and
allows you to create forms with input fields. Users can move around
fields, enter, update etc. Each form can have validation performed as
values are typed in. Very un-OO, but reasonably flexible.
Simple Unix interface
Unix packages make no attempt at
Posix compliance. Rather they try as closely as possible to fit in
into what has been an Ada hostile work environment, and so look as
much as they can as the original Unix/C versions.
A small subset of routines written with various degrees of quality
as I learnt how to talk C.
Simple Prolog interpreter
This prolog interpreter is an
Ada95 revision of the Prolog interpreter included with the Anna
toolset (an annotation language for Ada, developed at Stanford).
All routines can be called from an Ada program, allowing a Prolog
backend with an Ada frontend.
Not a full Prolog implementation by any means, it still provides
enough expressiveness to make some programming jobs simpler. Very
useful way of introducing the concept of declarative programming
within the context of normal problem solving (something that some
Prolog subjects seem to miss out on).
Making Motif/Callbacks easier
This callback package provides
a convenient way to create types that can be passed via callbacks. It consists
of a simple package spec, and an extensive discussion of how to use it.
A package written by one of my
students which implements huffman encoding very well.