Testing Polymorphic Properties

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

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

Part of the Lecture Notes in Computer Science book series (LNCS, volume 6012)
Cite this paper as:
Bernardy JP., Jansson P., Claessen K. (2010) Testing Polymorphic Properties. In: Gordon A.D. (eds) Programming Languages and Systems. ESOP 2010. Lecture Notes in Computer Science, vol 6012. Springer, Berlin, Heidelberg

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

polymorphism parametricity initiality testing 
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 

Personalised recommendations