1 / 23

On the Semantics of Matching Trace Monitoring Patterns

On the Semantics of Matching Trace Monitoring Patterns. P Avgustinov, J Tibble, O Moor (Programming Tool Group, Oxford, UK) June 29 th, 2007 Presented by Shin Hong at PSWLAB, KAIST. Contents. Introduction Exact-matching Semantics Skipping Semantics

tierra
Download Presentation

On the Semantics of Matching Trace Monitoring Patterns

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. On the Semantics of Matching Trace Monitoring Patterns P Avgustinov, J Tibble, O Moor (Programming Tool Group, Oxford, UK) June 29th, 2007 Presented by Shin Hong at PSWLAB, KAIST On the Semantics of Matching Trace Monitoring Patterns Hong,Shin@PSWLAB

  2. Contents • Introduction • Exact-matching Semantics • Skipping Semantics • The equivalence of two semantics • Conclusion On the Semantics of Matching Trace Monitoring Patterns

  3. Introduction (1/2) • A trace monitor observes a base program’s execution and check whether it is valid or not. • A trace specification specifies a valid trace pattern. • There is wide variety of the specification languages for describing trace specifications Regular expression, context-free language, temporal logic, query language, etc. On the Semantics of Matching Trace Monitoring Patterns

  4. Introduction (2/2) • The styles of the specification languages’ semantics are different • Exact-matching semantics • Skipping semantics for example, AB means in exact-matching, A and next B. in skipping, A and eventually B. • Define a small skipping language with the skipping semantics explore its expressiveness. On the Semantics of Matching Trace Monitoring Patterns

  5. Contents • Introduction • Exact-matching Semantics - Regular expression in tracematches, Lem • Skipping Semantics - A small skipping language, Lskip • The equivalence of two semantics • L(Lskip ) ⊂ L(Lem) • L(Lem) ⊇L (Lskipwith modified Kleene star) • Conclusion On the Semantics of Matching Trace Monitoring Patterns

  6. Exact-matching Semantics (1/3) • Many systems with an AOP background employ exact-matching semantics. • Every symbol in an input word must be accounted for by the pattern. • Tracematches employs this semantics. On the Semantics of Matching Trace Monitoring Patterns

  7. Exact-matching Semantics (2/3) tracematch(Observer o, Subject s) { sym createObserver after: pcCreateObserver(o,s) ; sym updateSubejct after: pcUpdateSubject(s) ; sym removeObserver after: pcRemoveObserver(o,s); createObserver updateSubject+ {o.subjectUpdate();} } --------------------------------------------------------------- Observer {… void addSubject(Subject s) { … <pcCreateObserver>} void eraseSubject(Subject s) { … <pcRemoveObserver>} void subjectUpdate(Subject s) {… } …} Subject {… void changeValue() { … <pcUpdateSubject>} …} ---------------------------------------------------------------------- createObserver updateSubject updateSubject removeObserver On the Semantics of Matching Trace Monitoring Patterns

  8. Exact-matching Semantics (3/3) • Syntax of Tracematches Exact-matching Language Lem pattern := term | seqPattern ‘|’ pattern term := simplePattern | simplePattern term | simplePattern ‘*’ simplePattern := symbol | ‘(‘ pattern ’)’ On the Semantics of Matching Trace Monitoring Patterns

  9. Skipping Semantics (1/6) • Many systems with an RV background employ skipping semantics. • The languages with skipping semantics specify events that happen one after the other, with any events allowed in between. On the Semantics of Matching Trace Monitoring Patterns

  10. Skipping Semantics (2/6) ReqSpec Sample import event a, w, x, y, z ; import condition night ; var happenA, count ; alarm 3a = a when happenA==3 ; a -> { happenA’ = happenA + 1 ; } b -> { happenA’ = 0 ; } property 10wxyz = count < 10 ; event wxyz = (y||z when [w,x)) || (z when [w, end([x,y)))) when night wxyz -> {count’ = count+1;} End On the Semantics of Matching Trace Monitoring Patterns

  11. Skipping Semantics (3/6) A simple skipping language Lskip • Similar with Lem • Explicit negation ~A : any numbers of symbols that are not A. • Does not have Kleene star operator On the Semantics of Matching Trace Monitoring Patterns

  12. Skipping Semantics (4/6) • For example AB ∈ L(AB + BC) ABB ∈ L(A B ~C B) ACABB ∈ L(A B ~C B) ACABCB ∉ L(A B ~C B) On the Semantics of Matching Trace Monitoring Patterns

  13. Skipping Semantics (5/6) • Syntax of patterns in Lskip pattern := fencedTerm | fancedTerm ‘|’ pattern fencedTerm := simplePattern| simplePattern fencedTerm | simplePattern ‘~’ symbolSet fencedTerm simplePattern := symbol | ‘(‘ pattern ‘)’ symbolSet := symbol | ‘(‘symbol‘|’symbolSet‘)’ On the Semantics of Matching Trace Monitoring Patterns

  14. Skipping Semantics (6/6) L(Lskip) ∋ A (B | C) A L(Lskip) ∋ A ~(B | C) A L(Lskip) ∌ A ~B ~C A L(Lskip) ∌ A ~(B C) A On the Semantics of Matching Trace Monitoring Patterns

  15. Contents • Introduction • Exact-matching Semantics - Regular expression in tracematches, Lem • Skipping Semantics - A small skipping language, Lskip • The equivalence of two semantics • L(Lskip ) ⊂ L(Lem) • L(Lem) ⊇L (Lskipwith modified Kleene star) • Conclusion On the Semantics of Matching Trace Monitoring Patterns

  16. The equivalence of two semantics(1/5) • Syntax-directed translation from Lskip to Lem Let α ⊆Σ [fencedTerm | pattern] [fencedTerm]|[pattern] [simplePattern fencedTerm] [simplePattern] Σ* [fencedTerm] [simplePattern ~α fencedTerm]  [simplePattern] (Σ\α)* [fencedTerm] [symbol]  symbol On the Semantics of Matching Trace Monitoring Patterns

  17. The equivalence of two semantics(2/5) Σ = {A, B, C} ABskip A(A|B|C)*Bem A~BAskip A(A|C)*Aem On the Semantics of Matching Trace Monitoring Patterns

  18. The equivalence of two semantics(3/5) • Translation from a fragment of Lem to Lskip Let α⊆Σ [term | pattern] [term] | [pattern] [simplePattern term][simplePattern] ~Σ [term] [simplePattern α* term]  [simplePattern] ~(Σ\α) [term] [symbol]  symbol On the Semantics of Matching Trace Monitoring Patterns

  19. The equivalence of two semantics(4/5) • Skipping Language with modified Kleene closure t@α ≡ t | t ~α t@α prohibiting all events in α between repetitions of t <Lskip Lem > [term@α]  ([term] (Σ\α)*)* [term] <Lem  Lskip > [term+]  [term]@Σ [term term*]  [term]|[term]@Σ On the Semantics of Matching Trace Monitoring Patterns

  20. The equivalence of two semantics(5/5) A(BC)*em • ( A | A(B ~Σ C)@Σ )skip • ( A| A((B {}* C){}*)*)em • (A | A(B C)*)em • A | A(BC)* em A(BC)*em On the Semantics of Matching Trace Monitoring Patterns

  21. Conclusion -A skipping language with modified Kleene closure and exact-matching language have the same expressive power. On the Semantics of Matching Trace Monitoring Patterns

  22. Conclusion On the Semantics of Matching Trace Monitoring Patterns

  23. References [1] On the Semantics of Matching Trace Monitoring Patterns, Oege de Moor et al [2] Liveness Checking as Safety Checking to Find Shortest Counterexamples to Linear Time Properties, Viktor Schuppan [3] Adding Trace Matching with Free Variables to AspectJ, Chris Allan et al On the Semantics of Matching Trace Monitoring Patterns

More Related