graphical dsls aka domain-specific modelling -...
TRANSCRIPT
![Page 1: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/1.jpg)
Graphical DSLs aka
Domain-Specific Modelling
![Page 2: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/2.jpg)
© 2014 2 © 2014 2
Domain-Specific Modelling: DSM
Productivity increase: 5-10x
500 %
1000 %
750 %
600 %
900 %
500 %
600 %
0 %
100 %
200 %
300 %
400 %
500 %
600 %
700 %
800 %
900 %
1000 %
Embedded UI
applications
Mobile phone
software
Phone switch
features
Call
processing
services
Heart rate
monitor
J2EE web
application
Home
automation
Domains
Percent Increase
Compared to earlier practice (typically hand-coding)
http://metacase.com/blogs/stevek/blogView?entry=3446309083
![Page 3: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/3.jpg)
Vision
Touch
Hearing
Smell
Taste
Bra
in P
ow
er
Sensory neurons
visual We have
brains
![Page 4: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/4.jpg)
Bra
in P
ow
er s
e r i a l
Text
parallel parallel parallel parallel parallel parallel
Visual
![Page 5: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/5.jpg)
Bra
in P
ow
er s
e r i a l
Text
parallel parallel parallel parallel parallel parallel
Visual
![Page 6: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/6.jpg)
Bra
in P
ow
er
Perceptual vs.
Cognitive
![Page 7: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/7.jpg)
Bra
in P
ow
er
Spot the odd one out!
Perceptual Popout M
oo
dy
TSE0
9
![Page 8: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/8.jpg)
Bra
in P
ow
er
Spot the odd one out!
Perceptual Popout M
oo
dy
TSE0
9
![Page 9: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/9.jpg)
Bra
in P
ow
er
Spot the odd one out!
Perceptual Popout M
oo
dy
TSE0
9
![Page 10: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/10.jpg)
Bra
in P
ow
er
Spot the odd one out!
Perceptual Popout M
oo
dy
TSE0
9
![Page 11: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/11.jpg)
![Page 12: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/12.jpg)
Graphical vs. Textual
![Page 13: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/13.jpg)
Gra
ph
ical
+ T
extu
al
Software flow diagram
1940s
LISP FORTRAN
ALGOL COBOL 1950s
![Page 16: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/16.jpg)
![Page 17: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/17.jpg)
Notation, Notation, Notation
![Page 18: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/18.jpg)
No
tati
on
, …
Domain Users
care deeply about notation!
“UI” for the language
![Page 19: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/19.jpg)
Wo
rst
pra
ctic
es
Daniel Moody The “Physics” of Notations:
Towards a Scientific Basis for Constructing Visual Notations in Software Engineering,
IEEE Transactions on Software Engineering, Vol. 35, No. 5, November-December 2009
No
tati
on
, …
[1] Alexander, C.W., Notes On The Synthesis Of Form. 1970, Boston, US: Harvard University Press. [2] Avison, D.E. and G. Fitzgerald, Information Systems Development: Methodologies, Techniques and Tools (3rd edition). 2003, Oxford, United Kingdom: Blackwell Scientific. ....... [150] Zhang, J., The Nature of External Representations in Problem Solving. Cognitive Science, 1997. 21(2): p. 179-217. [151] Zhang, J. and D.A. Norman, Representations in Distributed Cognitive Tasks. Cognitive Science, 1994.
![Page 20: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/20.jpg)
No
tati
on
, … ≥ Form Content
research in diagrammatic reasoning shows that the form of representations has an equal, if not greater, influence on cognitive effectiveness as their content [68, 122, 151].
“
”
Mo
od
y TS
E09
![Page 21: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/21.jpg)
No
tati
on
, … ≥ Concrete
syntax Abstract syntax
apparently minor changes in visual appearance can have dramatic impacts on understanding and problem solving performance [19, 68, 103, 122]... especially by novices [53, 56, 57, 79, 93, 106, 107].
“
”
Mo
od
y TS
E09
![Page 22: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/22.jpg)
No
tati
on
, …
«Person» «Laptop»
«Output» «Input»
pictogram > geometric > photo
![Page 23: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/23.jpg)
![Page 24: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/24.jpg)
Paradigm 1: String matching in files
• Strings are 1-dimensional character arrays
• Look for same sequence, “E”, “m”, “p” etc.
– Or UUID, unique identifier in XML
• Inefficient, hard to see, fragile
– but familiar!
c l a s s E m p l o y e e
. . . c l a s s M a
n a g e r e x t e n d s
E m p l o y e e . . .
D e v e l o p e r e x t e
n d s E m p l o y e e
c l a s s E m p l o y e e
. . . c l a s s M a
n a g e r e x t e n d s
E m p l o y e e . . .
D e v e l o p e r e x t e
n d s E m p l o y e e Mo
de
l In
tegr
atio
n
![Page 25: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/25.jpg)
Paradigm 2: Direct reference in repository • Works like objects in memory
• Efficient: Direct pointer
• Visible: See referrers
• Robust: Change once
– But less familiar!
Employee
Manager Developer
Mo
de
l In
tegr
atio
n
![Page 26: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/26.jpg)
Tool support for direct reference
• Concrete syntax: view
• UI: edit
• Cross-model references: link
• Disk representation: load
view edit link load
Xtext
Mo
de
l In
tegr
atio
n
view edit link load
Xtext
EMF/GMF
view edit link load
Xtext
EMF/GMF
MPS
view edit link load
Xtext
EMF/GMF
MPS
MetaEdit+
![Page 27: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/27.jpg)
Bu
ildin
g to
geth
er Text easy, graphs hard
Diff + merge:
Multi-user editing: Text hard, graphs easy
modeling != coding
Mature Model Management, #cg2011
![Page 28: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/28.jpg)
![Page 29: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/29.jpg)
Building Together
![Page 30: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/30.jpg)
© 2015 30
It’s easy to build a simple modeling tool
6 ways to get the tools we need for DSM 1. Write own modeling tool from scratch
2. Write own modeling tool based on frameworks
3. Metamodel, generate modeling tool skeleton, add code
4. Metamodel, generate full modeling tool over a framework
5. Metamodel, output configuration for generic modeling tool
6. Integrated modeling and metamodeling environment
1-3 = Coding – Language expressed throughout the code
4-6 = Language Workbench – Language expressed as data
4: Language data is transformed into code
5: Language data is copied
6: Language data is live
![Page 31: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/31.jpg)
© 2013 31 © 2015 31
Current Active Graphical LWBs
MetaEdit+
– average 100 commits/month over last year
Sirius (/Obeo)
– average 85 commits/month over last ½ year
GMF
– average 18 commits/month over last year
Graphiti - incubation
– average 8 commits/month over last year
Spray - labs
– no release since June ’13, last code change Nov ’13
– average 0.5 commits/month over last year
![Page 32: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/32.jpg)
© 2013 32 © 2015 32
LWB comparison: LWC 2013
Ensō Más SugarJ
Whole Platform
MPS Onion
MetaEdit+
Rascal
Xtext
Spoofax
0
500
1000
1500
2000
2500
3000
20 30 40 50 60 70 80 90 100
SLOC
% Feature Coverage
Total SLOC vs. Coverage Below/right of curve = better
http://erdweg.org/publications/language-workbench-state.pdf
![Page 33: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/33.jpg)
© 2013 33 © 2015 33
Graphical LWB comparison: El Kouhen et al. 2012
12
6
0,5
5
25
0
5
10
15
20
25
30
RSA GME MetaEdit+ Obeo GMF
Days to implement BPMN
tinyurl.com/gerard12
1000
EMF + GEF /Sirius
![Page 34: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/34.jpg)
© 2013 34 © 2015 34
DSM Solution Implementation Time
63 language concepts
XML generator
60 language concepts
C, HTML, script generators
36 language concepts
Assembler generator
77 language concepts
Python generator
Java generator for
simulation
143 language concepts
J2EE generator
Man days
http://metacase.com/blogs/stevek/blogView?entry=3446309083
![Page 35: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/35.jpg)
Bu
ildin
g to
geth
er
Graphical easier Language user:
Language developer: GMF/Obeo: graphical harder MetaEdit+: graphical easier
Text DSL != Graphical DSL
Language wb developer: Graphical harder
![Page 36: Graphical DSLs aka Domain-Specific Modelling - Dagstuhlmaterials.dagstuhl.de/files/15/15062/15062.StevenKelly.Slides.pdf · Graphical DSLs aka Domain-Specific Modelling © 2014 2](https://reader031.vdocuments.site/reader031/viewer/2022022500/5aa2144b7f8b9a84398c93b4/html5/thumbnails/36.jpg)
Bu
ildin
g to
geth
er
"The computer revolution Alan Kay:
The modeling revolution
Text DSL != Graphical DSL
hasn't happened yet"
hasn't happened yet
The text LWB revolution hasn't happened yet?