Code

Home ] About ECL ] Status ] [ Code ] People ] Links ] ContactUs ]

logo_footer.gif (1496 bytes)

Go to SourceForge ECL Project


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

  1. Mailing Lists

  2. CVS Setup, Code Location, and Code Access

  3. CVS Command Summary

  4. Installing ECL, compiling, running regression tests

  5. Changing the Code, Creating an Update, Creating a Release

  6. Documenting the Code

  7. Miscellaneous

  • CVS Command Summary

    • 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
  • Installing ECL, compiling, running regression tests:

    • 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, Creating an Update, Creating a Release

    • 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
      • Update the release number in the static String version in ecl.java.
      • Tag all the files with the number of the release. In ecl/.. execute: cvs tag r3_0_0 ecl
        Before going on SourceForge, we had the following tags; these versions can be recuperated from the original developers :
        • r0_1 (the first release of the ECL compiler written in Java, March 10, 2000)
        • Last_JLex (the last version with the old lexer, March 31, 2000).

        Use "cvs log file" to see tag information for file.
        Use "cvs history -T -a" to see general tag information.

      • Update the CHANGELOG
      • Create the RELEASENOTES
      • Update the README if necessary
      • In ecl/ execute "make". This will create ecl.tar.gz.  The documentation is in postscript.  You can create a PDF version as follows.  Checkout ECL on NT (a machine with MikTex installed), cd doc/ecl_doc.  Edit ecl_doc.tex to set the dopdf counter to 1 (it is in the top of the file). Run make 3 times, then pdflatex twice. The ecl_doc.pdf file will be ready.
      • Move ecl.tar.gz to, for example, ecl-3.0.0.tar.gz
      • ftp upload.sourceforge.net
        login: ftp
        password: type-email-address
        cd incoming
        bin
        put ecl-3.0.0.tar.gz
      • Go to www.sourceforge.net/projects/ecl
      • Go to the admin area, and click on edit/release files
      • There should be a package called ECL.  Create a new release of this package called, e.g., ECL3.0.0.
      • Fill in all the blanks, including your file ecl-3.0.0.tar.gz.
  • Documenting the Code

    • Comments
      • Be sure code is commented!
      • Comments start with // within a function (not with /*)
    • Automatic Documentation
  • Miscellaneous

    • 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
 

Last modified 03/09/01.  Comments to Ellen Sentovich.  Copyright Cadence Design Systems, Inc, 1999, 2000, 2001.