Entropy and temporal specifications Eugene Asarin 1 , Michel Bockelet - - PowerPoint PPT Presentation

entropy and temporal specifications
SMART_READER_LITE
LIVE PREVIEW

Entropy and temporal specifications Eugene Asarin 1 , Michel Bockelet - - PowerPoint PPT Presentation

Entropy and temporal specifications Eugene Asarin 1 , Michel Bockelet 2 , Aldric Degorre 1 , alin Dima 2 and Chunyan Mu 3 C at 1 LIAFA Universit e de Paris-Diderot 2 LACL Universit e de Paris-Est Cr eteil 3 University of


slide-1
SLIDE 1

Entropy and temporal specifications

Eugene Asarin1, Michel Bockelet2, Aldric Degorre 1, C˘ at˘ alin Dima2 and Chunyan Mu3

1LIAFA – Universit´

e de Paris-Diderot

2LACL – Universit´

e de Paris-Est Cr´ eteil

3University of Birmingham

EQINOCS final workshop, May 9th, 2016

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 1 / 40

slide-2
SLIDE 2

1

Entropy and quantitative model-checking Quantitative model-checking in very few slides Entropy used as a measure Some experiments

2

Entropy and asymptotics Parametric linear temporal logic (PLTL) Convergence problems for PLTL formulas

3

Main result and techniques Discrete timed automata with parameters (GTBAC) Producing entropy in GTBAC Translating from PLTL to GTBAC

4

Computing limit entropies “Positive” case “Negative” case

5

Conclusions

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 2 / 40

slide-3
SLIDE 3

Entropy and quantitative model-checking Quantitative model-checking in very few slides

On qualitative and quantitative model-checking

Qualiltative model-checking

Given a system S and a property φ decide if S ⊧ φ (answer: YES/NO). S: language of (ω-) words, automaton, Kripke structure, etc. ϕ: language of (ω-) words, automaton, formula in some logic (LTL, µ-calculus), etc. ⊧: language inclusion, model satisfaction, etc.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 3 / 40

slide-4
SLIDE 4

Entropy and quantitative model-checking Quantitative model-checking in very few slides

On qualitative and quantitative model-checking

Qualiltative model-checking

Given a system S and a property φ decide if S ⊧ φ (answer: YES/NO). S: language of (ω-) words, automaton, Kripke structure, etc. ϕ: language of (ω-) words, automaton, formula in some logic (LTL, µ-calculus), etc. ⊧: language inclusion, model satisfaction, etc.

Quantitative model-checking

Given a system S and a property φ, measure how much S ⊧ φ (answer: a real number). Approaches: probability (PRISM/UppAal people, etc.) “reward/penalty” models (quantitative languages, simulation distances, etc.).

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 3 / 40

slide-5
SLIDE 5

Entropy and quantitative model-checking Quantitative model-checking in very few slides

On qualitative and quantitative model-checking

Qualiltative model-checking

Given a system S and a property φ decide if S ⊧ φ (answer: YES/NO). S: language of (ω-) words, automaton, Kripke structure, etc. ϕ: language of (ω-) words, automaton, formula in some logic (LTL, µ-calculus), etc. ⊧: language inclusion, model satisfaction, etc.

Quantitative model-checking

Given a system S and a property φ, measure how much S ⊧ φ (answer: a real number). Approaches: probability (PRISM/UppAal people, etc.) “reward/penalty” models (quantitative languages, simulation distances, etc.). source of this work: entropy.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 3 / 40

slide-6
SLIDE 6

Entropy and quantitative model-checking Quantitative model-checking in very few slides

Why we are not happy with probability

Example

System S (state-labeled, note Σ = 2{p,q}): pq p¯ q ¯ pq ¯ p¯ q Specifications:

1

φ1 = always p.

2

φ2 = never 100 times in a row p. In Linear Temporal Logic (LTL), φ1 = ◻p, φ2 = ◻ ◇<100 p.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 4 / 40

slide-7
SLIDE 7

Entropy and quantitative model-checking Quantitative model-checking in very few slides

Why we are not happy with probability

Example

System S (state-labeled, note Σ = 2{p,q}): pq p¯ q ¯ pq ¯ p¯ q Specifications:

1

φ1 = always p.

2

