interval-algebra: An implementation of Allen's interval algebra for temporal logic

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Please see the README on GitHub at https://github.com/novisci/interval-algebra


[Skip to Readme]

Properties

Versions 0.1.2, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.3.2, 0.3.3, 0.4.0, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.7.0, 0.7.1, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.9.0, 0.10.0, 0.10.1, 0.10.2, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.2.0, 1.3.0, 1.4.0, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), QuickCheck, time (>=1.8 && <2), witherable (>=0.4) [details]
License BSD-3-Clause
Copyright 2020 NoviSci
Author Bradley Saul
Maintainer bsaul@novisci.com
Category Algebra, Time
Home page https://github.com/novisci/interval-algebra#readme
Bug tracker https://github.com/novisci/interval-algebra/issues
Source repo head: git clone https://github.com/novisci/interval-algebra
Uploaded by bradleysaul at 2021-04-22T16:59:44Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for interval-algebra-0.3.2

[back to package description]

interval-algebra

The interval-algebra package implements Allen's interval algebra in Haskell. The main module provides data types and related classes for the interval-based temporal logic described in Allen (1983) and axiomatized in Allen and Hayes (1987).

A good primer on Allen's algebra can be found here.

Design

The module is built around five typeclasses designed to separate concerns of constructing, relating, and combining Intervals:

  1. Intervallic provides an interface to the data structure of an Interval, defining how an Interval a (simply a pair (a, a)) is constructed.
  2. IntervalAlgebraic provides an interface to the IntervalRelations, the workhorse of Allen's temporal logic.
  3. IntervalCombinable provides an interface to methods of combining multiple Intervals.
  4. IntervalSizeable and the related Moment provide methods for measuring and modifying the size of an interval.
  5. IntervalFilterable provides methods for filtering 'Filterable' collections of intervals.

An advantage of nested typeclass design is that developers can define an Interval of type a with just the amount of structure that they need.

Total Ordering of Intervals

The modules makes the (opinionated) choice of a total ordering for Intervallic Intervals. Namely, the ordering is based on first ordering the begins then the ends.

Axiom tests

The package includes tests that the functions of the IntervalAlgebraic typeclass meets the axioms for intervals (not points) as laid out in Allen and Hayes (1987).

Development

This module is under development and the API may change in the future.