target: Generate test-suites from refinement types.

[ library, mit, program, testing ] [ Propose Tags ] [ Report a vulnerability ]

Target is a library for testing Haskell functions based on properties encoded as refinement types.

The programmer specifies the expected behavior of a function with a refinement type, and Target then checks that the function satisfies the specification by enumerating valid inputs up to some size, calling the function, and validating the output. Target excels when the space of valid inputs is a sparse subset of all possible inputs, e.g. when dealing with dataypes with complex invariants like red-black trees.

Test.Target is the main entry point and should contain everything you need to use Target with types from the Prelude. Test.Target.Targetable will also be useful if you want to test functions that use other types.

For information on how to specify interesting properties with refinement types, we have a series of blog posts as well as an evolving tutorial. Target uses the same specification language as LiquidHaskell, so the examples should carry over.

Finally, Target requires either Z3 (>=4.3) or CVC4 (>=1.4) to be present in your PATH.

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2.0, 0.1.3.0, 0.2.0.0, 0.2.0.1
Dependencies base (>=4.6 && <5), containers (>=0.5.0.0), directory (>=1.2.0.1), exceptions (>=0.6), filepath (>=1.3.0.1), ghc (>=7.8.3), ghc-paths, hint, liquid-fixpoint (>=0.4), liquidhaskell (>=0.5), mtl (>=2.1.2), pretty, process, QuickCheck (>=2.7), syb (>=0.4.2), tagged (>=0.7), target, template-haskell (>=2.8), text (>=1.0), text-format, th-lift, transformers (>=0.3), unordered-containers (>=0.2.3.0), vector [details]
License MIT
Author Eric Seidel
Maintainer eseidel@cs.ucsd.edu
Category Testing
Source repo head: git clone git://github.com/gridaphobe/target.git
Uploaded by EricSeidel at 2015-09-01T22:03:15Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables target
Downloads 3846 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-09-01 [all 1 reports]