φ2 = never 100 times in a row p. In Linear Temporal Logic (LTL), φ1 = ◻p, φ2 = ◻ ◇<100 p.

Naive analysis

Certain effort required to satisfy φ1 (never go below) A different (smaller?) effort required to satisfy φ2 (go above at least every 100 units)

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 4 / 40

slide-8
SLIDE 8

Entropy and quantitative model-checking Quantitative model-checking in very few slides

Why we are not happy with probability

Example

System S (state-labeled, note Σ = 2{p,q}): pq p¯ q ¯ pq ¯ p¯ q Specifications:

1

φ1 = always p.

2

φ2 = never 100 times in a row p. In Linear Temporal Logic (LTL), φ1 = ◻p, φ2 = ◻ ◇<100 p.

Naive analysis

Certain effort required to satisfy φ1 (never go below) A different (smaller?) effort required to satisfy φ2 (go above at least every 100 units)

Probabilistic analysis

P(S ⊧ φ1) = 0 and P(S ⊧ φ2) = 0 .

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 4 / 40

slide-9
SLIDE 9

Entropy and quantitative model-checking Quantitative model-checking in very few slides

Why we are not happy with probability

Example

System S (state-labeled, note Σ = 2{p,q}): pq p¯ q ¯ pq ¯ p¯ q Specifications:

1

φ1 = always p.

2

φ2 = never 100 times in a row p. In Linear Temporal Logic (LTL), φ1 = ◻p, φ2 = ◻ ◇<100 p.

Naive analysis

Certain effort required to satisfy φ1 (never go below) A different (smaller?) effort required to satisfy φ2 (go above at least every 100 units)

Probabilistic analysis

P(S ⊧ φ1) = 0 and P(S ⊧ φ2) = 0 . Mismatch between the two analyses

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 4 / 40

slide-10
SLIDE 10

Entropy and quantitative model-checking Quantitative model-checking in very few slides

Our approach — entropy

Example

System S: pq p¯ q ¯ pq ¯ p¯ q Specifications:

1

φ1 = always p.

2

φ2 = never 100 times in a row p. In Linear Temporal Logic (LTL), φ1 = ◻p, φ2 = ◻ ◇<100 p.

Entropy analysis

We associate a number (entropy) H to everything, Entropy of the system: H(S) = 2. Entropy of runs satisfying φ1 is H(S ∩ φ1) = 1 < 2 Entropy of runs satisfying φ2 is H(S ∩ φ2) > 1.99 (close to 2). Matches the intuition!

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 5 / 40

slide-11
SLIDE 11

Entropy and quantitative model-checking Entropy used as a measure

What is entropy

Entropy of a finite word language (Chomsky, Miller)

For a language L ⊂ Σ∗, with Ln = L ∩ Σn H(L) = lim sup

n→∞

1 n log #Ln

Entropy of an ω-language (Staiger)

H(L) = H(pref(L)) = lim sup

n→∞

1 n log #pref(L, n)

What does it mean

Growth rate of the language: #Ln ≈ 2Hn “average log(number of choices for a symbol)” Quantity of information (in bits/symbol) in words of L Related to compression, Kolmogorov complexity, topological entropy, Hausdorff dimension etc.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 6 / 40

slide-12
SLIDE 12

Entropy and quantitative model-checking Entropy used as a measure

Entropy — examples

Example

1 a b H(L(A)) = log 2 = 1

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 7 / 40

slide-13
SLIDE 13

Entropy and quantitative model-checking Entropy used as a measure

Entropy — examples

Example

1 a b H(L(A)) = log 2 = 1 1 2 a b a H(L(A)) = log 1 + √ 5 2

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 7 / 40

slide-14
SLIDE 14

Entropy and quantitative model-checking Entropy used as a measure

Entropy — examples

Example

1 a b H(L(A)) = log 2 = 1 1 2 a b a H(L(A)) = log 1 + √ 5 2 H(Σω) = log ∣Σ∣; Infinitely many times p: H([ [◻ ◇ p] ]) = log ∣Σ∣ (no constraint most of the time); Eventually only p: H([ [◇ ◻ p] ]) = log ∣Σ∣ (for any prefix, it is always possible to append p).

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 7 / 40

slide-15
SLIDE 15

Entropy and quantitative model-checking Entropy used as a measure

