$Id: Notice,v 1.4 1993/03/14 12:01:43 queinnec Exp $

               Meroonet, the little brother of Meroon. 
                        Christian Queinnec
                Ecole Polytechnique & INRIA-Rocquencourt
                    Christian.Queinnec@inria.fr

This document describes shortly Meroonet and its differences with
Meroon V2. Meroonet is a reduced version of Meroon and is intended to
be short, understandable therefore pedagogical. If you have any
questions about Meroonet or its elder brother Meroon, use the mailing
list meroon-info@cornas.inria.fr or ask to be enlisted in that mailing
list by sending a message to meroon-request@cornas.inria.fr.

A ten-page documentation for Meroon V2 exists that is generally valid
for Meroonet.  Check for the differences below. This documentation can
be found in the Meroon package in the Scheme repository
(nexus.yorku.ca) or, by anonymous ftp, on (IP 192.93.2.54)
ftp.inria.fr:INRIA/icsla/meroon*.tar.Z (the star stands for a date,
take the most recent one :)

The Meroonet package does not define the meroonet-error function nor the
define-meroonet-macro macro. The former is called in the rare cases where
Meroonet detects an anomaly, the invocation looks like
        (meroonet-error "what" . hints)
If you plan to make errors, map it on the error system of the underlying
Scheme implementation. The define-meroonet-macro is used to define the
three Meroonet macros. Since these are complex macros with an internal state
they cannot be written portably so you must map them onto the macro
system of the underlying Scheme implementation. Consult the Imakefile to
see some examples with Elk 2.0, Scheme->C and Bigloo.

Some extensions of Meroonet appear in files variante*.scm. They
contain examples of metaclasses, reflective metaclasses, define-method
defining generic functions on the fly and next-method? feature.

Quick reference card
^^^^^^^^^^^^^^^^^^^^
(1) Defining forms <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

(define-class <name-of-the-class> <name-of-the-super-class>
       ( <name-of-a-Mono-Field>          |
         (= <name-of-a-Mono-Field>)      |
         (* <name-of-a-Poly-Field>)      
         ... ) )

(define-generic ( <name-of-the-generic-function>
                  . <description-of-the-variables> )
      [ <optional-default-method> ]   )

<description-of-the-variables> 
    ::= ( <variable-name>     . <description-of-the-variables> )
     |  ( ( <variable-name> ) . <description-of-the-variables> )
     |  <variable-name>

(define-method ( <name-of-the-generic-function
                 . <description-of-the-variables> )
      <body-of-the-method> )

<description-of-the-variables> 
    ::= ( <variable-name> . <description-of-the-variables> )
     |  ( ( <variable-name> <class-name> ) 
          . <description-of-the-variables> )
     |  <variable-name>



(2) automatically generated functions <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

(<class-name>? object)

(make-<class-name> <value-for-a-mono-field>
                 | <length> <values-for-a-mono-field> ... )

(allocate-<class-name> <length-of-poly-field> ...)

(<class-name>-<mono-field-name> object)

(<class-name>-<poly-field-name> object index)

(set-<class-name>-<mono-field-name>! object value)

(set-<class-name>-<poly-field-name>! object index value)

(<class-name>-<poly-field-name>-length object)



(2) automatically generated variables <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

<class-name>-class                      -> class



(4) Utility functions <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

(field-value object mono-field)         -> value
(field-value object poly-field index)   -> value

(set-field-value! object value mono-field)
(set-field-value! object value poly-field index)   

(field-length object poly-field)       -> length



(5) Reflective capabilities <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

(->Class class-name)                    -> class

(->Generic generic-name)                -> generic

(object->class object)                  -> class

Predefined classes are defined as:

(define-class Object #f ())

(define-class Class Object (name number fields super-class subclass-numbers))
        number is an integer associated to each classs
        
(define-class Generic Object (name default dispatch-table signature))

(define-class Field Object (name defining-class-number))
        defining-class-number is the number of the class that introduces
        the field.

(define-class Mono-Field Field ())

(define-class Poly-Field Field ())

(number->class number)                  -> class

These classes can be obtained as values of the global variables Object-class, 
Class-class etc.


Differences wrt Meroon V2.23 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

*** No concept of anomalies: errors are not reported in a
user-friendly way, they are handled by the underlying Scheme system.
Only a few erroneous situtations are recognized.

*** Meroonet is 20% faster than Meroon V2.23. I had not time to know
why but these are good news.

*** Less features: no class- nor field- options, no tracing facility.

*** More features: Functions field-value, set-field-value! and
field-length are new.

*** No clear separation between macroexpansion-, compilation-, load-
or evaluation-time. It is possible to compile Meroonet into a
meroonet.o file and to use it (see the Imakefiqle for examples using
Scheme->C) but it is not possible to define a class in a file and a
subclass of it in another file. The only precaution for separate
linking appear in the expansion of define-class (see variable
*last-defined-class*).

*** Some pre-allocated resources are bounded. The maximal number of
classes is bounded by a constant (actually 100).

*** No predefined library of generic functions (like initialize!,
clone, show, unveil, meroon-error, generate-related-names,
add-subclass). Among them, clone, show and unveil can be imported
without problems.

*** The definitions of Class, Generic, Field, and their subclasses are
simplified and incompatible. Moreover they are ``sealed'' and should not
be extended.

*** Meroonet does not use its own macros for its definition. The
initial hierarchy and accessors are hand-built.

*** symbol->class is renamed into ->Class while symbol->generic is
renamed into ->Generic. 

*** Classes are accessible through a global variable whose name is formed
on the name of the class suffixed with -class.
