This is esuif, a compiler for the synchronous language Esterel
(www.esterel.org) based on the SUIF 2 system (suif.stanford.edu).

It contains an Esterel schema for the SUIF 2 database (esuifnodes),
an Esterel front-end (strl2suif: a parser plus semantic analysis), an
Esterel pretty-printer (suif2strl), a set of dismantlers
(transformstrl), and some example files.
----------------------------------------------------------------------
Building esuif:

1) Get and install the SUIF 2 system from Stanford: suif.stanford.edu
   You only need the base system: basesuif-2.2.0-4.tar.gz

   In that version of SUIF 2, there are two bugs that must be fixed
   before ESUIF will compile correctly.

   1. At the beginning of suif/suif2b/common/MString.h, replace

      #ifndef __STRING__
      #define __STRING__

      with
 
      #ifndef __MSTRING__
      #define __MSTRING__

      This prevents a collision with the STL string class.

   2. On line 11 of suif/suif2b/basesuif/suifkernel/suifkernel_forwarders.h,
      comment out the line

      typedef suif_vector<bool> bit_vector;

      i.e., change it to

      // typedef suif_vector<bool> bit_vector;
 
      This prevents a collision with the STL bit_vector class.

2) Get and install ANTLR (compiler generation tool) from http://www.antlr.org/
   It needs Java to run.  Make sure you build ANTLR's C++ libraries;
   they're hiding in antlr-2.7.1/lib/cpp.  As a test, make sure
   running "java antlr.Tool" reports that ANTLR exists.  You may need
   to set your CLASSPATH environment variable to the main ANTLR
   directory to make this work.

3) Make sure the environment variable NCIHOME is set to the root of
   the SUIF 2 installation.  On my machine, it's /home/sedwards/nci

4) Run "make" in this directory.  This should build and install the
   esuif libraries in the nci subdirectories.  This requires the nci
   build infrastructure.

5) As a test, make sure NCIHOME is set and you've sourced
   $NCIHOME/nci_setup.csh (for CSH-style shells).  "which strl2suif"
   should find that script.  cd into examples and run

   strl2suif testall.strl
   suif2strl testall.suif

   The second command will pretty-print the parsed Esterel source file.

----------------------------------------------------------------------
Directories and files

esuifnodes/		Hoof definition for the SUIF nodes used for Esterel.

	esuif.hoof	The database schema definition
	

strl2suif/		The Esterel compiler front-end: parses Esterel,
			generates an AST, then builds the SUIF data structures
			while checking for simple semantic correctness.

	esterel.g	SUIF-independent Esterel grammar for ANTLR

	estereast.g	ANTLR source for an AST walker that builds the
			SUIF database from the AST produced by esterel.g

suif2strl/		Prints Esterel-formatted SUIF as Esterel program text.

	print.cpp	Instruction/expression printing routines

examples/		Esterel source files for testing the front end.

	testall.strl	Esterel source that exercises most Esterel syntax

scripts/		Scripts for running the compiler passes.

	strl2suif	Run the front end: generate .suif from .strl source

	suif2strl	Print a .suif file generated by strl2suif

transformstrl/		Dismantling passes: transforms AST-like SUIF from
			Esterel into assembly-like SUIF for Esterel
