Thesis (Selection of subject)Thesis (Selection of subject)(version: 285)
Assignment details
   Login via CAS
Grammar to JetBrains MPS Convertor
Thesis title in Czech: Konvertor gramatik pro JetBrains MPS
Thesis title in English: Grammar to JetBrains MPS Convertor
Key words: JetBrains MPS, gramatika, konvertor, konverze, import, programovací jazyk, projekční editor
English key words: JetBrains MPS, grammar, convertor, import, programming language, projectional editor
Academic year of topic announcement: 2015/2016
Type of assignment: diploma thesis
Thesis language: angličtina
Department: Department of Distributed and Dependable Systems (32-KDSS)
Supervisor: RNDr. Pavel Parízek, Ph.D.
Author: hidden - assigned and confirmed by the Study Dept.
Date of registration: 12.04.2016
Date of assignment: 12.04.2016
Confirmed by Study dept. on: 03.05.2016
Date and time of defence: 05.09.2016 11:30
Date of electronic submission:26.07.2016
Date of submission of printed version:28.07.2016
Date of proceeded defence: 05.09.2016
Reviewers: RNDr. Jakub Yaghob, Ph.D.
 
 
 
Guidelines
JetBrains MPS is an open-source language workbench focusing on domain-specific languages (DSL). Unlike many competing language workbenches and in contrast to the industry prevalent approach, MPS uses a projectional (structured) editor for code. The developer directly manipulates the program in its tree form (AST). The code is always represented as AST, including the persistence format, which avoids the need for parsing text.

While the majority of programming languages in the industry are currently defined using grammars, languages in MPS are codified using principles of object-oriented programming. Since MPS does not rely on parsing, but instead uses a projectional editor and layered code generation, existing languages that should be made editable in MPS need to be re-implemented using the MPS language definition facilities. The up-front cost of manually re-defining existing languages in order to use them in MPS is a major obstacle that turns away many projects that could potentially benefit from the MPS platform.

This thesis should elaborate on the possibility of automating the process of creating MPS language definition from existing grammar definitions. This would simplify and speed up the process of migrating existing languages (both general purpose and domain-specific) to the MPS platform, and thus encourage MPS adoption both between researchers and in the industry.

Specific goals:
- Design and implement the grammar to MPS convertor, possibly building on top of existing prototypes.
- The three essential aspects of language definition in MPS should be covered by the tool - abstract syntax (structure), concrete syntax (editor) and text generation.
- Demonstrate the capabilities of the translator by translating a single general-purpose language and a few DSLs.

Expected outputs:
- A working implementation of the grammar to MPS convertor.
- Examples of automatically converted languages.
- Analysis of the principal issues, both solved and unsolved, with respect to automated conversion of grammar definitions.

The outputs will be distributed under the open-source Apache 2 license and available for free download. All outputs including documentation will be in English.
References
1. The JetBrains MPS project. http://www.jetbrains.com/mps/
2. Fast Track to MPS (an MPS tutorial). https://confluence.jetbrains.com/display/MPSD32/Fast+Track+to+MPS
3. MPS Reference. https://confluence.jetbrains.com/display/MPSD30/MPS+User's+Guide
4. The MPS academic publications. http://jetbrains.com/mps/publications
5. BNF (Backus-Naur Form) for grammar definition. https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form
6. PE4MPS: a prototype implementation of a grammar to MPS convertor. https://github.com/mar9000/pe4mps
7. Antlr_MPS: a prototype of Antlr grammar to MPS convertor. https://github.com/CampagneLaboratory/ANTRL_MPS
8. Fabien Campagne. The MPS Language Workbench: Volume I. CreateSpace Independent Publishing Platform, 2014
9. Fabien Campagne. The MPS Language Workbench: Volume II. https://play.google.com/store/books/details?id=NPwyBwAAQBAJ
10. Terence Parr. The Definitive ANTLR 4 Reference. Pragmatic Bookshelf, 2013
 
Charles University | Information system of Charles University | http://www.cuni.cz/UKEN-329.html