Spoofax 1.2.0 (13-08-2014)

We’re happy to announce the release of Spoofax 1.2! This document describes the changes in Spoofax 1.2 since Spoofax 1.1.

Changes

Editor interface

Several aspects of the editor interface for Spoofax languages have been improved.

Outline

Editor outlines are now specified in Stratego instead of ESV, to allow for full customization.

  • A library with reusable outline strategies is provided to allow you to quickly realize an outline.
  • It is now possible to have icons in your outline.
  • It is now possible to also base an outline on the current text selection instead of the complete text.

Contributors: Oskar van Rest

Properties view

A property view has been added that shows properties for the selected AST node.

  • By default, the new properties view integrates with NaBL and presents (NaBL) properties associated with the selected text in the editor.
  • The properties view can be customized to show different kinds of properties, either to aid language development or to provide language users with additional information about their programs.

Contributors: Daco Harkes, Oskar van Rest

Meta-languages

We have created a new version of SDF, improved NaBL and developed a DSL for describing type systems: TS.

SDF3

SDF3 is the next iteration of SDF, replacing SDF2. The most important new features are:

  • Productive productions can be used in context-free syntax sections, improving readability and consistency with main-stream grammar notation.
  • Constructors are now formally integrated to the language. A productive production introduces the constructor directly after the left hand side non-terminal.
  • By using constructors, productions can now be uniquely identified. Therefore, it is no longer necessary to repeat the entire production in the priorities section, but use its Sort.Constructor shorthand.
  • Template productions are the major change from SDF2. They can be used to define what the concrete syntax of the language should look like. Syntactic completion and pretty-printer rules are automatically generated from templates.

Documentation

Contributors: Eduardo Amorim, Guido Wachsmuth

NaBL

NaBL has received many bug fixes and several new features. New features include:

  • Filter clauses can be used to constrain valid resolution targets based on properties such as types.
  • Disambiguation clauses can be used to disambiguate resolutions based on relations between properties, for example type hierarchies.
  • It is now possible to specify non-transitive scopes, in which resolution ignores lexical parent scopes.
  • Where clauses can include constraints and type calculations in TS syntax.
  • We added new scope calculation constructs, which can be used to navigate the scope hierarchy. For example, it is possible to calculate the surrounding class of the current variable scope.

Documentation

For examples of name binding rules, see the Java front project

Contributors: Guido Wachsmuth, Gabriël Konat

TS

TS is a new meta-language for the specification of type analysis that is complementary to NaBL. Type rules in TS define constraints on abstract syntax tree nodes and may compute a type or other property. In addition, type rules can define subtyping predicates (relations on types) and type functions.

Documentation

For examples of type system rules, see the Java front project

Contributors: Eelco Visser, Guido Wachsmuth, Gabriël Konat

Command-line integration

Programs of your language can now be parsed, analyzed, and transformed from the command-line using Sunshine (in contrast with an Eclipse). Sunshine can also be used as a Java API to develop new language tooling.

Documentation

Contributors: Vlad Vergu

Finer-grained incrementality

Incrementality in the previous version of Spoofax was based on files. Any file that changed, and any dependent files would be reparsed and reanalysed completely. In the new version of Spoofax, there is more fine-grained dependency tracking which allows more fine-grained incrementality. If a file changes, that file is reparsed, but only affected computations are recomputed, and other files are never reparsed. Name and type computations which are described in NaBL and TS are incrementally executed. Incrementality is powered by a task engine, described in our paper.

Contributors: Gabriël Konat, Guido Wachsmuth

Modelware

Spoofax Modelware is a new Spoofax component that provides integration with the Eclipse Modeling Framework (EMF) and the Graphical Modeling Framework (GMF) to allow for real-time synchronized textual and graphical editors and/or views. It also allows you to use other EMF-based tooling in combination with Spoofax.

Documentation

Contributors: Oskar van Rest

Documentation

We have moved most of our documentation to the doc repository on GitHub. We’re still in the process of moving over other documentation and writing more documentation.

There are also two new tutorials available:

  • Questionaire language tutorial: learn to create a questionaire language. This tutorial was given in a hands-on session at the Code Generation conference in 2014.
  • Compiler Construction lab assignments: a more in-depth tutorial. These are the assignments from our Compiler Construction lab where we teach students to create MiniJava inside Spoofax.

Contributors: Guido Wachsmuth and others

Other

To reduce maintenance effort, we have dropped support for Eclipse 3.7 (Indigo) and lower. We now support Eclipse 4.2 (Juno), 4.3 (Kepler), and 4.4 (Luna). We recommend you to download and install Eclipse 4.4 (Luna) for Java Developers.

We have also dropped support for Java 5 and 6. Java 7 and 8 are supported, we recommend you to download and install Java 8. Note that on OSX, Java 6 is installed by default which is not enough to run Spoofax, install Java 8 from the previous link.

All source code has been moved to our organization on GitHub. Feel free to fork our code and send pull requests for patches or improvements!

More changes, additions, and bug fixes can be found in the roadmap on our issue tracker: http://yellowgrass.org/tag/Spoofax/1.2

Contributors: Vlad Vergu, Gabriël Konat

Downloads

Eclipse plugin update site

The latest stable version of the Spoofax Eclipse plugin is always published to the stable update site: http://download.spoofax.org/update/stable. See the getting started guide for instructions on how to get started with Spoofax.

This specific release is also published to the release/1.2.0 update site: http://download.spoofax.org/update/release/1.2.0.