A. Installing the XMT tool suite:

Assuming you have unpacked the XMT package in a directory which path is
myXMTdir, the following should have been created in myXMTdir:

1 - xcc directory: Contains the binaries and scripts for the
XMT compiler, assembler and simulator (under subdirectory "bin"), 
as well as the necessary header files (under subdirectory "include"), 
and some example configuration files that were used for the MTEAC'00 and
HIPS'01 papers (under subdirectoy "Config").

2 - suif directory: Contains the suif library files that are necessary 
for the XMT compiler.

3 - codes directory: Contains example XMT programs.

4 - myenv.sh file. Modify this file as follows:
Set the $XMTDIR environment variable to the path of the directory
where you installed this package by adding the following line at the 
top:
setenv XMTDIR myXMTdir

and do
> source myenv.sh


B. Compiling an XMT program (prog.c):

> xcc prog

The following files will be generated:

prog.gcc_in.c - an intermediate file that demonstrated the code
transformations performed by the first passes of the compilation. 
You do NOT need this file in order to run your program. 

prog.s - assembly file. 
You need this file as input for the XMT assembler,
in order to create an XMT binary.


> xmt_as prog.s prog.exe

The binary file prog.exe will be generated.
You need this file as input for the XMT simultor,
in order to run your program.


C. Running XMT programs:

> xmt_sim prog.exe configuration_file [-na]

Some statistics about the execution of the program will be reported.
The -na flag instructs the simulator to avoid printing out some
information. It is an optional flag.


D. Example:

> cd $XMTDIR/codes/DBscan
> xcc dbscan
> xmt_as dbscan.s dbscan.exe
> xmt_sim dbscan.exe $XMTDIR/xcc/Config/newtest4.cfg -na


E. Important notes:

1. Some warnings and other messages may be printed out by the complier and
assembler, that do not imply anything wrong. If the files prog.s
and prog.exe were generated, it means that the compilation and assembly
passes have completed successfully. On the other hand, errors reported by
the simulator are usually bad news. 

2. Functions calls within a spawn block are not entirely supported at this
point by the XMT compiler.

3. This tool suite does not support library functions.
