Download presentation
Presentation is loading. Please wait.
Published byAusten Ronald Hubbard Modified over 9 years ago
1
/ 26Hong,Shin @ PSWLAB 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 2015-10-221On the Semantics of Matching Trace Monitoring Patterns Hong,Shin@PSWLAB
2
/ 26Hong,Shin @ PSWLAB Contents Introduction Exact-matching Semantics Skipping Semantics The equivalence of two semantics Conclusion 2015-10-22On the Semantics of Matching Trace Monitoring Patterns2
3
/ 26Hong,Shin @ PSWLAB 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. 2015-10-22On the Semantics of Matching Trace Monitoring Patterns3
4
/ 26Hong,Shin @ PSWLAB 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. 2015-10-22On the Semantics of Matching Trace Monitoring Patterns4
5
/ 26Hong,Shin @ PSWLAB Contents Introduction Exact-matching Semantics - Regular expression in tracematches, L em Skipping Semantics - A small skipping language, L skip The equivalence of two semantics -L(L skip ) ⊂ L(L em ) -L(L em ) ⊇ L (L skip with modified Kleene star ) Conclusion 2015-10-22On the Semantics of Matching Trace Monitoring Patterns5
6
/ 26Hong,Shin @ PSWLAB 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. 2015-10-22On the Semantics of Matching Trace Monitoring Patterns6
7
/ 26Hong,Shin @ PSWLAB 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) { … } void eraseSubject(Subject s) { … } void subjectUpdate(Subject s) {… } …} Subject {… void changeValue() { … } …} ---------------------------------------------------------------------- createObserver updateSubject updateSubject removeObserver 2015-10-22On the Semantics of Matching Trace Monitoring Patterns7
8
/ 26Hong,Shin @ PSWLAB Exact-matching Semantics (3/3) Syntax of Tracematches Exact-matching Language L em pattern := term | seqPattern ‘|’ pattern term := simplePattern | simplePattern term | simplePattern ‘*’ simplePattern := symbol | ‘(‘ pattern ’)’ 2015-10-22On the Semantics of Matching Trace Monitoring Patterns8
9
/ 26Hong,Shin @ PSWLAB 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. 2015-10-22On the Semantics of Matching Trace Monitoring Patterns9
10
/ 26Hong,Shin @ PSWLAB 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 2015-10-22On the Semantics of Matching Trace Monitoring Patterns10
11
/ 26Hong,Shin @ PSWLAB Skipping Semantics (3/6) A simple skipping language L skip –Similar with L em –Explicit negation ~A : any numbers of symbols that are not A. –Does not have Kleene star operator 2015-10-22On the Semantics of Matching Trace Monitoring Patterns11
12
/ 26Hong,Shin @ PSWLAB 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) 2015-10-22On the Semantics of Matching Trace Monitoring Patterns12
13
/ 26Hong,Shin @ PSWLAB Skipping Semantics (5/6) Syntax of patterns in L skip pattern := fencedTerm | fancedTerm ‘|’ pattern fencedTerm := simplePattern| simplePattern fencedTerm | simplePattern ‘~’ symbolSet fencedTerm simplePattern := symbol | ‘(‘ pattern ‘)’ symbolSet := symbol | ‘(‘symbol‘|’symbolSet‘)’ 2015-10-22On the Semantics of Matching Trace Monitoring Patterns13
14
/ 26Hong,Shin @ PSWLAB Skipping Semantics (6/6) L(L skip ) ∋ A (B | C) A L(L skip ) ∋ A ~(B | C) A L(L skip ) ∌ A ~B ~C A L(L skip ) ∌ A ~(B C) A 2015-10-22On the Semantics of Matching Trace Monitoring Patterns14
15
/ 26Hong,Shin @ PSWLAB Contents Introduction Exact-matching Semantics - Regular expression in tracematches, L em Skipping Semantics - A small skipping language, L skip The equivalence of two semantics -L(L skip ) ⊂ L(L em ) -L(L em ) ⊇ L (L skip with modified Kleene star ) Conclusion 2015-10-22On the Semantics of Matching Trace Monitoring Patterns15
16
/ 26Hong,Shin @ PSWLAB The equivalence of two semantics(1/5) Syntax-directed translation from L skip to L em Let α ⊆ Σ [fencedTerm | pattern] [fencedTerm]|[pattern] [simplePattern fencedTerm] [simplePattern] Σ* [fencedTerm] [simplePattern ~α fencedTerm] [simplePattern] (Σ\α)* [fencedTerm] [symbol] symbol 2015-10-22On the Semantics of Matching Trace Monitoring Patterns16
17
/ 26Hong,Shin @ PSWLAB The equivalence of two semantics(2/5) Σ = {A, B, C} AB skip A(A|B|C)*B em A~BA skip A(A|C)*A em 2015-10-22On the Semantics of Matching Trace Monitoring Patterns17
18
/ 26Hong,Shin @ PSWLAB The equivalence of two semantics(3/5) Translation from a fragment of L em to L skip Let α ⊆ Σ [term | pattern] [term] | [pattern] [simplePattern term] [simplePattern] ~Σ [term] [simplePattern α* term] [simplePattern] ~(Σ\α) [term] [symbol] symbol 2015-10-22On the Semantics of Matching Trace Monitoring Patterns18
19
/ 26Hong,Shin @ PSWLAB 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 [term@ α ] ([term] (Σ\α)*)* [term] [term+] [term]@ Σ [term term*] [term]|[term]@ Σ 2015-10-22On the Semantics of Matching Trace Monitoring Patterns19
20
/ 26Hong,Shin @ PSWLAB 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 2015-10-22On the Semantics of Matching Trace Monitoring Patterns20
21
/ 26Hong,Shin @ PSWLAB Conclusion -A skipping language with modified Kleene closure and exact-matching language have the same expressive power. 2015-10-22On the Semantics of Matching Trace Monitoring Patterns21
22
/ 26Hong,Shin @ PSWLAB Conclusion 2015-10-22On the Semantics of Matching Trace Monitoring Patterns22
23
/ 26Hong,Shin @ PSWLAB 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 2015-10-22On the Semantics of Matching Trace Monitoring Patterns23
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.