Scaling Program Synthesis by Exploiting Existing Code James Bornholt Emina Torlak University of Washington
Synthesis: write programs automatically Syntax Semantics
Synthesis: write programs automatically Syntax Semantics
Synthesis: write programs automatically Target Behavior f ( x ) = 4 x + 1 Syntax Semantics
Synthesis: write programs automatically 4*x + 1 Target Behavior f ( x ) = 4 x + 1 Syntax Semantics
Synthesis: write programs automatically 4*x + 1 (x<<2) + 1 Target Behavior f ( x ) = 4 x + 1 x + x + x + x + 1 Syntax Semantics
Synthesis: write programs automatically Target Behavior Permutation ( L, f ( L )) ∧ Sorted ( f ( L )) Syntax Semantics
Synthesis: write programs automatically Quicksort Target Behavior Permutation ( L, f ( L )) ∧ Sorted ( f ( L )) Bubble Sort Syntax Semantics
The success of synthesis End-user programming by example [FlashFill, POPL’11] Cache coherence protocols [Transit, PLDI’13] Parallel browser layout engines [PPoPP’13] Compilers for new spatial architectures [Chlorophyll, PLDI’14]
The success of synthesis End-user programming by example [FlashFill, POPL’11] s i s Cache coherence protocols e h t n y S [Transit, PLDI’13] turns t n e t n i l e v e l - h g i h Parallel browser layout into l i a t e d l e engines [PPoPP’13] v e l - w o l Compilers for new spatial architectures [Chlorophyll, PLDI’14]
The success of synthesis Approximate Computing quality bounds into End-user programming approximate programs by example [FlashFill, POPL’11] s i s Cache coherence protocols e h t n y S [Transit, PLDI’13] turns t n e t n i l e v e l - h g i h Parallel browser layout into l i a t e d l e engines [PPoPP’13] v e l - w o l Compilers for new spatial architectures [Chlorophyll, PLDI’14]
The success of synthesis Approximate Computing quality bounds into End-user programming approximate programs by example [FlashFill, POPL’11] s Hardware i s Cache coherence protocols e h t n y S Synthesis [Transit, PLDI’13] turns t n e t n i l e v programs e l - h g i h into Parallel browser layout into l hardware designs i a t e d l e engines [PPoPP’13] v e l - w o l Compilers for new spatial architectures [Chlorophyll, PLDI’14]
The success of synthesis Approximate Computing quality bounds into End-user programming approximate programs by example [FlashFill, POPL’11] s Hardware i s Cache coherence protocols e h t n y S Synthesis [Transit, PLDI’13] turns t n e t n i l e v programs e l - h g i h into Parallel browser layout into l hardware designs i a t e d l e engines [PPoPP’13] v e l - w o l Compilers for new spatial Black Box architectures [Chlorophyll, PLDI’14] Systems observed behaviors into speci fj cations
Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs
Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs
Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Video and image quality
Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Video and image quality Sensors and simulation Machine learning
Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Precise Implementation
Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Precise Implementation Desired Quality
Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Precise Implementation Approximate Compiler Desired Quality
Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Precise Implementation Approximate Approximate Program Compiler Desired Quality
Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Precise Implementation Approximate Approximate Program Program Synthesis † Desired Quality † Bornholt, Torlak, Ceze, Grossman. Approximate Program Synthesis . At WAX’15, collocated with PLDI’15.
Hardware Synthesis Synthesizing circuits from programs high-level languages into hardware designs
Hardware Synthesis Synthesizing circuits from programs high-level languages into hardware designs module example(input a, b, c, output y); assign y = ~a & ~b & ~c | a & ~b & ~c | a & ~b & c; endmodule
Hardware Synthesis Synthesizing circuits from programs high-level languages into hardware designs module example(input a, b, c, output y); assign y = ~a & ~b & ~c | a & ~b & ~c | a & ~b & c; endmodule
Hardware Synthesis Synthesizing circuits from programs high-level languages into hardware designs module example(input a, b, c, output y); assign y = ~a & ~b & ~c | a & ~b & ~c | a & ~b & c; endmodule
Hardware Synthesis Synthesizing circuits from programs high-level languages into hardware designs High-Level Synthesis (HLS)
Hardware Synthesis Synthesizing circuits from programs high-level languages into hardware designs Place and route Timing closure High-Level Synthesis (HLS) Crosstalk and feedback Quantum!
Hardware Synthesis Synthesizing circuits from programs high-level languages into hardware designs Mark Wyse UW grad student and HLS extraordinaire
Hardware Synthesis Synthesizing circuits from programs high-level languages into hardware designs Mark Wyse UW grad student and HLS extraordinaire float dist(float a[3], float b[3]) { float r = 0; r += (a[0] - b[0]) * (a[0] - b[0]); r += (a[1] - b[1]) * (a[1] - b[1]); r += (a[2] - b[2]) * (a[2] - b[2]); return sqrt(r); }
Black Box Systems De fj ning system behavior observed behaviors by observation into speci fj cations
Black Box Systems De fj ning system behavior observed behaviors by observation into speci fj cations
Black Box Systems De fj ning system behavior observed behaviors by observation into speci fj cations
Black Box Systems De fj ning system behavior observed behaviors by observation into speci fj cations
Black Box Systems De fj ning system behavior observed behaviors by observation into speci fj cations Programming by example
Black Box Systems De fj ning system behavior observed behaviors by observation into speci fj cations Programming Synthesizing x86 by example instruction specs Godefroid and Taly. Automated Synthesis of Symbolic Instruction Encodings from I/O Samples. PLDI’12.
Approximate Hardware Black Box Computing Synthesis Systems quality bounds programs observed behaviors into into into approximate programs hardware designs speci fj cations
Machine Learning and Synthesis
Learning programs from examples Black Box Systems observed behaviors into speci fj cations ^ ϕ ( x i , P ( x i )) ∃ P. x i ∈ X
Learning programs from examples Black Box Systems observed behaviors into speci fj cations ^ ϕ ( x i , P ( x i )) ∃ P. x i ∈ X FlashFill
Learning programs from examples FlashFill Version Space Algebra
Machine learning and synthesis Statistical Program Machine Synthesis Learning
Machine learning and synthesis Millions of examples/parameters Statistical Program Machine Synthesis Learning
Machine learning and synthesis 100 instructions Millions of examples/parameters Statistical Program Machine Synthesis Learning
Machine learning and synthesis Approximate Computing Hardware Synthesis Black Box Systems 100 instructions Millions of examples/parameters Statistical Program Machine Synthesis Learning
Machine learning and synthesis Approximate Computing Hardware Synthesis Black Box Systems 100 instructions Millions of examples/parameters Statistical Program Machine Synthesis Learning
Programs are not uniformly distributed.
Programs are not uniformly distributed. 80000 Stack Over fm ow mentions 60000 40000 20000 0 malloc longjmp
Programs are not uniformly distributed. 80000 Stack Over fm ow mentions 60000 40000 20000 0 malloc longjmp
Programs are not uniformly distributed. 80000 Stack Over fm ow mentions 60000 40000 20000 0 malloc longjmp
Programs are not uniformly distributed. 80000 mov Stack Over fm ow mentions mov call 60000 test jmp 40000 call lea 20000 push sub push 0 malloc longjmp
Component-Based Synthesis
Synthesis of Loop-Free Programs Gulwani, Jha, Tiwari, and Venkatesan. Synthesis of loop-free programs. PLDI’11.
Synthesis of Loop-Free Programs � x + y ⌫ f ( x, y ) = 2 Gulwani, Jha, Tiwari, and Venkatesan. Synthesis of loop-free programs. PLDI’11.
Recommend
More recommend