Compiler Construction bio photo

Compiler Construction

Twitter Github

Edit on GitHub

Milestone 2: Semantic Analysis

Overview

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.

Initial Projects

We provide you with a fresh MiniJava editor project, which 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-tests-names for assignment 5 and MiniJava-tests-types for assignment 7.

Resources

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:

  1. L. Kats, R. Vermaas, E. Visser: Integrated Language Definition Testing: Enabling Test-Driven Language Development, OOPSLA 2011
  2. G. Konat, L. Kats, G. Wachsmuth, E. Visser: Declarative Name Binding and Scope Rules, SLE 2012
  3. G. Wachsmuth, G. Konat, V. Vergu, D. Groenewegen, E. Visser: A Language Independent Task Engine for Incremental Name and Type Analysis, SLE 2013