-*- Outline -*-

This directory contains a prepackaged version of the object system
Tiny-CLOS for Scsh, the Scheme Shell (http://www.scsh.net).  It is
based on Tiny-CLOS version 1.7 by Gregor Kiczales downloaded from

   ftp://ftp.parc.xerox.com:/pub/mops/tiny/

on 2004-12-04.

Also included is an implementation of the C3 linearization algorithm
taken from Chicken's C3 egg:

   http://www.call-with-current-continuation.org/eggs/c3.html.

Note that it is only relevant if you make strong use of multiple
inheritance and have non-trivial class hierarchies.

This library can also be used with Scheme 48.

* Installation and Usage

** Scsh

To install this package I recommend the Scsh Installation Library,
available from

   http://lamp.epfl.ch/~schinz/scsh_packages/

I used version 1.1.2.

Running the installation script (scsh-install-pkg) in this directory
will install the library.

To use the library just start Scsh with the options

   -lel tinyclos/load.scm -o tiny-clos

To use the C3 linearization open the structure `tiny-clos-c3' instead:

   -lel tinyclos/load.scm -o tiny-clos-c3

** Scheme 48

Copy the files "tiny-clos.scm", "std-lin.scm", "c3-lin.scm",
"support.scm" and "packages.scm" to some directory.
At the Scheme 48 prompt type:

   ,config ,load /path/to/packages.scm

To use the standard Tiny-CLOS linearization type:

   ,open tiny-clos

To use the C3 linearization open the structure `tiny-clos-c3' instead:

   ,open tiny-clos-c3

Alternatively you might want to dump a new image with Tiny-CLOS
preloaded.  See the Scheme 48 documentation for details.

* Documentation

I don't know of any "official" Tiny-CLOS documentation.  There is a
tutorial at

   http://home.adelphi.edu/sbloch/class/archive/272/spring1997/tclos/tutorial.shtml

A summary of the Tiny-CLOS procedures can be found, for example, in
the Chicken documentation at

   http://www.call-with-current-continuation.org/manual/Unit-tinyclos.html

There is also an example file "tiny-examples.scm" from the original
distribution as well as the file "simple-example.scm" included here.

The C3 linearization algorithm is described in the paper:

   http://www.webcom.com/~haahr/dylan/linearization-oopsla96.html

The article from

   http://www.python.org/2.3/mro.html

is supposed to be a gentle introduction in the subject.

An example which illustrates the difference in the determination of
the Class Precedence List in both linearization methods is given in
the file "cpl_test.scm".

* Changes to the original version

** Fixed a bug in `%instance?' which caused `(class-of 42)' to issue
   an error.

** The support file "support.scm" is now Scheme 48 / Scsh specific.

** Scheme 48 / Scsh interface added.

** Procedure `%instance?' was renamed to `instance?' and added to user
   interface.

** The topological sort procedures are now in the file "std-lin.scm".
   The Tiny-CLOS library can also use with a C3 linearization algorithm
   for determining the Class Precedence List.

* Authors

Tiny-CLOS was written by Gregor Kiczales.  The C3 linearization
algorithm was implemented by Alex Shinn.

Port and packaging for Scheme 48 / Scsh ("support.scm", "packages.scm",
"pkg-def.scm"), this "README", "cpl_test.scm" and "simple-example.scm"
by Emilio Lopes <eclig@gmx.net>.

* License

The license for the original Tiny-CLOS library and for the implementation
of the C3 linearization can be found in the file "COPYING".

I, Emilio Lopes, hereby put my changes in the public domain.
