Adventures in Monitorability Antonis Achilleos 1 joint work with: - - PowerPoint PPT Presentation

adventures in monitorability
SMART_READER_LITE
LIVE PREVIEW

Adventures in Monitorability Antonis Achilleos 1 joint work with: - - PowerPoint PPT Presentation

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?) Adventures in Monitorability Antonis Achilleos 1 joint work with: Luca Aceto 1,2 Adrian Francalanza 3 ottir 1 Anna Ing olfsd Karoliina Lehtinen


slide-1
SLIDE 1

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Adventures in Monitorability

Antonis Achilleos1

joint work with:

Luca Aceto1,2 Adrian Francalanza3 Anna Ing´

  • lfsd´
  • ttir1

Karoliina Lehtinen4,5

1: Reykjavik University 2: Gran Sasso Science Institute, L’Aquila 3: ICT, University of Malta 4: Christian-Albrechts University of Kiel 5: University of Liverpool

NYCAC 2018 16 November 2018

slide-2
SLIDE 2

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Formal Verification

  • Question: is your system behaving correctly?
slide-3
SLIDE 3

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Formal Verification

  • Question: is your system behaving correctly?
  • Multiple verification techniques: Model-Checking,

Theorem-Proving, Testing,. . .

slide-4
SLIDE 4

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Formal Verification

  • Question: is your system behaving correctly?
  • Multiple verification techniques: Model-Checking,

Theorem-Proving, Testing,. . .

  • Issues: systems become (even) larger and more

complicated, unexpected environments, opaque components

slide-5
SLIDE 5

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Formal Verification

  • Question: is your system behaving correctly?
  • Multiple verification techniques: Model-Checking,

Theorem-Proving, Testing,. . .

  • Issues: systems become (even) larger and more

complicated, unexpected environments, opaque components

  • A post-deployment technique: Runtime Verification
slide-6
SLIDE 6

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Runtime Verification

  • Runtime Verification uses monitors to detect at runtime

whether a certain system satisfies/violates a specification.

  • A monitor runs together with a process and it observes the

events the process generates.

  • When it detects a certain kind of behavior, it can reach a

verdict (yes, no, or end).

Monitor e1 e2 e3 · · · System

? ✓ ✗

exhibits analyzes

slide-7
SLIDE 7

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Goals

Automatic monitor synthesis from specifications Plausible monitorability guarantees for classes of properties To determine the limits of monitorability

slide-8
SLIDE 8

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Goals

Automatic monitor synthesis from specifications Plausible monitorability guarantees for classes of properties To determine the limits of monitorability A choice to make: properties of processes infinite traces finite or infinite traces

slide-9
SLIDE 9

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Two Kinds of Models – Two Kinds of Properties

Processes, Infinite Traces

P, Act, → processes, actions, transitions p

α1

− → q

α2

− → · · ·

trace of events system graph α1 α2 α3 α4 α5

slide-10
SLIDE 10

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Two Kinds of Models – Two Kinds of Properties

Processes, Infinite Traces

P, Act, → processes, actions, transitions p

α1

− → q

α2

− → · · ·

trace of events system graph α1 α2 α3 α4 α5

α β α β α

α1α2α3 · · · ∈ Actω

slide-11
SLIDE 11

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Two Kinds of Models – Two Kinds of Properties

Processes, Infinite Traces

P, Act, → processes, actions, transitions p

α1

− → q

α2

− → · · ·

trace of events system graph α1 α2 α3 α4 α5

α β α β α

α1α2α3 · · · ∈ Actω Moral of the talk: The choice of model matters!

slide-12
SLIDE 12

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

The Language

ϕ, ψ ∈ µHML ::= tt | αϕ | ϕ ∨ ψ | min X.ϕ | X | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ

slide-13
SLIDE 13

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

The Language

ϕ, ψ ∈ µHML ::= tt | αϕ | ϕ ∨ ψ | min X.ϕ | X | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ A branching-time language. . . [α]ϕ ϕ ϕ α α αϕ ϕ α α

slide-14
SLIDE 14

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

The Language

