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 条
  • [31] Extracting goal models from natural language requirement specifications
    Das, Souvick
    Deb, Novarun
    Cortesi, Agostino
    Chaki, Nabendu
    JOURNAL OF SYSTEMS AND SOFTWARE, 2024, 211
  • [32] A formal approach for generating oo specifications from natural language
    Juristo, N
    Morant, JL
    Moreno, AM
    JOURNAL OF SYSTEMS AND SOFTWARE, 1999, 48 (02) : 139 - 153
  • [33] Generating natural language specifications from UML class diagrams
    Meziane, Farid
    Athanasakis, Nikos
    Ananiadou, Sophia
    REQUIREMENTS ENGINEERING, 2008, 13 (01) : 1 - 18
  • [34] Automatic Generation of Natural Language Parsers from Declarative Specifications
    Gomez-Rodriguez, Carlos
    Vilares, Jesus
    Alonso, Miguel A.
    STAIRS 2006, 2006, 142 : 259 - +
  • [35] Framer: Planning Models from Natural Language Action Descriptions
    Lindsay, Alan
    Read, Jonathon
    Ferreira, Joao F.
    Hayton, Thomas
    Porteous, Julie
    Gregory, Peter
    TWENTY-SEVENTH INTERNATIONAL CONFERENCE ON AUTOMATED PLANNING AND SCHEDULING, 2017, : 434 - 442
  • [36] Programming in Natural Language: Building Algorithms from Human Descriptions
    Wachtel, Alexander
    Eurich, Felix
    Tichy, Walter F.
    ACHI 2018: THE ELEVENTH INTERNATIONAL CONFERENCE ON ADVANCES IN COMPUTER-HUMAN INTERACTIONS, 2018, : 51 - 59
  • [37] Natural language descriptions of human Behavior from video sequences
    Tena, Carles Fernandez
    Baiget, Pau
    Roca, Xavier
    Gonzalez, Jordi
    KI 2007: ADVANCES IN ARTIFICIAL INTELLIGENCE, PROCEEDINGS, 2007, 4667 : 279 - +
  • [38] Generating Formal System Models from Natural Language Descriptions
    Drechsler, Rolf
    Harris, Ian G.
    Wille, Robert
    2012 IEEE INTERNATIONAL HIGH LEVEL DESIGN VALIDATION AND TEST WORKSHOP (HLDVT), 2012, : 164 - +
  • [39] Street-Level Geolocation From Natural Language Descriptions
    Blaylock, Nate
    Allen, James
    de Beaumont, William
    Galescu, Lucian
    Jung, Hyuckchul
    TRAITEMENT AUTOMATIQUE DES LANGUES, 2012, 53 (02): : 177 - 205
  • [40] Towards Object Descriptions in Natural Language from Qualitative Models
    Falomir, Zoe
    Museros, Lledo
    Rodenas, Pablo
    Sanz, Ismael
    ARTIFICIAL INTELLIGENCE RESEARCH AND DEVELOPMENT, 2012, 248 : 59 - 68