course script
play

Course Script IN 5110: Specification and Verification of Parallel - PDF document

Course Script IN 5110: Specification and Verification of Parallel Sys- tems IN5110, autumn 2019 Martin Steffen, Volker Stolz Contents ii Contents 1 Logics 1 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


  1. Course Script IN 5110: Specification and Verification of Parallel Sys- tems IN5110, autumn 2019 Martin Steffen, Volker Stolz

  2. Contents ii Contents 1 Logics 1 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1.0.1 Logics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1.0.2 General aspects of logics . . . . . . . . . . . . . . . . . . . 3 1.1.0.2.1 Two separate worlds: model theory and proof the- ory? . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Propositional logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.0.1 Non-classical logics . . . . . . . . . . . . . . . . . . . . . . 5 1.2.0.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.0.3 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.0.4 Proof theory . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 Algebraic and first-order signatures . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.0.1 Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.0.2 Sorts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.0.3 Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.0.4 Substutition . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3.0.5 First-order signature (with relations) . . . . . . . . . . . . 7 1.3.0.5.1 Multi-sorted case and a sort for booleans . . . . . 8 1.3.0.5.2 0-arity relation symbols . . . . . . . . . . . . . . . 8 1.3.0.5.3 Equality symbol . . . . . . . . . . . . . . . . . . . 8 1.4 First-order logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.4.1 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.4.1.1 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.4.1.1.1 Minimal representation and syntactic variations . 9 1.4.2 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4.2.1 First-order structures and models . . . . . . . . . . . . . . 10 1.4.2.1.1 first-order model . . . . . . . . . . . . . . . . . . . 10 1.4.2.1.2 First-order structure (left out from the slide) . . . 10 1.4.2.2 Giving meaning to variables . . . . . . . . . . . . . . . . . 11 1.4.2.2.1 Variable assignment . . . . . . . . . . . . . . . . . 11 1.4.2.3 (E)valuation of terms . . . . . . . . . . . . . . . . . . . . . 11 1.4.2.4 Free and bound occurrences of variables . . . . . . . . . . . 11 1.4.2.5 Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.4.2.5.1 Example . . . . . . . . . . . . . . . . . . . . . . . 12 1.4.2.6 Satisfaction . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.4.2.6.1 | = . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.4.2.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.4.3 Proof theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.4.3.1 Proof theory . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.4.3.2 Deductions and proof systems . . . . . . . . . . . . . . . . 13 1.4.3.3 A simple form of derivation . . . . . . . . . . . . . . . . . . 13 1.4.3.3.1 Derivation of ϕ . . . . . . . . . . . . . . . . . . . . 13 1.4.3.4 Proof systems and proofs: remarks . . . . . . . . . . . . . . 14 1.4.3.5 First order logic (commented out) . . . . . . . . . . . . . . 14

  3. Contents iii Contents 1.4.3.6 A proof system for prop. logic . . . . . . . . . . . . . . . . 14 1.4.3.7 A proof system . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.5 Modal logics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.5.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.5.2 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.5.2.1 Kripke structures . . . . . . . . . . . . . . . . . . . . . . . 16 1.5.2.1.1 Labelling . . . . . . . . . . . . . . . . . . . . . . . 17 1.5.2.2 Illustration . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.5.2.2.1 Kripke model . . . . . . . . . . . . . . . . . . . . . 19 1.5.2.3 Satisfaction . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.5.2.4 “Box” and “diamond” . . . . . . . . . . . . . . . . . . . . . 21 1.5.2.4.1 Further notational discussion and preview to LTL 22 1.5.2.5 Different kinds of relations . . . . . . . . . . . . . . . . . . 23 1.5.2.6 Valid in frame/for a set of frames . . . . . . . . . . . . . . 24 1.5.2.6.1 Samples . . . . . . . . . . . . . . . . . . . . . . . . 24 1.5.2.7 Some Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.5.2.7.1 Hints . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.5.3 Proof theory and axiomatic systems . . . . . . . . . . . . . . . . . . 25 1.5.3.1 Base line axiomatic system (“K”) . . . . . . . . . . . . . . 26 1.5.3.2 Sample axioms for different accessibility relations . . . . . 27 1.5.3.3 Different “flavors” of modal logic . . . . . . . . . . . . . . . 27 1.5.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 1.5.4.1 Some exercises . . . . . . . . . . . . . . . . . . . . . . . . . 27 1.5.4.2 Exercises (2): bidirectional frames . . . . . . . . . . . . . . 28 1.5.4.2.1 Bidirectional frame . . . . . . . . . . . . . . . . . 28 1.5.4.3 Exercises (3): validities . . . . . . . . . . . . . . . . . . . . 29

  4. 1 Logics 1 1 Chapter Logics What Learning Targets of this Chapter Contents is it about? The chapter gives some basic 1.1 Introduction . . . . . . . . . . 1 information about “standard” 1.2 Propositional logic . . . . . . 5 logics, namely propositional logics 1.3 Algebraic and first-order sig- and (classical) first-order logics. natures . . . . . . . . . . . . 6 1.4 First-order logic . . . . . . . . 9 1.5 Modal logics . . . . . . . . . . 15 1.1 Introduction 1.1.0.1 Logics What’s logic? As discussed in the introductory part, we are concerned about formal methods, verification and nalysis of systems etc., and that is done relative to a specification of a system. The specification lays down (the) desired properties of a system and can be used to judge whether a system is correct or not. The requirements or properties can be given in many different forms, including informal ones. We are dealing with formal specifications. Formal for us means, it has not just a precise meaning, that meaning is also fixed in a mathematical form for instance a “model” 1 We will not deal with informal specifications nor with formal speificiations that are unrelated to the behavior in a broad sense of a system. For example, a specification like the system should cost 100 000$ or less, incl. VAT could be seens as being formal and precise. In practice, such a statement is probably not precise enough for a legally binding contract (what’s the exchange rate, if it’s for Norwegian usage? Which date is taken to fix the exchange rate, the contract, the scheduled delivery date, the actual delivery date? What’s the “system” anyway, the installation? The binary? 1 The notion of model will be variously discussed later resp. given a precise meaning in the lection. Actually, it will be given different precise mathematical meaning, depending on which framework, logic etc we are facing; the rough idea remains the “same” though.

Recommend


More recommend