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 条
  • [41] Assisted Declarative Process Creation from Natural Language Descriptions
    Lopez, Hugo A.
    Marquard, Morten
    Muttenthaler, Lukas
    Stromsted, Rasmus
    2019 IEEE 23RD INTERNATIONAL ENTERPRISE DISTRIBUTED OBJECT COMPUTING WORKSHOP (EDOCW 2019), 2019, : 96 - 99
  • [42] DataFinder: Scientific Dataset Recommendation from Natural Language Descriptions
    Viswanathan, Vijay
    Gao, Luyu
    Wu, Tongshuang
    Liu, Pengfei
    Neubig, Graham
    PROCEEDINGS OF THE 61ST ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2023): LONG PAPERS, VOL 1, 2023, : 10288 - 10303
  • [43] From Natural Language Descriptions in Clinical Guidelines to Relationships in an Ontology
    Taboada, Maria
    Meizoso, Maria
    Riano, David
    Alonso, Albert
    Martinez, Diego
    KNOWLEDGE REPRESENTATION FOR HEALTH-CARE: DATA, PROCESSES AND GUIDELINES, 2010, 5943 : 26 - +
  • [44] Visualizing Natural Language Descriptions: A Survey
    Hassani, Kaveh
    Lee, Won-Sook
    ACM COMPUTING SURVEYS, 2016, 49 (01)
  • [45] Generating Customizable Natural Language Descriptions
    Costa, A.
    Paraboni, I
    IEEE LATIN AMERICA TRANSACTIONS, 2019, 17 (08) : 1252 - 1258
  • [46] NATURAL-LANGUAGE DESCRIPTIONS OF PROCEDURES
    OLSON, GM
    TRAHAN, M
    ROSHWALB, L
    EATON, M
    BULLETIN OF THE PSYCHONOMIC SOCIETY, 1983, 21 (05) : 353 - 353
  • [47] Automatically Generating API Usage Patterns from Natural Language Queries
    Tian, Yanfei
    Wang, Xu
    Sun, Hailong
    Zhao, Yi
    Guo, Chunbo
    Liu, Xudong
    2018 25TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2018), 2018, : 59 - 68
  • [48] Learning to Extract API Mentions from Informal Natural Language Discussions
    Ye, Deheng
    Xing, Zhenchang
    Foo, Chee Yong
    Li, Jing
    Kapre, Nachiket
    32ND IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2016), 2016, : 389 - 399
  • [49] A derivation strategy for formal specifications from natural language requirements models
    Mauco, Maria Virginia
    Leonardi, Maria Carmen
    COMPUTING AND INFORMATICS, 2007, 26 (04) : 421 - 445
  • [50] Towards Automatic Composition of ASP Programs from Natural Language Specifications
    Santana, Manuel Borroto
    Kareem, Irfan
    Ricca, Francesco
    PROCEEDINGS OF THE THIRTY-THIRD INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, IJCAI 2024, 2024, : 6198 - 6206