Chapter 8: Symbol Tables and Declaration Processing
Studio
Getting Started (5 minutes)
- Review the
Studio Guidelines if necessary.
- Locate and install the studio8 project into your
eclipse workspace as directed by your instructor,
following the usual instructions.
- Open report.txt in eclipse, fill in your team members' names, and
keep the file open so that you can record your findings.
- Browse this studio document to get an idea of the work you will do in this session.
Setup (10 minutes)
- Think of a team name for your group. Try for something not easily
guessed by other people. This team name will be used for posting timing results
during the studio session.
- You must do this studio on the same equipment that the other groups are using.
Do not use your own equipment or any other machines for this, as timing is
important.
- To run the studio, right- (control-) click on Main and drag down to Run As.. Java Application.
- The run should fail because your symbol table implementation is not
complete. So
- In the console window, click on the various line numbers reported
in the exception trace for the
CorrectnessChecks class, so you can get to the
test that failed.
- Open the Main class in the default package.
- Edit the genSymtab method to switch to my implementation,
as directed by the comments.
- Run the build again, so you can see the kind of output you will
expect down the road.
- Switch back to your implementation in that file and continue on.
Design and Implementation Problem
You and your team are to design and implement a symbol table that
meets the specification as described below. You are welcome to bounce
ideas off other teams, and you should consider this problem in two phases
- Get an implementation to work. I have a test harness that will
exercise your implementation and throw an exception if it does not work.
- Try for the most efficient solution you can. There is a contest
afoot, and the winning team will receive gift certificates for
Ben and Jerry's Ice Cream.
Specifics
- It is entirely possible that this session will spill into next week's
studio. That's fine, and I've prepared for that.
Work carefully and try for a really good implementation.
- There are two files you might want to edit:
- In the studio package, you'll find the TeamSymtab
class, where your implementation will be done.
- In the Main class, there is a method that returns
instances of a symbol table implementation. You can manipulate the
comments to use my implementation just to see what is produced.
- Your work consists of completing the TeamSymtab class that you
obtained when you installed the eclipse project. As mentioned above, it's
in the studio package.
- The skeleton TeamSymtab has comments before each method
describing how the method should work. If you are not sure about what
the methods do, ask questions.
- You can use any Java library code you wish. Caveat Invoketeur
- Do not delegate
to my methods (if it were to win, I'd get the ice cream).
- When you run this project, a series of correctness checks is first
performed. Exceptions are thrown if any fails. The project then
conducts a series of timing experiments.
Contest and finishing up
Finishing Up
Submit your work as directed by your instructor.
Copyright 2010 by Ron K. Cytron
Last modified 14:32:05 CDT 13 August 2010