Event calculus Problem Event Calculus I Constraint Logic Fritz - - PowerPoint PPT Presentation

event calculus
SMART_READER_LITE
LIVE PREVIEW

Event calculus Problem Event Calculus I Constraint Logic Fritz - - PowerPoint PPT Presentation

Event calculus Hamm & Schlotterbeck The Frame Event calculus Problem Event Calculus I Constraint Logic Fritz Hamm Programming Event Calculus Fabian Schlotterbeck II Applications Seminar fr Sprachwissenschaft


slide-1
SLIDE 1

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Event calculus

Fritz Hamm∗ Fabian Schlotterbeck∗∗

∗Seminar für Sprachwissenschaft ∗∗Sonderforschungsbereich 833

Universität Tübingen

August 23, 2010

slide-2
SLIDE 2

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Situation Calculus I

Ontology: situation, fluents, actions Basic predicates: Holds(f,s), Result(a,s) s0: A B C D table On(x,y), Clear(x)

slide-3
SLIDE 3

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Situation Calculus II

(1)

Σ

a. Holds(On(C,table),s0) b. Holds(On(B,C),s0) c. Holds(On(A,B),s0) d. Holds(On(D,table),s0) e. Holds(Clear(A),s0) f. Holds(Clear(D),s0) g. Holds(Clear(table),s0)

¬Holds(Clear(B),s0)

slide-4
SLIDE 4

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Situation Calculus III

Move(x,y) Result(Move(A,D),s0) B A C D table

slide-5
SLIDE 5

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Effect axioms I

(2)

a.

(Holds(Clear(x),s)∧ Holds(Clear(y),s) ∧ x = y ∧ x = table) →

Holds(On(x,y),Result(Move(x,y),s)) b.

(Holds(Clear(x),s)∧ Holds(Clear(y),s) ∧ Holds(On(x,z),s)∧ y = z ∧ x = y)) → Holds(Clear(z),Result(Move(x,y),s))

(3) a.

∆∧Σ ⊢

Holds(On(A,D),Result(Move(A,D),s0)) b.

∆∧Σ ⊢

Holds(Clear(B),Result(Move(A,D),s0))

slide-6
SLIDE 6

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Effect axioms II

(4)

∆∧Σ ⊢ Holds(On(B,C),Result(Move(A,D),s0))

slide-7
SLIDE 7

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The frame problem I

(5) Holds(On(v,w),s)∧ x = v → Holds(On(v,w),Result(Move(x,y),s)) Holds(On(B,C),Result(Move(A,D),s0))

slide-8
SLIDE 8

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The frame problem II

(6) Holds(Clear(x),s)∧ x = z → Holds(Clear(x),Result(Move(y,z),s)) (7) Holds(Colour(x,c),Result(Paint(x,c),s)) (8) Holds(Colour(x,Red),s0)

slide-9
SLIDE 9

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The frame problem III

(9)

∆′ ∧Σ′ ⊢

Holds(Colour(A,Red),Result(Move(A,D),s0))

slide-10
SLIDE 10

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The frame problem IV

(10) a. Holds(Colour(x,c),s) → Holds(Colour(x,c),Result(Move(y,z),s)) b. Holds(Colour(x,c1),s)∧ x = y → Holds(Colour(x,c1),Result(Paint(y,c2),s)) (11) a. Holds(On(x,y),s) → Holds(On(x,y),Result(Paint(z,c),s)) b. Holds(Clear(x),s) → Holds(Clear(x),Result(Paint(y,c),s))

slide-11
SLIDE 11

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Event calculus I: Ontology

EC formalises two types of change

  • momentanous change
  • continous change
  • Ontology: eventtypes, fluents, real numbers, individuals.
slide-12
SLIDE 12

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Event calculus II: Language I

  • Primitive predicates 1:

Initially(f) Happens(e,t) Initiates(e,f,t) Terminates(e,f,t)

