SlideShare a Scribd company logo
DESIGN, EVOLUTION AND USE
Markus Völter
voelter@acm.org
www.voelter.de
@markusvoelter
of
KernelF
http://voelter.de/data
/pub/kernelf-icmt.pdf
Check out the paper!
1
Healthcare
EXAMPLE 1
Context
Mobile Apps that help patients w/ treatments
Monitor side-effects and recommend actions
Manage dosage of medications
Context
Mobile Apps that help patients w/ treatments
Monitor side-effects and recommend actions
Manage dosage of medications
“Algorithms“ for recommendations and dosage at
the core of these apps.
Safety-critical, since they could hurt patients.
Customer develops many different
apps/algos like this, efficiency of
algo development is key.
Some Language Impressions I
Some Language Impressions II
Some Language Impressions III
What good is all the abstraction if we cannot
trust the translation to the implementation?
Execution Architecture
DESIGN, EVOLUITION AND USE
2
Salary + Tax
EXAMPLE 2
Company Context
Largest German provider for payroll services.
Avoid re-engineering Fachlichkeit whenever technology changes.
A DSL to capture and test Fachlichkeit.
Execution: Interpreter in the IDE + Code Generator to Java
DSL Features – Dates and Currencies
DSL Features – Temporal Data
DSL Features – Data & Calculations
DSL Features – Polymorphic Overriding
DESIGN, EVOLUITION AND USE
3
Smart Contracts
EXAMPLE 3
Context
For smart contracts to be useful, the people who understand the
„contract logic“ have to be able to verify its correctness.
High-Level Description
Simulation / Testing
Verification
Core patterns at the core of many SCs:
Decisions, Agreements, Auctions.
Declarative Description
Execution and Test
Combination with State Machines
Combintation with State Machines II
Preventing Game Theoretical Attacks
DESIGN, EVOLUITION AND USE
So, what do all of
these languages
have in common?
4
KernelF, the Language
DSL Development
New Language
GPL Extension
Existing
Domain Notation
(Informal)
Formalization
Formalized
Language
Reuse GPL incl. Expressions and TS
Add/Embed DS-extensions
Compatible notational style
Reduce to GPL
Analyze Domain to find Abstractions
Define suitable, new notations
Rely on existing behavioral paradigm
Reuse standard expression language
Interpret/Generate to one or more GPLs
Use existing notation from domain
Clean up and formalize
Generate/Interpret
Often import existing „models“
DSL Development
New Language
Analyze Domain to find Abstractions
Define suitable, new notations
Rely on existing behavioral paradigm
Reuse standard expression language
Interpret/Generate to one or more GPLs
KernelF
DESIGN, EVOLUITION AND USE
Functional Features
Functional, no state at its core.
Purity + Effect Tracking
The usual types, literals and op‘s
Various Conditionals
Functions and Blocks
Error Handling
Immutable Collections and higher-order functions
Enums, tuples, records, all immutable
Constraints on types and functions
Functional Stuff only: is this useful?
A purely functional language only
heats up the processor. -- Anonymous
Functional Features
Functional, no state at its core.
Purity + Effect Tracking
The usual types, literals and op‘s
Various Conditionals
Functions and Blocks
Error Handling
Immutable Collections and higher-order functions
Enums, tuples, records, all immutable
Constraints on types and functions
Boxes (like Clojure‘s ref)
Transactional Memory
State Machines
Interactors
Stateful Features
DESIGN, EVOLUITION AND USE
Tooling: Live Execution
Tooling: Coverage
Tooling: Debugging
Tooling: REPL
Tooling: Test Case Generation
Tooling: Mutation Testing I
Tooling: Mutation Testing II
DESIGN, EVOLUITION AND USE
All languages shown in this talk
are built with the open source
JetBrains MPS language workbench.
+ Refactorings, Find Usages, Syntax Coloring, Debugging, ...
DESIGN, EVOLUITION AND USE
5
Design Decisions
and Evolution
Design Drivers
Simplicity & Readability
Extensibility
Embeddability
Robustness
IDE Support
Accessible to Non-Programmers
Add new domain-specific language concepts if needed
Refer to domain-specific context, remove/replace stuff that is not needed
Make writing correct code as simple as possible
A language without an IDE is irrelevant; Exploit MPS
DESIGN, EVOLUITION AND USE
What we have.
Keyword-Rich
Many first-class abstractions
instead of the functional
minimalism; better tool support.
Static Types
Essential for good error
messages and code completion
for end users.
Type Inference
Only the really necessary
types have to be written down
explicitly.
Numeric Types
Few domains actually want
int and real
Option Types
... to explicitly deal with
null values
DESIGN, EVOLUITION AND USE
What we have not.
No Generics
... for user-defined types,
only built-in for collections.
No Algebraic Types
Construction of sophisticated
abstractions not necessary in
DSLs; developed as langusage
extensions.
No Exceptions
Hard to implement efficiently
on some platforms; but attempt
types are an ok replacement.
No Function Comp & Monads
Definition of sophisticated
reusable functional abstractions
not needed for DSL users.
No Reflection or Meta-Prog.
All the „magic“ happens outside
programs using the LWB.
DESIGN, EVOLUITION AND USE
Enabling Extension
and Embedding.
Modular Implementation
Abstract Concepts
Expression
Type
IToplevelContent
IDotTarget
Concept Removals
MPS Constraints can be used
to effectively reduce the language.
Exchangeable Primitives
PTF.create<Type>()
Plus an extension infrastructure
to contribute types.
Structure vs. Types
Types, such as ListType or
IRecordType can be used for
custom language concepts.
Syntax Overriding
New syntax can be defined
for existing language concepts.
DESIGN, EVOLUITION AND USE
Evolution.
number type
We started with int and real,
and quickly noticed that domain
experts don‘t want this.
Transparent Options?
val v : opt<T> = some(t)
val v : opt<T> = t
convenience Java generator
enums with Data
Records
Didn‘t we say that structures are
domain specific?
Yes, but useful for prototyping.
ADTs + Patterns
I did build an ADT language,
but it‘s an extension.
Problem with option and attempt.
State
Isn‘t KernelF functional?
Yes, but foundations for stateful
extensions are very helpful.
DESIGN, EVOLUITION AND USE
DESIGN, EVOLUITION AND USE
So, is this modeling
or programming?
ICMT
6
Modeling &
Programming
Programming vs. MD: What it can be
DESIGN, EVOLUITION AND USE
It becomes hard to
separate (modern)
model-driven from
programming.
DESIGN, EVOLUITION AND USE
Wait, so you‘re at ICMT, you
should at least talk a little
bit about Transformation!
ICMT
7
Execution and Safety
What good is all the abstraction if we cannot
trust the translation to the implementation?
System Architecture
What good is all the abstraction if we cannot
trust the translation to the implementation?
What good is all the abstraction if we cannot
trust the translation to the implementation?
System Architecture & Safety Standards
Tools may introduce additional systematic errors if faulty.
Safety standards require reliable mitigation of such errors.
DO-178C EN50129 IEC62304 ISO26262
+ Risk Analysis + Mitigations
Modeling Architecture
Model the Algo/System with the DSL and also
model the tests/verification. Then translate both
and execute on the level of the implementation.
Risk Analysis
Mitigations – Safe Modeling Architecture
Mitigations – Safe Modeling Architecture
use redundant execution on two execution engines
use different developers for the two trafos
review a subset of the generated code
clearly define and QA the DSL
to use fuzzing on the tests
ensure high coverage for the tests
run the tests on the final device
perform static analysis on the generated code
perform penetration testing on the final system
and use architectural safety mechanisms.
only these specific to DSL use
http://voelter.de/data/pub/MPS-in-Safety-1.0.pdf
Successfully
passed FDA
Pre-Submission
XXXXXXX
Toulouse
Incremental Graph Transformation
Model
Derived
Model
Incremental
Analyser
Interpreter
Generator
Incremental, Fast
Acceptable Memory Overhead
In MPS (client) and on the server (future)
Convenient DSL for specifying the transformations
TAKEAWAYS
Modular Languages are useful and
feasible based on modern LWB.
Modeling == Programming
Model Trafo == Compiler Construction
The PL and MD communities
should align more closely!
DSLs & Model Trafo is not at odds
with safety-critical systems.
1
2
3
4

