C2S: Translating Natural Language Comments to Formal Program Specifications
Formal program specifications are essential for various software engineering tasks, such as program verification, program synthesis, code debugging and software testing. However, manually inferring formal program specifications is not only time-consuming but also error-prone. In addition, it requires substantial expertise. Natural language comments contain rich semantics about behaviors of code, making it feasible to infer program specifications from comments. Inspired by this, we develop a tool, named C2S, to automate the specification synthesis task by translating natural language comments into formal program specifications. Our approach firstly constructs alignments between natural language word and specification tokens from existing comments and their corresponding specifications. Then for a given method comment, our approach assembles tokens that are associated with words in the comment from the alignments into specifications guided by specification syntax and the context of the target method. Our tool successfully synthesizes 1,145 specifications for 511 methods of 64 classes in 5 different projects, substantially outperforming the state-of-the-art. The generated specifications are also used to improve a number of software engineering tasks like static taint analysis, which demonstrates the high quality of the specifications.
Tue 10 Nov Times are displayed in time zone: (UTC) Coordinated Universal Time change
01:00 - 01:30: Analysis 1Paper Presentations / Research Papers / Tool Demos / Visions and Reflections at Virtual room 2 | |||
01:00 - 01:02 Talk | A Behavioral Notion of Robustness for Software Systems Research Papers Changjian ZhangCarnegie Mellon University, USA, David GarlanCarnegie Mellon University, USA, Eunsuk KangCarnegie Mellon University, USA Link to publication DOI Media Attached | ||
01:03 - 01:04 Talk | C2S: Translating Natural Language Comments to Formal Program Specifications Research Papers Juan ZhaiRutgers University, USA, Yu ShiPurdue University, USA, Minxue PanNanjing University, China, Guian ZhouNanjing University, China, Yongxiang LiuNanjing University, China, Chunrong FangNanjing University, China, Shiqing MaRutgers University, USA, Lin TanPurdue University, USA, Xiangyu ZhangPurdue University DOI | ||
01:05 - 01:06 Talk | Detecting and Understanding JavaScript Global Identifier Conflicts on the Web Research Papers DOI | ||
01:07 - 01:08 Talk | PAClab: A Program Analysis Collaboratory Tool Demos Rebecca BrunnerBowling Green State University, USA, Robert DyerUniversity of Nebraska - Lincoln, Maria PaquinBoise State University, Elena ShermanBoise State University DOI | ||
01:09 - 01:10 Talk | Towards Learning Visual Semantics Visions and Reflections DOI | ||
01:11 - 01:12 Talk | WebJShrink: A Web Service for Debloating Java Bytecode Tool Demos Konner MaciasUniversity of California at Los Angeles, USA, Mihir MathurUniversity of California, Los Angeles, Bobby BruceUniversity of California at Davis, USA, Tianyi ZhangHarvard University, USA, Miryung KimUniversity of California at Los Angeles, USA DOI | ||
01:13 - 01:30 Talk | Conversations on Analysis 1 Research Papers Juan ZhaiRutgers University, USA, Changjian ZhangCarnegie Mellon University, USA, Konner MaciasUniversity of California at Los Angeles, USA, Haipeng CaiWashington State University, USA, Mingxue ZhangChinese University of Hong Kong, China, Robert DyerUniversity of Nebraska - Lincoln, M: Shin Hwei TanSouthern University of Science and Technology |