skip to main content
10.1145/2790449.2790519acmotherconferencesArticle/Chapter ViewAbstractPublication PagesppdpConference Proceedingsconference-collections
research-article

Concolic testing for functional languages

Published:14 July 2015Publication History

ABSTRACT

Concolic testing is a software testing technique combining concrete execution of a program (given specific input, along specific paths) with symbolic execution (generating new test inputs that give better path coverage than random test case generation). Concolic testing has so far been applied, mainly at the level of bytecode or assembly code, to programs written in imperative languages that manipulate primitive data types such as integers and arrays. In this paper, we demonstrate its application to a functional programming language core, a subset of the core language of Erlang, that supports pattern matching, structured recursive data types such as lists, recursion and higher-order functions. Moreover, we present CutEr, a tool implementing this testing technique. We describe CutEr's architecture, the challenges that need to be addressed by such a tool, its current limitations, and report some experiences from its use.

References

  1. J. Armstrong. Erlang. Commun. ACM, 53(9):68--75, 2010. DOI: 10.1145/1810891.1810910. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. C. Barrett, A. Stump, and C. Tinelli. The SMT-LIB Standard: Version 2.0. In A. Gupta and D. Kroening, editors, Proceedings of the 8th International Workshop on Satisfiability Modulo Theories, 2010.Google ScholarGoogle Scholar
  3. C. Cadar, D. Dunbar, and D. Engler. KLEE: Unassisted and automatic generation of high-coverage tests for complex systems programs. In Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation, pages 209--224, Berkeley, CA, USA, 2008. USENIX Association. URL: http://dl.acm.org/citation.cfm?id=1855741.1855756. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. R. Carlsson and M. Rémond. EUnit: A lightweight unit testing framework for Erlang. In Proceedings of the 2006 ACM SIGPLAN Workshop on Erlang, pages 1--1, New York, NY, USA, 2006. ACM. ISBN 1-59593-490-1. DOI: 10.1145/1159789.1159791. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. R. Carlsson, T. Lindgren, B. Gustavsson, S.-O. Nyström, R. Virding, E. Johansson, and M. Pettersson. Core Erlang 1.0.3 language specification. Technical report, Uppsala University, Nov. 2004. URL: https://www.it.uu.se/research/group/hipe/cerl/doc/core_erlang-1.0.3.pdf.Google ScholarGoogle Scholar
  6. K. Claessen and J. Hughes. QuickCheck: A lightweight tool for random testing of haskell programs. In Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming, pages 268--279, New York, NY, USA, 2000. ACM. DOI: 10.1145/351240.351266. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. L. De Moura and N. Bjørner. Z3: An efficient SMT solver. In Proceedings of the Theory and Practice of Software, 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 337--340, Berlin, Heidelberg, 2008. Springer-Verlag. DOI: 10.1007/978-3-540-78800-3_24. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Godefroid, N. Klarlund, and K. Sen. DART: directed automated random testing. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 213--223. ACM Press, June 2005. DOI: 10.1145/1065010.1065036. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. P. Godefroid, M. Y. Levin, and D. Molnar. SAGE: Whitebox fuzzing for security testing. Commun. ACM, 55(3):40--44, Mar. 2012. DOI: 10.1145/2093548.2093564. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. E. Larson and T. Austin. High coverage detection of input-related security faults. In Proceedings of the 12th USENIX Security Symposium. USENIX Association, Aug. 2003. URL: http://dl.acm.org/citation.cfm?id=1251353.1251362. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. T. Lindahl and K. Sagonas. TypEr: A type annotator of Erlang code. In Proceedings of the 2005 ACM SIGPLAN Workshop on Erlang, pages 17--25, New York, NY, USA, 2005. ACM. DOI: 10.1145/1088361.1088366. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. T. Lindahl and K. Sagonas. Practical type inference based on success typings. In Proceedings of the 8th ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming, pages 167--178, New York, NY, USA, 2006. ACM Press. DOI: 10.1145/1140335.1140356. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Papadakis and K. Sagonas. A PropEr integration of types and function specifications with property-based testing. In Proceedings of the 10th ACM SIGPLAN Workshop on Erlang, pages 39--50, New York, NY, USA, 2011. ACM. DOI: 10.1145/2034654.2034663. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. N. Papaspyrou and K. Sagonas. On preserving term sharing in the Erlang virtual machine. In Proceedings of the Eleventh ACM SIGPLAN Workshop on Erlang Workshop, pages 11--20, New York, NY, USA, 2012. ACM. DOI: 10.1145/2364489.2364493. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. S. Păsăreanu, N. Rungta, and W. Visser. Symbolic execution with mixed concrete-symbolic solving. In Proceedings of the 2011 International Symposium on Software Testing and Analysis, pages 34--44, New York, NY, USA, 2011. ACM. DOI: 10.1145/2001420.2001425. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. QuviQ. Erlang QuickCheck. URL: http://www.quviq.com/products/erlang-quickcheck/.Google ScholarGoogle Scholar
  17. 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, New York, NY, USA, 2008. ACM. DOI: 10.1145/1411286.1411292. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. K. Sen, D. Marinov, and G. Agha. CUTE: A concolic unit testing engine for C. In Proceedings of the Fifth Joint Meeting of the European Software Engineering Conference and ACM SIGSOFT Symposium on the Foundations of Software Engineering, pages 263--272. ACM Press, 2005. DOI: 10.1145/1081706.1081750. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. G. Vidal. Concolic execution and test case generation in Prolog. In Proceedings of the 24th International Symposium on Logic-Based Program Synthesis and Transformation, volume 8981 of LNCS, pages 167--181. Springer, 2015. DOI: 10.1007/978-3-319-17822-6_10.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Concolic testing for functional languages

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Other conferences
        PPDP '15: Proceedings of the 17th International Symposium on Principles and Practice of Declarative Programming
        July 2015
        263 pages
        ISBN:9781450335164
        DOI:10.1145/2790449

        Copyright © 2015 ACM

        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].

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 14 July 2015

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate230of486submissions,47%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader