skip to main content
10.1145/1411273.1411275acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Testing Erlang data types with quviq quickcheck

Published: 27 September 2008 Publication History

Abstract

When creating software, data types are the basic bricks. Most of the time a programmer will use data types defined in library modules, therefore being tested by many users over many years. But sometimes, the appropriate data type is unavailable in the libraries and has to be constructed from scratch. In this way, new basic bricks are created, and potentially used in many products in the future. It pays off to test such data types thoroughly.
This paper presents a structured methodology to follow when testing data types using Quviq QuickCheck, a tool for random testing against specifications. The validation process will be explained carefully, from the convenience of defining a model for the datatype to be tested, to a strategy for better shrinking of failing test cases, and including the benefits of working with symbolic representations.
The leading example in this paper is a data type implemented for a risk management information system, a commercial product developed in Erlang, that has been used on a daily basis for several years.

Supplementary Material

JPG File (1411275.jpg)
index.html (index.html)
Slides from the presentation
Audio only (1411275.mp3)
Video (1411275.mp4)

References

[1]
ARMISTICE. http://www.madsgroup.org/armistice/, 2002.
[2]
David Cabrero, Carlos Abalde, Carlos Varela, and Laura M. Castro. Armistice: An experience developing management software with erlang. In Principles, Logics, and Implementations of High-Level Programming Languages, Uppsala, Sweden, August 2003.
[3]
Bruce Dawson. Comparing floating point numbers. http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm, 2008.
[4]
R.W. Floyd. Assigning meaning to programs. In Proc. of Symposia in Appl. Math. American Mathematical Society, 1967.
[5]
C. A. R. Hoare. Proof of correctness of data representations. Acta Informatica 1, 271--281, 1972.
[6]
IEEE. Standard for binary floating-point arithmetic. http://grouper.ieee.org/groups/754/, 1985.
[7]
Koen Claessen and John Hughes. Quickcheck: a lightweight tool for random testing of haskell programs. In ICFP, pages 268--279, 2000.
[8]
Quviq. http://www.quviq.com, 2008.
[9]
Thomas Arts, John Hughes, Joakim Johansson, and Ulf Wiger. Testing telecoms software with quviq quickcheck. In ERLANG '06: Proceedings of the 2006 ACM SIGPLAN workshop on Erlang, New York, NY, USA, 2006. ACM Press.
[10]
Victor M. Gulías, Carlos Abalde, Laura M. Castro, and Carlos Varela. A new risk management approach deployed over a client/server distributed functional architecture. In 18th International Conference on Systems Engineering, pages 370--375, University of Nevada, Las Vegas (USA), August 2005. IEEE Computer Society. http://www.icseng.info.
[11]
Victor M. Gulías, Carlos Abalde, Laura M. Castro, and Carlos Varela. Formalisation of a functional risk management system. In 8th International Conference on Enterprise Information Systems, pages 516--519, Paphos (Cyprus), May 2006. INSTICC Press. http://www.iceis.org.

Cited By

View all
  • (2023)Generation and Refinement of Testing ModelsProceedings of the 22nd ACM SIGPLAN International Workshop on Erlang10.1145/3609022.3609415(14-23)Online publication date: 30-Aug-2023
  • (2023)Etna: An Evaluation Platform for Property-Based Testing (Experience Report)Proceedings of the ACM on Programming Languages10.1145/36078607:ICFP(878-894)Online publication date: 31-Aug-2023
  • (2022)Computing correctly with inductive relationsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523707(966-980)Online publication date: 9-Jun-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ERLANG '08: Proceedings of the 7th ACM SIGPLAN workshop on ERLANG
September 2008
96 pages
ISBN:9781605580654
DOI:10.1145/1411273
  • General Chair:
  • Tee Teoh,
  • Program Chair:
  • Zoltán Horváth
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: 27 September 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. datatypes
  2. erlang
  3. quickcheck

Qualifiers

  • Research-article

Conference

ICFP08
Sponsor:

Acceptance Rates

ERLANG '08 Paper Acceptance Rate 9 of 10 submissions, 90%;
Overall Acceptance Rate 51 of 68 submissions, 75%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)3
  • Downloads (Last 6 weeks)0
Reflects downloads up to 09 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Generation and Refinement of Testing ModelsProceedings of the 22nd ACM SIGPLAN International Workshop on Erlang10.1145/3609022.3609415(14-23)Online publication date: 30-Aug-2023
  • (2023)Etna: An Evaluation Platform for Property-Based Testing (Experience Report)Proceedings of the ACM on Programming Languages10.1145/36078607:ICFP(878-894)Online publication date: 31-Aug-2023
  • (2022)Computing correctly with inductive relationsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523707(966-980)Online publication date: 9-Jun-2022
  • (2020)Stack-Driven Program Generation of WebAssemblyProgramming Languages and Systems10.1007/978-3-030-64437-6_11(209-230)Online publication date: 24-Nov-2020
  • (2018)Compositional programming and testing of dynamic distributed systemsProceedings of the ACM on Programming Languages10.1145/32765292:OOPSLA(1-30)Online publication date: 24-Oct-2018
  • (2018)Reactive caching for composed services: polling at the speed of pushProceedings of the ACM on Programming Languages10.1145/32765222:OOPSLA(1-28)Online publication date: 24-Oct-2018
  • (2018)Your Apps Give You AwayProceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies10.1145/32649482:3(1-23)Online publication date: 18-Sep-2018
  • (2018)ParkLocProceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies10.1145/32649092:3(1-23)Online publication date: 18-Sep-2018
  • (2018)ID'emProceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies10.1145/32649072:3(1-28)Online publication date: 18-Sep-2018
  • (2018)Finding the Sweet Spot(s)Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies10.1145/31917612:1(1-17)Online publication date: 26-Mar-2018
  • Show More Cited By

View Options

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