ϕ, ψ ∈ µHML ::= tt | αϕ | ϕ ∨ ψ | min X.ϕ | X | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ A branching-time language. . . [α]ϕ ϕ ϕ α α αϕ ϕ α α . . . or, possibly, a linear-time language. . . s | =[α]ϕ : s = α s′ = ⇒ s′ | = ϕ s | =αϕ : s = α s′ and s′ | = ϕ

slide-15
SLIDE 15

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

The Language

ϕ, ψ ∈ µHML ::= tt | αϕ | ϕ ∨ ψ | min X.ϕ | X | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ A branching-time language. . . [α]ϕ ϕ ϕ α α αϕ ϕ α α . . . or, possibly, a linear-time language. . . s | =[α]ϕ : s = α s′ = ⇒ s′ | = ϕ s | =αϕ : s = α s′ and s′ | = ϕ . . . with recursion min X.ϕ holds iff ϕ[min X.ϕ/X] does and is a lfp max X.ϕ holds iff ϕ[max X.ϕ/X] does and is a gfp

slide-16
SLIDE 16

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

The Language

ϕ, ψ ∈ µHML ::= tt | αϕ | ϕ ∨ ψ | min X.ϕ | X | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ An expressive language: can encode LTL, CTL, CTL∗, BA,. . . Shorthands from LTL on infinite traces: X ϕ :=[Act]ϕ (next step) F ϕ := min Y.(ϕ ∨ X Y ) (in the future) G ϕ := max Y.(ϕ ∧ X Y ) (generaly) ϕ U ψ := min Y.(ψ ∨ (ϕ ∧ X Y )) (until)

slide-17
SLIDE 17

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Regular Monitors

Syntax: m, n ∈ Mon ::= end | no | α.m | m + n | rec x.m | x

slide-18
SLIDE 18

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Regular Monitors

Syntax: m, n ∈ Mon ::= end | no | α.m | m + n | rec x.m | x Monitor LTS (verdicts are irrevocable): Act α.m α − → m Recm[recx.m/x] α − → n recx.m α − → n Vrd no α − → no SelL m α − → m′ m + n α − → m′ SelR n α − → n′ m + n α − → n′ Vrd end α − → end

slide-19
SLIDE 19

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Regular Monitors

Syntax: m, n ∈ Mon ::= end | no | α.m | m + n | rec x.m | x Monitor LTS (verdicts are irrevocable): Act α.m α − → m Recm[recx.m/x] α − → n recx.m α − → n Vrd no α − → no SelL m α − → m′ m + n α − → m′ SelR n α − → n′ m + n α − → n′ Vrd end α − → end Instrumentation (follow the trace): iMonp α − →L q m α − →M n m ⊳ p α − →I n ⊳ q iTer p α − →L q m α − →

M

m ⊳ p α − →I end ⊳ q

slide-20
SLIDE 20

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Formulas and Rejection-Monitors

  • Formulas specify process properties:

p | = ϕ

  • Monitors run along a process and read its trace:

m ⊳ p α1 − → n ⊳ q α2 − → · · ·

  • A monitor can reach three possible verdicts: yes, no, end
  • m accepts p when

m ⊳ p α1 − → · · · αr − → yes ⊳ q m rejects p when m ⊳ p α1 − → · · · αr − → no ⊳ q for some α1 · · · αr and q

  • end is the inconclusive verdict.

Definition (Complete Monitorability)

m monitors completely for ϕ when

  • m accepts exactly the processes that satisfy ϕ; and
  • m rejects exactly the ones that do not satisfy ϕ.
slide-21
SLIDE 21

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Complete Monitorability is Impossible

say m accepts p and rejects q

slide-22
SLIDE 22

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Complete Monitorability is Impossible

say m accepts p and rejects q p + q can produce all the traces of p and q

slide-23
SLIDE 23

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Complete Monitorability is Impossible

say m accepts p and rejects q p + q can produce all the traces of p and q m must both accept and reject p + q

slide-24
SLIDE 24

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Complete Monitorability is Impossible

say m accepts p and rejects q p + q can produce all the traces of p and q m must both accept and reject p + q a sound monitor can either accept or reject, but not both

Definition (Partial Monitorability)

  • m is sound (s.) for ϕ if it only accepts (rejects) processes

