MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Niko Stotz, niko.stotz@altran.com
2019-04-18
MPS: Extend Your { Language | IDE } to Your Domain and System - - PowerPoint PPT Presentation
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer Niko Stotz, niko.stotz@altran.com 2019-04-18 DSLs M P S : E x t e n d Y o u r { L a n g u a g e | I D E } GPLs vs. DSLs General Purpose
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Niko Stotz, niko.stotz@altran.com
2019-04-18
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
GPLs vs. DSLs
General Purpose Languages (GPLs)
Domain Specific Languages (DSLs)
Characteristics of DSLs
Language
Domain
terminology, and structure Specific
domain
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
DSLs vs. “modeling”
“modeling”
Inflexible Adjust development to language / tool Bad reputation DSLs
Simulation, Testing, … Adjust language to
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
MPS: The state-of-the-art, industrial-quality {language | MDE | DSL} workbench
https://www.jetbrains.com/mps/
Same base as IntelliJ (IDEA Platform)
https://github.com/JetBrains/MPS
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Main advantages: Projectional Editing + Language Composition
User Perspective
Projectional Editing
Developer Perspective
Language Composition
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Parsing translates between user-facing text and model
Parsing Projection
Parser Serializer
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Projectional Editing works directly on model
Parsing Projection
Parser Serializer Projection Engine
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Projectional Editing enables Notational Freedom
Text Embedded Text Form Math Diagram Tree Table Overlay
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Projectional Editing enables multiple viewpoints on same model
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Language Composition enables Separation of Concerns
http://voelter.de/data/pub/Voelter-GTTSE-MPS.pdf
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Language Composition: Embedding permits two-way interaction between independent languages
SQL C PHP SQL ⊕ C SQL ⊕ PHP C ⊕ SQL
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Generator: Chains of model-to-model transformations enable flexible composition
«Statemachine» «Java2k» «Java» «Text»
m2m m2m m2t
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Generator: Chains of model-to-model transformations enable flexible composition
«Statemachine» «Java2k» «Java» «Text»
m2m m2m m2t
«JavaActor»
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Generator: Implemented through annotated target-language instance
class ExampleClass extends AbstractState { private final Context ctx = ExampleContext .get(); void transition() { } } Input: «Statemachine» Output: «Java»
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Generator: Implemented through annotated target-language instance
Input: «Statemachine» Output: «Java» class [ExampleClass] extends AbstractState { private final Context ctx = [->ExampleContext].get(); void transition() { } } node.name node.ref(GenCtx) COPY_SRCL(node.transitions)
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Zurich Insurance: Word Pseudo-code to MPS
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Other notable MPS Features
MPS: Extend Your { Language | IDE } to Your Domain and System Engineer
Links
DSL
http://dsl-course.org/
Body of Knowledge http://slebok.github.io/ MPS
https://www.jetbrains.com/mps/
https://mps.rocks/
http://mps-community.nl/
Q & A
M P S : E x t e n d Y