the relational database engine
play

The Relational Database Engine: An Efficient Validator of T emporal - PowerPoint PPT Presentation

The Relational Database Engine: An Efficient Validator of T emporal Properties on Event T races Jason Vallet, Aouatef Mrad, Sylvain Hall*, ric Beaudet Universit du Qubec Chicoutimi Novum Solutions CANADA CANADA Fonds de


  1. The Relational Database Engine: An Efficient Validator of T emporal Properties on Event T races Jason Vallet, Aouatef Mrad, Sylvain Hallé*, Éric Beaudet Université du Québec à Chicoutimi Novum Solutions CANADA CANADA Fonds de recherche sur la nature NSERC et les technologies CRSNG Sylvain Hallé

  2. How high is this building? How high is this building? ? Sylvain Hallé

  3. How high is this building? Sylvain Hallé

  4. How high is this building? h = 4.9 t 2 Sylvain Hallé

  5. How high is this building? h T = 2π 9.8 Sylvain Hallé

  6. How high is this building? c 2 h = T Sylvain Hallé

  7. How high is this building? p g M ( ( R L p = p 1 - L h 0 T 0 Sylvain Hallé

  8. How high is this building? How high is this building? Answer derived from indirect measurements No single "best" solution Sylvain Hallé Sylvain Hallé

  9. T race validation ? τ ⊧ φ A sequence of satisfies Some assertion events on that sequence Web server log Algos FSM Execution trace Tools LTL . . . . . . Sylvain Hallé Sylvain Hallé

  10. > T < r o t a r e t I

  11. hasNext > T < r o t a r e t I next

  12. A call to next must be preceded by a call to hasNext hasNext > T < r o t a r e t I next

  13. A B

  14. No CartCreate request can occur before a LoginResponse message A B

  15. Login

  16. Three successive login attempts should trigger an alarm Login

  17. Receive order

  18. Ready? Receive order

  19. Yes Ready? Receive order

  20. Yes Ready? No Receive order Ship File order

  21. A received order must eventually be shipped Yes Ready? No Receive order Ship File order

  22. Let be a set of event symbols. A A trace m is a mapping from ℕ to the set of events : . . . 0 1 2 3 4 ℕ c a a b b A

  23. X next ¬ → ∧ G globally + + A F eventually ¬ → ∧ U until Ground Boolean Temporal terms connectives operators = Linear Temporal Logic

  24. Let be the set of all possible LTL formulas. Φ ℕ The function ℒ : Φ → 2 labels each state with a set of LTL formulas . . . 0 1 2 3 4 ℕ c a a b b A

  25. Let be the set of all possible LTL formulas. Φ ℕ The function ℒ : Φ → 2 labels each state with a set of LTL formulas b b b ℒ G (a → b) G (a → b) c b ∨ c ∧ ∧ ∧ ∨ b a a a . . . 0 1 2 3 4 ℕ c a a b b A Example: ℒ (a ∧ b) = {0,1,4,...}

  26. ⇔ m ( i ) = a i ∈ ℒ (a) i ∈ ℒ (¬ φ ) ⇔ i ∉ ℒ ( φ ) i ∈ ℒ ( φ∧ψ ) ⇔ i ∈ ℒ ( φ ) and i ∈ ℒ ( ψ ) i ∈ ℒ ( φ∨ψ ) ⇔ i ∈ ℒ ( φ ) or i ∈ ℒ ( ψ ) i ∈ ℒ ( X φ ) ⇔ i +1 ∈ ℒ ( φ ) i ∈ ℒ ( G φ ) ⇔ j ∈ ℒ ( φ ) for all j ≥ i i ∈ ℒ ( F φ ) ⇔ j ∈ ℒ ( φ ) for some j ≥ i i ∈ ℒ ( φ U ψ ) ⇔ j ∈ ℒ ( ψ ) for some j ≥ i and k ∈ ℒ ( φ ) for all j ≥ k ≥ i

  27. Theorem i ∈ ℒ ( φ ) exactly when the trace m ( i ), m ( i +1), ... satisfies φ φ φ ψ ψ σ σ . . . 0 1 2 3 4

  28. Theorem i ∈ ℒ ( φ ) exactly when the trace m ( i ), m ( i +1), ... satisfies φ φ φ ψ ψ σ σ . . . 0 1 2 3 4 Therefore... 0 ∈ ℒ ( φ ) ⇔ m ⊧ φ

  29. 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

  30. A call to next must be followed by a call to hasNext G (next → X 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

  31. A call to next must be followed by a call to hasNext G (next → X hasNext) No CartCreate request can occur before a LoginResponse message ¬ CartCreate U hasNext A received order must eventually be shipped Three successive login attempts should trigger an alarm

  32. A call to next must be followed by a call to hasNext G (next → X hasNext) No CartCreate request can occur before a LoginResponse message ¬ CartCreate U hasNext A received order must eventually be shipped G (receive → F ship) Three successive login attempts should trigger an alarm

  33. A call to next must be followed by a call to hasNext G (next → X hasNext) No CartCreate request can occur before a LoginResponse message ¬ CartCreate U hasNext A received order must eventually be shipped G (receive → F ship) Three successive login attempts should trigger an alarm G ¬(fail ∧ ( X (fail ∧ X fail)))

  34. Four types of traces τ : a mapping from ℕ to events in E = { e ₀ , e ₁ , ...} 1 2 3 4 Multi-valued Single-valued Fixed schema Atomic e ᵢ : P ᵢ → 2 V e ᵢ : P ᵢ → V e ᵢ : P → V e ᵢ = a Parameters Values <event> <event> p q r <p>13</p> <p>13</p> 13 8 6 <q>8</q> <q>8</q> 12 4 10 <q>6</q> <r>6</r> 9 2 8 </event> </event> Sylvain Hallé

  35. Specification languages φ : an expression in some specification language Linear Temporal Logic (LTL) G p ₀ ≠ 0 First-order Linear Temporal Logic (LTL-FO+) F ( ∀ x ∈ /event/ p ₀ : x = 0) Regular expressions ^a+b.*b?c$ SQL SELECT * FROM events WHERE p0=0... Sylvain Hallé

  36. Software and algorithms ⊧ : an algorithm to evaluate satisfiability 〈 T , L 〉 for inputs in format T against assertions in language L BeepBeep, Monid, Logscope, MySQL, ProM, NuSMV , Spin, SEQ.OPEN, . . . Sylvain Hallé

  37. Saxon BeepBeep NuSMV Spin MySQL Maude MonPoly Islands? 〈 LTL, single-valued 〉 〈 SQL, fixed schema 〉 〈 LTL-FO+, multi-valued 〉 〈 LTL, atomic 〉 〈 XQuery, multi-valued 〉 〈 MFOTL, single-valued 〉 Sylvain Hallé

  38. BabelT race XML Application Reader CSV τ XES φ T ranslator Launcher File T/F Sylvain Hallé

  39. T ransduction ( τ ', φ ') ∈ 〈 T ' , L ' 〉 ( τ , φ ) ∈ 〈 T , L 〉 T ransduc er ⇔ ⊧ 〈 T , L 〉 ⊧ 〈 T ' , L ' 〉 τ φ τ' φ' Transduction preserves logical equivalence Chaining transducers allows an application to verify a property on a trace expressed in a different format/language pair Sylvain Hallé

  40. * Spin ⊆ ⊆ * ⊆ MonPoly Maude MySQL NuSMV BeepBeep Saxon Islands? 〈 LTL, single-valued 〉 〈 SQL, fixed schema 〉 〈 LTL-FO+, multi-valued 〉 〈 LTL-FO+, single-valued 〉 〈 LTL, atomic 〉 〈 XQuery, multi-valued 〉 〈 MFOTL, single-valued 〉 Sylvain Hallé

  41. * Spin ⊆ ⊆ * ⊆ MonPoly Maude MySQL NuSMV BeepBeep Saxon Islands? 〈 LTL, single-valued 〉 〈 SQL, fixed schema 〉 〈 LTL-FO+, multi-valued 〉 〈 LTL-FO+, single-valued 〉 〈 LTL, atomic 〉 〈 XQuery, multi-valued 〉 〈 MFOTL, single-valued 〉 Sylvain Hallé

  42. * Spin ⊆ ⊆ * ⊆ MonPoly Maude MySQL NuSMV BeepBeep Saxon Islands? 〈 LTL, single-valued 〉 〈 SQL, fixed schema 〉 〈 LTL-FO+, multi-valued 〉 〈 LTL-FO+, single-valued 〉 〈 LTL, atomic 〉 〈 XQuery, multi-valued 〉 〈 MFOTL, single-valued 〉 Sylvain Hallé

  43. * Spin ⊆ ⊆ * ⊆ MonPoly Maude MySQL NuSMV BeepBeep Saxon Islands? 〈 LTL, single-valued 〉 〈 SQL, fixed schema 〉 〈 LTL-FO+, multi-valued 〉 〈 LTL-FO+, single-valued 〉 〈 LTL, atomic 〉 〈 XQuery, multi-valued 〉 〈 MFOTL, single-valued 〉 Sylvain Hallé

  44. * Spin ⊆ ⊆ * ⊆ MonPoly Maude MySQL NuSMV BeepBeep Saxon Islands? 〈 LTL, single-valued 〉 〈 SQL, fixed schema 〉 〈 LTL-FO+, multi-valued 〉 〈 LTL-FO+, single-valued 〉 〈 LTL, atomic 〉 〈 XQuery, multi-valued 〉 〈 MFOTL, single-valued 〉 Sylvain Hallé

  45. * Spin ⊆ ⊆ * ⊆ MonPoly Maude MySQL NuSMV BeepBeep Saxon Islands? 〈 LTL, single-valued 〉 〈 SQL, fixed schema 〉 〈 LTL-FO+, multi-valued 〉 〈 LTL-FO+, single-valued 〉 〈 LTL, atomic 〉 〈 XQuery, multi-valued 〉 〈 MFOTL, single-valued 〉 Sylvain Hallé

  46. Format of an event trace Sequential number Event attributes n Action SessionId CartId ItemId 0 CartCreate 1234 null null 1 CartCreateResponse 1234 45603 null 2 CartAdd 1234 45603 005-40958 3 CartClear 1234 45603 null Event Sylvain Hallé

  47. From LTL to SQL Recursive function ω LTL formula SQL query φ Evaluate n T : i ∈ T 0 if and only if 2 i τ ⊧ φ ... Sylvain Hallé

  48. From LTL to SQL Base case: assertions of the form x=y ω ( x = y ) ≡ SELECT n FROM T WHERE x = y ℓ Create a table containing event numbers n that satisfy the assertion Sylvain Hallé

  49. From LTL to SQL Boolean connectives: combine tables computed at a previous step ω ( ϕ ∨ ψ ) ≡ ω + 1 ( ϕ ) UNION ω + 1 ( ψ ) ℓ ℓ ℓ ω ( ϕ ∧ ψ ) ≡ ω + 1 ( ϕ ) INTERSECT ω + 1 ( ψ ) ℓ ℓ ℓ ω (¬ ϕ ) ≡ T MINUS ω + 1 ( ϕ ) ℓ ℓ Sylvain Hallé

  50. From LTL to SQL X φ : put n -1 in the output table if n is in the table computed for φ ω ( X ϕ ) ≡ SELECT n − 1 FROM ω + 1 ( ϕ ) ℓ ℓ Sylvain Hallé

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend