The Quest for Average Response Time Tom Henzinger IST Austria - - PowerPoint PPT Presentation

the quest for average response time
SMART_READER_LITE
LIVE PREVIEW

The Quest for Average Response Time Tom Henzinger IST Austria - - PowerPoint PPT Presentation

The Quest for Average Response Time Tom Henzinger IST Austria Joint work with Krishnendu Chatterjee and Jan Otop Observations r request g grant t tick x neither = {r,g,t,x} Behaviors = Observation Sequences x t t x x r x x t x x x r


slide-1
SLIDE 1

The Quest for Average Response Time

Tom Henzinger IST Austria Joint work with Krishnendu Chatterjee and Jan Otop

slide-2
SLIDE 2

Observations

r request g grant t tick x neither

§ = {r,g,t,x}

slide-3
SLIDE 3

Behaviors = Observation Sequences

x t t x x r x x t x x x r x t x t x x t g r t t g g x t x t x … r t t t t …

slide-4
SLIDE 4

Behaviors = Observation Sequences

x t t x x r x x t x x x r x t x t x x t g r t t g g x t x t x … 4,3,2 r t t t t … 1

slide-5
SLIDE 5

Response Property

r g r,t,x

g,t,x

slide-6
SLIDE 6

Response Monitor

r r,t,x

g,t,x S S

g

slide-7
SLIDE 7

Bounded Response

r g r,x

g,t,x C := 0 C · 3

t

C := C+1

slide-8
SLIDE 8

Bounded Response

r g r,x

g,t,x C := 0 C · 3

t

C := C+1

g

C > 3 (Discrete) clocks exponentially succinct, but not more expressive than finite state.

slide-9
SLIDE 9

Bounded Response Monitor

r r,x

g,t,x S S

g t

C := C+1 C := 0 C · 3

slide-10
SLIDE 10

Maximal Response

r g r,x

g,t,x C := 0 V := max(V,C)

t

C := C+1 V := 0

slide-11
SLIDE 11

Maximal Response Monitor

r r,x

g,t,x S S

g t

V := V+1 V := 0 V := 0 V := max(V, )

slide-12
SLIDE 12

Average Response

r g r,x

g,t,x C := 0 N := N+1 V := avg(V,C,N)

t

C := C+1 V := 0 N := 0 avg(V,C,N) = (V¢(N-1)+C)/N

slide-13
SLIDE 13

Average Response

r g r,x

g,t,x C := 0 N := N+1 V := avg(V,C,N)

t

C := C+1 V := 0 N := 0 avg(V,C,N) = (V¢(N-1)+C)/N Technically, limavg is liminf of avg.

slide-14
SLIDE 14

Average Response Monitor

r r,x

g,t,x S S

g t

V := V+1 V := 0 V := avg(V, ,N) N := N+1 V := 0 N := 0

slide-15
SLIDE 15

Deterministic qualitative automaton A: §! ! B Deterministic quantitative automaton A: §! ! R ! = x t t x x r x x t x x x r x t x t x x t g r t t g g x t x t x … Response(!) = 1 BoundedResponse(!) = 0 MaximalResponse(!) = 4 AverageResponse(!) = 3

slide-16
SLIDE 16

Nondeterministic qualitative automaton A: §! ! B A(!) = max{ value(½) | ½ run of A and obs(½) = ! } Nondeterministic quantitative automaton A: §! ! R A(!) = inf{ value(½) | ½ run of A and obs(½) = ! } Functional automaton: obs(½1) = obs(½2) ) value(½1) = value(½2) Deterministic automata are functional.

slide-17
SLIDE 17

t

r,g,t,x

Nonfunctional Automaton

t

slide-18
SLIDE 18

