Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington...

14
Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story

Transcript of Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington...

Page 1: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story

Dan GrossmanUniversity of Washington

Safely Supporting Probabilistic Data: PL Techniques as Part of the Story

Page 2: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story
Page 3: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story

Types for information flow

int<H> x;

int<L> y;

if(x)

y = 7;✗

Symbolic executionz:

z = x;

if(x!=0)

z = x*y;

Type inference

let f = y. y+7

let z = f 9

let q = z && true✗

Function inlining/specializationint f(int x, int y){

return x*y;

}

f(0,a) 0

f(3,b) f(3,b)

f(1,c) c

Page 4: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story
Page 5: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story

@approx int x = 12;

int y = 27;

y = x*2;

x = y*3;

@approx int z = f(x);

if(looks_okay(z))

int w = endorse(z);

Page 6: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story
Page 7: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story

<p>

at least probability p

Page 8: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story
Page 9: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story
Page 10: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story

@approx<p1> int x = …;

@approx<p2> int y = …;

x +<p3> y // @approx<p1*p2*p3>

Page 11: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story
Page 12: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story
Page 13: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story
Page 14: Safely Supporting Probabilistic Data: PL Techniques as ... · Dan Grossman University of Washington Safely Supporting Probabilistic Data: PL Techniques as Part of the Story