scispace - formally typeset
Open AccessJournal ArticleDOI

Using temporal hierarchies to efficiently maintain large temporal databases

Thomas Dean
- 01 Oct 1989 - 
- Vol. 36, Iss: 4, pp 687-718
TLDR
A set of techniques for organizing temporalinformation by exploiting the local and global structure inherent in awide class of temporal reasoning problems are described, which have been used to support a variety of powerful inference mechanisms.
Abstract
Many real-world applications involve the management of large amounts of time-dependent information. Temporal database systems maintain this information in order to support various sorts of inference (e.g., answering questions involving propositions that are true over some intervals and false over others). For any given proposition, there are typically many different occasions on which that proposition becomes true and persists for some length of time. In this paper, these occasions are referred to as time tokens. Many routine database operations must search through the database for time tokens satisfying certain temporal constraints. To expedite these operations, this paper describes a set of techniques for organizing temporal information by exploiting the local and global structure inherent in a wide class of temporal reasoning problems. The global structure of time is exemplified in conventions for partitioning time according to the calendar and the clock. This global structure is used to partition the set of time tokens to facilitate retrieval. The local structure of time is exemplified in the causal relationships between events and the dependencies between planned activities. This local structure is used as part of a strategy for reducing the computation required during constraint propagation. The organizational techniques described in this paper are quite general, and have been used to support a variety of powerful inference mechanisms. Integrating these techniques into an existing temporal database system has increased, by an order of magnitude or more in most applications, the number of time tokens that can be efficiently handled. —Author's Abstract

read more

Content maybe subject to copyright    Report

Using Temporal Hierarchies to Efficiently Maintain
Large Temporal Databases
THOMAS DEAN
Brown University, Providence, Rhode Island
Abstract. Many real-world applications involve the management of large amounts of time-dependent
information. Temporal database systems maintain this information in order to support various sorts of
inference (e.g., answering questions involving propositions that are true over some intervals and false
over others). For any given proposition, there are typically many different occasions on which that
proposition becomes true and persists for some length of time. In this paper, these occasions are referred
to as
time tokens.
Many routine database operations must search through the database for time tokens
satisfying certain temporal constraints. To expedite these operations, this paper describes a set of
techniques for organizing temporal information by exploiting the local and global structure inherent in
a wide class of temporal reasoning problems. The global structure of time is exemplified in conventions
for partitioning time according to the calendar and the clock. This global structure is used to partition
the set of time tokens to facilitate retrieval. The local structure of time;is exemplified in the causal
relationships between events and the dependencies between planned activities. This local structure is
used as part of a strategy for reducing the computation required during constraint propagation. The
organizational techniques described in this paper are quite general, and have been used to support a
variety of powerful inference mechanisms. Integrating these techniques into an existing temporal
database system has increased, by an order of magnitude or more in most applications, the number of
time tokens that can be efficiently handled.
Categories and Subject Descriptors: H.3.3 [Information Storage and Retrieval]: Information Search and
Retrieval--search process; 1.2.8 [Artificial Intelligence]: Problem Solving, Control Methods and
Search-heuristic methods
General Terms: Algorithms, Performance
Additional Key Words and Phrases: Discrimination trees, reason maintenance, temporal reasoning
1. Introduction
Representing and reasoning about time play a critical role in many facets of
everyday problem solving. We continually have to make reference to what has
happened, is happening, and might possibly happen. To make matters all the more
difficult, we have to cope with the fact that the world is constantly changing around
us. To plan for the future, we must be able to predict change, propose, and commit
to actions on the basis of these predictions, and notice when certain predictions
are no longer warranted. All of this requires handling an enormous amount of
complexly interdependent information.
This work was supported in part by the National Science Foundation under grant IRI 86-12644 and by
the Advanced Research Projects Agency of the Department of Defense and was monitored by the Air
Force Ofiice of Scientific Research under Contract No. F49620-88-C-0132.
Author’s address: Department of Computer Science, Brown University, Providence, RI 02912.
Permission to copy without fee all or part of this material is granted provided that the copies are not
made or distributed for direct commercial advantage, the ACM copyright notice and the title of the
publication and its date appear, and notice is given that copying is by permission of the Association for
Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission.
0 1989 ACM 0004-541 l/89/1000-0687 $01.50
Journal ofthe Association for Computing Machinery, Vol. 36. No. 4, October 1989, pp. 687-718

