198:415 - Compilers
Spring 1999
Professor Barbara G. Ryder

Programming Assignments


Projects

Project 1 is NOW (2/1/99) due by 6pm on Weds, February 3, 1999.

Project 2 is due by 6pm on Monday, February 15, 1999.

Project 3 is due by 6pm on Monday, March 1, 1999. Note the small changes regarding the files in the chap3 directory
for those students not using their own lexers (2/18/99).

Project 4 is NOW (3/22/99) due by 6pm on Monday, March 29, 1999.

Project 5 is due by midnight on Monday, April 12, 1999. Project statement updated on 4/4/99 to include new submission instructions and new package locations announced in recitation. Changes appear in red.


Project6 is due by midnight on Friday, April; 30, 1999. NO EXTENSIONS.
This file shows examples of Ocelot source code,
Tree code before and after canonicalization, and resulting SPIM instructions (updated 4/25/99).

If you want to use real programs in Tiger to test your projects, you can find samples in directory
/usr/local/class/cs415/sp99/tiger/testcases/*. Remember we are compiling Ocelot, not Tiger, so make sure the test programs you pick do not contain forbidden constructs.

New grading policy 2/15/99

Turning in a programming project late, but within 24 hours of the posted due time, will result in a 30% reduction in the possible maximum grade achievable on that project; projects more than 24 hours late will receive a grade of 0. Projects which do not compile also will receive a grade of 0.

Using make

On the web we can find an informal document about make, an online tutorial, and the GNU Make manual.


Using Java

Compiling

A Java program consists of a set of classes; one of the classes contains a main method in which program execution is to start. By convention, we write each Java class (in Java) in its own file which has the same name as the class with the .java extension.

Given a Java source code file foo.java, compilation and execution is a two step process. First, we can obtain a Java byte code file foo.class by the command: javac -g foo.java

For a set of Java files, we might choose to use the filename pattern *.java as the argument to the javac -g command. Note: if you only change 1 of several Java source files while debugging your program, then only that corresponding .java has to be recompiled.

Second, we start the Java interpreter by executing the command, java classname where classname is the class containing the main method in which execution is to start.

Debugging with jdb

An example of a short debugging session using jdb, may give you ideas on how to debug your Java codes. Remember, that to use jdb you must compile your .java files with the -g option turned on.

How to use the handin program?

You have to use the following command: handin groupname files where groupname must be the name of the group you want to send your files to and files must be a list of files that you want to send. You can get a list of the groups using the command: handin -g and you can see a list of the files you have submitted for each group by using the command: handin -l group

Recall that the handin program will overwrite files so that if you submit two files with the same name, only the last one submitted will be viewable by your TA. SO BE CAREFUL.

Last updated by Barbara Ryder at 11:00pm on April 25, 1999.