Language Definition


Lightning allows the definition of Languages via the specification of Alloy models, thus allowing the lightweight analysis of its components. A Language is composed of Abstract Syntax Models defining the set of valid language models, of a concrete syntax model defining a visualization for those models and of a semantics model allowing to provide a meaning to language models.

How to Create a Language

You can create a Language by simply browsing to File > New > Others ... and by selecting the entry "Language" under the Lightning category.

Note that if the Lightning perspective is open, then one can directly choose the menu item File > New > Language in order to create a Language.
Once the wizard appears, you will be asked to provide the Lightning Project in which the language will be created. This information will be taken if possible from the entry selected in the project explorer.
The wizard offers you to create a default Abstract Syntax Model along with the language (as Language can't be instantiated without Abstract Syntax ). If you select this option, an empty alloy file will be created in the Abstract Syntax Folder.

What does my Language Contains ?

Your language is composed of 4 Folders:

What can I do with my Language once it is defined ?

  1. You can verify the correctness of your models via instance generation. The application of the concrete Syntax make it much easier to verify
  2. You can define Abstract Syntax to Abstract Syntax model transformations and check their validity via instance generation as well. Those transformation can be seen as a first step towards the supports of language transformations. Semantics and concrete syntax consistency remain to be checked though.
  3. You can edit any language model through its abstract syntax and directly see the impact of your changes on its concrete syntax representation.
  4. You can export any instance to the XMI format under the condition that the corresponding Ecore model is provided.