Neural Program Generation Modulo Static Analysis
Rohan Mukherjee, Yeming Wen, Dipak Chaudhari, Thomas W. Reps, Swarat, Chaudhuri, Chris Jermaine

TL;DR
This paper introduces a neurosymbolic approach that combines neural models with static analysis to improve the generation of entire Java methods, effectively capturing long-range semantic relationships and reducing semantic errors.
Contribution
The paper presents a novel method integrating static analysis with neural generation, enabling better long-horizon program synthesis and semantic correctness in generated code.
Findings
Outperforms state-of-the-art transformers in Java method generation
Produces code with fewer semantic errors
Achieves higher syntactic accuracy compared to previous models
Abstract
State-of-the-art neural models of source code tend to be evaluated on the generation of individual expressions and lines of code, and commonly fail on long-horizon tasks such as the generation of entire method bodies. We propose to address this deficiency using weak supervision from a static program analyzer. Our neurosymbolic method allows a deep generative model to symbolically compute, using calls to a static-analysis tool, long-distance semantic relationships in the code that it has already generated. During training, the model observes these relationships and learns to generate programs conditioned on them. We apply our approach to the problem of generating entire Java methods given the remainder of the class that contains the method. Our experiments show that the approach substantially outperforms state-of-the-art transformers and a model that explicitly tries to learn program…
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.
Videos
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Topic Modeling
