DeepAI AI Chat
Log In Sign Up

Program Synthesis with Live Bidirectional Evaluation

by   Justin Lubin, et al.

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.


page 1

page 2

page 3

page 4


Program Sketching with Live Bidirectional Evaluation

We present Sketch-n-Myth, a technique for completing program sketches wh...

Program Synthesis Using Example Propagation

We present Scrybe, an example-based synthesis tool for a statically-type...

Constraint-Based Type-Directed Program Synthesis

We explore an approach to type-directed program synthesis rooted in cons...

Synbit: Synthesizing Bidirectional Programs using Unidirectional Sketches

We propose a technique for synthesizing bidirectional programs from the ...

Bidirectional Evaluation with Direct Manipulation

We present an evaluation update (or simply, update) algorithm for a full...

Bidirectional Typing

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

Sketch-n-Sketch: Output-Directed Programming for SVG

For creative tasks, programmers face a choice: Use a GUI and sacrifice f...