In this milestone, the MiniJava editor from the previous milestone is extended with semantic analyses. The extended editor should be able
- to resolve references in a MiniJava program,
- to calculate types of MiniJava expressions,
- to report semantic errors, warnings, and notes, and
- to provide semantic code completion.
In the last assignment of milestone 1, we provided you with a fresh MiniJava editor project, which already covers the concrete and abstract syntax of MiniJava. For grading purposes, you are required to continue with this project as a starting point for milestone 2. For lab 6 (next week) we will provide you with a fresh MiniJava project again, which covers desugarings.
You should create separate projects for your name analysis test cases and example programs:
- Right-click into the Package Explorer.
- Select New from the context menu.
- Choose Project... from the list.
- Select the Project wizard from General.
- Switch to the Next tab.
- As Project name, use
MiniJava-tests-names
. - Press the Finish button.
And one for your type analysis test cases and example programs:
- Right-click into the Package Explorer.
- Select New from the context menu.
- Choose Project... from the list.
- Select the Project wizard from General.
- Switch to the Next tab.
- As Project name, use
MiniJava-tests-types
. - Press the Finish button.
You can find the MiniJava Language Reference Manual in the appendix of the book Modern Compiler Implementation in Java (2nd edition). The relevant pages are available on Google books.
The MiniJava project by Joao Cangussu, Jens Palsberg and Vidyut Samanta provides some example programs and an HTML version of the reference manual.
The following research papers cover relevant topics of this milestone:
- L. Kats, R. Vermaas, E. Visser: Integrated Language Definition Testing: Enabling Test-Driven Language Development, OOPSLA 2011
- G. Konat, L. Kats, G. Wachsmuth, E. Visser: Declarative Name Binding and Scope Rules, SLE 2012
- G. Wachsmuth, G. Konat, V. Vergu, D. Groenewegen, E. Visser: A Language Independent Task Engine for Incremental Name and Type Analysis, SLE 2013