Testing polymorphic properties
JP Bernardy, P Jansson, K Claessen - … , ESOP 2010, Held as Part of the …, 2010 - Springer
JP Bernardy, P Jansson, K Claessen
Programming Languages and Systems: 19th European Symposium on Programming …, 2010•SpringerThis 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 …
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 …
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.
Springer