index.md (1871B)
1 +++ 2 title = 'Lecture 10' 3 +++ 4 # Lecture 10 5 ## Multi-modal logic 6 Assume set of labels I (which in a diagram are on the arrows). 7 For every label i there is modality 〈i〉 so the formulas of multi-modal logic are, given I, defined for i in ∈ I. 8 9 I-frame is pair (W, {Rᵢ | i ∈ I}). 10 Rᵢ ⊆ W × W for every i ⊆ I. 11 12 I-model is triple (W, {Rᵢ | i ⊆ I}, V). 13 14 ### Truth and validity 15 For M an I-model, M,w ⊨ φ is defined by induction on the definition of formulas. 16 17 Clauses: 18 - M,w ⊨ 〈a〉φ iff M,v ⊨ φ for some v with Rₐwv 19 - M,w ⊨ [a]φ iff M,v ⊨ φ for all v with Rₐwv 20 21 ### Example 22 Use index set I = {a, b, c}. 23 Give model with a world where the formula 〈a〉(〈b〉[a] p ∧ [c] ¬ 〈a〉p) is true. 24 25 ![Example multimodal logic formula](example-multimodal-logic-formula.dot.svg) 26 27 <details> 28 <summary>Graphviz code</summary> 29 30 <!-- :Tangle(dot) example-multimodal-logic-formula.dot --> 31 ```dot 32 digraph g { 33 rankdir=LR 34 1 -> 2 [label="a"] 35 2 -> 3 [label="b"] 36 } 37 ``` 38 39 </details> 40 41 42 For a bisimulation, when you do a step between states, they have to be with the same label (so the mimic step must have the same label). 43 44 ### Geach axiom 45 ◇ □ p → □ ◇ p. 46 47 Valid in frame iff for every r ← s → u there is r → v ← u. 48 49 ## Program correctness 50 Prove that a program meets its specification. 51 52 Correctness specification: formal description of how program is supposed to behave 53 54 Program is correct: its executions satisfy the specification 55 56 ### Verification - Hoare approach 57 Prove statements of form `{precondition} program {postcondition}` 58 - pre/postcondition are formulas 59 - program is a while-program 60 - we have proof rules for showing {φ} α {ψ} 61 62 Partial correctness: if program starts satisfying φ, and if it halts, then when it halts ψ is satisfied 63 64 Total correctness: partially correct, and terminates whenever started while satisfying φ