SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Downloaden Sie, um offline zu lesen
Reflections on teaching MPS
within a university course
Turku Centre for Computer Science
Mikhail Barash
Åbo Akademi Finland
MPS
@mikhail_barash
Course overview
DSL Xtext MPS design
Course overview
zoo of DSLs
definition of a DSL
semantic models
examples
advantages problems
abstract syntax trees grammars parser generators
Xtext
Xtend
writing a grammar
model modification type checking code generationscoping
projectional editing
structureMPS editor typesystem textgen generator behavior
DSL design concerns
intentions
language workbenches overview
trainees considerable practical experience
intensive tutorialtraining focused on MPS
limited time allocate to trainings
interactive
attribute grammars parsing
type checking semantics
megamodeling rewriting
code generation testing
…
“classical” course
Rascal
How to introduce projectional editing?
form builders
Scratch-like
MS Access MS Access
How to introduce projectional editing?
Mathcad
MS FrontPage
Projectional editing & modeling
semantic model
syntactic
projection
placeholder
“smooth” editing
model
projection edited projection
projection
model
editor transforms text “sin” to projection of sine
“^” is transformed to projection of exponentiation
placeholder
Equation Editor
Microsoft Word vs. JetBrains MPS
select a placeholder
select desired concept from a menu
type something that would identify some concept
select something to augment it
either by typing
or by selecting
from menu
copy-paste copy entire subtrees
trigger for concept
alias
Parsing vs. projectional editing
int class = template + 5; template= + ;classint 5
<expression>= ;<name>int
<variable declaration>
= ;<name>int
<variable declaration>
<expression>
<left> + <right>
textual
projectional
concept
trigger for concept
trigger
editor always has access to AST
current concept
containing concept
<name>int
name: string
any string can be used here
changes will be propagated
throughout the source code
concepts can also be
chosen from a menu user’s intention
Projectional editing
textual form of code only meant for the programmer
projectional editing
allows languages to evolve
but it is unambiguous
languages can be combined with each other
set of node types that can be added to ASTnew DSL
nodes are selected explicitly no ambiguities in AST
textual syntax can look ambiguous
How to motivate it?
no parsing needed
non-textual notations
Starting with Xtext
grammar
validator
code generator
type checking
scoping
quickfixes
formatting
Starting with Xtext
grammar
validator
code generator
type checking
scoping
quickfixes
formatting
concrete ∩ abstract syntax
Starting with Xtext
grammar
validator
code generator
type checking
scoping
quickfixes
formatting
Java/Xtend
concrete ∩ abstract syntax
Starting with Xtext
grammar
validator
code generator
type checking
scoping
quickfixes
formatting
Java/Xtend
Java/Xtend
concrete ∩ abstract syntax
Starting with Xtext
grammar
validator
code generator
type checking
scoping
quickfixes
formatting
Java/Xtend
Java/Xtend
Java/Xtend
concrete ∩ abstract syntax
Starting with Xtext
grammar
validator
code generator
type checking
scoping
quickfixes
formatting
Java/Xtend
Java/Xtend
Java/Xtend
Java/Xtend
concrete ∩ abstract syntax
Starting with Xtext
grammar
validator
code generator
type checking
scoping
quickfixes
formatting internal DSL
Java/Xtend
Java/Xtend
Java/Xtend
Java/Xtend
concrete ∩ abstract syntax
Starting with Xtext
grammar
validator
code generator
type checking
scoping
quickfixes
formatting
M→T
internal DSL
Java/Xtend
Java/Xtend
Java/Xtend
Java/Xtend
concrete ∩ abstract syntax
Teaching MPS: topics covered
structure
editor
code generator
type system
intentions
formatting
M→T
abstract syntax
… editor
constraintsbehavior
actions
M→M
concrete syntax
development journey
Teaching MPS: topics covered
structure
editor
code generator
type system
intentions
formatting
M→T
abstract syntax
… editor
constraintsbehavior
actions
M→M
concrete syntax
DSL DSL DSL
DSL DSL
DSL
DSL
DSL DSL DSL
development journey
MPS: Editor aspect
button to negate
the current value
returns a JButton with event
handler that negates value
reading and writing data from an AST node requires
to handle node access explicitly
cells explained “on paper” first
MPS: Structure aspect structure of language
vs. structure of its
implementation
MPS: Structure aspect
language concepts IfStatement
abstract syntax
of the language
Entity
structure of language
vs. structure of its
implementation
MPS: Structure aspect
language concepts
technical concepts
IfStatement
NodeRendering
abstract syntax
of the language
Entity
VarReference
used to define diagram
editor for concept Node
structure of language
vs. structure of its
implementation
MPS: TypeSystem aspect
checking rules are in TypeSystem
check rules are still inference rules
:==: is not an assignment
Code generation
easier to start with model-to-text transformations
Learning objectives
program model! =
language its syntax! ≠
programming in MPS developing an API* ≈
abstract vs. concrete syntax
MPS multiple concrete syntaxes can be defined
language can evolve! a motivation for projectional editing
source code text! ≠
textual graphicaltabular mathematicalnotations
right level of abstractions
clearly separated

