SPoC: Search-based Pseudocode to Code

06/12/2019
by   Sumith Kulal, et al.
0

We consider the task of mapping pseudocode to long programs that are functionally correct. Given test cases as a mechanism to validate programs, we search over the space of possible translations of the pseudocode to find a program that passes the validation. However, without proper credit assignment to localize the sources of program failures, it is difficult to guide search toward more promising programs. We propose to perform credit assignment based on signals from compilation errors, which constitute 88.7 Concretely, we treat the translation of each pseudocode line as a discrete portion of the program, and whenever a synthesized program fails to compile, an error localization method tries to identify the portion of the program responsible for the failure. We then focus search over alternative translations of the pseudocode for those portions. For evaluation, we collected the SPoC dataset (Search-based Pseudocode to Code) containing 18,356 programs with human-authored pseudocode and test cases. Under a budget of 100 program compilations, performing search improves the synthesis success rate over using the top-one translation of the pseudocode from 25.6

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/23/2023

Finding Failure-Inducing Test Cases with ChatGPT

Automatically detecting software failures is an important task and a lon...
research
05/12/2020

Semantic Scaffolds for Pseudocode-to-Code Generation

We propose a method for program generation based on semantic scaffolds, ...
research
03/23/2021

RPT: Effective and Efficient Retrieval of Program Translations from Big Code

Program translation is a growing demand in software engineering. Manual ...
research
11/02/2018

Value-based Search in Execution Space for Mapping Instructions to Programs

Training models to map natural language instructions to programs given t...
research
06/09/2019

Write, Execute, Assess: Program Synthesis with a REPL

We present a neural program synthesis approach integrating components wh...
research
10/24/2022

Scalable Program Clone Search Through Spectral Analysis

We consider the problem of program clone search, i.e. given a target pro...
research
10/18/2022

Graphs, Constraints, and Search for the Abstraction and Reasoning Corpus

The Abstraction and Reasoning Corpus (ARC) aims at benchmarking the perf...

Please sign up or login with your details

Forgot password? Click here to reset