Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)
-
Upload
sylvain-halle -
Category
Technology
-
view
190 -
download
0
Transcript of Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)
Runtime Monitoring ofStream Logic Formulæ
Sylvain Hallé and Raphaël Khoury
Fonds de recherchesur la natureet les technologies
CRSNGNSERC
Université du Québec à Chicoutimi, Canada
System
System
System
Instrumentation
System
Instrumentation
System
Instrumentation
Trace
System
Instrumentation
Trace
Events
System
Instrumentation
Trace
Events
System
Instrumentation
Trace
Events
Tracevalidation
Iterator<T>
Iterator<T>
hasNext
next
Iterator<T>
hasNext
next
A call to next must be precededby a call to hasNext
B
A
B
A
No CartCreate request can occurbefore a LoginResponse message
Login
Login
Three successive login attemptsshould trigger an alarm
Receive order
Receive orderReady?
Receive orderReady? Yes
Receive orderReady? Yes
File order
No Ship
Receive orderReady? Yes
File order
No Ship
A received order must eventuallybe shipped
A
0 1 2 3 4 . . .
a a b c b
ℕ
A trace m is a mapping from ℕ tothe set of events :
ALet be a set of event symbols.
A monitor takes as input an event trace and outputsa trace of truth values
a c d T
T T . . .
T
T
c
T T T . . .
T T T . . .
. . .T T
T
Notation:
m : φ
Input trace Expression
The output of monitors can be combined usingthe usual logical connectives
φ ∧ ψ
TT. . .φ
∧ψ T
T. . .
Inputs and outputs may be delayed: the notationinduces an implicit buffering
T T . . .φ∧
ψ T . . .
Processing advances in discrete steps: an event iseither produced or not at step n
=> delays != processing time
T
1 2T
T
31 2 3
T
A filter takes as input an event trace and a monitor.It outputs event n if and only if the n-th output of itsmonitor is true.
. . .
φ
∞
∞φa c d a d
Notation:
∞φ
kφ
Output all events(satisfying φ)
Output only the k-thevent satisfying φ
∞c ∨ d
Output all events that satisfy c or d
∞
c1 : T
Output the first event that satisfies c
c2 :T
1
))b ∧: T
Monitor "some b isimmediately followedby a c"
Linear Temporal Logic can be recursivelymapped into filters and monitors
μ(φ)1 : Tμ(F φ) =
μ(X φ) = μ(φ)2 :T
μ(φ U ψ) =μ(¬φ)
1 : T
μ(ψ)1 : T∧1
G φ F ψwhichevercomes first
A call to next must be followed by a callto hasNext
No CartCreate request can occurbefore a LoginResponse message
A received order must eventuallybe shipped
Three successive login attempts shouldtrigger an alarm
G (next → X hasNext)
¬ CartCreate U hasNext
G (receive → F ship)
G ¬(fail ∧ (X (fail ∧ X fail)))
A few identities can be applied...
1 : T
1 : T
p
1 : TT
ϵ : T
ϵ
A few identities can be applied...
1 : T
1 : T
p
1 : TT
ϵ : T
ϵ
A few identities can be applied...
1 : T
1 : T
p
1 : TT
ϵ : T
ϵ
A few identities can be applied...
1 : T
1 : T
p
1 : TT
ϵ : T
ϵ
A few identities can be applied...
1 : T
1 : T
p
1 : TT
ϵ : T
ϵ
μ(G F p) =
= the empty trace
* 10
100
0
>
0
>
0
10
peeB peeB 3http://lif-labs.github.io/beepbeep-3
Principle further generalized andimplemented in...