• DocumentCode
    2442159
  • Title

    Inferring method specifications from natural language API descriptions

  • Author

    Pandita, Rahul ; Xiao, Xusheng ; Zhong, Hao ; Xie, Tao ; Oney, Stephen ; Paradkar, Amit

  • Author_Institution
    Dept. of Comput. Sci., North Carolina State Univ., Raleigh, NC, USA
  • fYear
    2012
  • fDate
    2-9 June 2012
  • Firstpage
    815
  • Lastpage
    825
  • Abstract
    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.
  • Keywords
    application program interfaces; document handling; formal specification; natural language processing; program verification; software libraries; software reusability; text analysis; application programming interface documents; formal specifications; inferring method specifications; natural language API descriptions; natural language text; software libraries reusability; software verification tools; tool-based verification; Accuracy; Contracts; Law; Libraries; Natural languages; Semantics;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Engineering (ICSE), 2012 34th International Conference on
  • Conference_Location
    Zurich
  • ISSN
    0270-5257
  • Print_ISBN
    978-1-4673-1066-6
  • Electronic_ISBN
    0270-5257
  • Type

    conf

  • DOI
    10.1109/ICSE.2012.6227137
  • Filename
    6227137