Running Probabilistic Running Probabilistic Running Probabilistic Programs Backwards Programs Backwards Programs Backwards
Neil Toronto * Jay McCarthy † David Van Horn * * University of Maryland † Vassar College ESOP 2015 2015/04/14
Running Probabilistic Running Probabilistic Running Probabilistic - - PowerPoint PPT Presentation
Running Probabilistic Running Probabilistic Running Probabilistic Programs Backwards Programs Backwards Programs Backwards Neil Toronto * Jay McCarthy David Van Horn * * University of Maryland Vassar College ESOP 2015 2015/04/14
Running Probabilistic Running Probabilistic Running Probabilistic Programs Backwards Programs Backwards Programs Backwards
Neil Toronto * Jay McCarthy † David Van Horn * * University of Maryland † Vassar College ESOP 2015 2015/04/14
Roadmap Roadmap Roadmap
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Roadmap Roadmap Roadmap
(PPLs)
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Roadmap Roadmap Roadmap
(PPLs)
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Roadmap Roadmap Roadmap
(PPLs)
Uncomputable, compositional ways to not limit language
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Roadmap Roadmap Roadmap
(PPLs)
Uncomputable, compositional ways to not limit language Computable, compositional ways to not limit language
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Programming Coin Flips Programming Coin Flips Programming Coin Flips
(let ([x (flip 0.5)]) x)
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Coin Flips Programming Coin Flips Programming Coin Flips
(let ([x (flip 0.5)]) x) 0.5
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Coin Flips Programming Coin Flips Programming Coin Flips
(let ([x (flip 0.5)]) x) 0.5 0.5
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Coin Flips Programming Coin Flips Programming Coin Flips
(let ([x (flip 0.5)] [y (flip 0.5)]) (cons x y)) 0.5 0.5 ⟨
0.5 ⟨
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Coin Flips Programming Coin Flips Programming Coin Flips
(let ([x (flip 0.5)] [y (flip 0.5)]) (cons x y)) 0.5 0.5 0.5 ⟨
0.5 ⟨
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Coin Flips Programming Coin Flips Programming Coin Flips
(let ([x (flip 0.5)] [y (flip 0.5)]) (cons x y)) 0.5 0.5 0.5 ⟨
0.5 ⟨
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Coin Flips Programming Coin Flips Programming Coin Flips
(let* ([x (flip 0.5)] [y (flip (if (equal? x heads) 0.5 0.3))]) (cons x y)) 0.5 0.5 0.5 ⟨
0.5 ⟨
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Coin Flips Programming Coin Flips Programming Coin Flips
(let* ([x (flip 0.5)] [y (flip (if (equal? x heads) 0.5 0.3))]) (cons x y)) 0.5 0.5 0.5 ⟨
0.5 ⟨
0.3 0.7
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Coin Flips Programming Coin Flips Programming Coin Flips
0.5 0.5 0.5 ⟨
0.5 ⟨
0.3 0.7
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Coin Flips Programming Coin Flips Programming Coin Flips
0.5 0.5 0.5 ⟨
0.5 ⟨
0.3 0.7
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Coin Flips Programming Coin Flips Programming Coin Flips
0.5 0.5 ⟨
0.5 ⟨
0.3
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing
sto·cha·stic /stō-ˈkas-tik/ adj. fancy word for "randomized"
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing
sto·cha·stic /stō-ˈkas-tik/ adj. fancy word for "randomized"
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing
ap·er·ture /ˈap-ə(r)-chər/ n. fancy word for "opening"
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing
ap·er·ture /ˈap-ə(r)-chər/ n. fancy word for "opening"
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing
Simulate projecting rays onto a sensor...
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing
... and collect them to form an image
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing
(define/drbayes (ray-plane-intersect p0 v n d) (let ([denom (- (dot v n))]) (if (> denom 0) (let ([t (/ (+ d (dot p0 n)) denom)]) (if (> t 0) (collision t (vec+ p0 (vec* v t)) n) #f)) #f)))
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing
(define/drbayes (ray-plane-intersect p0 v n d) (let ([denom (- (dot v n))]) (if (> denom 0) (let ([t (/ (+ d (dot p0 n)) denom)]) (if (> t 0) (collision t (vec+ p0 (vec* v t)) n) #f)) #f)))
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing
(define/drbayes (ray-plane-intersect p0 v n d) (let ([denom (- (dot v n))]) (if (> denom 0) (let ([t (/ (+ d (dot p0 n)) denom)]) (if (> t 0) (collision t (vec+ p0 (vec* v t)) n) #f)) #f)))
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Simpler Example Simpler Example Simpler Example
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
Simpler Example Simpler Example Simpler Example
Density function for value of (random):
x x x x x x x x x p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
Simpler Example Simpler Example Simpler Example
Density function for value of (random):
x x x x x x x x x p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
Simpler Example Simpler Example Simpler Example
Density function for value of (random):
x x x x x x x x x p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
Simpler Example Simpler Example Simpler Example
Density function for value of (max 0.5 (random)):
x x x x x x x x x pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ???
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
Simpler Example Simpler Example Simpler Example
Density function for value of (max 0.5 (random)):
x x x x x x x x x pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ???
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
Simpler Example Simpler Example Simpler Example
Density function for value of (max 0.5 (random)):
x x x x x x x x x pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ???
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
Simpler Example Simpler Example Simpler Example
Density function for value of (max 0.5 (random)):
x x x x x x x x x pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
What Can’t Densities Model? What Can’t Densities Model? What Can’t Densities Model?
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
What Can’t Densities Model? What Can’t Densities Model? What Can’t Densities Model?
(let ([temperature (normal 99 1)]) (min 100 temperature))
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
What Can’t Densities Model? What Can’t Densities Model? What Can’t Densities Model?
(let ([temperature (normal 99 1)]) (min 100 temperature))
(if test? none (just x))
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
What Can’t Densities Model? What Can’t Densities Model? What Can’t Densities Model?
(let ([temperature (normal 99 1)]) (min 100 temperature))
(if test? none (just x))
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
What Can’t Densities Model? What Can’t Densities Model? What Can’t Densities Model?
(let ([temperature (normal 99 1)]) (min 100 temperature))
(if test? none (just x))
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
Probability Measures Probability Measures Probability Measures
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
Probability Measures Probability Measures Probability Measures
, defined by
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
Probability Measures Probability Measures Probability Measures
, defined by
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
Probability Measures Probability Measures Probability Measures
, defined by
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
Probability Measures Probability Measures Probability Measures
, defined by
This term assigns probability
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
Probability Measures Probability Measures Probability Measures
, defined by
This term assigns probability
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
Probability Measures Via Preimages Probability Measures Via Preimages Probability Measures Via Preimages
, defined
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
Probability Measures Via Preimages Probability Measures Via Preimages Probability Measures Via Preimages
, defined
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
Probability Measures Via Preimages Probability Measures Via Preimages Probability Measures Via Preimages
, defined
where
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
Probability Measures Via Preimages Probability Measures Via Preimages Probability Measures Via Preimages
, defined
where
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
Probability Measures Via Preimages Probability Measures Via Preimages Probability Measures Via Preimages
, defined
where
them backwards
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...
Standard interpretation of programs as pure functions from a random source
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...
Standard interpretation of programs as pure functions from a random source Efficient way to compute preimage sets
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...
Standard interpretation of programs as pure functions from a random source Efficient way to compute preimage sets Efficient representation of arbitrary sets
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...
Standard interpretation of programs as pure functions from a random source Efficient way to compute preimage sets Efficient representation of arbitrary sets Efficient way to compute areas of preimage sets
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...
Standard interpretation of programs as pure functions from a random source Efficient way to compute preimage sets Efficient representation of arbitrary sets Efficient way to compute areas of preimage sets Proof of correctness w.r.t. standard interpretation
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...
Standard interpretation of programs as pure functions from a random source Efficient way to compute preimage sets Efficient representation of arbitrary sets Efficient way to compute areas of preimage sets Proof of correctness w.r.t. standard interpretation
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
What About Approximating? What About Approximating? What About Approximating?
Conservative approximation with rectangles:
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
What About Approximating? What About Approximating? What About Approximating?
Conservative approximation with rectangles:
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Restricting preimages to rectangular subdomains:
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
What About Approximating? What About Approximating? What About Approximating?
Sampling: exponential to quadratic (e.g. days to minutes)
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
What About Approximating? What About Approximating? What About Approximating?
Sampling: exponential to quadratic (e.g. days to minutes)
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible
random source
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible
random source
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible
random source
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible
random source
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible
random source
Efficient domain partition sampling
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible
random source
Efficient domain partition sampling Efficient way to determine whether a domain sample is actually in the preimage (just use standard interpretation)
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
How Many Meanings? How Many Meanings? How Many Meanings?
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
How Many Meanings? How Many Meanings? How Many Meanings?
, ,
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
How Many Meanings? How Many Meanings? How Many Meanings?
, ,
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
How Many Meanings? How Many Meanings? How Many Meanings?
, ,
measure theory...
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
How Many Meanings? How Many Meanings? How Many Meanings?
, ,
measure theory...
integration
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
How Many Meanings? How Many Meanings? How Many Meanings?
, ,
measure theory...
integration Tally: 3+3+2+1 = 9 semantic functions, 11 or 12 rules each
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Enter Category Theory Enter Category Theory Enter Category Theory
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Enter Category Theory Enter Category Theory Enter Category Theory
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Enter Category Theory Enter Category Theory Enter Category Theory
and these combinators:
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Enter Category Theory Enter Category Theory Enter Category Theory
and these combinators:
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Reducing Complexity Reducing Complexity Reducing Complexity
Function arrow: is just
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Reducing Complexity Reducing Complexity Reducing Complexity
Function arrow: is just
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Reducing Complexity Reducing Complexity Reducing Complexity
Function arrow: is just
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Reducing Complexity Reducing Complexity Reducing Complexity
Function arrow: is just
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Reducing Complexity Reducing Complexity Reducing Complexity
Function arrow: is just
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Reducing Complexity Reducing Complexity Reducing Complexity
Function arrow: is just
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Reducing Complexity Reducing Complexity Reducing Complexity
Function arrow: is just
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Reducing Complexity Reducing Complexity Reducing Complexity
Function arrow: is just
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Reducing Complexity Reducing Complexity Reducing Complexity
Function arrow: is just
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
Pair Preimages Pair Preimages Pair Preimages
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
Pair Preimages Pair Preimages Pair Preimages
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
Pair Preimages Pair Preimages Pair Preimages
:
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
Pair Preimages Pair Preimages Pair Preimages
and :
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
Pair Preimages Pair Preimages Pair Preimages
:
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices
and others so that distributes; e.g.
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices
and others so that distributes; e.g.
Theorem (correctness). For all , .
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices
and others so that distributes; e.g.
Theorem (correctness). For all , . In English: computes preimages under .
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices
and others so that distributes; e.g.
Theorem (correctness). For all , . In English: computes preimages under .
properties
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices
and others so that distributes; e.g.
Theorem (correctness). For all , . In English: computes preimages under .
properties
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
Abstraction Abstraction Abstraction
Rectangle: An interval or union of intervals, a subset of , or for rectangles and
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13
Abstraction Abstraction Abstraction
Rectangle: An interval or union of intervals, a subset of , or for rectangles and
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13
Abstraction Abstraction Abstraction
Rectangle: An interval or union of intervals, a subset of , or for rectangles and
(and therefore ) by replacing sets and set
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13
Abstraction Abstraction Abstraction
Rectangle: An interval or union of intervals, a subset of , or for rectangles and
(and therefore ) by replacing sets and set
recursion depth or if choices
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13
In Theory... In Theory... In Theory...
Theorem (sound). computes overapproximations of the preimages computed by .
anything out
14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14
In Theory... In Theory... In Theory...
Theorem (sound). computes overapproximations of the preimages computed by .
anything out Theorem (decreasing). never returns preimages larger than the given subdomain.
worse approximation
14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14
In Theory... In Theory... In Theory...
Theorem (sound). computes overapproximations of the preimages computed by .
anything out Theorem (decreasing). never returns preimages larger than the given subdomain.
worse approximation Theorem (monotone). is monotone.
worse approximation
14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14
In Practice... In Practice... In Practice...
Theorems prove this always works:
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
In Practice... In Practice... In Practice...
Theorems prove this always works:
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
In Practice... In Practice... In Practice...
Theorems prove this always works:
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
In Practice... In Practice... In Practice...
Theorems prove this always works:
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
In Practice... In Practice... In Practice...
Theorems prove this always works:
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
In Practice... In Practice... In Practice...
Theorems prove this always works:
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
In Practice... In Practice... In Practice...
Theorems prove this always works:
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
In Practice... In Practice... In Practice...
Theorems prove this always works:
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
In Practice... In Practice... In Practice...
Theorems prove this always works:
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
Program Domain Values Program Domain Values Program Domain Values
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
Program Domain Values Program Domain Values Program Domain Values
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
Program Domain Values Program Domain Values Program Domain Values
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
Program Domain Values Program Domain Values Program Domain Values
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
Program Domain Values Program Domain Values Program Domain Values
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
Example: Stochastic Ray Tracing Example: Stochastic Ray Tracing Example: Stochastic Ray Tracing
17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17
Example: Probabilistic Verification Example: Probabilistic Verification Example: Probabilistic Verification
(struct/drbayes float-any ()) (struct/drbayes float (value error))
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
Example: Probabilistic Verification Example: Probabilistic Verification Example: Probabilistic Verification
(struct/drbayes float-any ()) (struct/drbayes float (value error)) (define/drbayes (flsqrt x) (if (float-any? x) x (let ([v (float-value x)] [e (float-error x)]) (cond [(negative? v) (float-any)] [(zero? v) (float 0 0)] [else (float (sqrt v) (+ (- 1 (sqrt (- 1 e))) (* 1/2 epsilon)))]))))
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
Example: Probabilistic Verification Example: Probabilistic Verification Example: Probabilistic Verification
(struct/drbayes float-any ()) (struct/drbayes float (value error)) (define/drbayes (flsqrt x) (if (float-any? x) x (let ([v (float-value x)] [e (float-error x)]) (cond [(negative? v) (float-any)] [(zero? v) (float 0 0)] [else (float (sqrt v) (+ (- 1 (sqrt (- 1 e))) (* 1/2 epsilon)))]))))
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
Example: Probabilistic Verification Example: Probabilistic Verification Example: Probabilistic Verification
(struct/drbayes float-any ()) (struct/drbayes float (value error)) (define/drbayes (flsqrt x) (if (float-any? x) x (let ([v (float-value x)] [e (float-error x)]) (cond [(negative? v) (float-any)] [(zero? v) (float 0 0)] [else (float (sqrt v) (+ (- 1 (sqrt (- 1 e))) (* 1/2 epsilon)))]))))
library, as well as others
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18
Examples: Other Inference Tasks Examples: Other Inference Tasks Examples: Other Inference Tasks
Hierarchical models Bayesian regression Model selection
19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19
Examples: Other Inference Tasks Examples: Other Inference Tasks Examples: Other Inference Tasks
Hierarchical models Bayesian regression Model selection
Programs that halt with probability < 1, or never halt Probabilistic context-free grammars with context-sensitive constraints
19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19
Summary Summary Summary
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
Summary Summary Summary
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
Summary Summary Summary
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
Summary Summary Summary
inference
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
Summary Summary Summary
inference
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
https://github.com/ntoronto/drbayes
21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21