Weitere ähnliche Inhalte

Was ist angesagt?

Jug dynamic languages_in_jvm
Jug dynamic languages_in_jvmJug dynamic languages_in_jvm
Jug dynamic languages_in_jvmDmitry Buzdin
 
GRDDL: A Pictorial Approach
GRDDL: A Pictorial ApproachGRDDL: A Pictorial Approach
GRDDL: A Pictorial ApproachChimezie Ogbuji
 
Standards For Java Coding
Standards For Java CodingStandards For Java Coding
Standards For Java CodingRahul Bhutkar
 
Standard coding practices
Standard coding practicesStandard coding practices
Standard coding practicesAnilkumar Patil
 
Coding standards
Coding standardsCoding standards
Coding standardsMimoh Ojha
 
Best Practices of Software Development
Best Practices of Software DevelopmentBest Practices of Software Development
Best Practices of Software DevelopmentFolio3 Software
 
Writing Readable Code
Writing Readable CodeWriting Readable Code
Writing Readable Codeeddiehaber
 
Introduction to automated quality assurance
Introduction to automated quality assuranceIntroduction to automated quality assurance
Introduction to automated quality assurancePhilip Johnson
 

Was ist angesagt? (8)

Jug dynamic languages_in_jvm
Jug dynamic languages_in_jvmJug dynamic languages_in_jvm
Jug dynamic languages_in_jvm
 
GRDDL: A Pictorial Approach
GRDDL: A Pictorial ApproachGRDDL: A Pictorial Approach
GRDDL: A Pictorial Approach
 
Standards For Java Coding
Standards For Java CodingStandards For Java Coding
Standards For Java Coding
 
Standard coding practices
Standard coding practicesStandard coding practices
Standard coding practices
 
Coding standards
Coding standardsCoding standards
Coding standards
 
Best Practices of Software Development
Best Practices of Software DevelopmentBest Practices of Software Development
Best Practices of Software Development
 
Writing Readable Code
Writing Readable CodeWriting Readable Code
Writing Readable Code
 
Introduction to automated quality assurance
Introduction to automated quality assuranceIntroduction to automated quality assurance
Introduction to automated quality assurance
 

Ähnlich wie Reflections on teaching JetBrains MPS within a university course

Implementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEAImplementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEAintelliyole
 
My 10 favorite Haxe language features - Francis Bourre - Codemotion Rome 2017
My 10 favorite Haxe language features - Francis Bourre - Codemotion Rome 2017My 10 favorite Haxe language features - Francis Bourre - Codemotion Rome 2017
My 10 favorite Haxe language features - Francis Bourre - Codemotion Rome 2017Codemotion
 
How does intellisense work?
How does intellisense work?How does intellisense work?
How does intellisense work?Adam Friedman
 
Before you jump into Angular
Before you jump into AngularBefore you jump into Angular
Before you jump into AngularM A Hossain Tonu
 
Web technologies-course 07.pptx
Web technologies-course 07.pptxWeb technologies-course 07.pptx
Web technologies-course 07.pptxStefan Oprea
 
