Efficient Parametric Identification for STL Thomas Ferr` ere Oded - - PowerPoint PPT Presentation

efficient parametric identification for stl
SMART_READER_LITE
LIVE PREVIEW

Efficient Parametric Identification for STL Thomas Ferr` ere Oded - - PowerPoint PPT Presentation

Efficient Parametric Identification for STL Thomas Ferr` ere Oded Maler Alexey Bakhirkin Monitoring vs. Parametric Identification Monitoring Do traces of a black box satisfy a property? Spec w SAT ? Trace w System Monitor 0 or 1


slide-1
SLIDE 1

Efficient Parametric Identification for STL

Alexey Bakhirkin Thomas Ferr` ere Oded Maler

slide-2
SLIDE 2

Monitoring vs. Parametric Identification

Monitoring

Do traces of a black box satisfy a property? System Monitor Trace w Spec ϕ 0 or 1 w SAT ϕ?

slide-3
SLIDE 3

Monitoring vs. Parametric Identification

Parametric Identification

What is the value of a parameter of a black box? System Monitor Trace w Spec ϕ[p] Set of vals

  • f p

For which p, w SAT ϕ[p]?

◮ Find the set of all or tightest or etc values of parameters. ◮ From it, find the parameter of the black box.

slide-4
SLIDE 4

Our Setting

1 2 5 10 15 20 25 30 x 1 2 5 10 15 20 25 30 y ◮ Real-valued. ◮ Piecewise-constant interpolation. ◮ Time is bounded. ◮ Offline computation. ◮ Specification language – Signal Temporal Logic

slide-5
SLIDE 5

Signal Temporal Logic

Standard Semantics for Monitoring

ϕ ::= x ≥ c | x ≤ c | F[a,b] ϕ | ϕ1Uϕ2 | true | false | ¬ϕ | ϕ1 ∨ ϕ2 | ϕ1 ∧ ϕ2 | A formula evaluates to true or false at a time point t.

◮ x ≤ c, if x(t) ≤ c. ◮ F[a,b] ϕ, if ϕ holds for some t′ ∈ [t + a, t + b]. ◮ ϕ1Uϕ2, if ϕ2 holds at some t′ ≥ t, and ϕ1 holds on [t, t′].

slide-6
SLIDE 6

Parameterized STL

Semantics for Parametric Identification

ϕ ::= x ≤ c | x ≥ c | x ≤ p | x ≥ p | F[a,b] ϕ | ϕ1Uϕ2 | true | false | ¬ϕ | ϕ1 ∨ ϕ2 | ϕ1 ∧ ϕ2 | For every time point t, we want to find the validity domain – for which parameter values the formula evaluates to true.

◮ x ≤ p: p ≥ x(t). ◮ F[a,b] ϕ: union of the validity domains on [t + a, t + b]. ◮ ϕ1Uϕ2: see paper.

Single polarity – we want that a given parameter appears only in ≤

  • r only in ≥ expressions.

Every validity domain is upward/downward-closed set of rectangles. There is a finite number of tightest parameter combinations.

slide-7
SLIDE 7

What PSTL Can Do?

Motivation

  • 1. Find system parameters from system traces.
  • S. Jha et al., RV 2017 – extracting parameters from car

sensor traces. For example,

◮ G (x ≤ p1 ∧ x ≥ p2) – finds the range of x – between min p1

and max p2.

◮ F (x ≤ p1 ∧ x ≥ p2) – enumerates the possible values of x.

The domain has the form (p1 ≥ x1 ∧ p2 ≤ x1) ∨ (p1 ≥ x1 ∧ p2 ≤ x1) ∨ · · ·

  • 2. Evaluate formulas with universal/existential quantifiers.

Not this paper, see K. Havelund et al., FMCAD 2017.

slide-8
SLIDE 8

Example

Extract high and low thresholds

1 2 5 10 15 20 25 30 x

Formula: G F[0,tedge+tstab]((G[0,tstab] x ≤ p1) ∨ (G[0,tstab] x ≥ p2)) Validity domain at time 0: (p1 ≥ 2) ∨ (p1 ≥ 0 ∧ p2 ≤ 2) ∨ (p2 ≤ 0) p1 −p2 2 −2

slide-9
SLIDE 9

Previous Approaches

  • E. Asarin, A. Donz´

e, O. Maler, D. Nickovic, RV 2011

  • B. Hoxha, A. Dokhanchi, G. Fainekos, STTT 2017

◮ Allow time parameters. ◮ Search in parameter space (single polarity helps). ◮ Quantifier elimination in logical encoding.

slide-10
SLIDE 10

Our Approach

Setting

◮ Piecewise-constant approximation. ◮ Single polarity. ◮ No time parameters. ◮ The validity signal (validity domain over time) is

piecewise-constant.

◮ A single validity domain is an upward-closed set of boxes,

representable as a set of points. Compute validity signals directly as maps from time segments to sets of boxes. Bottom-up over the formula structure:

◮ x ≤ p: directly, see next slide. ◮ F[a,b] ϕ: running union of validity signal of ϕ over the window

