CIT 594 Previous Announcements
Spring 2009, David Matuszek
| Date | Announcements | ||
|---|---|---|---|
| April 13, 2009 | Here are some "Logo" programs that I've written. You may find them useful
for testing your Interpreter.
|
||
| April 6, 2009 | Some corrections for the Interpreter, mostly pretty minor (Thanks, Adam!):
My code had a ComponentListener with a
// TODO Make this work flag in it, that I didn't clean
out before giving you the code (the actual fix was elsewhere). You can ignore or
discard that listener. |
||
| April 2, 2009 | I forgot to say that I added two methods to my
|
||
| March 27, 2009 | Because the definition of the I forgot to do the equivalent in
You can download the fixed version, or just make the changes yourself
(five in |
||
| March 25, 2009 | A Also, not new but should be made explicit: Wherever a |
||
| March 25, 2009 | I have made some corrections to the examples on the
Parser assignment.
The only significant change is the replacement of a
As you know, it was a bad design decision to have both an
Poor choice of method name: The |
||
| March 17, 2009 | Some of you have asked why it is necessary to create a new
Recognizer object for every string we want to try to recognize.
The answer is, there is no good reason. I suggest (but don't
require) that you add the method public void recognize(String input) to
your Recognizer. |
||
| March 17, 2009 | Grades on Midterm Exam
|
||
| March 13, 2009 | I've posted my
TokenizerTest.java. |
||
| March 11, 2009 | In response to a couple of questions about the
Recognizer assignment,
please provide these constructors: What your tests should do is just call the Recognizer with various strings, for example, |
||
| March 3, 2009 | Here's a long list of CIT 594 Exam Questions. Most of the questions on the midterm will be drawn from this list. | ||
| February 25, 2009 | As mentioned in class, please change the method
I've been asked whether the So that I can test your public Map<String, Definitions> getRules() {
The Random Program Generator assignment is now due Monday, March 2. On Tuesday I will give out the next assignment, to be due sometime after Spring Break. |
||
| February 22, 2009 | According to the assignment: "As a special case, the two-character sequence I forgot to test for this special case. Here's the needed test: @Test
public void testNext_BackslashN_Terminal() {
Token x = new Token(TokenType.TERMINAL, "x");
Token eol = new Token(TokenType.EOL, "\n");
Token eolAsTerminal = new Token(TokenType.TERMINAL, "\n");
use("x \\n x \n x");
assertEquals(x, t.next());
assertEquals(eolAsTerminal, t.next());
assertEquals(x, t.next());
assertEquals(eol, t.next());
assertEquals(x, t.next());
assertFalse(t.hasNext());
}
To make this a little simpler, you can assume that |
||
| February 18, 2009 | There are already some minor corrections to the
Random Program Generator.
Doin' my best here. |
||
| February 18, 2009 | I've been preaching TDD (Test Driven Design) for a long time, but I don't know
how many of you have actually tried it. Now's your chance! TokenTest.java and BnfTokenizerTest.java |
||
| February 17, 2009 | In response to emailed questions, here are corrections to the Tokenizer assignment.
tokenizer.ordinaryChars(10,13);.
Try assorted Java statements, including numbers, names, and comments,
to figure out what other "ordinary characters" you need. |
||
| February 9, 2009 | In the Timing Methods assignment,
my intent was that your subset methods would work
directly with the sorted or unsorted arrays, as specified for
that particular method. I did not expect you to sort the arrays
as part of the algorithm. However, since I failed to make that
explicit, you can sort or not sort--it's up to you. If you
sort, you can use Methods should not have side effects. That is, a method should do the one thing it is supposed to do, and not change anything else in the process. If you sort the array as part of the membership test, that is a side effect, and normally would be considered Very Bad Style. In this case, however, "unsorted" really means that the order is unknown or unimportant, so it's okay. If you sort as part of the subset tests, then the sorting is part of the algorithm, and must be included in the timing of the algorithm. It is important to remember that sorting an already sorted array may (depending on the algorithm) have very different timing characteristics than sorting a random array. Hence, you should randomize between runs of the subset method. But since randomizing the array is not part of the subset algorithm, you will need to time this separately, and subtract out the time required for randomization. Finally, a request. In the assignment, I said "This file should include an analysis of each method, giving both your Big-O formula and a brief explanation of how you arrived at this formula." So that we can understand your analysis, please include a sentence or two describing your algorithm. |
||
| February 8, 2009 | If the code I provide for the Timing Methods assignment (or any other assignment) appears incomplete or messed up, please (1) let me know exactly what browser you are using, and (2) use a different browser to access the page. It appears that IE7 under Windows XP ignores the In any case, I've posted a slightly modified page for this assignment; the only change is in the HTML markup, which should now work for any halfway decent browser (not including IE) |
||
| February 6, 2009 | For testing your Tree API, I used DavesTreeTest.java. I also tested your unit tests with my own Tree API (which
I am not posting!), with three deliberate errors
in it: |
||
| January 30, 2009 | No new assignment yet. I'll post a new assignment after next Tuesday's class. | ||
| January 28, 2009 | I have posted some Required Eclipse settings. Please use these settings for all future assignments (the third assignment and beyond). | ||
| January 22, 2009 | I seem to have had real trouble with generics in this assignment. Almost everywhere that a variable is declared to be of type Also, the Thanks to all the people who have pointed out these problems to me. |
||
| January 20, 2009 | I see that my example of output from toString() was
inconsistent:one (two three(four five(six seven eight)))
with a space after one but no space after three or
five. Since my example was inconsistent, you can include or
not include a space before an open parenthesis, as you choose.
Obviously the parse(String s) method requires a space between,
for example, two and three (otherwise it would
get twothree as a single token, but it should be able to accept
and ignore any and all extra spaces. |
||
| January 20, 2009 | Correction: As someone pointed out in class, the parse method
should return a Tree<String>, not a Tree<V>.
Also, I noticed that this method really should be static; so,public static Tree<String> parse(String
s) |
||
| January 20, 2009 | Correction: The method addChild(V value) creates a
brand new node, hence adding this node to a tree cannot possibly
create a loop in the tree, hence it can never throw an IllegalArgumentException.
Just omit the throws IllegalArgumentException part. |
||
| January 19, 2009 | Correction: The constructor for the Tree class
should be public Tree(V value)public
Tree<V>(V value). |