Assertions and Measurements for Mixed-Signal Simulation PhD Thesis - - PowerPoint PPT Presentation

assertions and measurements for mixed signal simulation
SMART_READER_LITE
LIVE PREVIEW

Assertions and Measurements for Mixed-Signal Simulation PhD Thesis - - PowerPoint PPT Presentation

Assertions and Measurements for Mixed-Signal Simulation PhD Thesis Thomas Ferr` ere VERIMAG, University of Grenoble (directeur: Oded Maler) Mentor Graphics Corporation (co-encadrant: Ernst Christen) October 28, 2016 Cyber-Physical Systems


slide-1
SLIDE 1

Assertions and Measurements for Mixed-Signal Simulation

PhD Thesis Thomas Ferr` ere

VERIMAG, University of Grenoble (directeur: Oded Maler) Mentor Graphics Corporation (co-encadrant: Ernst Christen)

October 28, 2016

slide-2
SLIDE 2

Cyber-Physical Systems

◮ Both discrete and continuous modes of operation ◮ Example: a cell phone

  • A design:
  • A bug:

(courtesy of Samsung and AppleInsider)

◮ Verification is needed

1 / 40

slide-3
SLIDE 3

Cyber-Physical Systems

◮ Both discrete and continuous modes of operation ◮ Example: a cell phone

  • A design:
  • A bug:

(courtesy of Samsung and AppleInsider)

◮ Verification is needed

1 / 40

slide-4
SLIDE 4

Cyber-Physical Systems

◮ Both discrete and continuous modes of operation ◮ Example: a cell phone

  • A design:
  • A bug:

(courtesy of Samsung and AppleInsider)

◮ Verification is needed

1 / 40

slide-5
SLIDE 5

Cyber-Physical Systems

◮ Both discrete and continuous modes of operation ◮ Example: a cell phone

  • A design:
  • A bug:

(courtesy of Samsung and AppleInsider)

◮ Verification is needed

1 / 40

slide-6
SLIDE 6

Cyber-Physical Systems

◮ Both discrete and continuous modes of operation ◮ Example: a cell phone

  • A design:
  • A bug:

(courtesy of Samsung and AppleInsider)

◮ Verification is needed

1 / 40

slide-7
SLIDE 7

Mixed-Signal Simulation

Integrated Circuits

(courtesy of ST Microelectronics)

◮ Implement both analog and

digital electronics

◮ Design uses HDL and net lists at

several stages Modeling

◮ Digital: event-driven

q = 0 q = 1 ↑ p ↑ p

◮ Analog: algebraic differential

equations fp

  • x, dx

dt

  • = 0

◮ Mixed-Signal: analog events

↑(x > 2.0) and digital control fq

2 / 40

slide-8
SLIDE 8

Mixed-Signal Simulation

Integrated Circuits

(courtesy of ST Microelectronics)

◮ Implement both analog and

digital electronics

◮ Design uses HDL and net lists at

several stages Modeling

◮ Digital: event-driven

q = 0 q = 1 ↑ p ↑ p

◮ Analog: algebraic differential

equations fp

  • x, dx

dt

  • = 0

◮ Mixed-Signal: analog events

↑(x > 2.0) and digital control fq

2 / 40

slide-9
SLIDE 9

Simulation-Based Verification

◮ During the design stage run multiple simulations ◮ Each simulation produces a trace

  • Records evolution of quantities over time
  • Real-valued and Boolean signals

◮ Monitoring: each traced need to be analysed

  • Evaluate requirements: correctness, robusteness, diagnostics
  • In general measuring some performance

◮ Automation of the monitoring activity:

  • Additional observer blocks
  • Declarative property or measurement languages

3 / 40

slide-10
SLIDE 10

Declarative Languages in Industry

Assertions

◮ Digital domain ◮ Languages psl and sva built using two layers:

  • regular expression
  • temporal logic

◮ Discrete time interpretation

Measurements

◮ Analog domain ◮ extract commands: signal processing, offline ◮ meas commands: event-driven, online

4 / 40

slide-11
SLIDE 11

Research on Realtime Properties

Problem: mixed-signal characterized by a synchronous interaction Solution: use continous-time representation

◮ Metric Temporal Logic (Koymans, 1990)

  • Signal Temporal Logic for real-valued signals (Maler and Nickovic,

2004)

  • Quantitative semantics for robustness estimate (Fainekos and Pappas,

2009)

