Robustness of Temporal Logic Specifications for Signals Georgios - - PowerPoint PPT Presentation

robustness of temporal logic specifications for signals
SMART_READER_LITE
LIVE PREVIEW

Robustness of Temporal Logic Specifications for Signals Georgios - - PowerPoint PPT Presentation

Robustness of Temporal Logic Specifications for Signals Georgios Fainekos dissertation series - Part I Akshay Rajhans ECE Department, CMU SVC Seminar: Aug 21, 2008 Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21,


slide-1
SLIDE 1

Robustness of Temporal Logic Specifications for Signals

Georgios Fainekos dissertation series - Part I Akshay Rajhans

ECE Department, CMU

SVC Seminar: Aug 21, 2008

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 1 / 42

slide-2
SLIDE 2

Outline

1

Background and definitions

2

Boolean satisfaction of a specification by a signal - Boolean abstraction

3

Robust satisfaction of a specification by a signal - “Robustness degree”

4

Robust TL semantics - “Robustness estimate”

5

Discrete time signals, timed state sequences and their robustness

6

Continuous time reasoning using discrete time analysis

7

Monitoring algorithm and software tool

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 2 / 42

slide-3
SLIDE 3

Background and definitions

Outline

1

Background and definitions

2

Boolean satisfaction of a specification by a signal - Boolean abstraction

3

Robust satisfaction of a specification by a signal - “Robustness degree”

4

Robust TL semantics - “Robustness estimate”

5

Discrete time signals, timed state sequences and their robustness

6

Continuous time reasoning using discrete time analysis

7

Monitoring algorithm and software tool

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 3 / 42

slide-4
SLIDE 4

Background and definitions

Background

On the use of temporal logic (TL) TL useful in software and hardware verification But verification undecidable/expensive in continuous and hybrid systems Testing of the systems or numerical simulation of the system models are preferred choices in these cases; steady state properties can be fairly easily tested or numerically simulated Important idea Use TL as a specification language for testing

Oded Maler and Dejan Nickovic. Monitoring temporal properties of continuous signals. FORMATS, 2004

Advantage: Transient properties can be specified (and hence tested) if we use temporal logic.

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 4 / 42

slide-5
SLIDE 5

Background and definitions

Typical structure for testing using TL

Signal We either give an analytical formula or some samples of the signal Specification We use metric interval temporal logic to specify some formula Observation map: is a Boolean abstraction map from signal space to true/false Intuition: We specify that the signal must be within this range during this time span Monitoring algorithm We have some sort of algorithm to check whether or not the signal was indeed within that range during that time span Result If yes, we get a ‘true’ result; ‘false’ otherwise

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 5 / 42

slide-6
SLIDE 6

Background and definitions

Continuous time signal

Formal definition A signal s is a map s : T → X, where

T is a time domain, some subset of R≥0 X is a metric space, to be defined in the next slide

Example: s1 = sin(t) + sin(2t), T = [0, 7π]

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 6 / 42

slide-7
SLIDE 7

Background and definitions

Metric space, metric, ε-ball

Metric space A metric space (X, d) is an ordered pair of a set X and a metric d. Metric A metric d is a non-negative function d : X × X → R≥0, such that ∀x1, x2, x3 ∈ X, we have:

d(x1, x2) = 0 ⇔ x1 = x2 d(x1, x2) = d(x2, x1) d(x1, x3) ≤ d(x1, x2) + d(x2, x3)

ε-ball An ε-ball Bd(x, ε) is defined as

Bd(x, ε) = {y ∈ X|d(x, y) < ε}

Ball in L2 or Euclidian norm Ball in L∞ or sup norm

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 7 / 42

slide-8
SLIDE 8

Background and definitions

Signed distance

Formal definition Let x ∈ X be a point, C ⊆ X be a set and d be a metric. Then, the signed distance from x to C is:

Distd(x, C) =

  • −distd(x, C),

if x / ∈ C depthd(x, C), if x ∈ C (1) where, distd(x, C) = inf {d(x, y)|y ∈ Cl(C)} depthd(x, C) = distd(x, X \ C)

Pictorially:

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 8 / 42

slide-9
SLIDE 9

Background and definitions

Metric (Interval) Temporal Logic - Syntax

