Program Synthesis with Live Bidirectional Evaluation

11/01/2019
by   Justin Lubin, et al.
0

We present an algorithm for completing program sketches (partial programs, with holes), in which evaluation and example-based synthesis are interleaved until the program is complete and produces a value. Our approach combines and extends recent advances in live programming with holes and type-and-example-directed synthesis of recursive functions over algebraic data types. Novel to our formulation is the ability to simultaneously solve interdependent synthesis goals — the key technique, called live bidirectional evaluation, iteratively solves constraints that arise during "forward" evaluation of candidate completions and propagates examples "backward" through partial results. We implement our approach in a prototype system, called Sketch-n-Myth, and develop several examples that demonstrate how live bidirectional evaluation enables a novel workflow for programming with synthesis. On benchmarks used to evaluate a state-of-the-art example-based synthesis technique, Sketch-n-Myth requires on average 55 overcoming the example trace-completeness requirement of previous work. Our techniques thus contribute to ongoing efforts to develop synthesis algorithms that can be deployed in future programming environments.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/01/2019

Program Sketching with Live Bidirectional Evaluation

We present Sketch-n-Myth, a technique for completing program sketches wh...
research
10/25/2022

Program Synthesis Using Example Propagation

We present Scrybe, an example-based synthesis tool for a statically-type...
research
07/06/2019

Constraint-Based Type-Directed Program Synthesis

We explore an approach to type-directed program synthesis rooted in cons...
research
08/31/2021

Synbit: Synthesizing Bidirectional Programs using Unidirectional Sketches

We propose a technique for synthesizing bidirectional programs from the ...
research
07/16/2023

Programming by Example Made Easy

Programming by example (PBE) is an emerging programming paradigm that au...
research
09/12/2018

Bidirectional Evaluation with Direct Manipulation

We present an evaluation update (or simply, update) algorithm for a full...
research
08/16/2019

Bidirectional Typing

Bidirectional typing combines two modes of typing: type checking, which ...

Please sign up or login with your details

Forgot password? Click here to reset