SLIDE 1 Performance Evaluation for Gradual Typing
Asumu Takikawa *Ben Greenman Jan Vitek Daniel Feltey Max S. New Matthias Felleisen
SLIDE 2
9 years of sound gradual typing
Gradual Typing for Functional Languages, Jeremy Siek & Walid Taha. SFP '06 Interlanguage Migration: From Scripts to Programs, Sam Tobin-Hochstadt & Matthias Felleisen. OOPSLA '06
SLIDE 3
9 years of sound gradual typing
Micro Macro
SLIDE 4
- focus on single-module programs
- type system catches incompatibilities
- all values implicitly type DYN
Micro
SLIDE 5 Macro
- multi-module, untyped programs
- eliminate a class of errors
- each module fully typed/untyped
SLIDE 6 SFP'06
9 years of sound gradual typing
POPL'07 ECOOP'07 DLS'08 ESOP'09 SAC'09 POPL'08 OOPSLA'06 SFP'07 ICFP'09
Over 50 publications since 2006
http://github.com/samth/gradual-typing-bib
ML'07 ECOOP'08 OOPSLA'09 STOP'09 POPL'10 FOOL'10 ECOOP'10 POPL'10 PLDI'11 ECOOP'11 POPL'12 ESOP'12 SFP'12 OOPSLA'12 ECOOP'15 ICFP'14 DLS'13 POPL'15 OOPSLA'14 ECOOP'15 ESOP'13
SLIDE 7
Performance?
SLIDE 8
Performance?
10x 4x 22x 33x
SLIDE 9
9 years of publications and nobody publishes evaluations because performance sucks
SLIDE 10
Gradual Typing ... is practical?
SLIDE 11
Gradual Typing ... is practical?
SLIDE 12
Performance? Soundness?
SLIDE 13 Types without Soundness
- catch "obvious" logical errors
- serve as documentation
- may not be correct, or complete
SLIDE 14
eliminate a class of errors from typed code
!
Types + Soundness typed
SLIDE 15
Rests on an untyped runtime Every typed language...
SLIDE 16
Option 1: Trusted Computing Base
(Bogus)
SLIDE 17
Option 2: Check Everything
(Safe & very slow)
SLIDE 18
Types + Soundness (revised) eliminate a class of errors from typed code identify errors at typed-untyped boundaries
SLIDE 19
Option 1: Trusted Computing Base Option 2: Check Everything
SLIDE 20
The Reality of (Macro) Gradual Typing
SLIDE 21
The Reality of (Macro) Gradual Typing
SLIDE 22
The Reality of (Macro) Gradual Typing
SLIDE 23
The Reality of (Macro) Gradual Typing
SLIDE 24
The Reality of (Macro) Gradual Typing
SLIDE 25
The Reality of (Macro) Gradual Typing
SLIDE 26
The Reality of (Macro) Gradual Typing
SLIDE 27 Recap
- Gradual type systems have "bad" performance
- Type soundness is imperative
- Issue: typed-untyped boundaries
SLIDE 28
The Reality of (Macro) Gradual Typing
SLIDE 29
The Reality of (Macro) Gradual Typing
SLIDE 30
The Reality of (Macro) Gradual Typing
?
SLIDE 31 Proposal
- I. Define "boundary"
- II. Run the entire lattice
- III. Define "performant"
- IV. Report the % of performant variations
SLIDE 32
To be continued...
If you disagree, then propose an alternative Bottom line: no more "footnotes" on performance! If you agree, then use our framework
SLIDE 33
SLIDE 34 How to Scale?
- Hire a cluster
- Random sampling
- Offer fewer configurations
- Tools to identify / exclude configs.
SLIDE 35
Gradual Typing: Promise Expressive Performant Sound
SLIDE 36
Boundaries
Integer, please 2 Here! Thanks!
SLIDE 37
Boundaries
Integer, please lol Here! TYPE ERROR
SLIDE 38
Boundaries
List of Integer, please [ 2 , 2 , 2 ] Here! Thanks!
SLIDE 39
Boundaries
Use it well ... + Function, please
SLIDE 40
SLIDE 41
Reinheitsgebot
1 barrel of wine + 1 teaspoon of sewage = 1 barrel of sewage