that satisfy (violate) ϕ;

  • m is satisfaction-complete (s.c.) for ϕ when m accepts all

the processes that satisfy ϕ; and

  • m is violation-complete (v.c.) for ϕ when m rejects all the

processes that do not satisfy ϕ.

slide-25
SLIDE 25

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Complete Monitorability is Impossible

say m accepts p and rejects q p + q can produce all the traces of p and q m must both accept and reject p + q a sound monitor can either accept or reject, but not both

Definition (Partial Monitorability)

  • m is sound (s.) for ϕ if it only accepts (rejects) processes

that satisfy (violate) ϕ;

  • m is satisfaction-complete (s.c.) for ϕ when m accepts all

the processes that satisfy ϕ; and

  • m is violation-complete (v.c.) for ϕ when m rejects all the

processes that do not satisfy ϕ. We focus on violation.

slide-26
SLIDE 26

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Monitors for µHML (on processes)

FAI17, AAFI17

We can monitor for sHML, the safety fragment of µHML: ϕ, ψ ∈ sHML ::= tt | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ | X. Monitor Synthesis Function: ϕ → m(ϕ) (follow the syntax). Formula Synthesis Function: m → f(m).

Theorem (Monitorability – Maximality)

m(ϕ) monitors for ϕ and m monitors for f(m). The basic monitoring system monitors for sHML.

slide-27
SLIDE 27

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Monitors for µHML (on processes)

FAI17, AAFI17

We can monitor for sHML, the safety fragment of µHML: ϕ, ψ ∈ sHML ::= tt | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ | X. Monitor Synthesis Function: ϕ → m(ϕ) (follow the syntax). Formula Synthesis Function: m → f(m).

Theorem (Monitorability – Maximality)

m(ϕ) monitors for ϕ and m monitors for f(m). The basic monitoring system monitors for sHML. Question: Are violation-monitorable properties closed under disjunction?

slide-28
SLIDE 28

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Monitors for µHML (on processes)

FAI17, AAFI17

We can monitor for sHML, the safety fragment of µHML: ϕ, ψ ∈ sHML ::= tt | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ | X. Monitor Synthesis Function: ϕ → m(ϕ) (follow the syntax). Formula Synthesis Function: m → f(m).

Theorem (Monitorability – Maximality)

m(ϕ) monitors for ϕ and m monitors for f(m). The basic monitoring system monitors for sHML. Question: Are violation-monitorable properties closed under disjunction? [α]ff ∨ [β]ff

slide-29
SLIDE 29

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Monitors for µHML (on processes)

FAI17, AAFI17

We can monitor for sHML, the safety fragment of µHML: ϕ, ψ ∈ sHML ::= tt | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ | X. Monitor Synthesis Function: ϕ → m(ϕ) (follow the syntax). Formula Synthesis Function: m → f(m).

Theorem (Monitorability – Maximality)

m(ϕ) monitors for ϕ and m monitors for f(m). The basic monitoring system monitors for sHML. Question: Are violation-monitorable properties closed under disjunction? [α]ff ∨ [β]ff Question: How about diamonds? αtt

slide-30
SLIDE 30

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

On Infinite Traces

α1 α2 α3 α4 α5 α6 · · · Are v-monitorable properties closed under ∨? [α]ff ∨ [β]ff

slide-31
SLIDE 31

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

On Infinite Traces

α1 α2 α3 α4 α5 α6 · · · Are v-monitorable properties closed under ∨? [α]ff ∨ [β]ff G [α]ff ∨ G [β]ff

slide-32
SLIDE 32

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

On Infinite Traces

α1 α2 α3 α4 α5 α6 · · · Are v-monitorable properties closed under ∨? [α]ff ∨ [β]ff G [α]ff ∨ G [β]ff How about diamonds? αtt

slide-33
SLIDE 33

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

On Infinite Traces

α1 α2 α3 α4 α5 α6 · · · Are v-monitorable properties closed under ∨? [α]ff ∨ [β]ff G [α]ff ∨ G [β]ff How about diamonds? αtt How about lfp? F αtt Parallel monitors: we introduce two parallel operators, ⊗ and ⊕ m α − → m′ n α − → n′ m ⊙ n α − → m′ ⊙ n′ m τ − → m′ m ⊙ n τ − → m′ ⊙ n end ⊙ end τ − → end yes ⊗ m τ − → m no ⊗ m τ − → no no ⊕ m τ − → m yes ⊕ m τ − → yes

