How to use Demeter/Java and AP/Studio in COM 3360
=================================================

Background information:

The AP book:
   http://www.ccs.neu.edu/research/demeter/biblio/dem-book.html

Using AP book for Java programming:
   http://www.ccs.neu.edu/research/demeter/DemeterJava/forReadersAPBook

Switching from Demeter/C++ to Demeter/Java (may be a little dated):
    http://www.ccs.neu.edu/research/demeter/course/f96/demjava/FromDemC++ToDemJava.html

The SUN Java compiler compiler:
    The JavaCC home page is at http://www.suntest.com/JavaCC


How to use Demeter/Java and AP/Studio on NU machines:
=====================================================

rlogin into an Ultra Sparc, running Solaris. Demeter/Java does not
work under SUNOS. Solaris machines, are, for example:  

alnitak
dubhe

set-up your computing environment:

set path = ( $path /proj/demsys/demjava/bin )

setenv CLASSPATH .:/proj/demsys/demjava/classes

Don't forget to use the source command.

-------------
The preferred way to set this up is to use the .software
file on NU machines.

For a sample .software file which works under both Solaris and SUN-OS, see

http://www.ccs.neu.edu/research/demeter/DemeterJava/.software
-------------

Type 

   demjava

and you will learn about the options you have to generate the Java code.

Type demjava -v

and it will tell you which version of the system you are running.
To run Demeter/Java, type

apstudio

To write an adaptive program:

Go to a directory where you would like to generate Java code.

Create Makefile

	j-gen-make

Create a class dictionary file "program.cd", with a class called "Main".

Create an adaptive behavior file "program.beh", with a method
"public static void main(String args[])" attached to class "Main".

Create a test input file "program.input".

Generate and compile and run with:

	make test

You can change "program" and "Main" to be whatever you want by editing
the Makefile.