Inductive grammar ϕ = T| ⊥ |p|¬ϕ|ϕ1 ∨ ϕ2|ϕ1 ∧ ϕ2|ϕ1UIϕ2|ϕ1RIϕ2 Note that: In MTL, I can be any bounded or unbounded but non-empty interval of R≥0 e.g. [a, b], [a, b), (a, b], (a, b), where 0 ≤ a ≤ b In addition, MITL requires I to be non-singleton, i.e. a = b If a = 0 and b = ∞, the M(I)TL formula is equivalent to LTL formula ‘Eventually’ and ‘Always’ operators can be derived as follows:

♦Iϕ = TUIϕ and Iϕ =⊥ RIϕ

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 9 / 42

slide-10
SLIDE 10

Boolean satisfaction of a specification by a signal - Boolean abstraction

Outline

1

Background and definitions

2

Boolean satisfaction of a specification by a signal - Boolean abstraction

3

Robust satisfaction of a specification by a signal - “Robustness degree”

4

Robust TL semantics - “Robustness estimate”

5

Discrete time signals, timed state sequences and their robustness

6

Continuous time reasoning using discrete time analysis

7

Monitoring algorithm and software tool

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 10 / 42

slide-11
SLIDE 11

Boolean satisfaction of a specification by a signal - Boolean abstraction

Boolean satisfaction of a specification by a signal

Boolean abstraction We specify an observation map Observation map labels regions of state space with atomic propositions, e.g. O(p1) = [4, 7]

The signal satisfies p1 if its value is between 4 and 7, otherwise does not satisfy p1

Preimage of observation map: O−1(x) = {p ∈ AP|x ∈ O(p)} Rewriting MITL semantics for testing We rewrite (O−1 ◦ s, t) | = ϕ as ≪ ϕ, O ≫= T If the mapping O remains constant, we can drop it for brevity and write ≪ ϕ ≫= T

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 11 / 42

slide-12
SLIDE 12

Boolean satisfaction of a specification by a signal - Boolean abstraction

Boolean satisfaction of a specification by a signal

Rewriting the MTL grammar for testing: ⊓ means min and ⊔ means max; Subscript C: continuous time signals

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 12 / 42

slide-13
SLIDE 13

Boolean satisfaction of a specification by a signal - Boolean abstraction

An example

MTL specification ϕ = ♦[1,3]p where O(p) is the set of reals strictly greater than 10 Last graph shows ≪ ϕ ≫ (s, t) where t is time. When we are talking about ≪ ϕ ≫ (s, 0) we drop 0 for brevity and write ≪ ϕ ≫ (s)

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 13 / 42

slide-14
SLIDE 14

Boolean satisfaction of a specification by a signal - Boolean abstraction

Problems with a Boolean result

Vulnerability to perturbations We cannot distinguish between good and better satisfactions (nor between bad and worse)

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 14 / 42

slide-15
SLIDE 15

Robust satisfaction of a specification by a signal - “Robustness degree”

Outline

1

Background and definitions

2

Boolean satisfaction of a specification by a signal - Boolean abstraction

3

Robust satisfaction of a specification by a signal - “Robustness degree”

4

Robust TL semantics - “Robustness estimate”

5

Discrete time signals, timed state sequences and their robustness

6

Continuous time reasoning using discrete time analysis

7

Monitoring algorithm and software tool

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 15 / 42

slide-16
SLIDE 16

Robust satisfaction of a specification by a signal - “Robustness degree”

‘Robust’ satisfaction of a specification by a signal

Definition of ‘robustness degree’ Given a signal s, we define the robustness degree ε as

ε = Distρ(s, L(φ)) [This is a signed distance] where ρ(s, s′) = supt {d(s(t), s′(t))|t ∈ T} and where L(φ) is the set of all signals that satisfy φ

Note that the robustness degree is the radius of the largest (open) ball centered at s that you can fit within L(φ)

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 16 / 42

slide-17
SLIDE 17

Robust satisfaction of a specification by a signal - “Robustness degree”

An example where the robustness degree can be computed

A simple example s(t) = sin(t) + sin(2t) ϕ0 = p1 and O(p1) = [−2, 2]

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 17 / 42

slide-18
SLIDE 18

Robust satisfaction of a specification by a signal - “Robustness degree”

An example where the robustness degree can be computed

A simple example Here, ε can be computed as 0.2398 In general, robustness degree cannot be computed directly, since we don’t know ‘the set of all signals that satisfy the given formula’.

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 18 / 42

slide-19
SLIDE 19

Robust TL semantics - “Robustness estimate”

Outline

1

Background and definitions

2

Boolean satisfaction of a specification by a signal - Boolean abstraction

3

