Thursday, April 18, 2013

Release of Whole Language Workbench - CG2013 Edition

At this year Code Generation conference and Language Workbench Challenge, we previewed the upcoming release of the Whole Language Workbench.

Today, we are pleased to announce that the new milestone release is publicly available.
Please note that the examples include both the LWC assignment solution and the CG hands-on session material.

As usual, both binaries and source code are available:

  • SourceForge archives here.
  • GitHub Platform source here and Examples source here.

Friday, April 12, 2013

Whole Platform hands-on session at CG2013


The main subject of the session was the demonstration of a DSL focused on facilitating the introduction of domain abstractions into an existing code base.

We started by showing a few examples of the Patterns DSL applied to different domains such as JavaFX, code reuse, SWT, and GEF. In a few of them we completely replaced the underling code while in others we only abstracted parts of it.



JavaFX code abstracted
JavaFX patterns



Patterns and Models abstracted

Reuse patterns


SWT patterns


GEF code abstracted
GEF patterns

During the hands-on part of the session we started from scratch to introduce abstraction into a Java code base.
Using a set of Java classes we built an artifacts model representing our modeled starting point.
Then we applied a few refactoring such as "Introduce Patterns in Pattern Language", "Extract Patterns", "Extract scattered Pattern" to progressively gain the ability to use in our model patterns like "Property", "JavaBean", "JavaBeanModel", and "JavaProject".
First pattern introduced

Java Beans patterns

Java code without and with new abstractions 

Thursday, April 11, 2013

Whole Platform Solution to LWC 2013


If you missed the demonstration of our solution to the LWC 2013 assignment, here are some screenshots to get an idea.


The composable Metamodels of QL and QLS (see Foreign Type Relations)
An example of a model instance using both languages
The semantics used to generate code and validate the model instance

The resulting SWT application being generated

Finally the tooling and the tests

Sunday, April 7, 2013

Whole Platform team already in Cambridge

In order to attend to the CodeGeneration conference, the Whole Platform team has already established its headquarters in the two most productive places of Cambridge: the Starbacks and the Castle Inn.


Enrico is putting its final touch to our solution for the LWC13 assignment. You can watch the whole-examples repository to have an early preview.

I am working full time for the hands-on session Incremental engineering of DSLs from Software Prototypes. Come to the session for touching how much the development of languages can be sped up.
The new technology will be disclosed as an exclusive preview for Code Generation 2013: so no screenshots to show in advance!

Thursday, April 4, 2013

Whole Platform at Code Generation 2013

We are pleased to invite you at our hands-on session at Code Generation 2013 titled Incremental engineering of DSLs from Software Prototypes.

During the session you'll be able to experiment with an innovative technology that greatly simplifies the derivation of a DSL by capturing patterns found in the code.

Don't miss the opportunity to meet the core team of the Whole Platform during the conference!

Tuesday, April 3, 2012

Whole Platform Preview at CG2012: neat new graphical notations

At CodeGeneration 2012 we previewed the next major version of the Whole Platform.
One notable change is the new look of the graphical notations.
This post outlines my design goals and provides a few comparative examples.

Notation Design Highlights

  • Optimized for visual exploration
  • Consistent choice of colors across all of the Whole Core languages
  • Reduced verbosity
  • Better use of space (in both dimensions)
  • Extended use of nested tables to improve readability
To facilitate the comparison with the old version, I show here side-by-side a few screenshots of the language notations that changed the most.

Models DSL

Grammars DSL

Queries DSL (and Commons DSL)



Semantics DSL (and Commons DSL)





Thursday, March 29, 2012

Building your own Java with the Whole Platform

At the Code Generation 2012 conference me and Enrico attended the hands-on session Building your own Java with MPS. Sadly we haven't had the opportunity to follow the second part of the tutorial because in the afternoon we had to present our session in parallel.

In the evening I managed to complete their assignment using MPS then I developed the following solution using the Whole Platform.


Exercise 2: Extending Java with Range Iteration

The solution can be defined and tested live on a running Whole Platform Language Workbench (Eclipse) without generating any code.

Open the given java example using the "Java Editor (Whole)" and save it with a different name and persistence (.xwl).


Define the metamodel of the MPSDemo1 DSL containing just the RangeIterator entity. Then add the Foreign Types Relations to be able to use the RangeIterator as a Java statement and to be able to use Java expressions and statements inside of it.

The metamodel is self-contained: you can use it alone or together with the Java language. Of course to be able to write an heterogeneous model both languages have to be deployed.

Deploy the MPSDemo1 DSL (Interpret button in the toolbar) and place a RangeIterator instance on the java Sample using the content assist menu. Then fill its features with java code as requested.


If you want to obtain also a concrete textual notation for the RangeIterator you have also to define a Grammar.



Deploy the grammar and select the new notation from the context menu of the RangeIterator instance.


Define and deploy the reduceToJava function.

In order to save the reduced version of the extended java example into a java source file define and deploy an Artifacts Generator.

Now you can go back to the extended java example and apply the generator.