Introduction to Compilers and Translators
About Programming Assignments
Your grade on a programming assignment will be based on the following
Correctness: We will test your code rigorously against our test cases.
The correctness of your implementation is important.
Coding style: We ask that you follow the coding conventions and programming
style described in the handout Notes
on Programming Style. We hope that those rules will give you a good
basis for developing a style of your own.
Code organization: Your implementation should conform to the specification
of the problem statement. In addition, we expect that your code is readable
and well-written and that the design is clean and modular.
Documentation: See the section on Documentation.
Test cases: We will look at how thorough your test cases are in checking
the correctness of your program.
An important part of the project is learning how to schedule and document
your work. Your report should be at most 2 pages long (excluding the section
on test cases) and should include the following:
1. Status of your project
Tell us whether your program works perfectly or not. If not, you should
In this case, your grade will depend on whether you can successfully demonstrate
the correct functioning of the working parts.
document exactly what you managed to get done and what you did not
demonstrate the parts that work are indeed functioning correctly by providing
a test case for each of them.
2. The high level structure of your code
Describe any classes/interfaces and data structures you used in your
implementation. Express the relationship among the classes in the form
of a diagram and show how the classes constitute a working component. You
may also want to show us the control flow of the program. It should never
be necessary for us to look at your code to understand how it works (as
opposed to understanding how it is implemented). If you find that you have
to read the code to understand a method or variable, then your description
3. Design choices
A working program is the result of many design decisions, which to a
large extent determine the efficiency and extensibility of your implementation.
However, these design decisions - how you break the problem into subproblems,
why your code is organized this way, why this class or interface was introduced,
what that method does - are usually not reflected in the final code, which
consists of very low-level, detailed declarations and statements. Describe
and justify all the design decisions (other than the ones we specified
in the problem statement) you made along the way as well as the special
features of your implementation.
4. Answers to questions
In some assignments, we will ask you to document certain details that
are specific to the implementation.
5. Testing strategy/test cases
In software development, a large fraction of the time is spent on verifying
the correctness of the software. Since techniques like formal methods are
usually too expensive to use, software developers verify the correctness
of their programs by performing an extensive testing on it. We expect you
to design test cases that test your code well. Pay attention to corner cases and
boundary conditions, because many errors show up there. Show us each test program you wrote and describe the aspect(s) of your
code that each test case attempts to check.
Briefly tell us what you learn from the assignment. In particular, tell
the technical things you learned
the amount of time you spent on the assignment
the problems you encountered (e.g., cooperation among the group members,
designing test cases, debugging, code integration)
what mistakes the course staff made in running the assignment, if any
Both hardcopy and electronic submission are required for each assignment.
All assignments will be handed out in class and will be due on the specified
date at 10:00am. Late assignments will be penalized according to the criteria
described in the first-day-of-class handout. Information about how to submit
solutions electronically is forthcoming.