Mps logo

MPS

Language workbench to create Domain-Specific Languages

Features

The MPS 2.0 Future Series: Part 2. Documentation, modularization et al.

We’ve talked a lot about the editor enhancements making in into MPS 2.0. Now let’s move on from the editor to other topics.

No comment, or yes?

An important improvement for everyone to benefit will be the addition of a base language for documentation and comments. By embeding this language in any of your own languages, you will be allowed to use rich text documentation inlined in your language’s program code.
One feature in particular is very interesting: you will be able to insert other nodes in the free-flowing documentation text. These could, among other things, reference yet other language nodes. So, for example, if you work with a language for expressing insurance contract rules, you can embed variable declarations and/or references to calculation rules into the flowing text, resulting in a nice integrated approach to mixing formal models and free flowing text.

A somewhat related functionality is comment-out, working for any language. As expected, commented out code will not be seen by other (referencing) nodes or by generators.

What’s your version number?

Let’s now turn to the version control integration. A couple of enhancements are planned here as well.

  • VCS annotations will be supported directly from the editor
  • The project and model properties will be diff-able. This is very useful, since these property files can themselves be non-trivial, and better VCS support here is very much appreciated.
  • Diffs will be possible on per root node, and not just per model.
  • Histories for roots will be supported.

Modules

Another major area for enhancements is the modularization of MPS itself. Now, this is very important, since it will, among other benefits, make MPS DSLs accessible to non-programmers.
The goal here is to be able to

  • Easily create standalone applications that only contain one or more MPS languages, getting rid of the “language development UI/features” UI complexity.
  • Deploy an MPS language as a plugin into IDEA

To demonstrate this, several such standalone “MPS applications” are currently under development.

Generator

As most of the other parts of MPS, the generator will also be enhanced. One important improvement is to allow parametrization of generators.
When a generator is invoked, values for the parameters can be set, for example through a facet. These values are then used in mapping configurations and in templates to determine exactly how the code generation should proceed.

Facets

MPS will also inherit IDEA’s concept of facets (a similar concept is available in Eclipse as Natures). A facet is a way to define certain characteristics of a project. Specifically, they can configure generators, through the parameters mentioned in the previous paragraph. Facets can also contribute additional UI elements to MPS itself. You’ll be able to define facets as a language aspect.

Other

There will be a large set of smaller improvements, including:

  • Improvements to the collection and closure languages
  • Pasting in from normal (i.e. ASCII-textual) Java code.
  • Enhancements to the debugger, which have already been included into the first two Milestone Builds

Conclusion

Wow, that was quite a ride, wasn’t it. Now it is your turn to give us your feedback while the info is still hot in your head. Please use the comment section below and let us adopt MPS to your needs.

Develop with pleasure!
-JetBrains MPS Team

image description