Generating Generic Functions
Room: BBL room 471
(joint work with Alexey Rodriguez and Gideon Smeding)
Title: Generating Generic Functions
We present an approach to the generation of generic functions from
user-provided specifications. The specifications consist of the type
of a generic function, examples of instances that it should ``match''
when specialized, and properties that the generic function should
We use the type-based function generator Djinn to generate terms for
specializations of the generic function types on the type indices of
generic functions. Then we use QuickCheck?
to prune the generated
terms by testing against properties, and by testing specialized
functions against the provided examples. Using this approach we have
been able to generate generic equality, map, and zip functions,