COS 441 - Old announcements


Problem set 9 corrections

crxw.hml fixed

Somehow I omitted the COUNTER signature the first time I put the file out there. Fixed now. [Dec 12, 7:20 p.m.]

Guard and withNack

In lecture today (December 2nd) I did not cover two features of CML that could be useful in the problem set: guard and withNack. You can read this note about how to use them.

These can be useful for problem 2 of problem set 9. However, before you start worrying about the complexities of guards, I suggest you first implement a solution as described under "for partial credit you may simplify the interface"; for the simpler interface, guard and withNack are not needed.

A sample CML program, the CRXW lock, is now available.

Problem set 9 is now available.

Problem set 8 is now available.

Correction to problem set 7

Problem set 7 is now available.

More Midterm Exam clarifications (Monday 9:30)

Midterm Exam bugs & clarifications

I have applied these corrections to the exam. The original, uncorrected exam is also available.

Reconstruction and Polymorphism slides

Copies of the slides for the lectures on Type Reconstruction and Polymorphism are now available.

Midterm available

The take-home midterm exam is now available.

Midterm Review

I have made a small rearrangement in the schedule of lectures. On Thursday October 21st at 9:00, I will conduct a midterm review: among other things, I will go over problems from problem sets 1-4 in preparation for (possibly) similar problems on the take-home midterm.

If you have not turned in all the problem sets, you may turn in problem sets late (with a 50% penalty) up to 9:00 a.m. on October 21st.

The midterm will be available on the Web by Friday October 22nd and will be due on Thursday October 28th at 9:00 a.m.

Problem Set 4 Clarification (Oct. 18th)

There seems to be some confusion about what is being asked for in parts a and b of problem 1. Part a is asking, "Prove that this program type-checks in the static semantics of AnML", and part b is asking, "Prove that this program evaluates to some value v in the evaluation semantics of AnML, and show what v is."

Five typos in AnML semantics (3:50 p.m. Oct. 18th)

  1. The rule EvalVar was missing from the big-step semantics.
  2. In the very last rule, the v' should be v.
  3. The EvalApp rule did not allow for possible assignments in the evaluation of e1.
  4. The static-semantics rule for assignments should be called AsgnTyp, not VarTyp.
  5. In the very last rule, x:v should be x:v1, and the rightmost v above the line should be Delta',v.
I've fixed these in the version now available.

Problem set 4 is now available.

I have collected E-machine rules annotated with rule names conveniently onto one page.

AnML FAQ

I have been asked, "what about the following AnML program?"
 ( x := 2; x+5)
This is not a legal program because it has a free variable, x. On the other hand, if you want the effect of a program like that, you can write,
 (fun f(x:int):int = (x := 2; x+5) end) (0)
And now this program, evaluated in an empty Delta, will produce (Delta[x:2], 7).

I have been asked, "doesn't Delta accumulate a lot of no-longer-useful bindings for variables that aren't needed any more?" And the answer is, yes. But this is a semantics, not an implementation, and they do no harm.

AnML Semantics

A semantics for MinML+Assignments is now available. This should be helpful for problem 4 of problem set 3.

Problem set 3, problem #1

I have added a suggestion to this problem, about using big-step semantics instead of small-step semantics in the proof.

Problem set 3, problem #4

Problem set 3 is too long. Problem 4 is hereby postponed until the next problem set.

Appointment protocol

If you send me e-mail telling me you'd like an appointment to ask questions or discuss the problem set, propose a specific time in your first message. Then I can confirm that time or propose an alternate time. This can save a round of e-mail.

TA Office Hours

Also don't forget that Eun-Young Lee will be available in her office (rm 414) Mondays 3:00 to 4:30 in case you need help on the problem set.

Incomplete parser files replaced

Assignment 2: the version of the source files available before 2:19 p.m. October 1st did not have a complete parser.
Then the version of the source files available until 3:48 p.m. still did not have a complete parse.sml. The version now available has the parser completely implemented, I think.

SML/NJ version 110.9.1 (October 1st)

I have installed SML/NJ version 110.9.1, which supports the lazy keyword mentioned on page 3 of Harper. /cmnusr/sml/bin/sml on the CS department Unix machines now points to this version. If you have problem with this version, you can get the previous version by /cmnusr/local/sml/sml-110.0.3/bin/sml.

The parsing module of the code for problem set 2 has two different implementations of "streams":

stream.sml
Uses the lazy feature of SML;
stream-std.sml
Does not use the lazy feature.
For the programming assignments, you may use either version of streams; to change to stream-std.sml, just edit parsing/sources.cm. If you use stream.sml you'll have to type
Compiler.Control.lazysml := true;
to the SML prompt before the first time you do CM.make().

Sorry about the confusion.

Bug fix: Problem set 2, problem 2 has been modified (October 1st)

Books on reserve: Textbooks for the course are on reserve at the Engineering Library. (Sept 16)

Room Change: CS 441 will now meet in room 105, not room 302. (Sept 16)

Back to COS 441 front page