slide-13
SLIDE 13

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Event calculus II: Language II

  • Primitive predicates 2: changing partial objects

Releases(e,f,t) Trajectory(f1,t,f2,d)

slide-14
SLIDE 14

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Event calculus II: Language III

  • Primitive predicates 3: no f-relevant events between t1 and t2

Clipped(t1,f,t2)

  • Primitive predicates 4: truth predicate

HoldsAt(f,t)

slide-15
SLIDE 15

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Axiomatisation : Inertia

If a fluent holds initially or has been initiated by some event

  • ccurring at time t and no event terminating f has occurred

between t and t′ > t, then f holds at t′.

slide-16
SLIDE 16

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Axiomatisation I: Shanahan I

Definition Clipped(t′,f,t′′) :=

∃e,t(Happens(e,t)∧(Terminates(e,f,t)∨

Releases(e,f,t))∧ t′ < t ∧ t < t′′) Definition Declipped(t′,f,t′′) :=

∃e,t(Happens(e,t)∧(Initiates(e,f,t)∨

Releases(e,f,t))∧ t′ < t ∧ t < t′′)

slide-17
SLIDE 17

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Axiomatisation I: Shanahan II

Axiom Initially(f)∧¬Clipped(0,f,t) → HoldsAt(f,t) Axiom Happens(e,t)∧ Initiates(e,f,t)∧ t < t′ ∧¬Clipped(t,f,t′) → HoldsAt(f,t′) Axiom Happens(e,t)∧ Terminates(e,f,t)∧ t < t′ ∧¬Declipped(t,f,t′) → ¬HoldsAt(f,t′) Axiom Happens(e,t)∧ Initiates(e,f1,t)∧ t < t′ ∧ t′ = t + d ∧ Trajectory(f1,t,f2,d)∧¬Clipped(t,f1,t′) → HoldsAt(f2,t′)

slide-18
SLIDE 18

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Axiomatisation II: Constraint logic programming

Axiom Initially(f) → HoldsAt(f,0) Axiom HoldsAt(f,r)∧ r < t ∧¬∃s < rHoldsAt(f,s) ∧¬Clipped(r,f,t) → HoldsAt(f,t) Axiom Happens(e,t)∧ Initiates(e,f,t) ∧ t < t′ ∧¬Clipped(t,f,t′) → HoldsAt(f,t′) Axiom Happens(e,t)∧ Initiates(e,f1,t) ∧ t < t′ ∧ t′ = t + d ∧ Trajectory(f1,t,f2,d)∧¬Clipped(t,f1,t′) → HoldsAt(f2,t′) Axiom Happens(e,s) ∧ t < s < t′∧

(Terminates(e,f,s) ∨ Releases(e,f,s)) → Clipped(t,f,t′)

slide-19
SLIDE 19

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Constraint System I

Definition Let Σ = (S,F,R) be a signature where R contains at least =s for each sort s ∈ S.Let X be a set of Σ variables. Further let D be a Σ structure with equality und T a Σ theory. A constraint (over Σ) is a formula r(t1,...,tm) with r ∈ R is a predicate symbol and the ti are terms of the respective sorts. Let C be the set of all constraints (over Σ). C contains the constraints true and false with D |

= true and D | = false

A 5-tupel ζ = (Σ,D,T,X,CS) with {true,false} ⊆ CS ⊆ C is a constraint system.

slide-20
SLIDE 20

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Constraint System II

Definition Let ζ = (Σ,D,T,X,CS) be a constraint system. A structure D and a theory T correspond with respect to constraints from CS if D is a model of T, and for each c ∈ CS: D |

= ∃c iff T | = ∃c

slide-21
SLIDE 21

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Constraint System III

Example (Linear arithmetic)

ζI

Rlin = (ΣI R,DI R,TI Rlin,XI R,CSI R) be a constraint system with

ΣI

R = ({real},{0,1,−1,2,...,+,−,·,/},{=,>,<,≤,≥,=})

