Towards a Logic-Based Framework for Analyzing Stream Reasoning - - PowerPoint PPT Presentation

towards a logic based framework for analyzing stream
SMART_READER_LITE
LIVE PREVIEW

Towards a Logic-Based Framework for Analyzing Stream Reasoning - - PowerPoint PPT Presentation

Towards a Logic-Based Framework for Analyzing Stream Reasoning Harald Beck Minh Dao-Tran Thomas Eiter Michael Fink 3rd International Workshop on Ordering and Reasoning October 20, 2014 Motivation Streams Logical Framework Conclusions


slide-1
SLIDE 1

Towards a Logic-Based Framework for Analyzing Stream Reasoning

Harald Beck Minh Dao-Tran Thomas Eiter Michael Fink 3rd International Workshop on Ordering and Reasoning October 20, 2014

slide-2
SLIDE 2

Motivation Streams Logical Framework Conclusions

What & Why

“Towards a Logic-Based Framework for Analyzing Stream Reasoning”

◮ Stream Reasoning

1 / 11

slide-3
SLIDE 3

Motivation Streams Logical Framework Conclusions

What & Why

“Towards a Logic-Based Framework for Analyzing Stream Reasoning”

◮ Stream Reasoning: Logical reasoning on streaming data

1 / 11

slide-4
SLIDE 4

Motivation Streams Logical Framework Conclusions

What & Why

“Towards a Logic-Based Framework for Analyzing Stream Reasoning”

◮ Stream Reasoning: Logical reasoning on streaming data

◮ Streams = tuples (atoms) with timestamps ◮ Essential aspect: window functions 1 / 11

slide-5
SLIDE 5

Motivation Streams Logical Framework Conclusions

What & Why

“Towards a Logic-Based Framework for Analyzing Stream Reasoning”

◮ Stream Reasoning: Logical reasoning on streaming data

◮ Streams = tuples (atoms) with timestamps ◮ Essential aspect: window functions

◮ Logic-Based

1 / 11

slide-6
SLIDE 6

Motivation Streams Logical Framework Conclusions

What & Why

“Towards a Logic-Based Framework for Analyzing Stream Reasoning”

◮ Stream Reasoning: Logical reasoning on streaming data

◮ Streams = tuples (atoms) with timestamps ◮ Essential aspect: window functions

◮ Logic-Based: Lack of theory

1 / 11

slide-7
SLIDE 7

Motivation Streams Logical Framework Conclusions

What & Why

“Towards a Logic-Based Framework for Analyzing Stream Reasoning”

◮ Stream Reasoning: Logical reasoning on streaming data

◮ Streams = tuples (atoms) with timestamps ◮ Essential aspect: window functions

◮ Logic-Based: Lack of theory ◮ Analysis

1 / 11

slide-8
SLIDE 8

Motivation Streams Logical Framework Conclusions

What & Why

“Towards a Logic-Based Framework for Analyzing Stream Reasoning”

◮ Stream Reasoning: Logical reasoning on streaming data

◮ Streams = tuples (atoms) with timestamps ◮ Essential aspect: window functions

◮ Logic-Based: Lack of theory ◮ Analysis: Hard to predict, hard to compare

1 / 11

slide-9
SLIDE 9

Motivation Streams Logical Framework Conclusions

Example: Public Transportation Monitoring

ℓ2 ℓ1 p1 p3 p2

2 / 11

slide-10
SLIDE 10

Motivation Streams Logical Framework Conclusions

Example: Public Transportation Monitoring

PLAN LINE L X Y Z ID L ℓ1 p1 p3 8 a1 ℓ1 ℓ2 p2 p3 3 a2 ℓ2 . . . . . . OLD a1 . . . ℓ2 ℓ1 p1 p3 p2

2 / 11

slide-11
SLIDE 11

Motivation Streams Logical Framework Conclusions

Example: Public Transportation Monitoring

PLAN LINE L X Y Z ID L ℓ1 p1 p3 8 a1 ℓ1 ℓ2 p2 p3 3 a2 ℓ2 . . . . . . OLD a1 . . . ℓ2 ℓ1 p1 p3 p2 t 36 40 tram(a1, p1) tram(a2, p2)

2 / 11

slide-12
SLIDE 12

Motivation Streams Logical Framework Conclusions

Example: Public Transportation Monitoring

