Neural Program Generation Modulo Static Analysis

被引:0
|
作者
Mukherjee, Rohan [1 ]
Wen, Yeming [2 ]
Chaudhari, Dipak [2 ]
Reps, Thomas W. [3 ]
Chaudhuri, Swarat [2 ]
Jermaine, Chris [1 ]
机构
[1] Rice Univ, Houston, TX 77251 USA
[2] UT Austin, Austin, TX USA
[3] Univ Wisconsin, Madison, WI 53706 USA
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
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 semantics on this task, both in terms of producing programs free of basic semantic errors and in terms of syntactically matching the ground truth.
引用
收藏
页数:13
相关论文
共 50 条
  • [1] Neural Program Generation Modulo Static Analysis
    Mukherjee, Rohan
    Wen, Yeming
    Chaudhari, Dipak
    Reps, Thomas W.
    Chaudhuri, Swarat
    Jermaine, Chris
    Advances in Neural Information Processing Systems, 2021, 23 : 18984 - 18996
  • [2] Combining Static Analysis and Test Generation for C Program Debugging
    Chebaro, Omar
    Kosmatov, Nikolai
    Giorgetti, Alain
    Julliand, Jacques
    TEST AND PROOFS, PROCEEDINGS, 2010, 6143 : 94 - +
  • [3] Program Analysis via Satisfiability Modulo Path Programs
    Harris, William R.
    Sankaranarayanan, Sriram
    Ivancic, Franjo
    Gupta, Aarti
    ACM SIGPLAN NOTICES, 2010, 45 (01) : 71 - 81
  • [4] Program Analysis via Satisfiability Modulo Path Programs
    Harris, William R.
    Sankaranarayanan, Sriram
    Ivancic, Franjo
    Gupta, Aarti
    POPL'10: PROCEEDINGS OF THE 37TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2010, : 71 - 81
  • [5] Crowdsourced test case generation for android applications via static program analysis
    Yuying Li
    Yang Feng
    Chao Guo
    Zhenyu Chen
    Baowen Xu
    Automated Software Engineering, 2023, 30
  • [6] Crowdsourced test case generation for android applications via static program analysis
    Li, Yuying
    Feng, Yang
    Guo, Chao
    Chen, Zhenyu
    Xu, Baowen
    AUTOMATED SOFTWARE ENGINEERING, 2023, 30 (02)
  • [7] The Impact of Program Transformations on Static Program Analysis
    Namjoshi, Kedar S.
    Pavlinovic, Zvonimir
    STATIC ANALYSIS (SAS 2018), 2018, 11002 : 306 - 325
  • [8] Naturalistic Static Program Analysis
    Kallehbasti, Mohammad Mehdi Pourhashem
    Ghafari, Mohammad
    2023 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING, SANER, 2023, : 743 - 747
  • [9] Naturalistic Static Program Analysis
    Kallehbasti, Mohammad Mehdi Pourhashem
    Ghafari, Mohammad
    arXiv, 2023,
  • [10] Experiences with program static analysis
    Ogasawara, H
    Aizawa, M
    Yamada, A
    FIFTH INTERNATIONAL SOFTWARE METRICS SYMPOSIUM - METRICS 1998, PROCEEDINGS, 1998, : 109 - 112