ECL Compiler
The ECL compiler is written in Java (there was a previous
version written in C++ which was part of Cadence's VCC tool).
The first public version was released in March, 2000. The ECL project became open
source in March 2001.
Developer Information about the ECL Compiler and its Code
-
-
-
-
-
-
-
-
- The ECL compiler uses Java Cup and JFLex, which are included in the distribution.
-
- CVS General: you checkout an image of the code, work in your
local directory, and execute commands to update to or grab updates in the main tree from
your remote location. You should have set the CVS_RSH and CVSROOT as indicated
above.
- Some handy CVS commands:
- cvs checkout ecl (creates the whole structure
in your directory space)
- cvs update ecl (merges changes in the main
tree TO your directory)
- cvs commit filename (merges FROM your
directory to the main tree)
- cvs diff (compares the current directory with
the main tree)
- cvs status (shows whether some local source
needs to be committed)
- cvs add filename (adds a new file to the main
source tree, must do commit afterwards)
- cvs remove filename (removes a file from the
main source tree)
- Example session: cvs checkout ecl; cd ecl; cp
../saved_stuff/id.java src; cvs diff (here we see that id.java needs an
update); cvs commit src/id.java;
- Using import:
- It is easy to misuse this command. Typically, if one
wants to import a new directory new_dir in ecl, for example, one should cd
new_dir; cvs import ecl/new_dir my_name my_tag
- Using configure:
- This hasn't been tested yet.
- Checkout (in a fresh directory) the 'new-configure' branch,
and you should be ready to
- configure --prefix=`pwd`
- make
- make install
-
- The current flow depends on the following:
- CVS is installed (see CVS Setup above)
- Java is installed (install, for example, JDK 1.3 from www.java.sun.com)
- JAVAC and JAVAVM are defined in the environment
- Esterel (install from www.esterel.org)
- my_ecl/ecl/src, my_ecl/ecl/util/JavaCup,
and my_ecl/ecl/util are in the CLASSPATH
- my_ecl/ecl/script is in the PATH
- Also read the documentation ecl_doc.ps in the distribution.
- Compile:
- cd my_ecl
- cvs checkout ecl
- cd ecl/util; make; cd ..
- cd src; make; cd ..
- Run regression tests (on Windows, run using cygwin):
- cd test/regression; make; cd ..
- Clean up
- cd util; make clean; cd ..
- cd src; make clean; cd ..
- cd test; make clean; cd ..
- After testing and checking any new code, one should ALWAYS run
the current regression tests to ensure that nothing has been broken.
-
- Changing the code
- Checkout a private version of the code "cvs checkout
ecl"; make changes in your private version.
- Add a regression test for your change to ecl/test/regression.
- Compile and test on at least two architectures among NT,
Solaris, and Linux.
- Run the regression tests (cd ecl/test/regression/; make).
- Check in changes using CVS, e.g., in the ecl/src directory,
execute "cvs update [filename]".
- Update the documentation according to your changes (see
ecl/doc/ecl_doc/*.tex).
- Update the CHANGELOG in this ecl directory.
- Creating an Update
- Checkout the most recent version of ecl.
- cd ecl; make.
- E-mail the ecl.tar.gz file to you whoever requested it.
- Creating a Release
-
- Comments
- Be sure code is commented!
- Comments start with // within a function (not with /*)
- Automatic Documentation
-
- Syntactical code style to follow:
- Add spaces consistently (around operators, after and before
parenth)
- NO space after a unary operator (unary minus, !, ~, etc.)
- No space between the name of a function and the parenthesis
- Space after for, while, if, etc. (these are keywords, not
functions)
- On Unix machines at CBL, one can use tgrind
to pretty print the java files. Add ~luciano/bin and ~luciano/sol2_bin to the
path. Then one can execute the following:
- tgrind file.java to get a copy of a file
- tgrind -L file.java to get an xdvi display
- tgrind -T file.java to get a latex-includable
file
|