slide-34
SLIDE 34

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

On Infinite Traces

α1 α2 α3 α4 α5 α6 · · · Are v-monitorable properties closed under ∨? [α]ff ∨ [β]ff G [α]ff ∨ G [β]ff How about diamonds? αtt How about lfp? F αtt Parallel monitors: we introduce two parallel operators, ⊗ and ⊕ m α − → m′ n α − → n′ m ⊙ n α − → m′ ⊙ n′ m τ − → m′ m ⊙ n τ − → m′ ⊙ n end ⊙ end τ − → end yes ⊗ m τ − → m no ⊗ m τ − → no no ⊕ m τ − → m yes ⊕ m τ − → yes Examples: rec x.(α.no + α.x) ⊕ rec x.(β.no + β.x),

slide-35
SLIDE 35

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

On Infinite Traces

α1 α2 α3 α4 α5 α6 · · · Are v-monitorable properties closed under ∨? [α]ff ∨ [β]ff G [α]ff ∨ G [β]ff How about diamonds? αtt How about lfp? F αtt Parallel monitors: we introduce two parallel operators, ⊗ and ⊕ m α − → m′ n α − → n′ m ⊙ n α − → m′ ⊙ n′ m τ − → m′ m ⊙ n τ − → m′ ⊙ n end ⊙ end τ − → end yes ⊗ m τ − → m no ⊗ m τ − → no no ⊕ m τ − → m yes ⊕ m τ − → yes Examples: rec x.(α.no + α.x) ⊕ rec x.(β.no + β.x), α.no,

slide-36
SLIDE 36

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

On Infinite Traces

α1 α2 α3 α4 α5 α6 · · · Are v-monitorable properties closed under ∨? [α]ff ∨ [β]ff G [α]ff ∨ G [β]ff How about diamonds? αtt How about lfp? F αtt Parallel monitors: we introduce two parallel operators, ⊗ and ⊕ m α − → m′ n α − → n′ m ⊙ n α − → m′ ⊙ n′ m τ − → m′ m ⊙ n τ − → m′ ⊙ n end ⊙ end τ − → end yes ⊗ m τ − → m no ⊗ m τ − → no no ⊕ m τ − → m yes ⊕ m τ − → yes Examples: rec x.(α.no + α.x) ⊕ rec x.(β.no + β.x), α.no, rec x.(rec y.(α.no + α.y) ⊕ (β.no + γ.x))

slide-37
SLIDE 37

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Parallel Monitors and maxHML

The monitorable syntactic fragments of µHML are now larger: ϕ, ψ ∈ maxHML ::= tt | αϕ | ϕ ∨ ψ | X | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ ϕ, ψ ∈ minHML ::= tt | αϕ | ϕ ∨ ψ | X | ff | [α]ϕ | ϕ ∧ ψ | min X.ϕ m(αϕ) = α.m(ϕ) + α.no m(ϕ ∧ ψ) = m(ϕ) ⊗ m(ψ) m([α]ϕ) = α.m(ϕ) + α.yes m(ϕ ∨ ψ) = m(ϕ) ⊕ m(ψ)

slide-38
SLIDE 38

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Parallel Monitors and maxHML

The monitorable syntactic fragments of µHML are now larger: ϕ, ψ ∈ maxHML ::= tt | αϕ | ϕ ∨ ψ | X | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ ϕ, ψ ∈ minHML ::= tt | αϕ | ϕ ∨ ψ | X | ff | [α]ϕ | ϕ ∧ ψ | min X.ϕ m(αϕ) = α.m(ϕ) + α.no m(ϕ ∧ ψ) = m(ϕ) ⊗ m(ψ) m([α]ϕ) = α.m(ϕ) + α.yes m(ϕ ∨ ψ) = m(ϕ) ⊕ m(ψ) Concerns: Are parallel monitors a reasonable model? infinite-state; more powerful than regular monitors(?)