Entropy model-checking

The setting

A system S — automaton/Kripke structure A specification φ — LTL formula

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 8 / 40

slide-16
SLIDE 16

Entropy and quantitative model-checking Entropy used as a measure

Entropy model-checking

The setting

A system S — automaton/Kripke structure A specification φ — LTL formula

The metrics

With ω-languages LS and Lφ consider the numbers: Entropy of the system HS = H(LS). Entropy of its good runs HG = H(LS ∩ Lφ) and default d = HS − HG. Maybe entropy of bad runs HB = H(LS ∖ Lφ).

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 8 / 40

slide-17
SLIDE 17

Entropy and quantitative model-checking Entropy used as a measure

Entropy model-checking

The setting

A system S — automaton/Kripke structure A specification φ — LTL formula

The metrics

With ω-languages LS and Lφ consider the numbers: Entropy of the system HS = H(LS). Entropy of its good runs HG = H(LS ∩ Lφ) and default d = HS − HG. Maybe entropy of bad runs HB = H(LS ∖ Lφ).

An interpretation(???)

d : how difficult is it to steer S into φ

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 8 / 40

slide-18
SLIDE 18

Entropy and quantitative model-checking Entropy used as a measure

Entropy model-checking

The setting

A system S — automaton/Kripke structure A specification φ — LTL formula

The metrics

With ω-languages LS and Lφ consider the numbers: Entropy of the system HS = H(LS). Entropy of its good runs HG = H(LS ∩ Lφ) and default d = HS − HG. Maybe entropy of bad runs HB = H(LS ∖ Lφ).

An interpretation(???)

d : how difficult is it to steer S into φ d = 0: entropy too rough, try probability

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 8 / 40

slide-19
SLIDE 19

Entropy and quantitative model-checking Entropy used as a measure

Computation bottleneck

Basic algorithm

Build a B¨ uchi automaton for the property φ. Build automata for LS ∩ Lφ and LS ∖ Lφ. Determinize. Compute the entropies.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 9 / 40

slide-20
SLIDE 20

Entropy and quantitative model-checking Entropy used as a measure

Computation bottleneck

Basic algorithm

Build a B¨ uchi automaton for the property φ. Build automata for LS ∩ Lφ and LS ∖ Lφ. Determinize. Compute the entropies.

Enhancements

Use advanced translation from LTL to (generalized, deterministic) B¨ uchi. Decompose in strongly connected components. Similarly to probabilistic model-checking, requires matrix algebra over large matrices (size potentially ∼ Exp(number of variables)).

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 9 / 40

slide-21
SLIDE 21

Entropy and quantitative model-checking Entropy used as a measure

Basic properties

0 ≤ HG, HB ≤ HS ≤ log ∣Σ∣ P(φ) > 0 ⇒ HG = HS H(φ1 ∨ φ2) = max(H(φ1), H(φ2)) H(◇φ) = log ∣Σ∣ (or 0 if empty). HG < HS ⇔ Lφ nowhere dense in LS)

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 10 / 40

slide-22
SLIDE 22

Entropy and quantitative model-checking Entropy used as a measure

Some additionnal remarks

Reminder

Every φ can be represented as σ ∧ λ (safety and liveness) Safety: avoid some bad states. Liveness: something good happens infinitely often.

For entropy, only safety matters

H(LS ∩ Lφ) = H(LS ∩ Lσ)

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 11 / 40

slide-23
SLIDE 23

Entropy and quantitative model-checking Some experiments

Back to our initial example

Recall:

1

φ1 = always p.

2

φ2 = never 100 times in a row p. In Linear Temporal Logic (LTL), φ1 = ◻p, φ2 = ◻ ◇<100 p.

Entropy analysis

Entropy of runs satisfying φ1 is H(S ∩ φ1) = 1 < 2 Entropy of runs satisfying φ2 is H(S ∩ φ2) > 1.99 (close to 2). Other relevant examples?

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 12 / 40

slide-24
SLIDE 24

Entropy and quantitative model-checking Some experiments

A case study

Problem

n dining philosophers, simplified n philosophers sit around a round table. Single bowl of spaghetti in the middle. n chopsticks, each placed between two philosophers. To eat, each philosophers needs two chopsticks. Race conditions on chopsticks, deadlocks possible if anarchy.

