Incremental Event Calculus for Run-Time Reasoning Efthimis - - PowerPoint PPT Presentation

incremental event calculus for run time reasoning
SMART_READER_LITE
LIVE PREVIEW

Incremental Event Calculus for Run-Time Reasoning Efthimis - - PowerPoint PPT Presentation

Incremental Event Calculus for Run-Time Reasoning Efthimis Tsilionis, Alexander Artikis, Georgios Paliouras NCSR Demokritos http://cer.iit.demokritos.gr/ 16 April 2019 Motivation for Incremental CER Motivation for Incremental CER Delayed


slide-1
SLIDE 1

Incremental Event Calculus for Run-Time Reasoning

Efthimis Tsilionis, Alexander Artikis, Georgios Paliouras

NCSR Demokritos http://cer.iit.demokritos.gr/

16 April 2019

slide-2
SLIDE 2

Motivation for Incremental CER

slide-3
SLIDE 3

Motivation for Incremental CER

◮ Delayed events (e.g., satelite GPS messages)

slide-4
SLIDE 4

Motivation for Incremental CER

◮ Delayed events (e.g., satelite GPS messages) ◮ Overlapping temporal windows

slide-5
SLIDE 5

Motivation for Incremental CER

◮ Propagation of changes

drifting highSpeedNC withinArea trawlSpeed anchoredOrMoored movingSpeed tuggingSpeed changingSpeed trawlingMovement loitering gap sarSpeed pilotBoarding stopped sarMovement underWay rendezVous sar trawling lowSpeed tugging

slide-6
SLIDE 6

Event Calculus

◮ A logic programming language for representing and reasoning

about events and their effects.

slide-7
SLIDE 7

Event Calculus

◮ A logic programming language for representing and reasoning

about events and their effects.

◮ Key components:

◮ event (typically instantaneous). ◮ fluent: a property that may have different values at different

points in time.

slide-8
SLIDE 8

Event Calculus

◮ A logic programming language for representing and reasoning

about events and their effects.

◮ Key components:

◮ event (typically instantaneous). ◮ fluent: a property that may have different values at different

points in time.

◮ Built-in representation of inertia:

◮ F = V holds at a particular time-point if F = V has been

initiated by an event at some earlier time-point, and not terminated by another event in the meantime.

slide-9
SLIDE 9

Event Calculus

◮ A logic programming language for representing and reasoning

about events and their effects.

◮ Key components:

◮ event (typically instantaneous). ◮ fluent: a property that may have different values at different

points in time.

◮ Built-in representation of inertia:

◮ F = V holds at a particular time-point if F = V has been

initiated by an event at some earlier time-point, and not terminated by another event in the meantime.

◮ RTEC is a CER system based on the Event Calculus formalism

slide-10
SLIDE 10

Problem Statement

time ω qi-1 - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1

initiatedAt(F=V,T) ←

slide-11
SLIDE 11

Problem Statement

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-12
SLIDE 12

Problem Statement

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-13
SLIDE 13

Problem Statement

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-14
SLIDE 14

Problem Statement: Inefficiency

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-15
SLIDE 15

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-16
SLIDE 16

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

sF

Qi = sF Qi-1 + ΔsF(Qi-1,{ins,del}) qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-17
SLIDE 17

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

sF

Qi = sF Qi-1 + ΔsF(Qi-1,{ins,del}) qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-18
SLIDE 18

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

sF

Qi = sF Qi-1 + ΔsF(Qi-1,{ins,del}) qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-19
SLIDE 19

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

sF

Qi = sF Qi-1 + ΔsF(Qi-1,{ins,del}) qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-20
SLIDE 20

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

sF

Qi = sF Qi-1 + ΔsF(Qi-1,{ins,del}) qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-21
SLIDE 21

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

sF

Qi = sF Qi-1 + ΔsF(Qi-1,{ins,del}) qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-22
SLIDE 22

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

sF

Qi = sF Qi-1 + ΔsF(Qi-1,{ins,del}) qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-23
SLIDE 23

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

sF

Qi = sF Qi-1 + ΔsF(Qi-1,{ins,del}) qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-24
SLIDE 24

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

sF

Qi = sF Qi-1 + ΔsF(Qi-1,{ins,del}) qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-25
SLIDE 25

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

sF

Qi = sF Qi-1 + ΔsF(Qi-1,{ins,del}) qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

slide-26
SLIDE 26

Incremental RTEC

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T). happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

sF

Qi = sF Qi-1 + ΔsF(Qi-1,{ins,del}) qi-1

initiatedAt(F=V,T) ← initiatedAt(F=V,T) ←

◮ Two phases:

◮ Deletion phase ◮ Addition phase

slide-27
SLIDE 27

Incremental RTEC - Deletion phase

time ω qi-1 - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1

initiatedAt(F=V,T) ←

slide-28
SLIDE 28

Incremental RTEC - Deletion phase

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1

initiatedAt(F=V,T) ←

slide-29
SLIDE 29