[t + a, t + b].

◮ ϕ1Uϕ2: see paper.

slide-11
SLIDE 11

Atomic Comparison

x ≤ p

1 2 3 4 1 3 5 7 9 11 13 15 17 19 x

p ≥ 3 3 p ≥ 2 6 p ≥ 4 9 p ≥ 3 17 p ≥ 0 20

slide-12
SLIDE 12

Eventually

F[1,8] x ≤ p

p ≥ 3 3 p ≥ 2 6 p ≥ 4 9 p ≥ 3 17 p ≥ 0 20 p ≥ 3 2 p ≥ 2 5 p ≥ 4 8 1 p ≥ 3 16 9 p ≥ 0 19 p ≥ 2 5 p ≥ 3 9 p ≥ 0 19 ∅ 20

slide-13
SLIDE 13

Eventually

F[1,8] x ≤ p

◮ We adapt an algorithm by D. Lemire; originally linear in the

length of the input.

◮ Fast in 1 dimension (1 parameter). ◮ Often reasonably fast in multiple dimensions; linear in the

length of the input for a given formula.

◮ Not linear in general.

slide-14
SLIDE 14

More Pessimistic Example

F (x ≤ p1 ∧ x ≥ p2)

Start with x ≤ p1 ∧ x ≥ p2

1 2 3 4 1 3 5 7 9 11 13 15 17 19 x

On [0, 3] the validity domain is p1 ≥ 3 ∧ −p2 ≥ −3. p1 −p2 (3, −3)

slide-15
SLIDE 15

More Pessimistic Example

F (x ≤ p1 ∧ x ≥ p2)

Start with x ≤ p1 ∧ x ≥ p2

1 2 3 4 1 3 5 7 9 11 13 15 17 19 x

(3, −3) 3 (2, −2) 6 (4, −4) 9 (3, −3) 17 (0, 0) 20

slide-16
SLIDE 16

More Pessimistic Example

F (x ≤ p1 ∧ x ≥ p2)

(3, −3) 3 (2, −2) 6 (4, −4) 9 (3, −3) 17 (0, 0) 20 (3, −3) 3 (2, −2) 3 (4, −4) 3 (3, −3) 3 (0, 0) 3

slide-17
SLIDE 17

More Pessimistic Example

F (x ≤ p1 ∧ x ≥ p2)

Validity domain at time 0 enumerates signal values. p1 −p2 (0, 0) (2, −2) (3, −3) (4, −4)

slide-18
SLIDE 18

Evaluation

◮ Prototype implementation in OCaml. ◮ Synthetic signals and output of a simulink model. ◮ Focus on examples where the validity domains have small

number of boxes.

◮ In most examples, handle signals with 1M samples under a

  • minute. For simple formulas, under 10 seconds.
slide-19
SLIDE 19

Evaluation

Formula Signal Length / time, s 105 106 ϕ1 = G(x ≤ p1 ∧ x ≥ p2) wsincos 0.36 3.9 wsquare 0.36 3.75 ϕ2 = G(x ≥ p ∧ y ≥ p) wsincos 0.28 3.4 ϕ3 = G(y ≥ p U x ≥ p) wsincos 0.31 3.4 ϕ4 = G(x ≤ 6 → F[0,50](x ≥ 6 ∨ x ≤ p)) wsquare 0.12 1.4 ϕ5,1 = F[0,5K](x ≥ p1 ∨ G[0,250]y ≥ p2) wsincos 0.41 4.4 ϕ5,2 = F[0,50K](x ≥ p1 ∨ G[0, 250]y ≥ p2) 0.4 4.3 ϕ6,1 = G[0,5K]F[0,250]((G[0,200]x ≤ p1) ∨ (G[0,200]x ≥ p2)) wsincos 4 44 wsquare 0.75 8 ϕ6,2 = G[0, 50K]F[0,250]((G[0,200]x ≤ p1) ∨ (G[0,200]x ≥ p2)) wsincos 2.5 42 wsquare 0.67 8.7 ϕ6,3 = G[0,50K]F[0,125]((G[0, 200]x ≤ p1) ∨ (G[0,200]x ≥ p2)) wsincos TO TO wsquare 0.66 8.1 ϕ7 = G F[0,45]G[0,30](xcmd−resp ≤ p1 ∧ xresp−cmd ≤ p2) wpitch 0.56 6

slide-20
SLIDE 20

Future Work

◮ Optimized Pareto set implementation.

◮ Large sets of points. ◮ Operations: union and intersection or complement. ◮ Sorted arrays in 2 dimensions, trees in 3 or more dimensions.

◮ Time parameters

◮ Real time is not piecewise-constant; need more than just boxes. ◮ Need fast set operations.

slide-21
SLIDE 21

Future Work

◮ Optimized Pareto set implementation.

◮ Large sets of points. ◮ Operations: union and intersection or complement. ◮ Sorted arrays in 2 dimensions, trees in 3 or more dimensions.

◮ Time parameters

◮ Real time is not piecewise-constant; need more than just boxes. ◮ Need fast set operations.

Thanks