Introduction to mean and mern || Event by DSC UNIDEB
Introduction to mean and mern || Event by DSC UNIDEBIntroduction to mean and mern || Event by DSC UNIDEB
Introduction to mean and mern || Event by DSC UNIDEBMuhammad Raza
 
Java Full Stack Curriculum
Java Full Stack Curriculum Java Full Stack Curriculum
Java Full Stack Curriculum NxtWave
 
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionCompiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionEelco Visser
 
AST for JavaScript developers
AST for JavaScript developersAST for JavaScript developers
AST for JavaScript developersBohdan Liashenko
 
Overlapping optimization with parsing through metagrammars
Overlapping optimization with parsing through metagrammarsOverlapping optimization with parsing through metagrammars
Overlapping optimization with parsing through metagrammarsIAEME Publication
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Codemotion
 
Agile Development in .NET
Agile Development in .NETAgile Development in .NET
Agile Development in .NETdanhermes
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLJayant Surana
 
Implementing DSLs in practice
Implementing DSLs in practiceImplementing DSLs in practice
Implementing DSLs in practiceMikhail Barash
 
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worldsmbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling WorldsIstvan Rath
 

Ähnlich wie Reflections on teaching JetBrains MPS within a university course (20)

Projectional editing
Projectional editingProjectional editing
Projectional editing
 
Implementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEAImplementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEA
 
My 10 favorite Haxe language features - Francis Bourre - Codemotion Rome 2017
My 10 favorite Haxe language features - Francis Bourre - Codemotion Rome 2017My 10 favorite Haxe language features - Francis Bourre - Codemotion Rome 2017
My 10 favorite Haxe language features - Francis Bourre - Codemotion Rome 2017
 
How does intellisense work?
How does intellisense work?How does intellisense work?
How does intellisense work?
 
DSL Best Practices
DSL Best PracticesDSL Best Practices
DSL Best Practices
 
Before you jump into Angular
Before you jump into AngularBefore you jump into Angular
Before you jump into Angular
 
Web technologies-course 07.pptx
Web technologies-course 07.pptxWeb technologies-course 07.pptx
Web technologies-course 07.pptx
 
Introduction to mean and mern || Event by DSC UNIDEB
Introduction to mean and mern || Event by DSC UNIDEBIntroduction to mean and mern || Event by DSC UNIDEB
Introduction to mean and mern || Event by DSC UNIDEB
 
Java Full Stack Curriculum
Java Full Stack Curriculum Java Full Stack Curriculum
Java Full Stack Curriculum
 
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionCompiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler Construction
 
AST for JavaScript developers
AST for JavaScript developersAST for JavaScript developers
AST for JavaScript developers
 
Overlapping optimization with parsing through metagrammars
Overlapping optimization with parsing through metagrammarsOverlapping optimization with parsing through metagrammars
Overlapping optimization with parsing through metagrammars
 
10 jsp-scripting-elements
10 jsp-scripting-elements10 jsp-scripting-elements
10 jsp-scripting-elements
 
DSLs in JavaScript
DSLs in JavaScriptDSLs in JavaScript
DSLs in JavaScript
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
 
Agile Development in .NET
Agile Development in .NETAgile Development in .NET
Agile Development in .NET
 
LANGUAGE TRANSLATOR
LANGUAGE TRANSLATORLANGUAGE TRANSLATOR
LANGUAGE TRANSLATOR
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQL
 
Implementing DSLs in practice
Implementing DSLs in practiceImplementing DSLs in practice
Implementing DSLs in practice
 
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worldsmbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
 

Mehr von Mikhail Barash

MODELS 2020 Tutorial on MPS - Supplementary Material 8 - TextGen
MODELS 2020 Tutorial on MPS - Supplementary Material 8 - TextGen MODELS 2020 Tutorial on MPS - Supplementary Material 8 - TextGen
MODELS 2020 Tutorial on MPS - Supplementary Material 8 - TextGen Mikhail Barash
 
MODELS 2020 Tutorial on MPS - Supplementary Material 5 - Creating concept Ent...
MODELS 2020 Tutorial on MPS - Supplementary Material 5 - Creating concept Ent...MODELS 2020 Tutorial on MPS - Supplementary Material 5 - Creating concept Ent...
MODELS 2020 Tutorial on MPS - Supplementary Material 5 - Creating concept Ent...Mikhail Barash
 