Lao Tze Aristoteles Kant Heidegger Plato

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 13 / 40

slide-25
SLIDE 25

Entropy and quantitative model-checking Some experiments

A case study: n dining philosophers, simplified

Languages considered

LS: all the runs. LS ∖ LD: runs w/o deadlock LS ∩ LNS: no philosopher ever starves. LS ∩ LEt: philosopher 1 eats at least every t time units.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 14 / 40

slide-26
SLIDE 26

Entropy and quantitative model-checking Some experiments

A case study: n dining philosophers, simplified

Languages considered

LS: all the runs. LS ∖ LD: runs w/o deadlock LS ∩ LNS: no philosopher ever starves. LS ∩ LEt: philosopher 1 eats at least every t time units.

Entropy analysis

The first three entropies coincide, the fourth one depends on t and converges.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 14 / 40

slide-27
SLIDE 27

Entropy and asymptotics

Dining philosophers lesson

◻ ◇ e = no philosopher ever starves. ◻ ◇≤t e = philosopher 1 eats at least every t time units. H(◻ ◇≤t e) → H(◻ ◇ e) as t → ∞.

Problem

Asymptotics in LTL Let φt be an LTL formula with parameter (time bound) t, let φ∞ its unbounded version. Is it true that H(φt) → H(φ∞) for t → ∞?

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 15 / 40

slide-28
SLIDE 28

Entropy and asymptotics

Dining philosophers lesson

◻ ◇ e = no philosopher ever starves. ◻ ◇≤t e = philosopher 1 eats at least every t time units. H(◻ ◇≤t e) → H(◻ ◇ e) as t → ∞.

Problem

Asymptotics in LTL Let φt be an LTL formula with parameter (time bound) t, let φ∞ its unbounded version. Is it true that H(φt) → H(φ∞) for t → ∞?

The answer

  • Sometimes. More details next.
  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 15 / 40

slide-29
SLIDE 29

Entropy and asymptotics Parametric linear temporal logic (PLTL)

LTL

Linear Temporal logic over boolean variables p ∈ AP: ϕ ∶∶= p ∣ ¬p ∣ ◯ϕ ∣ ϕ ∧ ϕ ∣ ϕ ∨ ϕ ∣ ϕUϕ ∣ ϕRϕ and standard “syntactic sugar”: ◇ϕ = ⊺Uϕ ◻ϕ = Rϕ (or “¬ ◇ ¬ϕ”) Models: infinite words in (2AP)

ω.

Example

p 1 1 . . . (only 0s) ◇p 1 1 1 . . .

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 16 / 40

slide-30
SLIDE 30

Entropy and asymptotics Parametric linear temporal logic (PLTL)

PLTL

[Alur, Etessami, LaTorre, Peled, ICALP’99] (Parametric) Linear Temporal logic over boolean variables p ∈ AP and parameters t ∈ Param: ϕ ∶∶= p ∣ ¬p ∣ ◯ϕ ∣ ϕ ∧ ϕ ∣ ϕ ∨ ϕ ∣ ϕUϕ ∣ ϕRϕ ∣ ϕUtϕ ∣ ϕRtϕ Distinct parameters for distinct subformulas. Standard “syntactic sugar”: ◇tϕ = ⊺Utϕ ◻tϕ = Rtϕ (or “¬ ◇t ¬ϕ”)

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 17 / 40

slide-31
SLIDE 31

Entropy and asymptotics Parametric linear temporal logic (PLTL)

PLTL semantics in a nutshell

ϕUtψ: ψ must become true before t seconds and ϕ remain true until then; ϕRtψ: ψ must remain true until t seconds elapse or ϕ becomes true; and hence, in particular, ◇tϕ: ϕ becomes true before t seconds; ◻tϕ: ϕ remains true for t seconds.

Example

p 1 1 1 1 . . . (only 0s) ⟦◇tp⟧t←2 1 1 1 1 1 1 0 . . . ⟦◻tp⟧t←2 1 0 . . .

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 18 / 40

slide-32
SLIDE 32

Entropy and asymptotics Parametric linear temporal logic (PLTL)

Temporal formulas: unbounded vs. parametric

