Overview

Melange is a language workbench that provides a modular approach for customizing, assembling and integrating multiple domain-specific language (DSL) specifications and implementations. It helps to manage variability within language specifications (syntactic and semantic variation points), and reuse pieces of syntax and semantics from one DSL to the other.

The language workbench embeds a model-oriented type system that provides model polymorphism and language substitutability, i.e. the possibility to manipulate a model through different interfaces and to define generic transformations that can be invoked on models written using different DSLs. Melange also provides a dedicated meta-language where models are first-class citizens and languages are used to instantiate and manipulate them. By analogy with the class-based, object-oriented paradigm, Melange can be classified as a language-based, model-oriented language.

Melange is tightly integrated with the Eclipse Modeling Framework ecosystem and relies on the Ecore meta-language for the definition of the abstract syntax of DSLs. Operational semantics is defined using the K3 meta-language in the form of aspects that are statically woven on the language’s syntax. Designers can thus easily design an interpreter for their DSL in a non-intrusive way. Melange is bundled as a set of Eclipse plug-ins. Please refer to the installation instructions for more information.

Main Features

  • Specification of DSL syntax and operational semantics
  • Full compatibility with other tools of the EMF ecosystem (e.g. Xtext for defining a DSL’s textual syntax, or Sirius for a graphical syntax)
  • Import of existing Ecore metamodels into DSL definitions
  • Composition, extension, restriction, and customization of DSLs
  • Reuse of existing tools and transformations from one DSL to the other
  • Definition of generic tools and services that can be applied to different DSLs
  • Creation and management of language families and variation points
package fr.inria.diverse.iot

language Idl4Emf {
  syntax "/IDL/model/IDL.ecore"
  exactType Idl4EmfMT
}

language ActivityDiagram {
  syntax "/AD/model/ActivityDiagram.ecore"
  with org.xtext.activitydiagram.semantics.*
  exactType ActivityDiagramMT
}

language Lua {
  syntax "/Lua/model/Lua.ecore"
  with org.xtext.lua.semantics.*
  exactType LuaMT
}

// Assembling a new modeling language for internet
// of things systems modeling from an interface
// description language, an activity diagram, and 
// the Lua programming language
language IoT {
  syntax "/IoT/model/IoT.ecore"
  slice Idl4Emf on ["OperationDef", "PrimitiveDef"]
  merge Lua renaming { "lua" to "iot2" }
  merge ActivityDiagram renaming { "ad" to "iot2" }
  with fr.inria.diverse.iot2.OpaqueActionAspect
  with fr.inria.diverse.iot2.OperationDefAspect
  with fr.inria.diverse.iot2.ExpressionAspect
  exactType IoT2MT
}
Click on the boxes below to get more details.

Make your language executable

Melange enables the lightweight definition of operational semantics on top of metamodels. Get your interpreter with little effort!

Modular and Reusable DSL Development

Assemble, compose, and customize existing DSLs in order to create new ones!

DSLs Interoperability

Reuse existing tools and transformations from one DSL to the other thanks to model polymorphism!