Robust satisfaction of a specification by a signal - “Robustness degree”

4

Robust TL semantics - “Robustness estimate”

5

Discrete time signals, timed state sequences and their robustness

6

Continuous time reasoning using discrete time analysis

7

Monitoring algorithm and software tool

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 19 / 42

slide-20
SLIDE 20

Robust TL semantics - “Robustness estimate”

Multi-valued (aka ‘robust’) TL semantics

Previous ideas De Alfaro et al:

Propositions can take values not from {0, 1} but in [0, 1] Idea used in ‘Discounted’ model checking - a discount factor between 0 to 1 Also used for model checking of say Markov decision processes - transition probabilities between 0 to 1

Idea by Fainekos Propositions can take real values Details follow. . .

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 20 / 42

slide-21
SLIDE 21

Robust TL semantics - “Robustness estimate”

Robust TL semantics

Inductive grammar ⊓ means inf and ⊔ means sup; Subscript C: continuous time signals

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 21 / 42

slide-22
SLIDE 22

Robust TL semantics - “Robustness estimate”

Robustness estimate a lower bound on robustness degree

Important result which implies

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 22 / 42

slide-23
SLIDE 23

Robust TL semantics - “Robustness estimate”

‘estimate’ a lower bound on ‘degree’ - why?

By construction of the semantics: An example Robustness degree: The radius of the lartest ε-ball we can fit within the O(p1 ∨ p2) Robustness estimate: The semantics ask us to take the sup of the radii of the ε-balls we can fit within both observation maps individually.

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 23 / 42

slide-24
SLIDE 24

Discrete time signals, timed state sequences and their robustness

Outline

1

Background and definitions

2

Boolean satisfaction of a specification by a signal - Boolean abstraction

3

Robust satisfaction of a specification by a signal - “Robustness degree”

4

Robust TL semantics - “Robustness estimate”

5

Discrete time signals, timed state sequences and their robustness

6

Continuous time reasoning using discrete time analysis

7

Monitoring algorithm and software tool

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 24 / 42

slide-25
SLIDE 25

Discrete time signals, timed state sequences and their robustness

Why talk about discrete time signals?

Practical reasons We may not know the analytical equation of the signal We may not have access or to all the (infinite) values of a continuous signal even on a finite real time domain All we might have is a number of samples and the corresponding time stamps Typical example: result of a variable step numerical ODE integration in Matlab.

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 25 / 42

slide-26
SLIDE 26

Discrete time signals, timed state sequences and their robustness

Timed State Sequences (TSS)

In words: Discrete time signal σ is a sequence of samples, no timing info A timing function τ associates time with each sample A pair µ=(σ,τ) is called a timed state sequence Pictorially:

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 26 / 42

slide-27
SLIDE 27

Discrete time signals, timed state sequences and their robustness

MITL semantics for testing

MITL semantics for TSS

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 27 / 42

slide-28
SLIDE 28

Discrete time signals, timed state sequences and their robustness

Robust semantics

Robust semantics for TSS

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 28 / 42

slide-29
SLIDE 29

Continuous time reasoning using discrete time analysis

Outline

1

Background and definitions

2

Boolean satisfaction of a specification by a signal - Boolean abstraction

3

Robust satisfaction of a specification by a signal - “Robustness degree”

4

Robust TL semantics - “Robustness estimate”

5

Discrete time signals, timed state sequences and their robustness

6

Continuous time reasoning using discrete time analysis

7

Monitoring algorithm and software tool

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 29 / 42

slide-30
SLIDE 30

Continuous time reasoning using discrete time analysis

Why are DT and CT semantics NOT equivalent?

Consider the DT Until operator Observations: The actual interval and the samples within that interval do not coincide If we have no sample within some interval, TSS cannot capture the properties

  • f the original signal

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 30 / 42

slide-31
SLIDE 31

Continuous time reasoning using discrete time analysis

Can we force DT and CT equivalence?

Strengthening of formulas Idea introduced by Huang et al

Jinfeng Huang, Jeroen Voeten, and Marc Geilen, Real-time property preservation in approximations of timed systems, Conference on Formal Methods and Models for Co-Design, 2003

Satisfaction of a strengthened formula by a TSS will guarante (under certain assumptions) the satisfaction of the original formula by the signal Assumptions on signal behavior - bounded spread Intuitively: Signal doesn’t spread infinitely in a finite duration Assumptions for sampling - at least one sample per interval We have enough data to build on Let us look at these assumptions in detail. . .

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 31 / 42

