Skip to content

Latest commit

 

History

History
 
 

milestone2-analysis

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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
  • to provide semantic code completion.

Prerequisites

MiniJava Editor (Milestone 1)

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.

Test Project

You should create separate projects for your name analysis test cases and example programs:

  1. Right-click into the Package Explorer.
  2. Select New from the context menu.
  3. Choose Project... from the list.
  4. Select the Project wizard from General.
  5. Switch to the Next tab.
  6. As Project name, use MiniJava-tests-names.
  7. Press the Finish button.

And one for your type analysis test cases and example programs:

  1. Right-click into the Package Explorer.
  2. Select New from the context menu.
  3. Choose Project... from the list.
  4. Select the Project wizard from General.
  5. Switch to the Next tab.
  6. As Project name, use MiniJava-tests-types.
  7. Press the Finish button.

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