Usable Synthesis Sumit Gulwani Microsoft Research, Redmond Usable Verification Workshop November 2010 MSR Redmond.

Slides:



Advertisements
Similar presentations
Supporting Life Scientists via End User Programming Luke Church Computer Laboratory, University of Cambridge Microsoft eScience - Dec 08 With thanks to.
Advertisements

Synthesizing Number Transformations from Input-Output Examples Rishabh Singh and Sumit Gulwani.
From Verification to Synthesis Sumit Gulwani Microsoft Research, Redmond August 2013 Marktoberdorf Summer School Lectures: Part 1.
Satisfiability Modulo Theories (An introduction)
Synthesizing Geometry Constructions Sumit Gulwani MSR, Redmond Vijay Korthikanti UIUC Ashish Tiwari SRI.
Constraint Based Synthesis for Beginners PSY 2012 Armando Solar-Lezama.
DARPA SHAKEN Virus-Invades-Cell Invade VirusCell Attach Penetrate Release Move invader thing invaded barrier Cell-membrane has-part subevent penetrator.
Sumit Gulwani Microsoft Research, Redmond Dimensions in Program Synthesis ACM Symposium on Principles and Practice of Declarative.
Salman Cheema 1, Sumit Gulwani 2, Joseph J. LaViola Jr 1 1: University of Central Florida 2: Microsoft Research.
CP411 Computer Graphics, Wilfrid Laurier University Introduction # 1 Welcome to CP411 Computer Graphics 2012 Instructor: Dr. Hongbing Fan Introduction.
Data Manipulation using Programming by Examples and Natural Language Invited Upenn April 2015 Sumit Gulwani.
+ MIRA, MIRA ON THE WALL Hands on Constructions in Geometry Kyndall Brown Executive Director California Mathematics Project.
Chapter 2- Visual Basic Schneider
OCIN Workshop Wrapup Bill Dally. Thanks To Funding –NSF - Timothy Pinkston, Federica Darema, Mike Foster –UC Discovery Program Organization –Jane Klickman,
TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A Sumit Gulwani (MSR Redmond) Component-based Synthesis Susmit Jha.
Abstract Data Types (ADT)
Data Structures Introduction. What is data? (Latin) Plural of datum = something given.
CSC 402, Fall Requirements Analysis for Special Properties Systems Engineering (def?) –why? increasing complexity –ICBM’s (then TMI, Therac, Challenger...)
Program Synthesis for Automating Education Sumit Gulwani Microsoft Research, Redmond.
Synthesis of Loop-free Programs Sumit Gulwani (MSR), Susmit Jha (UC Berkeley), Ashish Tiwari (SRI) and Ramarathnam Venkatesan(MSR) Susmit Jha 1.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Dimensions in Synthesis Sumit Gulwani Microsoft Research, Redmond May 2012.
Programming by Example using Least General Generalizations Mohammad Raza, Sumit Gulwani & Natasa Milic-Frayling Microsoft Research.
Cultivating Research Taste (illustrated via a journey in Program Synthesis research) Programming Languages Mentoring Workshop 2015 Sumit Gulwani Microsoft.
Smten: Automatic Translation of High-level Symbolic Computations into SMT Queries Richard Uhler (MIT-CSAIL) and Nirav Dave (SRI International) CAV 2013.
From Program Verification to Program Synthesis Saurabh Srivastava * Sumit Gulwani ♯ Jeffrey S. Foster * * University of Maryland, College Park ♯ Microsoft.
Similarity, Congruence & Proof
Visual Sequences IQ Tests 1 Dipendra Kumar Misra (Y9201) Mukul Singh (Y9350) Tags : Search, Pattern Recognition, Logic etc Advisor : Dr. Amitabh Mukherjee.
Overview of the Course Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University.
Programming by Examples Marktoberdorf Lectures August 2015 Sumit Gulwani.
Automatically Synthesizing SQL Queries from Input-Output Examples Sai Zhang University of Washington Joint work with: Yuyin Sun.
Dimensions in Synthesis Part 3: Ambiguity (Synthesis from Examples & Keywords) Sumit Gulwani Microsoft Research, Redmond May 2012.
Software Development Software Testing. Testing Definitions There are many tests going under various names. The following is a general list to get a feel.
The Beauty and Joy of Computing Lecture #3 : Creativity & Abstraction UC Berkeley EECS Lecturer Gerald Friedland.
Making Math Easier for Kids By Besnik Keja Click on ABC for my research paper Click on my picture for video introduction.
G.CO.1 Know precise definitions of angle, circle, perpendicular lines, parallel lines, and line segment, based on the undefined notions of point, line,
©Evergreen Public Schools /25/2011 Parallel & Perpendicular Lines Equipment Needed: Straightedges/Rulers, Protractors, and Patty Paper (or Parchment.
1 EECS 6083 Compiler Theory Based on slides from text web site: Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved.
Programming at a high level. Developing a Computer Program Programmer  Writes program in source code (VB or other language) Compiler  Converts source.
FlashNormalize: Programming by Examples for Text Normalization International Joint Conference on Artificial Intelligence, Buenos Aires 7/29/2015FlashNormalize1.
Automating String Processing in Spreadsheets using Input-Output Examples Sumit Gulwani Microsoft Research, Redmond.
Compositional Program Synthesis from Natural Language and Examples Mohammad Raza, Sumit Gulwani & Natasa Milic-Frayling Microsoft.
Series and Parallel Circuits. Learning Intentions – Today we will be… Developing our knowledge of series and parallel circuits I can set up a series circuit.
Using Symbolic PathFinder at NASA Corina Pãsãreanu Carnegie Mellon/NASA Ames.
FlashMeta Microsoft PROSE SDK: A Framework for Inductive Program Synthesis Oleksandr Polozov University of Washington Sumit Gulwani Microsoft Research.
From Verification to Synthesis Sumit Gulwani Microsoft Research, Redmond August 2013 Marktoberdorf Summer School Lectures: Part 1.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Programming by Examples Marktoberdorf Lectures August 2015 Sumit Gulwani.
What can we do better to make POPL/PLDI more relevant for the next generation? Ras Bodik (UC-Berkeley) Swarat Chaudhuri (Penn State) Sumit Gulwani (MSR.
Software Design and Development Languages and Environments Computing Science.
Programming by Examples applied to Data Wrangling Invited SYNT July 2015 Sumit Gulwani.
Deductive Techniques for synthesis from Inductive Specifications Dagstuhl Seminar Oct 2015 Sumit Gulwani.
Sumit Gulwani Spreadsheet Programming using Examples Keynote at SEMS July 2016.
Sumit Gulwani Programming by Examples Applications, Algorithms & Ambiguity Resolution Keynote at IJCAR June 2016.
Sub-fields of computer science. Sub-fields of computer science.
Day 20 Geometry.
Similarity, Congruence & Proof
Outline Core Synthesis Architecture [1 hour by Sumit]
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Susmit Jha1, Vasumathi Raman, Sanjit A. Seshia2 1SRI International
Lines, Angles and Triangles
Overview of the Course Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University.
Day 21 Geometry.
Programming by Examples
What's New in eCognition 9
Chapter 2- Visual Basic Schneider
Chapter 2- Visual Basic Schneider
Templates of slides for P4 Experiments with your synthesizer
What's New in eCognition 9
BEGIN WORKING ON YOUR TEST ANALYSIS AS YOU WAIT FOR YOUR TEST
Presentation transcript:

Usable Synthesis Sumit Gulwani Microsoft Research, Redmond Usable Verification Workshop November 2010 MSR Redmond

What is Program Synthesis? –Synthesize an executable program from user intent expressed in form of some constraints. 1 Automated Program Synthesis Why today? –Natural goal given that computing has become accessible, but: fundamental “how” programming models have not changed. most people are not expert programmers. –Enabling technology is now available Better search/logical reasoning techniques (SAT/SMT solvers) Faster machines (good application for multi-cores) State of the art: We can synthesize lines of code.

Technical Dimensions –Search Space –Search Technique Usability Dimensions –Impact Who will find it useful? How useful would it be? –Intent Expression Mechanism How will they express their intent? 2 Dimensions in Program Synthesis

Search Space: Straight-line programs that use –Arithmetic Operators: +,-,*,/ –Logical Operators: Bitwise and/or/not, Shift left/right Search Algorithm: SAT/SMT based techniques 3 Application 1: Bitvector Algorithms Joint work with: Susmit Jha, Sanjit Seshia (UC-Berkeley), Ashish Tiwari (SRI) and Venkie (MSR Redmond) Paper: ICSE 2010

Turn-off rightmost 1-bit 4 Examples of Bitvector Algorithms Z Z & (Z-1) Z Z & Z & (Z-1)

5 Examples of Bitvector Algorithms Turn-off rightmost contiguous sequence of 1-bits Z Z & (1 + (Z | (Z-1))) Ceil of average of two integers without overflowing (Y|Z) – ((Y © Z) >> 1)

6 Examples of Bitvector Algorithms P25: Higher order half of product of x and y o1 := and(x,0xFFFF); o2 := shr(x,16); o3 := and(y,0xFFFF); o4 := shr(y,16); o5 := mul(o1,o3); o6 := mul(o2,o3); o7 := mul(o1,o4); o8 := mul(o2,o4); o9 := shr(o5,16); o10 := add(o6,o9); o11 := and(o10,0xFFFF); o12 := shr(o10,16); o13 := add(o7,o11); o14 := shr(o13,16); o15 := add(o14,o12); res := add(o15,o8); P24: Round up to next highest power of 2 o1 := sub(x,1); o2 := shr(o1,1); o3 := or(o1,o2); o4 := shr(o3,2); o5 := or(o3,o4); o6 := shr(o5,4); o7 := or(o5,o6); o8 := shr(o7,8); o9 := or(o7,o8); o10 := shr(o9,16); o11 := or(o9,o10); res := add(o10,1);

Algorithm Designers Impact: Algorithm Designers or Software Developers Intent Expression Mechanism: Logical Specifications Consumers of Program Synthesis Technology Bitvector Algorithms: Usability Dimensions 7 Software Developers

Search Space: Programs with conditionals/loops –String operations: Concatenate, Substring –Logical operations: comparison involving # of occurrences of a regular expression Search Algorithm: Combination of –Version Space Algebras –Machine Learning 8 Application 2: String Manipulation Macros Joint work with: Bill Harris (UW, Madison), Rishabh Singh (MIT) Paper: POPL 2011

End-Users Algorithm Designers Software Developers Consumers of Program Synthesis Technology String Manipulation Macros: Usability Dimensions Impact: End-users Intent Expression Mechanism: Input-output Examples 9 Most Useful Target

10 String Manipulation Macros Excel Demo

1.Identify tasks that end-users struggle with and identify how they can effectively communicate their intent. –Read help-forums and blogs. –Interview real users. 2.Design a language that satisfies the following trade-off. –Expressive enough to express a lot of tasks. –Small enough to allow efficient learning. 3.Design a learning algorithm with following features. –Interactive with fast convergence (with success or failure). –Provide feedback. –Noise tolerant. 11 Methodology: Automating end-user programming

Search Space: Straight-line programs –Operations: Ruler, Compass Search Algorithm: Exhaustive Search –Property Testing –Goal-directed search –Commonly used library of constructions 12 Application 3: Geometry Constructions Joint work with: Kalika Bali, Monojit Chaudhuri (MSR Bangalore) Vijay Korthikanti (UIUC), Ashish Tiwari (SRI) Ken McMillan (MSR Redmond)

Programming Language for Geometry –Objects: Point, Line, Circle –Constructors Ruler(Point, Point) -> Line Compass(Point, Point) -> Circle Intersect(Circle, Circle) -> Pair of Points Intersect(Line, Circle) -> Pair of Points Intersect(Line, Line) -> Point Logic for Geometry –Inequality predicates over arithmetic expressions Distance(Point, Point), Angle(Line, Line), … Automated Problem Solving –Given pre/postcondition, synthesize a straight-line program 13 Geometry Constructions: Role of PL/logic/synthesis

Automated Problem Solving Given pre/postcondition, synthesize a straight-line program Example: Draw a line L’ perpendicular to a given line L. Precondition: true Postcondition: Angle(L’,L) = 90 Program Step 1: P1, P2 = ChoosePoint(L); Step 2: C1 = Circle(P1,P2); Step 3: C2 = Circle(P2,P1); Step 4: = Intersect(C1,C2); Step 5: L’ = Line(P3,P4); 14 Geometry Domain: Automated Problem Solving

15 Constructing line L’ perpendicular to given line L P1 P2 P3 P4 C1 C2 L L’ Step 1: P1, P2 = ChoosePoint(L); Step 2: C1 = Circle(P1,P2); Step 3: C2 = Circle(P2,P1); Step 4: = Intersect(C1,C2); Step 5: L’ = Line(P3,P4);

Bisect a given line. Bisect an angle. Copy an angle. Draw a line parallel to a given line. Draw an equilateral triangle given two points. Draw a regular hexagon given a side. Given 4 points, draw a square with each of the sides passing through a different point. Other Applications: New approximate geometric constructions 2D/3D planning problems 16 Examples of Geometry Constructions

Students and Teachers End-Users Algorithm Designers Software Developers Consumers of Program Synthesis Technology Geometry Constructions: Usability Dimensions Impact: Students and Teachers Intent Expression Mechanism: Natural Language 17 Most Trans- formational Target Most Useful Target

Automating Education Make education interactive and fun Automated problem solving (for students) –Provide hints –Point out mistakes and suggest fixes Creation of teaching material (for teachers) –Authoring tools –Problem construction Group interaction (for teachers/students) –Ask questions –Share annotations Domains: Geometry, Algebra, Probability, Mechanics, Electrical Circuits, etc. 18

Students and Teachers End-Users Algorithm Designers Software Developers Most Trans- formational Target Usability Dimensions 19 Consumers of Program Synthesis Technology Most Useful Target Logic Examples English Impact User Interface

Dimensions in Program Synthesis –Invited Tutorial at FMCAD 2010 –Invited paper at PPDP 2010 Bitvector Algorithms –“Oracle guided component based program synthesis”, ICSE 2010, Jha/Gulwani/Seshia/Tiwari String Manipulation Macros –“Automating String Processing in Spreadsheets using Input- Output Examples”, POPL 2011, Gulwani Geometry Constructions –“Synthesizing Geometry Constructions”, Techreport 2011, Gulwani/Korthikanti/Tiwari 20 References