JastAdd
This is our old website.
Broken links can occur.
A new website is under construction.

History

JastAdd builds on reference attributed grammars (RAGs). The development of RAGs has its root in the Mjolner project 1986-1992 where we built an incrementally compiling programming environment for Simula. The semantic analysis part of the compiler was built using an ad-hoc extension to AGs that had support for OO name and type analysis, relying on reference attributes to connect different parts of the syntax tree. This approach was later formalized into "Door AGs" which allowed the incremental evaluator to be separated into a declarative part (an AG) and an imperative part ("door objects") with hand-written evaluation and de-evaluation methods. This allowed generation of efficient incremental semantic evaluators for object-oriented languages.

RAGs is a simplification of Door AGs, keeping the reference attributes, but throwing out the "door objects". In contrast to Door AGs, RAGs are completely declarative. However, we do not have any incremental evaluator for RAGs. The evaluator is monolithic, evaluating all attributes in an AST from scratch.

RAGs were first implemented in our tool APPLAB (APPlication language LABoratory). This was an interactive tool allowing grammars to be edited interactively, using a syntax-directed editor, and at the same time allowing a program in the specified language to be edited, also using a syntax-directed editor. Since the RAG evaluator was not incremental, all attributes were thrown away after any change to either the program or its grammar, and re-evaluated from scratch.

Our current RAG tool is named JastAdd. This is an aspect-oriented compiler tool, and the name is meant to indicate that it is easy to "just" "add" various modules written in a language based on "j" ava and the "ast". JastAdd supports RAG specification aspects, written in a slight extension to Java (to support the definition of attributes and equations), and also ordinary Java code aspects. The JastAdd system translates RAG modules to ordinary Java code, and weaves everything together into Java classes for the AST.

The first version of JastAdd, JastAdd 1, supported plain RAGs (and imperative Java code). Our new version, JastAdd 2, supports ReRAGs and an experimental version of CRAGs.