Deductive Techniques for synthesis from Inductive Specifications Dagstuhl Seminar Oct 2015 Sumit Gulwani.

Slides:



Advertisements
Similar presentations
Synthesizing Number Transformations from Input-Output Examples Rishabh Singh and Sumit Gulwani.
Advertisements

From Verification to Synthesis Sumit Gulwani Microsoft Research, Redmond August 2013 Marktoberdorf Summer School Lectures: Part 1.
(non-programmers with access to computers)
Key-word Driven Automation Framework Shiva Kumar Soumya Dalvi May 25, 2007.
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 121 Software Design I Lecture 11.
FlashExtract : A General Framework for Data Extraction by Examples
Data Manipulation using Programming by Examples and Natural Language Invited Upenn April 2015 Sumit Gulwani.
Computer science is a field of study that deals with solving a variety of problems by using computers. To solve a given problem by using computers, you.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
CPSC 322, Lecture 19Slide 1 Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt ) February, 23, 2009.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
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.
Parallel Merging Advanced Algorithms & Data Structures Lecture Theme 15 Prof. Dr. Th. Ottmann Summer Semester 2006.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Usable Synthesis Sumit Gulwani Microsoft Research, Redmond Usable Verification Workshop November 2010 MSR Redmond.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
Design & Analysis of Algorithms Introduction. Introduction Algorithms are the ideas behind computer programs. An algorithm is the thing which stays the.
Programming by Example using Least General Generalizations Mohammad Raza, Sumit Gulwani & Natasa Milic-Frayling Microsoft Research.
Type-Directed, Whitespace-Delimited Parsing for Embedded DSLs Cyrus Omar School of Computer Science Carnegie Mellon University [GlobalDSL13] Benjamin ChungAlex.
Extensible Type-Driven Parsing for Embedded DSLs in Wyvern Cyrus Omar Benjamin Chung Darya Kurilova Ligia Nistor Alex Potanin (Victoria University of Wellington)
Spectra Software Defined Radio Products Applying Model Driven Design, Generative Programming, and Agile Software Techniques to the SDR Domain OOPSLA '05.
Cultivating Research Taste (illustrated via a journey in Program Synthesis research) Programming Languages Mentoring Workshop 2015 Sumit Gulwani Microsoft.
Teaching Teaching Discrete Mathematics and Algorithms & Data Structures Online G.MirkowskaPJIIT.
Programming by Examples Marktoberdorf Lectures August 2015 Sumit Gulwani.
End-User Programming (using Examples & Natural Language) Sumit Gulwani Microsoft Research, Redmond August 2013 Marktoberdorf Summer.
Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.
Dimensions in Synthesis Part 3: Ambiguity (Synthesis from Examples & Keywords) Sumit Gulwani Microsoft Research, Redmond May 2012.
Chapter 6: Structured Vs. Object Oriented Analysis and Design.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Generative Programming. Automated Assembly Lines.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Design & Analysis of Algorithms Lecture 1 Introduction.
INRIA - LaBRICharles Consel Jan-06 1 Domain-Specific Software Engineering Charles Consel Phoenix Research Group LaBRI /INRIA-Futurs January 2006.
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
Automated Transformation of Statements Within Evolving Domain Specific Languages Peter Bell CEO/CTO, SystemsForge 7th OOPSLA Workshop on Domain-Specific.
Formal Methods in Invited CBSoft Sep 2015 Sumit Gulwani Data Wrangling & Education.
OOPSLA workshop on Domain-Specific Modeling (DSM’03) 1 Vasco Amaral, Univ. of Mannheim Steve Cook, Microsoft Daniel Dvorak, JPL/Cal Tech Lars Grunske,
CS703: PROJECT GUIDELINES 1. Logistics: Project Most important part of the course Teams of 1 or 2 people Expectations commensurate with size of team Deliverables.
HKOI 2005 Training Introduction to Algorithms Alan, Tam Siu Lung.
FlashNormalize: Programming by Examples for Text Normalization International Joint Conference on Artificial Intelligence, Buenos Aires 7/29/2015FlashNormalize1.
Predicting a Correct Program in PBE Rishabh Singh, Microsoft Research Sumit Gulwani, Microsoft Research.
OOPSLA workshop on Domain-Specific Visual Languages 1 Juha-Pekka Tolvanen, Steven Kelly, Jeff Gray, Kalle Lyytinen.
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.
CpSc 810: Machine Learning Analytical learning. 2 Copy Right Notice Most slides in this presentation are adopted from slides of text book and various.
FlashMeta Microsoft PROSE SDK: A Framework for Inductive Program Synthesis Oleksandr Polozov University of Washington Sumit Gulwani Microsoft Research.
At what level do I trust the outcomes of the model? Verification Calibration Validation Exploration of the model structure. the activity of adjusting the.
Quality Assurance in the Presence of Variability Kim Lauenroth, Andreas Metzger, Klaus Pohl Institute for Computer Science and Business Information Systems.
Programming by Examples Marktoberdorf Lectures August 2015 Sumit Gulwani.
Dagstuhl Seminar Oct 2015 Sumit Gulwani Applications of Inductive Programming in Data Wrangling.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
A Framework for Automated and Composable Testing of Component-based Services Miguel A. Jiménez, Ángela Villota, Norha M. Villegas, Gabriel Tamura, Laurence.
Programming by Examples applied to Data Wrangling Invited SYNT July 2015 Sumit Gulwani.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
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.
Tackling Ambiguity in PBE Rishabh Singh
Outline Core Synthesis Architecture [1 hour by Sumit]
Algorithms and Problem Solving
Programming by Examples
Chapter 6: Structured Vs. Object Oriented Analysis and Design.
Usability Design Space in Programming by Examples
Programming by Examples
Programming by Examples
Programming by Examples
Objective of This Course
Algorithms and Problem Solving
Jiasi Shen, Martin Rinard MIT EECS & CSAIL
Presentation transcript:

Deductive Techniques for synthesis from Inductive Specifications Dagstuhl Seminar Oct 2015 Sumit Gulwani

Vu Le Collaborators Dan Barowy Ted Hart Alex Polozov Dileep Kini Rishabh Singh Mikael Mayer Gustavo Soares Ben Zorn Bill Harris

2 Reference “Programming by Examples (and its applications in Data Wrangling)”, Gulwani; 2016; In Verification and Synthesis of Correct and Secure Systems; IOS Press [based on Marktoberdorf Summer School 2015 Lecture Notes]

Deductive Synthesis Refers to synthesis using deductive methods. Has traditionally been applied to synthesis in the presence of logical specifications. Inductive Synthesis Refers to synthesis from inductive (example-based) specifications. Various kinds of techniques have been applied including constraint solving, stochastic, and enumerative search. This talk describes techniques for synthesis from inductive specifications using deductive methods! 3 Deductive Synthesis vs Inductive Synthesis

4 PBE Architecture Example-based specification Search Algorithm Challenge 1: Ambiguous/under-specified intent may result in unintended programs. Challenge 2: Designing efficient search strategy. Ranking Function Program Ordered set of Programs

Key Ideas Restrict search to an appropriately designed domain- specific language (DSL) specified as a grammar. –Expressive enough to cover wide range of tasks –Restricted enough to enable efficient search 5 Challenge 2: Efficient search strategy “Spreadsheet Data Manipulation using Examples” [CACM 2012 Research Highlights] Gulwani, Harris, Singh

6 FlashFill DSL Concatenate(A, C) SubStr(X, P, P) “Automating string processing in spreadsheets using input-output examples”; POPL 2011; Gulwani

7 FlashExtract DSL substr expr S[z] := [z] [z]) “FlashExtract: A Framework for data extraction by examples”; PLDI 2014; Vu Le, Sumit Gulwani

8 Challenge 2: Efficient search strategy “Spreadsheet Data Manipulation using Examples” [CACM 2012 Research Highlights] Gulwani, Harris, Singh

9 Problem Reduction Spec for T Spec for L Spec for S FlashExtract DSL

substring expr E := SubStr(y, P 1, P 2 ) position expr P := K | Pos(y, R 1, R 2, K) 10 Problem Reduction Redmond, WA Spec for P 1 Spec for P 2 Spec for E SubStr grammar

11 Programming by Examples Example-based specification Program Search Algorithm Challenge 1: Ambiguous/under-specified intent may result in unintended programs. Challenge 2: Designing efficient search strategy. Challenge 3: Lowering the barrier to design & development.

Developing a domain-specific robust search method is costly: Requires domain-specific algorithmic insights. Robust implementation requires good engineering. DSL extensions/modifications are not easy. Key Ideas: PBE algorithms employ a divide and conquer strategy, where synthesis problem for an expression F(e1,e2) is reduced to synthesis problems for sub-expressions e1 and e2. –The divide-and-conquer strategy can be refactored out. Reduction depends on the logical properties of operator F. –Operator properties can be captured in a modular manner for reuse inside other DSLs. 12 Challenge 3: Lowering the barrier “ FlashMeta: A Framework for Inductive Program Synthesis ” [OOPSLA 2015] Polozov, Gulwani

13 Programming by Examples Example-based specification Program Search Algorithm Challenge 1: Ambiguous/under-specified intent may result in unintended programs. Challenge 2: Designing efficient search strategy. Challenge 3: Lowering the barrier to design & development. DSL

14 Search Strategy

15 Output properties Elements belonging to the output list Elements not belonging to the output list Contiguous subsequence of the output list Prefix of the output list Task

16 Output properties Task Prefix of the output table (seq of records) We do not require explicit (magenta) record boundaries in which case the spec is: Prefixes of projections of the output table

17 Search Strategy

18 Search Strategy Key concepts in problem reduction: VSAs & Witness functions

19 Version Space Algebra (VSA)

20 VSA Operations

21 Problem Reduction Rules

22 Intersect Operation

23 Problem Reduction Rules

24 Cluster Operation

25 Filter Operation

26 Problem Reduction Rules

27 Problem Reduction Rules

28 Problem Reduction Rules

29 Problem Reduction Rules

Provides efficient implementations of VSA operations Provides a library of witness functions Role of synthesis designer Can add new operators and witness functions. Can provide ranking strategies. Can specify tactics to resolve non-determinism in search –Which witness function to use? –How to order search branches? 30 FlashMeta Framework

Project FlashFill FlashExtractText FlashRelate FlashNormalize FlashExtractWeb 31 Comparison of FlashMeta with hand-tuned implementations OriginalFlashMeta N/A2.5 OriginalFlashMeta N/A1.5 Lines of Code (K) Development time (months) Running time of FlashMeta implementations vary between x of the corresponding original implementation. Faster because of some free optimizations Slower because of larger feature sets & a generalized framework