Lecture 06: DC Properties I 2014-05-22 Dr. Bernd Westphal 06 - - PowerPoint PPT Presentation

lecture 06 dc properties i
SMART_READER_LITE
LIVE PREVIEW

Lecture 06: DC Properties I 2014-05-22 Dr. Bernd Westphal 06 - - PowerPoint PPT Presentation

Real-Time Systems Lecture 06: DC Properties I 2014-05-22 Dr. Bernd Westphal 06 2014-05-22 main Albert-Ludwigs-Universit at Freiburg, Germany Contents & Goals Last Lecture: DC Syntax and Semantics: Abbreviations


slide-1
SLIDE 1

– 06 – 2014-05-22 – main –

Real-Time Systems

Lecture 06: DC Properties I

2014-05-22

  • Dr. Bernd Westphal

Albert-Ludwigs-Universit¨ at Freiburg, Germany

slide-2
SLIDE 2

Contents & Goals

– 06 – 2014-05-22 – Sprelim –

2/35

Last Lecture:

  • DC Syntax and Semantics: Abbreviations (“almost everywhere”)
  • Satisfiable/Realisable/Valid (from 0)

This Lecture:

  • Educational Objectives: Capabilities for following tasks/questions.
  • What are obstacles on proving a design correct in the real-world, and how to
  • vercome them?
  • Facts: decidability properties.
  • What’s the idea of the considered (un)decidability proofs?
  • Content:
  • Semantical Correctness Proof
  • (Un-)Decidable problems of DC variants in discrete and continuous time
slide-3
SLIDE 3

Specification and Semantics-based Correctness Proofs of Real-Time Systems with DC

– 06 – 2014-05-22 – main –

3/35

slide-4
SLIDE 4

Methodology: Ideal World...

– 06 – 2014-05-22 – Sdcmeth –

4/35

(i) Choose a collection of observables ‘Obs’. (ii) Provide the requirement/specification ‘Spec’ as a conjunction of DC formulae (over ‘Obs’). (iii) Provide a description ‘Ctrl’

  • f the controller in form of a DC formula (over ‘Obs’).

(iv) We say ‘Ctrl’ is correct (wrt. ‘Spec’) iff | =0 Ctrl = ⇒ Spec.

slide-5
SLIDE 5

Gas Burner Revisited

– 06 – 2014-05-22 – Sdcgasburner –

5/35

gas valve flame sensor ignition

(i) Choose observables:

  • two boolean observables G and F

(i.e. Obs = {G, F}, D(G) = D(F) = {0, 1})

  • G = 1: gas valve open

(output)

  • F = 1: have flame

(input)

  • define L := G ∧ ¬F (leakage)

(ii) Provide the requirement: Req : ⇐ ⇒ (ℓ ≥ 60 = ⇒ 20 · ∫ L ≤ ℓ)

slide-6
SLIDE 6

Gas Burner Revisited

– 06 – 2014-05-22 – Sdcgasburner –

6/35

(iii) Provide a description ‘Ctrl’

  • f the controller in form of a DC formula (over ‘Obs’).

Here, firstly consider a design:

  • Des-1 : ⇐

⇒ (⌈L⌉ = ⇒ ℓ ≤ 1)

  • Des-2 : ⇐

⇒ (⌈L⌉ ; ⌈¬L⌉ ; ⌈L⌉ = ⇒ ℓ > 30) (iv) Prove correctness:

  • We want (or do we want |

=0...?): | = (Des-1 ∧ Des-2 = ⇒ Req) (Thm. 2.16)

  • We do show

| = Req-1 = ⇒ Req (Lem. 2.17) with the simplified requirement Req-1 := (ℓ ≤ 30 = ⇒ ∫ L ≤ 1),

  • and we show

| = (Des-1 ∧ Des-2) = ⇒ Req-1. (Lem. 2.19)

slide-7
SLIDE 7

Gas Burner Revisited: Lemma 2.17

– 06 – 2014-05-22 – Sdcgasburner –

7/35

Claim: | = (ℓ ≤ 30 = ⇒ ∫ L ≤ 1)

  • Req-1

= ⇒ (ℓ ≥ 60 = ⇒ 20 · ∫ L ≤ ℓ)

  • Req

Proof:

  • Assume ‘Req-1’.
  • Let LI be any interpretation of L, and [b, e] an interval with e − b ≥ 60.
  • Show “20 · ∫ L ≤ ℓ”, i.e.

I20 · ∫ L ≤ ℓ(V, [b, e]) = tt i.e. ˆ 20ˆ · e

b

LI(t) dt ˆ ≤ (e − b)

slide-8
SLIDE 8

Gas Burner Revisited: Lemma 2.17

– 06 – 2014-05-22 – Sdcgasburner –

8/35 | = (ℓ ≤ 30 = ⇒ ∫ L ≤ 1)

  • Req-1

= ⇒ (ℓ ≥ 60 = ⇒ 20 · ∫ L ≤ ℓ)

  • Set n := ⌈ e−b

30 ⌉, i.e. n ∈ N with n − 1 < e−b 30 ≤ n, and split the interval b b + 30 b + 60 b + 30(n − 2)b + 30(n − 1) e b + 30n

slide-9
SLIDE 9

Some Laws of the DC Integral Operator

– 06 – 2014-05-22 – Sdcgasburner –

9/35

Theorem 2.18. For all state assertions P and all real numbers r1, r2 ∈ R, (i) | = ∫ P ≤ ℓ, (ii) | = (∫ P = r1) ; (∫ P = r2) = ⇒ ∫ P = r1 + r2, (iii) | = ⌈¬P⌉ = ⇒ ∫ P = 0, (iv) | = ⌈⌉ = ⇒ ∫ P = 0.

slide-10
SLIDE 10

