towards ideal semantics for analyzing stream reasoning
play

Towards Ideal Semantics for Analyzing Stream Reasoning Harald Beck - PowerPoint PPT Presentation

Towards Ideal Semantics for Analyzing Stream Reasoning Harald Beck Minh Dao-Tran Thomas Eiter Michael Fink International Workshop on Reactive Concepts in Knowledge Representation 2014 August 19, 2014 Scope & Motivation Windows &


  1. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) ◮ Normal DB: Query for trams and buses arriving at same station P Answer: i 1 , i 2 , p 1 and i 3 , i 4 , p 2 ◮ SQL SELECT * FROM tram, bus WHERE tram.P = bus.P H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  2. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream setting, at time 13: Query for H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  3. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream setting, at time 13: Query for ◮ Trams and buses arriving at same station P H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  4. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream setting, at time 13: Query for ◮ Trams and buses arriving at same station P within the last 5 min H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  5. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream setting, at time 13: Query for ◮ Trams and buses arriving at same station P within the last 5 min Answer: i 3 , i 4 , p 2 H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  6. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream setting, at time 13: Query for ◮ Trams and buses arriving at same station P within the last 5 min Answer: i 3 , i 4 , p 2 ◮ CQL SELECT * FROM tram [RANGE 5], bus [RANGE 5] WHERE tram.P = bus.P H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  7. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Trams and buses arriving at same station P within the last 5 min at the same time H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  8. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Trams and buses arriving at same station P within the last 5 min at the same time Answer: – H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  9. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 3 4 5 6 7 8 11 13 ◮ Trams and buses arriving at same station P within the last 5 min at the same time Answer: i 1 , i 2 , p 1 for query times 2 , . . . , 7 H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  10. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Trams and buses arriving at same station P within the last 5 min at the same time Answer: i 1 , i 2 , p 1 for query times 2 , . . . , 7 ◮ CQL: Not expressible in single query (Snapshot semantics) SELECT * AS tram bus FROM tram [NOW], bus [NOW] WHERE tram.P = bus.P H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  11. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) 0 2 8 11 13 ◮ Trams and buses arriving at same station P within the last 5 min at the same time Answer: i 1 , i 2 , p 1 for query times 2 , . . . , 7 ◮ CQL: Not expressible in single query (Snapshot semantics) SELECT * AS tram bus FROM tram [NOW], bus [NOW] WHERE tram.P = bus.P H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  12. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) 0 2 8 11 13 ◮ Trams and buses arriving at same station P within the last 5 min at the same time Answer: i 1 , i 2 , p 1 for query times 2 , . . . , 7 ◮ CQL: Not expressible in single query (Snapshot semantics) SELECT * AS tram bus FROM tram [NOW], bus [NOW] WHERE tram.P = bus.P SELECT * FROM tram bus [RANGE 5] H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  13. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Example: Trams and buses Arrival times at different stations p i bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) 0 2 8 11 13 ◮ Trams and buses arriving at same station P within the last 5 min at the same time Answer: i 1 , i 2 , p 1 for query times 2 , . . . , 7 ◮ CQL: Not expressible in single query (Snapshot semantics) SELECT * AS tram bus FROM tram [NOW], bus [NOW] WHERE tram.P = bus.P SELECT * FROM tram bus [RANGE 5] H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 2 / 15

  14. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Window Types bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Time-based H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 3 / 15

  15. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Window Types bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Time-based ◮ Tuple-based H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 3 / 15

  16. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Window Types bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Time-based ◮ Tuple-based ◮ Not necessarily unique. E.g.: Last 3 tuples H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 3 / 15

  17. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Window Types bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Time-based ◮ Tuple-based ◮ Not necessarily unique. E.g.: Last 3 tuples H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 3 / 15

  18. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Window Types bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Time-based ◮ Tuple-based ◮ Not necessarily unique. E.g.: Last 3 tuples ◮ Partition-based H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 3 / 15

  19. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Window Types bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Time-based ◮ Tuple-based ◮ Not necessarily unique. E.g.: Last 3 tuples ◮ Partition-based ◮ Apply tuple-based window on substreams H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 3 / 15

  20. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Windows ◮ Example: “In the last hour, did a bus always arrive within 5 min?” H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 4 / 15

  21. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Windows ◮ Example: “In the last hour, did a bus always arrive within 5 min?” H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 4 / 15

  22. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Windows ◮ Example: “In the last hour, did a bus always arrive within 5 min?” ◮ Allow for nesting: windows within windows ◮ As formal counterpart to repeated runs of continuous queries H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 4 / 15

  23. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Windows ◮ Example: “In the last hour, did a bus always arrive within 5 min?” ◮ Allow for nesting: windows within windows ◮ As formal counterpart to repeated runs of continuous queries ◮ Allow for looking into the future H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 4 / 15

  24. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Windows ◮ Example: “In the last hour, did a bus always arrive within 5 min?” ◮ Allow for nesting: windows within windows ◮ As formal counterpart to repeated runs of continuous queries ◮ Allow for looking into the future ◮ View window operators as first class citizens ◮ Do not separate window application (first) from logic (then) H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 4 / 15

  25. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Windows ◮ Example: “In the last hour, did a bus always arrive within 5 min?” ◮ Allow for nesting: windows within windows ◮ As formal counterpart to repeated runs of continuous queries ◮ Allow for looking into the future ◮ View window operators as first class citizens ◮ Do not separate window application (first) from logic (then) ◮ Leave open specific underlying window functions H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 4 / 15

  26. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Windows ◮ Example: “In the last hour, did a bus always arrive within 5 min?” ◮ Allow for nesting: windows within windows ◮ As formal counterpart to repeated runs of continuous queries ◮ Allow for looking into the future ◮ View window operators as first class citizens ◮ Do not separate window application (first) from logic (then) ◮ Leave open specific underlying window functions ◮ w ( S , t ) �→ S ′ ◮ Stream S , time point t ∈ N , new stream S ′ H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 4 / 15

  27. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 0 1 2 3 4 5 6 a a a H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  28. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . 0 1 2 3 4 5 6 • a a a H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  29. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  30. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  31. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  32. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  33. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a no H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  34. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a no . . . at time point 2 ? H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  35. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a no . . . at time point 2 ? @ 2 a H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  36. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a no . . . at time point 2 ? @ 2 a yes H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  37. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a no . . . at time point 2 ? @ 2 a yes . . . at some time point t ′ ? H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  38. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a no . . . at time point 2 ? @ 2 a yes . . . at some time point t ′ ? ♦ a H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  39. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a no . . . at time point 2 ? @ 2 a yes . . . at some time point t ′ ? ♦ a yes H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  40. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a no . . . at time point 2 ? @ 2 a yes . . . at some time point t ′ ? ♦ a yes . . . at all time points t ′ ? H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  41. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a no . . . at time point 2 ? @ 2 a yes . . . at some time point t ′ ? ♦ a yes . . . at all time points t ′ ? � a H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  42. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a no . . . at time point 2 ? @ 2 a yes . . . at some time point t ′ ? ♦ a yes . . . at all time points t ′ ? � a no H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  43. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Ideas for Time Reference ◮ Atoms a appearing in the stream at time points 1 , 2 , 5 ◮ Query time t = 4 . Window on interval [ 1 , 4 ] 0 1 2 3 4 5 6 • a a a ◮ Example queries: In this window, does a hold. . . . . . now, i.e., exactly at t ? a no . . . at time point 2 ? @ 2 a yes . . . at some time point t ′ ? ♦ a yes . . . at all time points t ′ ? � a no H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 5 / 15

  44. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Streams bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream S = ( T , υ ) , where H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 6 / 15

  45. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Streams bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream S = ( T , υ ) , where ◮ T : interval in N H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 6 / 15

  46. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Streams bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream S = ( T , υ ) , where ◮ T : interval in N ◮ υ : T → 2 G (interpretation of ground atoms G ) H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 6 / 15

  47. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Streams bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream S = ( T , υ ) , where ◮ T : interval in N ◮ υ : T → 2 G (interpretation of ground atoms G ) ◮ Example H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 6 / 15

  48. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Streams bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream S = ( T , υ ) , where ◮ T : interval in N ◮ υ : T → 2 G (interpretation of ground atoms G ) ◮ Example ◮ T = [ 0 , 13 ] H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 6 / 15

  49. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Streams bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream S = ( T , υ ) , where ◮ T : interval in N ◮ υ : T → 2 G (interpretation of ground atoms G ) ◮ Example ◮ T = [ 0 , 13 ] � 2 �→ { tram ( i 1 , p 1 ) , bus ( i 2 , p 1 ) } � ◮ υ = H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 6 / 15

  50. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Streams bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream S = ( T , υ ) , where ◮ T : interval in N ◮ υ : T → 2 G (interpretation of ground atoms G ) ◮ Example ◮ T = [ 0 , 13 ] � 2 �→ { tram ( i 1 , p 1 ) , bus ( i 2 , p 1 ) } , 8 �→ { tram ( i 3 , p 2 ) } � ◮ υ = H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 6 / 15

  51. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Streams bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream S = ( T , υ ) , where ◮ T : interval in N ◮ υ : T → 2 G (interpretation of ground atoms G ) ◮ Example ◮ T = [ 0 , 13 ] � 2 �→ { tram ( i 1 , p 1 ) , bus ( i 2 , p 1 ) } , 8 �→ { tram ( i 3 , p 2 ) } , � ◮ υ = 11 �→ { bus ( i 4 , p 2 ) } H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 6 / 15

  52. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Streams bus ( i 2 , p 1 ) tram ( i 1 , p 1 ) tram ( i 3 , p 2 ) bus ( i 4 , p 2 ) 0 2 8 11 13 ◮ Stream S = ( T , υ ) , where ◮ T : interval in N ◮ υ : T → 2 G (interpretation of ground atoms G ) ◮ Example ◮ T = [ 0 , 13 ] � 2 �→ { tram ( i 1 , p 1 ) , bus ( i 2 , p 1 ) } , 8 �→ { tram ( i 3 , p 2 ) } , � ◮ υ = 11 �→ { bus ( i 4 , p 2 ) } , i �→ ∅ else H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 6 / 15

  53. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Formulas ◮ Formulas defined by the grammar (atom a , t ∈ N timepoint) α ::= H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 7 / 15

  54. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Formulas ◮ Formulas defined by the grammar (atom a , t ∈ N timepoint) α ::= a | ¬ α | α ∧ α | α ∨ α | α → α H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 7 / 15

  55. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Formulas ◮ Formulas defined by the grammar (atom a , t ∈ N timepoint) α ::= a | ¬ α | α ∧ α | α ∨ α | α → α | ♦ α | � α | @ t α H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 7 / 15

  56. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Formulas ◮ Formulas defined by the grammar (atom a , t ∈ N timepoint) α ::= a | ¬ α | α ∧ α | α ∨ α | α → α | ♦ α | � α | @ t α | ⊞ i α ◮ ⊞ i window operator: change view on stream H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 7 / 15

  57. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Formulas ◮ Formulas defined by the grammar (atom a , t ∈ N timepoint) α ::= a | ¬ α | α ∧ α | α ∨ α | α → α | ♦ α | � α | @ t α | ⊞ i α ◮ ⊞ i window operator: change view on stream ◮ Utilizing window function with identifier i H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 7 / 15

  58. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Formulas ◮ Formulas defined by the grammar (atom a , t ∈ N timepoint) α ::= a | ¬ α | α ∧ α | α ∨ α | α → α | ♦ α | � α | @ t α | ⊞ i α ◮ ⊞ i window operator: change view on stream ◮ Utilizing window function with identifier i ◮ Change considered substream based on current time point, and ◮ current window, or ◮ original stream H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 7 / 15

  59. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Formulas ◮ Formulas defined by the grammar (atom a , t ∈ N timepoint) α ::= a | ¬ α | α ∧ α | α ∨ α | α → α | ♦ α | � α | @ t α | ⊞ i α ◮ ⊞ i window operator: change view on stream ◮ Utilizing window function with identifier i ◮ Change considered substream based on current time point, and ◮ current window, or ◮ original stream ◮ Window operator = window function + stream choice function H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 7 / 15

  60. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Formulas ◮ Formulas defined by the grammar (atom a , t ∈ N timepoint) α ::= a | ¬ α | α ∧ α | α ∨ α | α → α | ♦ α | � α | @ t α | ⊞ i α ◮ ⊞ i window operator: change view on stream ◮ Utilizing window function with identifier i ◮ Change considered substream based on current time point, and ◮ current window, or ◮ original stream ◮ Window operator = window function + stream choice function ◮ Why keep the original stream? H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 7 / 15

  61. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Nested Windows and Stream Choice ◮ “For the last two trams, did a bus always appear within 5 min?” bus tram tram bus 0 2 8 11 13 H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 8 / 15

  62. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Nested Windows and Stream Choice ◮ “For the last two trams, did a bus always appear within 5 min?” bus tram tram bus 0 2 8 11 13 ◮ Partition-based window H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 8 / 15

  63. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Nested Windows and Stream Choice ◮ “For the last two trams, did a bus always appear within 5 min?” bus tram tram bus 0 2 8 11 13 ◮ Partition-based window ◮ Partition stream into substreams: trams vs. buses H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 8 / 15

  64. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Nested Windows and Stream Choice ◮ “For the last two trams, did a bus always appear within 5 min?” tram tram 2 8 13 ◮ Partition-based window ◮ Partition stream into substreams: trams vs. buses ◮ Apply tuple-based windows on substreams: 2 trams, 0 buses H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 8 / 15

  65. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Nested Windows and Stream Choice ◮ “For the last two trams, did a bus always appear within 5 min?” tram tram 2 8 13 ◮ Partition-based window ◮ Partition stream into substreams: trams vs. buses ◮ Apply tuple-based windows on substreams: 2 trams, 0 buses ◮ In the new view, buses are invisible H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 8 / 15

  66. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Nested Windows and Stream Choice ◮ “For the last two trams, did a bus always appear within 5 min?” tram tram 2 7 8 13 ◮ Partition-based window ◮ Partition stream into substreams: trams vs. buses ◮ Apply tuple-based windows on substreams: 2 trams, 0 buses ◮ In the new view, buses are invisible ◮ ⇒ For “within 5 min” window: use data of original stream again H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 8 / 15

  67. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Nested Windows and Stream Choice ◮ “For the last two trams, did a bus always appear within 5 min?” bus tram tram bus 2 7 8 11 13 ◮ Partition-based window ◮ Partition stream into substreams: trams vs. buses ◮ Apply tuple-based windows on substreams: 2 trams, 0 buses ◮ In the new view, buses are invisible ◮ ⇒ For “within 5 min” window: use data of original stream again H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 8 / 15

  68. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Semantics: Structure ◮ Structure M = � T , υ, ˆ W � , where H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 9 / 15

  69. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Semantics: Structure ◮ Structure M = � T , υ, ˆ W � , where ◮ ( T , υ ) original stream H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 9 / 15

  70. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Semantics: Structure ◮ Structure M = � T , υ, ˆ W � , where ◮ ( T , υ ) original stream ◮ ˆ W mapping from idenfiers (in N ) to extended window functions H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 9 / 15

  71. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Semantics: Structure ◮ Structure M = � T , υ, ˆ W � , where ◮ ( T , υ ) original stream ◮ ˆ W mapping from idenfiers (in N ) to extended window functions ◮ choice function ch ( S 1 , S 2 ) �→ S ′ w ( S 1 , S 2 , t ) = w ( ch ( S 1 , S 2 ) , t ) ˆ H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 9 / 15

  72. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Semantics: Structure ◮ Structure M = � T , υ, ˆ W � , where ◮ ( T , υ ) original stream ◮ ˆ W mapping from idenfiers (in N ) to extended window functions ◮ choice function ch ( S 1 , S 2 ) �→ S ′ w ( S 1 , S 2 , t ) = w ( ch ( S 1 , S 2 ) , t ) ˆ ◮ Example H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 9 / 15

  73. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Semantics: Structure ◮ Structure M = � T , υ, ˆ W � , where ◮ ( T , υ ) original stream ◮ ˆ W mapping from idenfiers (in N ) to extended window functions ◮ choice function ch ( S 1 , S 2 ) �→ S ′ w ( S 1 , S 2 , t ) = w ( ch ( S 1 , S 2 ) , t ) ˆ ◮ Example ◮ w 5 time-based window for last 5 minutes H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 9 / 15

  74. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Semantics: Structure ◮ Structure M = � T , υ, ˆ W � , where ◮ ( T , υ ) original stream ◮ ˆ W mapping from idenfiers (in N ) to extended window functions ◮ choice function ch ( S 1 , S 2 ) �→ S ′ w ( S 1 , S 2 , t ) = w ( ch ( S 1 , S 2 ) , t ) ˆ ◮ Example ◮ w 5 time-based window for last 5 minutes ◮ ch 2 choice that selects the second stream ( ch 2 ( S 1 , S 2 ) = S 2 ) H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 9 / 15

  75. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Semantics: Structure ◮ Structure M = � T , υ, ˆ W � , where ◮ ( T , υ ) original stream ◮ ˆ W mapping from idenfiers (in N ) to extended window functions ◮ choice function ch ( S 1 , S 2 ) �→ S ′ w ( S 1 , S 2 , t ) = w ( ch ( S 1 , S 2 ) , t ) ˆ ◮ Example ◮ w 5 time-based window for last 5 minutes ◮ ch 2 choice that selects the second stream ( ch 2 ( S 1 , S 2 ) = S 2 ) ◮ ˆ w 5 , where ˆ w 5 ( S 1 , S 2 , t ) = w 5 ( S 2 , t ) W ( 1 ) = ˆ H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 9 / 15

  76. Scope & Motivation Windows & Time Framework Examples Conclusion & Outlook Semantics: Entailment ◮ Structure M = � T , υ, ˆ W � with original stream S M = ( T , υ ) H. Beck (TU Vienna) Towards Ideal Semantics for Analyzing Stream Reasoning ReactKnow’14 10 / 15

Recommend


More recommend