Allen's Interval Algebra is a formal calculus for qualitative temporal reasoning that defines thirteen mutually exclusive base relations—such as before, meets, overlaps, during, starts, finishes, and their inverses—that can hold between any two time intervals. Developed by James F. Allen in 1983, it provides a constraint-based framework for representing and reasoning about temporal knowledge without requiring precise numeric timestamps, making it foundational for systems that must infer temporal order from incomplete information.
Glossary
Allen's Interval Algebra

What is Allen's Interval Algebra?
A calculus for qualitative temporal reasoning that defines thirteen exhaustive and mutually exclusive relations between two time intervals.
The algebra operates through a composition table that allows a reasoner to deduce the relationship between interval A and interval C given the relationships between A and B and between B and C. This transitivity enables the propagation of temporal constraints and the detection of inconsistencies in a network of interval relations. In legal AI, it is used to model the complex temporal interactions between contractual obligations, such as determining that a delivery deadline overlaps a payment window, which in turn is met by a warranty activation period.
Key Features of Allen's Interval Algebra
A qualitative calculus defining 13 exhaustive and mutually exclusive relations between two time intervals, forming the foundational logic for constraint-based temporal reasoning in legal obligation management systems.
The 13 Base Relations
The algebra defines a complete set of jointly exhaustive and pairwise disjoint (JEPD) relations: Before, Meets, Overlaps, Starts, During, Finishes, and their inverses (After, MetBy, OverlappedBy, StartedBy, Contains, FinishedBy), plus Equals. These 13 relations form an atomic relation set where any two definite intervals must satisfy exactly one relation.
Composition Table Reasoning
The algebra's deductive power comes from its transitivity table, a 13x13 matrix defining the composition of relations. For example, if interval A is Before interval B, and B Contains interval C, the table infers that A is Before C. This enables constraint propagation across a network of temporal intervals to detect inconsistencies or deduce new, implicit relationships.
Disjunctive Relation Networks
When temporal knowledge is incomplete, a constraint between two intervals is expressed as a disjunction of base relations, e.g., {Before, Meets}. The algebra operates on these sets using set-theoretic composition. A path consistency algorithm iteratively refines these disjunctive constraints by intersecting compositions along all paths in the network until a fixed point is reached or an inconsistency (empty set) is found.
Point-Interval Reduction
The algebra can be extended to handle points (instants) by treating a point as an interval with zero duration where the start equals the end. This allows reasoning about deadlines and instantaneous events within the same framework. A point can be Before, Meets, or MetBy an interval, but cannot Overlap or Contain it, reducing the applicable relation set for point-interval constraints.
Conceptual Neighborhood Structure
The 13 relations are organized into a conceptual neighborhood graph that defines which relations are continuous transformations of one another. For instance, Before can transition to Meets by decreasing the gap between intervals, and Meets can transition to Overlaps by moving the intervals closer. This structure is critical for modeling temporal uncertainty and reasoning about events with imprecise boundaries.
Computational Complexity
Determining the consistency of a network of Allen relations is an NP-complete problem in the general case when disjunctions are allowed. However, restricting constraints to the ORD-Horn subclass—a set of 868 tractable relations—enables polynomial-time reasoning using path consistency. This tractable subset is sufficient for most practical legal temporal constraint problems.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about Allen's Interval Algebra and its application in modeling time-bound contractual obligations.
Allen's Interval Algebra is a formal calculus for qualitative temporal reasoning that defines thirteen mutually exclusive and exhaustive base relations between two time intervals, such as before, meets, overlaps, during, and equals. It works by treating a time interval as a convex set of points and classifying the relative positioning of their endpoints. The thirteen relations are: before(i, j), after(i, j), meets(i, j), metBy(i, j), overlaps(i, j), overlappedBy(i, j), starts(i, j), startedBy(i, j), during(i, j), contains(i, j), finishes(i, j), finishedBy(i, j), and equals(i, j). A key property is that these relations form a composition table, allowing a reasoner to infer a transitive relationship between intervals i and k given the relations between i and j and between j and k. For example, if obligation A is before obligation B, and obligation B meets obligation C, the algebra infers that A is before C. This constraint propagation mechanism is the foundation for detecting inconsistencies in a set of temporal statements, making it a powerful tool for analyzing complex contractual timelines where explicit dates may be missing but relative ordering is specified.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Key concepts that form the foundation for applying Allen's Interval Algebra to contractual obligation management and automated legal reasoning systems.
Temporal Logic (TL)
A formal system for reasoning about propositions qualified in terms of time. While Allen's algebra handles qualitative interval relations, temporal logic introduces modal operators like 'always' (□), 'eventually' (◇), and 'until' (U) to express propositions over linear or branching time. In contract analysis, Linear Temporal Logic (LTL) can specify rules such as 'a payment obligation must eventually be fulfilled before the sunset clause always terminates the agreement.'
Temporal Constraint Satisfaction
The algorithmic process of finding a valid timeline that satisfies all extracted temporal constraints. Given a set of intervals and their Allen relations (e.g., 'Payment Period meets Grace Period', 'Notice before Termination'), a constraint solver propagates these to detect inconsistencies and compute feasible schedules. This is the core engine that validates whether a contract's deadlines are logically coherent.
Temporal Dependency Graph
A directed graph where nodes represent contractual events or deadlines and edges represent temporal precedence constraints derived from Allen relations. For example, a 'before' relation creates a strict precedence edge. This structure enables critical path analysis across multi-document agreements, identifying the chain of obligations that determines the overall transaction timeline.
Temporal Contradiction
A logical inconsistency between temporal statements in one or more contracts. Allen's algebra provides a formal framework for detecting these conflicts. For instance, if Clause A states 'Inspection occurs during Construction' and Clause B states 'Inspection occurs after Construction', the system identifies a contradiction because an interval cannot simultaneously satisfy both during and after relations with the same reference interval.
OWL-Time
A W3C ontology providing a standard vocabulary for describing instants, intervals, and their relationships in knowledge graphs. OWL-Time directly implements Allen's thirteen interval relations as object properties (e.g., time:intervalBefore, time:intervalMeets), enabling semantic reasoning engines to infer new temporal facts and check consistency across contract knowledge bases using standardized description logic.
Complex Event Processing (CEP)
A method of analyzing streaming events to identify meaningful patterns in real-time. CEP engines use Allen-like temporal operators to define patterns such as 'a missed payment event followed by a cure period expiration without a payment received event triggers a default.' This bridges the gap between static contract analysis and dynamic obligation monitoring in live systems.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us