MODELS 2020 Tutorial on MPS - Supplementary Material 3 - Creating editors for...
MODELS 2020 Tutorial on MPS - Supplementary Material 3 - Creating editors for...MODELS 2020 Tutorial on MPS - Supplementary Material 3 - Creating editors for...
MODELS 2020 Tutorial on MPS - Supplementary Material 3 - Creating editors for...Mikhail Barash
 
MODELS 2020 Tutorial on MPS - Supplementary Material 1 - Creating concept Entity
MODELS 2020 Tutorial on MPS - Supplementary Material 1 - Creating concept EntityMODELS 2020 Tutorial on MPS - Supplementary Material 1 - Creating concept Entity
MODELS 2020 Tutorial on MPS - Supplementary Material 1 - Creating concept EntityMikhail Barash
 
Towards a mnemonic classification of software languages
Towards a mnemonic classification of software languagesTowards a mnemonic classification of software languages
Towards a mnemonic classification of software languagesMikhail Barash
 
Worst practices for domain-specific modelling
Worst practices for domain-specific modellingWorst practices for domain-specific modelling
Worst practices for domain-specific modellingMikhail Barash
 
An ABC of JetBrains MPS
An ABC of JetBrains MPSAn ABC of JetBrains MPS
An ABC of JetBrains MPSMikhail Barash
 
KernelF: a functional core for domain-specific languages in JetBrains MPS
KernelF: a functional core for domain-specific languages in JetBrains MPSKernelF: a functional core for domain-specific languages in JetBrains MPS
KernelF: a functional core for domain-specific languages in JetBrains MPSMikhail Barash
 
Language Workbench Language Wheel
Language Workbench Language WheelLanguage Workbench Language Wheel
Language Workbench Language WheelMikhail Barash
 
Design concerns for concrete syntax
Design concerns for concrete syntaxDesign concerns for concrete syntax
Design concerns for concrete syntaxMikhail Barash
 
Design dimensions of DSLs
Design dimensions of DSLsDesign dimensions of DSLs
Design dimensions of DSLsMikhail Barash
 
JetBrains MPS: Typesystem Aspect
JetBrains MPS: Typesystem AspectJetBrains MPS: Typesystem Aspect
JetBrains MPS: Typesystem AspectMikhail Barash
 
JetBrains MPS: Editor Aspect
JetBrains MPS: Editor AspectJetBrains MPS: Editor Aspect
JetBrains MPS: Editor AspectMikhail Barash
 
JetBrains MPS: Structure Aspect
JetBrains MPS: Structure AspectJetBrains MPS: Structure Aspect
JetBrains MPS: Structure AspectMikhail Barash
 
Xtext: type checking and scoping
Xtext: type checking and scopingXtext: type checking and scoping
Xtext: type checking and scopingMikhail Barash
 
Xtext: code generation
Xtext: code generationXtext: code generation
Xtext: code generationMikhail Barash
 
Xtext: validation, quickfixes, custom formatting
Xtext: validation, quickfixes, custom formattingXtext: validation, quickfixes, custom formatting
Xtext: validation, quickfixes, custom formattingMikhail Barash
 
Xtend Programming Language
Xtend Programming LanguageXtend Programming Language
Xtend Programming LanguageMikhail Barash
 
Xtext: Eclipse Modeling Framework
Xtext: Eclipse Modeling FrameworkXtext: Eclipse Modeling Framework
Xtext: Eclipse Modeling FrameworkMikhail Barash
 

Mehr von Mikhail Barash (20)

MODELS 2020 Tutorial on MPS - Supplementary Material 8 - TextGen
MODELS 2020 Tutorial on MPS - Supplementary Material 8 - TextGen MODELS 2020 Tutorial on MPS - Supplementary Material 8 - TextGen
MODELS 2020 Tutorial on MPS - Supplementary Material 8 - TextGen
 
MODELS 2020 Tutorial on MPS - Supplementary Material 5 - Creating concept Ent...
MODELS 2020 Tutorial on MPS - Supplementary Material 5 - Creating concept Ent...MODELS 2020 Tutorial on MPS - Supplementary Material 5 - Creating concept Ent...
MODELS 2020 Tutorial on MPS - Supplementary Material 5 - Creating concept Ent...
 
