From First-order Temporal Logic to Parametric Trace Slicing Giles - - PowerPoint PPT Presentation

from first order temporal logic to parametric trace
SMART_READER_LITE
LIVE PREVIEW

From First-order Temporal Logic to Parametric Trace Slicing Giles - - PowerPoint PPT Presentation

Motivation FO-LTL f Slicing Slicability Usable Fragment Translation Conclude From First-order Temporal Logic to Parametric Trace Slicing Giles Reger David Rydeheard University of Manchester, Manchester, UK September 25, 2015 Motivation


slide-1
SLIDE 1

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

From First-order Temporal Logic to Parametric Trace Slicing

Giles Reger David Rydeheard

University of Manchester, Manchester, UK

September 25, 2015

slide-2
SLIDE 2

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Outline

Motivation FO-LTLf Parametric Trace Slicing Slicability Usable Fragment Translation Conclude

slide-3
SLIDE 3

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Motivation

  • There are lots and lots of languages used for specifying RV

properties (see the competition)

  • Particularly for first-order/parametric/data properties
  • Whilst propositional case seems well understood, lots more

freedom with first-order

  • Mainly how to organise the domain of quantification
  • Languages often driven by monitoring concerns
  • We should understand how they are related
  • Parametric trace slicing can be efficiently monitored
  • Temporal logic is well understand and widely used
  • If we can understand their connection we can leverage

both advantages

slide-4
SLIDE 4

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Interpreting Formulas

  • Does this trace
  • satisfy this formula
  • In the ‘standard’ view of quantification?
  • In the ‘slicing’ view of quantification?
slide-5
SLIDE 5

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Interpreting Formulas

  • Does this trace
  • satisfy this formula

∀x : (p(x) → q(x))

  • In the ‘standard’ view of quantification?
  • In the ‘slicing’ view of quantification?
slide-6
SLIDE 6

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Interpreting Formulas

  • Does this trace

p(a).p(b).q(a).q(b).p(c).q(c).p(d).q(d)

  • satisfy this formula

∀x : (p(x) → q(x))

  • In the ‘standard’ view of quantification?
  • In the ‘slicing’ view of quantification?
slide-7
SLIDE 7

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Interpreting Formulas

  • Does this trace

p(a).p(b).q(a).q(b).p(c).q(c).p(d).q(d)

  • satisfy this formula

∀x : (p(x) → q(x))

  • In the ‘standard’ view of quantification?
  • In the ‘slicing’ view of quantification?
slide-8
SLIDE 8

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Interpreting Formulas

  • Does this trace

p(a).p(b).q(a).q(b).p(c).q(c).p(d).q(d)

  • satisfy this formula

∀x : (p(x) → q(x))

  • In the ‘standard’ view of quantification?
  • In the ‘slicing’ view of quantification?
slide-9
SLIDE 9

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Interpreting Formulas

  • Does this trace

p(a).p(b).q(a).q(b).p(c).q(c).p(d).q(d)

  • satisfy this formula

∀x : ¬q(x) U p(x)

  • In the ‘standard’ view of quantification?
  • In the ‘slicing’ view of quantification?
slide-10
SLIDE 10

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Interpreting Formulas

  • Does this trace
  • pen(A).open(B).open(B).close(A).close(A)
  • satisfy this formula

∀f : open(f) → (¬open(f) U◦ close(f))

  • In the ‘standard’ view of quantification?
  • In the ‘slicing’ view of quantification?
slide-11
SLIDE 11

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Interpreting Formulas

  • Does this trace
  • pen(A).open(B).open(B).close(A).close(A)
  • satisfy this formula

∀f : open(f) → (¬open(f) U◦ close(f))

  • In the ‘standard’ view of quantification?
  • In the ‘slicing’ view of quantification?
slide-12
SLIDE 12

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Interpreting Formulas

  • Does this trace
  • pen(A).open(B).open(B).close(A).close(A)
  • satisfy this formula

∀f : open(f) → (¬open(f) U◦ close(f))

  • In the ‘standard’ view of quantification?
  • In the ‘slicing’ view of quantification?
slide-13
SLIDE 13

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Interpreting Formulas

  • Does this trace
  • satisfy this formula
  • In the ‘standard’ view of quantification?
  • In the ‘slicing’ view of quantification?
  • Other notions of quantification exist that give different

interpretations, we stick to these two for now

slide-14
SLIDE 14

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Introducing FO-LTLf

  • Time is linear, discrete and future
  • Finite-trace semantics
  • Syntax (note use of next-Until)

φ = true | a | ∀x : φ | ¬φ | φ ∨ φ | φ U◦ φ

  • Semantics

D, τ, v, i | = true D, τ, v, i | = a if τi = v(a) D, τ, v, i | = ¬φ if D, τ, v, i | = φ D, τ, v, i | = φ1 ∨ φ2 if D, τ, v, i | = φ1 or D, τ, v, i | = φ2 D, τ, v, i | = φ1 U◦ φ2 if there exists a j > i such that either D, τ, v, j | = φ2 or (j = |τ| and φ2 = false) and fori < k < j we have D, τ, v, k | = φ1 D, τ, v, i | = ∀x : φ if for every d ∈ D(x) we have D, τ, v † [x → d], i | = φ

slide-15
SLIDE 15

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Introducing FO-LTLf

  • Time is linear, discrete and future
  • Finite-trace semantics
  • Syntax (note use of next-Until)

φ = true | a | ∀x : φ | ¬φ | φ ∨ φ | φ U◦ φ

  • Semantics

D, τ, v, i | = true D, τ, v, i | = a if τi = v(a) D, τ, v, i | = ¬φ if D, τ, v, i | = φ D, τ, v, i | = φ1 ∨ φ2 if D, τ, v, i | = φ1 or D, τ, v, i | = φ2 D, τ, v, i | = φ1 U◦ φ2 if there exists a j > i such that either D, τ, v, j | = φ2 or (j = |τ| and φ2 = false) and fori < k < j we have D, τ, v, k | = φ1 D, τ, v, i | = ∀x : φ if for every d ∈ D(x) we have D, τ, v † [x → d], i | = φ

slide-16
SLIDE 16

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Introducing FO-LTLf

  • Time is linear, discrete and future
  • Finite-trace semantics
  • Syntax (note use of next-Until)

φ = true | a | ∀x : φ | ¬φ | φ ∨ φ | φ U◦ φ

  • Semantics

D, τ, v, i | = true D, τ, v, i | = a if τi = v(a) D, τ, v, i | = ¬φ if D, τ, v, i | = φ D, τ, v, i | = φ1 ∨ φ2 if D, τ, v, i | = φ1 or D, τ, v, i | = φ2 D, τ, v, i | = φ1 U◦ φ2 if there exists a j > i such that either D, τ, v, j | = φ2 or (j = |τ| and φ2 = false) and fori < k < j we have D, τ, v, k | = φ1 D, τ, v, i | = ∀x : φ if for every d ∈ D(x) we have D, τ, v † [x → d], i | = φ

slide-17
SLIDE 17

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Definitions

  • Can define the normal things in terms of U◦

ϕ = false U◦ ϕ φ1 U φ2 = φ2 ∨ (φ1 ∧ (φ1 U◦ φ2)) ♦φ = true U φ φ = φ U false

  • Next is strong i.e. a is false at the end of the trace
  • But a will be true at the end of the trace
  • And ♦a will be false at the end of the trace
  • Slightly non-standard finite trace semantics, would like to

vary in the future

slide-18
SLIDE 18

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Domain of quantification

  • The (other) controversial bit
  • We write τ |

= φ if a trace τ satisfies a property φ, defined as follows τ | = φ iff dom(τ, φ), τ, [], 0 | = φ where the domain function dom is defined as: dom(τ, φ)(x) =   di where e(. . . , di, . . .) ∈ τ ∧ e(. . . , xi, . . .) ∈ events(φ) ∧ xi = x   

  • The domain of quantification is dependent on the full trace
slide-19
SLIDE 19

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Parametric Trace Slicing

  • Given a trace τ and valuation θ let τ ↓θ be the θ-slice of τ

ǫ ↓θ = ǫ τ.e(v) ↓θ = (τ ↓θ).e(v) if ∃e(z) ∈ A(X) : θ(e(z)) = e(v) (τ ↓θ)

  • therwise
  • The trace τ is accepted for quantification list Λ(X) and

propositional property P(X) if τ | =P(X)

[]

Λ(X), defined as τ | =P(X)

θ

∀x : Λ if for every d ∈ dom(x) we have τ | =P(X)

θ†[x→d] Λ

τ | =P(X)

θ

∃x : Λ if for some d ∈ dom(x) we have τ | =P(X)

θ†[x→d] Λ

τ | =P(X)

θ

ǫ if τ ↓θ∈ L(θ, P(X))

  • Using the same domain of quantification dom
slide-20
SLIDE 20

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Example

Given the trace

call(A).call(B).call(C).return(C).return(B).call(C).return(C).return(A)

And a property ϕ that whenever a method m2 is called inside a method m1, the method m2 should return before m1. events(ϕ) = {call(m1), return(m1), call(m2), return(m2)} We get the following slices

m1 m2 slice A B call(A).call(B).return(B).return(A) A C call(A).call(C).return(C).call(C).return(C).return(A) B C call(B).call(C).return(C).return(B).call(C).return(C)

Each slice can be checked by some unquantified checker P(m1, m2)

slide-21
SLIDE 21

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Goal of considering Sliceability

  • Identify the properties of FO-LTLf formulas that allow the

semantics to coincide with the slicing semantics

  • For now only consider globally quantified properties
  • This is an artificial restriction (as our slicing definition is

restricted) that makes everything easier for now

  • ... but the globally quantified fragment is still interesting
  • .. and we have begun to consider the full setting
  • Aim to understand correspondence
  • And use this to efficiently monitor FO-LTLf properties
slide-22
SLIDE 22

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Slicing Invariance

A formula ψ with free variables X is sliceable if for valuation θ

  • ver X and trace τ. The formula ψ is sliceable if

τ, θ | = ψ ⇔ τ ↓θ, θ | = ψ. Let L(ψ, θ) = {τ | τ, θ | = ψ} be the traces satisfying ψ. Define LC(ψ, θ) as the non-relevance-closure of L(ψ, θ) to be the smallest set containing τ if τ ∈ L(ψ, θ) τ1.τ2.τ3 if ∀a ∈ τ2 : a / ∈ relevant(ψ, θ) and τ1.τ3 ∈ LC(ψ, θ) τ1.τ3 if ∃τ1.τ2.τ3 ∈ LC(ψ, θ) : ∀a ∈ τ2 : a / ∈ relevant(ψ, θ) where relevant(ψ, θ) = {θ(a) | a ∈ events(ψ)}. The formula ψ is slicing invariant if L(ψ, θ) = LC(ψ, θ). The notions of sliceability and slicing invariance coincide.

slide-23
SLIDE 23

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

What are the restrictions?

k(a).f(a).f(b).g(a).g(b).h(b, a).f(b).h(b, c).g(b) Starting at the start

  • f(x) ∨ ♦k(x) and ¬f(x) ∨ ♦k(x) i.e. for x = b
  • Rule: Cannot allow events (in positive or negative form) at

the top level of a sliceable formula

  • ¬f(x) U◦ g(x) for the trace g(a).g(a).f(b).g(b).

Never saying next

  • (f(x) → g(x)) for x = b
  • ϕ1 = (f(x) ∨ g(x)) = (f(x) ∨ g(x)) U false for x = b
  • Rule: cannot restrict what happens at the next time point

Never saying never

  • ϕ2 = ♦(¬f(x) ∧ ¬g(x)) = true U (¬f(x) ∧ ¬g(x)) for x = b
  • Rule: cannot wait for the negation of things
  • Symmetry. Note that ϕ1 = ¬ϕ2
slide-24
SLIDE 24

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

What are the restrictions?

k(a).f(a).f(b).g(a).g(b).h(b, a).f(b).h(b, c).g(b) . .f(b). .g(b). .f(b). .g(b) Starting at the start

  • f(x) ∨ ♦k(x) and ¬f(x) ∨ ♦k(x) i.e. for x = b
  • Rule: Cannot allow events (in positive or negative form) at

the top level of a sliceable formula

  • ¬f(x) U◦ g(x) for the trace g(a).g(a).f(b).g(b).

Never saying next

  • (f(x) → g(x)) for x = b
  • ϕ1 = (f(x) ∨ g(x)) = (f(x) ∨ g(x)) U false for x = b
  • Rule: cannot restrict what happens at the next time point

Never saying never

  • ϕ2 = ♦(¬f(x) ∧ ¬g(x)) = true U (¬f(x) ∧ ¬g(x)) for x = b
  • Rule: cannot wait for the negation of things
  • Symmetry. Note that ϕ1 = ¬ϕ2
