SlideShare a Scribd company logo
JetBrains MPS
Projectional editing
in domain-specific languages
Václav Pech
Programming had been invented before we were born.
Language Workbenches
Capabilities
New language
GPL (Java, C, etc.) extension
Combine multiple languages in code
Back then
Computer terminals
Now
IDEs
Programming
R
A B
C D
R R
A B
C D
R R
A B
C D
RText Text
Binary
edit parse saveediting
compile
parse
Compiler
Programs are trees
R
A B
C D
G
R
E F
Lisp (1958)
(+ (* 2 3) 4)
+
* 4
2 3
JetBrains MPS: Projectional Editing in Domain-Specific Languages
JetBrains MPS: Projectional Editing in Domain-Specific Languages
JetBrains MPS: Projectional Editing in Domain-Specific Languages
Children have roles
R
A IfStatement
Expr StmtList
G
R
E F
condition body
Models composed of nodes
References cross the tree
R
Routine def B
Call D
G
R
E F
Languages are sets of concepts
C1
C2
C3
Cn
L1
L2
JetBrains MPS: Projectional Editing in Domain-Specific Languages
JetBrains MPS: Projectional Editing in Domain-Specific Languages
Example: MoneyLiteral
Programs and Languages
R
A B
C D
G
R
E F
C1
C2
C3
Cn
L
Models consist of nodes
Meta-models consist of concepts
Questions
Programming today
R
A B
C D
R R
A B
C D
R R
A B
C D
RText Text
Binary
edit parse saveediting
compile
parse
Compiler
What has changed since 1950's
● Much higher computing power
● Different types of computers
● Different types of applications
● Non-professional programmers
● Non-textual notations
● AI
● Touch devices, gestures, voice recognition
The electric light did not come from the
continuous improvement of candles
Oren Harari
Local or global optimum?
Too narrow view of programming?
Revolutions come from discontent people
Finance
Rules “coded“ in Word
– No real IDE
– No completion
– No syntax checks
– No code analysis
– No type-checks
– Not even coloring
Finance
Finance
Finance
Finance
Finance
Insurance
Programs
Specify/Program/Test/Debug
JetBrains MPS: Projectional Editing in Domain-Specific Languages
Government
A major provider of tax software
– The tax law is complex
– The law is changed frequently and with short notice
– The software fails to keep pace with the changes
Needed a higher-level language abstraction with
code generators
Healthcare
Software Medical Devices Accessible to Doctors
Robustness and Correctness Required
To be FDA-certified
Needs to run on multiple target platforms
– IOS
– Android
– JavaScript
JetBrains MPS: Projectional Editing in Domain-Specific Languages
Business value
Productivity
Quality
Leverage Expertise
Business value
Up-front investment - ramp-up time and effort
Effort
Functionality
LE
GPL
Up-front investment
Saves cost with increased repetition
– features, versions, projects, etc.
Prefer gradual language evolution
Questions
JetBrains MPS
High thoughts must have high language.
Aristophanes
Textual editing
R
A B
C D
R R
A B
C D
R R
A B
C D
RText Text
Binary
edit parse saveediting
compile
parse
Compiler
Projectional editing
R
A B
C D
R R
A B
C D
Redit
save
editing
R
A B
C D
R
Projectional editing
R
A B
C D
R R
A B
C D
R R
A B
C D
RText
Binary
edit
save
editing
compile
parse
Compiler
R
A B
C D
R
generate
Projectional editing
R
A B
C D
R R
A B
C D
R R
A B
C D
R
Binary
edit
save
editing
compile
Compiler
R
A B
C D
R
generate
JetBrains MPS: Projectional Editing in Domain-Specific Languages
JetBrains MPS: Projectional Editing in Domain-Specific Languages
JetBrains MPS: Projectional Editing in Domain-Specific Languages
by Jens Nerche @jensnerche
Rich syntaxes
Tabular notations
Symbolic notations
Positional notations
<no variables> <no parent>
<no libraries>
<no business objects>
<no parent>
Multiple switchable notations
Combine languages
JetBrains MPS: Projectional Editing in Domain-Specific Languages
Parsing is the bottleneck
… of language expressiveness
● Limits the possible syntaxes
● Allows only one editable code visualization
● Complicates combining languages
Aspects of language definition
Aspects of language definition
● Abstract syntax
● Concrete syntax (editor)
● Static semantics
● Constraints
● Type-system
● Dataflow
● Execution semantics / Generator
● IDE support
Aspects of language definition
● Abstract syntax
● Concrete syntax (editor)
● Static semantics
● Constraints
● Type-system
● Dataflow
● Execution semantics / Generator
● IDE support
Example: IfStatement
Example: MoneyLiteral
Aspects of language definition
● Abstract syntax
● Concrete syntax (editor)
● Static semantics
● Constraints
● Type-system
● Dataflow
● Execution semantics / Generator
● IDE support
Example: IfStatement
Example: MoneyLiteral
Questions
Aspects of language definition
● Abstract syntax
● Concrete syntax (editor)
● Static semantics
● Constraints
● Type-system
● Dataflow
● Execution semantics / Generator
● IDE support
Code generation
R
A B
C D
R R
A B
C D
R R
A B
C D
RText
Binary
edit
save
editing
compile
parse
Compiler
R
A B
C D
R
generate
Generators
Map solutions from a problem domain to an
implementation domain
● Transform models
● Output models or text
Code generation
Java source
Java source
MPS BaseLang
Text generation
Code generation
Java source
MPS BaseLang
Text generation
Model to model transformation
Closures Date/Time
Code generation
Java source
MPS BaseLang
Text generation
Closures Date/Time
Model to model transformation
Custom 2
Custom 1
Model to model transformation
Code generation
Java source
Code generation
XML config SQL
LanguagesLanguages
ExtensionsExtensions
Application code
Multi-staged transformation
● bridge the big semantics gap in smaller steps
● reuse of steps
● evolution of languages built one on top of
another
Cascading generators
Model-to-model transformation
R
A B
C 10 EUR
R
Currency
Money Language
MoneyLiteral („10 EUR“) „new Money(10, EUR)“
Java
R
A
C new Money
R
B
Questions
Typical risks
Language design takes effort
– Adds to the cost of the project → need for reuse
Language design skills
– Steep learning curve
– What goes into the language
– How to make it elegant
Cultural challenges
Books
Books
● http://books.campagnelab.org
● http://dslbook.org
https://www.jetbrains.com/mps/publications
Books
● http://books.campagnelab.org
● http://dslbook.org
← He is a Biologist!
https://www.jetbrains.com/mps/publications
The limits of language are the limits of one's world
Ludwig Wittgenstein
Questions
Want more?
http://www.jetbrains.com/mps
http://blog.jetbrains.com/mps/
Recording will be available at
http://www.youtube.com/JetBrainsTV
Send feedback to @vaclav_pech
Follow us at @jetbrains_mps
Image credits
Images used:
http://www.flickr.com/photos/horiavarlan/4329908160/sizes/m/in/photostream/
http://www.flickr.com/photos/pink_floyd/2409134519/sizes/m/in/photostream/
http://www.flickr.com/photos/atache/4124732863/sizes/m/in/photostream/
http://www.flickr.com/photos/a_ninjamonkey/3294014627/sizes/m/in/photostream/
http://www.flickr.com/photos/carlc/1968636137/
http://www.flickr.com/photos/tasuki/3503304405/sizes/m/in/photostream/
http://www.flickr.com/photos/bmwccgb/5069454884/sizes/m/in/photostream/
http://www.flickr.com/photos/rpmarks/3932013183/sizes/m/in/photostream/
http://www.flickr.com/photos/orqwith/4325166853/
https://www.flickr.com/photos/charlestilford/732688216
https://www.flickr.com/photos/jurgenappelo/5201851938
https://www.flickr.com/photos/morville/14946646966
http://fabiuss.deviantart.com/art/Narrow-View-193601976

More Related Content

PPTX
C language myths & secrets
PPTX
From Programming to Modeling And Back Again
PDF
List of programming_languages_by_type
PPTX
Go programing language
PPTX
C Language
PPT
1. over view and history of c
PPT
Introduction to c_sharp
PPTX
Introduction to C Language
C language myths & secrets
From Programming to Modeling And Back Again
List of programming_languages_by_type
Go programing language
C Language
1. over view and history of c
Introduction to c_sharp
Introduction to C Language

What's hot (19)

PDF
Principles of-programming-languages-lecture-notes-
PPT
Programming language design and implemenation
PPTX
Introduction to c language | History of C language
PPT
Programming languages vienna
PPTX
Guidance, Please! Towards a Framework for RDF-based Constraint Languages.
PPTX
C Programming Language
PDF
C++ vs python
PPTX
Computer Programming Overview
PDF
Doppl development iteration #10
PPTX
Introduction to c programming
PPTX
History of C Programming Language
PDF
Difference between c, c++ and java
PPTX
Python vs c++ ppt
PPTX
Architecting Domain-Specific Languages
PDF
Speaking in Tongues
PPTX
Programming Language
PPT
Python Intro For Managers
PDF
History of C/C++ Language
PDF
C++ vs python the best ever comparison
Principles of-programming-languages-lecture-notes-
Programming language design and implemenation
Introduction to c language | History of C language
Programming languages vienna
Guidance, Please! Towards a Framework for RDF-based Constraint Languages.
C Programming Language
C++ vs python
Computer Programming Overview
Doppl development iteration #10
Introduction to c programming
History of C Programming Language
Difference between c, c++ and java
Python vs c++ ppt
Architecting Domain-Specific Languages
Speaking in Tongues
Programming Language
Python Intro For Managers
History of C/C++ Language
C++ vs python the best ever comparison
Ad

