Popularity
2.3
Declining
Activity
1.0
-
0
3
0

Monthly Downloads: 54
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Algebra     Time    
Latest version: v2.1

interval-algebra alternatives and similar packages

Based on the "Algebra" category.
Alternatively, view interval-algebra alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of interval-algebra or a related project?

Add another 'Algebra' Package

README

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 three typeclasses designed to separate concerns of constructing, relating, and combining types that contain Intervals:

  1. Intervallic provides an interface to the data structures which contain an Interval.
  2. IntervalCombinable provides an interface to methods of combining two Intervals.
  3. IntervalSizeable provides methods for measuring and modifying the size of an interval.

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.

Axiom tests

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