scaling program synthesis by exploiting existing code
play

Scaling Program Synthesis by Exploiting Existing Code James - PowerPoint PPT Presentation

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


  1. Scaling Program Synthesis by Exploiting Existing Code James Bornholt Emina Torlak University of Washington

  2. Synthesis: write programs automatically Syntax Semantics

  3. Synthesis: write programs automatically Syntax Semantics

  4. Synthesis: write programs automatically Target Behavior f ( x ) = 4 x + 1 Syntax Semantics

  5. Synthesis: write programs automatically 4*x + 1 Target Behavior f ( x ) = 4 x + 1 Syntax Semantics

  6. Synthesis: write programs automatically 4*x + 1 (x<<2) + 1 Target Behavior f ( x ) = 4 x + 1 x + x + x + x + 1 Syntax Semantics

  7. Synthesis: write programs automatically Target Behavior Permutation ( L, f ( L )) ∧ Sorted ( f ( L )) Syntax Semantics

  8. Synthesis: write programs automatically Quicksort Target Behavior Permutation ( L, f ( L )) ∧ Sorted ( f ( L )) Bubble Sort Syntax Semantics

  9. 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]

  10. 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]

  11. 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]

  12. 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]

  13. 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

  14. Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs

  15. Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs

  16. Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Video and image quality

  17. Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Video and image quality Sensors and simulation Machine learning

  18. Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Precise Implementation

  19. Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Precise Implementation Desired Quality

  20. Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Precise Implementation Approximate Compiler Desired Quality

  21. Approximate Computing Not all applications require quality bounds perfect accuracy into approximate programs Precise Implementation Approximate Approximate Program Compiler Desired Quality

  22. 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.

  23. Hardware Synthesis Synthesizing circuits from programs high-level languages into hardware designs

  24. 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

  25. 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

  26. 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

  27. Hardware Synthesis Synthesizing circuits from programs high-level languages into hardware designs High-Level Synthesis (HLS)

  28. 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!

  29. Hardware Synthesis Synthesizing circuits from programs high-level languages into hardware designs Mark Wyse UW grad student and HLS extraordinaire

  30. 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); }

  31. Black Box Systems De fj ning system behavior observed behaviors by observation into speci fj cations

  32. Black Box Systems De fj ning system behavior observed behaviors by observation into speci fj cations

  33. Black Box Systems De fj ning system behavior observed behaviors by observation into speci fj cations

  34. Black Box Systems De fj ning system behavior observed behaviors by observation into speci fj cations

  35. Black Box Systems De fj ning system behavior observed behaviors by observation into speci fj cations Programming by example

  36. 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.

  37. Approximate Hardware Black Box Computing Synthesis Systems quality bounds programs observed behaviors into into into approximate programs hardware designs speci fj cations

  38. Machine Learning and Synthesis

  39. Learning programs from examples Black Box Systems observed behaviors into speci fj cations ^ ϕ ( x i , P ( x i )) ∃ P. x i ∈ X

  40. Learning programs from examples Black Box Systems observed behaviors into speci fj cations ^ ϕ ( x i , P ( x i )) ∃ P. x i ∈ X FlashFill

  41. Learning programs from examples FlashFill Version Space Algebra

  42. Machine learning and synthesis Statistical Program Machine Synthesis Learning

  43. Machine learning and synthesis Millions of examples/parameters Statistical Program Machine Synthesis Learning

  44. Machine learning and synthesis 100 instructions Millions of examples/parameters Statistical Program Machine Synthesis Learning

  45. Machine learning and synthesis Approximate Computing Hardware Synthesis Black Box Systems 100 instructions Millions of examples/parameters Statistical Program Machine Synthesis Learning

  46. Machine learning and synthesis Approximate Computing Hardware Synthesis Black Box Systems 100 instructions Millions of examples/parameters Statistical Program Machine Synthesis Learning

  47. Programs are not uniformly distributed.

  48. Programs are not uniformly distributed. 80000 Stack Over fm ow mentions 60000 40000 20000 0 malloc longjmp

  49. Programs are not uniformly distributed. 80000 Stack Over fm ow mentions 60000 40000 20000 0 malloc longjmp

  50. Programs are not uniformly distributed. 80000 Stack Over fm ow mentions 60000 40000 20000 0 malloc longjmp

  51. 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

  52. Component-Based Synthesis

  53. Synthesis of Loop-Free Programs Gulwani, Jha, Tiwari, and Venkatesan. Synthesis of loop-free programs. PLDI’11.

  54. 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