Latent Execution for Neural Program Synthesis Beyond Domain-Specific Languages

06/29/2021
by   Xinyun Chen, et al.
3

Program synthesis from input-output examples has been a long-standing challenge, and recent works have demonstrated some success in designing deep neural networks for program synthesis. However, existing efforts in input-output neural program synthesis have been focusing on domain-specific languages, thus the applicability of previous approaches to synthesize code in full-fledged popular programming languages, such as C, remains a question. The main challenges lie in two folds. On the one hand, the program search space grows exponentially when the syntax and semantics of the programming language become more complex, which poses higher requirements on the synthesis algorithm. On the other hand, increasing the complexity of the programming language also imposes more difficulties on data collection, since building a large-scale training set for input-output program synthesis require random program generators to sample programs and input-output examples. In this work, we take the first step to synthesize C programs from input-output examples. In particular, we propose LaSynth, which learns the latent representation to approximate the execution of partially generated programs, even if their semantics are not well-defined. We demonstrate the possibility of synthesizing elementary C code from input-output examples, and leveraging learned execution significantly improves the prediction performance over existing approaches. Meanwhile, compared to the randomly generated ground-truth programs, LaSynth synthesizes more concise programs that resemble human-written code. We show that training on these synthesized programs further improves the prediction performance for both Karel and C program synthesis, indicating the promise of leveraging the learned program synthesizer to improve the dataset quality for input-output program synthesis.

READ FULL TEXT
research
07/16/2020

Synthesize, Execute and Debug: Learning to Repair for Neural Program Synthesis

The use of deep learning techniques has achieved significant progress fo...
research
06/05/2017

Learning Neural Programs To Parse Programs

In this work, we study an important problem: learning programs from inpu...
research
05/18/2022

Transformer-based Program Synthesis for Low-Data Environments

Recent advancements in large pre-trained transformer models (GPT2/3, T5)...
research
11/26/2018

Stepping Stones to Inductive Synthesis of Low-Level Looping Programs

Inductive program synthesis, from input/output examples, can provide an ...
research
12/23/2020

Representing Partial Programs with Blended Abstract Semantics

Synthesizing programs from examples requires searching over a vast, comb...
research
11/26/2019

Experiments with a PCCoder extension

Recent research in synthesis of programs written in some Domain Specific...
research
07/06/2018

NAPS: Natural Program Synthesis Dataset

We present a program synthesis-oriented dataset consisting of human writ...

Please sign up or login with your details

Forgot password? Click here to reset