PLAN LINE L X Y Z ID L ℓ1 p1 p3 8 a1 ℓ1 ℓ2 p2 p3 3 a2 ℓ2 . . . . . . OLD a1 . . . ℓ2 ℓ1 p1 p3 p2 t 36 40 tram(a1, p1) tram(a2, p2) 43 44

◮ Report trams’ expected arrival time.

2 / 11

slide-13
SLIDE 13

Motivation Streams Logical Framework Conclusions

Example: Public Transportation Monitoring

PLAN LINE L X Y Z ID L ℓ1 p1 p3 8 a1 ℓ1 ℓ2 p2 p3 3 a2 ℓ2 . . . . . . OLD a1 . . . ℓ2 ℓ1 p1 p3 p2 t 36 40 tram(a1, p1) tram(a2, p2) 43 44 waiting time

◮ Report trams’ expected arrival time. ◮ Report good connections between two lines at a given stop.

2 / 11

slide-14
SLIDE 14

Motivation Streams Logical Framework Conclusions

Streams

◮ Data Stream D = (T, υ)

T = [0, 50] υ = {36 → {tram(a1, p1)}, 40 → {tram(a2, p2)}}

3 / 11

slide-15
SLIDE 15

Motivation Streams Logical Framework Conclusions

Streams

◮ Data Stream D = (T, υ)

T = [0, 50] υ = {36 → {tram(a1, p1)}, 40 → {tram(a2, p2)}}

◮ Interpretation Stream S⋆ = (T⋆, υ⋆) ⊇ D

T⋆ = [0, 50] υ⋆ = 36 → {tram(a1, p1)}, 40 → {tram(a2, p2)}, 43 → {exp(a2, p3)}, 44 → {exp(a1, p3)}

  • 3 / 11
slide-16
SLIDE 16

Motivation Streams Logical Framework Conclusions

Window Functions

36 37 38 39 40 41 42 43 44 45 tram(a

1

, p

1

) tram(a

2

, p

2

) exp(a

2

, p

3

) exp(a

1

, p

3

)

S′ = wι(S, t, x)

4 / 11

slide-17
SLIDE 17

Motivation Streams Logical Framework Conclusions

Window Functions

36 37 38 39 40 41 42 43 44 45

u tram(a

1

, p

1

) tram(a

2

, p

2

) exp(a

2

, p

3

) exp(a

1

, p

3

)

S′ = wτ(S⋆, 40, (1, 5, 1)) = ([39, 45],    40 → {tram(a2, p2)}, 43 → {exp(a2, p3)}, 44 → {exp(a1, p3)}   )

4 / 11

slide-18
SLIDE 18

Motivation Streams Logical Framework Conclusions

Window Operators

x ι,ch ⇐

⇒ wι(ch(S⋆, S), t, x)

5 / 11

slide-19
SLIDE 19

Motivation Streams Logical Framework Conclusions

Window Operators

x ι,ch ⇐

⇒ wι(ch(S⋆, S), t, x)

◮ ch: stream choice

ch1(S⋆, S) = S⋆ ch2(S⋆, S) = S

5 / 11

slide-20
SLIDE 20

Motivation Streams Logical Framework Conclusions

Window Operators

x ι,ch ⇐

⇒ wι(ch(S⋆, S), t, x)

◮ ch: stream choice

ch1(S⋆, S) = S⋆ ch2(S⋆, S) = S

◮ ⊞10 τ = ⊞10,0,1 τ,ch2

wτ(ch2(S⋆, S), t, (10, 0, 1)) = wτ(S, t, (10, 0, 1))

5 / 11

slide-21
SLIDE 21

Motivation Streams Logical Framework Conclusions

Window Operators

x ι,ch ⇐

⇒ wι(ch(S⋆, S), t, x)

◮ ch: stream choice

ch1(S⋆, S) = S⋆ ch2(S⋆, S) = S

◮ ⊞+5 τ

= ⊞0,5,1

τ,ch2

wτ(ch2(S⋆, S), t, (0, 5, 1)) = wτ(S, t, (0, 5, 1))

5 / 11

slide-22
SLIDE 22

Motivation Streams Logical Framework Conclusions

Formulas

α ::=

6 / 11

slide-23
SLIDE 23

Motivation Streams Logical Framework Conclusions

Formulas

α ::= a | ¬α | α ∧ α | α ∨ α | α → α

6 / 11

slide-24
SLIDE 24

Motivation Streams Logical Framework Conclusions

Formulas

α ::= a | ¬α | α ∧ α | α ∨ α | α → α | ♦α | α | @tα

