This package contains the tool curry-check
that supports
the automation of testing Curry programs. The tests to be executed can
be unit tests as well as property tests parameterized over some
arguments. The tests can be part of any Curry source program and, thus,
they are also useful to document the code. The basic ideas of CurryCheck
are described in a LOPSTR 2016
paper.
In addition to the functionality of other property-based tools, like QuickCheck, CurryCheck tests also specifications and contracts in Curry programs, determinism properties of operations, equivalence of operations, and performs some source code analysis to check the correct usage of some Curry features, like set functions, default rules, or primitives to implement functional patterns. Thus, it is recommended to use CurryCheck regularly when developing Curry programs.
The tool can be directly installed by the command
> cypm install currycheck
This installs the executable curry-check
in the bin
directory of CPM.
If the bin directory of CPM (default: ~/.cpm/bin
) is in
your path, execute the tool with the module containing the properties,
e.g.,
> curry-check Nats
The directory examples
of this package contains various
example programs to demonstrate the functionality of CurryCheck. It also
contains the following subdirectories with specific examples:
equivalent_operations
: Examples to check the semantic
equivalence of operations as described in the FLOPS 2018
paper.withVerification
: Examples to demonstrate the
combination of testing and verification.illegal_programs
: Some programs showing unindented uses
of Curry features that are detected by CurryCheck.