Programming by Example using Least General Generalizations Mohammad Raza, Sumit Gulwani & Natasa Milic-Frayling Microsoft Research.

Slides:



Advertisements
Similar presentations
SpreadsheetML Basics.
Advertisements

1 XSLT – eXtensible Stylesheet Language Transformations Modified Slides from Dr. Sagiv.
GO! with Microsoft® Excel e
Microsoft Word 2013 An Overview. Your Environment Quick Access Toolbar Customizable toolbar for one-click shortcuts Tabs Backstage View Tools located.
Lesson 1: Advanced Formatting Unit 2: Advanced Word 2007: Business Communications.
OFFICE CHOUM AHMED Microsoft Excel Lesson 04.
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
Microsoft Excel 2003 Illustrated Complete A Worksheet Formatting.
Microsoft Word Review.
TITLE SHOULD BE ALL CAPS AND AROUND 75 FONT Author’s names should be around 62 pt font Emporia State University, Department of [enter department name here]
Word. Define the meaning of Word will be divided into two parts: First Section: What it means is commonly known It is a word processor that through which.
DYNAMIC ELEMENT RETRIEVAL IN A STRUCTURED ENVIRONMENT MAYURI UMRANIKAR.
Chapter 4 Query Languages.... Introduction Cover different kinds of queries posed to text retrieval systems Keyword-based query languages  include simple.
Word processing June 2013.
Bulleted and Numbered Lists Microsoft Word. What are Bulleted and Number Lists?  Bulleted and number lists are types of hanging indents you can use to.
File Types, MS Word, and MS Excel
ICT Revision. Database – Data Management The insertion and deletion of fields The insertion and deletion of records Tables to be linked together The editing.
Internet Skills An Introduction to HTML Alan Noble Room 504 Tel: (44562 internal)
The Characteristics of CSS
Word Processing ADE100- Computer Literacy Lecture 12.
An Approach to Task Modelling for User Interface Design Costin Pribeanu National Institute for Research and Development in Informatics, Bucureşti, Romania.
Sara Teel Units A-H and L-M.  The different types of computers  The types of computer systems  Input and Output devices  Processing data  Memory.
Microsoft Office Illustrated Introductory, Premium Edition A Worksheet Formatting.
Microsoft Office XP Illustrated Introductory, Enhanced A Worksheet Formatting.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 6 XSLT (Based on Møller and Schwartzbach,
Programming by Examples Marktoberdorf Lectures August 2015 Sumit Gulwani.
® Microsoft Office 2010 Excel Tutorial 2: Formatting a Workbook.
The switch from Microsoft Office 2003 to 2007 Microsoft Word Microsoft Excel Microsoft PowerPoint.
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
Querying Structured Text in an XML Database By Xuemei Luo.
SDPL 2001Notes 4: Intro to Stylesheets1 4. Introduction to Stylesheets n Discussed recently: –Programmatic manipulation of (data-oriented) documents n.
Transforming Documents „a how-to of transforming xml documents“ Lecture on Walter Kriha.
Software and You Using Microsoft Office. Microsoft Office 2000.
1 After completing this lesson, you will be able to: Change the layout of a slide. Insert a clip art image. Scale an image. Insert and format a Microsoft.
Indirect Supervision Protocols for Learning in Natural Language Processing II. Learning by Inventing Binary Labels This work is supported by DARPA funding.
Working with Themes, Quick Parts, Page Backgrounds, and Headers and Footers Lesson 7.
SDPL 2002Notes 4: Intro to Style Sheets1 4. Introduction to Style Sheets n Discussed recently: –Programmatic manipulation of documents n Now a more human-oriented.
By: Ms. Abeer Helwa 1. WORD WEB APP 2 Word Web App is a limited version of Word, enabling you to edit, format, and share documents online. Word Web App.
Lesson 6 Formatting Cells and Ranges. Objectives:  Insert and delete cells  Manually format cell contents  Copy cell formatting with the Format Painter.
Compositional Program Synthesis from Natural Language and Examples Mohammad Raza, Sumit Gulwani & Natasa Milic-Frayling Microsoft.
Lecture 3- Microsoft Word COE 201- Computer Proficiency.
Mr. Munaco Computer Technology TEACHING ADVANCED WORD 2007.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
VBQU149 Create texts of some complexity. Columns Making columns in Microsoft Word Open word and blank page type =rand() Go to page layout, then columns.
Programming by Examples Marktoberdorf Lectures August 2015 Sumit Gulwani.
Instance Discovery and Schema Matching With Applications to Biological Deep Web Data Integration Tantan Liu, Fan Wang, Gagan Agrawal {liut, wangfa,
Programming by Examples applied to Data Wrangling Invited SYNT July 2015 Sumit Gulwani.
Rendering XML Documents ©NIITeXtensible Markup Language/Lesson 5/Slide 1 of 46 Objectives In this session, you will learn to: * Define rendering * Identify.
How to make a brochure Go to Microsoft word 2007 and select any online template on brochure.
Microsoft Word Font, Paragraph Formatting and Picture Toolbar.
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.
How to use Microsoft PowerPoint
Welcome to Word Day 1 of 3 Dan McAllister
Fonts, Pictures, Styles, Files, Spelling, and More!
Introduction to XHTML.
The Basics of Microsoft Word 2007 Excel
PowerPoint Template
Lecture 12: Data Wrangling
PowerPoint Template
CSc4730/6730 Scientific Visualization
Unit# 6: ICT Applications
Word: Styles & Illustrations Participation Project
PowerPoint Template
The Basics of Microsoft Word 2007 Excel
POWERPOINT (PPT) KEY Elements: Know these features
Objectives At the end of this session, students will be able to:
Title of presentation | Presentation by [Enter details in 'Header & Footer' field 18/05/2019.
PowerPoint Template.
Presentation transcript:

Programming by Example using Least General Generalizations Mohammad Raza, Sumit Gulwani & Natasa Milic-Frayling Microsoft Research

Introduction Programming by Example (PBE) has made significant advances recently, e.g. Excel Flash Fill (Gulwani’11) Addressing transformations on small unstructured text strings

Introduction Existing approaches do not scale to more complex editing scenarios e.g. richly formatted document editing PBE paradigm is well-suited to rich formatting scenarios: Styles, templates are restrictive and require premature commitment from the user Macro programming languages are expressive but too advanced for most users Discoverability of specialised features is difficult in complex UIs

Repetitive formatting scenarios Initial state Colour all diamond- shaped objects Colour all objects with underlined text

Repetitive formatting scenarios Initial state Shift all pictures Align all pictures

Repetitive formatting scenarios Change all first names to initials

Repetitive formatting scenarios Change all first names to initials

Challenges & existing approaches General PBE ingredients: Domain specific language (DSL) - space of possible programs Synthesis algorithm - given input-output examples, infer a satisfying program in the DSL Trade offs between expressivity of DSL, efficiency and accuracy of synthesis algorithm Recent DAG-based approaches: Construct an explicit representation of all possible programs followed by ranking within this space 1 P K

A different approach to PBE Since goal is to find a single program, can we incorporate the ranking strategy implicitly into the synthesis algorithm? Adopting the notion of least general generalization from inductive inference (Plotkin’70): Design a DSL equipped with a natural subsumption ordering on programs Design an algorithm that efficiently generates programs that are minimal with respect to the subsumption ordering Avoid exhaustive enumeration of the search space

Domain Specific Language Example input state Example output state Output expressionInput expression Structured representation of richly formatted content (XML) DSL programs express conditional transformations on XML trees: Change all text boxes that have Arial font of size 12 into a red coloured table

Domain Specific Language Data model DSL XML represented as ordered trees Each node labelled by an element name a mapping of attributes to literal values Programs defined by input and output tree expressions Attribute value expressions may be specified by literals, variables or function expressions e.g. numeric or text transformations Loop expressions using iterators Expressing structural variations May be nested Unique loop expression per element in a sibling composition

Semantics

Synthesis algorithm Given a set of input-output examples, generate a program satisfying all the examples that is minimal in the subsumption ordering Based on syntactic anti-unification (Plotkin’70) Using scopes to represent nested loop contexts: maintain injective maps for generating variables and iterators within scopes

Synthesis algorithm – top level Overall approach Generalize over inputs Generalize over outputs Relate variables between input and output

Synthesis algorithm Inferring tree expressions Select next element e from top level siblings Call recursively on remaining siblings If e has fixed number occurrences then infer rooted tree expression Otherwise introduce a new iterator and infer loop expression

Synthesis algorithm Infer rooted tree expression Follows inductive structure Infer attribute map expression (base case) Introduce new variable if attribute values not consistent

Evaluation Implemented an add-in for Microsoft PowerPoint, based on OOXML file format Evaluated with questions from online help forums Questions covered wide range of PowerPoint features e.g. shapes, images, charts, tables, bullets, margins, fonts, borders, size, positioning, scaling, colors, styles, indents… “indent any text of a certain font if it appears inside a table” “change only red coloured circular shapes” “change only text of a certain font and size” “borders around all pictures” “change paragraphs to table rows” Some tasks involving ranges not expressible Average of 4.2 examples required for task completion

Conclusion Extended applicability of PBE to domain of rich formatting transformations LGG provides a different approach to PBE where DSL is designed with respect to a target subsumption relation ranking bias is implicit in the synthesis algorithm Next steps: Targeting more expressive domains (e.g. ranges in conditionals, loop conditions) Faster convergence (customizing XML formats) Natural interaction techniques, e.g. NL input from user to target more expressive domains with fewer examples