Nondeterministic qualitative automaton A: §! ! B A(!) = max{ value(½) | ½ run of A and obs(½) = ! } Emptiness: 9w. A(w) = 1 Universality: 8w. A(w) = 1 Nondeterministic quantitative automaton A: §! ! R A(!) = inf{ value(½) | ½ run of A and obs(½) = ! } Emptiness: 9 w. A(w) · ¸ Universality: 8 w. A(w) · ¸ Functional automaton: obs(½1) = obs(½2) ) value(½1) = value(½2) Deterministic automata are functional.

slide-19
SLIDE 19

System = Labeled Graph

r r t x x x t g g g t t t t x x t defines set of behaviors

slide-20
SLIDE 20

Qualitative Analysis

Given a system A and a qualitative property B,

  • Q1. does some run of A correspond to a run of B ?

[emptiness of A £ B ]

  • Q2. does every run of A correspond to a run of B ?

[as hard as universality of B ]

slide-21
SLIDE 21

Qualitative Analysis

Given a system A and a qualitative property B,

  • Q1. does some run of A correspond to a run of B ?

[emptiness of A £ B ]

  • Q2. does every run of A correspond to a run of B ?

Equivalently: does some run of A correspond to a run of :B ? [emptiness of A £ :B ] For deterministic B (e.g. monitors), :B is easy to compute.

slide-22
SLIDE 22

Quantitative Analysis

Given a system A and a quantitative property B,

  • Q1. does some run of A correspond to a run of B with value V · ¸ ?

[emptiness of A £ B ]

  • Q2. does every run of A correspond to a run of B with V · ¸ ?

[as hard as universality of B ]

slide-23
SLIDE 23

Quantitative Analysis

Given a system A and a quantitative property B,

  • Q1. does some run of A correspond to a run of B with value V · ¸ ?

[emptiness of A £ B ]

  • Q2. does every run of A correspond to a run of B with V · ¸ ?

For functional B (e.g. monitors), equivalently: does some run of A correspond to a run of B with V > ¸ ? [emptiness of A £ -B ]

slide-24
SLIDE 24

Probabilistic System = Markov Chain

r r t x x x t g g g t t t t x x t 0.5 0.3 0.2 0.5 0.5 defines probability for every finite observation sequence

slide-25
SLIDE 25

Probabilistic System = Markov Chain

r r t x x x t g g g t t t t x x t 0.5 0.3 0.2 0.5 0.5 defines probability for every finite observation sequence Every functional quantitative automaton defines a random variable V over this space.

slide-26
SLIDE 26

Probabilistic Analysis

Given a probabilistic system A and a functional quantitative property B,

  • Q1. compute the expected value of V on the runs of A £ B

[moment analysis]

  • Q2. compute the probability of V · ¸ on the runs of A £ B

[distribution analysis]

slide-27
SLIDE 27

Example

r r t t t t t r g g g t t t

slide-28
SLIDE 28

Example

r r t t t t t r g g g t t t

Best maximal response time: 2 Worst maximal response time: 3 Emptiness of (max,inc) automata

slide-29
SLIDE 29

Example

r r t t t t t r g g g t t t

Best maximal response time: 2 Worst maximal response time: 3 Emptiness of (max,inc) automata Best average response time: 1.5 Worst average response time: 3 Emptiness of (avg,inc) automata

slide-30
SLIDE 30

Probabilistic Example

r r t t t t t r g g g t t t 0.5 0.5

slide-31
SLIDE 31

Probabilistic Example

r r t t t t t r g g g t t t

Expected maximal response time: 2.5 Prob of maximal response time at most 2: 0.5 Probabilistic analysis of (max,inc) automata

0.5 0.5

slide-32
SLIDE 32

Probabilistic Example

r r t t t t t r g g g t t t

Expected maximal response time: 2.5 Prob of maximal response time at most 2: 0.5 Probabilistic analysis of (max,inc) automata Expected average response time: 2.25 Prob of average response time at most 2: 0.5 Probabilistic analysis of (avg,inc) automata

0.5 0.5

slide-33
SLIDE 33

