FP /

Testing Polymorphic Properties

Jean-Philippe Bernardy, Patrik Jansson and Koen Claessen

Accepted for ESOP 2010.

Paper

Abstract

This paper is concerned with testing properties of polymorphic functions. The problem is that testing can only be performed on specifi c 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 de finition 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 signifi cant reduction of necessary test cases.

Draft / preprint

Bibtex

@inproceedings{bernardy_testing_2010,
	author = {Jean-Philippe Bernardy and Patrik Jansson and Koen Claessen},
	affiliation = {Chalmers University of Technology},
	series = {Lecture Notes in Computer Science},
	title = {Testing Polymorphic Properties},
	editor = {Gordon, Andrew},
	volume = {6012},
	pages = {125--144},
	url = {http://www.cse.chalmers.se/~bernardy/PolyTest.pdf},
	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.},
	booktitle = {European Symposium on Programming},
	publisher = {Springer},
	year = {2010},
	keywords = {Programvaruteknik}
}