688
THOMAS DEAN
In the past, the problems of efficient inference in predicate-calculus databases
used for temporal reasoning tasks have largely been ignored as researchers have
grappled with more fundamental issues. As our representations have become more
sophisticated and our ambitions to tackle more realistic domains have grown, the
problems inherent in managing large temporal databases have become a major
factor limiting growth [3, 41, 451. What is needed is a computational framework
in which strategies for organizing temporal facts can be exploited to expedite the
search needed to support basic temporal inference procedures. As a simple example,
suppose that you are planning a business trip and you are trying to remember
whether the travel agent has already confirmed your airline reservation. It should
not be necessary to recall (i.e., search through) all of the events past, present, and
future that involve your communicating with a travel agent. Only the most recent
are likely to be of interest. Restricting attention to a particular interval of time
requires that facts that change over time are
indexed temporally,
that is to say,
stored in such a way that facts and events common to a given interval are easily
accessible from one another.
Temporal indices are subject to frequent revision. Quite often, the span of time
associated with an event or fact is shifted, compressed, or expanded to suit a change
of plans or reflect new information. Suppose that you decide to leave on your
business trip a week earlier than previously planned. From this explicit change, it
should be apparent that certain prerequisite tasks (e.g., ordering plane tickets) must
also occur earlier. The database system described in this paper ensures that such
implied changes are reflected directly in the data structures manipulated by the
system. In updating a database of temporally dependent facts, it is our goal that
the work performed by the system be proportional to the resultant changes and
not to the size of the entire database.
In this paper, we are concerned with expediting a particular type of temporal
inference useful in a wide variety of applications. These applications range from
decision support for oflice automation [ 13, 141 to robot problem-solving [ 15, 181.
In the rest of this paper, wherever possible, we give concrete examples drawn from
an application that involves keeping track of the status of a number of manufac-
turing devices (e.g., engine lathes and milling machines) in an automated factory.
For any particular application, we want to encode general knowledge about how
various propositions relate to one another causally and temporally (e.g., “If a
machine is repaired, then the machine will be available for use immediately
following the repair.“) and specific knowledge about particular situations (e.g.,
“Lathe #45 was repaired at 2:00 this afternoon.“). We also want to be able to
answer questions that bear on our general and specific knowledge (e.g., “What
machines were repaired this afternoon?”
or “Is there a lathe available for use at
2: 15?“).
The task of answering questions is complicated by the fact that we want the
inference system to compensate somewhat for the inevitable gaps in its knowledge.
For instance, suppose that lathe #45 was available for use at 2:Ol. What can we
say about its availability at 2:02? We cannot say anything with certainty, but,
barring information to the contrary, it is reasonable to suppose that the lathe is
still available at 2:02. In general, we assume that a proposition having become true
tends to persist unless something is determined to make it false. We do not require
that the system be told exactly what propositions hold over what intervals of time;
in fact, we would rather that the system be told only when a proposition becomes
true and let it infer how long the proposition remains true. The system then is
responsible for keeping track of what propositions are true over what intervals of
time.

Maintaining Large Temporal Databases Using Temporal Hierarchies
Rules like “If event occurs at time t, then proposition becomes true at
t
+ 6.” are
referred to as causal rules. The inference system is responsible for computing the
consequences of events as directed by a set of causal rules and then using those
consequences to determine the persistence of facts for processing queries. For
instance, suppose 1 am told that lathe #45 suffered a major malfunction at 4:30
this afternoon and, further, that major malfunctions make machines unavailable
for use. In this case, I would expect the query “Is there a lathe available for use at
2: 15?” to succeed, but the query “Is there a lathe available for use at 4:45?” to fail.
The semantical issues concerning logical theories comprised of such rules are
discussed in [40] and are beyond the scope of this article. The procedural semantics
are rather simple and intuitive: Starting with some set of propositions known to
hold at some earliest point, you sweep forward in time considering events known
to occur and using the causal rules to determine which propositions become true,
continue to persist, and cease to persist. In [ 161 and [ 171, we discuss the basic
algorithms for performing this sort of causal reasoning. These algorithms ensure
that the database contains accurate information concerning what propositions are
true over what intervals of time.
All of the algorithms described in [ 171 run in time polynomial in the size of the
input (i.e., the specific and general knowledge provided by the application).
However, even low-order polynomial performance (e.g., 0(n3)) can be prohibitive
in applications involving a great deal of information; ideally, we want (small)
constant-time performance for routine question-answering. Fortunately, temporal
reasoning problems have a great deal of structure to exploit in attempting to achieve
this sort of performance. The structure that we exploit in this paper is of two types:
global structure (e.g., conventions for partitioning time according to calendar
boundaries) and local structure (e.g., relationships between events and their con-
sequences). Whenever an event is added or deleted, or its duration or time of
occurrence is changed, it is possible that the entire contents of the database have
to be revised. We limit the requisite computations by keeping track of the day,
month, and year in which events occur, and how various events are related to one
another. When a transaction occurs that affects a particular event, we first deter-
mine the changes required with regard to the set of events occurring on the same
day or directly related. If the changes can be limited to that set of events, then we
make the necessary changes and stop; otherwise, we broaden the set of possibly
affected events by considering events in adjoining days and those related less
directly.
The global structure inherent in our use of calendars and clocks is hierarchical
in nature, and thus forms an ideal basis for organizing our knowledge of events.
We exploit this hierarchical structure in our use of data structures for storing and
retrieving information about events. In addition, we allow the user to specify
general relationships among events that are temporally related, These relationships
are used by the system to derive additional information to reduce computational
costs. The actual algorithms and data structures used to expedite various sorts of
temporal inference are the primary subject of this paper. The details are at once
more and less complicated than hinted at above. More complicated in that we
have to deal with partially ordered events and constraints that only bound the
duration and occurrence of events. Less complicated in that we simply assume that
someone supplies the system with the knowledge that serves as guidance in
searching among events.
This paper describes a set of techniques that have been integrated into the
temporal database management system of [ 171 to achieve reasonable performance
in applications involving a large number of events that are known, or can be

690
THOMASDEAN
predicted, to occur and a large number of propositions that might persist over
intervals of time. In order to set this work in perspective, we begin by considering
some related work.
2. Related Work
There is a large body of work on temporal representation and inference, most of
which can be divided into one of three subareas: extensions to the relational
database model, logics of time for reasoning about programs and hardware verifi-
cation, and approaches in artificial intelligence for reasoning about planning and
language comprehension. In this section, we consider related work in each of these
three subareas with regard to the following requirements for a temporal inference
system:
(1) It must be capable of representing and reasoning about a variety of temporal
constraints both <quantitative and qualitative.
(2) It must be capable of inferring the consequences of events given some specifi-
cation of cause-and-effect relationships.
(3) It must be capable of reasoning with incomplete information including partially
ordered events and persistence.
This section is not intended as a broad survey of the literature. For a more
complete survey of research in temporal reasoning, the interested reader is encour-
aged to consult [4]. We begin by considering extensions to the relational database
model.
Following [42], we define a hierarchy of temporal database types in terms of
their expressive power.
Static databases
are conventional databases, with no
temporal information.
Static rollback databases
are static databases with a log
indicating what transactions were performed and at what time.
Historical databases
are static databases, extended to maintain information about the time during which
the stored information is assumed to be valid [9]. Finally, there are
hybrid temporal
databases
that encode both transaction time and valid time in order to support the
functionality of static rollback databases and historical databases;
TQUEL
[42] and
the work described in [30] are databases of this type.
The extensions to the relational model described above fail to satisfy all three of
our requirements. First, the underlying representation of time is too weak for our
purposes (e.g., all times are given with respect to a global clock, making it impossible
to represent information such as “A occurs before B”). Second, there is no inference
mechanism capable of reasoning about cause-and-effect relationships. Third, there
is no attempt to deal with incomplete information; the user of a historical database
must specify exactly over what intervals each relation is valid. The ability to reason
about transaction time is useful for many purposes (e.g., restoring the database to
some previous state), but we do not consider it further in this paper.
In contrast with research extending the relational database model, research on
logics of time has ignored practical issues for the most part, concentrating instead
on the expressiveness of the logics. For all the power these languages afford-they
all contain either propositional logic [37] or first-order quantified logic [l] as a
subset-they do not provide machinery for simple default reasoning about persis-
tence. Computational issues are generally overshadowed by concerns about com-
pleteness and decidability. To provide some idea of the cost of adopting a reasonably
expressive logic of time, the validity problem for almost any nontrivial model of
time in an interval-based modal logic of time is at least undecidable, and many

Maintaining Large Temporal Databases Using Temporal Hierarchies
691
such logics have no finite axiomatization [23]. It should be noted that the inference
procedures underlying the system described in this paper are not complete with
respect to propositional logic; we have traded completeness for performance in an
attempt to achieve a reasonable balance.
The work by McCarthy and Hayes on the situation calculus [33], a first-order
logic in which time-variant propositions are modeled as functions called j7uents,
uncovered what is referred to as the frame problem: the problem of inferring what
things do not change as a result of an event occurring. The solution to the frame
problem that McCarthy and Hayes suggested, using what are calledframe axioms,
is still the best-known method of dealing with persistence in temporal logic. Frame
axioms explicitly state for each event and for each fluent whether or not the fluent
persists in the situation resulting from the occurrence of that event. In applications
involving concurrent actions, frame axioms are required for all combinations of
events that might possibly co-occur. The method used in this paper for dealing
with persistence involves the use of default reasoning [32, 381 and derives from
ideas introduced in McDermott’s temporal logic [35]. The introduction of default
reasoning complicates the logical issues of reasoning about time [24, 401, but
actually simplifies many of the computational issues [ 17, 271.
The requirement that a temporal inference system be capable of reasoning about
a variety of constraints implies a language for specifying constraints involving
temporal entities (points or intervals) and some method of inferring additional
constraints from those explicitly supplied. For almost any language that allows
negation and disjunction, the decision problem of determining if a particular
constraint follows from some set of constraints is at least NP-hard [ 1 11, and, hence,
trade-offs are in order for building practical inference systems.
In [2], Allen describes a calculus for reasoning about the relationships between
intervals. He represents intervals and the relations among them by means of a
graph. The nodes of the graph correspond to intervals, and the arcs are labeled
with the relations between them. The relations between intervals can be disjunctions
of the primitive relations, (e.g., interval i, is before or after iz (written i,
[BEFORE
AFTER]
iI)). Ladkin [28] shows that Allen’s interval calculus has a first-order
axiomatization that is complete and decidable. Unfortunately, computing the
transitive closure of the relations defined in such a network is an NP-complete
problem [46]. Allen’s approach to this problem is to use a decision procedure that
is not complete, in the sense that it may not generate all the relations that can be
derived from a particular graph. Vilain [46] restricts Allen’s representation, and
then provides a polynomial algorithm that will derive all the relations entailed by
a particular graph. The restricted representation eliminates certain disjunctions of
relations, specifically those that cannot be expressed as disjunctions involving a
single endpoint. For example, “interval i, ends during, concurrently with, or after
interval i2” can be expressed, while “interval i, is either wholly before or wholly
after interval i2” cannot.
In most practical systems, only very limited use of negation and disjunction are
allowed. It makes little sense to provide language constructs that cannot be
efficiently supported. Representing inexact metric information does not introduce
any insurmountable problems. It is straightforward to implement a polynomial-
time decision procedure for determining the best bounds on the distance separating
a particular pair of points in time, given a set of constraints bounding the distance
between pairs of points [ 111. The method for representing inexact metric infor-
mation used in the system described in this paper is a generalization of Kahn’s
plus/minus error intervals for event dates [25].

Citations
More filters
Book

Constraint Processing

Rina Dechter
TL;DR: Rina Dechter synthesizes three decades of researchers work on constraint processing in AI, databases and programming languages, operations research, management science, and applied mathematics to provide the first comprehensive examination of the theory that underlies constraint processing algorithms.
Book

Handbook of Constraint Programming

TL;DR: Researchers from other fields should find in this handbook an effective way to learn about constraint programming and to possibly use some of the constraint programming concepts and techniques in their work, thus providing a means for a fruitful cross-fertilization among different research areas.

A Temporal Logic for Reasoning about Processes and Plans.

TL;DR: A common disclaimer by an AI author is that he has neglected temporal considerations to avoid complication; the implication is nearly made that adding a temporal dimension to the research would be a familiar but tedious exercise that would obscure the new material presented by the author.
Proceedings Article

Temporal planning with continuous change

TL;DR: ZENO, a least commitment planner that handles actions occurring over extended intervals of time, is presented, capable of solving simple problems (i.e., those involving less than a dozen steps).
Book

Handbook of Temporal Reasoning in Artificial Intelligence

TL;DR: This collection brings together the leading researchers in a range of relevant areas and provides an coherent description of the breadth of activity concerning temporal reasoning in the filed of Artificial Intelligence.
References
More filters
Journal Article

Maintaining knowledge about temporal intervals

James F. Allen
- 01 Mar 1991 - 
TL;DR: An interval-based temporal logic is introduced, together with a computationally effective reasoning algorithm based on constraint propagation, which is notable in offering a delicate balance between space and time.
Journal ArticleDOI

Maintaining knowledge about temporal intervals

TL;DR: In this paper, an interval-based temporal logic is introduced, together with a computationally effective reasoning algorithm based on constraint propagation, which is notable in offering a delicate balance between time and space.
Proceedings ArticleDOI

The temporal logic of programs

Amir Pnueli
TL;DR: A unified approach to program verification is suggested, which applies to both sequential and parallel programs, and the main proof method is that of temporal reasoning in which the time dependence of events is the basic concept.
Journal ArticleDOI

A logic for default reasoning

TL;DR: This paper proposes a logic for default reasoning, develops a complete proof theory and shows how to interface it with a top down resolution theorem prover, and provides criteria under which the revision of derived beliefs must be effected.
Book ChapterDOI

Some philosophical problems from the standpoint of artificial intelligence

TL;DR: In this paper, the authors consider the problem of reasoning about whether a strategy will achieve a goal in a deterministic world and present a method to construct a sentence of first-order logic which will be true in all models of certain axioms if and only if a certain strategy can achieve a certain goal.
Frequently Asked Questions (1)
Q1. What have the authors contributed in "Using temporal hierarchies to efficiently maintain large temporal databases" ?

In this paper, these occasions are referred to as time tokens. To expedite these operations, this paper describes a set of techniques for organizing temporal information by exploiting the local and global structure inherent in a wide class of temporal reasoning problems. The organizational techniques described in this paper are quite general, and have been used to support a variety of powerful inference mechanisms.