slide-39
SLIDE 39

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Parallel Monitors and maxHML

The monitorable syntactic fragments of µHML are now larger: ϕ, ψ ∈ maxHML ::= tt | αϕ | ϕ ∨ ψ | X | ff | [α]ϕ | ϕ ∧ ψ | max X.ϕ ϕ, ψ ∈ minHML ::= tt | αϕ | ϕ ∨ ψ | X | ff | [α]ϕ | ϕ ∧ ψ | min X.ϕ m(αϕ) = α.m(ϕ) + α.no m(ϕ ∧ ψ) = m(ϕ) ⊗ m(ψ) m([α]ϕ) = α.m(ϕ) + α.yes m(ϕ ∨ ψ) = m(ϕ) ⊕ m(ψ) Concerns: Are parallel monitors a reasonable model? infinite-state; more powerful than regular monitors(?) maxHML ∩ minHML appears to be nontrivial

slide-40
SLIDE 40

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Regularization

Parallel monitors are convenient, but not more powerful:

Theorem (Regularization)

m(ϕ) is equivalent to a regular monitor of size 2O(|m(ϕ)|·2|m(ϕ)|).

slide-41
SLIDE 41

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Regularization

Parallel monitors are convenient, but not more powerful:

Theorem (Regularization)

m(ϕ) is equivalent to a regular monitor of size 2O(|m(ϕ)|·2|m(ϕ)|).

p-mon AFA r-mon NFA DFA det-mon O(n) O(2n) 2O(n·2n) O(n) O(2n) 2O(n) 22Ω(

√n log n) – 2O(2n)

Ω(2n) – 2O(n log n)

slide-42
SLIDE 42

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Surprise!

Complete monitorability is possible, after all You cannot combine an accepting and a rejecting trace into one m([α][β]ff ∧ [β][α]ff) ≡ α.β.no + β.α.no + α.α.yes + β.β.yes

slide-43
SLIDE 43

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Surprise!

Complete monitorability is possible, after all You cannot combine an accepting and a rejecting trace into one m([α][β]ff ∧ [β][α]ff) ≡ α.β.no + β.α.no + α.α.yes + β.β.yes

Theorem (Complete Monitorability)

For ϕ ∈ HML, m(ϕ) monitors completely for ϕ over linear time.

slide-44
SLIDE 44

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Surprise!

Complete monitorability is possible, after all You cannot combine an accepting and a rejecting trace into one m([α][β]ff ∧ [β][α]ff) ≡ α.β.no + β.α.no + α.α.yes + β.β.yes

Theorem (Complete Monitorability)

For ϕ ∈ HML, m(ϕ) monitors completely for ϕ over linear time. Furthermore, all completely monitorable µHML trace-properties can be (constructively) written in HML — so, HML is (semantically) maximal.

slide-45
SLIDE 45

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Even Better: General Maximality of HML

All trace properties, irrespective of the monitoring system can be expressed in HML:

Theorem (General Maximality for HML)

Let m be a monitor from a monitoring system such that:

  • 1. verdicts are irrevocable: if m accepts/rejects a finite trace,

then it accepts/rejects all its extensions, and

  • 2. m accepts/rejects t iff, it accepts/rejects some finite prefix.

For any property ϕ with a trace interpretation (not necessarily written in µHML), if m is sound and complete for ϕ then ϕ can be expressed in HML.

Proof sketch.

Every trace either satisfies ϕ or not, so m accepts or rejects. By K¨

  • nig’s Lemma, there is a finite set of finite traces that

determine ϕ. Describe these in HML.

slide-46
SLIDE 46

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Maximality for Partial Monitorability

and a collapse

Theorem (Partial Monitorability for Linear-Time)

For ϕ ∈ maxHML (minHML), m(ϕ) is sound and violation- (satisfaction-)complete for ϕ.

slide-47
SLIDE 47

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Maximality for Partial Monitorability

and a collapse

Theorem (Partial Monitorability for Linear-Time)

For ϕ ∈ maxHML (minHML), m(ϕ) is sound and violation- (satisfaction-)complete for ϕ. These fragments are maximal.

Proof of maximality.

We can transform: m to regular n n to f(n) ∈ sHML ⊆ maxHML.