◮ Timed Regular Expressions (Asarin, Caspi and Maler, 1998)

5 / 40

slide-12
SLIDE 12

Limitations of Existing Tools and Techniques

◮ Digital assertions bound to precision of sampling clock ◮ Realtime properties monitoring not implemented ◮ Robustness computation is not efficient ◮ No easy diagnostic of temporal logic properties failure ◮ Measurements not controllable by sequential conditions ◮ No analog measures in a digital context

6 / 40

slide-13
SLIDE 13

Outline

  • 1. Preliminaries
  • 2. Robustness Computation
  • 3. Diagnostics
  • 4. Regular Expressions Monitoring
  • 5. Pattern-Based Measurements
  • 6. Analog Measures in Digital Environment
  • 7. Conclusion

7 / 40

slide-14
SLIDE 14

Outline

  • 1. Preliminaries
  • 2. Robustness Computation
  • 3. Diagnostics
  • 4. Regular Expressions Monitoring
  • 5. Pattern-Based Measurements
  • 6. Analog Measures in Digital Environment
  • 7. Conclusion

7 / 40

slide-15
SLIDE 15

Signal Temporal Logic

◮ Propositions p: Boolean variables q, conditions x ≤ c, and events ↑ p ◮ Temporal operators:

  • Until: ϕ UI ψ
  • Eventually: ♦I ψ = ⊤ UI ψ
  • Always: I ψ = ¬ ♦I ¬ψ

Formulas can be written with ♦[a,b] and U only