◮ various ways for time references

6 / 11

slide-25
SLIDE 25

Motivation Streams Logical Framework Conclusions

Formulas

α ::= a | ¬α | α ∧ α | α ∨ α | α → α | ♦α | α | @tα | ⊞

x ι,chα ◮ various ways for time references ◮ nesting of window operators

⊞60

τ ⊞5 τ ♦tramAt(p1)

6 / 11

slide-26
SLIDE 26

Motivation Streams Logical Framework Conclusions

Formulas

α ::= a | ¬α | α ∧ α | α ∨ α | α → α | ♦α | α | @tα | ⊞

x ι,chα ◮ various ways for time references ◮ nesting of window operators

⊞60

τ ⊞5 τ ♦tramAt(p1) ◮ but need rules:

tramAt(P) ← tram(X, P).

6 / 11

slide-27
SLIDE 27

Motivation Streams Logical Framework Conclusions

Entailment

◮ Structure M = T⋆, υ⋆, W, B

7 / 11

slide-28
SLIDE 28

Motivation Streams Logical Framework Conclusions

Entailment

◮ Structure M = T⋆, υ⋆, W, B ◮ Substream S = (T, υ) of S⋆: currently considered window ◮ Time point t ∈ T

7 / 11

slide-29
SLIDE 29

Motivation Streams Logical Framework Conclusions

Entailment

◮ Structure M = T⋆, υ⋆, W, B ◮ Substream S = (T, υ) of S⋆: currently considered window ◮ Time point t ∈ T

M, S, t a iff a ∈ υ(t) ,

7 / 11

slide-30
SLIDE 30

Motivation Streams Logical Framework Conclusions

Entailment

◮ Structure M = T⋆, υ⋆, W, B ◮ Substream S = (T, υ) of S⋆: currently considered window ◮ Time point t ∈ T

M, S, t a iff a ∈ υ(t) , M, S, t ¬α iff M, S, t α, M, S, t α ∧ β iff M, S, t α and M, S, t β, M, S, t α ∨ β iff M, S, t α or M, S, t β, M, S, t α → β iff M, S, t α or M, S, t β,

7 / 11

slide-31
SLIDE 31

Motivation Streams Logical Framework Conclusions

Entailment

◮ Structure M = T⋆, υ⋆, W, B ◮ Substream S = (T, υ) of S⋆: currently considered window ◮ Time point t ∈ T

M, S, t a iff a ∈ υ(t) , M, S, t ¬α iff M, S, t α, M, S, t α ∧ β iff M, S, t α and M, S, t β, M, S, t α ∨ β iff M, S, t α or M, S, t β, M, S, t α → β iff M, S, t α or M, S, t β, M, S, t ♦α iff M, S, t′ α for some t′ ∈ T,

7 / 11

slide-32
SLIDE 32

Motivation Streams Logical Framework Conclusions

Entailment

◮ Structure M = T⋆, υ⋆, W, B ◮ Substream S = (T, υ) of S⋆: currently considered window ◮ Time point t ∈ T

M, S, t a iff a ∈ υ(t) , M, S, t ¬α iff M, S, t α, M, S, t α ∧ β iff M, S, t α and M, S, t β, M, S, t α ∨ β iff M, S, t α or M, S, t β, M, S, t α → β iff M, S, t α or M, S, t β, M, S, t ♦α iff M, S, t′ α for some t′ ∈ T, M, S, t α iff M, S, t′ α for all t′ ∈ T ,

7 / 11

slide-33
SLIDE 33

Motivation Streams Logical Framework Conclusions

Entailment

◮ Structure M = T⋆, υ⋆, W, B ◮ Substream S = (T, υ) of S⋆: currently considered window ◮ Time point t ∈ T

M, S, t a iff a ∈ υ(t) , M, S, t ¬α iff M, S, t α, M, S, t α ∧ β iff M, S, t α and M, S, t β, M, S, t α ∨ β iff M, S, t α or M, S, t β, M, S, t α → β iff M, S, t α or M, S, t β, M, S, t ♦α iff M, S, t′ α for some t′ ∈ T, M, S, t α iff M, S, t′ α for all t′ ∈ T , M, S, t @t′α iff M, S, t′ α and t′ ∈ T ,

7 / 11

slide-34
SLIDE 34

Motivation Streams Logical Framework Conclusions

Entailment

◮ Structure M = T⋆, υ⋆, W, B ◮ Substream S = (T, υ) of S⋆: currently considered window ◮ Time point t ∈ T