More Related Content

What's hot (20)

PDF
The OptimJ Manual
Patrick Viry
 
PPTX
Principles of programming
Rob Paok
 
PPT
The Programmer Life Cycle
Russell Ovans
 
PPTX
Succeeding with Functional-first Programming in Enterprise
dsyme
 
PDF
What's Missing in Language Workbenches
Markus Voelter
 
PPTX
Language processor
Muhammad Mudarrak
 
PPT
Eclipse EDT - EGL Inner Workings - June 2011
Will Smythe
 
PPT
Chap 1-dhamdhere system programming
TanzoGamerz
 
PPTX
Computer
Newreborn Incarnation
 
PDF
Rsqrd AI: ML Tooling at an AI-first Startup
Sanjana Chowdhury
 
PPSX
Ic lecture8
AttaullahRahimoon
 
PPT
Coding
Vishal Singh
 
PPTX
Logical programming languages and functional programming languages
nahianzarif
 
PDF
Qualidade de Software em zOS usando IBM Debug Tool e RDz
Paulo Batuta
 
PPTX
Aspect Oriented Programing - Introduction
Venkaiah Chowdary Koneru
 
PPTX
Ch1 language design issue
Jigisha Pandya
 
PPT
Programming languages
Archana Maharjan
 
PDF
The Programming Process
Casey Robertson
 
