European Symposium on Programming

ESOP 2010: Programming Languages and Systems pp 125-144

Testing Polymorphic Properties

  • Jean-Philippe Bernardy
  • Patrik Jansson
  • Koen Claessen
Conference paper

DOI: 10.1007/978-3-642-11957-6_8

Volume 6012 of the book series Lecture Notes in Computer Science (LNCS)

Abstract

This paper is concerned with testing properties of polymorphic functions. The problem is that testing can only be performed on specific monomorphic instances, whereas parametrically polymorphic functions are expected to work for any type. We present a schema for constructing a monomorphic instance for a polymorphic property, such that correctness of that single instance implies correctness for all other instances. We also give a formal definition of the class of polymorphic properties the schema can be used for. Compared to the standard method of testing such properties, our schema leads to a significant reduction of necessary test cases.

Keywords

polymorphismparametricityinitialitytesting
Download to read the full conference paper text

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Jean-Philippe Bernardy
    • 1
  • Patrik Jansson
    • 1
  • Koen Claessen
    • 1
  1. 1.Chalmers University of Technology