Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1596627.1596637acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Fast and sound random generation for automated testing and benchmarking in objective Caml

Published: 30 August 2009 Publication History
  • Get Citation Alerts
  • Abstract

    Numerous software testing methods involve random generation of data structures. However, random sampling methods currently in use by testing frameworks are not satisfactory: often manually written by the programmer or at best extracted in an ad-hoc way relying on no theoretical background. On the other end, random sampling methods with good theoretical properties exist but have a too high cost to be used in testing, in particular when large inputs are needed.
    In this paper we describe how we applied the recently developed Boltzmann model of random generation to algebraic data types. We obtain a fully automatic way to derive random generators from Objective Caml type definitions. These generators have linear complexity and, the generation method being uniform, can also be used as a sound sampling back-end for benchmarking tools.
    As a result, we provide testing and benchmarking frameworks with a sound and fast generation basis. We also provide a testing and benchmarking library, available for download, showing the viability of this experiment.

    References

    [1]
    M. Abbott, T. Altenkirch, N. Ghani, and C. McBride. Derivatives of containers. Lecture notes in computer science, pages 16--30, 2003.
    [2]
    F. Bergeron, G. Labelle, and P. Leroux. Combinatorial species and tree-like structures. Cambridge University Press, 1998.
    [3]
    Jacob Burnim, Sudeep Juvekar, and Koushik Sen. Wise: Automated test generation for worst-case complexity. In ICSE, pages 463--473, 2009.
    [4]
    Koen Claessen and John Hughes. Quickcheck: a lightweight tool for random testing of haskell programs. In ICFP '00: Proceedings of the fifth ACM SIGPLAN international conference on Functional programming, pages 268--279, New York, NY, USA, 2000. ACM. ISBN 1-58113-202-6. 10.1145/351240.351266.
    [5]
    A. Darrasse. Random XML sampling the Boltzmann way. ArXiv e-prints, 2008. URL http://arxiv.org/abs/0807.0992.
    [6]
    Philippe Duchon, Philippe Flajolet, Guy Louchard, and Gilles Schaeffer. Boltzmann samplers for the random generation of combinatorial structures. Combinatorics, Probability and Computing, 13: 577--625, 2004. 10.1017/S0963548304006315.
    [7]
    Sebastian Fischer and Herbert Kuchen. Data-flow testing of declarative programs. SIGPLAN Not., 43 (9): 201-212, 2008. ISSN 0362-1340. http://doi.acm.org/10.1145/1411203.1411233.
    [8]
    P. Flajolet, P. Zimmerman, and B. Van Cutsem. A calculus for the random generation of labelled combinatorial structures. Theoretical Computer Science, 132 (1-2): 1--35, 1994.
    [9]
    Philippe Flajolet and Robert Sedgewick. Analytic Combinatorics. Cambridge University Press, 2009.
    [10]
    t al.(2007)Henry, Mauny, and Chailloux}2007arXiv0705.1452HG. Henry, M. Mauny, and E. Chailloux. Typer la dé-sérialisation sans sérialiser les types. ArXiv e-prints, May 2007. URL http://arxiv.org/abs/0705.1452.
    [11]
    G. Huet. The zipper. phJournal of Functional Programming, 7 (05): 549--554, 1997.
    [12]
    Xavier Leroy, Didier Rémy with Damien Doligez, Jacques Garrigue, and Jérôme Vouillon. The objective caml system release 3.11 documentation and user's manual. Technical report, Inria, november 2008.
    [13]
    François Maurel. Ocaml-templates, méta-programmation à partir des types. In Actes des journées JFLA Journées francophones des langages applicatifs, pages 21--36, Sainte-Marie-de-Ré, France, January 2004. INRIA. URL http://hal.archives-ouvertes.fr/hal-00153820/en/.
    [14]
    Alix Mougenot, Alexis Darrasse, Xavier Blanc, and Michèle Soria. Uniform random generation of huge metamodel instances. In Fifth European Conference on Model-Driven Architecture Foundations and Applications, 2009.
    [15]
    Carine Pivoteau, Bruno Salvy, and Michèle Soria. Boltzmann oracle for combinatorial systems. In Fifth Colloquium on Mathematics and Computer Science Algorithms, Trees, Combinatorics and Probabilities, DMTCS Proceedings, pages 475--488, 2008.
    [16]
    C. Runciman, M. Naylor, and F. Lindblad. Smallcheck and lazy smallcheck: automatic exhaustive testing for small values. In Proceedings of the first ACM SIGPLAN symposium on Haskell, pages 37--48. ACM New York, NY, USA, 2008.
    [17]
    Koushik Sen, Darko Marinov, and Gul Agha. Cute: a concolic unit testing engine for c. In ESEC/FSE-13: Proceedings of the 10th European software engineering conference held jointly with 13th ACM SIGSOFT international symposium on Foundations of software engineering, pages 263--272, New York, NY, USA, 2005. ACM. ISBN 1-59593-014-0. http://doi.acm.org/10.1145/1081706.1081750.
    [18]
    Walid Taha. A gentle introduction to multi-stage programming, 2003. Available from http://www.cs.rice.edu/taha/publications/journal/dspg04a.pdf.

    Cited By

    View all
    • (2023)Uniform SAmplINg with BOLTZmann2023 25th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing (SYNASC)10.1109/SYNASC61333.2023.00020(94-97)Online publication date: 11-Sep-2023
    • (2014)Formulae and Asymptotics for Coefficients of Algebraic FunctionsCombinatorics, Probability and Computing10.1017/S096354831400072824:1(1-53)Online publication date: 11-Dec-2014
    • (2013)Finding test data with specific properties via metaheuristic search2013 IEEE 24th International Symposium on Software Reliability Engineering (ISSRE)10.1109/ISSRE.2013.6698888(350-359)Online publication date: Nov-2013
    • Show More Cited By

    Index Terms

    1. Fast and sound random generation for automated testing and benchmarking in objective Caml

        Recommendations

        Comments

        Information & Contributors

        Information

        Published In

        cover image ACM Conferences
        ML '09: Proceedings of the 2009 ACM SIGPLAN workshop on ML
        August 2009
        76 pages
        ISBN:9781605585093
        DOI:10.1145/1596627
        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 ACM 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: 30 August 2009

        Permissions

        Request permissions for this article.

        Check for updates

        Author Tags

        1. Boltzmann model
        2. algebraic data types
        3. random generation
        4. specification-based testing

        Qualifiers

        • Research-article

        Conference

        ICFP '09
        Sponsor:

        Acceptance Rates

        ML '09 Paper Acceptance Rate 6 of 11 submissions, 55%;
        Overall Acceptance Rate 6 of 11 submissions, 55%

        Upcoming Conference

        ICFP '24

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • Downloads (Last 12 months)4
        • Downloads (Last 6 weeks)3
        Reflects downloads up to 11 Aug 2024

        Other Metrics

        Citations

        Cited By

        View all
        • (2023)Uniform SAmplINg with BOLTZmann2023 25th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing (SYNASC)10.1109/SYNASC61333.2023.00020(94-97)Online publication date: 11-Sep-2023
        • (2014)Formulae and Asymptotics for Coefficients of Algebraic FunctionsCombinatorics, Probability and Computing10.1017/S096354831400072824:1(1-53)Online publication date: 11-Dec-2014
        • (2013)Finding test data with specific properties via metaheuristic search2013 IEEE 24th International Symposium on Software Reliability Engineering (ISSRE)10.1109/ISSRE.2013.6698888(350-359)Online publication date: Nov-2013
        • (2013)Detecting Ambiguity in Programming Language GrammarsSoftware Language Engineering10.1007/978-3-319-02654-1_9(157-176)Online publication date: 2013
        • (2010)Species and functors and types, oh my!ACM SIGPLAN Notices10.1145/2088456.186354245:11(147-158)Online publication date: 30-Sep-2010
        • (2010)Species and functors and types, oh my!Proceedings of the third ACM Haskell symposium on Haskell10.1145/1863523.1863542(147-158)Online publication date: 30-Sep-2010

        View Options

        Get Access

        Login options

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Media

        Figures

        Other

        Tables

        Share

        Share

        Share this Publication link

        Share on social media