DI

R = ({I

R},{0I

R,1I R,−1I R,2I R,...,+I R,−I R,×I R,/I R},

{=I

R,>I R,<I R,≤I R,≥I R,=I R})

CSI

R is the set of linear constraints, i.e. constraints of the form

a1 · x1 +...+ an · xn ∗ b where x1,...,xn ∈ Xr, a1,...,an and b are real numbers and

∗ ∈ {=,>,<,≤,≥,=}. TI

Rlin is the theory of linear arithmetic.

slide-22
SLIDE 22

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Constraint System IV

Example (Boolean constraints)

ζB = (ΣB,DB,TB,XB,CSB) be a constraint system with ΣB = ({B},{true,false,¬,∧,∨},{=})

DB = ({0,1},{0B,1B,¬B,∧B,∨B},{=B}) CSB is the set of all Boolean constraints and TB is the theory of Boolean algebras.

slide-23
SLIDE 23

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Transition system

Definition A (state) transition system is a triple (S,S0,→) where S is a set of states. S0 ⊆ S is the set of start states.

→⊆ S × S is the state transition relation which determines for

each state s its successor state.

slide-24
SLIDE 24

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Constraint program I

Definition Let a constraint system ζ = (Σ,D,T,X,CS) be gives. A constraint program is a set of clauses of the following form Q1,...,Qn → Q where Q is an atomic formula and the Qis are either atoms or constraints from CS. A clause with n > 0 is a rule and if n = 0 Q is called a fact. The part on the right hand of → is the head of the clause the part

  • n the left hand the body of the clause. A goal has the form

?− Q1,...,Qm

where the Qis are atoms or constraints.

slide-25
SLIDE 25

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Constraint program II

Definition A state (of a constraint program P) is a pair (G,C) where G is a goal and C is a conjunction of constraints from CS. G is called the pool and C the store of Z. The set of all states is Zζ,P. A start state is a state of the following form:

(G,true)

The set of all start states is Z0,ζ,P.

slide-26
SLIDE 26

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Constraint program III

Definition

E(σ) = V

x/t∈σ(x = t) denotes the conjunction of equality

constraints corresponding to substitution σ.

slide-27
SLIDE 27

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Transition I

Definition let Z = < G,C > = <?−R1,...,C >,m ≥ 1 be a state. We define →ζ,P via three subrelations. unfold: Let Ri be an atomic formula. If there is a variant A = Q : −Q1,...,Qn,n ≥ 0 of a clause in P such that Z and A have no common variables and there is a mgu σ on R and Q, then

< G,C > →unfold,ζ,P <?− R1 ∧...∧ Ri−1 ∧E(σ) ∧Q1 ∧...∧ Qn ∧ Ri+1 ∧...∧ Rm,C >

failure: Let Ri be an atomic formula. If there is no clause in P such that unfold as described above can apply then

< G,C > →failure,ζ,P < ✷,false >

slide-28
SLIDE 28

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Definition (continued 1) let Z = < G,C > = <?− R1,...,C >,m ≥ 1 be a state. propagate (1): Let Ri be a constraint. If solveζ(Ri ∧ C) = false, then

< G,C > →propagate,ζ,P <?− R1 ∧...∧ Ri−1 ∧ Ri+1 ∧...∧ Rm,C′ >,

where C′ is either Ri ∧ C or a logically simplified equivalent constraint via simplifyζ(Ri ∧ C) = C′, i.e. D |

= ∀(Ri ∧ C ↔ C′)

slide-29
SLIDE 29

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Definition (continued 2) let Z = < G,C > = <?− R1,...,C >,m ≥ 1 be a state. propagate (2): Let Ri be a constraint. If the conjunction of Ri and C is not satisfyable, i.e. solveζ(Ri ∧ C) = false, and therefore D |

= ¬∃(Ri ∧ C),

then

< G,C > →propagate,ζ,P < ✷,false >

