April 30: Two optional changes were made that restrict the language a bit:
The rules for the none type were changed to allow the
compiler to reject certain expressions that are sound but probably
erroneous, e.g. (return "foo") + (return
"bar")
. In the updated semantics, none is no longer
a subtype of any other type, including unit. The rules for checking if
statements and function definitions were updated accordingly to allow some
expressions to have the type none (allowing the subtype relation to
function only in the limited contexts where it really makes sense).
The grammar for assignments and local variable declarations was changed. Formals now may occur only as the very first element of a multiple assignment. Previously they were able to show up anywhere in a multiple assignment.
You are not required to implement the updated semantics and syntax checking; however, you may if you wish (this will likely simplify the compiler a little). The old language definition and static semantics are still available for reference.
April 21: changed rules for checking a class definition, to place all class members in scope; removed corresponding typing rules for implicitly accessing class members.
April 15: inference rules for conformant corrected.
April 5: typing rule for cast
changed to
conform more closely to Java, and to allow unspecified behavior on failed casts
to or from a string or array type.
February 21: typing rule for ==
corrected to
eliminate comparison at type unit. Implementation of this condition for
PA2 is optional but will be required for PA3.
February 19: Grammar production of type modified
to replace id with keywords int
, bool
and string
.
February 16, 18: Static semantics module rule updated to reflect the requirement that a module must correctly implement its own interface.
February 3: List of Iota keywords corrected.
February 2: Meaning of \N
escape sequence
clarified.