Code Assignment: FJ implementation |
|||||
English only |
|||||
Code Assignment: Implementation of FJYou are asked to implement the FJ language, as described in this grammar:
An overlined element indicates sequences, as in class C { A a; B b; E meth(C c, D d) { return new E(a,b,c,d) } }
Note that we omit constructors from the source language, because these are completely determined by the fields of the class and its superclasses. More explanations, the typing and evaluation rules can be found in Igarashi, Pierce and Wadler's Featherweight Java paper, page 6, or in chapter 20 in the TAPL book. You may use the partial implementation, which provides a parser, an
abstract syntax tree representation and a main object. The tree
representation makes extensive use of Scala collection classes
(esp. The parser will automatically turn field references into select expressions. Your program must:
Hint 1: The paper talks about a global "class table". It is helpful to implement such a thing. Hint 2: The You receive bonus points for implementing contra-covariant method override and an example FJ program that uses this. Deadline: 2004-12-08 at 17h00Send an archive with your complete source code by email to Burak.Emir@epfl.ch If you added contra-covariant method override, include also a fj source file that uses this feature. Groups:
ResultsHere are the results. Every point corresponds to a testfile.
The "fulltotal" score is relative to 132. You can find out [here] where exactly your program failed, plus some individual feedback. The test files themselves can be found [here] for a little while (many are taken from your submissions, but sometimes I changed them to test something else or differently). I was lenient with respect to "stupid cast" - signaling type errors and warnings was both graded as correct (though signaling type errors is the right choice -- the stupid cast are just a technicality of the calculus). What is not correct is to let such things pass at runtime, they must lead to an exception, or to stuck evaluation. If you are interested in looking at another solution, here is an [FJ interpreter (v1.1)] that should pass all the tests. |
|