slide-48
SLIDE 48

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Maximality for Partial Monitorability

and a collapse

Theorem (Partial Monitorability for Linear-Time)

For ϕ ∈ maxHML (minHML), m(ϕ) is sound and violation- (satisfaction-)complete for ϕ. These fragments are maximal.

Proof of maximality.

We can transform: m to regular n n to f(n) ∈ sHML ⊆ maxHML.

Corollary

maxHML ≡ sHML and minHML ≡ cHML over traces.

slide-49
SLIDE 49

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Maximality for Partial Monitorability

and a collapse

Theorem (Partial Monitorability for Linear-Time)

For ϕ ∈ maxHML (minHML), m(ϕ) is sound and violation- (satisfaction-)complete for ϕ. These fragments are maximal.

Proof of maximality.

We can transform: m to regular n n to f(n) ∈ sHML ⊆ maxHML.

Corollary

maxHML ≡ sHML and minHML ≡ cHML over traces. Question: General maximality for maxHML?

slide-50
SLIDE 50

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Maximality for Partial Monitorability

and a collapse

Theorem (Partial Monitorability for Linear-Time)

For ϕ ∈ maxHML (minHML), m(ϕ) is sound and violation- (satisfaction-)complete for ϕ. These fragments are maximal.

Proof of maximality.

We can transform: m to regular n n to f(n) ∈ sHML ⊆ maxHML.

Corollary

maxHML ≡ sHML and minHML ≡ cHML over traces. Question: General maximality for maxHML? No: µHML properties are (ω-)regular and we can monitor with (say) PDAs.

slide-51
SLIDE 51

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

How fast does your monitor return a verdict?

a[a][b]tt b.no+ a.(b.yes+ a.(a.yes+ b.yes)) a a b a · · ·

slide-52
SLIDE 52

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

How fast does your monitor return a verdict?

a[a][b]tt b.no+ a.(b.yes+ a.(a.yes+ b.yes)) a a b a · · ·

Definition

A monitor m is tight when for every finite s, if m rejects all infinite extensions of s, then m rejects s. We want to construct tight monitors.

slide-53
SLIDE 53

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Constructing Tight Monitors for HML

Slim formulas: ϕ ::= tt | ff |

  • α∈B

[α]ϕα |

  • α∈D

αψα, where B, D = ∅, ϕα = tt, ψα = ff, and no

α∈Act[α]ff

  • r
  • α∈Actαtt

(i.e. nothing is immediately true or false, except tt and ff).

slide-54
SLIDE 54

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Constructing Tight Monitors for HML

Slim formulas: ϕ ::= tt | ff |

  • α∈B

[α]ϕα |

  • α∈D

αψα, where B, D = ∅, ϕα = tt, ψα = ff, and no

α∈Act[α]ff

  • r
  • α∈Actαtt

(i.e. nothing is immediately true or false, except tt and ff).

Proposition

If ϕ ∈ HML is slim, then m(ϕ) is tight.

slide-55
SLIDE 55

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Constructing Tight Monitors for HML

Slim formulas: ϕ ::= tt | ff |

  • α∈B

[α]ϕα |

  • α∈D

αψα, where B, D = ∅, ϕα = tt, ψα = ff, and no

α∈Act[α]ff

  • r
  • α∈Actαtt

(i.e. nothing is immediately true or false, except tt and ff).

Proposition

If ϕ ∈ HML is slim, then m(ϕ) is tight. The dieting process is based on rewrite rules based on simple equivalences: [Act]ff ⇛ ff, Acttt ⇛ tt, αff ⇛ ff, [α]ϕ∧[α]ψ ⇛ [α](ϕ∧ψ), [α]ϕ∨[β]ψ ⇛ tt, αϕ∧[β]ψ ⇛ αϕ . . .

slide-56
SLIDE 56

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Constructing Tight Monitors for maxHML

Transform ϕ to m(ϕ), and then determinize m(ϕ) to m;

slide-57
SLIDE 57

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Constructing Tight Monitors for maxHML

Transform ϕ to m(ϕ), and then determinize m(ϕ) to m; replace: rec x.no ⇛ no,

  • α∈Act α.no ⇛ no,

