JastEMF: Reference Attribute Grammars for Metamodel Semantics

JastEMF is a tool to support the integrated use of the JastAdd system (a rewriteable, circular, reference attribute grammar (ReCRAG) generator) and the Eclipse Modeling Framework (EMF), a Java based metamodeling framework built around the Ecore metamodeling language. The objective of JastEMF is to permit the specification of an Ecore metamodel's semantics using a JastAdd ReCRAG. Given an Ecore metamodel and an appropriate JastAdd abstract syntax tree (AST) the metamodel's semantics --- i.e., the value and behavior of its derived attributes, non-containment references and operations --- can be specified using JastAdd. In essence, JastAdd can be used to define the metamodel elements that are only declared in the metamodel.


  • Approach for metamodel semantics based on well-known compiler construction theories
  • Transparent integration of EMF metamodeling and JastAdd attribute grammars
    • Metamodel implementation, AG evaluator and integration artifacts are transparently merged into a single class hierarchy that is an appropriate metamodel and semantic implementation
    • Support for the generation of JastAdd AST specifications for a given Ecore metamodel
  • Easy and familiar development process
    • Build process via a single Ant task supported by JastEMF
    • EMF metamodel and JastAdd AG development can be handeled as used to. There are no special measures required for integration. Everything is handled by JastEMF.
    • Integration artefacts generated by JastEMF are well documented, so the user can easily comprehend metamodel and AG evaluator adaptations.

Why should you use JastEMF?

JastEMF considers multiple use cases (incomplete list):

  • Development of classical AG based compiler frontends that should be embedded into a state-of-the-art MDSD (Model Driven Software Devlopment) framework
  • Development of small and medium sized text-based domain specific languages (DSLs) including static semantics (e.g., resolving of cross references, type analysis etc.) and execution semantics (e.g., specifying operations code)
  • Adding further reasoning support when serialising and deserialising model instances (e.g. from XMI) in general.
  • Combine attribute grammars with other existing Model-to-Model, Text-to-Model or Model-to-Text technologies.
  • Use AGs for reasoning over XML files by combining JastAdd with XSD-to-Ecore bindings.

How to get JastEMF?

JastEMF provides an Eclipse update site ( For details consult the installation documentation.

Who is working on JastEMF?

Main contributors of JastEMF are Sven Karol (TU Dresden, Germany) and Christoff B├╝rger (Lund University, Sweden).

This software is covered by the modified BSD license. For the full license text see the LICENSE file.

Copyright (c) 2010--2015, The JastEMF Team. All rights reserved.