Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
What if we could change programming languages?
Kolja Dummann
February 02, 2014
Programming
0
2.2k
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
610
Android insights
coolya
0
51
IoT with extensible C - Democamp
coolya
0
50
Internet of thing with extensible C
coolya
0
88
mbeddr & MPS overview
coolya
0
70
mbeddr on aruino
coolya
0
260
Other Decks in Programming
See All in Programming
Reactive Java Microservices on Kubernetes with Spring and JHipster
deepu105
1
170
JetPackComposeは宣言型プログラミングパラダイムって実はよくわかってないんですが、別に使ってもいいんですよね、
conigashima
0
180
Deep Dive Into Google Zanzibar and its Concepts for Authorization Scenarios
dschenkelman
1
120
UI Testing of Jetpack Compose Apps, AppDevCon
alexzhukovich
0
140
BASE BANKチームの技術選定と歴史 / how to decide technology selection for startup
budougumi0617
0
260
1時間半で克服するJavaScriptの非同期処理/async_javascript_kokufuku
marchin1989
2
610
マルチプロダクト×非構造化データ×機械学習を支えるデータ信頼性
akino
0
110
Running Laravel/PHP on AWS (AWS Builders Day Taiwan 2022)
dwchiang
0
140
[월간 데이터리안 세미나 6월] 스스로 성장하는 분석가 커리어 이야기
datarian
0
180
模組化的Swift架構(二) DDD速成
haifengkao
0
380
Java初心者が知っておくべきプログラミングのこと - JJUG CCC 2022 Spring
kishida
5
540
Swift Regex
usamik26
0
160
Featured
See All Featured
A better future with KSS
kneath
225
15k
Build The Right Thing And Hit Your Dates
maggiecrowley
19
1.2k
Three Pipe Problems
jasonvnalue
89
8.7k
The Power of CSS Pseudo Elements
geoffreycrofte
46
3.9k
How to name files
jennybc
40
61k
Rebuilding a faster, lazier Slack
samanthasiow
62
7.2k
Agile that works and the tools we love
rasmusluckow
319
19k
Making the Leap to Tech Lead
cromwellryan
113
7.4k
Pencils Down: Stop Designing & Start Developing
hursman
112
9.8k
Writing Fast Ruby
sferik
612
57k
Streamline your AJAX requests with AmplifyJS and jQuery
dougneiner
126
8.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
212
20k
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?