FrAngel: Component-Based Synthesis with Control Structures

Kensen Shi, Jacob Steinhardt, Percy Liang
11/13/2018
cs.PL

Official code: kensens/FrAngel (26 stars, last commit 2019-03-28).

Abstract

In component-based program synthesis, the synthesizer generates a program given a library of components (functions). Existing component-based synthesizers have difficulty synthesizing loops and other control structures, and they often require formal specifications of the components, which can be expensive to generate. We present FrAngel, a new approach to component-based synthesis that can synthesize short Java functions with control structures when given a desired signature, a set of input-output examples, and a collection of libraries (without formal specifications). FrAngel aims to discover programs with many distinct behaviors by combining two main ideas. First, it mines code fragments from partially-successful programs that only pass some of the examples. These extracted fragments are often useful for synthesis due to a property that we call special-case similarity. Second, FrAngel uses angelic conditions as placeholders for control structure conditions and optimistically evaluates the resulting program sketches. Angelic conditions decompose the synthesis process: FrAngel first finds promising partial programs and later fills in their missing conditions. We demonstrate that FrAngel can synthesize a variety of interesting programs with combinations of control structures within seconds, significantly outperforming prior state-of-the-art.

View on arXivView PDF

Code Implementations(1)

kensens/FrAngelOfficial100%

A Java program synthesizer.

269Java, ShellAug 6, 20187 years agoNOASSERTION

Similar Papers

Cite this paper

@article{shi2018frangel,
  title  = {FrAngel: Component-Based Synthesis with Control Structures},
  author = {Kensen Shi and Jacob Steinhardt and Percy Liang},
  year   = {2018},
  eprint = {1811.05175},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1811.05175}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1811.05175.svg)](https://codeofpaper.com/paper/1811.05175)

Discussion