skip to main content
10.1145/2851613.2851969acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
research-article

Automatic formal specification generation of APIs by mining unit tests

Published: 04 April 2016 Publication History

Abstract

Specification mining is a research field which combines the power of rigorous mathematical methods and data mining to automatically produce reliable formal specifications. In this article, we introduce MUTE to address the problem of generating a formal specification for API clients by using unit tests of the consumed library as the only input. We evaluate the proposed approach using the popular JDK 6 library and investigate how generated and handcrafted unit tests contribute to the learning process based on an extended framework developed to support automatic accuracy assessment. With precision values always above 83%, we demonstrate how both handcrafted and randomly generated unit tests can be harnessed to learn valid usage scenarios of an API.

References

[1]
G. Ammons, R. Bodík, and J. R. Larus. Mining specifications. ACM Sigplan Notices, 37(1):4--16, 2002.
[2]
C. Lee, F. Chen, and G. Roşu. Mining parametric specifications. In Proceedings of the 33rd International Conference on Software Engineering, pages 591--600. ACM, 2011.
[3]
C. Lee, D. Jin, P. O. Meredith, and G. Rosu. Towards categorizing and formalizing the jdk api. 2012.
[4]
C. Pacheco and M. D. Ernst. Randoop: feedbackdirected random testing for java. In Companion to the 22nd ACM SIGPLAN conference on Object-oriented programming systems and applications companion, pages 815--816. ACM, 2007.
[5]
M. Pradel and T. R. Gross. Leveraging test generation and specification mining for automated bug detection without false positives. In International Conference on Software Engineering (ICSE), 2012.
[6]
M. Pradel, P. Bichsel, and T. R. Gross. A framework for the evaluation of specification miners based on finite state machines. In International Conference on Software Maintenance (ICSM), 2010.
[7]
G. Reger, H. Barringer, and D. Rydeheard. A pattern-based approach to parametric specification mining. In Automated Software Engineering (ASE), 2013 IEEE/ACM 28th International Conference on, pages 658--663. IEEE, 2013.
[8]
Q. Wu, G. Liang, Q. Wang, T. Xie, and H. Mei. Iterative mining of resource-releasing specifications. In Automated Software Engineering (ASE), 2011 26th IEEE/ACM International Conference on, pages 233--242. IEEE, 2011.

Index Terms

  1. Automatic formal specification generation of APIs by mining unit tests

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    SAC '16: Proceedings of the 31st Annual ACM Symposium on Applied Computing
    April 2016
    2360 pages
    ISBN:9781450337397
    DOI:10.1145/2851613
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 04 April 2016

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. MUTE
    2. specification mining
    3. unit tests mining

    Qualifiers

    • Research-article

    Conference

    SAC 2016
    Sponsor:
    SAC 2016: Symposium on Applied Computing
    April 4 - 8, 2016
    Pisa, Italy

    Acceptance Rates

    SAC '16 Paper Acceptance Rate 252 of 1,047 submissions, 24%;
    Overall Acceptance Rate 1,650 of 6,669 submissions, 25%

    Upcoming Conference

    SAC '25
    The 40th ACM/SIGAPP Symposium on Applied Computing
    March 31 - April 4, 2025
    Catania , Italy

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 86
      Total Downloads
    • Downloads (Last 12 months)2
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 05 Mar 2025

    Other Metrics

    Citations

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media