SPoC: Search-based Pseudocode to Code

By Sumith Kulal, Panupong Pasupat, Kartik Chandra, Mina Lee, Oded Padon, A. Aiken, Percy Liang. 2019

329 citations recorded by the source corpus.

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% of program failures. 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% to 44.7%.

Subfields: Information Systems, Software, Code Generation & Program Synthesis

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Information Systems

  1. Percy Liang
  2. Graham Neubig
  3. Luke S. Zettlemoyer
  4. Xinyun Chen
  5. Koushik Sen
  6. Dawn Song
  7. Angelica Chen
  8. Pushmeet Kohli

In Software

  1. Angelica Chen
  2. Koushik Sen
  3. Michihiro Yasunaga
  4. Armando Solar-Lezama
  5. Percy Liang
  6. Pushmeet Kohli
  7. Mark Harman
  8. Denny Zhou

In Code Generation & Program Synthesis

  1. Charles Sutton
  2. Graham Neubig
  3. Frank F. Xu
  4. Baptiste Rozière
  5. Augustus Odena
  6. Bogdan Vasilescu
  7. Guillaume Lample
  8. Josh Tenenbaum

Citations in the corpus