1 / 47

Modal Logic A Friendly Introduction

Modal Logic A Friendly Introduction. First-Order Modal Logic M. Fitting and Richard L. Mendelson A New Introduction to Modal Logic G.E. Hughes and M.J. Cresswell. Presented By Eran Yahav yahave@post.tau.ac.il http://www.cs.tau.ac.il/~yahave. Why Study Modal Logic.

jamil
Download Presentation

Modal Logic A Friendly Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Modal LogicA Friendly Introduction First-Order Modal Logic M. Fitting and Richard L. Mendelson A New Introduction to Modal Logic G.E. Hughes and M.J. Cresswell Presented By Eran Yahav yahave@post.tau.ac.il http://www.cs.tau.ac.il/~yahave

  2. Why Study Modal Logic • Generalizes important logics • Temporal logics • Dynamic logic • Logic of knowledge • And more... • Applications in • Program semantics • Verification and Model Checking • Artificial intelligence • And more…

  3. What is a Modal? Classical propositional logic P  Q  R Jonathan is happy It is true that Jonathan is happy

  4. Alethic Temporal Deontic Epistemic What is a Modal? Qualification over the truth of claim Necessarily Possibly Will be Was Has been Will have been May Can Must Certainly Probably Perhaps Surely Jonathan is _____ happy It is _____ true that Jonathan is happy

  5. Outline • Propositional Modal Logic • Possible world semantics (Kripke Semantics) • Temporal logic, epistemic logic • First-Order Modal Logic • What the quantifiers quantify over • Constant and Varying Domains • Applications in program semantics • Summary

  6. Propositional Modal Logic • Syntax • Propositional logic • Modal operators •  - necessarily (box) •  - possibly (diamond) (PQ)(PQ) PQ

  7. Informal Interpretations Jonathan is happy Jonathan is happy under interpretation i0  Jonathan is happy  Jonathan is happy i Jonathan is happy under interpretation i i Jonathan is happy under interpretation i PP PP

  8. Possible World Semantics • Possible interpretation = possible world • Accessibility relation  Jonathan is happy w w0Rw Jonathan is happy at w PP (w w0Rw P at w)  P at w0

  9. Possible World Semantics • Valid propositional formula • True for every possible assignment to propositions • “all lines of the truth table” • Quantify over possible worlds P Q (PQ)P FF FT F F T F T T T F T TF TT T T T

  10. Frames and Models • Frame • G – non-empty set of possible worlds • R – binary accessibility relation • Model • A frame <G,R> with an assignment V • V - which propositions are true at which worlds • Also denoted 

  11. Truth in a Model • w  X  w  X • w  (XY)  w  X and w  Y • w   X  for every w’G, if (w,w’)R then w’  X • w   X  for some w’G, if (w,w’)R then w’  X

  12. Example a b c P Q b  PQ a  P c  PQ a  Q a   (P  Q) a  P  Q

  13. Example a b c P a  P a  P

  14. More General Examples • Given a model G,R,, aG • a  (PQ)  a  P  Q • Under what terms • P  P for each world aG • P  P • P  P • P  P transitive reflexive symmetric symmetric and transitive

  15. Important Modal Logics

  16. Important Modal Logics S5  B S4  T K4   D K

  17. Logical Consequence • Set of formulae  formula • Classically • S  X when X must be true whenever members of S are true • Modal setting • X is true at each world in which members of S are true? (local) • X is valid in every model in which members of S are valid? (global)

  18. Logical Consequence • Answer: both • S  U  X • S – set of formulae – global assumptions • U – set of formulae – local assumptions • X – single formula • X is consequence of S and U when • For every model in which all members of S are valid • and for every world w in which satisfies U • we have w  X

  19. Example a   {PP}  (P P) a  P a  PP b  P a  P a  P P At world a local assumptions are true but P P is not b P

  20. Example {PP}   P P assume a  P Let a world b, aRb Then b  P But PP is valid in the model b P And thus a  P And therefore P P follows from the global assumption

  21. Temporal Logic Jonathan is happy at time t Jonathan is happy in March 1999 Jonathan is happy in June 2000 t Jonathan is happy at time t t Jonathan is happy at time t  Jonathan is happy t Jonathan is happy at time t  Jonathan is happy t Jonathan is happy at time t

  22. Temporal Logic • F P – will sometime be the case that P • P P – was sometime be the case that P • G P – will always be the case that P • H P – has always been P • In common temporal logic •  P = P G P •  P = P  F P

  23. Epistemic Logic • Logic of knowledge • Ka P – a knows that P • Pa P – it is possible, for all that a knows, that P • Logic of belief • Ba P – a believes that P • Ca P – it is compatible with everything a believes in that P

  24. Epistemic Logic Ka (P  Q)  (Ka P  Ka Q) Ka P  P Ka P  Ka Ka P Ka P  Ka Ka P Ka Kb P  Ka P Ka P  Pa P

  25. Epistemic Logic Example Ka (P  Q)  (Ka P  Ka Q) E = I see my hand S = I’m dreaming (1) Ka(E  S) (2) KaS Ka (E  S)  (Ka E  Ka S) Ka (E  S)  (KaS  Ka E) By (1) and (2) Ka E

  26. First-Order Modal Logic • , – quantify over possible worlds • , – quantify over individuals • Complications • What quantifiers quantify over? • Mixing modal operators and quantifiers

  27. It is a necessary truththat everything is F Each thing is such thatit has F necessarily xF(x) xF(x) de re de dicto Necessity de re & de dicto Everything is necessarily F

  28. What the Quantifiers Quantify Over • Universal Instantiation (classical logic) • x (x)  (y) • First order modal logic • object need not exist in more than one world • Free variables take values from the domain of the model, not domain of world we are in • Validity depends on possible-world semantics • Holds in constant domain semantics • Does not hold in varying domain semantics

  29. Constant Domains • Augmented Frame G,R,D • G,R as in PML • D – domain of the frame • Model G,R,D,L • L – interpretation assigning to each n-ary predicate P and each world w some n-ary relation on D • Valuation • Assign a member v(x)  D to each free variable x

  30. Constant Domains • Quantification over objects of the model • Universal instantiation holds • x (x)  (y) • Possiblist quantification • Simpler to handle • yx(x=y) • If pigs could fly

  31. Varying Domains • Augmented Frame G,R,D • G,R as in PML • D – domain function, mapping worlds to non-empty sets • Model G,R,D,L • L – interpretation assigning to each n-ary predicate P and each world w some n-ary relation on DF • Valuation • Assign a member v(x)  DF to each free variable x • Simulate constant domain model • For all w D(w) = DF

  32. Varying Domains • Two ways for individual e to have  at w • e is  at w and e is in w • e is  at w but e not in w • Something does not exist in this world • But still has the property  • Quantification only over objects in world’s domain --- actualist quantification • Pigs cannot fly

  33. Existence Relativization • Define a special unary predicate  • For a formula , we define  • If a is atomic A = A • (X) = (X) • (XY) = (X Y) • (X) = X • (x ) = x (x)   • (x ) = x (x) • A sentence  is valid in every varying domain model iff  is valid in every constant domain model

  34. Barcan & Converse Barcan Formulae • Modal operators = FO quantifiers of different sort • In classical FO • xy   yx  • yx   xy • xy  yx  • Any of these translate to FOML?

  35. Barcan & Converse Barcan Formulae x     x  x   x   Barcan • x  x   x    x  Converse Barcan Barcan is valid Anti-monotonic Converse Barcan is valid  Monotonic Barcan and Converse Barcan are valid  Locally constant

  36. a b a Varying Domain Example P = { b } x  P(x)  x P(x)

  37. Equality • What do we want? • keep equality across worlds • ( x = y )   ( x = y ) • Normal Model G,R,D,L • For each w  G, L(=,w) is the equality relation on the domain of the model DM • = is the same across worlds

  38. Existence in Varying Domains • E(x) = (y y=x) • Fixing universal instantiation • x (x)  E(y)  (y) • When y exists, it has the property  • In classical logic E(y) is always true

  39. x y x y x y x y x y x y x y x y x y x y x y x y Program Semantics as Kripke Structure y = x while (y != NULL && y->data != d) { y = y->n } … …

  40. Finite State Programs • Propositional Kripke Structure • Possible worlds = global states • Accessibility relation = transition relation • May fold Kripke-Structure • Merge states that have same labeling • Result with abstraction of all computations • Check temporal properties over this model (rather than over infinite computations) • Results with what MC community calls Kripke Structure

  41. Program Semantics in Modal Perspective • Propositional modal logic • propositions = properties of interest • Program global states = possible worlds • Transition relation = accessibility relation • Modal claims = properties of computations • First-Order modal logic • Global states are first-order logical structures • Closer to concrete semantic

  42. Summary • Propositional modal logic • It is all about the accessibility relation • Generalizes other common logics • Wide range of applications in CS • First order modal logic • All about quantification domains • Constant/varying semantics models are equivalent • Should choose what’s more suitable for you • Closer to concrete program semantics • Currently no common applications in CS

  43. References • M. Fitting, First Order Modal Logic • And his homepage http://comet.lehman.cuny.edu/fitting/ • G.E. Hughes and M.J. Cresswell, A New Introduction to Modal Logic • http://plato.stanford.edu/entries/logic-modal/ • Some theorem provers and tools • http://www.cs.man.ac.uk/~schmidt/tools/

  44. The End http://www.cs.tau.ac.il/~yahave

  45. A A A A A A A A A Traces • Linear paths of program execution • Program semantic = set of all program traces • A Kripke-structure is an abstraction of traces A A …

  46. Common Wisdom • Assumption on program behavior = limit the set of traces considered • How? • Algorithmically --- e.g., Streett acceptance • Augmenting LTL property --- verify assumption goal • Disadvantages • assumption may be non-observable under abstraction • Pay more to express an assumed knowledge

  47. Fairness Reduction Program • Advantages • Pay for verification of simplified properties • Simplified properties may be observable under abstraction even when original goal is not Simpler claims Modular Decomposition CFGDecomposition Progress Reduction GoalProperty Assumptions

More Related