slide-25
SLIDE 25

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

What are the restrictions?

k(a).f(a).f(b).g(a).g(b).h(b, a).f(b).h(b, c).g(b) . .f(b). .g(b). .f(b). .g(b) Starting at the start

  • f(x) ∨ ♦k(x) and ¬f(x) ∨ ♦k(x) i.e. for x = b
  • Rule: Cannot allow events (in positive or negative form) at

the top level of a sliceable formula

  • ¬f(x) U◦ g(x) for the trace g(a).g(a).f(b).g(b).

Never saying next

  • (f(x) → g(x)) for x = b
  • ϕ1 = (f(x) ∨ g(x)) = (f(x) ∨ g(x)) U false for x = b
  • Rule: cannot restrict what happens at the next time point

Never saying never

  • ϕ2 = ♦(¬f(x) ∧ ¬g(x)) = true U (¬f(x) ∧ ¬g(x)) for x = b
  • Rule: cannot wait for the negation of things
  • Symmetry. Note that ϕ1 = ¬ϕ2
slide-26
SLIDE 26

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

What are the restrictions?

k(a).f(a).f(b).g(a).g(b).h(b, a).f(b).h(b, c).g(b) . .f(b). .g(b). .f(b). .g(b) Starting at the start

  • f(x) ∨ ♦k(x) and ¬f(x) ∨ ♦k(x) i.e. for x = b
  • Rule: Cannot allow events (in positive or negative form) at

the top level of a sliceable formula

  • ¬f(x) U◦ g(x) for the trace g(a).g(a).f(b).g(b).

Never saying next

  • (f(x) → g(x)) for x = b
  • ϕ1 = (f(x) ∨ g(x)) = (f(x) ∨ g(x)) U false for x = b
  • Rule: cannot restrict what happens at the next time point

Never saying never

  • ϕ2 = ♦(¬f(x) ∧ ¬g(x)) = true U (¬f(x) ∧ ¬g(x)) for x = b
  • Rule: cannot wait for the negation of things
  • Symmetry. Note that ϕ1 = ¬ϕ2
slide-27
SLIDE 27

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

What are the restrictions?

k(a).f(a).f(b).g(a).g(b).h(b, a).f(b).h(b, c).g(b) . .f(b). .g(b). .f(b). .g(b) Starting at the start

  • f(x) ∨ ♦k(x) and ¬f(x) ∨ ♦k(x) i.e. for x = b
  • Rule: Cannot allow events (in positive or negative form) at

the top level of a sliceable formula

  • ¬f(x) U◦ g(x) for the trace g(a).g(a).f(b).g(b).

Never saying next

  • (f(x) → g(x)) for x = b
  • ϕ1 = (f(x) ∨ g(x)) = (f(x) ∨ g(x)) U false for x = b
  • Rule: cannot restrict what happens at the next time point

Never saying never

  • ϕ2 = ♦(¬f(x) ∧ ¬g(x)) = true U (¬f(x) ∧ ¬g(x)) for x = b
  • Rule: cannot wait for the negation of things
  • Symmetry. Note that ϕ1 = ¬ϕ2
slide-28
SLIDE 28

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

What are the restrictions?

k(a).f(a).f(b).g(a).g(b).h(b, a).f(b).h(b, c).g(b) . .f(b). .g(b). .f(b). .g(b) Starting at the start

  • f(x) ∨ ♦k(x) and ¬f(x) ∨ ♦k(x) i.e. for x = b
  • Rule: Cannot allow events (in positive or negative form) at

the top level of a sliceable formula

  • ¬f(x) U◦ g(x) for the trace g(a).g(a).f(b).g(b).

Never saying next

  • (f(x) → g(x)) for x = b
  • ϕ1 = (f(x) ∨ g(x)) = (f(x) ∨ g(x)) U false for x = b
  • Rule: cannot restrict what happens at the next time point

Never saying never

  • ϕ2 = ♦(¬f(x) ∧ ¬g(x)) = true U (¬f(x) ∧ ¬g(x)) for x = b
  • Rule: cannot wait for the negation of things
  • Symmetry. Note that ϕ1 = ¬ϕ2
slide-29
SLIDE 29

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

What are the restrictions?

k(a).f(a).f(b).g(a).g(b).h(b, a).f(b).h(b, c).g(b) . .f(b). .g(b). .f(b). .g(b) Starting at the start

  • f(x) ∨ ♦k(x) and ¬f(x) ∨ ♦k(x) i.e. for x = b
  • Rule: Cannot allow events (in positive or negative form) at