Unbounded formula: ϕ∞ = ◻ ◇ p, i.e. “infinitely often p”. Its parametric variant: ϕt = ◻ ◇t p, i.e. less than t seconds between two ps. In theory we like unbounded formulas. Concrete applications often “prefer” parametric specifications. Is ϕt close to ϕ∞ for t sufficiently big?

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 19 / 40

slide-33
SLIDE 33

Entropy and asymptotics Parametric linear temporal logic (PLTL)

Temporal formulas: unbounded vs. parametric

Unbounded formula: ϕ∞ = ◻ ◇ p, i.e. “infinitely often p”. Its parametric variant: ϕt = ◻ ◇t p, i.e. less than t seconds between two ps. In theory we like unbounded formulas. Concrete applications often “prefer” parametric specifications. Is ϕt close to ϕ∞ for t sufficiently big?

Problem

Give an interpretation to limt ◻ ◇t p = ◻ ◇ p.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 19 / 40

slide-34
SLIDE 34

Entropy and asymptotics Parametric linear temporal logic (PLTL)

Notations

w ∈ (2AP)ω, v ∈ NParam then w, v ⊧ ϕ whenever w ⊧ ϕ[t ← v] ⟦ϕ⟧v = {w ∈ (2AP)ω ∣ w, v ⊧ ϕ}. ϕ∞ = the formula in which all bounded operators are replaced with their unbounded analogs. ( ◇ ◻tp)∞ = ◇ ◻ p

Our problem, reformulated

How “close” is ϕt to ϕ∞ for big t’s?

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 20 / 40

slide-35
SLIDE 35

Entropy and asymptotics Convergence problems for PLTL formulas

Interpreting limt ◻ ◇t p = ◻ ◇ p

Set-theoretic interpretation?

⟦◻ ◇t p⟧v is monotonic (increasing wrt v ∈ N) . Its limit exists and is ⋃

v∈N

⟦◻ ◇t p⟧v

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 21 / 40

slide-36
SLIDE 36

Entropy and asymptotics Convergence problems for PLTL formulas

Interpreting limt ◻ ◇t p = ◻ ◇ p

Set-theoretic interpretation?

⟦◻ ◇t p⟧v is monotonic (increasing wrt v ∈ N) . Its limit exists and is ⋃

v∈N

⟦◻ ◇t p⟧v ... but it is not an ω-regular language: ⋃

v∈N

⟦◻ ◇t p⟧v = “words having (uniformly) upper- bounded subsequences of ¬p” So ⋃

v∈N

⟦◻ ◇t p⟧v ≠ ⟦◻ ◇ p⟧.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 21 / 40

slide-37
SLIDE 37

Entropy and asymptotics Convergence problems for PLTL formulas

Interpreting limt ◻ ◇t p = ◻ ◇ p

Topological interpretation?

Work with (topological) closures: cl( ⋃

t∈N

⟦◻ ◇t p⟧) = cl(⟦◻ ◇ p⟧) = ⟦true⟧ But also: cl( ⋂

t∈N

⟦◇ ◻t p⟧) = cl(⟦◇ ◻ p⟧) = ⟦true⟧? Also not clear how to generalize to formulas with nested bounded operators (even if the operators have the same “polarity”).

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 22 / 40

slide-38
SLIDE 38

Entropy and asymptotics Convergence problems for PLTL formulas

Interpreting limt ◻ ◇t p = ◻ ◇ p

Probabilistic interpretations? Incompatibility with “convergence” of formulas

Take any Markov chain M with positive probabilities and p true in some state and false in some other. Then Pr(M, v ⊧ ◻ ◇t p) = 0 for all v ∈ N; but meanwhile Pr(M ⊧ ◻ ◇ p) = 1.

Too coarse metric

Many interesting probabilities are actually either 0 or 1.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 23 / 40

slide-39
SLIDE 39

Entropy and asymptotics Convergence problems for PLTL formulas

Interpreting limt ◻ ◇t p = ◻ ◇ p

Probabilistic interpretations? Example

System S: pq p¯ q ¯ pq ¯ p¯ q Specifications: φ = ◻p, or more involved ψ = never 100 times in a row ¯ p = ◻ ◇<100 p.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 24 / 40

slide-40
SLIDE 40

Entropy and asymptotics Convergence problems for PLTL formulas

Our proposal for interpreting limt ◻ ◇t p = ◻ ◇ p