slide-32
SLIDE 32

Continuous time reasoning using discrete time analysis

Well-behavedness assumptions

Bounded spread ∀t, t′ ∈ R, d(s(t), s(t′)) ≤ E(|t − t′|), R: signal domain on real number line At least one sample per interval Disallowed cases (pictorially): No sample in the interval Empty intersection with the signal domain R

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 32 / 42

slide-33
SLIDE 33

Continuous time reasoning using discrete time analysis

Strengthening of formulas with resepect to time

Main idea: Satisfying strenghened formula in DT ⇒ satisfying the original (weaker) formula in CT Atomic predicates and their Boolean combinations No direct strenghening needed (no ‘interval’ for these operators) str∆τ(p) = p str∆τ(¬p) = ¬p str∆τ(ϕ1 ∨ ϕ2) = str∆τ(ϕ1) ∨ str∆τ(ϕ2) str∆τ(ϕ1 ∧ ϕ2) = str∆τ(ϕ1) ∧ str∆τ(ϕ2) Let’s see the cases where strengthening is needed, in detail on the next slide. . .

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 33 / 42

slide-34
SLIDE 34

Continuous time reasoning using discrete time analysis

Strengthening of formulas with respect to time

‘Until’ operator: Compress by ∆τ [where ∆τ = supi(τi+1 − τi)] str∆τ(ϕ1UIϕ2) = str∆τ(ϕ1) UC(I,∆τ) str∆τ(ϕ2) ‘Release’ operator: Expand by ∆τ str∆τ(ϕ1RIϕ2) = str∆τ(ϕ1) RE(I,∆τ) str∆τ(ϕ2)

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 34 / 42

slide-35
SLIDE 35

Continuous time reasoning using discrete time analysis

DT - CT equivalence

Given a specification and a TSS, if we know the value of ∆τ and strengthen the specification by ∆τ and well-behavedness assumptions are satisfied post-strengthening and we (somehow) know E(∆τ) and and we find the robustness estimate of the given TSS on this strengthened specification and if the robustness estimate of the TSS for the strengthened specification turnes

  • ut to be greater than E(∆τ)

then the original continuous time signal satisfies the original specification

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 35 / 42

slide-36
SLIDE 36

Monitoring algorithm and software tool

Outline

1

Background and definitions

2

Boolean satisfaction of a specification by a signal - Boolean abstraction

3

Robust satisfaction of a specification by a signal - “Robustness degree”

4

Robust TL semantics - “Robustness estimate”

5

Discrete time signals, timed state sequences and their robustness

6

Continuous time reasoning using discrete time analysis

7

Monitoring algorithm and software tool

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 36 / 42

slide-37
SLIDE 37

Monitoring algorithm and software tool

Monitoring algorithm

A recursive algorithm

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 37 / 42

slide-38
SLIDE 38

Monitoring algorithm and software tool

Monitoring algorithm

A recursive algorithm (continued. . . )

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 38 / 42

slide-39
SLIDE 39

Monitoring algorithm and software tool

Software tool

TaLiRo Computes the robustness estimate Takes MTL specifications as input Can handle 1D signals as of now Can handle polytopic observation maps Available at: http://www.seas.upenn.edu/~fainekos/robustness.html

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 39 / 42

slide-40
SLIDE 40

Monitoring algorithm and software tool

Summary

Take-away messages from this talk Multi-valued TL semantics make the use of TL more robust in testing Hopefully could help to popularize the use of TL beyond purely discrete systems, into continuous and hybrid systems :-) Stay tuned for part II talk Exciting new extensions possible We will discuss: Verification using robust testing We will also briefly review approximate bisimulations Stay tuned. . .

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 40 / 42

slide-41
SLIDE 41

Monitoring algorithm and software tool

References

Georgios Fainekos’s work All credit should go to Georgios Fainekos, this is his work. On the other hand, if there were any mistakes, they were most likely mine. References Some figures and formulas were taken from the thesis and talk slides by Georgios. The references i.e. the presentations, publications and other interesting reference material is available at: http://www.seas.upenn.edu/~fainekos/the_public.html

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 41 / 42

slide-42
SLIDE 42

Monitoring algorithm and software tool

Thank you

Thank you Thanks to Ed Clarke for hosting me Thanks to Bruce Krogh and Alex Donz´ e for reviewing the slides Thank you all for attending

Akshay Rajhans (ECE, CMU) Robustness of TL for signals SVC Seminar: Aug 21, 2008 42 / 42