◮ Example: stabilization property ϕ = (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

t x t0 t0 + 5 t0 + 10 0.2 q

8 / 40

slide-16
SLIDE 16

Signal Temporal Logic

◮ Propositions p: Boolean variables q, conditions x ≤ c, and events ↑ p ◮ Temporal operators:

  • Until: ϕ UI ψ
  • Eventually: ♦I ψ = ⊤ UI ψ
  • Always: I ψ = ¬ ♦I ¬ψ

Formulas can be written with ♦[a,b] and U only

◮ Example: stabilization property ϕ = (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

t x t0 t0 + 5 t0 + 10 0.2 q

8 / 40

slide-17
SLIDE 17

Monitoring

Offline approach (Maler and Nickovic, 2004): for each subformula ϕ compute set of times [ϕ]w where ϕ holds according to w

Definition (Satisfaction Set)

[p]w = {t : pw(t) = 1} [¬ϕ]w = [ϕ]w

  • ♦[a,b] ϕ
  • w = [ϕ]w ⊖ [a, b]

[ϕ ∨ ψ]w = [ϕ]w ∪ [ψ]w

9 / 40

slide-18
SLIDE 18

Computation

Theorem

For any ϕ and w with finite variability, [ϕ]w is finite union of intervals

◮ Eventually operator:

t ϕ ♦[a,b] ϕ T T ⊖ [a, b]

◮ Worst-case complexity O(|ϕ|)2 · |w|

10 / 40

slide-19
SLIDE 19

Example

t 5 x 0.2 q x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

11 / 40

slide-20
SLIDE 20

Example

t 5 x 0.2 q x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

11 / 40

slide-21
SLIDE 21

Example

t 5 x 0.2 q x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

11 / 40

slide-22
SLIDE 22

Example

t 5 x 0.2 q x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

11 / 40

slide-23
SLIDE 23

Example

t 5 x 0.2 q x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

11 / 40

slide-24
SLIDE 24

Example

t 5 x 0.2 q x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

11 / 40

slide-25
SLIDE 25

Example

t 5 x 0.2 q x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

11 / 40

slide-26
SLIDE 26

Quantitative Semantics

Robustness value ϕw indicates how strongly ϕ is satisfied / violated by w

◮ Positive if satisfied / negative if violated ◮ Magnitude = conservative estimate of distance to satisfaction /

violation boundary

Definition (Robustness Signal)

x ≤ cw = c − xw ¬ϕw = − ϕw

  • ♦[a,b] ϕ
  • w = t →

sup

t′∈[t+a,t+b]

ϕw (t′) ϕ ∨ ψw = max{ϕw , ψw}

12 / 40

slide-27
SLIDE 27

Outline

  • 1. Preliminaries
  • 2. Robustness Computation
  • 3. Diagnostics
  • 4. Regular Expressions Monitoring
  • 5. Pattern-Based Measurements
  • 6. Analog Measures in Digital Environment
  • 7. Conclusion

12 / 40

slide-28
SLIDE 28

Principle

Theorem

For any ϕ and w piecewise linear, ϕw is piecewise linear

◮ Until rewrite rules preserve the robustness value ◮ Timed eventually computed using optimal streaming algorithm of

(Lemire, 2006) adapted to variable-step sampling

13 / 40

slide-29
SLIDE 29

Eventually Computation

◮ Problem: compute g(t) = supt′∈[t+a,t+b] f(t′) ◮ Solution: take maximum of f at t + a, t + b and sampling points

inside (a, b)

f t + a t + b

  • i2

14 / 40

slide-30
SLIDE 30

Eventually Computation

◮ Problem: compute g(t) = supt′∈[t+a,t+b] f(t′) ◮ Solution: take maximum of f at t + a, t + b and sampling points

inside (a, b)

f t + a t + b

  • i1
  • i2
  • i3
  • i4

14 / 40

slide-31
SLIDE 31

Eventually Computation

◮ Problem: compute g(t) = supt′∈[t+a,t+b] f(t′) ◮ Solution: take maximum of f at t + a, t + b and sampling points

inside (a, b)

f t + a t + b

  • i1
  • i2
  • i3
  • i4
  • i5

14 / 40

slide-32
SLIDE 32

Eventually Computation

◮ Problem: compute g(t) = supt′∈[t+a,t+b] f(t′) ◮ Solution: take maximum of f at t + a, t + b and sampling points

inside (a, b)

f t + a t + b

  • i1
  • i2
  • i3
  • i5

14 / 40

slide-33
SLIDE 33

Eventually Computation

◮ Problem: compute g(t) = supt′∈[t+a,t+b] f(t′) ◮ Solution: take maximum of f at t + a, t + b and sampling points

inside (a, b)

f t + a t + b

  • i1
  • i2
  • i5

14 / 40

slide-34
SLIDE 34

Eventually Computation

◮ Problem: compute g(t) = supt′∈[t+a,t+b] f(t′) ◮ Solution: take maximum of f at t + a, t + b and sampling points

inside (a, b)

f t + a t + b

  • i1
  • i2
  • i5

14 / 40

slide-35
SLIDE 35

Eventually Computation

◮ Problem: compute g(t) = supt′∈[t+a,t+b] f(t′) ◮ Solution: take maximum of f at t + a, t + b and sampling points

inside (a, b)

f t + a t + b

  • i2
  • i5

14 / 40

slide-36
SLIDE 36

Example

t x 0.2 x ≤ 0.2 [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 5

15 / 40

slide-37
SLIDE 37

Evaluation

◮ Worst-case complexity in 2O(|ϕ|) · |w| ◮ Implementation benchmarked with random signals: |w| 102 103 104 105 ♦[1,2] 0.0031 0.0030 0.0040 0.019 ♦[1,11] 0.0029 0.0026 0.0039 0.017 ♦[1,21] 0.0027 0.0026 0.0041 0.018 ♦[1,31] 0.0030 0.0028 0.0041 0.021 ◮ Cost of computing ♦[a,b] independent from b − a ◮ Improves on related works by several orders of magnitude

16 / 40

slide-38
SLIDE 38

Publications

◮ Donz´

e, Ferr` ere, and Maler. Efficient robust monitoring for STL. In Computer Aided Verification (CAV), 2013.

16 / 40

slide-39
SLIDE 39

Outline

  • 1. Preliminaries
  • 2. Robustness Computation
  • 3. Diagnostics
  • 4. Regular Expressions Monitoring
  • 5. Pattern-Based Measurements
  • 6. Analog Measures in Digital Environment
  • 7. Conclusion

16 / 40

slide-40
SLIDE 40

Motivation

◮ Find small segment of w sufficient to cause violation of ϕ ◮ Example: violation of (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

t x 0.2 q 5

◮ Sub-traces = temporal implicants

17 / 40

slide-41
SLIDE 41

Motivation

◮ Find small segment of w sufficient to cause violation of ϕ ◮ Example: violation of (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

t x 0.2 q 5

◮ Sub-traces = temporal implicants

17 / 40

slide-42
SLIDE 42

Propositional Implicants

◮ Implicant of ϕ

≈ partial valuation whose extensions satisfy ϕ

Definition

Implicant of ϕ = term γ such that γ ⇒ ϕ Prime implicant of ϕ = implicant of ϕ maximal relative to ⇒

◮ For diagnostic: implicant compatible with observed values v

Problem (Diagnostic)

For given ϕ and v, find γ ⇒ ¬ϕ such that v | = γ

18 / 40

slide-43
SLIDE 43

Propositional Implicants

◮ Implicant of ϕ

≈ partial valuation whose extensions satisfy ϕ

Definition

Implicant of ϕ = term γ such that γ ⇒ ϕ Prime implicant of ϕ = implicant of ϕ maximal relative to ⇒

◮ For diagnostic: implicant compatible with observed values v

Problem (Diagnostic)

For given ϕ and v, find γ ⇒ ¬ϕ such that v | = γ

18 / 40

slide-44
SLIDE 44

Temporal Implicants

◮ Temporal implicant of ϕ ≈ partial trace whose extensions satisfy ϕ ◮ Syntactical considerations:

  • Terms with conjunctions

t∈T θ(t) over intervals

  • Limit values handled by non-standard reals t+, t−

◮ Example:

  • t∈[0.5,3.0]

¬p(t) ⇒ ¬ ♦[1,2] p

Theorem

Every realtime property ϕ has a prime implicant Relies on boundedness of the time domain and non-standard extension

19 / 40

slide-45
SLIDE 45

Computation for Signal Temporal Logic

Diagnostic operators E, F such that:

◮ Explanation E(ϕ) ⇒ ϕ ◮ Falsification F(ϕ) ⇒ ¬ϕ

Definition (Diagnostic Signal)

E(p) = p E(¬ϕ) = F(ϕ) E(♦[a,b] ϕ) = t → E(ϕ)(ξ(t)) F(♦[a,b] ϕ) = t →

  • t′∈[t+a,t+b]

F(ϕ)(t′) with selection function ξ such that ξ(t) ∈ [t + a, t + b]

20 / 40

slide-46
SLIDE 46

Selection Function

Compute ξ over some interval T where ♦[a,b] ϕ holds:

◮ Current time t is at start of T ◮ Select last witness s of ϕ to account for ♦[a,b] ϕ at t ◮ Remove from T the part R that has been accounted for

ϕ ♦[a,b] ϕ

  • t

already covered T

21 / 40

slide-47
SLIDE 47

Selection Function

Compute ξ over some interval T where ♦[a,b] ϕ holds:

◮ Current time t is at start of T ◮ Select last witness s of ϕ to account for ♦[a,b] ϕ at t ◮ Remove from T the part R that has been accounted for

ϕ ♦[a,b] ϕ

  • t

already covered T [t + a, t + b]

21 / 40

slide-48
SLIDE 48

Selection Function

Compute ξ over some interval T where ♦[a,b] ϕ holds:

◮ Current time t is at start of T ◮ Select last witness s of ϕ to account for ♦[a,b] ϕ at t ◮ Remove from T the part R that has been accounted for

ϕ ♦[a,b] ϕ

  • t
  • s

already covered T [t + a, t + b]

21 / 40

slide-49
SLIDE 49

Selection Function

Compute ξ over some interval T where ♦[a,b] ϕ holds:

◮ Current time t is at start of T ◮ Select last witness s of ϕ to account for ♦[a,b] ϕ at t ◮ Remove from T the part R that has been accounted for

ϕ ♦[a,b] ϕ

  • t
  • s

already covered R T

21 / 40

slide-50
SLIDE 50

Selection Function

Compute ξ over some interval T where ♦[a,b] ϕ holds:

◮ Current time t is at start of T ◮ Select last witness s of ϕ to account for ♦[a,b] ϕ at t ◮ Remove from T the part R that has been accounted for

ϕ ♦[a,b] ϕ

  • t
  • s

already covered R T

21 / 40

slide-51
SLIDE 51

Overview

◮ Example:

t 5 x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

◮ Worst-case complexity O(|ϕ|)2 · |w|

22 / 40

slide-52
SLIDE 52

Overview

◮ Example:

t 5 x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

◮ Worst-case complexity O(|ϕ|)2 · |w|

22 / 40

slide-53
SLIDE 53

Overview

◮ Example:

t 5 x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

◮ Worst-case complexity O(|ϕ|)2 · |w|

22 / 40

slide-54
SLIDE 54

Overview

◮ Example:

t 5 x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

◮ Worst-case complexity O(|ϕ|)2 · |w|

22 / 40

slide-55
SLIDE 55

Overview

◮ Example:

t 5 x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

◮ Worst-case complexity O(|ϕ|)2 · |w|

22 / 40

slide-56
SLIDE 56

Overview

◮ Example:

t 5 x ≤ 0.2 ↑ q [0,5] x ≤ 0.2 ♦[0,5] [0,5] x ≤ 0.2 ↑ q → ♦[0,5] [0,5] x ≤ 0.2 (↑ q → ♦[0,5] [0,5] x ≤ 0.2)

◮ Worst-case complexity O(|ϕ|)2 · |w|

22 / 40

slide-57
SLIDE 57

Publications

◮ Ferr`

ere, Maler, and Nickovic. Trace diagnostics using temporal

  • implicants. In Automated Technology for Verification and Analysis

(ATVA), 2015.

22 / 40

slide-58
SLIDE 58

Outline

  • 1. Preliminaries
  • 2. Robustness Computation
  • 3. Diagnostics
  • 4. Regular Expressions Monitoring
  • 5. Pattern-Based Measurements
  • 6. Analog Measures in Digital Environment
  • 7. Conclusion

22 / 40

slide-59
SLIDE 59

Signal Regular Expressions

◮ Propositions p: Boolean variables q, threshold conditions x ≤ c ◮ Atomic expressions: holding p, events ↑ p ◮ Concatenation: ϕ · ψ ◮ Kleene star: ϕ∗ ◮ Duration restriction: ϕI

23 / 40

slide-60
SLIDE 60

Example

Pulse pattern: ψ = ↓ r · q · p · q[5,6] · ↑ r q p q ↑ r ↓ r t x 7.0 4.0 ∈ [5, 6] p = (x ≤ 4.0) q = (4.0 < x ≤ 7.0) r = (x > 7.0)

24 / 40

slide-61
SLIDE 61

Monitoring

◮ For any w expression ϕ defines a set of segments (t, t′) such that

w[t, t′] matches ϕ

◮ Offline approach: for all subexpressions ϕ compute the complete set

  • f matches [ϕ]w of ϕ relative to w

Definition (Match Set)

  • p
  • w = {(t, t′) : t < t′′ < t′ → pw(t′′) = 1}

[ϕ ∨ ψ]w = [ϕ]w ∪ [ψ]w [ϕI]w = {(t, t′) : t′ − t ∈ I} ∩ [ϕ]w [ϕ ∧ ψ]w = [ϕ]w ∩ [ψ]w [ϕ · ψ]w = [ϕ]w [ψ]w [ϕ∗]w =

  • i≥0
  • ϕi

w

25 / 40

slide-62
SLIDE 62

Match Set Representation

◮ A zone = convex set with horizontal, vertical and diagonal boundaries ◮ Represents a set of signal segments

t t′

Theorem

For any ϕ and w with finite variability, [ϕ]w is a finite union of zones

26 / 40

slide-63
SLIDE 63

Match Set Representation

◮ A zone = convex set with horizontal, vertical and diagonal boundaries ◮ Represents a set of signal segments

t, t′ t t′ p

Theorem

For any ϕ and w with finite variability, [ϕ]w is a finite union of zones

26 / 40

slide-64
SLIDE 64

Match Set Representation

◮ A zone = convex set with horizontal, vertical and diagonal boundaries ◮ Represents a set of signal segments

t, t′ t t′ p s

  • s′

Theorem

For any ϕ and w with finite variability, [ϕ]w is a finite union of zones

26 / 40

slide-65
SLIDE 65

Match Set Representation

◮ A zone = convex set with horizontal, vertical and diagonal boundaries ◮ Represents a set of signal segments

t, t′ t t′ p s

  • s′

Theorem

For any ϕ and w with finite variability, [ϕ]w is a finite union of zones

26 / 40

slide-66
SLIDE 66

Example

p[2,4] · q[1,2]

◮ Match set of p ◮ Match set of p[2,4] ◮ Match set of q[1,2] ◮ Match set of p[2,4] · q[1,2]

t, t′ t t′ p q

27 / 40

slide-67
SLIDE 67

Example

p[2,4] · q[1,2]

◮ Match set of p ◮ Match set of p[2,4] ◮ Match set of q[1,2] ◮ Match set of p[2,4] · q[1,2]

t, t′ t t′ p q

27 / 40

slide-68
SLIDE 68

Example

p[2,4] · q[1,2]

◮ Match set of p ◮ Match set of p[2,4] ◮ Match set of q[1,2] ◮ Match set of p[2,4] · q[1,2]

t, t′ t t′ s

  • s′

p q

27 / 40

slide-69
SLIDE 69

Example

p[2,4] · q[1,2]

◮ Match set of p ◮ Match set of p[2,4] ◮ Match set of q[1,2] ◮ Match set of p[2,4] · q[1,2]

t, t′ t t′ p q

27 / 40

slide-70
SLIDE 70

Example

p[2,4] · q[1,2]

◮ Match set of p ◮ Match set of p[2,4] ◮ Match set of q[1,2] ◮ Match set of p[2,4] · q[1,2]

t, t′ t t′ p q

27 / 40

slide-71
SLIDE 71

Example

p[2,4] · q[1,2]

◮ Match set of p ◮ Match set of p[2,4] ◮ Match set of q[1,2] ◮ Match set of p[2,4] · q[1,2]

t, t′ t t′ p q

27 / 40

slide-72
SLIDE 72

Example

p[2,4] · q[1,2]

◮ Match set of p ◮ Match set of p[2,4] ◮ Match set of q[1,2] ◮ Match set of p[2,4] · q[1,2]

t, t′ t t′ p q

27 / 40

slide-73
SLIDE 73

Example

p[2,4] · q[1,2]

◮ Match set of p ◮ Match set of p[2,4] ◮ Match set of q[1,2] ◮ Match set of p[2,4] · q[1,2]

t, t′ t t′ p q

27 / 40

slide-74
SLIDE 74

Example

p[2,4] · q[1,2]

◮ Match set of p ◮ Match set of p[2,4] ◮ Match set of q[1,2] ◮ Match set of p[2,4] · q[1,2]

t, t′ t t′ p q s

  • s′′

s′

27 / 40

slide-75
SLIDE 75

Kleene Star

On bounded traces w the sequence n

i=0 ϕi converges to a fix-point in

finitely many steps

◮ Assume w can be split in m constant segments v of length less that 1 ◮ Over each segment either [ϕ]v = [⊤]v or [ϕ]v = [⊥]v

Lemma

[ϕn]w ⊆

  • ϕn−1

w for any n > 2m + 1

Compute n

i=0 ϕi by squaring: ǫ, ϕ, ϕ2, ϕ4, . . ., ϕ2k up to

k > log(2m + 1)

28 / 40

slide-76
SLIDE 76

Evaluation

◮ Worst-case complexity: |w|O(|ϕ|) without star ◮ Implementation using DBM for efficient zones computation ◮ Benchmarked for

ϕ = (p · ¬p[0,10])∗ ∧ (q · ¬q[0,10])∗[80,∞] with randomized traces:

|w| |[ϕ]w| time 3654 0.27 6715 10 1.35 13306 23 2.73 26652 47 5.83

◮ Observed performance linear in |w|

29 / 40

slide-77
SLIDE 77

Publications

◮ Ulus, Ferr`

ere, Asarin, and Maler. Timed pattern matching. In Formal Modeling and Analysis of Timed Systems (FORMATS), 2014.

◮ Ulus, Ferr`

ere, Asarin, and Maler. Online timed pattern matching using derivatives In Tools and Algorithms for the Construction and Analysis

  • f Systems (TACAS), 2016.

29 / 40

slide-78
SLIDE 78

Outline

  • 1. Preliminaries
  • 2. Robustness Computation
  • 3. Diagnostics
  • 4. Regular Expressions Monitoring
  • 5. Pattern-Based Measurements
  • 6. Analog Measures in Digital Environment
  • 7. Conclusion

29 / 40

slide-79
SLIDE 79

Measurement Language

◮ Motivation: automate the extraction of mixed-signal measures ◮ Signal Regular Expressions control when the measure takes place ◮ Measure: aggregating operator duration, min, max, and average ◮ Example:

average(↑(x > 1.0) · (x > 1.0) · ↓(x > 1.0)) measures average value of x on high portions

30 / 40

slide-80
SLIDE 80

Conditionals and Events

Construct expressions delimited by events

◮ conditional operators:

  • ?ϕ begins a match of ϕ
  • !ϕ ends a match of ϕ

◮ event-bounded expressions ψ:

  • event ↑ p, ↓ p
  • conditional event ψ?, ψ!
  • sequence ψ · ϕ · ψ

Theorem

For any w and ψ event-bounded, [ϕ]ψ is finite

31 / 40

slide-81
SLIDE 81

Case Study: Distributed System Interface

◮ DSI3 is a protocol for electronics in automotive industry ◮ Based on pulse communication ◮ Requirements about magnitude of signals and timing of events ◮ Implementation: behavioral model

e(t) a(t) R C Controler Sensor i v 32 / 40

slide-82
SLIDE 82

Timing Requirement

q p q r ψ ψ ↑ r ↓ r ψ? t x 7.0 4.0 ∈ [5, 6] time between consecutive pulses

33 / 40

slide-83
SLIDE 83

Results

◮ Pulse description:

ψ = ↓ r · q · p · q[5,6] · ↑ r

◮ Measure expression:

ϕ = duration(ψ · r · ψ?)

◮ Computation time cost:

|w| quantize match extract total 1 · 106 0.047 0.617 0.000 0.664 5 · 106 0.197 0.612 0.000 0.809 1 · 107 0.386 0.606 0.000 0.992 2 · 107 0.759 0.609 0.000 1.368

34 / 40

slide-84
SLIDE 84

Publications

◮ Ferr`

ere, Maler, Nickovic, and Ulus. Measuring with timed patterns. In Computer Aided Verification (CAV), 2015.

34 / 40

slide-85
SLIDE 85

Outline

  • 1. Preliminaries
  • 2. Robustness Computation
  • 3. Diagnostics
  • 4. Regular Expressions Monitoring
  • 5. Pattern-Based Measurements
  • 6. Analog Measures in Digital Environment
  • 7. Conclusion

34 / 40

slide-86
SLIDE 86

Analog Measurements and Digital Testbench

◮ Simulator-implemented measures provide guarantees:

  • accuracy
  • reproducible

◮ Unfortunately only accessible in analog environment ◮ Digital testbench enables structured verification

  • assertion tracking
  • coverage indicators
  • . . .

◮ Mixed-signal verification often done with user-defined monitors

35 / 40

slide-87
SLIDE 87

Measurement Tasks

◮ We propose new measurements functions as system tasks

taskµ(x, p, y, q, e, r)

◮ Input: (x, p), output: (y, q) ◮ Control: enable event e and reset event r ◮ Accessed in a variety of context: module, class, etc. ◮ Prototype implementation using VPI with functions: initializeµ,

updateµ, statusµ, and evaluateµ

36 / 40

slide-88
SLIDE 88

Phase Locked Loop

◮ Digital testbench using the Universal Verification Methodology: ◮ Measure relative jitter online, locking time and enforce safe operating

area of current through VDD

◮ Computation time < 1s for measurements, ≈ 300s for simulation

37 / 40

slide-89
SLIDE 89

Outline

  • 1. Preliminaries
  • 2. Robustness Computation
  • 3. Diagnostics
  • 4. Regular Expressions Monitoring
  • 5. Pattern-Based Measurements
  • 6. Analog Measures in Digital Environment
  • 7. Conclusion

37 / 40

slide-90
SLIDE 90

Contributions

◮ Diagnostic procedure for realtime assertions ◮ Efficient algorithms for robustness computation ◮ Monitoring of regular expressions ◮ Pattern-based measurements ◮ Bring practice of analog and digital verification closer

38 / 40

slide-91
SLIDE 91

Publications

  • 1. Donz´

e, Ferr` ere, and Maler. Efficient robust monitoring for STL. In Computer Aided Verification (CAV), 2013.

  • 2. Ulus, Ferr`

ere, Asarin, and Maler. Timed pattern matching. In Formal Modeling and Analysis of Timed Systems (FORMATS), 2014.

  • 3. Ferr`

ere, Maler, Nickovic, and Ulus. Measuring with timed patterns. In Computer Aided Verification (CAV), 2015.

  • 4. Ferr`

ere, Maler, and Nickovic. Trace diagnostics using temporal

  • implicants. In Automated Technology for Verification and Analysis

(ATVA), 2015.

  • 5. Ulus, Ferr`

ere, Asarin, and Maler. Online timed pattern matching using derivatives In Tools and Algorithms for the Construction and Analysis

  • f Systems (TACAS), 2016.

39 / 40

slide-92
SLIDE 92

Future Works

◮ Robustness of Signal Regular Expressions ◮ New monitoring algorithms for SRE ◮ Integrate SRE with STL ◮ Formal verification using regular expressions

40 / 40