Computing with time and events
3. How to get to the other side of a street
(3) ¬Happens(e,1 3) (4) Happens(e, t!)∧Happens(e, t”)∧t= t!+t” 2 →Happens(e, t) (5) Happens(e!, t!)∧Happens(e!, t”)∧t= t!+t” 2 →Happens(e!, t) (6) ¬Happens(e, t) →Happens(e!, t) (7) ¬Initially(f) (8) Initiates(e, f, t) (9) Terminates(e!, f, t).
The eventse, e! occur on a dense set of points in the interval [0,1]; fur- thermore we have ¬HoldsAt(f,0). But what can one say about the be- haviour ofHoldsAt(f, t)on (0,1]? Suppose the derivation tree for ?HoldsAt(f, t),
0 ≤ t ≤ 1would contain a successful branch, then there would be a con- straint c such that ∀t(0 ≤ t ≤ 1∧c(t) → ?HoldsAt(f, t)). But since c determines a finite set of intervals, there would be an interval contained in (0,1] on which f holds. This however is impossible, since there occur many terminating events inside this interval (because e! occurs on a dense
set of points). Similarly there cannot be a branch on which ?HoldsAt(f, t),
0 ≤ t ≤1fails finitely. It follows thatHoldsAt(f, t)is undefined on (0,1]; we are concerned here with a truly partial model.**
We have seen that allowingHappensto occur in both head and body of a clause may lead to vicious loops. Sometimes this syntactic form is harmless however, namely when the scenario contains formulas of the form given in definition 9.
We continue with an example of a complete scenario, leading to finitely evaluable queries only.
3. How to get to the other side of a street
As an aplication of the preceding material, we now discuss in greater detail the scenario for the sentence ‘John was crossing the street’, as given in Section 3.1. What follows from this sentence if we restrict ourselves to minimal models, that is, models in which nothing unexpected happens? Intuitively, it should follow that the intended goal will be reached.
As explained above, a minimal model of a logic program is defined via the completion of the program. Here, the logic program consists of the full scenario plus the axioms for the event calculus. Giving the full completion of the program would take up too much space, so we do only a few cases and ask the reader to write down the full completion.
First consider the predicate Initiates. There is only one formula in the scenario withInitiatesin the head, namelyInitiates(start,crossing,t). Writ- ing this in canonical form givesf =crossing∧e =start→Initiates(e, f, t). We now want to say that this is the only causal effect of an event onto a fluent: this is achieved by replacing the implication with an equivalence, as follows
68 5. COMPUTING WITH TIME AND EVENTS
Next consider the predicate Happens. The scenario contains two clauses withHappensin the head, namelyHappens(start,t0) andHoldsAt(crossing,
t)∧HoldsAt(distance(m),t)→Happens(reach,t). Writing these in canon- ical form gives
(1) e=start∧t=t0 →Happens(e, t)
(2) e =reach ∧ HoldsAt(crossing, t) ∧ HoldsAt(distance(m), t) → Happens(e,t)
Combining these two statements into a conjunction gives (3) (e=start∧t=t0)∨(e=reach∧
HoldsAt(crossing,t)∧HoldsAt(distance(m),t))→Happens(e, t) Now comes the crucial step: we want to say that an event canhappenonly in virtue of the antecedent of the preceding formula; there are no unforeseen events. This is achieved by replacing the implication by an equivalence:
(4) (e=start∧t=t0)∨(e=reach∧HoldsAt(crossing,t)∧
HoldsAt(distance(m),t))↔Happens(e, t)
The preceding formulas allow us to write, using the completion forHoldsAt, which is then specialized toHoldsAt(crossing,now):
HoldsAt(crossing,now) 1
∃t0 <now(Happens(start, t0)∧Initiates(start,crossing, t0)
∧¬Clipped(t0,crossing,now).
Note that we have used the fact that Initially(crossing) is false in the com- pletion. Since we know that HoldsAt(crossing, now), it follows that for some time t0 <now, Happens(start,t0). For this particulart0 we further-
more have:
(∗)HoldsAt(rossing, t)↔¬Clipped(t0,crossing, t).
It follows that crossing defines an interval of the form (t0, t1] or (t0,∞).
We now want to show that fort1 =t0+m: Happens(reach, t1) andHold-
sAt(distance(m),t1). By axiom 2 it follows thatHoldsAt(distance(m), t)∧
s > t→HoldsAt(distance(m),s).
From this and property (*) above it follows that for all t > t1: Hold-
sAt(distance(m), t). Suppose there is no tsuch that HoldsAt(distance(m), t)∧HoldsAt(crossing,t), then for not, Happens(reach,t), and as a conse- quencecrossingis neverterminated. But sincedistancerepresents a contin- uous monotonically increasing function, there will be a tsuch that12Hold- sAt(distance(m),t)∧HoldsAt(crossing,t), a contradiction. Hence there ex- ists a (unique) t1 for whichHoldsAt(distance(m), t1) ∧HoldsAt(crossing,
t1)∧Happens(reach,t1).
By axiom 4,HoldsAt(distance(t1−t0),t1), and it follows thatt1−t0 =m,
using property 9 of the scenario, or the fact thatHoldsAtis a truth predicate.
4. **WHEN DO CAUSES TAKE EFFECT? 69
4. **When do causes take effect?
As an application of the notion of minimality, we are now able to clarify why a fluent is required not to hold at the moment it is initiated. Consider axiom 3, repeated for convenience:
Happens(e, t)∧Initiates(e, f, t)∧t < t!∧¬Clipped(t, f, t!)→HoldsAt(f, t!). In a minimal model as constructed above, the interpretation ofHoldsAt must satisfyHappens(e, t)∧Initiates(e, f, t)∧ t < t! ∧¬Clipped(t, f, t!)
↔ HoldsAt(f, t!). Suppose first thate happens instantaneously. It follows immediately thatf cannot hold at the time it is initiated. A similar argument shows thatf must hold at the time it is terminated. We emphasize that this argument only works in the minimal model13. Nothing in the setup of the event calculus as presented here requires that events occur instantaneously. Even if events and fluents are both extended in time, they are distinguished by the roles they play in the event calculus. It is worth bearing this in mind when thinking about linguistic examples. For example, it is sometime main- tained that in French, the Passé Simple has the effect of making the event described punctual, to be placed inside a temporally extended background provided by a sentence in the Imparfait. As against this, Comrie [17] rightly argues that what matters is not punctuality, but lack of internal structure. The Passé Simple presents an event as a whole, disregarding internal struc- ture. Of course points do not have internal structure, but punctuality is not a necessary requirement for lack of structure. If the event e is temporally extended, the completion of axiom 3 has the effect of forcingf to be true as soon as there has been an instant such thatHappens(e, t)∧Initiates(e, f, t). Similarly, the completion of axiom 8 makes f false as soon as there has been an instant such that Happens(e, t) ∧Terminates(e, f, t). For some, though not all, examples this is somewhat unnatural. E.g. when turning a light on, the light is on only after the end of the action. It is possible to rephrase axiom 3 so that it has this effect:
AXIOM7. Happens(e, t)∧Initiates(e, f, t)∧t < t!∧∀s(Happens(e, s)→
s < t!)∧¬Clipped(t, f, t!)→HoldsAt(f, t!).
However, since such stipulations depend on the actions considered, we shall refrain from complicating the axioms in this way.**
The next Section contains a number of exercises to allow the reader to check her understanding of the preceding material.
13This technical analysis should not obscure the fact that there is a deep philosophical problem behind this, akin to Zeno’s paradoxes of motion. If we assume infinite divisibility of time, there cannot be botha last instant at whichf does not hold, and a first instant at which f holds. We therefore have to choose. For a philosophical justification of the solution adopted here, see Le Poidevin [70, p. 111].
70 5. COMPUTING WITH TIME AND EVENTS