Milestone 2: Semantic Analysis
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
We provide you with a template for this milestone. The template covers the concrete and abstract
syntax of MiniJava and desugarings. For grading purposes, you are required to use this project as a
starting point for milestone 2. You should use
minijava.test.names for assignment 4, and
minijava.test.types for assignment 6.
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
- P. Neron, A. Tolmach, E. Visser, G. Wachsmuth: A Theory of Name Resolution, ESOP 2015
- H. van Antwerpen, P. Neron, A. Tolmach, E. Visser, G. Wachsmuth: A Constraint Language for Static Semantic Analysis based on Scope Graphs, PEPM 2016