Programming by Example Made Easy

07/16/2023
by   Jiarong Wu, et al.
0

Programming by example (PBE) is an emerging programming paradigm that automatically synthesizes programs specified by user-provided input-output examples. Despite the convenience for end-users, implementing PBE tools often requires strong expertise in programming language and synthesis algorithms. Such a level of knowledge is uncommon among software developers. It greatly limits the broad adoption of PBE by the industry. To facilitate the adoption of PBE techniques, we propose a PBE framework called Bee, which leverages an "entity-action" model based on relational tables to ease PBE development for a wide but restrained range of domains. Implementing PBE tools with Bee only requires adapting domain-specific data entities and user actions to tables, with no need to design a domain-specific language or an efficient synthesis algorithm. The synthesis algorithm of Bee exploits bidirectional searching and constraint-solving techniques to address the challenge of value computation nested in table transformation. We evaluated Bee's effectiveness on 64 PBE tasks from three different domains and usability with a human study of 12 participants. Evaluation results show that Bee is easier to learn and use than the state-of-the-art PBE framework, and the bidirectional algorithm achieves comparable performance to domain-specifically optimized synthesizers.

READ FULL TEXT
research
10/12/2020

PATSQL: Efficient Synthesis of SQL Queries from Example Tables with Quick Inference of Projected Columns

SQL is one of the most popular tools for data analysis and used by an in...
research
11/15/2017

WebRelate: Integrating Web Data with Spreadsheets using Examples

Data integration between web sources and relational data is a key challe...
research
07/05/2017

Synthesis of Data Completion Scripts using Finite Tree Automata

In application domains that store data in a tabular format, a common tas...
research
11/01/2019

Program Synthesis with Live Bidirectional Evaluation

We present an algorithm for completing program sketches (partial program...
research
02/14/2020

Bacatá: Notebooks for DSLs, Almost for Free

Context: Computational notebooks are a contemporary style of literate pr...
research
10/25/2022

Program Synthesis Using Example Propagation

We present Scrybe, an example-based synthesis tool for a statically-type...
research
09/28/2022

Revealing the Semantics of Data Wrangling Scripts With COMANTICS

Data workers usually seek to understand the semantics of data wrangling ...

Please sign up or login with your details

Forgot password? Click here to reset