Neural Sketch Learning for Conditional Program Generation
Vijayaraghavan Murali, Letao Qi, Swarat Chaudhuri, Chris Jermaine

TL;DR
This paper introduces a neural sketch learning approach for conditional program generation, enabling the prediction of complete, type-safe Java methods from minimal input labels like API calls or data types.
Contribution
It proposes training neural models on program sketches to better handle syntax and semantic constraints in code generation tasks.
Findings
Effective prediction of Java methods from limited labels
Sketch-based neural training improves syntactic and semantic correctness
System successfully generates API-heavy Java code from minimal input
Abstract
We study the problem of generating source code in a strongly typed, Java-like programming language, given a label (for example a set of API calls or types) carrying a small amount of information about the code that is desired. The generated programs are expected to respect a "realistic" relationship between programs and labels, as exemplified by a corpus of labeled programs available during training. Two challenges in such conditional program generation are that the generated programs must satisfy a rich set of syntactic and semantic constraints, and that source code contains many low-level features that impede learning. We address these problems by training a neural generator not on code but on program sketches, or models of program syntax that abstract out names and operations that do not generalize across programs. During generation, we infer a posterior distribution over sketches,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Software Reliability and Analysis Research
