Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
What if we could change programming languages?
Search
Kolja Dummann
February 02, 2014
Programming
0
2.6k
What if we could change programming languages?
Slides form my talk about haw we used language extensions to build mbeddr at FOSDEM2014
Kolja Dummann
February 02, 2014
Tweet
Share
More Decks by Kolja Dummann
See All by Kolja Dummann
Fsharp
coolya
0
980
Android insights
coolya
0
130
IoT with extensible C - Democamp
coolya
0
120
Internet of thing with extensible C
coolya
0
140
mbeddr & MPS overview
coolya
0
150
mbeddr on aruino
coolya
0
280
Other Decks in Programming
See All in Programming
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
170
複雑なドメインに挑む.pdf
yukisakai1225
5
1.2k
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
240
Kiroで始めるAI-DLC
kaonash
2
590
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
490
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
270
Deep Dive into Kotlin Flow
jmatsu
1
340
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
300
AWS発のAIエディタKiroを使ってみた
iriikeita
1
190
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
print("Hello, World")
eddie
2
530
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
Documentation Writing (for coders)
carmenintech
74
5k
How to Ace a Technical Interview
jacobian
279
23k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Visualization
eitanlees
148
16k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
KATA
mclloyd
32
14k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Six Lessons from altMBA
skipperchong
28
4k
Transcript
What if we could change programming languages?
Kolja Dummann itemis AG ! @dumdidum http://logv.ws
Rocket Science? Image: mentalwanderings / CC-by-sa
Rocket Science! Image: mentalwanderings / CC-by-sa
Build your own rocket software Image: Wikipedia Commons
Image: Wikipedia Commons
Image: Wikipedia Commons sensor
Image: Wikipedia Commons sensor self destruction
Image: Wikipedia Commons sensor self destruction autopilot
Image: Wikipedia Commons sensor self destruction autopilot sensors
Image: Wikipedia Commons sensor self destruction autopilot pumps sensors
Image: Wikipedia Commons sensor self destruction vanes autopilot pumps sensors
Image: Wikipedia Commons Physical Units int16 distance = …; int16
time = …; int16 speed = time / distance; sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons Physical Units int16 distance = …; int16
time = …; int16 speed = time / distance; sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons Physical Units int16/m/ distance = …; int16/s/
time = …; int16/mps/ speed = distance / time; sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons sensor self destruction vanes autopilot pumps sensor
Statemachines statemachine selfdestruction initial = starting { in event update(int8 speed, int8 hight) <no binding> state starting { on update [speed > 10 && hight > 0] -> flying } state flying { do { record_flightdata(); } on update [speed > 100 && hight < 42] -> kill } state kill { entry { blow_rocket(); } } }
Image: Wikipedia Commons Components cs interface FlightRecorder { Trackpoint* process(Trackpoint*
p) pre(0) p != null pre(1) p->id != 0 pre(2) p->time != 0 s post(3) result->id != 0 } sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons Components II component AutoPilot extends nothing {
requires FlightRecorder flightRecorder provides CourseProvider cp int16 cp_getCourse() <= op cp.getCourse { return 0; } } sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons Undefined Behavior sensor self destruction vanes autopilot
pumps sensor
Image: Wikipedia Commons Undefined Behavior i *= 2 + 2
+ i--; sensor self destruction vanes autopilot pumps sensor You write:
Image: Wikipedia Commons Undefined Behavior i *= 2 + 2
+ i--; sensor self destruction vanes autopilot pumps sensor (i *= 2 + 2 + i)——; You write: GCC reads:
Image: Wikipedia Commons Testing testcase main { assert-equals(0) 10 ==
add(5, 5); assert-less(1) 20 < add(5, 10); assert(2) 30 == add(20, 10); } sensor self destruction vanes autopilot pumps sensor
Image: Wikipedia Commons Verification sensor self destruction vanes autopilot pumps
sensor
How?
Projectional Editor
int i = 42 + 23;
int i = 42 + 23;
LocalVarDecl Name = i int i = 42 + 23;
LocalVarDecl Name = i IntType Type int i = 42
+ 23;
LocalVarDecl Name = i IntType Type Plus Init int i
= 42 + 23;
LocalVarDecl Name = i IntType Type Plus Init NumberLiteral Name
= 42 Left int i = 42 + 23;
LocalVarDecl Name = i IntType Type Plus Init NumberLiteral Name
= 42 Left NumberLiteral Value = 23 Right int i = 42 + 23;
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
Abstract Syntax Tree Concrete Syntax
http://mbeddr.com
A Open Source Collection of integrated languages for embedded software
engineering
None
Core Plain C
Core Plain C Ext Components Statemachines Units
Core Plain C Ext Components Statemachines Units CC Requirements Documentation
Core Plain C Ext Components Statemachines Units CC Requirements Documentation
Debugger
Core Plain C Ext Components Statemachines Units CC Requirements Documentation
Analyses Debugger
Code Generator Text (C) Compiler
Build on JetBrains MPS Open Source Language Workbench Apache 2.0
http://jetbrains.com/mps
Questions?