Interpretation as entropy Convergence in entropy

lim

v→∞H(⟦◻ ◇t p⟧v) = lim v→∞(∣AP∣ − 2−v)

= ∣AP∣ = H(⟦◻ ◇ p⟧) lim

v→∞H(⟦◇ ◻t p⟧v) = lim v→∞∣AP∣

= ∣AP∣ = H(⟦◇ ◻ p⟧)

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 25 / 40

slide-41
SLIDE 41

Entropy and asymptotics Convergence problems for PLTL formulas

Our proposal for interpreting limt ◻ ◇t p = ◻ ◇ p

Interpretation as entropy Convergence in entropy

lim

v→∞H(⟦◻ ◇t p⟧v) = lim v→∞(∣AP∣ − 2−v)

= ∣AP∣ = H(⟦◻ ◇ p⟧) lim

v→∞H(⟦◇ ◻t p⟧v) = lim v→∞∣AP∣

= ∣AP∣ = H(⟦◇ ◻ p⟧) But also for all v, H(⟦◇t ◻ p⟧v) = 1 ≠ 2 = H(⟦◇ ◻ p⟧)

Goal

We want to decide whether limv H(⟦φt⟧v) = H(⟦φ∞⟧).

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 25 / 40

slide-42
SLIDE 42

Main result and techniques

Restricting to fragments of PLTL

First, some bad news

For instance: ◻tp ∧ ◇s¬p admits no entropy limit. So we restrict our problem to:

Fragments of PLTL [Alur et al, ICALP’99]

PLTL◇: PLTL without Rt, “positive fragment”. ϕ ∶∶= p ∣ ¬p ∣ ◯ϕ ∣ ϕ ∧ ϕ ∣ ϕ ∨ ϕ ∣ ϕUϕ ∣ ϕRϕ ∣ ϕUtϕ PLTL◻: PLTL without Ut, “negative fragment”. ϕ ∶∶= p ∣ ¬p ∣ ◯ϕ ∣ ϕ ∧ ϕ ∣ ϕ ∨ ϕ ∣ ϕUϕ ∣ ϕRϕ ∣ ϕRtϕ

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 26 / 40

slide-43
SLIDE 43

Main result and techniques

Our actual result

Theorem (Main)

Given a formula ϕ in PLTL◇ or PLTL◻, lim

v H (⟦ϕ⟧v) always exists and is computable as the logarithm of an algebraic real

number; consequently, it is decidable whether lim

v H (⟦ϕ⟧v) = H (⟦ϕ∞⟧).

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 27 / 40

slide-44
SLIDE 44

Main result and techniques

Our actual result

Theorem (Main)

Given a formula ϕ in PLTL◇ or PLTL◻, lim

v H (⟦ϕ⟧v) always exists and is computable as the logarithm of an algebraic real

number; consequently, it is decidable whether lim

v H (⟦ϕ⟧v) = H (⟦ϕ∞⟧).

Method for computing limv H

1

Build a parameterized B¨ uchi automaton for ϕ.

2

Find its useful part (details depend on PLTL◇ or PLTL◻).

3

Determinize the “limit” automaton, compute its spectral radius, conclude.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 27 / 40

slide-45
SLIDE 45

Main result and techniques Discrete timed automata with parameters (GTBAC)

Generalized B¨ uchi automata with parameters and counters (B¨ uAPC)

⊺, c ∶= 0 p, c + + r ∧ c < t, c + + q ∧ c < t, c + + ⊺, c + +

B¨ uAPC≃ discrete timed automaton with parameters

p, q, r ∈ AP c is a counter (a discrete clock either incremented or reset at each transition) t is a parameter all transition colors (here: only green) must be visited infinitely often for a B¨ uAPC B, L(B, v) is its language for t ∶= v

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 28 / 40

slide-46
SLIDE 46

Main result and techniques Producing entropy in GTBAC

Where is entropy produced in a GTBAC?

We need to compute lim

v→∞H(L(B, v)) = lim v→∞lim sup n→∞

1 n log #Ln(B, v)

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 29 / 40

slide-47
SLIDE 47

Main result and techniques Producing entropy in GTBAC

Where is entropy produced in a GTBAC?

We need to compute lim

v→∞H(L(B, v)) = lim v→∞lim sup n→∞