MODELS 2020 Tutorial on MPS - Supplementary Material 3 - Creating editors for...
MODELS 2020 Tutorial on MPS - Supplementary Material 3 - Creating editors for...MODELS 2020 Tutorial on MPS - Supplementary Material 3 - Creating editors for...
MODELS 2020 Tutorial on MPS - Supplementary Material 3 - Creating editors for...
 
MODELS 2020 Tutorial on MPS - Supplementary Material 1 - Creating concept Entity
MODELS 2020 Tutorial on MPS - Supplementary Material 1 - Creating concept EntityMODELS 2020 Tutorial on MPS - Supplementary Material 1 - Creating concept Entity
MODELS 2020 Tutorial on MPS - Supplementary Material 1 - Creating concept Entity
 
Towards a mnemonic classification of software languages
Towards a mnemonic classification of software languagesTowards a mnemonic classification of software languages
Towards a mnemonic classification of software languages
 
Worst practices for domain-specific modelling
Worst practices for domain-specific modellingWorst practices for domain-specific modelling
Worst practices for domain-specific modelling
 
An ABC of JetBrains MPS
An ABC of JetBrains MPSAn ABC of JetBrains MPS
An ABC of JetBrains MPS
 
KernelF: a functional core for domain-specific languages in JetBrains MPS
KernelF: a functional core for domain-specific languages in JetBrains MPSKernelF: a functional core for domain-specific languages in JetBrains MPS
KernelF: a functional core for domain-specific languages in JetBrains MPS
 
Language Workbench Language Wheel
Language Workbench Language WheelLanguage Workbench Language Wheel
Language Workbench Language Wheel
 
DSL development
DSL developmentDSL development
DSL development
 
Design concerns for concrete syntax
Design concerns for concrete syntaxDesign concerns for concrete syntax
Design concerns for concrete syntax
 
Design dimensions of DSLs
Design dimensions of DSLsDesign dimensions of DSLs
Design dimensions of DSLs
 
JetBrains MPS: Typesystem Aspect
JetBrains MPS: Typesystem AspectJetBrains MPS: Typesystem Aspect
JetBrains MPS: Typesystem Aspect
 
JetBrains MPS: Editor Aspect
JetBrains MPS: Editor AspectJetBrains MPS: Editor Aspect
JetBrains MPS: Editor Aspect
 
JetBrains MPS: Structure Aspect
JetBrains MPS: Structure AspectJetBrains MPS: Structure Aspect
JetBrains MPS: Structure Aspect
 
Xtext: type checking and scoping
Xtext: type checking and scopingXtext: type checking and scoping
Xtext: type checking and scoping
 
Xtext: code generation
Xtext: code generationXtext: code generation
Xtext: code generation
 
Xtext: validation, quickfixes, custom formatting
Xtext: validation, quickfixes, custom formattingXtext: validation, quickfixes, custom formatting
Xtext: validation, quickfixes, custom formatting
 
Xtend Programming Language
Xtend Programming LanguageXtend Programming Language
Xtend Programming Language
 
Xtext: Eclipse Modeling Framework
Xtext: Eclipse Modeling FrameworkXtext: Eclipse Modeling Framework
Xtext: Eclipse Modeling Framework
 

Kürzlich hochgeladen

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 

Kürzlich hochgeladen (20)

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 