slide-30
SLIDE 30

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Definition (→ζ,P) The relation →ζ,P is defined by

→ζ,P = →unfold,ζ,P ∪ →failure,ζ,P ∪ →propagate,ζ,P

slide-31
SLIDE 31

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Additional Definitions I

Definition The operational semantics of a constraint logic program is given be the transition system (Zζ,P,Z0,ζ,P,→ζ,P). Definition A derivation of a goal G with regard to a constraint program P is a (possibly infinite) sequence

(G,true) →ζ,P (G1,C1) →ζ,P (G2,C2),...

  • f transition steps.
slide-32
SLIDE 32

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Additional Definitions II

Definition A state (✷,C) is called an end state. A state (✷,C) with C = false is a failed end state (failure). If C = false the state (✷,C) is called a success (state).

slide-33
SLIDE 33

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Additional Definitions III

Definition Let

(G0,true) = (G0,C0) →ζ,P (G1,C1) →ζ,P (G2,C2),...,→ζ,P (✷,Cn = (Gn,Cn)

be a finite derivation. Formula ∃var(G0)(Gi ∧ Ci) is called the logical description of

(Gi,Ci).

An answer for goal ?− G0 is a formula equivalent to the logical description of (Gn,Cn)

slide-34
SLIDE 34

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Example I

Example lightmeal(A,M,D) : − 10 ≥ I + J + K, appetizer(A,I),main(M,J),dessert(D,K), appetizer(pasta,4) appetizer(radishes,1) main(pork,11) main(beef,7) dessert(fruit,2) dessert(icecream,6)

slide-35
SLIDE 35

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Example (CLP-Derivation)

(?− lightmeal(X,Y,Z),true) →unfold (?− X = A,Y = M,Z = D,10 ≥ I + J + K,

appetizer(A,I),main(M,J),dessert(D,K),true)

→propagate (?− 10 ≥ I + J + K,appetizer(A,I),main(M,J),dessert(D,K),

X = A∧ Y = M ∧ Z = D)

→propagate (?− appetizer(A,I),main(M,J),dessert(D,K),

10 ≥ I + J + K ∧ X = A∧ Y = M ∧ Z = D)

→unfold (?− A = radishes,I = 1,main(M,J),dessert(D,K),

10 ≥ I + J + K ∧ X = A∧ Y = M ∧ Z = D)

→propagate (?− main(M,J),dessert(D,K),

9 ≥ J + K ∧ X = radishes ∧ A = radishes ∧ I = 1∧ Y = M ∧ Z = D)

→unfold ... →propagate

slide-36
SLIDE 36

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Example (CLP-Derivation, continued)

→unfold ... →propagate (?− dessert(D,K),2 ≥ K ∧ X = radishes ∧ A = radishes ∧ I =

1∧ Y = beef ∧ M = beef ∧ J = 7∧ Z = D)

→unfold ... →propagate (?−✷,X = radishes ∧ A = radishes ∧ I = 1∧ Y = beef ∧ M =

beef ∧ J = 7∧ Z = fruit ∧ D = fruit ∧ K = 2) Answer to query ?− lightmeal(X,Y,Z)

(X = radishes)∧(Y = beef)∧(Z = fruit)

slide-37
SLIDE 37

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Example I

Example

?− lightmeal(X,pork,Z).,true) →unfold (?− X = A,M = pork,Z = D,10 ≥

I + J + K,appetizer(A,I),main(M,J),dessert(D,K).,true) →propagate

(?− appetizer(A,I),main(M,J),dessert(D,K).,10 ≥ I + J + K ∧ X =

A∧ Z = D)

→unfold (?− appetizer(A,I),M = pork,J = 11,dessert(D;K).,10 ≥

I + J + K ∧ X = A∧ M = pork ∧ Z = D)

→propagate (?− appetizer(A,I),J = 11,dessert(D,K).,10 ≥ I + J + K ∧ X =

A∧ M = pork ∧ Z = D)

