QuickCheck: a lightweight tool for random testing of Haskell programs
ICFP '00 Proceedings of the fifth ACM SIGPLAN international conference on Functional programming
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
Guarded recursive datatype constructors
POPL '03 Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Polytypic Downwards Accumulations
MPC '98 Proceedings of the Mathematics of Program Construction
Polytypic Values Possess Polykinded Types
MPC '00 Proceedings of the 5th International Conference on Mathematics of Program Construction
Dependency-style generic haskell
ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
First-order unification by structural recursion
Journal of Functional Programming
Simple unification-based type inference for GADTs
Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
MPC'06 Proceedings of the 8th international conference on Mathematics of Program Construction
Hi-index | 0.00 |
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 satisfy. 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 candidate functions against the provided examples. Using this approach we have been able to generate generic equality, map, and zip functions, for example.