Inferring Method Specifications from Natural Language API Descriptions

被引:0
|
作者
Pandita, Rahul [1 ]
Xiao, Xusheng [1 ]
Zhong, Hao [2 ]
Xie, Tao [1 ]
Oney, Stephen [3 ]
Paradkar, Amit [4 ]
机构
[1] N Carolina State Univ, Dept Comp Sci, Raleigh, NC 27695 USA
[2] Chinese Acad Sci, Inst Software, Lab Internet Software Technol, Beijing, Peoples R China
[3] Carnegie Mellon Univ, Human Comp Interact Inst, Pittsburgh, PA USA
[4] IBM Corp, TJ Watson Res Ctr, Hawthorne, NY USA
基金
美国国家科学基金会;
关键词
DOCUMENTATION;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Application Programming Interface (API) documents are a typical way of describing legal usage of reusable software libraries, thus facilitating software reuse. However, even with such documents, developers often overlook some documents and build software systems that are inconsistent with the legal usage of those libraries. Existing software verification tools require formal specifications (such as code contracts), and therefore cannot directly verify the legal usage described in natural language text in API documents against code using that library. However, in practice, most libraries do not come with formal specifications, thus hindering tool-based verification. To address this issue, we propose a novel approach to infer formal specifications from natural language text of API documents. Our evaluation results show that our approach achieves an average of 92% precision and 93% recall in identifying sentences that describe code contracts from more than 2500 sentences of API documents. Furthermore, our results show that our approach has an average 83% accuracy in inferring specifications from over 1600 sentences describing code contracts.
引用
收藏
页码:815 / 825
页数:11
相关论文
共 50 条
  • [1] Inferring specifications for resources from natural language API documentation
    Zhong, Hao
    Zhang, Lu
    Xie, Tao
    Mei, Hong
    [J]. AUTOMATED SOFTWARE ENGINEERING, 2011, 18 (3-4) : 227 - 261
  • [2] Inferring specifications for resources from natural language API documentation
    Laboratory for Internet Software Technologies, Institute of Software, Chinese Academy of Sciences, Beijing, China
    不详
    不详
    不详
    [J]. Autom Software Eng, 3-4 (227-261):
  • [3] Inferring Resource Specifications from Natural Language API Documentation
    Zhong, Hao
    Zhang, Lu
    Xie, Tao
    Mei, Hong
    [J]. 2009 IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, PROCEEDINGS, 2009, : 307 - 318
  • [4] Inferring specifications for resources from natural language API documentation
    Hao Zhong
    Lu Zhang
    Tao Xie
    Hong Mei
    [J]. Automated Software Engineering, 2011, 18 : 227 - 261
  • [5] Inferring Service Recommendation from Natural Language API Descriptions
    Xiong, Wei
    Wu, Zhao
    Li, Bing
    Gu, Qiong
    Yuan, Lei
    Hang, Bo
    [J]. 2016 IEEE INTERNATIONAL CONFERENCE ON WEB SERVICES (ICWS), 2016, : 316 - 323
  • [6] ICON: Inferring Temporal Constraints from Natural Language API Descriptions
    Pandita, Rahul
    Taneja, Kunal
    Tung, Teresa
    Williams, Laurie
    [J]. 32ND IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2016), 2016, : 378 - 388
  • [7] RESTINFER: Automated Inferring Parameter Constraints from Natural Language RESTful API Descriptions
    Liu, Yi
    [J]. PROCEEDINGS OF THE 30TH ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2022, 2022, : 1816 - 1818
  • [8] Inferring Web API Descriptions From Usage Data
    Suter, Philippe
    Wittern, Erik
    [J]. 2015 THIRD IEEE WORKSHOP ON HOT TOPICS IN WEB SYSTEMS AND TECHNOLOGIES (HOTWEB), 2015, : 7 - 12
  • [9] Inferring Specifications of Object Oriented APIs from API Source Code
    Zhong, Hao
    Zhang, Lu
    Mei, Hong
    [J]. APSEC 2008:15TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, PROCEEDINGS, 2008, : 221 - 228
  • [10] Automating smart recommendation from natural language API descriptions via representation learning
    Xiong, Wei
    Lu, Zhihui
    Li, Bing
    Hang, Bo
    Wu, Zhao
    [J]. FUTURE GENERATION COMPUTER SYSTEMS-THE INTERNATIONAL JOURNAL OF ESCIENCE, 2018, 87 : 382 - 391