This set of files was arranged for cscheme5; it was also slightly
revised to conform with r3rs (by getting rid of -1+, #!null).
To get the system running under cscheme version 8.1 (I think.),
do a global replace of

syntax-table-define system-global-syntax-table
====>

add-syntax!


and

syntax-table-ref system-global-syntax-table

======>

lookup-syntax


Those changes can be made in a few minutes with an editor such as ed.


Note:  To run, SCOOPS must be loaded (pref. compiled) with
the 'vanilla' version of scheme (the one stored in dev.bin if
the default scheme is the student version).


Default values are set to #!false or '() instead of some unassigned
value.  The reason is simple: if variables were actually unassigned
it would be necessary to check this out before looking up their
values.  So the alternative was to use 'unassigned or such, and
I thought why not just use the "standard" nonsense value.


To compile scoops, execute cat.scoops (just to put all the code in
one file), run scheme and type

(sf "scoops.scm")



Afterwards, just load in the binary with 

(load "scoops.bin")



The compiled version is recommended since it takes only a few (five?)
seconds to load vs. many minutes for scoops.scm.


Classes are are defined in a global context!!

Functions:
----------

define-class

(define-class name <optional> (mixins <parent-classes>)
	(classvars <binding-pairs or names for default value>)
	(instvars 	"		"		"    )
	(options <set-list> <get-list> <init-list>))

<set-list> = settable-variables (all can be set!) |
		(settable-variables <var1 .. varn>)

<get-list> analogous to <set-list>

<init-list> analogous to the set-/get-lists except for initialization
		of (only instance) variables.

make-instance

(make-instance name '<var1> <val1> ... '<varN> <valN>)

creates an instance of class name with those variables bound
to those values provided they are inittable.
Use a variable to bind the instance returned as it does not side-effect
the environment.

compile-class

(compile-class <class>)  sets up the environments for classvars and methods.
Classes could be auto-compiled upon generation, but the TI version
does not do this.  If anyone really wants it set up that way, get in touch.

class-of-object
(class-of-object <obj>) simply returns the class-name of an object.

name->class

(name->class '<name>)  {Ex. (name->class 'klass) }

returns the class structure of <name>.

methods

(methods <class>)
returns a list of methods available to that class and defined within
that class.

all-methods
(all-methods <class>) 
cf methods--returns inherited methods as well.

classvars
similar to methods.

all-classvars
similar to all-methods.

instvars
similar to classvars and methods.

all-instvars
similar to all-classvars and all-methods.

mixins
returns all of the class's parents.

rename-class
(rename-class (<old> <new>))
redefines <old> as <new>, replacing the internal name flags.

getcv
(getcv <class> <class-var>)  
returns a gettable class-var.

setcv
(setcv <class> <class-var> <val>)
sets a settable class-var to val.

class-compiled?
(class-compiled? <class>)  does what it ought to do.

describe
(describe <instance-or-class>)
gives relevant information about either a class or an instance.

send
(send <instance> <message> <optional-arguments>)
evaluates <message> wrt the class and instance and whatever args
are required.

send-if-handles
(Same syntax as send.)
Send-if-handles returns #!false if the method (message) is
inappropiate.

define-method
(define-method (<class> <method-name>) <lambda-list> <body>))
defines a function that has access to class and instance variables
(HOW DOES IT KNOW WHICH INSTANCE?  See send.scm for some fast
flying.)  The method also has access to other methods (something
and ordinary function as an inst-var or class-var would not).

delete-method
(delete-method (<class> <method-name>) )
destroys a method.  


SHORT EX.
=========


(load "scoops.bin")
(define-class thing (classvars (location 'here))	
;;Don't use where!  It gets into the debugger in the new cscheme.
(instvars (one 1) two (three (active 4 1+ 1+)))

(options gettable-variables (settable-variables one) inittable-variables))


;;variable attributes:
;;
;;
;;	name 		init-		get-		set-
;;==================================================================
;; 	location	no		yes		no
;;
;;	one		yes		yes		yes
;;
;;	two		yes		yes		no
;;
;;	three		yes		yes		yes
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;NB If some variable is initialized, that value overrides
;;any default from active instance variables or stated defaults
;;(eg (thisvar 'this-val) ).
;;
;;Actives:
;;
;; by setting the initial value of an instance variable to
;; (active <default> <get-enhancer> <set!-enhancer>)
;;
;; the variable gets init'ed to <default> (unless otherwise stated
;; previously) and the "enhancers" are called each time the get-
;; and set- methods are used.  Actives automatically generate
;; get- and set- methods (which override any declarations
;; of settable/gettable variables at class definition time).
;;
;; NB The methods generated to access variables at startup time
;; are called get-<thing> and set-<thing>.
;;------------------------------------------------------------------



I hope the above (short) documentation helps.  Enjoy!!
Questions to me:

sherin@linc.cis.upenn.edu