(max,inc) automata: Master automaton maintains the sup of values returned by slaves (1 max register). Each slave automaton counts occurrences of t (1 inc register). (avg,inc) automata: Master automaton maintains the limavg of values returned by slaves. Slaves as above. Both are special cases of nested weighted automata.

slide-34
SLIDE 34

Results on (max,inc) Automata

Functional

(max,inc) (max,inc) Emptiness PSPACE PSPACE Universality · EXPSPACE PSPACE ¸ PSPACE Expectation · EXPSPACE ¸ PSPACE Probability · EXPSPACE ¸ PSPACE

slide-35
SLIDE 35

Results on (avg,inc) Automata

Functional

Bounded width Constant width (avg,inc) (avg,inc) (avg,inc) (avg,inc) Emptiness · EXPSPACE · EXPSPACE PSPACE PTIME ¸ PSPACE ¸ PSPACE Universality undecidable · EXPSPACE PSPACE PTIME ¸ PSPACE Expectation PTIME Probability PTIME

slide-36
SLIDE 36

r t r t r t t t g t g t g 5,5,5

Matching Requests and Grants

slide-37
SLIDE 37

r t r t r t t t g t g t g 5,5,5 7,5,3

Matching Requests and Grants

slide-38
SLIDE 38

Counter Machine

r x

g,t,x S S

g C = 0 t

V := V+1 V := 0 C := 0 V := 0 V := max(V, )

r

C := C+1

g C > 0

C := C-1

slide-39
SLIDE 39

Counter Monitor

t x

r,g,x S S

t

V := 0 V := 0 V := max(V, )

r

V := V+1

g

V := V-1

slide-40
SLIDE 40

Counter Monitor

t x

r,g,x S S

t

V := 0 V := 0 V := max(V, )

r

V := V+1

g

V := V-1 width = 1

slide-41
SLIDE 41

Register Automaton

x

V := 0 C := 0

r

C := C+1

g

C := C-1

[Alur et al.] t

V := max(V,C) C := 0

slide-42
SLIDE 42

Results on (max,inc+dec) Automata

Functional

(max,inc+dec) (max,inc+dec) Emptiness PSPACE PSPACE Universality undecidable undecidable Expectation undecidable Probability undecidable

slide-43
SLIDE 43

Results on (avg,inc+dec) Automata

Functional

Bounded width Constant width (avg,inc+dec) (avg,inc+dec) (avg,inc) (avg,inc) Emptiness

  • pen
  • pen

PSPACE PTIME Universality undecidable

  • pen

PSPACE PTIME Expectation PTIME Probability PTIME

slide-44
SLIDE 44

Quantitative Monitors = Nested Weighted Automata

Unbounded width allows for natural decomposition of specifications (incl. average response time) More expressive than unnested weighted automata: (avg,inc) more expressive than avg More succinct than unnested weighted automata: flattening, when possible, can cause exponential Emptiness decidable and sufficient for verification of functional monitors, model measuring, and model repair (universality often undecidable, even for constant width) Probabilistic analysis polynomial for functional (avg,inc+dec)

slide-45
SLIDE 45

Model Measuring:

How much can system A be perturbed without violating qualitative property B ?

Model Repair:

How much must system A be changed to satisfy qualitative property B ?

slide-46
SLIDE 46

Model Measuring:

How much can system A be perturbed without violating qualitative property B ? For an observation sequence ! we can define a distance d(A,!) by constructing from A a quantitative automaton FA such that FA(!) = d(A,!). Then d(A,A’) = sup{ d(A,!) | ! 2 L(A’) }. Robustness of A with respect to B: exp(A,B) = sup{ e | d(A,A’) · e ) L(A’) µ L(B) }.

Model Repair:

How much must system A be changed to satisfy qualitative property B ?

slide-47
SLIDE 47

References

Nested Weighted Automata: LICS 2015 Quantitative Automata under Probabilistic Semantics: LICS 2016 Nested Weighted Automata of Bounded Width: submitted From Model Checking to Model Measuring: CONCUR 2013