the top level of a sliceable formula

  • ¬f(x) U◦ g(x) for the trace g(a).g(a).f(b).g(b).

Never saying next

  • (f(x) → g(x)) for x = b
  • ϕ1 = (f(x) ∨ g(x)) = (f(x) ∨ g(x)) U false for x = b
  • Rule: cannot restrict what happens at the next time point

Never saying never

  • ϕ2 = ♦(¬f(x) ∧ ¬g(x)) = true U (¬f(x) ∧ ¬g(x)) for x = b
  • Rule: cannot wait for the negation of things
  • Symmetry. Note that ϕ1 = ¬ϕ2
slide-30
SLIDE 30

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

What are the restrictions?

k(a).f(a).f(b).g(a).g(b).h(b, a).f(b).h(b, c).g(b) . .f(b). .g(b). .f(b). .g(b) Starting at the start

  • f(x) ∨ ♦k(x) and ¬f(x) ∨ ♦k(x) i.e. for x = b
  • Rule: Cannot allow events (in positive or negative form) at

the top level of a sliceable formula

  • ¬f(x) U◦ g(x) for the trace g(a).g(a).f(b).g(b).

Never saying next

  • (f(x) → g(x)) for x = b
  • ϕ1 = (f(x) ∨ g(x)) = (f(x) ∨ g(x)) U false for x = b
  • Rule: cannot restrict what happens at the next time point

Never saying never

  • ϕ2 = ♦(¬f(x) ∧ ¬g(x)) = true U (¬f(x) ∧ ¬g(x)) for x = b
  • Rule: cannot wait for the negation of things
  • Symmetry. Note that ϕ1 = ¬ϕ2
slide-31
SLIDE 31

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

What are the restrictions?

k(a).f(a).f(b).g(a).g(b).h(b, a).f(b).h(b, c).g(b) . .f(b). .g(b). .f(b). .g(b) Starting at the start

  • f(x) ∨ ♦k(x) and ¬f(x) ∨ ♦k(x) i.e. for x = b
  • Rule: Cannot allow events (in positive or negative form) at

the top level of a sliceable formula

  • ¬f(x) U◦ g(x) for the trace g(a).g(a).f(b).g(b).

Never saying next

  • (f(x) → g(x)) for x = b
  • ϕ1 = (f(x) ∨ g(x)) = (f(x) ∨ g(x)) U false for x = b
  • Rule: cannot restrict what happens at the next time point

Never saying never

  • ϕ2 = ♦(¬f(x) ∧ ¬g(x)) = true U (¬f(x) ∧ ¬g(x)) for x = b
  • Rule: cannot wait for the negation of things
  • Symmetry. Note that ϕ1 = ¬ϕ2
slide-32
SLIDE 32

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

What are the restrictions?

k(a).f(a).f(b).g(a).g(b).h(b, a).f(b).h(b, c).g(b) . .f(b). .g(b). .f(b). .g(b) Starting at the start

  • f(x) ∨ ♦k(x) and ¬f(x) ∨ ♦k(x) i.e. for x = b
  • Rule: Cannot allow events (in positive or negative form) at

the top level of a sliceable formula

  • ¬f(x) U◦ g(x) for the trace g(a).g(a).f(b).g(b).

Never saying next

  • (f(x) → g(x)) for x = b
  • ϕ1 = (f(x) ∨ g(x)) = (f(x) ∨ g(x)) U false for x = b
  • Rule: cannot restrict what happens at the next time point

Never saying never

  • ϕ2 = ♦(¬f(x) ∧ ¬g(x)) = true U (¬f(x) ∧ ¬g(x)) for x = b
  • Rule: cannot wait for the negation of things
  • Symmetry. Note that ϕ1 = ¬ϕ2
slide-33
SLIDE 33

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Define Syntactic Fragment F

Let F be those formulas Q1x1 : . . . Qnxn : ψT for zero or more quantifications Qixi, with Qi = ∀ or ∃, and quantifier-free ψT inductively defined as : ψT = ψL U ψR | ψT ∨ ψT | ψT ∧ ψT ψL = true | ψL ∨ ψU | ψL ∧ ψL | ¬a ψR = false | ψR ∧ ψU | ψR ∨ ψR | a ψU = ψL U◦ ψR | ψL U ψR | ψU ∨ ψU | ψU ∧ ψU

  • Negations only on atoms
  • Left formulas (ψL) are true on non-relevant events
  • Right formulas (ψR) are false on non-relevant events