rec x.yes ⇛ yes, and

  • α∈Act α.yes ⇛ yes,

until there is nothing to replace.

Proposition

The result of the above process is tight.

slide-58
SLIDE 58

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Constructing Tight Monitors for maxHML

Transform ϕ to m(ϕ), and then determinize m(ϕ) to m; replace: rec x.no ⇛ no,

  • α∈Act α.no ⇛ no,

rec x.yes ⇛ yes, and

  • α∈Act α.yes ⇛ yes,

until there is nothing to replace.

Proposition

The result of the above process is tight. The resulting monitor can be triple-exponentially larger than ϕ.

slide-59
SLIDE 59

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Constructing Tight Monitors for maxHML

Question: Can we have a nicer construction as for HML?

slide-60
SLIDE 60

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Constructing Tight Monitors for maxHML

Question: Can we have a nicer construction as for HML? Probably not: no is the tight monitor for ϕ iff ϕ is not satisfiable.

Proposition (Upper bound from Vardi, 1988)

maxHML-satisfiability on infinite traces is PSPACE-complete (for |Act| > 1).

slide-61
SLIDE 61

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Into the Finfinite: α1 α2 α3 α4 · · ·?

another possible model: finite or infinite traces semantics similar to infinite traces

slide-62
SLIDE 62

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Into the Finfinite: α1 α2 α3 α4 · · ·?

another possible model: finite or infinite traces semantics similar to infinite traces we lose complete monitorability

slide-63
SLIDE 63

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Into the Finfinite: α1 α2 α3 α4 · · ·?

another possible model: finite or infinite traces semantics similar to infinite traces we lose complete monitorability tightness becomes irrelevant

slide-64
SLIDE 64

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Into the Finfinite: α1 α2 α3 α4 · · ·?

another possible model: finite or infinite traces semantics similar to infinite traces we lose complete monitorability tightness becomes irrelevant αtt no longer monitorable for violation

slide-65
SLIDE 65

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Into the Finfinite: α1 α2 α3 α4 · · ·?

another possible model: finite or infinite traces semantics similar to infinite traces we lose complete monitorability tightness becomes irrelevant αtt no longer monitorable for violation maximally monitorable fragments: ϕ, ψ ∈ unHML ::= tt | ff | [α]ϕ | ϕ ∨ ψ | ϕ ∧ ψ | max X.ϕ | X, ϕ, ψ ∈ exHML ::= tt | ff | αϕ | ϕ ∨ ψ | ϕ ∧ ψ | min X.ϕ | X.

slide-66
SLIDE 66

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Into the Finfinite: α1 α2 α3 α4 · · ·?

another possible model: finite or infinite traces semantics similar to infinite traces we lose complete monitorability tightness becomes irrelevant αtt no longer monitorable for violation maximally monitorable fragments: ϕ, ψ ∈ unHML ::= tt | ff | [α]ϕ | ϕ ∨ ψ | ϕ ∧ ψ | max X.ϕ | X, ϕ, ψ ∈ exHML ::= tt | ff | αϕ | ϕ ∨ ψ | ϕ ∧ ψ | min X.ϕ | X. unHML ≡ sHML, exHML ≡ cHML

  • ver finfinite traces
slide-67
SLIDE 67

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

What we did

  • Automatic monitor synthesis from l.t. maxHML, minHML
  • Either directly from maxHML or minHML, to construct a

parallel monitor and then regularize, or from sHML or cHML, to directly give a regular monitor.

  • Can produce tight monitors.
  • For sHML, cHML, there are working tools (DetectEr).

These can be used out-of-the box even for l.t.

slide-68
SLIDE 68

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

What we did

  • Automatic monitor synthesis from l.t. maxHML, minHML
  • Either directly from maxHML or minHML, to construct a

parallel monitor and then regularize, or from sHML or cHML, to directly give a regular monitor.

  • Can produce tight monitors.
  • For sHML, cHML, there are working tools (DetectEr).

These can be used out-of-the box even for l.t.

  • Complete characterization of monitorable trace properties

with respect to different monitorability guarantees.

slide-69
SLIDE 69

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

What we did

  • Automatic monitor synthesis from l.t. maxHML, minHML
  • Either directly from maxHML or minHML, to construct a

