Syntax
Symbols
We define an infinite set E whose members are called events and the set R = {b, bi, m, mi, o, oi, s, si, d, di, f, fi, eq} disjoint from E whose members are called temporal relations.
- Symbols of Allen
- The symbols of Allen are SymAllen = E ⋃ R.
As with propositions in propositional logic, we will write distinct events with distinct sequences of latin characters like so: WorldWarTwo, MacronPresidency, etc.
Each temporal relation has a name that helps understanding its meaning. The table below informally explains the symbols:
Symbol | Name | Note |
---|---|---|
b | before | a first event happens completely before a second one starts |
bi | after | the inverse of before (i.e., a first event happens entirely after a second one ends) |
m | meets | a first event stops exactly when a second one starts |
mi | met by | the inverse of meets (a first event starts exactly when a second one ends) |
o | overlaps | a first event occurs before and after a second one starts, and ends before the second one ends |
oi | overlapped by | the inverse of overlaps (i.e., a first event occurs before and after a second one ends, and starts after the second one starts) |
s | starts | a first event starts at the same time as a second one but ends before the second one |
si | started by | the inverse of starts (i.e., a first event starts at the same time as a second one but ends after the second one) |
d | during | a first event occurs entirely while a second event is occurring |
di | contains | the inverse of during (i.e., a first event occurs before a second one starts and ends after the second ends |
f | finishes | a first event stops at the same time as a second event, but starts after the second |
fi | finished by | the inverse of finishes (i.e., a first event stops at the same time as a second one, but starts before the second) |
eq | equals | two events have the same temporal coverage |
Formulas
- formulas of Allen
-
The set ForAllen of Allen formulas is defined as follows: for all events e1, e2 ∈ E, and all a temporal relation r ∈ R, e1 r e2.
Note that we use a light shading on formulas in order to clearly distinguish them from other syntactic constructs.
WorldWarII b BushJrPresidency
WorldWarI o SpanishFluOutbreak
Semantics
Interpretations
- Interpretations in Allen
-
An interpretation in Allen is a pair (Δ, 𝓘s, 𝓘e) such that:
- Δ is a totally ordered set with a strict order relation <, whose elements are called instants;
- 𝓘s : E ⟶ Δ;
- 𝓘e : E ⟶ Δ;
- for all e ∈ E, 𝓘s(e) < 𝓘e(e).
Satisfaction relation
- Satisfaction relation in Allen
-
For e1, e2 ∈ E, an interpretation (Δ, 𝓘) in Allen satisfies:
- e1 b e2 if and only if 𝓘e(e1) < 𝓘s(e2);
- e1 bi e2 if and only if 𝓘e(e2) < 𝓘s(e1);
- e1 m e2 if and only if 𝓘e(e1) = 𝓘s(e2);
- e1 mi e2 if and only if 𝓘e(e2) = 𝓘s(e1);
- e1 o e2 if and only if 𝓘s(e1) < 𝓘s(e2) and 𝓘e(e1) < 𝓘e(e2);
- e1 oi e2 if and only if 𝓘s(e2) < 𝓘s(e1) and 𝓘e(e2) < 𝓘e(e1);
- e1 s e2 if and only if 𝓘s(e1) = 𝓘s(e2) and 𝓘e(e1) < 𝓘e(e2);
- e1 si e2 if and only if 𝓘s(e2) = 𝓘s(e1) and 𝓘e(e2) < 𝓘e(e1);
- e1 d e2 if and only if 𝓘s(e2) < 𝓘s(e1) and 𝓘e(e1) < 𝓘e(e2);
- e1 di e2 if and only if 𝓘s(e1) < 𝓘s(e2) and 𝓘e(e2) < 𝓘e(e1);
- e1 f e2 if and only if 𝓘s(e2) < 𝓘s(e1) and 𝓘e(e1) = 𝓘e(e2);
- e1 fi e2 if and only if 𝓘s(e1) < 𝓘s(e2) and 𝓘e(e2) = 𝓘e(e1);
- e1 eq e2 if and only if 𝓘s(e1) = 𝓘s(e2) and 𝓘e(e1) = 𝓘e(e2).
Table 2 presents a graphical view of the relations between events, presented as intervals on a timeline.
Extensions to sets of relations
Instead of defining temporal relations as a single possible relation (strictly defining how the starts and ends of the events relate relative to the other), we can extend Allen to express a set of alternative temporal relations between pairs of events. We define the extension Allen+ = (SymAllen+, ForAllen+, IntAllen+, ⊨Allen+) as follows:
- SymAllen+ = SymAllen ⋃ {‘
{
’, ‘}
’, ‘,
’}; - for e1, e2 ∈ E and a tuple (r1, …, rn) ∈ Rn, e1
{
r1,
…,
rn}
e2 ∈ ForAllen+; - IntAllen+ = IntAllen;
- for 𝓘 ∈ IntAllen+ and φ = e1
{
r1,
…,
rn}
e2 ∈ ForAllen+, 𝓘 ⊨Allen+ φ if and only if 𝓘 ⊨Allen e1 ri e2 for some i ∈ {1, …, n}.
Properties of Allen’s algebra
The entailment problem for Allen+ is NP-complete with respect to the size of the input theory.