Similar to JetBrains MPS: Projectional Editing in Domain-Specific Languages (20)

PPTX
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
PPT
Introduction to c_sharp
PPT
C PROGRAMMING
PPT
C intro
PPTX
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
DOCX
Event Driven Programming in C#.docx
PPTX
Lecture 1 introduction to language processors
PDF
The Spoofax Language Workbench (SPLASH 2010)
PPTX
Transpilers(Source-to-Source Compilers)
DOCX
Ramprasad_Darlapudi
PPTX
F# Type Provider for R Statistical Platform
PDF
C Language
PPTX
PDF
A Research Study of Data Collection and Analysis of Semantics of Programming ...
PPTX
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
PPTX
Introduction-to-Programming-Languages.pptx
PPT
C_Intro.ppt
PDF
Language Server Protocol - Why the Hype?
PDF
Tml for Ruby on Rails
PDF
Compiler gate question key
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
Introduction to c_sharp
C PROGRAMMING
C intro
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
Event Driven Programming in C#.docx
Lecture 1 introduction to language processors
The Spoofax Language Workbench (SPLASH 2010)
Transpilers(Source-to-Source Compilers)
Ramprasad_Darlapudi
F# Type Provider for R Statistical Platform
C Language
A Research Study of Data Collection and Analysis of Semantics of Programming ...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Introduction-to-Programming-Languages.pptx
C_Intro.ppt
Language Server Protocol - Why the Hype?
Tml for Ruby on Rails
Compiler gate question key
Ad

Recently uploaded (20)

PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
System and Network Administraation Chapter 3
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PPTX
Introduction to Artificial Intelligence
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Nekopoi APK 2025 free lastest update
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Transform Your Business with a Software ERP System
PPTX
assetexplorer- product-overview - presentation
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
Odoo POS Development Services by CandidRoot Solutions
System and Network Administraation Chapter 3
Why Generative AI is the Future of Content, Code & Creativity?
Introduction to Artificial Intelligence
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Nekopoi APK 2025 free lastest update
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Transform Your Business with a Software ERP System
assetexplorer- product-overview - presentation
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PTS Company Brochure 2025 (1).pdf.......
How to Choose the Right IT Partner for Your Business in Malaysia
Which alternative to Crystal Reports is best for small or large businesses.pdf
Softaken Excel to vCard Converter Software.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Wondershare Filmora 15 Crack With Activation Key [2025

JetBrains MPS: Projectional Editing in Domain-Specific Languages