Implementing Domain-Specific Languages with JetBrains MPS
A Domain-Specific Language (DSL) is a programming language specifically designed for a particular (narrow) domain. DSLs can increase the productivity of programming in many ways: by offering concise programming notations, reducing the number of defects, improving communication between developers and business experts, and so on.
Implementing a DSL traditionally required defining a parser for it, often using a parser generator. What often remains overlooked is a powerful IDE for a language, despite the fact that it is keystone to adoption and success of a DSL. Recently, tools designed to define DSLs together with their IDEs have appeared under the name of language workbenches.
In this introductory tutorial, I will talk about language workbench JetBrains MPS. It supports projectional (structured) editing, an alternative to mainstream text-based editing that allows overcoming the limits of language parsers and enables domain experts to program. JetBrains MPS allows defining editors supporting textual, tabular and graphical notations.
More information about the content of the tutorial can be found here: http://dsl-course.org/abz2020
Session 1 (9:30-10:30)
We will start with a zoo of domain-specific languages (formatting languages, query languages, Scratch-like languages, business process languages), and discuss advantages and problems connected to DSL use. This will be followed by an overview of features expected from an Integrated Development Environment (IDE) for a successful practical adoption of a language. We will then explore projectional editing and see how user code is represented in JetBrains MPS. A running example (“Entities Language”) will be introduced and partly designed together with the audience.
Session 2 (11:00-12:30)
During this hands-on session, we will implement an editor for Entities Language, a simple type checker, and explore how MPS handles code generation as model-to-text and model-to-model transformations. By the end of the session, each participant will have a working IDE for Entities Language that will support editing code, informing language users about type checking results and providing intentions and quickfixes for code.
To follow the tutorial, participants are expected to bring their laptops and to have JetBrains MPS installed. MPS can be downloaded via this link: https://www.jetbrains.com/mps
- Mikhail Barash, Turku Centre for Computer Science, University of Turku, Finland
ProB Jupyter Notebook
In our ProB2 Jupyter Notebook tutorial we will go over some essential features of the ProB2 Jupyter Kernel. We will demonstrate how to use ProB2 in Jupyter to interactively model and animate various example machines. The audience will be able to participate in this. Additionally, we will show how to document B machines using Jupyter notebooks and ProB2's visualisation features.
The whole tutorial duration will be 1.5 hours.