parallel monitor and then regularize, or from sHML or cHML, to directly give a regular monitor.

  • Can produce tight monitors.
  • For sHML, cHML, there are working tools (DetectEr).

These can be used out-of-the box even for l.t.

  • Complete characterization of monitorable trace properties

with respect to different monitorability guarantees.

  • Logical consequences: maxHML collapses to sHML for l.t.
slide-70
SLIDE 70

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

What we did

  • Automatic monitor synthesis from l.t. maxHML, minHML
  • Either directly from maxHML or minHML, to construct a

parallel monitor and then regularize, or from sHML or cHML, to directly give a regular monitor.

  • Can produce tight monitors.
  • For sHML, cHML, there are working tools (DetectEr).

These can be used out-of-the box even for l.t.

  • Complete characterization of monitorable trace properties

with respect to different monitorability guarantees.

  • Logical consequences: maxHML collapses to sHML for l.t.
  • On the other hand, we see surprising differences
  • Complete monitorability,

tightness

  • Monitorable formulas are closed under ∧, ∨ for l.t., but not

for branching time.

slide-71
SLIDE 71

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

What we did

  • Automatic monitor synthesis from l.t. maxHML, minHML
  • Either directly from maxHML or minHML, to construct a

parallel monitor and then regularize, or from sHML or cHML, to directly give a regular monitor.

  • Can produce tight monitors.
  • For sHML, cHML, there are working tools (DetectEr).

These can be used out-of-the box even for l.t.

  • Complete characterization of monitorable trace properties

with respect to different monitorability guarantees.

  • Logical consequences: maxHML collapses to sHML for l.t.
  • On the other hand, we see surprising differences
  • Complete monitorability,

tightness

  • Monitorable formulas are closed under ∧, ∨ for l.t., but not

for branching time.

  • Moral: when you study the properties of monitorability,

the choice of the model matters!

slide-72
SLIDE 72

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Future work

  • More complexity bounds
  • What is monitorability, after all? Relation to other

concepts, the rest of the RV community?

  • Relations to similar concepts: diagnosability, learning,. . .
  • Distributed RV, fault tolerance, Epistemic Logic, evidence

tracking.

  • Real time
  • . . .
slide-73
SLIDE 73

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

More Variations for the Interested

  • Silence and obscuring:
  • Sometimes we abstract away from internal system

behaviour using a silent action τ.

  • Often, a silent transition is almost-visible due to evaluating

conditions, system noise, or by design. . .

  • A framework for grades of obscuring of silent actions and

reliable monitorability [AAFI17]

  • Monitoring with conditions [AAFI18]
  • Sound/optimal monitorability [Leh]
slide-74
SLIDE 74

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

The End

Time for questions

Thank you for your attention

This research was supported by the projects “TheoFoMon: Theoretical Foundations for Monitorability” (grant number: 163406-051) and “Epistemic Logic for Distributed Runtime Monitoring” (grant number: 184940-051) of the Icelandic Research Fund, by the BMBF project “AramisII” (project number: 01IS160253), and by the EPSRC project “Solv- ing parity games in theory and practice” (project number: EP/P020909/1).

slide-75
SLIDE 75

Introduction Specifications BT Monitorability Linear Time Tightness Finfinite The End(?)

Short Bibliography for Further Reading

The TheoFoMon project page: http://icetcs.ru.is/theofomon/ This work will appear in POPL 2019. Luca Aceto, Antonis Achilleos, Adrian Francalanza, and Anna Ing´

  • lfsd´
  • ttir, Monitoring for silent actions, FSTTCS (Dagstuhl,

Germany), LIPIcs, vol. 93, Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, 2017, pp. 7:1–7:14. Luca Aceto, Antonis Achilleos, Adrian Francalanza, and Anna Ing´

  • lfsd´
  • ttir, A framework for parametrized monitorability,

FOSSACS, Lecture Notes in Computer Science, vol. 10803, Springer, 2018, pp. 203–220. Karoliina Lehtinen, Runtime verification of fixpoint logic: Synthesis of optimal monitors, https://www.informatik.uni-kiel.de/~leh/mon.pdf.