Copyright | (c) NoviSci Inc 2020 |
---|---|
License | BSD3 |
Maintainer | bsaul@novisci.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module exports a single typeclass IntervalAxioms
which contains
property-based tests for the axioms in section 1 of Allen and Hayes (1987).
The notation below is that of the original paper.
This module is useful if creating a new instance of interval types that you want to test.
Synopsis
- class IntervalSizeable a b => IntervalRelationProperties a b where
- prop_exclusiveRelations :: Interval a -> Interval a -> Property
- prop_predicate_unions :: Ord a => Set IntervalRelation -> ComparativePredicateOf2 (Interval a) (Interval a) -> Interval a -> Interval a -> Property
- prop_IAbefore :: Interval a -> Interval a -> Property
- prop_IAstarts :: Interval a -> Interval a -> Property
- prop_IAfinishes :: Interval a -> Interval a -> Property
- prop_IAoverlaps :: Interval a -> Interval a -> Property
- prop_IAduring :: Interval a -> Interval a -> Property
- prop_disjoint_predicate :: Ord a => Interval a -> Interval a -> Property
- prop_notdisjoint_predicate :: Ord a => Interval a -> Interval a -> Property
- prop_concur_predicate :: Ord a => Interval a -> Interval a -> Property
- prop_within_predicate :: Ord a => Interval a -> Interval a -> Property
- prop_enclosedBy_predicate :: Ord a => Interval a -> Interval a -> Property
- prop_enclose_predicate :: Ord a => Interval a -> Interval a -> Property
Documentation
class IntervalSizeable a b => IntervalRelationProperties a b where Source #
A collection of properties for the interval algebra. Some of these come from figure 2 in Allen and Hayes (1987).
Nothing
prop_exclusiveRelations :: Interval a -> Interval a -> Property Source #
For any two pair of intervals exactly one IntervalRelation
should hold
prop_predicate_unions :: Ord a => Set IntervalRelation -> ComparativePredicateOf2 (Interval a) (Interval a) -> Interval a -> Interval a -> Property Source #
Given a set of interval relations and predicate function, test that the predicate between two interval is equivalent to the relation of two intervals being in the set of relations.
prop_IAbefore :: Interval a -> Interval a -> Property Source #
prop_IAstarts :: Interval a -> Interval a -> Property Source #
prop_IAfinishes :: Interval a -> Interval a -> Property Source #
prop_IAoverlaps :: Interval a -> Interval a -> Property Source #
prop_IAduring :: Interval a -> Interval a -> Property Source #
prop_disjoint_predicate :: Ord a => Interval a -> Interval a -> Property Source #
prop_notdisjoint_predicate :: Ord a => Interval a -> Interval a -> Property Source #
prop_concur_predicate :: Ord a => Interval a -> Interval a -> Property Source #
prop_within_predicate :: Ord a => Interval a -> Interval a -> Property Source #
prop_enclosedBy_predicate :: Ord a => Interval a -> Interval a -> Property Source #
prop_enclose_predicate :: Ord a => Interval a -> Interval a -> Property Source #