Module contrafact::facts
source · Expand description
Some built-in implementations of some useful facts
Functions
- A constraint which is always met
- A Fact which applies two other facts.
- A constraint defined only by a predicate closure. Mutation occurs by brute force, randomly trying values until one matches the constraint.
- Specifies that a value should be increasing by 1 at every check/mutation
- Specifies that a value should be increasing by 1 at every check/mutation, with no context given
- Specifies an inequality constraint between two items in a tuple
- Specifies an equality constraint
- Specifies a range constraint
- Specifies a membership constraint
- Specifies a membership constraint
- Lifts a Fact about a subset of some data into a Fact about the superset, using a single function to specify a getter/setter pair.
- Lifts a Fact about a subset of some data into a Fact about the superset, using explicit getter and setter functions.
- Specifies an inequality constraint
- A constraint which is never met
- Negates a fact
- Combines two constraints so that either one may be satisfied
- Lifts a Fact about some optional subset of data into a Fact about the superset.
- Specifies an equality constraint between two items in a tuple
- Lifts a Fact about an item in a Vec into a fact about the whole Vec.
- Checks that a Vec is of a given length
- Combines a LenFact with a VecFact to ensure that the vector is of a given length