quickspec
Version 2 revision 1 uploaded by NickSmallbone.
Package meta
- Synopsis
- Equational laws for free!
- Description
QuickSpec takes your Haskell code and, as if by magic, discovers laws about it. You give QuickSpec a collection of Haskell functions; QuickSpec tests your functions with QuickCheck and prints out laws which seem to hold.
For example, give QuickSpec the functions
reverse
,++
and[]
, and it will find six laws:reverse [] == [] xs ++ [] == xs [] ++ xs == xs reverse (reverse xs) == xs (xs ++ ys) ++ zs == xs ++ (ys ++ zs) reverse xs ++ reverse ys == reverse (ys ++ xs)
QuickSpec can find equational laws as well as conditional equations. All you need to supply are the functions to test, as well as
Ord
andArbitrary
instances for QuickSpec to use in testing; the rest is automatic.For information on how to use QuickSpec, see the documentation in the main module, QuickSpec. You can also look in the
examples
directory, for example atLists.hs
,IntSet.hs
, orParsing.hs
. To read about how QuickSpec works, see our paper, Quick specifications for the busy programmer.- Author
- Nick Smallbone
- Bug reports
- n/a
- Category
- Testing
- Copyright
- 2009-2018 Nick Smallbone
- Homepage
- https://github.com/nick8325/quickspec
- Maintainer
- nicsma@chalmers.se
- Package URL
- n/a
- Stability
- n/a