M, S, t a iff a ∈ υ(t) , M, S, t ¬α iff M, S, t α, M, S, t α ∧ β iff M, S, t α and M, S, t β, M, S, t α ∨ β iff M, S, t α or M, S, t β, M, S, t α → β iff M, S, t α or M, S, t β, M, S, t ♦α iff M, S, t′ α for some t′ ∈ T, M, S, t α iff M, S, t′ α for all t′ ∈ T , M, S, t @t′α iff M, S, t′ α and t′ ∈ T , M, S, t ⊞

x ι,chα

iff M, S′, t α where S′ = w

x ι(ch(S⋆, S), t,

x).

7 / 11

slide-35
SLIDE 35

Motivation Streams Logical Framework Conclusions

Entailment: Example

36 37 38 39 40 41 42 43 44 45 tram(a

1

, p

1

) tram(a

2

, p

2

) exp(a

2

, p

3

) exp(a

1

, p

3

)

M, S⋆, 40 ⊞+5

τ ♦exp(a1, p3)

8 / 11

slide-36
SLIDE 36

Motivation Streams Logical Framework Conclusions

Entailment: Example

36 37 38 39 40 41 42 43 44 45

  • tram(a

1

, p

1

) tram(a

2

, p

2

) exp(a

2

, p

3

) exp(a

1

, p

3

)

M, S⋆, 40 ⊞+5

τ ♦exp(a1, p3)

⇑ M, S, 40 ♦exp(a1, p3)

8 / 11

slide-37
SLIDE 37

Motivation Streams Logical Framework Conclusions

Entailment: Example

36 37 38 39 40 41 42 43 44 45

  • tram(a

1

, p

1

) tram(a

2

, p

2

) exp(a

2

, p

3

) exp(a

1

, p

3

)

M, S⋆, 40 ⊞+5

τ ♦exp(a1, p3)

⇑ M, S, 40 ♦exp(a1, p3) ⇑ M, S, 44 exp(a1, p3)

8 / 11

slide-38
SLIDE 38

Motivation Streams Logical Framework Conclusions

Rules & Programs

◮ Rule: α ← β1, . . . , βj, not βj+1, . . . , not βn

9 / 11

slide-39
SLIDE 39

Motivation Streams Logical Framework Conclusions

Rules & Programs

◮ Rule: α ← β1, . . . , βj, not βj+1, . . . , not βn ◮ Program: set of rules.

9 / 11

slide-40
SLIDE 40

Motivation Streams Logical Framework Conclusions

Rules & Programs

◮ Rule: α ← β1, . . . , βj, not βj+1, . . . , not βn ◮ Program: set of rules. ◮ Example:

P =                        @Texp(ID, Y) ← ⊞idx,n

p

@T1tram(ID, X), line(ID, L), plan(L, X, Y, Z), T = T1 + Z.                       

9 / 11

slide-41
SLIDE 41

Motivation Streams Logical Framework Conclusions

Rules & Programs

◮ Rule: α ← β1, . . . , βj, not βj+1, . . . , not βn ◮ Program: set of rules. ◮ Example:

P =                        @Texp(ID, Y) ← ⊞idx,n

p

@T1tram(ID, X), line(ID, L), plan(L, X, Y, Z), T = T1 + Z. gc(ID1, ID2, X) ← @Texp(ID1, X), @T ⊞+5

τ

♦exp(ID2, X), not old(ID2).                       

9 / 11

slide-42
SLIDE 42

Motivation Streams Logical Framework Conclusions

Answers (of a program P)

◮ Data stream: D = (T, υ)

10 / 11

slide-43
SLIDE 43

Motivation Streams Logical Framework Conclusions

Answers (of a program P)

◮ Data stream: D = (T, υ) ◮ Interpretation stream: S⋆ = (T⋆, υ⋆) ⊇ D

10 / 11

slide-44
SLIDE 44

Motivation Streams Logical Framework Conclusions

Answers (of a program P)

◮ Data stream: D = (T, υ) ◮ Interpretation stream: S⋆ = (T⋆, υ⋆) ⊇ D ◮ Interpretation: M = T⋆, υ⋆, W, B

10 / 11

slide-45
SLIDE 45

Motivation Streams Logical Framework Conclusions

Answers (of a program P)

