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

PPTX
Generic Tools - Specific Languages (PhD Defense Slides)
PPTX
Language-Oriented Business Applications
PPTX
Architecting Domain-Specific Languages
PDF
The Economics of OptimJ
PPTX
Software programming and development
PPTX
Cmp2412 programming principles
PPT
Aspect Oriented Programming
PDF
Coding principles
Generic Tools - Specific Languages (PhD Defense Slides)
Language-Oriented Business Applications
Architecting Domain-Specific Languages
The Economics of OptimJ
Software programming and development
Cmp2412 programming principles
Aspect Oriented Programming
Coding principles

What's hot (20)

PDF
The OptimJ Manual
PPTX
Principles of programming
PPT
The Programmer Life Cycle
PPTX
Succeeding with Functional-first Programming in Enterprise
PDF
What's Missing in Language Workbenches
PPTX
Language processor
PPT
Eclipse EDT - EGL Inner Workings - June 2011
PPT
Chap 1-dhamdhere system programming
PPTX
PDF
Rsqrd AI: ML Tooling at an AI-first Startup
PPSX
Ic lecture8
PPT
Coding
PPTX
Logical programming languages and functional programming languages
PDF
Qualidade de Software em zOS usando IBM Debug Tool e RDz
PPTX
Aspect Oriented Programing - Introduction
PPTX
Ch1 language design issue
PPT
Programming languages
PDF
The Programming Process
The OptimJ Manual
Principles of programming
The Programmer Life Cycle
Succeeding with Functional-first Programming in Enterprise
What's Missing in Language Workbenches
Language processor
Eclipse EDT - EGL Inner Workings - June 2011
Chap 1-dhamdhere system programming
Rsqrd AI: ML Tooling at an AI-first Startup
Ic lecture8
Coding
Logical programming languages and functional programming languages
Qualidade de Software em zOS usando IBM Debug Tool e RDz
Aspect Oriented Programing - Introduction
Ch1 language design issue
Programming languages
The Programming Process
Ad

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

PPTX
DSL Best Practices
PDF
Envisioning the Future of Language Workbenches
PDF
On Modeling and Testing When Unpredictability Becomes the Pattern (April 2nd,...
PDF
Modelling Systems Practical Tools and Techniques in Software Development 2nd ...
PDF
Model driven software engineering in practice book - chapter 7 - Developing y...
PDF
Build your own Language - Why and How?
PPT
Ui Modeling In Action With PMF, e4(XWT) And EGF
PDF
Programming Languages: some news for the last N years
PDF
Metamorphic Domain-Specific Languages
PDF
Oopsla 2008 Panel Ds Ls The Good The Bad And The Ugly
PDF
Fusing Modeling and Programming into Language-Oriented Programming
PPTX
Lecture 1 uml with java implementation
PPT
Software development... for all? (keynote at ICSOFT'2024)
DOCX
A Survey on Domain-Specific Languages for Machine.pdfA Sur.docx
PPTX
Introduction To MDD
PDF
Keynote at Code Generation 2014: The business cases of modeling and generators
PDF
A Journey Through MDE, DSL and SLE (July 2nd, 2015)
PPTX
Model-Driven Development in the context of Software Product Lines
PDF
Capone.pdf
PPT
CG2010 Tailored Code Generators
DSL Best Practices
Envisioning the Future of Language Workbenches
On Modeling and Testing When Unpredictability Becomes the Pattern (April 2nd,...
Modelling Systems Practical Tools and Techniques in Software Development 2nd ...
Model driven software engineering in practice book - chapter 7 - Developing y...
Build your own Language - Why and How?
Ui Modeling In Action With PMF, e4(XWT) And EGF
Programming Languages: some news for the last N years
Metamorphic Domain-Specific Languages
Oopsla 2008 Panel Ds Ls The Good The Bad And The Ugly
Fusing Modeling and Programming into Language-Oriented Programming
Lecture 1 uml with java implementation
Software development... for all? (keynote at ICSOFT'2024)
A Survey on Domain-Specific Languages for Machine.pdfA Sur.docx
Introduction To MDD
Keynote at Code Generation 2014: The business cases of modeling and generators
A Journey Through MDE, DSL and SLE (July 2nd, 2015)
Model-Driven Development in the context of Software Product Lines
Capone.pdf
CG2010 Tailored Code Generators
Ad

More from Markus Voelter (16)

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

Recently uploaded (20)

PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
System and Network Administraation Chapter 3
PDF
AI in Product Development-omnex systems
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Introduction to Artificial Intelligence
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Transform Your Business with a Software ERP System
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
System and Network Administration Chapter 2
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
L1 - Introduction to python Backend.pptx
How Creative Agencies Leverage Project Management Software.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Wondershare Filmora 15 Crack With Activation Key [2025
Design an Analysis of Algorithms II-SECS-1021-03
System and Network Administraation Chapter 3
AI in Product Development-omnex systems
Reimagine Home Health with the Power of Agentic AI​
Introduction to Artificial Intelligence
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Transform Your Business with a Software ERP System
Which alternative to Crystal Reports is best for small or large businesses.pdf
Digital Strategies for Manufacturing Companies
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Upgrade and Innovation Strategies for SAP ERP Customers
System and Network Administration Chapter 2
How to Choose the Right IT Partner for Your Business in Malaysia
2025 Textile ERP Trends: SAP, Odoo & Oracle
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
L1 - Introduction to python Backend.pptx

The Design, Evolution and Use of KernelF