slide-34
SLIDE 34

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Properties

Lemma

For any formula ψ ∈ F with free variables X, traces τ1 and τ2, valuations θ over X, events a / ∈ relevant(ψ, θ) and indices i, j: Case 1. If ψ in ψL,R,U and (τ1.a.τ2)i ∈ relevant(ψ, θ) then τ1.a.τ2, θ, i | = ψ ⇔ τ1.τ2, θ, j | = ψ where j = i if i < |τ1| j = i − 1

  • therwise

Case 2. If ψ is in ψL then τ1.a.τ2, θ, |τ1| | = ψ Case 3. If ψ is in ψR then τ1.a.τ2, θ, |τ1| | = ψ Case 4. If ψ is in ψT then τ1.a.τ2, θ, 0 | = ψ ⇔ τ1.τ2, θ, 0 | = ψ

Theorem

All formulas in F are sliceable.

slide-35
SLIDE 35

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Is F usable as a specification language?

  • Most properties in Dwyer et al. fit, obviously some do not
  • HasNext

∀i : (¬next(i) U hasNext(i))∧ (next(i) → (¬next(i) U◦ hasNext(i)))

  • UnsafeMapIter

∀m : ∀c : ∀i : (create(m, c) → (iterator(c, i) → (update(m) → ¬use(i))))

  • CallNesting

∀m1 : ∀m2 : (¬ret(m1) U call(m1)) ∧ (¬ret(m2) U call(m2))∧ (call(m1) → (¬call(m1) U ret(m1))) ∧ (call(m1) → (call(m2) → ((¬ret(m2) ∧ ¬call(m2)) U ret(m2))) U ret(m1))

slide-36
SLIDE 36

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

From F to slicing-based formalism QEA

  • Now we have defined F we can translate formulas in F to

a formalism that can be efficiently monitored

  • We choose QEA as this is our formalism
  • Straightforward progression-based translation of

quantifier-free part to automaton

  • Technique is not new but we couldn’t find it written down

nicely anywhere

slide-37
SLIDE 37

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Example

Consider HasNext ψ = (h∨(n∧(¬n U◦ h)))∧(¬n∨(¬n U◦ h))∧((¬n∨(¬n U◦ h)) U◦ F)

h

− →

n

− → φ1 = n false true φ2 = h true false φ3 = ¬φ1 U◦ φ2 φ4 φ4 φ4 = φ2 ∨ (¬φ1 ∧ φ3) true false φ5 = ¬φ1 ∨ φ3 true φ4 φ6 = φ5 U◦ false φ5 ∧ φ6 φ5 ∧ φ6 ψ = φ4 ∧ φ6 φ5 ∧ φ6 false

  • φ5 ∧ φ6

n

− → (φ4 ∧ φ5 ∧ φ6) = ψ

  • We observe three states: ψ, false and φ5 ∧ φ6.
  • Acceptance based on acceptance of empty trace
  • φ6 = φ5 U◦ false is true on empty trace
slide-38
SLIDE 38

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Example

Consider HasNext ψ = (h∨(n∧(¬n U◦ h)))∧(¬n∨(¬n U◦ h))∧((¬n∨(¬n U◦ h)) U◦ F)

  • φ5 ∧ φ6

n

− → (φ4 ∧ φ5 ∧ φ6) = ψ

  • We observe three states: ψ, false and φ5 ∧ φ6.
  • Acceptance based on acceptance of empty trace
  • φ6 = φ5 U◦ false is true on empty trace

ψ false φ5 ∧ φ6 h n h n h, n

slide-39
SLIDE 39

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Further Work

  • Is F a maximal fragment?
  • Extensions
  • Other finite-trace semantics (multi-valued)
  • Arbitrary predicates
  • Non-global quantifiers
  • Freeze quantifiers
  • Translation in the other direction?
  • Implement translation in MARQ
slide-40
SLIDE 40

Motivation FO-LTLf Slicing Slicability Usable Fragment Translation Conclude

Conclusions

  • First step in understanding the correspondence between

two languages used for first-order runtime verification

  • Important that we understand the specification language

space

  • Lots more to do