1 n log #Ln(B, v) One single transition with a lower guard, no resets: a, c + + b, c + + a, c + + b, c < t b, c + + a, c + + a, c + + b, c + + a, c + + b, c + + a, c + + Only the right-hand side component produces entropy for any t.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 29 / 40

slide-48
SLIDE 48

Main result and techniques Producing entropy in GTBAC

Where is entropy produced in a GTBAC?

We need to compute lim

v→∞H(L(B, v)) = lim v→∞lim sup n→∞

1 n log #Ln(B, v) One single transition with a lower guard, some resets: a, c + + b, c ∶= 0 a, c + + b, c < t b, c + + a, c + + a, c + + b, c + + a, c + + b, c + + a, c + + The left-hand side component produces the entropy: any run can be modified by looping through the blue reset and then taking the red transition.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 29 / 40

slide-49
SLIDE 49

Main result and techniques Producing entropy in GTBAC

Where is entropy produced in a GTBAC?

We need to compute lim

v→∞H(L(B, v)) = lim v→∞lim sup n→∞

1 n log #Ln(B, v) One single transition with an upper guard, some resets: a, c + + b, c ∶= 0 a, c + + b, c > t b, c + + a, c + + a, c + + b, c + + a, c + + b, c + + a, c + + The left-hand side component produces entropy since any run can be modified by looping sufficiently (at most t times) in state 2.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 30 / 40

slide-50
SLIDE 50

Main result and techniques Translating from PLTL to GTBAC

Construction sketch

(construction inspired by [Couvreur], extended with counters for Rt and Ut) states: consistent sets of subformulas; “colours”: obligations to satisfy an U (1 for each occurrence). counters: for satisfying Rt and Ut (1 for each occurrence):

▸ counters always reset except when relevant

(i.e. within corresponding Rt’s or Ut’s scope)

▸ upper-bounded guards allow “staying” in the scope of a Ut; ▸ lower-bounded guards allow “escaping” the scope of a Rt.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 31 / 40

slide-51
SLIDE 51

Main result and techniques Translating from PLTL to GTBAC

Example of construction

Automaton built for p ∨ ◯(qUtr)

p ∨ ◯(qUtr) qUtr ∅ 2AP, ∅, true, c ∶= 0 p, ∅, true, c + + r, ∅, c < t, c + + q, ∅, c < t, c + + 2AP, ∅, true, c + + No color because there is no U. All infinite runs are accepting.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 32 / 40

slide-52
SLIDE 52

Main result and techniques Translating from PLTL to GTBAC

PLTL to B¨ uAPC

Two subclasses of B¨ uAPC

B¨ uAPC+ : all guards are upper bounds ⋀i xi ≤ ti B¨ uAPC− : all guards are lower bounds ⋀i xi ≥ ti

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 33 / 40

slide-53
SLIDE 53

Main result and techniques Translating from PLTL to GTBAC

PLTL to B¨ uAPC

Two subclasses of B¨ uAPC

B¨ uAPC+ : all guards are upper bounds ⋀i xi ≤ ti B¨ uAPC− : all guards are lower bounds ⋀i xi ≥ ti

Theorem

For a PLTL formula ϕ, we can construct a B¨ uAPC A such that for any v ∈ NParam, ⟦ϕ⟧v = L(A, v); if ϕ is in PLTL◇ then A is a B¨ uAPC+; and if ϕ is in PLTL◻ then A is a B¨ uAPC−.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 33 / 40

slide-54
SLIDE 54

Main result and techniques Translating from PLTL to GTBAC

Key result

Theorem

For any B¨ uAPC+ or B¨ uAPC−, B, the limit entropy lim

v H(L(B, v)) exists and can be

computed. . . . and thus the main theorem (stated before) directly follows: limit entropy of PLTL◇ and PLTL◻formulas can be computed.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 34 / 40

slide-55
SLIDE 55

Computing limit entropies “Positive” case

B¨ uAPC+: asymptotic analysis, a single strongly connected component

B: B¨ uAPC+ (guards: x < t), v → ∞ If B does not reset all counters, L(B, v) = ∅. Otherwise (B resets all counters)

▸ B∞ ∶= B without constraints and parameters. ▸ Clearly H(B, v) ≤ H(B∞), since L(B, v) ⊆ L(B∞). ▸ Other direction:

∣v∣+c ∣v∣ H(B, v) > H(B∞) (see below the proof method).

▸ Thus limv H(B, v) = H(B∞).

Proof method

Construct an injection (L(B∞) → L(B, v)) that inserts resetting cycles every ∼ ∣v∣ transitions ⇒ constraints of Bv satisfied ⇒ small increase of length.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 35 / 40

slide-56
SLIDE 56

Computing limit entropies “Positive” case

B¨ uAPC+: computing the limit entropy

General case: Only consider (reachable, co-reachable, ...) SCCs of B that reset all counters.

Idea of the algorithm

Find the part of B that resets all counters and is usable in accepting runs (for all v). Compute its entropy.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 36 / 40

slide-57
SLIDE 57

Computing limit entropies “Positive” case

B¨ uAPC+: computing the limit entropy

Algorithm

Data: a B¨ uAPC+ B Result: H = lim

v H(B, v) as log of an algebraic number

SCC ← Tarjan(B); SCCG ← set of non-trivial components resetting all counters; SCCA ← set of accepting non-trivial components; B1 ←trim(B, Q0, SCCA ∩ SCCG) ; /* find useful part */ B2 ← restrict(B1, SCCG) ; /* keep good SCCs */ return H(L(B2)).

Proposition

For a B¨ uAPC+ B, the algorithm above computes H = lim

v H(B, v).

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 37 / 40

slide-58
SLIDE 58

Computing limit entropies “Negative” case

B¨ uAPC−: asymptotic analysis

B: B¨ uAPC− (guards: x > t), v → ∞

Essential object to build

Symbolic automaton E, mimicking B for big v.

Construction idea

E remembers which counters are big. Thus we know what transitions can be fired. E also has “pumping” transitions everywhere B had non-resetting cycles.

Example (B and E for ◻tp)

1 x ≥ t ⊺ p ⊺ 0,∅ 1,∅ p ⊺ 0,{x} 1,{x} p ⊺ p ⊺

Dashed arrow: a “pumping” transition.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 38 / 40

slide-59
SLIDE 59

Computing limit entropies “Negative” case

B¨ uAPC−: computing limit entropy

Idea of the algorithm

Build symbolic automaton E Compute the entropy of its useful part.

Algorithm

Data: a B¨ uAPC− B Result: lim

v H(L(B, v)) as log of an algebraic number

E ←symbolic(B); E1 ←trim(E, Q0 × ∅, Acc); E2 ←restrict(E1, non-pumping transitions); return H(L(E2));

Proposition

For a B¨ uAPC− B, the algorithm above computes lim

v H(B, v).

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 39 / 40

slide-60
SLIDE 60

Conclusions

Conclusions

Problems

How to formalize asymptotic convergence for PLTL? How to decide it?

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 40 / 40

slide-61
SLIDE 61

Conclusions

Conclusions

Problems

How to formalize asymptotic convergence for PLTL? How to decide it?

Results

Comparing convergence in entropy to other convergences. Criteria of convergence in entropy for PLTL◇ and PLTL◻. Computing limits of entropies for B¨ uAPC+ and B¨ uAPC−.

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 40 / 40

slide-62
SLIDE 62

Conclusions

Conclusions

Problems

How to formalize asymptotic convergence for PLTL? How to decide it?

Results

Comparing convergence in entropy to other convergences. Criteria of convergence in entropy for PLTL◇ and PLTL◻. Computing limits of entropies for B¨ uAPC+ and B¨ uAPC−.

Open questions and further work

Entropy and topology? Relevance in verification? Extensions to branching temporal logics?

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 40 / 40

slide-63
SLIDE 63

Conclusions

Conclusions

Problems

How to formalize asymptotic convergence for PLTL? How to decide it?

Results

Comparing convergence in entropy to other convergences. Criteria of convergence in entropy for PLTL◇ and PLTL◻. Computing limits of entropies for B¨ uAPC+ and B¨ uAPC−.

Open questions and further work

Entropy and topology? Relevance in verification? Extensions to branching temporal logics? Thank you!

  • C. Dima (LIAFA, Univ. Paris-Direrot)

Entropy and temporal specifications EQINOCS, 9/05/2016 40 / 40