|CIT 594 Grading for Assignment 3: Recognizer
Spring 2004, David Matuszek
Grading was from 100 points.
The usual 5 points/day late penalty was applied.
Your code has been tested with my JUnit test, in NewRecognizerTest.java (now posted). If you did not provide the correct method signatures, we had to fix and recompile your code in order to do further testing.
In the Notes on Recognizer Assignment I said:
Required method names:
Please use these exact method names in your
If you didn't use these method names, you did not fulfill the terms of the
assignment. Most of the problems were with using
colorName()--presumably this is because people worked from the
BNF directly and did not pay much attention to the above-quoted requirement.
Other compilation problems included:
The deduction was 10 points per compilation problem.
My JUnit tests
As noted several times, your code was tested with my JUnit tests. The first version of these tests was not designed with testing in mind, and there were numerous cases of a single error causing multiple failures. To some extent this is appropriate; if your low-level routines don't work, the higher-level routines that use them will also not work. However, there were also some unnecessary dependencies (and a couple of outright errors) in that first set of tests. I have greatly revised the JUnit tests to be more suitable for grading purposes.
The new version is NewRecognizerTest.java. Line numbers in your grade reports refer to this file.
The JUnit tests basically revealed two kinds of errors:
LogoParseException. The penalty is 5 points per detected error.
LogoParseExceptionwhen you should have, typically resulting in an
AssertionFailedErrorwith one of my error messages. The penalty is 5 points per detected error, but no more than 15 points total.
Apparently a number of people do not understand the reason for throwing exceptions. Here's a brief explanation:
pushBack(Token)method of the
Tokenizerclass was defined to be able to restore one token. That means that if you need more than one token before you can reject a BNF rule, you cannot restore the Tokenizer to its earlier state. Other BNF rules can no longer be applied correctly because the Tokenizer will not be able to supply the correct series of Tokens. Hence, any chance for a complete parse of the input has been ruined.
Your JUnit tests
Much of the point of JUnit tests is that they are cumulative--by keeping and running the entire set of tests, you can be sure that your new code does not break or expose errors in your old code. Your assignments have been building on previous assignments, therefore you should maintain and continue to use your old JUnit tests.
Due to the extensive regrading required for this assignment, I did not run
your JUnit tests. If you did not include your JUnit tests, or if you included
them but the earlier grading indicated that your program failed your own tests,
the penalty is 10 points for not having/passing your
own JUnit tests. There is no penalty
for not including an
AllTests.java, since my assignment recommended
but did not require this file.