interval-algebra-1.1.1: An implementation of Allen's interval algebra for temporal logic
Copyright(c) NoviSci Inc 2020
LicenseBSD3
Maintainerbsaul@novisci.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

IntervalAlgebra.RelationProperties

Description

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

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).

Minimal complete definition

Nothing

Methods

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 #

Instances

Instances details
IntervalRelationProperties Int Int Source # 
Instance details

Defined in IntervalAlgebra.RelationProperties

IntervalRelationProperties UTCTime NominalDiffTime Source # 
Instance details

Defined in IntervalAlgebra.RelationProperties

IntervalRelationProperties Day Integer Source # 
Instance details

Defined in IntervalAlgebra.RelationProperties