Info Re Exam 2; LATE Submission Deadline

Dear CSCI-316 Students,

The main purpose of this email is to provide information about Exam 2. However, there are a couple of other matters I would like to address first.

TinyJ Assignment 1

TinyJ Assignment 1 assumes students have looked at the parts of the TJ-Asn-1-Info-Fa25 document that were specified in items (a)-(h) of my email of 11/24. The pages (a)-(h) refer to and items 1, 2, and 3 at the bottom of the 26th page of TJ-Asn-1-Info-Fa25 were discussed in class last week (and it is possible that you will see a question like the one of item 3 on your Exam 2 or your final exam).

TinyJ Assignment 3

TinyJ Assignment 3 has already been posted on Brightspace. However, you are not expected to work on Assignment 3 until after you have finished Assignments 1 and 2.

IMPORTANT NOTES:

  1. The DEADLINE for LATE TinyJ & Lisp assignment submissions is announced on PAGE 5 of the TinyJ Assignment 3 document!
  2. The installation instructions for TinyJ Assignment 3 (see p. 2 of the assignment document) assume TinyJ Assignment 2 has already been completed. You can do the installation as soon as you have finished TinyJ Assignment 2.

Exam 2

Exam 2 will be on Monday, December 15, the date given on page 4 of the 1st-day-announcements document. The three “Important Exam Rules” stated in my “Information about Exam 1” of Nov. 6 will apply to Exam 2 as well, and will also apply to your final exam!

Points on Exam 2 will be allocated as indicated in the POINT ALLOCATION ON EXAM 2 section in the second half of this email.

Be sure to study the attached PDF document Exam2Notes before Exam 2. (This document has also been posted to the Course Documents folder on Brightspace.)

Hand-Translation Practice

Page 3 of the Exam2Notes document shows how to hand-translate TinyJ statements involving indexed variables that have one index into TinyJ VM instructions. To test your understanding of how to translate such statements, do problem 3 on page 4 of Exam2Notes and hand-translate the ArrayTest, Fall02a, and Fall02b programs on pages 7-9 of Exam2Notes before Exam 2.

Note that the indexed variables in the TinyJ programs on pp. 2, 7, 8, and 9 all have JUST ONE index. However, problem 4 on page 4 requires you to think about how to translate TinyJ statements involving indexed variables that have more than one actual index. You will NOT be asked on Exam 2 to hand-translate statements involving indexed variables that have more than one actual index, BUT you may possibly be asked to hand-translate such statements on the Final Exam.

For example, on Exam 2 you MIGHT be asked to hand-translate code that includes:

int c[][] = new int [7][];
c[4] = b;

but Exam 2 would not ask you to hand-translate code that includes the following statements:

int c[][] = new int [7][];
c[4] = b;
c[4][3] = 9;

However, the final exam might have a question that asks you to hand-translate code that includes the above three lines.

Point Allocation on Exam 2

The maximum score on Exam 2 will be 25 pts. Points will be allocated as follows:

5 points: Recursive Descent Parsing

One or more questions that test your ability to write TJ-Assignment-1-style recursive descent parsing code based on one or more EBNF rules. (The EBNF rule(s) may or may not be from the syntax specification of the TinyJ language.) One example of such a question is given on p. 1 of Exam2Notes.

Although the question on p. 1 of Exam2Notes asks you to write code, it is POSSIBLE that on the exam you will be given multiple-choice or multiple-response questions on this topic.

10 points: Hand-Translation

One or more questions that test your ability to hand-translate TinyJ source code into TinyJ virtual machine instructions. A good way to prepare for such questions is to:

When answering exam questions that relate to hand-translation, it may be helpful to remember properties 1-5 on p. 5 of Exam2Notes!

0-2 points: Other TinyJ Questions

Zero or more other questions relating to TJ Assignment 1 or TJ Assignment 2.

4-6 points: Grammars and EBNF

One or more questions relating to grammars, parse trees, or EBNF. The exercises in “Exercises C” and “Exercises D” in the Syntax-Reading-and-Exercises-B document that was provided to you on Nov. 17 are examples of such questions. Regarding 2.16a in Exercises D, you are reminded that a general method of translating EBNF to BNF—i.e., a solution to Sethi’s problem 2.18—was presented in class (on Nov. 26).

4-6 points: Syntactic Ambiguity and Operator Precedence

One or more questions relating to syntactic ambiguity, derivations, expression grammars that reflect the associativity and precedence of operators, or syntax charts. The exercises in “Exercises E” in the Syntax-Reading-and-Exercises-B document are examples of such questions.

Important Reminder

As announced on p. 1 of the 1st-day-announcements document, exam questions may well assume you have a copy of the course reader that you can refer to during the exam!

See you in class on Wednesday.


T. Yung Kong, D.Phil.
Professor
Computer Science Department
Queens College, CUNY
Flushing, NY 11367, U.S.A.