			    Lisp Translator


This package translates Lisp programs written in Interlisp to several
other dialects of Lisp.  This package was originally written in
Interlisp by Gordon Novak, and has been ported to Common Lisp by
itself with some help from Peter Karp.  This package should only be
considered an AID to the process of porting a program from Interlisp
to another dialect.  The package will perform approximately 95% of the
translation process, but it is very likely to miss certain constructs
in the translation process, which must be translated by hand.  Use
this package at your own risk; its performance is not warrantied in
any way.  You are free to distribute this package to others as long as
you include this documentation.

Note again that there are two versions of this translator: an
Interlisp version and a Common Lisp version.  The Interlisp version is
a single standalone file; the Common Lisp version includes a shell
script that uses several Unix utilities to preprocess the Interlisp
source file, plus a Common Lisp program that does the higher-level
translation.

To use this package to perform a conversion on Interlisp source file
foo.ilisp , execute the following in the directory containing this
package:

  
	To Unix csh:

      % cc -o unbracket unbracket.c  ; Build the unbracket program

      % strip_ctrls foo            ; Unix shell script that performs
                                   ; preliminary processing on
    			           ; foo.ilisp to produce foo.ilisp1 .
                                   ; foo.ilisp should be a valid
      			           ; Interlisp source code file.

	To Common Lisp:

      (load "ltran.lsp")	   ; Load the translator
      (load "ilisp-compat.lsp")    ; Load the Interlisp-compatibility package
      (load "foo.ilisp1")          ; Load the file to be converted
      
      (ltrancoms 'commonlisp "foo.lsp" foocoms nil nil)
                                   ; Create a common lisp version
  				   ; of foo to be stored in foo.lsp.
                                   ; Note that FOOCOMS is a variable
                                   ; that was created by loading
                                   ; foo.ilisp1 .

It is likely that the translator will modify the translated version of
the file (foo.lsp) such that it calls functions in the compatibility
package (ilisp-compat.lsp).  One construct that we do not translate is
the Interlisp FOR construct, although Alberto Segre @ Cornell has an
emulator of FOR.

Note that it is possible to define additional translation patterns for
use by the translator.  For example:

   (ltdefpatterns  '( ( (not (not x))  x)
                      ( (if (not x) a b)  (if x b a))
                      ... )
                   'ltuserpatterns)

where each pattern has a left-hand-side with variables in it and a
right-hand-side into which it should be translated.  This can help
patch over things the translator doesn't catch if they have a simple
syntax.  The variables m and n will only match numbers when used in a
pattern.  (The patterns above are already in the system, but are used
for examples.)