Gas Burner Revisited: Lemma 2.18

– 06 – 2014-05-22 – Sdcgasburner –

10/35

Claim:

| = ((⌈L⌉ = ⇒ ℓ ≤ 1)

  • Des-1

∧ (⌈L⌉ ; ⌈¬L⌉ ; ⌈L⌉ = ⇒ ℓ > 30)

  • Des-2

) = ⇒ (ℓ ≤ 30 = ⇒ ∫ L ≤ 1)

  • Req-1

Proof:

slide-11
SLIDE 11

Obstacles in Non-Ideal World

– 06 – 2014-05-22 – main –

13/35

slide-12
SLIDE 12

Methodology: The World is Not Ideal...

– 06 – 2014-05-22 – Sdcobst –

14/35

(i) Choose a collection of observables ‘Obs’. (ii) Provide specification ‘Spec’ (conjunction of DC formulae (over ‘Obs’)). (iii) Provide a description ‘Ctrl’ of the controller (DC formula (over ‘Obs’)). (iv) Prove ‘Ctrl’ is correct (wrt. ‘Spec’). That looks too simple to be practical. Typical obstacles: (i) It may be impossible to realise ‘Spec’ if it doesn’t consider properties of the plant. (ii) There are typically intermediate design levels between ‘Spec’ and ‘Ctrl’. (iii) ‘Spec’ and ‘Ctrl’ may use different observables. (iv) Proving validity of the implication is not trivial.

slide-13
SLIDE 13

(i) Assumptions As A Form of Plant Model

– 06 – 2014-05-22 – Sdcobst –

15/35

  • Often the controller will (or can) operate correctly only under some

assumptions.

  • For instance, with a level crossing
  • we may assume an upper bound on the speed of approaching trains,

(otherwise we’d need to close the gates arbitrarily fast)

  • we may assume that trains are not arbitrarily slow in the crossing,

(otherwise we can’t make promises to the road traffic)

  • We shall specify such assumptions as a DC formula ‘Asm’ on the input
  • bservables and verify correctness of ‘Ctrl’ wrt. ‘Spec’ by proving validity

(from 0) of Ctrl ∧ Asm = ⇒ Spec

  • Shall we care whether ‘Asm’ is satisfiable?
slide-14
SLIDE 14

(ii) Intermediate Design Levels

– 06 – 2014-05-22 – Sdcobst –

16/35

  • A top-down development approach may involve
  • Spec — specification/requirements
  • Des — design
  • Ctrl — implementation
  • Then correctness is established by proving validity of

Ctrl = ⇒ Des (1) and Des = ⇒ Spec (2) (then concluding Ctrl = ⇒ Spec by transitivity)

  • Any preference on the order?
slide-15
SLIDE 15

(iii): Different Observables

– 06 – 2014-05-22 – Sdcobst –

17/35

  • Assume, ‘Spec’ uses more abstract observables ObsA and ‘Ctrl’ more

concrete ones ObsC.

  • For instance:
  • in ObsA: only consider gas valve open or closed (D(G) = {0, 1})
  • in ObsC: may control two valves and care for intermediate positions, for

instance, to react to different heating requests (D(G1) = {0, 1, 2, 3}, D(G2) = {0, 1, 2, 3})

  • To prove correctness, we need information how the observables are related

— an invariant which links the data values of ObsA and ObsC.

  • If we’re given the linking invariant as a DC formula, say ‘LinkC,A’, then

proving correctness of ‘Ctrl’ wrt. ‘Spec’ amounts to proving validity (from 0) of Ctrl ∧ LinkC,A = ⇒ Spec.

  • For instance,

LinkC,A = ⌈G ⇐ ⇒ (G1 + G2 > 0)⌉

slide-16
SLIDE 16

Obstacle (iv): How to Prove Correctness?

– 06 – 2014-05-22 – Sdcobst –

18/35

  • by hand on the basis of DC semantics,
  • maybe supported by proof rules,
  • sometimes a general theorem may fit (e.g. cycle times of PLC automata),
  • algorithms as in Uppaal.
slide-17
SLIDE 17

DC Properties

– 06 – 2014-05-22 – main –

19/35

slide-18
SLIDE 18

Decidability Results: Motivation

– 06 – 2014-05-22 – Smotiv –

20/35

  • Recall:

Given assumptions as a DC formula ‘Asm’ on the input observables, verifying correctness of ‘Ctrl’ wrt. ‘Spec’ amounts to proving | =0 Ctrl ∧ Asm = ⇒ Spec (1)

  • If ‘Asm’ is not satisfiable then (1) is trivially valid,

and thus each ‘Ctrl’ correct wrt. ‘Spec’.

  • So: strong interest in assessing the satisfiability of DC formulae.
  • Question: is there an automatic procedure to help us out?

(a.k.a.: is it decidable whether a given DC formula is satisfiable?)

  • More interesting for ‘Spec’: is it realisable (from 0)?
  • Question: is it decidable whether a given DC formula is realisable?
slide-19
SLIDE 19

Decidability Results for Realisability: Overview

– 06 – 2014-05-22 – Smotiv –

21/35

Fragment Discrete Time Continous Time RDC decidable decidable RDC + ℓ = r decidable for r ∈ N undecidable for r ∈ R+ RDC + ∫ P1 = ∫ P2 undecidable undecidable RDC + ℓ = x, ∀ x undecidable undecidable DC

slide-20
SLIDE 20

References

– 06 – 2014-05-22 – main –

34/35

slide-21
SLIDE 21

– 06 – 2014-05-22 – main –

35/35

[Olderog and Dierks, 2008] Olderog, E.-R. and Dierks, H. (2008). Real-Time

Systems - Formal Specification and Automatic Verification. Cambridge

University Press.