Event Calculus (EC) is a formalism for planning that was applied by [52] to natural language semantics. The term planning refers to the process of setting a goal and computing the actions which suffice to achieve this goal.
In order to reason about planning, this formalism is designed to reason about events as well as properties, where events may be actions of some agent or events in the environment, and properties may refer to agents as well as the environment, and may undergo change as a consequence of the denoted events.
In order to prove a plan correct to the best of one’s knowledge, the formal system EC axiomatizes the following ideas:
1. All changes are due to a cause
2. Spontaneous (non-intended) events do not happen
The first idea is employed using the commonsense idea of inertia, i.e., that a prop- erty persists unless it is caused to change by an event, and the second is employed by restricting the class of models of the system to those that are minimal, i.e., events and changes are only the ones required or forced by explicit statements or the axioms.
4.2.1 The formal system EC
Ontological overview
Formally, EC requires a many-sorted logic for the following sorts: 1. individual objects (e.g., humans chairs, tables),
2. real numbers (to represent time and variable quantities), 3. time dependent properties (e.g., states, activities),
4. variable quantities (e.g., spatial position, degree of sadness, state of complet- ing a picture),
5. event types, whose instantiations (tokens) mark the beginning and end of time dependent properties.
Time is represented by the structure (R, <,+,×,0,1). This continuum is not intended to represent how humans conceive time, but rather, it provides the raw material out of which the cognitive representation of time is constructed in some fashion.
The event calculus formalizes two notions of ‘cause’
1. instantaneous change that affects a time dependent property (e.g., balls col- liding affects the balls’ location and momentum)
2. change due to a force which exerts its influence continuously (e.g., filling a bucket)
Time-dependent properties can be affected by an instantaneous cause, a continuous cause, or cause continuous changes themselves in other time dependent properties. These time-dependent properties are central notions for the EC models and are called fluents (the corresponding objects will be formally defined in section 4.2.2).
Predicates
EC uses the following predicates: (51) a. Initially(f)
“fluentfinitially holds” b. Happens(e, t)
“eventehappens at timet” c. Initiates(e, f, t)
“eventeinitiates fluentf at timet” d. Terminates(e, f, t)
“eventeterminates fluentf at timet” e. Trajectory(f1, t, f2, d)
“fluentf1is a force that causes a change inf2and holds fromttot+d
f. Releases(e, f, t)
“eventelets fluentf start changing at timet” g. Clipped(t1, f, t2)
“fluentfceases to hold sometime between timet1andt2”
h. Declipped(t1, f, t2)
“fluentfholds between timet1andt2”
i. HoldsAt(f, t)
The Axioms
EC formalizes the commonsense principle of inertia and two notions of ‘cause’ using the following axioms:
(52) a. Initially(f)→HoldsAt(f,0)
“if a fluentf initially holds then it started to hold at time0”
b. HoldsAt(f, r)∧r < t∧ ¬∃s < rHoldsAt(f, s)∧ ¬Clipped(r, f, t)→
HoldsAt(f, t)
the principle of inertia: “If a fluentfholds at timerand is not clipped between timesrandtthen it still holds at timet”
c. Happens(e, t)∧Initiates(e, f, t)∧t < t0∧¬Clipped(t, f, t0)→HoldsAt(f, t0) instantaneous change: “If an eventehappens at timetand initiates a fluentf and the fluent is not clipped between timestandt0 then the fluentf still holds at timet0”
d. Happens(e, t)∧Initiates(e, f1, t)∧t < t0∧t0=t+d∧Trajectory(f1, t, f2, d)∧ ¬Clipped(t, f1, t0)→HoldsAt(f2, t0)
continuous change: “If an event ehappens at timet and initiates a fluentf1 which is not clipped between timestandt0, and if fluentf1
exerts a force that causes change of another fluent ford=t0−t, then the fluentf2 holds at timet0”
e. Happens(e, s)∧t < s < t0∧(Terminates(e, f, s)∨Releases(e, f, s)→
Clipped(t, f, t0)
“If an evente happens at timet and either terminates f or allows it to change (e.g., due to another fluent that exerts force on it) thenf is clipped ”
4.2.2 Models for EC
A Model for EC
Fluents (time dependent properties) are represented in models of EC as objects. A functionf(x) may be thought of as a function that mapsx to a fluent object, wherexcan be an individual, a property, etc. In a model for EC fluents are sets of intervals of the form (a, b]where ais the instant in which an initiating event occurs andbis an instant where ‘the next’ terminating event occurs. Note that by definition, fluents start to hold immediately after the initiating event.
Events (event types) are derivatives of fluents. Each event can either initiate or terminate an event. Instants are non-negative reals. More formally, a fluent f is a finite set of disjoint halfopen intervals of the form (a, b](with the possible addition of an interval [0, c]or [0,∞]). Event types e can be of the form e =
e+f ={∃s((r, s]∈f}(i.e., the set of initiating events of a fluentf), or of the form e=e−f ={∃r((r, s]∈f}(i.e., the set of terminating events of a fluentf). Thus, the distinguished predicates get the following interpretations:
1. HoldsAt:={(f, t|∃I ∈f(t∈I)} 2. Initially:={f|∃s >0([0, s]∈f)} 3. Happens:={(e, t)|∃f[(e=e+f ∨e=e−f)∧(f, t)∈e])} 4. Initiates:={(e, f, t)|e=e+f ∧(f, t)∈e)} 5. Terminates:={(e, f, t)|e=e−f ∧(f, t)∈e)} 6. Declipped:={(t1, f, t2)|∃t(t1 < t < t2∧(f, t)∈e−f} 7. Clipped:={(t1, f, t2)|∃t(t1 < t < t2∧(f, t)∈e−f} 8. Releases:={}
Theorem 1. EC is true under the above interpretations. (A complete proof can be found in [52, p. 42].)
Coding of event types and fluents
In previous sections that the use of an event argument `a-la Davidson since it is not capable of differences internal to the event structures. Next we show how EC allows us to construct various kinds of events on the time line from the same ‘material’, so-to-speak.
All kinds of entities in the formal system of EC are derived from the same raw material, namely VPs. A nominalized VP is an example for an extended fluent that is coded as an event. Fortunately, we are allowed to do encode fluents as event types within the EC formal system by means of the Feferman calculus [19]. LetL0be some first order language extending the language of the reals, containing
at least axioms for+and×. Formulas inL0 can be coded as natural numbers via
G¨odel numbering. Furthermore, it is possible to define a binary pairing functionπ with two projection functionsπ1andπ2 such that
(53) π1(x, y) =x∧π2(x, y) =y.
We can define tuples inductively using(τ) =τand(τ1, . . . , τk+1) = ((τ1, . . . , τk), τk+1)
and now the corresponding projection function is as follows: (54) ∀πik1< i < k[πik(x1, . . . , xk) =xi]
Thus, ifpψqis the G¨odel number inL0forψthen:1
Definition 1. 4nψ[ˆx1, . . . ,xˆk, y1, . . . , yk] = (pψq, y1, . . . , yn) In particular, forn= 1
(55) 41ψ[ˆx, y1, . . . , yk] ={x|ψ(x, y1, . . . , yn)}
As a result, various kinds of events can be constructed from verb phrases, say
run(x, t)with its time parametert. In particular, event types are given formally by
∃t.run(x, t) and fluents are given byrun[x,ˆt]. Note that ifx is substituted for a concrete object, then the former is an object and the latter is a function from time to truth values.
The Truth PredicateHoldsAt
In the presentation of the EC predicates we have identified the predicateHoldsAt with our truth predicate. Making one of the predicates in the language play a role of a truth predicate leads to a problem of the type introduced by Tarski.
The problem stems from self reference, and in this context, the construction of a sentence of the form ‘it is true at timet thatf is false at time t’ leading to a contradiction [52, p. 74].
This problem is remedied by adding the truth predicateTntoL0
(56) ∀ψ∈L0∨ {Tn|n∈N},∀n∈N
Tn(x1, . . . , xn, ψ[ˆu1, . . . ,uˆn, y1, . . . , ym])↔ψ(x1, . . . , xn, y1, . . . , ym) Then, in particular;
(57) T1(x, ψ[ˆu, y1, . . . , ym])↔ψ(x, y1, . . . , ym)
This allows us to replace occurrences of HoldsAt in axioms (and scenarios) of the event calculus with T1. This can be shown to maintain consistency within
the framework of EC. The interested reader should consult [52, p. 73–78] for the complete formal treatment of the solution.
Minimal Models
The kind of models presented so far will not suffice to guarantee that a goal can be achieved, as they do not prevent spontaneous events from happening and unin- tended changes from occurring.
1
To illustrate, suppose we would like to create a plan for having the light ‘on’ during the time interval(a, b]. We can construct a plan to switch on the light at timeaand switch it off at timeb. Different models allow for additional terminating switch-off events in between this time interval or even do not preclude a spontaneous turning- off of the light with no explicit reason.
Thus, we take the closed world assumption, in which:
1. unintended events do not happen. The only events that happen are ones specifically stated in the premises/axioms.
2. all changes are due to a cause of the type axiomatized in (52a)–(52e). In practice, however, there are different ways to define minimality. The one ad- vocated in [52] is by means of constraint logic programming, which in addition provides a computational means to compute execution of the plan using compu- tational derivations, as we required in section 4.1.1. Also, it restricts the class of models depicted by EC to a decidable fragment. The interested reader can turn to [52] for a full survey of this computational machinery.