Testing Polymorphic Properties
Paper in proceeding, 2010

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.

polymorphism

parametricity

initiality

testing

Author

Jean-Philippe Bernardy

Chalmers, Computer Science and Engineering (Chalmers), Software Engineering and Technology (Chalmers)

Patrik Jansson

Chalmers, Computer Science and Engineering (Chalmers), Software Engineering and Technology (Chalmers)

Koen Lindström Claessen

Chalmers, Computer Science and Engineering (Chalmers), Software Engineering and Technology (Chalmers)

Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

03029743 (ISSN) 16113349 (eISSN)

Vol. 6012 125-144
978-3-642-11956-9 (ISBN)

Subject Categories

Software Engineering

Computer Science

DOI

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

ISBN

978-3-642-11956-9

More information

Latest update

1/25/2022