The OptimJ Manual
Patrick Viry
 
Principles of programming
Rob Paok
 
The Programmer Life Cycle
Russell Ovans
 
Succeeding with Functional-first Programming in Enterprise
dsyme
 
What's Missing in Language Workbenches
Markus Voelter
 
Language processor
Muhammad Mudarrak
 
Eclipse EDT - EGL Inner Workings - June 2011
Will Smythe
 
Chap 1-dhamdhere system programming
TanzoGamerz
 
Rsqrd AI: ML Tooling at an AI-first Startup
Sanjana Chowdhury
 
Ic lecture8
AttaullahRahimoon
 
Coding
Vishal Singh
 
Logical programming languages and functional programming languages
nahianzarif
 
Qualidade de Software em zOS usando IBM Debug Tool e RDz
Paulo Batuta
 
Aspect Oriented Programing - Introduction
Venkaiah Chowdary Koneru
 
Ch1 language design issue
Jigisha Pandya
 
Programming languages
Archana Maharjan
 
The Programming Process
Casey Robertson
 

Similar to The Design, Evolution and Use of KernelF (20)

PPTX
DSL Best Practices
Markus Voelter
 
PDF
Envisioning the Future of Language Workbenches
Markus Voelter
 
PDF
On Modeling and Testing When Unpredictability Becomes the Pattern (April 2nd,...
Benoit Combemale
 
PDF
Model driven software engineering in practice book - chapter 7 - Developing y...
Marco Brambilla
 
PDF
Build your own Language - Why and How?
Markus Voelter
 
PPT
Ui Modeling In Action With PMF, e4(XWT) And EGF
BENOIT_LANGLOIS
 
PDF
Programming Languages: some news for the last N years
Ruslan Shevchenko
 
PDF
Metamorphic Domain-Specific Languages
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
PDF
Oopsla 2008 Panel Ds Ls The Good The Bad And The Ugly
OOPSLA2008
 
PDF
Fusing Modeling and Programming into Language-Oriented Programming
Markus Voelter
 
PPTX
Lecture 1 uml with java implementation
the_wumberlog
 
PPT
Software development... for all? (keynote at ICSOFT'2024)
miso_uam
 
DOCX
A Survey on Domain-Specific Languages for Machine.pdfA Sur.docx
bartholomeocoombs
 
PPTX
Introduction To MDD
Markus Voelter
 
PDF
Keynote at Code Generation 2014: The business cases of modeling and generators
Juha-Pekka Tolvanen
 
PDF
A Journey Through MDE, DSL and SLE (July 2nd, 2015)
Benoit Combemale
 
PPTX
Model-Driven Development in the context of Software Product Lines
Markus Voelter
 
PDF
Capone.pdf
miso_uam
 
PPT
CG2010 Tailored Code Generators
Pedro J. Molina
 
PPTX
Type-safe DSLs
Werner Keil
 
DSL Best Practices
Markus Voelter
 
Envisioning the Future of Language Workbenches
Markus Voelter
 
On Modeling and Testing When Unpredictability Becomes the Pattern (April 2nd,...
Benoit Combemale
 
Model driven software engineering in practice book - chapter 7 - Developing y...
Marco Brambilla
 
Build your own Language - Why and How?
Markus Voelter
 
Ui Modeling In Action With PMF, e4(XWT) And EGF
BENOIT_LANGLOIS
 
Programming Languages: some news for the last N years
Ruslan Shevchenko
 
Metamorphic Domain-Specific Languages
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
Oopsla 2008 Panel Ds Ls The Good The Bad And The Ugly
OOPSLA2008
 
Fusing Modeling and Programming into Language-Oriented Programming
Markus Voelter
 
Lecture 1 uml with java implementation
the_wumberlog
 
Software development... for all? (keynote at ICSOFT'2024)
miso_uam
 
A Survey on Domain-Specific Languages for Machine.pdfA Sur.docx
bartholomeocoombs
 
Introduction To MDD
Markus Voelter
 
Keynote at Code Generation 2014: The business cases of modeling and generators
Juha-Pekka Tolvanen
 
A Journey Through MDE, DSL and SLE (July 2nd, 2015)
Benoit Combemale
 
Model-Driven Development in the context of Software Product Lines
Markus Voelter
 
Capone.pdf
miso_uam
 
CG2010 Tailored Code Generators
Pedro J. Molina
 
Type-safe DSLs
Werner Keil
 
Ad

More from Markus Voelter (16)

PPTX
Consulting
Markus Voelter
 
PDF
Deklarative Smart Contracts
Markus Voelter
 
PDF
Using language workbenches and domain-specific languages for safety-critical ...
Markus Voelter
 
PDF
How Domains Shape Languages
Markus Voelter
 
PDF
Why Modeling Suck Sucks
Markus Voelter
 
PDF
The future of DSLs - functions and formal methods
Markus Voelter
 
PDF
Lessons Learned from building mbeddr
Markus Voelter
 
PPTX
Generic Tools, Specific Laguages
Markus Voelter
 
PPTX
Domain Specific Language Design
Markus Voelter
 
PPTX
From Programming to Modeling And Back Again
Markus Voelter
 
PPTX
Faszination Segelfliegen
Markus Voelter
 
PPTX
Professional Podcasting Guide
Markus Voelter
 
PPTX
Fundamentals Of Software Architecture
Markus Voelter
 
PPTX
Architecture As Language
Markus Voelter
 
PPTX
Trends In Languages 2010
Markus Voelter
 
PPT
Visual Profile - Markus Voelter, Jan 1, 2009
Markus Voelter
 
Consulting
Markus Voelter
 
Deklarative Smart Contracts
Markus Voelter
 
Using language workbenches and domain-specific languages for safety-critical ...
Markus Voelter
 
How Domains Shape Languages
Markus Voelter
 
Why Modeling Suck Sucks
Markus Voelter
 
The future of DSLs - functions and formal methods
Markus Voelter
 
Lessons Learned from building mbeddr
Markus Voelter
 
Generic Tools, Specific Laguages
Markus Voelter
 
Domain Specific Language Design
Markus Voelter
 
From Programming to Modeling And Back Again
Markus Voelter
 
Faszination Segelfliegen
Markus Voelter
 
Professional Podcasting Guide
Markus Voelter
 
Fundamentals Of Software Architecture
Markus Voelter
 
Architecture As Language
Markus Voelter
 
Trends In Languages 2010
Markus Voelter
 
Visual Profile - Markus Voelter, Jan 1, 2009
Markus Voelter
 
Ad

Recently uploaded (20)

PDF
AI Image Enhancer: Revolutionizing Visual Quality”
docmasoom
 
PPTX
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
PDF
custom development enhancement | Togglenow.pdf
aswinisuhu
 
PDF
Top 10 AI Use Cases Every Business Should Know.pdf
nicogonzalez1075
 
PPT
Brief History of Python by Learning Python in three hours
adanechb21
 
PPTX
Odoo Migration Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
 
PPTX
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
 
PDF
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 
PDF
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
PDF
ESUG 2025: Pharo 13 and Beyond (Stephane Ducasse)
ESUG
 
PDF
Meet in the Middle: Solving the Low-Latency Challenge for Agentic AI
Alluxio, Inc.
 
PDF
How AI in Healthcare Apps Can Help You Enhance Patient Care?
Lilly Gracia
 
PDF
Introduction to Apache Iceberg™ & Tableflow
Alluxio, Inc.
 
PPTX
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
PDF
Virtual Threads in Java: A New Dimension of Scalability and Performance
Tier1 app
 
PPTX
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
PPTX
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
 
PPTX
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
 
PDF
Australian Enterprises Need Project Service Automation
Navision India
 
PPTX
SAP Public Cloud PPT , SAP PPT, Public Cloud PPT
sonawanekundan2024
 
AI Image Enhancer: Revolutionizing Visual Quality”
docmasoom
 
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
custom development enhancement | Togglenow.pdf
aswinisuhu
 
Top 10 AI Use Cases Every Business Should Know.pdf
nicogonzalez1075
 
Brief History of Python by Learning Python in three hours
adanechb21
 
Odoo Migration Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
 
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
 
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
ESUG 2025: Pharo 13 and Beyond (Stephane Ducasse)
ESUG
 
Meet in the Middle: Solving the Low-Latency Challenge for Agentic AI
Alluxio, Inc.
 
How AI in Healthcare Apps Can Help You Enhance Patient Care?
Lilly Gracia
 
Introduction to Apache Iceberg™ & Tableflow
Alluxio, Inc.
 
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
Virtual Threads in Java: A New Dimension of Scalability and Performance
Tier1 app
 
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
 
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
 
Australian Enterprises Need Project Service Automation
Navision India
 
SAP Public Cloud PPT , SAP PPT, Public Cloud PPT
sonawanekundan2024
 

The Design, Evolution and Use of KernelF