◮ Data stream: D = (T, υ) ◮ Interpretation stream: S⋆ = (T⋆, υ⋆) ⊇ D ◮ Interpretation: M = T⋆, υ⋆, W, B ◮ Model: M, t |

= P ⇔ M, S⋆, t β(r) → α, where β(r) = β1 ∧ . . . βj ∧ ¬βj+1 ∧ . . . ∧ ¬βn.

10 / 11

slide-46
SLIDE 46

Motivation Streams Logical Framework Conclusions

Answers (of a program P)

◮ Data stream: D = (T, υ) ◮ Interpretation stream: S⋆ = (T⋆, υ⋆) ⊇ D ◮ Interpretation: M = T⋆, υ⋆, W, B ◮ Model: M, t |

= P ⇔ M, S⋆, t β(r) → α, where β(r) = β1 ∧ . . . βj ∧ ¬βj+1 ∧ . . . ∧ ¬βn.

◮ Minimal model: ∃M′ = T′, υ′, W, B ⊂ M s.t. M′, t |

= P

10 / 11

slide-47
SLIDE 47

Motivation Streams Logical Framework Conclusions

Answers (of a program P)

◮ Data stream: D = (T, υ) ◮ Interpretation stream: S⋆ = (T⋆, υ⋆) ⊇ D ◮ Interpretation: M = T⋆, υ⋆, W, B ◮ Model: M, t |

= P ⇔ M, S⋆, t β(r) → α, where β(r) = β1 ∧ . . . βj ∧ ¬βj+1 ∧ . . . ∧ ¬βn.

◮ Minimal model: ∃M′ = T′, υ′, W, B ⊂ M s.t. M′, t |

= P

◮ Reduct: PM,t = {r ∈ P | M, t |

= β(r)}

10 / 11

slide-48
SLIDE 48

Motivation Streams Logical Framework Conclusions

Answers (of a program P)

◮ Data stream: D = (T, υ) ◮ Interpretation stream: S⋆ = (T⋆, υ⋆) ⊇ D ◮ Interpretation: M = T⋆, υ⋆, W, B ◮ Model: M, t |

= P ⇔ M, S⋆, t β(r) → α, where β(r) = β1 ∧ . . . βj ∧ ¬βj+1 ∧ . . . ∧ ¬βn.

◮ Minimal model: ∃M′ = T′, υ′, W, B ⊂ M s.t. M′, t |

= P

◮ Reduct: PM,t = {r ∈ P | M, t |

= β(r)}

◮ Answer: M is an answer of P (for D at time t) iff M is a minimal

model of PM,t

10 / 11

slide-49
SLIDE 49

Motivation Streams Logical Framework Conclusions

Conclusion Stream

? | = ? t − k

◮ Past: Lack of theoretical underpinning for stream reasoning

11 / 11

slide-50
SLIDE 50

Motivation Streams Logical Framework Conclusions

Conclusion Stream

? | = ? c ← ⊞(a ∧ ♦b) t − k t (now)

◮ Past: Lack of theoretical underpinning for stream reasoning ◮ Now: First language for modelling semantics precisely

◮ flexible window operator (first class citizen) ◮ time reference / time abstraction ◮ rule-based semantics ◮ more: capturing a fragment of CQL 11 / 11

slide-51
SLIDE 51

Motivation Streams Logical Framework Conclusions

Conclusion Stream

? | = ? c ← ⊞(a ∧ ♦b) more capturing complexity properties t − k t (now) t + ε

◮ Past: Lack of theoretical underpinning for stream reasoning ◮ Now: First language for modelling semantics precisely

◮ flexible window operator (first class citizen) ◮ time reference / time abstraction ◮ rule-based semantics ◮ more: capturing a fragment of CQL

◮ Later: Language properties, complexity analysis, capture CQL,

ETALIS, C-SPARQL, CQELS,...

11 / 11

slide-52
SLIDE 52

Motivation Streams Logical Framework Conclusions

Conclusion Stream

? | = ? c ← ⊞(a ∧ ♦b) more capturing complexity properties distributed t − k t (now) t + ε t + n

◮ Past: Lack of theoretical underpinning for stream reasoning ◮ Now: First language for modelling semantics precisely

◮ flexible window operator (first class citizen) ◮ time reference / time abstraction ◮ rule-based semantics ◮ more: capturing a fragment of CQL

◮ Later: Language properties, complexity analysis, capture CQL,

ETALIS, C-SPARQL, CQELS,...

◮ Eventually: Distributed setting, heterogeneous nodes

11 / 11