lecture 04 duration calculus ii
play

Lecture 04: Duration Calculus II 2014-05-15 Dr. Bernd Westphal 04 - PowerPoint PPT Presentation

Real-Time Systems Lecture 04: Duration Calculus II 2014-05-15 Dr. Bernd Westphal 04 2014-05-15 main Albert-Ludwigs-Universit at Freiburg, Germany Contents & Goals Last Lecture: Started DC Syntax and Semantics:


  1. Real-Time Systems Lecture 04: Duration Calculus II 2014-05-15 Dr. Bernd Westphal – 04 – 2014-05-15 – main – Albert-Ludwigs-Universit¨ at Freiburg, Germany

  2. Contents & Goals Last Lecture: • Started DC Syntax and Semantics: Symbols, State Assertions This Lecture: • Educational Objectives: Capabilities for following tasks/questions. • Read (and at best also write) Duration Calculus terms and formulae. • Content: • Duration Calculus Formulae • Duration Calculus Abbreviations • Satisfiability, Realisability, Validity – 04 – 2014-05-15 – Sprelim – 2 /36

  3. Duration Calculus Cont’d – 04 – 2014-05-15 – main – 3 /36

  4. Duration Calculus: Overview We will introduce three (or five) syntactical “levels”: (i) Symbols: true , false , = , <, >, ≤ , ≥ , f, g, x, y, z, X, Y, Z, d (ii) State Assertions: P ::= 0 | 1 | X = d | ¬ P 1 | P 1 ∧ P 2 (iii) Terms: θ ::= x | ℓ | ∫ P | f ( θ 1 , . . . , θ n ) (iv) Formulae: – 04 – 2014-05-15 – Sdcterm – F ::= p ( θ 1 , . . . , θ n ) | ¬ F 1 | F 1 ∧ F 2 | ∀ x • F 1 | F 1 ; F 2 (v) Abbreviations: ⌈ P ⌉ t , ⌈ P ⌉ ≤ t , ⌈ ⌉ , ⌈ P ⌉ , ♦ F, � F 4 /36

  5. Terms: Remarks Remark 2.5. The semantics I � θ � of a term is insensitive against changes of the interpretation I at individual time points. Remark 2.6. The semantics I � θ � ( V , [ b, e ]) of a rigid term does – 04 – 2014-05-15 – Sdcterm – not depend on the interval [ b, e ] . 5 /36

  6. Duration Calculus: Overview We will introduce three (or five) syntactical “levels”: (i) Symbols: true , false , = , <, >, ≤ , ≥ , f, g, x, y, z, X, Y, Z, d (ii) State Assertions: P ::= 0 | 1 | X = d | ¬ P 1 | P 1 ∧ P 2 (iii) Terms: θ ::= x | ℓ | ∫ P | f ( θ 1 , . . . , θ n ) (iv) Formulae: – 04 – 2014-05-15 – Sdcform – F ::= p ( θ 1 , . . . , θ n ) | ¬ F 1 | F 1 ∧ F 2 | ∀ x • F 1 | F 1 ; F 2 (v) Abbreviations: ⌈ P ⌉ t , ⌈ P ⌉ ≤ t , ⌈ ⌉ , ⌈ P ⌉ , ♦ F, � F 6 /36

  7. Formulae: Syntax • The set of DC formulae is defined by the following grammar: F ::= p ( θ 1 , . . . , θ n ) | ¬ F 1 | F 1 ∧ F 2 | ∀ x • F 1 | F 1 ; F 2 where p is a predicate symbol, θ i a term, x a global variable. • chop operator : ‘ ; ’ • atomic formula : p ( θ 1 , . . . , θ n ) • rigid formula : all terms are rigid • chop free : ‘ ; ’ doesn’t occur • usual notion of free and bound (global) variables – 04 – 2014-05-15 – Sdcform – • Note: quantification only over ( first-order ) global variables, not over ( second-order ) state variables. 7 /36

  8. Formulae: Priority Groups • To avoid parentheses, we define the following five priority groups from highest to lowest priority: • ¬ (negation) • ; (chop) • ∧ , ∨ (and/or) • = ⇒ , ⇐ ⇒ (implication/equivalence) • ∃ , ∀ (quantifiers) Examples: – 04 – 2014-05-15 – Sdcform – • ¬ F ; F ∨ H • ∀ x • F ∧ G 8 /36

  9. Syntactic Substitution... ...of a term θ for a variable x in a formula F . • We use F [ x := θ ] to denote the formula that results from performing the following steps: (i) transform F into ˜ F by (consistently) renaming bound variables such that no free occurrence of x in ˜ F appears within a quantified subformula ∃ z • G or ∀ z • G for some z occurring in θ , (ii) textually replace all free occurrences of x in ˜ F by θ . – 04 – 2014-05-15 – Sdcform – 9 /36

  10. Syntactic Substitution... ...of a term θ for a variable x in a formula F . • We use F [ x := θ ] to denote the formula that results from performing the following steps: (i) transform F into ˜ F by (consistently) renaming bound variables such that no free occurrence of x in ˜ F appears within a quantified subformula ∃ z • G or ∀ z • G for some z occurring in θ , (ii) textually replace all free occurrences of x in ˜ F by θ . Examples : F := ( x ≥ y = ⇒ ∃ z • z ≥ 0 ∧ x = y + z ) , θ 1 := ℓ , θ 2 := ℓ + z , – 04 – 2014-05-15 – Sdcform – • F [ x := θ 1 ] = ( x ≥ y = ⇒ ∃ z • z ≥ 0 ∧ x = y + z ) • F [ x := θ 2 ] = ( x ≥ y = ⇒ ∃ z • z ≥ 0 ∧ x = y + z ) 9 /36

  11. Formulae: Semantics • The semantics of a formula is a function I � F � : Val × Intv → { tt , ff } i.e. I � F � ( V , [ b, e ]) is the truth value of F under interpretation I and valuation V in the interval [ b, e ] . • This value is defined inductively on the structure of F : I � p ( θ 1 , . . . , θ n ) � ( V , [ b, e ]) = ˆ p ( I � θ 1 � ( V , [ b, e ]) , . . . , I � θ n � ( V , [ b, e ])) , I � ¬ F 1 � ( V , [ b, e ]) = tt iff I � F 1 � ( V , [ b, e ]) = ff , I � F 1 ∧ F 2 � ( V , [ b, e ]) = tt iff I � F 1 � ( V , [ b, e ]) = I � F 2 � ( V , [ b, e ]) = tt , – 04 – 2014-05-15 – Sdcform – I � ∀ x • F 1 � ( V , [ b, e ]) = tt iff for all a ∈ R , I � F 1 [ x := a ] � ( V , [ b, e ]) = tt I � F 1 ; F 2 � ( V , [ b, e ]) = iff there is an m ∈ [ b, e ] such that I � F 1 � ( V , [ b, m ]) = I � F 2 � ( V , [ m, e ]) = tt . 10 /36

  12. Formulae: Example F := ∫ L = 0 ; ∫ L = 1 1 L I 0 Time 0 1 2 3 4 • I � F � ( V , [0 , 2]) = – 04 – 2014-05-15 – Sdcform – 11 /36

  13. Formulae: Remarks Remark 2.10. [ Rigid and chop-free ] Let F be a duration formula, I an interpretation, V a valuation, and [ b, e ] ∈ Intv. • If F is rigid , then ∀ [ b ′ , e ′ ] ∈ Intv : I � F � ( V , [ b, e ]) = I � F � ( V , [ b ′ , e ′ ]) . • If F is chop-free or θ is rigid , then in the calculation of the semantics of F , every occurrence of θ denotes the same value. – 04 – 2014-05-15 – Sdcform – 12 /36

  14. Substitution Lemma Lemma 2.11. [ Substitution ] Consider a formula F , a global variable x , and a term θ such that F is chop-free or θ is rigid . Then for all interpretations I , valuations V , and intervals [ b, e ] , I � F [ x := θ ] � ( V , [ b, e ]) = I � F � ( V [ x := a ] , [ b, e ]) where a = I � θ � ( V , [ b, e ]) . – 04 – 2014-05-15 – Sdcform – • F := ℓ = x ; ℓ = x = ⇒ ℓ = 2 · x , θ := ℓ 13 /36

  15. Duration Calculus: Overview We will introduce three (or five) syntactical “levels”: (i) Symbols: true , false , = , <, >, ≤ , ≥ , f, g, x, y, z, X, Y, Z, d (ii) State Assertions: P ::= 0 | 1 | X = d | ¬ P 1 | P 1 ∧ P 2 (iii) Terms: θ ::= x | ℓ | ∫ P | f ( θ 1 , . . . , θ n ) (iv) Formulae: – 04 – 2014-05-15 – Sdcform – F ::= p ( θ 1 , . . . , θ n ) | ¬ F 1 | F 1 ∧ F 2 | ∀ x • F 1 | F 1 ; F 2 (v) Abbreviations: ⌈ P ⌉ t , ⌈ P ⌉ ≤ t , ⌈ ⌉ , ⌈ P ⌉ , ♦ F, � F 14 /36

  16. Duration Calculus Abbreviations – 04 – 2014-05-15 – main – 15 /36

  17. Abbreviations • ⌈⌉ := ℓ = 0 (point interval) • ⌈ P ⌉ := ∫ P = ℓ ∧ ℓ > 0 (almost everywhere) • ⌈ P ⌉ t := ⌈ P ⌉ ∧ ℓ = t (for time t ) • ⌈ P ⌉ ≤ t := ⌈ P ⌉ ∧ ℓ ≤ t (up to time t ) • ♦ F := true ; F ; true (for some subinterval) • � F := ¬ ♦ ¬ F (for all subintervals) – 04 – 2014-05-15 – Sdcabbrev – 16 /36

  18. Abbreviations: Examples 1 L I 0 Time 0 2 4 6 8 I � ∫ L = 0 � ( V , [0 , 2] ) = I � ∫ L = 1 � ( V , [2 , 6] ) = I � ∫ L = 0 ; ∫ L = 1 � ( V , [0 , 6] ) = I � ⌈¬ L ⌉ � ( V , [0 , 2] ) = I � ⌈ L ⌉ � ( V , [2 , 3] ) = I � ⌈¬ L ⌉ ; ⌈ L ⌉ � ( V , [0 , 3] ) = I � ⌈¬ L ⌉ ; ⌈ L ⌉ ; ⌈¬ L ⌉ � ( V , [0 , 6] ) = – 04 – 2014-05-15 – Sdcabbrev – I � ♦ ⌈ L ⌉ � ( V , [0 , 6] ) = I � ♦ ⌈¬ L ⌉ � ( V , [0 , 6] ) = ♦ ⌈¬ L ⌉ 2 I � � ( V , [0 , 6] ) = ♦ ⌈¬ L ⌉ 2 ; ⌈¬ L ⌉ 1 ; ⌈¬ L ⌉ 3 I � � ( V , [0 , 6] ) = 17 /36

  19. Duration Calculus: Preview gas valve flame sensor • Duration Calculus is an interval logic . • Formulae are evaluated in an ignition ( implicitly given ) interval. • G, F, I, H : { 0 , 1 } Strangest operators : • Define L : { 0 , 1 } as G ∧¬ F . • almost everywhere — Example: ⌈ G ⌉ (Holds in a given interval [ b, e ] iff the gas valve is open almost everywhere.) • chop — Example: ( ⌈¬ I ⌉ ; ⌈ I ⌉ ; ⌈¬ I ⌉ ) = ⇒ ℓ ≥ 1 (Ignition phases last at least one time unit.) – 04 – 2014-05-15 – Sdcpreview – ℓ • integral — Example: ℓ ≥ 60 = ⇒ ∫ L ≤ 20 (At most 5% leakage time within intervals of at least 60 time units.) 18 /36

  20. DC Validity, Satisfiability, Realisability – 04 – 2014-05-15 – main – 19 /36

  21. Validity, Satisfiability, Realisability Let I be an interpretation, V a valuation, [ b, e ] an interval, and F a DC formula. • I , V , [ b, e ] | = F (“ F holds in I , V , [ b, e ] ”) iff I � F � ( V , [ b, e ]) = tt. – 04 – 2014-05-15 – Sdcsat – 20 /36

  22. Validity, Satisfiability, Realisability Let I be an interpretation, V a valuation, [ b, e ] an interval, and F a DC formula. • I , V , [ b, e ] | = F (“ F holds in I , V , [ b, e ] ”) iff I � F � ( V , [ b, e ]) = tt. • F is called satisfiable iff it holds in some I , V , [ b, e ] . – 04 – 2014-05-15 – Sdcsat – 20 /36

Recommend


More recommend