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.5k
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
960
Android insights
coolya
0
130
IoT with extensible C - Democamp
coolya
0
120
Internet of thing with extensible C
coolya
0
130
mbeddr & MPS overview
coolya
0
140
mbeddr on aruino
coolya
0
280
Other Decks in Programming
See All in Programming
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
390
WindowInsetsだってテストしたい
ryunen344
1
190
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
340
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
240
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
550
Is Xcode slowly dying out in 2025?
uetyo
1
190
Benchmark
sysong
0
270
ReadMoreTextView
fornewid
1
480
ASP.NETアプリケーションのモダナイズ インフラ編
tomokusaba
1
410
GraphRAGの仕組みまるわかり
tosuri13
8
480
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
120
XP, Testing and ninja testing
m_seki
3
200
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Thoughts on Productivity
jonyablonski
69
4.7k
Balancing Empowerment & Direction
lara
1
370
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
BBQ
matthewcrist
89
9.7k
Docker and Python
trallard
44
3.4k
The Cost Of JavaScript in 2023
addyosmani
51
8.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.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?