skip to main content
research-article

Déjà Fu: a concurrency testing library for Haskell

Published:30 August 2015Publication History
Skip Abstract Section

Abstract

Systematic concurrency testing (SCT) is an approach to testing potentially nondeterministic concurrent programs. SCT avoids potentially unrepeatable results that may arise from unit testing concurrent programs. It seems to have received little attention from Haskell programmers. This paper introduces a generalisation of Haskell's concurrency abstraction in the form of typeclasses, and a library for testing concurrent programs. A number of examples are provided, some of which come from pre-existing packages.

References

  1. Parallel and Concurrent Programming in Haskell (online version, part of Atlas beta), 2014. URL https://www.reddit.com/ r/haskell/comments/1iwr7x/parallel_and_concurrent_ programming_in_haskell/cb8x76p.Google ScholarGoogle Scholar
  2. Ankuzik. Haskell. Testing a Multithreaded Application, 2014. URL http://kukuruku.co/hub/haskell/ haskell-testing-a-multithread-application.Google ScholarGoogle Scholar
  3. K. Claessen, M. Palka, N. Smallbone, J. Hughes, H. Svensson, T. Arts, and U. Wiger. Finding race conditions in Erlang with QuickCheck and PULSE. In Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, ICFP ’09, pages 149–160. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Emmi, S. Qadeer, and Z. Rakamari´c. Delay-bounded Scheduling. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’11, pages 411–422. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Epstein, A. P. Black, and S. Peyton-Jones. Towards Haskell in the cloud. In Proceedings of the 4th ACM Symposium on Haskell, Haskell ’11, pages 118–129. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Flanagan and P. Godefroid. Dynamic partial-order reduction for model checking software. In Proceedings of the 32nd ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, POPL ’05, pages 110–121. ACM, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. GHC Base Libraries. Data.IORef, 2015. URL https: //hackage.haskell.org/package/base-4.7.0.2/docs/ Data-IORef.html#g:2.Google ScholarGoogle Scholar
  8. D. Jones Jr, S. Marlow, and S. Singh. Parallel performance tuning for Haskell. In Proceedings of the 2nd ACM SIGPLAN symposium on Haskell, pages 81–92. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. L. Kuper, A. Todd, S. Tobin-Hochstadt, and R. R. Newton. Taming the parallel effect zoo: Extensible deterministic parallelism with LVish. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 2–14. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. Marlow. Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming. O’Reilly Media, 2013. ISBN 9781449335922.Google ScholarGoogle Scholar
  11. S. Marlow, P. Maier, H.-W. Loidl, M. K. Aswad, and P. Trinder. Seq No More: Better Strategies for Parallel Haskell. In Proceedings of the Third ACM Haskell Symposium on Haskell, Haskell ’10, pages 91– 102. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. Marlow, R. Newton, and S. Peyton Jones. A Monad for Deterministic Parallelism. In Proceedings of the 4th ACM Symposium on Haskell, Haskell ’11, pages 71–82. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Musuvathi and S. Qadeer. Iterative Context Bounding for Systematic Testing of Multithreaded Programs. In Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’07, pages 446–455. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. E. Scholz. A Concurrency Monad Based on Constructor Primitives, or, Being First-Class is Not Enough. Freie Univ., Fachbereich Mathematik, 1995.Google ScholarGoogle Scholar
  15. M. Snoyman. Announcing auto-update, 2014. URL http://www. yesodweb.com/blog/2014/08/announcing-auto-update.Google ScholarGoogle Scholar
  16. P. Thomson, A. F. Donaldson, and A. Betts. Concurrency Testing Using Schedule Bounding: an Empirical Study. In Proceedings of the 19th ACM SIGPLAN symposium on Principles and practice of parallel programming, pages 15–28. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. Yu, S. Narayanasamy, C. Pereira, and G. Pokam. Maple: A Coverage-driven Testing Tool for Multithreaded Programs. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA ’12, pages 485–502. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Déjà Fu: a concurrency testing library for Haskell

    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

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!