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
来源
2012 34TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE) | 2012年
基金
美国国家科学基金会;
关键词
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 条
  • [21] Extracting Design Information from Natural Language Specifications
    Harris, Ian G.
    2012 49TH ACM/EDAC/IEEE DESIGN AUTOMATION CONFERENCE (DAC), 2012, : 1252 - 1253
  • [22] Automated Assertion Generation from Natural Language Specifications
    Frederiksen, Steven J.
    Aromando, John
    Hsiao, Michael S.
    2020 IEEE INTERNATIONAL TEST CONFERENCE (ITC), 2020,
  • [23] From formal specifications to natural language: A case study
    Punshon, JM
    Tremblay, JP
    Sorenson, PG
    Findeisen, PS
    AUTOMATED SOFTWARE ENGINEERING, 12TH IEEE INTERNATIONAL CONFERENCE, PROCEEDINGS, 1997, : 309 - 310
  • [24] Generating Parametric BRDFs from Natural Language Descriptions
    Memery, Sean
    Cedron, Osmar
    Subr, Kartic
    COMPUTER GRAPHICS FORUM, 2023, 42 (07)
  • [25] Discovering API Directives from API Specifications with Text Classification
    Jing-Xuan Zhang
    Chuan-Qi Tao
    Zhi-Qiu Huang
    Xin Chen
    Journal of Computer Science and Technology, 2021, 36 : 922 - 943
  • [26] Discovering API Directives from API Specifications with Text Classification
    Zhang, Jing-Xuan
    Tao, Chuan-Qi
    Huang, Zhi-Qiu
    Chen, Xin
    JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY, 2021, 36 (04) : 922 - 943
  • [27] Generating Natural Language specifications from UML class diagrams
    Farid Meziane
    Nikos Athanasakis
    Sophia Ananiadou
    Requirements Engineering, 2008, 13 : 1 - 18
  • [28] From Natural Language Software Specifications to UML Class Models
    Bajwa, Imran Sarwar
    Choudhary, M. Abbas
    ENTERPRISE INFORMATION SYSTEMS, ICEIS 2011, 2012, 102 : 224 - 237
  • [29] Interactive Synthesis of Temporal Specifications from Examples and Natural Language
    Gavran, Ivan
    Darulova, Eva
    Majumdar, Rupak
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (04):
  • [30] Natural SQL: Making SQL Easier to Infer from Natural Language Specifications
    Gan, Yujian
    Chen, Xinyun
    Xie, Jinxia
    Purver, Matthew
    Woodward, John R.
    Drake, John
    Zhang, Qiaofu
    FINDINGS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, EMNLP 2021, 2021, : 2030 - 2042