Online Quantitative Timed Pattern Matching with Semiring-Valued Weighted Automata Masaki Waga 1,2,3 National Institute of Informatics 1 , SOKENDAI 2 , JSPS Research Fellow 3 27 August 2019, FORMATS 2019 This work is partially supported by JST ERATO HASUO Metamathematics for Systems Design Project (No. JPMJER1603), by JSPS Grants-in-Aid No. 15KT0012 & 18J22498 M. Waga (NII) 1
Monitoring Online Quantitative Timed Pattern Online Quantitative Timed Pattern Matching with Semiring-Valued Matching with Semiring-Valued Weighted Automata Weighted Automata Masaki Waga 1,2,3 National Institute of Informatics 1 , SOKENDAI 2 , JSPS Research Fellow 3 27 August 2019, FORMATS 2019 This work is partially supported by JST ERATO HASUO Metamathematics for Systems Design Project (No. JPMJER1603), by JSPS Grants-in-Aid No. 15KT0012 & 18J22498 M. Waga (NII) 1
Why Monitoring? Exhaustive formal method (e.g. model checking, reachability analysis) • The system is correct/incorrect for any execution • We need system model (white box) • Scalability is a big issue Monitoring • The system is correct/incorrect for the given execution • data-driven analysis • We do not need system model (black box is OK) • Usually scalable M. Waga (NII) 2
(Qualitative) timed pattern matching [Ulus+, FORMATS’14] Input v • Finite-valued signal σ v high • System log discretized!! v low • e.g., 0 t 4.0 8.0 • Real-time spec. W • Spec. to be monitored • e.g., The velocity should not keep high for > 1 sec. Output • All the subsignals σ ([ t,t ′ )) of the log satisfies the spec. • e.g., σ ([ 4.0,8.0 )), σ ([ 6.0,8.0 )), σ ([ 6.0,7.5 )), … M. Waga (NII) 3
(Qualitative) timed pattern matching [Ulus+, FORMATS’14] Input v • Finite-valued signal σ v high • System log discretized!! v low • e.g., 0 t 4.0 8.0 • Real-time spec. W • Spec. to be monitored • e.g., The velocity should not keep high for > 1 sec. Output • All the subsignals σ ([ t,t ′ )) of the log satisfies the spec. • e.g., σ ([ 4.0,8.0 )), σ ([ 6.0,8.0 )), σ ([ 6.0,7.5 )), … M. Waga (NII) 3
(Qualitative) timed pattern matching [Ulus+, FORMATS’14] Input v • Finite-valued signal σ v high • System log discretized!! v low • e.g., 0 t 4.0 4.0 8.0 8.0 • Real-time spec. W • Spec. to be monitored 8.0 • e.g., The velocity should not keep high for > 1 sec. 4.0 Output • All the subsignals σ ([ t,t ′ )) of the log satisfies the spec. • e.g., σ ([ 4.0,8.0 )), σ ([ 6.0,8.0 )), σ ([ 6.0,7.5 )), … M. Waga (NII) 3
(Qualitative) timed pattern matching [Ulus+, FORMATS’14] Input v • Finite-valued signal σ v high • System log discretized!! v low • e.g., 0 t 4.0 4.0 8.0 8.0 6.0 • Real-time spec. W • Spec. to be monitored 8.0 8.0 • e.g., The velocity should not keep high for > 1 sec. 4.0 6.0 Output • All the subsignals σ ([ t,t ′ )) of the log satisfies the spec. • e.g., σ ([ 4.0,8.0 )), σ ([ 6.0,8.0 )), σ ([ 6.0,7.5 )), … M. Waga (NII) 3
(Qualitative) timed pattern matching [Ulus+, FORMATS’14] Input v • Finite-valued signal σ v high • System log discretized!! v low • e.g., 0 t 4.0 4.0 8.0 8.0 6.07.5 • Real-time spec. W • Spec. to be monitored 8.0 8.0 7.5 • e.g., The velocity should not keep high for > 1 sec. 4.0 6.0 6.0 Output • All the subsignals σ ([ t,t ′ )) of the log satisfies the spec. • e.g., σ ([ 4.0,8.0 )), σ ([ 6.0,8.0 )), σ ([ 6.0,7.5 )), … M. Waga (NII) 3
(Qualitative) timed pattern matching [Ulus+, FORMATS’14] Input v • Finite-valued signal σ v high • System log discretized!! v low • e.g., 0 t 4.0 4.0 8.0 8.0 6.07.5 • Real-time spec. W • Spec. to be monitored 8.0 8.0 7.5 • e.g., The velocity should not keep high for > 1 sec. 4.0 6.0 6.0 Output • All the subsignals σ ([ t,t ′ )) of the log satisfies the spec. • e.g., σ ([ 4.0,8.0 )), σ ([ 6.0,8.0 )), σ ([ 6.0,7.5 )), … We want to know how robustly the spec. is satisfied!! M. Waga (NII) 3
Quantitative timed pattern matching Input [Bakhirkin+, FORMATS’17] • Real -valued piecewise-constant signal σ v • System log 120 100 60 • e.g., 45 0 t 4.0 8.010.0 6.2 • Real-time spec. with signal constraints W • Spec. to be monitored • e.g., The velocity should not keep > 80 for > 1 sec. Output • How robustly , each subsignals σ ([ t,t ′ )) of the log , satisfies the spec. • e.g., M ( σ , W )( 2.0,4.0 ) = -20, M ( σ , W )( 6.5,7.8 ) = 40, … satisfaction degree of for σ ([2.0,4.0)) M. Waga (NII) W 4
Quantitative timed pattern matching Input [Bakhirkin+, FORMATS’17] • Real -valued piecewise-constant signal σ v • System log 120 40 t � 10 100 30 60 8 • e.g., 20 45 10 6 0 0 t 4.0 8.010.0 6.2 4 -10 -20 • Real-time spec. with signal constraints W 2 -30 0 -40 • Spec. to be monitored 10 t 0 2 4 6 8 • e.g., The velocity should not keep > 80 for > 1 sec. Output • How robustly , each subsignals σ ([ t,t ′ )) of the log , satisfies the spec. • e.g., M ( σ , W )( 2.0,4.0 ) = -20, M ( σ , W )( 6.5,7.8 ) = 40, … satisfaction degree of for σ ([2.0,4.0)) M. Waga (NII) W 4
・ Quantitative timed pattern matching Input [Bakhirkin+, FORMATS’17] • Real -valued piecewise-constant signal σ v • System log 120 40 t � 10 100 30 60 8 • e.g., 20 45 10 6 0 0 t 2.0 4.0 4.0 8.010.0 6.2 4.0 4 -10 -20 • Real-time spec. with signal constraints W 2 -30 0 -40 • Spec. to be monitored 10 t 2.0 0 2 4 6 8 • e.g., The velocity should not keep > 80 for > 1 sec. Output • How robustly , each subsignals σ ([ t,t ′ )) of the log , satisfies the spec. • e.g., M ( σ , W )( 2.0,4.0 ) = -20, M ( σ , W )( 6.5,7.8 ) = 40, … satisfaction degree of for σ ([2.0,4.0)) M. Waga (NII) W 4
・ Quantitative timed pattern matching Input [Bakhirkin+, FORMATS’17] • Real -valued piecewise-constant signal σ v • System log 120 40 t � 10 100 30 60 8 • e.g., 20 7.8 45 10 6 0 0 t 2.0 4.0 4.0 8.010.0 6.2 4.0 4 -10 6.5 7.8 -20 • Real-time spec. with signal constraints W 2 -30 0 -40 • Spec. to be monitored 10 t 2.0 6.5 0 2 4 6 8 • e.g., The velocity should not keep > 80 for > 1 sec. Output • How robustly , each subsignals σ ([ t,t ′ )) of the log , satisfies the spec. • e.g., M ( σ , W )( 2.0,4.0 ) = -20, M ( σ , W )( 6.5,7.8 ) = 40, … satisfaction degree of for σ ([2.0,4.0)) M. Waga (NII) W 4
Online Pattern Matching • After reading the prefix signal σ ' of σ = σ ' ・ σ '' , we obtain the partial result M ( σ ', W ) of M ( σ , W ) • Important in practice M. Waga (NII) 5
Timed symbolic weighted automata (TSWA) • New formalism for spec. • Automata structure is good for online monitoring • Generality of semiring (same as the usual WFA) Boolean sup-inf tropical c < 5 /c := 0 c < 10 l 0 , v < 15 l 1 , v > 5 l 2 , > start S {True/False} R ∪ {± ∞ } R ∪ {+ ∞ } � � sup inf u, ( a 1 a 2 . . . a m ) = i ∈ { 1 , 2 ,...,n } r ( u, ( a i )) inf ⊕ ∨ r � n ^ � ( x i . / i d i ) , ( a ) = i ∈ { 1 , 2 ,...,n } r ( x i . inf / i d i , ( a )) where . / i 2 { >, � , , < } r i =1 inf + ⊗ ∧ r ( x � d, ( a )) = a ( x ) � d where �2 { � , > } r ( x � d, ( a )) = d � a ( x ) where �2 { , < } M. Waga (NII) 6
Contribution • Introduced timed symbolic weighted automata ( TSWA ) • TSWA : timed automata with signal constraints (TSA) Automata structure + semiring-valued weight function Quantitative semantics • Gave online algorithm for quantitative timed pattern matching • Implementation + experiments → Scalable !! M. Waga (NII) 7
Related Works Only “Robust” Qualitative Quantitative Semantics [Fainekos & Pappas, TCS’09] [Ulus+, FORMATS’14] [Bakhirkin+, FORMATS’17] Offline (TRE) (Signal RE) [Ulus+, TACAS’16], Any Semantics [Contribution] Online [Bakhirkin+, FORMATS’18] (TSWA) defined by semiring- (TRE & TA) valued weight Timed automata function Timed with automata signal constraints M. Waga (NII) 8
Outline • Motivation + Introduction • Technical Part • Timed symbolic weighted automata (TSWA) • TSWA: TA with signal constraints + weight function • Quantitative monitoring/timed pattern matching algorithm • Idea: zone construction with weight • Experiments M. Waga (NII) 9
TSWA : TA with signal constraints + weight function Timed Automaton (TA) c < 5 /c := 0 c < 10 l 0 l 1 l 2 start M. Waga (NII) 10
TSWA : TA with signal constraints + weight function Timed Symbolic Automaton (TSA) c < 5 /c := 0 c < 10 l 0 , v < 15 l 1 , v > 5 l 2 , > start M. Waga (NII) 11
TSWA : TA with signal constraints + weight function Timed Symbolic Weighted Automaton (TSWA) c < 5 /c := 0 c < 10 l 0 , v < 15 l 1 , v > 5 l 2 , > start + � � u, ( a 1 a 2 . . . a m ) = i ∈ { 1 , 2 ,...,n } r ( u, ( a i )) inf r � n ^ � ( x i . / i d i ) , ( a ) = i ∈ { 1 , 2 ,...,n } r ( x i . inf / i d i , ( a )) where . / i 2 { >, � , , < } r i =1 r ( x � d, ( a )) = a ( x ) � d where �2 { � , > } r ( x � d, ( a )) = d � a ( x ) where �2 { , < } M. Waga (NII) 12
Recommend
More recommend