{"type":"ScholarlyArticle","title":"End-to-End Prediction of Buffer Overruns from Raw Source Code via Neural Memory Networks","authors":[{"name":"Min-je Choi","slug":"min-je-choi","given":"Min-je","family":"Choi","affiliation":"Korea University , Seoul , Republic of Korea"},{"name":"Sehun Jeong","slug":"sehun-jeong","given":"Sehun","family":"Jeong","affiliation":"Korea University , Seoul , Republic of Korea"},{"name":"Hakjoo Oh","slug":"hakjoo-oh","given":"Hakjoo","family":"Oh","affiliation":"Korea University , Seoul , Republic of Korea"},{"name":"Jaegul Choo","slug":"jaegul-choo","given":"Jaegul","family":"Choo","affiliation":"Korea University , Seoul , Republic of Korea"}],"abstract":"Detecting buffer overruns from a source code is one of the most common and yet challenging tasks in program analysis. Current approaches based on rigid rules and handcrafted features are limited in terms of flexible applicability and robustness due to diverse bug patterns and characteristics existing in sophisticated real-world software programs. In this paper, we propose a novel, data-driven approach that is completely end-to-end without requiring any hand-crafted features, thus free from any program language-specific structural limitations. In particular, our approach leverages a recently proposed neural network model called memory networks that have shown the state-of-the-art performances mainly in question-answering tasks. Our experimental results using source code samples demonstrate that our proposed model is capable of accurately detecting different types of buffer overruns. We also present in-depth analyses on how a memory network can learn to understand the semantics in programming languages solely from raw source codes, such as tracing variables of interest, identifying numerical values, and performing their quantitative comparisons.","doi":"10.24963/ijcai.2017/214","url":"https://ijcai.org/proceedings/2017/214","pdf":"https://ijcai.org/proceedings/2017/0214.pdf","markdown":"https://ijcai.org/proceedings/2017/214.md","bibtex":"https://ijcai.org/proceedings/2017/bibtex/214","volume":{"slug":"2017","title":"Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence","short_title":"IJCAI 2017","url":"https://ijcai.org/proceedings/2017/","year":2017,"location":"Melbourne, Australia","dates":"19-25 August 2017","editors":"Carles Sierra","isbn":"978-0-9992411-0-3","publisher":"International Joint Conferences on Artificial Intelligence Organization","doi_prefix":"10.24963/ijcai.2017"},"section":"Machine Learning A-R","track":"Main track","number":214,"pages":{"first":1546,"last":1553},"keywords":["Multidisciplinary Topics and Applications: Knowledge-based Software Engineering","Machine Learning: New Problems","Machine Learning: Deep Learning","Machine Learning: Neural Networks"],"videos":[],"references":[{"position":1,"raw":"[Allamanis et al., 2014] Miltiadis Allamanis, Earl T. Barr, Chris- tian Bird, and Charles Sutton. Learning natural coding conven- tions. In Proceedings of the 22Nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2014, pages 281-293, New York, NY, USA, 2014. ACM.","title":"Learning natural coding conventions","authors":"Miltiadis Allamanis, Earl T Barr, Christian Bird, Charles Sutton","year":"2014","venue":"Proceedings of the 22Nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2014","doi":null,"url":null,"internal_url":null},{"position":2,"raw":"[Allamanis et al., 2016] Miltiadis Allamanis, Hao Peng, and Charles Sutton. A convolutional attention network for extreme summarization of source code. In Proceedings of The 33rd Inter- national Conference on Machine Learning (ICML 2016), pages 2091-2100, 2016.","title":"A convolutional attention network for extreme summarization of source code","authors":"Miltiadis Allamanis, Hao Peng, Charles Sutton","year":"2016","venue":"Proceedings of The 33rd International Conference on Machine Learning (ICML 2016)","doi":null,"url":null,"internal_url":null},{"position":3,"raw":"[Bhatia and Singh, 2016] Sahil Bhatia and Rishabh Singh. Auto- mated correction for syntax errors in programming assignments using recurrent neural networks. In The 2nd Indian Workshop on Machine Learning (iWML 2016), 2016.","title":"Sahil Bhatia and Rishabh Singh. Automated correction for syntax errors in programming assignments using recurrent neural networks","authors":"Singh Bhatia","year":"2016","venue":"The 2nd Indian Workshop on Machine Learning","doi":null,"url":null,"internal_url":null},{"position":4,"raw":"[Boland and Black, 2012] T. Boland and P. E. Black. Juliet 1.1 c/c++ and java test suite. Computer, 45(10):88-90, Oct 2012.","title":"Juliet 1.1 c/c++ and java test suite","authors":"T Boland, P E Black","year":"2012","venue":"Computer","doi":null,"url":null,"internal_url":null},{"position":5,"raw":"[Cousot and Cousot, 1977] Patrick Cousot and Radhia Cousot. Ab- stract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Pro- ceedings of the 4th ACM SIGACT-SIGPLAN symposium on Prin- ciples of programming languages, pages 238-252. ACM, 1977.","title":"Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints","authors":"Cousot Cousot, Patrick Cousot, Radhia Cousot","year":"1977","venue":"Proceedings of the 4th ACM SIGACT-SIGPLAN symposium on Principles of programming languages","doi":null,"url":null,"internal_url":null},{"position":6,"raw":"[Dong and Lapata, 2016] Li Dong and Mirella Lapata. Language to logical form with neural attention. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (ACL 2016), 2016.","title":"Language to logical form with neural attention","authors":"Li Dong, Mirella Lapata","year":"2016","venue":"Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (ACL 2016)","doi":null,"url":null,"internal_url":null},{"position":7,"raw":"[Graves et al., 2014] Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. CoRR, abs/1410.5401, 2014.","title":"Neural turing machines","authors":"Alex Graves, Greg Wayne, Ivo Danihelka","year":"2014","venue":null,"doi":null,"url":null,"internal_url":null},{"position":8,"raw":"[Gu et al., 2016] Xiaodong Gu, Hongyu Zhang, Dongmei Zhang, and Sunghun Kim. Deep api learning. In Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2016), pages 631-642. ACM, 2016.","title":"Deep api learning","authors":"Xiaodong Gu, Hongyu Zhang, Dongmei Zhang, Sunghun Kim","year":"2016","venue":"Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2016)","doi":null,"url":null,"internal_url":null},{"position":9,"raw":"[Gupta et al., 2016] Rahul Gupta, Soham Pal, Aditya Kanade, and Shirish Shevade. Deepfix : Fixing common programming errors by deep learning. In 31st AAAI Conference on Artificial Intelli- gence (AAAI 2017), number Traver, 2016.","title":"Deepfix : Fixing common programming errors by deep learning","authors":"Rahul Gupta, Soham Pal, Aditya Kanade, Shirish Shevade","year":"2016","venue":"31st AAAI Conference on Artificial Intelligence (AAAI 2017)","doi":null,"url":null,"internal_url":null},{"position":10,"raw":"[Henaff et al., 2016] Mikael Henaff, Jason Weston, Arthur Szlam, Antoine Bordes, and Yann LeCun. Tracking the world state with recurrent entity networks. In 5th International Conference on Learning Representations (ICLR 2017), 2016.","title":"Tracking the world state with recurrent entity networks","authors":"Mikael Henaff, Jason Weston, Arthur Szlam, Antoine Bordes, Yann Lecun","year":"2016","venue":"5th International Conference on Learning Representations","doi":null,"url":null,"internal_url":null},{"position":11,"raw":"[Huo et al., 2016] Xuan Huo, Ming Li, and Zhi-hua Zhou. Learn- ing unified features from natural and programming languages for locating buggy source code. In Proceedings of the 25th Interna- tional Joint Conference on Artificial Intelligence (IJCAI 2016), pages 1606-1612, 2016.","title":"Learning unified features from natural and programming languages for locating buggy source code","authors":"Xuan Huo, Ming Li, Zhi-Hua Zhou","year":"2016","venue":"Proceedings of the 25th International Joint Conference on Artificial Intelligence (IJCAI 2016)","doi":null,"url":null,"internal_url":"/proceedings/2016/230"},{"position":12,"raw":"[Karpathy et al., 2015] Andrej Karpathy, Justin Johnson, and Li Fei-Fei. Visualizing and understanding recurrent networks. volume abs/1506.02078, 2015.","title":"Visualizing and understanding recurrent networks","authors":"Andrej Karpathy, Justin Johnson, Li Fei-Fei","year":"2015","venue":null,"doi":null,"url":null,"internal_url":null},{"position":13,"raw":"[Kim, 2014] Yoon Kim. Convolutional neural networks for sen- tence classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP 2014), pages 1746-1751, 2014.","title":"Convolutional neural networks for sentence classification","authors":"Yoon Kim","year":"2014","venue":"Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP 2014)","doi":null,"url":null,"internal_url":null},{"position":14,"raw":"[Kingma and Ba, 2014] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014.","title":"Adam: A method for stochastic optimization","authors":"P Diederik, Jimmy Kingma, Ba","year":"2014","venue":null,"doi":null,"url":null,"internal_url":null},{"position":15,"raw":"[Kumar et al., 2016] Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. In Proceed- ings of The 33rd International Conference on Machine Learning (ICML 2016), pages 1378-1387, 2016.","title":"Ask me anything: Dynamic memory networks for natural language processing","authors":"Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, Richard Socher","year":"2016","venue":"Proceedings of The 33rd International Conference on Machine Learning (ICML 2016)","doi":null,"url":null,"internal_url":null},{"position":16,"raw":"[Lam et al., 2015] An Ngoc Lam, Anh Tuan Nguyen, Hoan Anh Nguyen, and Tien N. Nguyen. Combining deep learning with information retrieval to localize buggy files for bug reports. In Proceedings -2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE 2015), pages 476-481. IEEE, 2015.","title":"Combining deep learning with information retrieval to localize buggy files for bug reports","authors":"Lam","year":"2015","venue":"Proceedings -2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE 2015)","doi":null,"url":null,"internal_url":null},{"position":17,"raw":"[Miller et al., 2016] Alexander H. Miller, Adam Fisch, Jesse Dodge, Amir-Hossein Karimi, Antoine Bordes, and Jason We- ston. Key-value memory networks for directly reading docu- ments. CoRR, abs/1606.03126, 2016.","title":"Key-value memory networks for directly reading documents","authors":"Alexander H Miller, Adam Fisch, Jesse Dodge, Amir-Hossein, Antoine Karimi, Jason Bordes, Weston","year":"2016","venue":null,"doi":null,"url":null,"internal_url":null},{"position":18,"raw":"[Nori and Sharma, 2013] Aditya V Nori and Rahul Sharma. Termi- nation proofs from tests. In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering, pages 246- 256. ACM, 2013.","title":"Termination proofs from tests","authors":"V Aditya, Rahul Nori, Sharma","year":"2013","venue":"Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering","doi":null,"url":null,"internal_url":null},{"position":19,"raw":"[Pu et al., 2016] Yewen Pu, Karthik Narasimhan, Armando Solar- Lezama, and Regina Barzilay. sk-p: A neural program correc- tor for moocs. In Companion Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity (SPLASH 2016), pages 39-40, New York, New York, USA, 2016. ACM Press.","title":"sk-p: A neural program corrector for moocs","authors":"Pu","year":"2016","venue":"Companion Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity (SPLASH 2016)","doi":null,"url":null,"internal_url":null},{"position":20,"raw":"[Sankaranarayanan et al., 2008a] Sriram Sankaranarayanan, Swarat Chaudhuri, Franjo Ivančić, and Aarti Gupta. Dynamic inference of likely data preconditions over predicates by tree learning. In Proceedings of the 2008 international symposium on Software testing and analysis, pages 295-306. ACM, 2008.","title":"Dynamic inference of likely data preconditions over predicates by tree learning","authors":"Sankaranarayanan","year":"2008","venue":"Proceedings of the 2008 international symposium on Software testing and analysis","doi":null,"url":null,"internal_url":null},{"position":21,"raw":"[Sankaranarayanan et al., 2008b] Sriram Sankaranarayanan, Franjo Ivančić, and Aarti Gupta. Mining library specifications using inductive logic programming. In Proceedings of the 30th international conference on Software engineering, pages 131-140. ACM, 2008.","title":"Mining library specifications using inductive logic programming","authors":"Sankaranarayanan","year":"2008","venue":"Proceedings of the 30th international conference on Software engineering","doi":null,"url":null,"internal_url":null},{"position":22,"raw":"[Sharma et al., 2012] Rahul Sharma, Aditya V Nori, and Alex Aiken. Interpolants as classifiers. In International Conference on Computer Aided Verification, pages 71-87. Springer, 2012.","title":"Interpolants as classifiers","authors":"Rahul Sharma, Aditya V Nori, Alex Aiken","year":"2012","venue":"International Conference on Computer Aided Verification","doi":null,"url":null,"internal_url":null},{"position":23,"raw":"[Sharma et al., 2013a] Rahul Sharma, Saurabh Gupta, Bharath Har- iharan, Alex Aiken, Percy Liang, and Aditya V Nori. A data driven approach for algebraic loop invariants. In European Sym- posium on Programming, pages 574-592. Springer, 2013.","title":"A data driven approach for algebraic loop invariants","authors":"Sharma","year":"2013","venue":"European Symposium on Programming","doi":null,"url":null,"internal_url":null},{"position":24,"raw":"[Sharma et al., 2013b] Rahul Sharma, Saurabh Gupta, Bharath Hariharan, Alex Aiken, and Aditya V Nori. Verification as learn- ing geometric concepts. In International Static Analysis Sympo- sium, pages 388-411. Springer, 2013.","title":"Verification as learning geometric concepts","authors":"Sharma","year":"2013","venue":"International Static Analysis Symposium","doi":null,"url":null,"internal_url":null},{"position":25,"raw":"[Socher et al., 2013] Richard Socher, Alex Perelygin, and Jy Wu. Recursive deep models for semantic compositionality over a sen- timent treebank. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing (EMNLP 2013), pages 1631-1642, 2013.","title":"Recursive deep models for semantic compositionality over a sentiment treebank","authors":"Richard Socher, Alex Perelygin, Jy Wu","year":"2013","venue":"Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing (EMNLP 2013)","doi":null,"url":null,"internal_url":null},{"position":26,"raw":"[Sukhbaatar et al., 2015] Sainbayar Sukhbaatar, Arthur Szlam, Ja- son Weston, and Rob Fergus. End-to-end memory networks. In Advances in Neural Information Processing Systems 28 (NIPS 2015), pages 2440-2448, 2015.","title":"End-to-end memory networks","authors":"Sukhbaatar","year":"2015","venue":"Advances in Neural Information Processing Systems 28 (NIPS 2015)","doi":null,"url":null,"internal_url":null},{"position":27,"raw":"[Sutskever et al., 2014] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence-to-sequence learning with neural networks. In Advances in Neural Information Processing Systems 27 (NIPS 2014), pages 3104-3112, 2014.","title":"Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence-to-sequence learning with neural networks","authors":"Sutskever","year":"2014","venue":"Advances in Neural Information Processing Systems","doi":null,"url":null,"internal_url":null},{"position":28,"raw":"[Weston et al., 2015a] Jason Weston, Antoine Bordes, Sumit Chopra, and Tomas Mikolov. Towards ai-complete question an- swering: A set of prerequisite toy tasks. CoRR, abs/1502.05698, 2015.","title":"Towards ai-complete question answering: A set of prerequisite toy tasks","authors":"Weston","year":"2015","venue":null,"doi":null,"url":null,"internal_url":null},{"position":29,"raw":"[Weston et al., 2015b] Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In 3rd International Conference on Learning Representations (ICLR 2015), 2015.","title":"Memory networks","authors":"Weston","year":"2015","venue":"3rd International Conference on Learning Representations (ICLR 2015)","doi":null,"url":null,"internal_url":null},{"position":30,"raw":"[White et al., 2015] Martin White, Christopher Vendome, Mario Linares-Vásquez, and Denys Poshyvanyk. Toward deep learn- ing software repositories. In 12th Working Conference on Mining Software Repositories (MSR 2015), pages 334-345. IEEE, 2015.","title":"Toward deep learning software repositories","authors":"Martin White, Christopher Vendome, Mario Linares-Vásquez, Denys Poshyvanyk","year":"2015","venue":"12th Working Conference on Mining Software Repositories (MSR 2015)","doi":null,"url":null,"internal_url":null}],"license_note":"Copyright International Joint Conferences on Artificial Intelligence."}