→propagate (?−✷,false)

slide-38
SLIDE 38

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Event Calculus as a Constraint Logic Program I

The constraint system for the event calculus is:

ζI

R = (ΣI R,DI R,TI R,XI R,CSI R)

where

ΣI

R = ({real},{0,1,−1,2,...,+,·},{<})

and DI

R = ({I

R},{0I

R,1I R,−1I R,2I R,...,+I R,×I R,},{<I R)

XI

R is a set of real valued variables.

TI

R is the first order theory of real closed fields.

CSI

R are first order formulas from the language of TI R.

slide-39
SLIDE 39

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Event Calculus as a Constraint Logic Program II

Let K be the language of the event calculus, consisting of programmed predicate symbols. Constraint programming language CLP(T ) consists of constraints and formulas from K , whose terms come from ζI

R.

slide-40
SLIDE 40

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Scenario I

Definition A state S(t) at time t is a first order formula built from 1 literals of the form (¬)HoldsAt(f,t), for t fixed and possibly different f. 2 equalities between fluent terms, and between event terms. 3 formulae in the language of the structure (R,<;+,×,0,1) Definition A scenario is a conjunction of statements of the form 1 Initially(f), 2 S(t) → Initiates(e,f,t), 3 S(t) → Terminates(e,f,t), 4 S(t) → Happens(e,t), 5 S(t) → Releases(e,f,t), 6 S(f1,f2,t,d) → Trajectory(f1,t,f2,d). where S(t) (more generally S(f1,f2,t,d)) is a state in the sense of the above definition

slide-41
SLIDE 41

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Scenario II

(12) Carlos is building a house. 1 Initially(house(a)) 2 Initiates(start, build, t) 3 Initiates(finish, house(c), t) 4 Terminates(finish, build, t) 5 HoldsAt(build, t) ∧ HoldsAt(house(c), t) → Happens(finish, t) 6 Releases(start, house(x), t) 7 HoldsAt(house(x), t) → Trajectory(build, t, house(x + g(d)), d)

slide-42
SLIDE 42

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Minimal models and non-monotonicity

A consequence relation |

= is nonmonotonic if ψ | = ϕ does not imply ψ,θ | = ϕ.

In nonmonotonic reasoning, people construct a minimal model of the premisses (which is often unique); in monotonic reasoning, they must consider all models of the premisses.

slide-43
SLIDE 43

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Normal programs I

Definition A complex subgoal is characterised recursively as

1 an atom in K , or 2 ¬∃x(B1 ∧...Bm ∧ c), where c is a constraint and each Bi is a

complex subgoal. complex body is a conjunction of complex subgoals. Definition A normal program is a finite set of formulas of the form ψ → A of CLP(T ) such that ψ is a complex body and A is a predicate from

K .

slide-44
SLIDE 44

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Normal programs II

Definition Let P be a normal program, consisting of clauses B1 ∧ c1 → p1(t1),...,Bn ∧ cn → pn(tn), where the pi are atoms. The completion of P, denoted by comp(P), is computed by the following recipe:

1

choose a predicate p that occurs in the head of a clause of P

2

choose a sequence of new variables x of length the arity of p

3

replace in the i-th clause of P all occurrences of a term in ti by a corresponding variable in x and add the conjunct x = ti to the body; we thus obtain Bi ∧ ci ∧ x = ti → pi(x)

4

for each i, let zi be the set of free variables in Bi ∧ ci ∧ x = ti not in x

5

given p, let n1,...,nk enumerate the clauses in which p occurs as head

6

define Def(p) to be the formula

∀x(p(x) ↔ ∃zn1 (Bn1 ∧ cn1 ∧ x = tn1 )∨...∨∃znk (Bnk ∧ cnk ∧ x = tnk ).

7

comp(P) is then obtained as the formula V

p Def(p), where the conjunction ranges over predicates p occurring in

the head of a clause of P.

slide-45
SLIDE 45

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Normal programs III

Example

1 Initially(height(0)) 2 Happens(tap–on,5) 3 Initiates(tap–on,filling,t) 4 Terminates(overflow,filling,t) 5 x < 10 → Releases(tap-on, height(x), t) 6 HoldsAt(height(10),t)∧HoldsAt(filling,t) →

Happens(overflow,t).

7 HoldsAt(height(x),t) →

Trajectory(filling,t,height(x + d),d)

slide-46
SLIDE 46

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Normal programs IV

(13)

(x = tap-on ∧ y = 5) → Happens(x,y)

(14)

(HoldsAt(height(10),t)∧ HoldsAt(filling,t) ∧ x = overflow ∧ y = t) → Happens(x,y)

(15)

∀x∀y[Happens(x,y) ↔ (x = tap − on ∧ y = 5) ∨ (HoldsAt(height(10),t)∧ HoldsAt(filling,t)∧ x =

  • verflow ∧ y = t)]
slide-47
SLIDE 47

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Normal programs V

Definition A partial interpretation I is a function which maps ground atoms (in P) to

{t,f,u}, and constraints to {t,f}

slide-48
SLIDE 48

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Normal programs VI

Definition Given a normal program P, a real-closed field A, a partial interpretation I and a ground atom A, the (immediate) consequence operator ΦP is defined as

1 ΦP(I)(A) = t if there exists a clause B ∧ c → p(s) in P and an

assignment α into A such that A = p(s)α and I(cα) = I(Bα) = t.

2 ΦP(I)(A) = f if for each clause in P of the form B ∧ c → p(s) and

each assignment α into A such that A = p(s)α: I(cα) = f or I(Bα) = f.

slide-49
SLIDE 49

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Normal programs VII

Theorem Let T be the theory of real-closed fields, P a normal program, ?c,G a query.

1 ?c,G succeeds iff

T ∧ comp(P) |

=3 ∀(c → G)

2 ?c,G fails finitely iff

T ∧ comp(P) |

=3 ¬∃(c ∧ G).

Here, ∀(∃) denotes universal (existential) closure.

slide-50
SLIDE 50

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Theoretical Results I

Definition A subset of Rn is semialgebraic if it is a finite union of sets of the form {x ∈ Rn | f1 = ... = fk = 0, g1 > 0,...,gl > 0}, where the fi,gj are polynomials. Theorem Let T be the constraint theory describing the structure A. Let P be a normal program consisting of the axioms of the event calculus together with a scenario. Let ?G be a finitely evaluable query in the language of the event calculus. Let b be an assignment to the variables y. Then there exists a semialgebraic set defined by a constraint c(x) such that T +comp(P) |

= ∀(G(xb) ↔ c(x)).

slide-51
SLIDE 51

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Theoretical Results II

Corollary Let P be as above, and suppose it is finitely evaluable. Then the theory T + comp(P) has a unique model on R. In this model all the (real parts of the) primitive predicates are represented by semialgebraic sets. Actually it suffices to require that for all fluents f(x) in the scenario, the query ?HoldsAt(f(x),t) is finitely evaluable.

slide-52
SLIDE 52

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Theoretical Results III

1 Happens(e,0) 2 Happens(e,t′) ∧ t = t′ + 2 → Happens(e,t) 3 Happens(e′,1) 4 Happens(e′,t′) ∧ t = t′ + 2 → Happens(e′,t) 5 Initiates(e′,f,t) 6 Terminates(e,f,t)

slide-53
SLIDE 53

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Theoretical Results IV

1 Happens(e,0) 2 Happens(e,1) 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).

slide-54
SLIDE 54

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The Yale shooting scenario I

In the Yale shooting scenario someone – usually a turkey Fred – is killed by a gunshot. There are three actions involved Load, Wait, Shoot and two fluents Alive and Loaded. The Load action puts a bullet in the gun and the victim dies after the Shoot action as long as the gun is loaded. The Wait action is supposed to have no effect on any fluent.

slide-55
SLIDE 55

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The Yale shooting scenario II

1 Initiates(Load, Loaded, t) 2 HoldsAt(Loaded, t) → Initiates(Shoot, Dead, t) 3 HoldsAt(Loaded, t) → Terminates(Shoot, Alive, t) 4 Initially(Alive) 5 Happens(Load, 5) 6 Happens(Wait, 10) 7 Happens(Shoot, 15)

Derive: ¬ HoldsAt(Alive, 20), HoldsAt(Dead, 20)

slide-56
SLIDE 56

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The imperfective paradox

(16) Carlos crossed the street. (17) Carlos was crossing the street. Definition A sentence Past(φ) is true now iff there is a time t < now such that φ is true at t. A sentence Prog(Past(φ)) is true now iff there is an interval I ⊆ now such that Past(φ) is true at I. This definition implies that (16) follows from (17).

slide-57
SLIDE 57

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Verb classes I

(18)

Activities: run, push a cart, draw.

(19)

Accomplishments: cross the street, build a house, write a letter.

(20)

Achievements: begin, reach, arrive.

(21)

Points: flash, spot, blink.

(22)

States: know, love, be sad.

slide-58
SLIDE 58

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Verb classes II

Definition An eventuality is a structure (f1,f2,e,f3), where

1 f1 is a fluent which represents an activity, something which

exerts a force

2 f2 is a parametrized fluent, representing a parametrized

  • bject or state, which is driven by the force f1

3 e is the culminating event, representing a canonical goal 4 f2 is a fluent which represents the state of having achieved

the goal

slide-59
SLIDE 59

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Verb classes III

Releases Traj.1 Traj.3 f2,f3

+ − +

f1

− + −

State

(−,−,−,+)

Activity (strict)

(+,−,−,−)

Activity (wide)

(+,+,−,−)

Accomplishment

(+,+,+,+)

Achievement

(−,−,+,+)

Point

(−,−,+,−)

slide-60
SLIDE 60

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Solving the imperfective paradox I

1 crossing is an activity fluent. 2 distance(x) is a variable quantity representing the distanced

crossed.

3 m is a real constant indicating the width of the street. 4 similarly, 0 is a real constant indicating the stage at which the

crossing starts.

5 start is any event initiating crossing. 6 reach is the canonical event terminating crossing, namely

when the other side of the street is reached.

7 g is a monotone increasing real-valued function relating the

crossing activity to the distance crossed.

slide-61
SLIDE 61

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Solving the imperfective paradox II

1 Initially(one–side) 2 Initially(distance(0)) 3 HoldsAt(distance(m), t) ∧ HoldsAt(crossing, t) →

Happens(reach, t)

4 Initiates(start, crossing, t) 5 Releases(start, distance(0), t) 6 Initiates(reach, other–side, t) 7 Terminates(reach, crossing, t) 8 HoldsAt(distance(x),t) →

Trajectory(crossing, t, distance(x + g(d)),d)

9 HoldsAt(distance(x1),t) ∧ HoldsAt(distance(x2),t) →

x1 = x2.

slide-62
SLIDE 62

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Solving the imperfective paradox III

Theorem Let P be the logic program consisting of EC and the scenario for crossing a street. Suppose P is extended to P ′ so that the query ?HoldsAt(crossing, now) succeeds in P ′. Suppose limd→∞ g(d) ≥ m. Then comp(P ′) has a unique model, and in this model there is a time t ≥ now for which HoldsAt(other-side, t).

slide-63
SLIDE 63

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The English perfect I

(23) I have caught the flu. ✲ E R, S (24) a. Initiates(e,f,t) b. HoldsAt(f,now).

slide-64
SLIDE 64

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The English perfect II

Derive: t <now, Happens(e,t)

Happens(e,t)∧Initiates(e,f,t)∧t < t′∧¬Clipped(t,f,t′) ↔ HoldsAt(f,t′)

(Happens(e,t)∧Initiates(e,f,t)∧t < t′ ∧¬Clipped(t,f,t′))∨(now = t′) ↔ HoldsAt(f,t′)

slide-65
SLIDE 65

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The semantics of sentences I

  • We view a sentence S as a goal (‘make S true’) to be achieved

by updating the discourse model. (25) I have caught the flu. (26)

?HoldsAt(f,now) succeeds.

Initiates(e,f,t) is given Axiom Happens(e,t)∧ Initiates(e,f,t) ∧ t < t′ ∧¬Clipped(t,f,t′) → HoldsAt(f,t′) Add only Happens(e,t),t < now.

slide-66
SLIDE 66

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The semantics of sentences II

?HoldsAt(f,now) succeeds {Initiates(e,f,t)} ↓ update {Initiates(e,f,t),Happens(e,t)} ¬Clipped(t,f,now) follows by negation as failure.

slide-67
SLIDE 67

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

The semantics of sentences III

Given q and

φ1 → q φ2 → q

. . .

φn → q

we want to conclude that q can only be the case because one of the φi is the case.

slide-68
SLIDE 68

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Past progressive

Definition The past progressive applies to the activity component of a quadruple, say the fluent f, and is represented by the integrity constraint which says that the query

?HoldsAt(f,R),R < now

must succeed.

slide-69
SLIDE 69

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Reification I

Definition S is conservative over S0 iff for all φ in L(S0): S ⊢ φ ⇔ S0 ⊢ φ Definition Let L be some extension of L0 (e.g. by means of a truth predicate). Then we may code formulas of L as terms in L0. We write ϕ for the Gödel number in L0 of ϕ in L. This notation will be used interchangeably both for the term in L0 and for the object denoted by that term in a model M0.

slide-70
SLIDE 70

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Reification II

Definition

∆n ϕ[ˆ

x1,...,ˆ xn,y1,...,ym] = (ϕ,y1,...,ym). Axiom

(TnA) Tn(x1,...,xn,φ[ˆ

u1,...,ˆ un,y1,...,ym]) ↔

φ(x1,...,xn,y1,...,ym)

T0(φ) ↔ φ

slide-71
SLIDE 71

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Reification III

Theorem Let S be a consistent system in the sense that S has a model. Then there exists an extension S’ with truth axioms which is conservative over S.

slide-72
SLIDE 72

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Application I

‘Event’ is derived notion, via nominalisation in the Feferman calculus Hence no event-variables in basic language, but time-variables Definition If ϕ(t,x) is a formula, the eventtype generated by ϕ will be

∃t.ϕ[t,x].

Definition If ϕ(t,x) is a formula, the fluent generated by ϕ(t,x) is the term

ϕ[ˆ

t,x].

slide-73
SLIDE 73

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Application II

Two possibilities to construct terms from predicate burn(x,y,t):

  • 1. Event types: ∃t.burn[j,h,t]
  • 2. Fluents: burn[j,h,ˆ

t] (27) a. John’s burning of the house b. John’s burning the house

slide-74
SLIDE 74

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Application III

HoldsAt = T1 HoldsAt(burn[j,h,ˆ t],s) ↔ burn(j,h,s)

slide-75
SLIDE 75

Event calculus Hamm & Schlotterbeck The Frame Problem Event Calculus I Constraint Logic Programming Event Calculus II Applications Integrity constraints Feferman theories References

Hofstedt & Wolf (2007) Einführung in die Constraint Programmierung, Springer. Marriott & P . Stuckey (1998). Programming with Constraints, MIT Press. Shanahan (1997). Solving the Frame Problem – A Mathematical Investigation of the Common Sense Law of Inertia., MIT Press. van Lambalgen & Hamm (2005). The Proper Treatment of Events. Blackwell Malden.