Modeling and Programming isn‘t it all the same? Markus Voelter independent/itemis [email protected] www.voelter.de voelterblog.blogspot.de @markusvoelter +Markus Voelter
May 10, 2015
Modeling and Programmingisn‘t it all the same?
Markus Voelterindependent/itemis
www.voelter.devoelterblog.blogspot.de
@markusvoelter+Markus Voelter
We don‘t want to
we want tomodel,
program!
We don‘t want to
we want tomodel,
program!… at different levels of abstraction… from different viewpoints… integrated!
We don‘t want to
we want tomodel,
program!… with different degrees of
… with suitable notations… with suitable expressiveness
domain-specificity
We don‘t want to
we want tomodel,
program!precise and tool processable
And always:
beforeFlight
airborne
flying
landing landed
crashed
next [alt > 0]
reset
next [alt == 0 && speed == 0]
next [alt == 0 && speed > 0]
next [alt == 0 && speed == 0]
Modeling Tools Programming Tools
!=
Different Worlds
Modeling ToolModeling Tool
!=
Different Worlds
Different WorldsMix Models and Programs
Different WorldsAST Navigation & Query
Mix Models and Programs
Different WorldsAST Navigation & Query
Mix Models and Programs
Integration of 3GL code
Different WorldsAST Navigation & Query
Mix Models and Programs
Integration of 3GL codeCode Constraints
LanguageWorkbench
(Martin Fowler)
LanguageWorkbench
(Martin Fowler)
Freelydefine
integratethem
languages and
?
LanguageWorkbench
(Martin Fowler)
usepersistent
abstractrepresentation
LanguageWorkbench
(Martin Fowler)
language ::=schema
editorsgenerators
++
?
LanguageWorkbench
(Martin Fowler)
editingprojectional
LanguageWorkbench
(Martin Fowler)
persistincompletecontradictory
information
or
LanguageWorkbench
(Martin Fowler)
powerfulediting
testingrefactoring
debugging
language definitionIDE definition
implies
+groupware
LanguageWorkbench
(Martin Fowler)
support for„classical“
programming„classical“
modelingand+
L
ab
c
d
e
f
gh
i
j
k
m
n
o
with many first class concepts!
Big Language?
L
Small Language?
and poweful conceptswith a few, orthogonal
my L
a b c
d e f
g h i
j k l
Modular Language
composable conceptswith many optional,
Like frameworks and libraries,
Modular Language
Like frameworks and libraries,
but with syntaxand IDE support
Modular Language
Model
A schematic description of a system, theory, or phenomenon that accounts for its known or inferred properties and may be
used for further study of its characteristics
www.answers.com/topic/model
A representation of a set of components of a process, system,
or subject area, generally developed for understanding, analysis, improvement, and/or
replacement of the process
www.ichnet.org/glossary.htm
Model
an abstraction or simplification of reality
ecosurvey.gmu.edu/glossary.htm
Model
Model
a model is alwaysrelative to something
an abstraction or simplification of reality
Model
an abstraction or simplification of another model.
Model
an abstraction or simplification of another model.
“model” is a role.
Role?
CarPerson
DriverOwner
Role?
CarPersondriver
owner
Role?
CarPersondriver
owner
A role characterizes a relationship between two entities.
Role?
ProgramProgrammodel
A role characterizes a relationship between two entities.
Role?
ProgramProgrammodel
abstract detailed
Role?
ProgramProgrammodel
abstract detailed
Program
abstract
detailed
model
A Concrete Example System:mbeddr
An extensible C with support for
formal methods,requirements
and PLE.
IDE for Everything
A debuggerfor all of that
SDK for buildingyour ownLanguage
Extensions!
IDE for Everything
JetBrains
MPSOpen Source Language Workbench
Challengesin embedded software
development
Abstractionwithout
Runtime Cost
C consideredunsafe
ProgramAnnotations
Static Checksand
Verification
Product Linesand
Requirement Traces
Separate, hard to integrate
Tools
mbeddr CSolution
Philosophy
more specialized domainsmore specialized languages
ExtensionExtension
more specialized domainsmore specialized languages
ExtensionExtension
more specialized domainsmore specialized languages
ExtensionExtension
more specialized domainsmore specialized languages
ExtensionExtension
Incremental Trafo
Incremental Trafo
Incremental Trafo
Incremental Trafo
Language Extension
Language Extension
Language Extension
D E M O
Statusand
Availability
http://mbeddr.com
LWESLanguage Workbenches
for Embedded Systems
Developed within
gefördert durch das BMBFFörderkennzeichen 01|S11014
Open Source(EPL)
support for graphical 2013
integrationin 2013
FirstCommercial
Project
2 Developers, 4 months
existing source code30.000 – 50.000 LOC
Product LineCertification Required
SystematicStudy with
BMW
The “Pacemaker”
Challenge
An extensible version of the C programming languagefor Embedded Programming
C the Difference – C the Future
gefördert durch das BMBFFörderkennzeichen 01|S11014
http://mbeddr.com
Some of this material is based on this book:
http://dslbook.org
www.dslbook.org
available Feb 2013