Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)

241 views

Published on

We introduce a formal notation for the processing of event traces called Stream Logic (SL). A monitor evaluates a Boolean condition over an input trace, while a filter outputs events from an input trace depending on some monitor's verdict; both constructs can be freely composed. We show how all operators of Linear Temporal Logic, as well as the parametric slicing of an input trace, can be written as Stream Logic constructs.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)

  1. 1. Runtime Monitoring of Stream Logic Formulæ Sylvain Hallé and Raphaël Khoury Fonds de recherche sur la nature et les technologies CRSNG NSERC Université du Québec à Chicoutimi, Canada
  2. 2. System
  3. 3. System
  4. 4. System Instrumentation
  5. 5. System Instrumentation
  6. 6. System Instrumentation Trace
  7. 7. System Instrumentation Trace Events
  8. 8. System Instrumentation Trace Events
  9. 9. System Instrumentation Trace Events Trace validation
  10. 10. Iterator<T>
  11. 11. Iterator<T> hasNext next
  12. 12. Iterator<T> hasNext next A call to next must be preceded by a call to hasNext
  13. 13. B A
  14. 14. B A No CartCreate request can occur before a LoginResponse message
  15. 15. Login
  16. 16. Login Three successive login attempts should trigger an alarm
  17. 17. Receive order
  18. 18. Receive order Ready?
  19. 19. Receive order Ready? Yes
  20. 20. Receive order Ready? Yes File order No Ship
  21. 21. Receive order Ready? Yes File order No Ship A received order must eventually be shipped
  22. 22. A 0 1 2 3 4 . . . a a b c b ℕ A trace m is a mapping from ℕ to the set of events : ALet be a set of event symbols.
  23. 23. A monitor takes as input an event trace and outputs a trace of truth values a c d T T T . . . T T c T T T . . . T T T . . . . . . T T T
  24. 24. Notation: m : φ Input trace Expression
  25. 25. The output of monitors can be combined using the usual logical connectives φ ∧ ψ T T . . .φ ∧ ψ T T . . .
  26. 26. Inputs and outputs may be delayed: the notation induces an implicit buffering T T . . .φ ∧ ψ T . . . Processing advances in discrete steps: an event is either produced or not at step n => delays != processing time T 1 2 T T 3 1 2 3 T
  27. 27. A filter takes as input an event trace and a monitor. It outputs event n if and only if the n-th output of its monitor is true. . . . φ ∞ ∞ φa c d a d
  28. 28. Notation: ∞ φ k φ Output all events (satisfying φ) Output only the k-th event satisfying φ
  29. 29. ∞ c ∨ d Output all events that satisfy c or d ∞ c 1 : T Output the first event that satisfies c c2 : T 1 ))b ∧ : T Monitor "some b is immediately followed by a c"
  30. 30. Linear Temporal Logic can be recursively mapped into filters and monitors μ(φ) 1 : Tμ(F φ) = μ(X φ) = μ(φ) 2 : T μ(φ U ψ) = μ(¬φ) 1 : T μ(ψ) 1 : T∧1 G φ F ψwhichever comes first
  31. 31. A call to next must be followed by a call to hasNext No CartCreate request can occur before a LoginResponse message A received order must eventually be shipped Three successive login attempts should trigger an alarm G (next → X hasNext) ¬ CartCreate U hasNext G (receive → F ship) G ¬(fail ∧ (X (fail ∧ X fail)))
  32. 32. A few identities can be applied... 1 : T 1 : T p 1 : T T ϵ : T ϵ
  33. 33. A few identities can be applied... 1 : T 1 : T p 1 : T T ϵ : T ϵ
  34. 34. A few identities can be applied... 1 : T 1 : T p 1 : T T ϵ : T ϵ
  35. 35. A few identities can be applied... 1 : T 1 : T p 1 : T T ϵ : T ϵ
  36. 36. A few identities can be applied... 1 : T 1 : T p 1 : T T ϵ : T ϵ μ(G F p) = = the empty trace
  37. 37. * 10 100 0 > 0 > 0 10 peeB peeB 3http://lif-labs.github.io/beepbeep-3 Principle further generalized and implemented in...

×