Incremental RTEC - Deletion phase

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1 [happensAt(A,T)] del v [holdsAt(B=VB,T)] del v [happensAt(C,T)] ins v [holdsAt(D=VD,T)] ins .

initiatedAt(F=V,T) ←

[initiatedAt(F=V,T)]Qi-1 ←

slide-30
SLIDE 30

Incremental RTEC - Deletion phase

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1 [happensAt(A,T)] del v [holdsAt(B=VB,T)] del v [happensAt(C,T)] ins v [holdsAt(D=VD,T)] ins .

initiatedAt(F=V,T) ←

[initiatedAt(F=V,T)]Qi-1 ←

slide-31
SLIDE 31

Incremental RTEC - Deletion phase

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1 [happensAt(A,T)] del v [holdsAt(B=VB,T)] del v [happensAt(C,T)] ins v [holdsAt(D=VD,T)] ins .

initiatedAt(F=V,T) ←

[initiatedAt(F=V,T)]Qi-1 ←

slide-32
SLIDE 32

Incremental RTEC - Deletion phase

time ω time ω qi qi-1 qi-1 - ω qi - ω

happensAt(A,T), holdsAt(B=VB,T), not happensAt(C,T), not holdsAt(D=VD,T).

qi-1 [happensAt(A,T)] del v [holdsAt(B=VB,T)] del v [happensAt(C,T)] ins v [holdsAt(D=VD,T)] ins .

initiatedAt(F=V,T) ←

[initiatedAt(F=V,T)]Qi-1 ←

slide-33
SLIDE 33

Incremental RTEC - Addition phase

time ω qi qi-1 qi - ω

slide-34
SLIDE 34

Incremental RTEC - Addition phase

time ω qi qi-1 qi - ω [happensAt(A,T)] ins , [holdsAt(B=VB,T)] Qi , [not happensAt(C,T)] Qi , [not holdsAt(D=VD,T)] Qi .

slide-35
SLIDE 35

Incremental RTEC - Addition phase

time ω qi qi-1 qi - ω [happensAt(A,T)] ins , [holdsAt(B=VB,T)] Qi , [not happensAt(C,T)] Qi , [not holdsAt(D=VD,T)] Qi .

slide-36
SLIDE 36

Incremental RTEC - Addition phase

time ω qi qi-1 qi - ω [happensAt(A,T)] ins , [holdsAt(B=VB,T)] Qi , [not happensAt(C,T)] Qi , [not holdsAt(D=VD,T)] Qi .

slide-37
SLIDE 37

Incremental RTEC - Addition phase

time ω qi qi-1 qi - ω [happensAt(A,T)] ins , [holdsAt(B=VB,T)] Qi , [not happensAt(C,T)] Qi , [not holdsAt(D=VD,T)] Qi .

slide-38
SLIDE 38

Incremental RTEC - Addition phase

time ω qi qi-1 qi - ω [happensAt(A,T)] ins , [holdsAt(B=VB,T)] Qi , [not happensAt(C,T)] Qi , [not holdsAt(D=VD,T)] Qi .

slide-39
SLIDE 39

Incremental RTEC - Addition phase

time ω qi qi-1 qi - ω [happensAt(A,T)] ins , [holdsAt(B=VB,T)] Qi , [not happensAt(C,T)] Qi , [not holdsAt(D=VD,T)] Qi .

slide-40
SLIDE 40

Incremental RTEC - Addition phase

time ω qi qi-1 qi - ω [happensAt(A,T)] ins , [holdsAt(B=VB,T)] Qi , [not happensAt(C,T)] Qi , [not holdsAt(D=VD,T)] Qi .

slide-41
SLIDE 41

Incremental RTEC - Evaluation

◮ Delays up to 16 hours ◮ 17M position signals, 34K vessels ◮ European seas ◮ January 2016

slide-42
SLIDE 42

Incremental RTEC - Evaluation

◮ Delays up to 16 hours ◮ 17M position signals, 34K vessels ◮ European seas ◮ January 2016

1h 2h 4h 8h 16h 1 2 3 4 5 6

Window(hours) Avg Time (in minutes)

Incremental RTEC RTEC

(Left) Average recognition time and (Right) average number of input and complex events. Sliding step of 1 hour

slide-43
SLIDE 43

Summary

◮ Properties of the algorithm:

◮ Evaluation of small sets early ◮ Optimal rule rewriting ◮ Can handle retractions in the input

slide-44
SLIDE 44

Summary

◮ Properties of the algorithm:

◮ Evaluation of small sets early ◮ Optimal rule rewriting ◮ Can handle retractions in the input

◮ We have performed a complexity analysis of the incremental

version and have discovered the conditions that lead to better performance

slide-45
SLIDE 45

Summary

◮ Properties of the algorithm:

◮ Evaluation of small sets early ◮ Optimal rule rewriting ◮ Can handle retractions in the input

◮ We have performed a complexity analysis of the incremental

version and have discovered the conditions that lead to better performance

◮ Future work:

◮ Probabilistic version of the incremental algorithm