occurring after e
i
could lead to a match. The lower
bounds match the upper bounds.
For all operators with an unlimited upper bound
on an event’sstart time-point, the bounds on end time-
points of the event can be used. Only for the before
operator no bounds can be determined using a combi-
nation of bounds on start and end time-points.
Events Arriving at their End Time-point. When
events arrive at their end time-points, these time-
points need to be considered for lifetime calculation.
In this case, the upper bound d
ue
e
i
,e
j
of an event e
i
’s end
time-point with respect to an event e
j
, both events ar-
riving at their end time-points, can be estimated as
follows:
d
ue
e
i
,e
j
=
0 if t
e
e
i
= t
e
e
j
−∞ if t
e
e
i
> t
e
e
j
∞ otherwise
(3)
Similar to the upper bounds of the start timestamps,
if the end timestamp t
e
e
i
of event e
i
is greater than the
end timestamp t
e
e
j
of event e
j
as e.g. for the after
operator, the upper bound is −∞, all matching events
should have already arrived and the event could there-
fore be discarded. If the end time-points of two events
are required to be equal, the upper bound is zero as
e. g. for the finishes operator, events can be discarded
after one time unit, since all matching events should
arrive simultaneously. However, if none of these two
conditions applies as e. g. for the meets operator, no
other restriction can be made, since it is always pos-
sible that events with a higher end time-point arrive
later which fulfil all start time-point constraints. As
a result, there is a much higher number of operators
for which no upper bound can be defined compared
to events arriving at their start time-point. One way to
deal with this problem is the definition of a maximum
event lifetime.
2.4.2 Bounds on Parametrized Operators
Previously, we introduced bounds for Allen’s original
qualitative operators. Now, the bounds for our quan-
titative operators are stated in Table 2. The opera-
tors are given with their parameters, the bounds and
their reasons. The lifetimes of events e
n+1
or tuples
(e
1
, ..., e
n
) can be calculated analogous to the method
suggested by Teodosiu and Pollak. Again, a distinc-
tion has to be made for events arriving at their start
time-point and those arriving at their end time-point.
In the first case, the lower and upper bounds for
temporal distances d
ls
e
i
,e
j
, d
us
e
i
,e
j
based on the operators
an event is used in can be calculated for Allen’s oper-
ators as described earlier or by taking the end bounds
from Table 2 for the parameterized operators. These
bounds are then used to calculate an event’s upper
bounds based on all its relationships. Whenever no
bound is defined on an event’s start time-point, the
bounds on its end time-point can be used.
In the second case, lower and upper bounds for
temporal distances d
le
e
i
,e
j
, d
ue
e
i
,e
j
can be calculated for
Allen’s operators as described earlier or by taking the
end bounds from Table 2 for parameterized operators.
From these times, the lifetime can be determined for
all events or tuples as suggested by Teodosiu.
The constraints an event has to fulfil depend on
the complex event definitions it occurs in. The cal-
culation of an event’s lifetime is done based on these
constraints. Therefore, the lifetime calculation can be
done only once, when a rule defining a complex event
is added to an RBS or updated in an RBS, e. g. during
initialisation phase of an RBS, and then be stored to
avoid recalculation. Thereby the lifetime of an event
and the lifetime of a tuple arriving at a node can be
stored locally at this node. Then, a garbage collection
mechanism can access this time whenever needed in
order to discard unneeded events from this node.
3 RELATED WORK
Next, we describe ideas of garbage collection and rel-
ative constraints in the Rete algorithm.
Berstel (Berstel, 2002) described the adaptations
of the Rete algorithm used in ILOG JRules. He used
time-point semantics and before and after operators
are incorporated into Rete. The event concept is simi-
lar to ours, but distinguishes itself by using time-point
instead of interval-based semantics.
TPS (Maloof and Kochut, 1993) is a traditional
production system based on the Rete algorithm which
is extended with temporal knowledge by storing past
and developing events in a temporal database. An
interval-based timestamp semantics is used. The sys-
tem supports detection of events occurring during, be-
fore or after other events. However, operator seman-
tics as well as conceptual details remain unclear.
HALO (Herzeel et al., 2007) is a logic-based
pointcut language based on an extension of the Rete
algorithm. A garbage collection mechanism deals
with facts that are relevant only for a single time step
or a certain time. Facts that are irrelevant from the
start are not dealt with. The garbage collection is
performed as part of a node’s functionality, not by
a separate mechanism. However, the paper does not
explain in detail, how this garbage collection mecha-
nism works or how it is determined if an element can
be removed, just an example is given.
KEOD 2009 - International Conference on Knowledge Engineering and Ontology Development
272