Reflections on teaching JetBrains MPS within a university course

  • 1. Reflections on teaching MPS within a university course Turku Centre for Computer Science Mikhail Barash Åbo Akademi Finland MPS @mikhail_barash
  • 3. Course overview zoo of DSLs definition of a DSL semantic models examples advantages problems abstract syntax trees grammars parser generators Xtext Xtend writing a grammar model modification type checking code generationscoping projectional editing structureMPS editor typesystem textgen generator behavior DSL design concerns intentions language workbenches overview
  • 4. trainees considerable practical experience intensive tutorialtraining focused on MPS limited time allocate to trainings interactive
  • 5. attribute grammars parsing type checking semantics megamodeling rewriting code generation testing … “classical” course Rascal
  • 6. How to introduce projectional editing? form builders Scratch-like MS Access MS Access
  • 7. How to introduce projectional editing? Mathcad MS FrontPage
  • 8. Projectional editing & modeling semantic model syntactic projection placeholder “smooth” editing model projection edited projection projection model editor transforms text “sin” to projection of sine “^” is transformed to projection of exponentiation placeholder Equation Editor
  • 9. Microsoft Word vs. JetBrains MPS select a placeholder select desired concept from a menu type something that would identify some concept select something to augment it either by typing or by selecting from menu copy-paste copy entire subtrees trigger for concept alias
  • 10. Parsing vs. projectional editing int class = template + 5; template= + ;classint 5 <expression>= ;<name>int <variable declaration> = ;<name>int <variable declaration> <expression> <left> + <right> textual projectional concept trigger for concept trigger editor always has access to AST current concept containing concept <name>int name: string any string can be used here changes will be propagated throughout the source code concepts can also be chosen from a menu user’s intention
  • 11. Projectional editing textual form of code only meant for the programmer projectional editing allows languages to evolve but it is unambiguous languages can be combined with each other set of node types that can be added to ASTnew DSL nodes are selected explicitly no ambiguities in AST textual syntax can look ambiguous How to motivate it? no parsing needed non-textual notations
  • 12. Starting with Xtext grammar validator code generator type checking scoping quickfixes formatting
  • 13. Starting with Xtext grammar validator code generator type checking scoping quickfixes formatting concrete ∩ abstract syntax
  • 14. Starting with Xtext grammar validator code generator type checking scoping quickfixes formatting Java/Xtend concrete ∩ abstract syntax
  • 15. Starting with Xtext grammar validator code generator type checking scoping quickfixes formatting Java/Xtend Java/Xtend concrete ∩ abstract syntax
  • 16. Starting with Xtext grammar validator code generator type checking scoping quickfixes formatting Java/Xtend Java/Xtend Java/Xtend concrete ∩ abstract syntax
  • 17. Starting with Xtext grammar validator code generator type checking scoping quickfixes formatting Java/Xtend Java/Xtend Java/Xtend Java/Xtend concrete ∩ abstract syntax
  • 18. Starting with Xtext grammar validator code generator type checking scoping quickfixes formatting internal DSL Java/Xtend Java/Xtend Java/Xtend Java/Xtend concrete ∩ abstract syntax
  • 19. Starting with Xtext grammar validator code generator type checking scoping quickfixes formatting M→T internal DSL Java/Xtend Java/Xtend Java/Xtend Java/Xtend concrete ∩ abstract syntax
  • 20. Teaching MPS: topics covered structure editor code generator type system intentions formatting M→T abstract syntax … editor constraintsbehavior actions M→M concrete syntax development journey
  • 21. Teaching MPS: topics covered structure editor code generator type system intentions formatting M→T abstract syntax … editor constraintsbehavior actions M→M concrete syntax DSL DSL DSL DSL DSL DSL DSL DSL DSL DSL development journey
  • 22. MPS: Editor aspect button to negate the current value returns a JButton with event handler that negates value reading and writing data from an AST node requires to handle node access explicitly cells explained “on paper” first
  • 23. MPS: Structure aspect structure of language vs. structure of its implementation
  • 24. MPS: Structure aspect language concepts IfStatement abstract syntax of the language Entity structure of language vs. structure of its implementation
  • 25. MPS: Structure aspect language concepts technical concepts IfStatement NodeRendering abstract syntax of the language Entity VarReference used to define diagram editor for concept Node structure of language vs. structure of its implementation
  • 26. MPS: TypeSystem aspect checking rules are in TypeSystem check rules are still inference rules :==: is not an assignment
  • 27. Code generation easier to start with model-to-text transformations
  • 28. Learning objectives program model! = language its syntax! ≠ programming in MPS developing an API* ≈ abstract vs. concrete syntax MPS multiple concrete syntaxes can be defined language can evolve! a motivation for projectional editing source code text! ≠ textual graphicaltabular mathematicalnotations right level of abstractions clearly separated