• DocumentCode
    1996605
  • Title

    Inferring Specifications of Object Oriented APIs from API Source Code

  • Author

    Zhong, Hao ; Zhang, Lu ; Mei, Hong

  • Author_Institution
    Sch. of EECS, Peking Univ., Peking, China
  • fYear
    2008
  • fDate
    3-5 Dec. 2008
  • Firstpage
    221
  • Lastpage
    228
  • Abstract
    API libraries are becoming increasingly popular in modern software industries because these libraries provide various methods and classes for reuse. However, as pointed out by researchers, libraries are typically difficult to use. It is desirable to infer some specifications for libraries so that programmers can learn the correct usages of these libraries. In this paper, we propose an approach to infer specifications from source code of API libraries. Our approach is based on the observation that rules in object-oriented programs can be traced from basic constraints such as memory usage, file usage, and network protocol. In addition, rules of one class spread to its dependent classes through the features of object-oriented programs such as derivation, invocation relationship, and field access among methods. Based on our approach, we implemented a prototype named Java Rule Finder (JRF) to infer specifications from source code of API libraries in Java. We conducted four case studies using JRF. The result shows that JRF infers some rules correctly. We further conducted an experiment on three open source API libraries. The results show that JRF scales well with real API libraries.
  • Keywords
    DP industry; Java; application program interfaces; formal specification; object-oriented programming; software libraries; API libraries; API source code; Java Rule Finder; infer specifications; object oriented APIs; object-oriented programs; software industries; Access protocols; Computer industry; Educational technology; Java; Laboratories; Memory management; Programming profession; Prototypes; Software engineering; Software libraries;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Engineering Conference, 2008. APSEC '08. 15th Asia-Pacific
  • Conference_Location
    Beijing
  • ISSN
    1530-1362
  • Print_ISBN
    978-0-7695-3446-6
  • Type

    conf

  • DOI
    10.1109/APSEC.2008.54
  • Filename
    4724551