Scale Repository Access

You may access the Scale Subversion repository directly to obtain the most recent Scale java code. As this code is changed frequently, the Scale compiler obtained this way may not be stable. If you are on the mail list you will receive the results of the regression tests that are run when the Scale respository is updated.

Only read access is provided. To be able to make changes to the repository, you must be one of the recognized developers.

Copyright 2007 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

Accessing the Scale repository

To checkout the Scale compiler code, follow these steps:
  1. Set up the SCALE and SCALERELEASE environmental variables. You will eventually have to define all of them, that the Scale development environment requires, so you might as well create a script now to do it. The absolute path specified by $SCALE/$SCALERELEASE should specify where you want to put the Scale system.

  2. Obtain the Scale repository using
      svn co http://z.cs.utexas.edu/svn/Scale/trunk $SCALE/$SCALERELEASE
    
    The runtime directory contains the source code for runtime libraries needed when the Scale compiled programs are linked. This includes the routines needed in order to perform Fortran I/O.
  3. Compile the files:
      mkdir $SCALE/$SCALERELEASE/classes
      cd $SCALE/$SCALERELEASE/scale
      make
      cd $SCALE/$SCALERELEASE/runtime
      make
    
    Note - You must use the GNU version of the make command.

Binary Files

The most recent versions of the Java® class files and run time library source files are available as downloads.

Un-tar them in your $SCALE/$SCALERELEASE directory. Use gunzip and extract the files into a directory named "scale". You must use the GNU tar utility.

You may also want the daVinci2.1 graphics package. While the Scale compiler has its own graphical package written in Java to display CFGs and other information, it is able to use the daVinci package instead. Just make sure that the daVinci executable is on your execution path. Note - daVinci2.1 is not available for the Max OS X operating system.

Scale is also capable of generating .vcg files for graphical display.

Using Scale

  1. Make sure the $SCALE/$SCALERELEASE/classes directory is defined in your CLASSPATH environment variable and n is the version number. Or, specify the scale.jar file directly to the Java interpretor.
  2. Make sure the $SCALE/$SCALERELEASE/sys/bin directory is on your executable path. The sys directory is defined by $SCALEHOSTNAME.
  3. Make sure the $SCALE/$SCALERELEASE/sys/lib directory is defined in LD_LIBRARY_PATH. The sys directory is defined by $SCALEHOSTNAME.
  4. If you wish to do graphical displays of Scale structures (CFG, AST) using daVinci, define environment variable DAVINCIHOME to be $SCALE/$SCALERELEASE/tools/daVinci/daVinci_V2.1_sys. The sys directory is defined by $SCALEHOSTNAME.
  5. On Alpha® systems define environment variable LD_BIND_NOW to be yes.
  6. Execute
          java scale.test.Scale -h
    
    or
          java -cp scale.jar scale.test.Scale -h
    
    to obtain a list of command line switches for the Scale compiler.
  7. A typical compilation might be
      java -Xmx128m -Xms32m scale.test.Scale -oa src/file1.c src/file2.c -I src
    
    or
      java -Xmx128m -Xms32m -cp scale.jar scale.test.Scale -oa src/file1.c src/file2.c -I src
    
    This will produce .o files for file1.c and file2.c. The Java® -X parameters specify a heap size from 32 MB to 128 MB. The -oa switch specifies that the Scale compiler is to produce .s files as well. These .s files are assembled using the native assembler to produce the .o files.
For help in modifying the Scale compiler, click here. For documentation on the Scale java classes, click here.

Known Problems

  1. The Mips® backend is not complete.
  2. The PowerPC® backend has not been under regression test.

Bug Reports

Bug reports are appreciated. You may send them to the Scale mail list.

Please include a "distilled" source code file that is incorrectly compiled. A "distilled" file contains only that code that is necessary and sufficient to illustrate the bug. Please also specify the Scale compiler switches that were used.


Obtaining help

Send questions or comments to the Scale mail list.

You may subscribe to this list by visiting https://utlists.utexas.edu/sympa/info/scale-dev. (Last changed: November 29, 2007.)