Presentation is loading. Please wait.

Presentation is loading. Please wait.

First case study: Modal Logic

Similar presentations


Presentation on theme: "First case study: Modal Logic"— Presentation transcript:

1 First case study: Modal Logic
Will exemplify the main ideas of the course: Decidability of a logic on general structures via showing the tree model property and then applying decidability of logics on trees More efficient decidability via translation to automata

2 Modal logic Modal logic (ML) has a signature with one binary relation R(x,y) and unary relations A1… An Formulas Ai(x) are in modal logic. Modal formulas are closed under boolean operations: if ½1 and ½2 are in Modal Logic, then so are ½1(x) Æ ½2(x), ½1(x) Ç ½2(x), : ½1(x). If Á(x) is a modal formula, then so are 8 y R(x,y)! Á(y) usually abbreviated □Á 9 y R(x,y)Æ Á(y) usually abbreviated ¦Á

3 Examples of ML formulas
Artist(x)Æ :Criminal(x) 8y R(x,y)! Person(y) Artist(x)Æ 9y R(x,y)Æ Artist(y) 8y R(x,y)! False

4 What do we mean by a tree model for ML?
Models for modal logic are Kripke structures: consisting of a set of elements a binary relation R a labelling of each element with a subset of A An A Kripke structure is a tree model if R forms a tree in the usual sense: it is connected and acyclic, each node has at most one predecessor, and exactly one node has no predecessor

5 Goal: tree model property
Theorem: For any formula of modal logic ½(x) if ½ is satisfied in some model, then it is satisfied at the root of some tree model.

6 Tree model property for ML
Proposition: for every structure M over binary relation R and unary relations A1.... An, and for every x 2 M, there is a structure M’ and x’2M’ such that R is interpreted in M’ by a tree rooted at x’ and every modal formula true of x in M is true of x’in M’. This structure Unravel(M,x) is called the unravelling of M at x. ... ...

7 Tree model property for ML
Given M and x0 2 M that satisfies Á we have defined the unravelling U of M at x0. Let x’0 be its root. We want to show that x’0 satisfies Á in U. More generally we will show: (Unravel(M,x0), x’0) agrees with (M, x0) on all modal formulas We will proceed in two steps: Show (Unravel(M,x0), x’0) is equivalent to (M, x0) up to a certain equivalence relation called bisimulation. Show that this equivalence relation preserves truth of ML formulas.

8 Bisimulation Given two Kripke Structures M and M’ a bisimulation between M and M’ is a mapping B relating elements of M with elements of M’ such that whenever B(x,x’) holds: (Partial Isomorphism) x satisfies the same unary predicates in M as x’ does in M’ (Back) For every y with R(x,y) in M, there is y’with R(x’,y’) in M’ with B(y,y’) (Forth) For every y’ with R(x’,y’) in M’, there is y with R(x,y) in M with B(y,y’) We say (M,x) and (M’,x’) are bisimilar if there is a bisimulation relating x and x’.

9 Bisimulation as a game Bisimulation game between players Spoiler and Duplicator: Positions of the game are pairs (x,x’) with x2M x’2M’. (Partial Iso.) If x and x’ disagree on a unary predicate, Spoiler wins. (Back) Spoiler can play y2 M with R(x,y), and Duplicator must respond with y’2M’ s.t. R(x’,y’). If Duplicator cannot respond, she loses; if she responds with y, play continues from (y, y’). (Forth) Spoiler can play y’2 M with R(x’,y’) in M’, and Duplicator must respond with y2 M s.t. R(x’,y’). If Duplicator cannot respond, she loses; if she responds with y’, then play continues from (y, y’). Duplicator wins if she can play forever or if Spoiler cannot play. (M,x) and (M’,x’)are bisimilar if and only if there is a winning strategy for Duplicator starting from (x, x’).

10 A model and its unravelling are bisimilar
... ...

11 Bisimulation and ML If (M,x0) and (M’,x’0) are bisimilar, then for each ML formula Á(x), (M,x0)² Á if and only if (M’,x’0)² Á Induction on formula construction. We can assume we do not have 8, since we can eliminate it using : and 9 . Base case of Ai(x) holds since bisimulation preserves labels. Æ, Ç, : induction steps are obvious

12 Bisimulation and ML If (M,x0) and (M’,x’0) are bisimilar, then for each ML formula Á(x), (M,x0)² Á if and only if (M’,x’0)² Á Suppose (M,x0)² 9 y R(x,y)Æ Á’ and there is a bisimulation B from (M,x0) to (M’,x’0). There is y0 such that R(x0,y0) and (M,y0)² Á’ Now by (back) there is y’0 such that R(x’0,y’0) and B(y0,y’0). Now by induction (M’,y’0)² Á’ so y’0 witnesses (M’,x’0)² 9y R(x,y)Æ Á’

13 Bisimulation and ML If (M,x0) and (M’,x’0) are bisimilar, then for each ML formula Á(x), (M,x0)² Á if and only if (M’,x’0)² Á Suppose (M,x0)² 8 y [R(x,y)!Á’] and there is a bisimulation B from (M,x0) to (M’,x’0). Suppose there is y0 such that R(x’0,y’0) and (M’,y’0)² : Á’. Now by (forth) there is y0 such that R(x0,y0) and B(y0,y’0). Now by induction (M,y0)² : Á’ so y0 contradicts (M,x0)² 8 y R(x,y)!Á’

14 Summary: the tree model property for ML
We have shown: For any ML formula Á(x), if it is satisfied in some model then there is a tree model T such that T, root(T) ² Á Refinement: For any ML formula Á(x), if it is satisfied in some model then there is a finite r-ranked tree model T such T, root(T) ² Á where r is polynomial in the size of Á

15 Decidability of logics on trees
A tree is a connected graph in which there are no cycles, every node has at most one predecessor. An !-tree is a tree in which every node has finitely many ancestors and countably many children. Consider the following tree satisfiability problem for a logic L: given an L sentence Á over the vocabulary with a binary relation symbol R and unary relations A1 ...An. Decide whether Á holds in some model where R is an !-tree. Theorem (Rabin) The tree satisfiability problem for FO is decidable.

16 Putting it all together
We have shown: For any ML formula Á(x), if it is satisfied in some model then there is a !-tree model T such T, root(T) ² Á Theorem (Rabin): The tree satisfiability problem is decidable. Theorem: The satisfiability problem for ML is decidable.

17 Recall: our plan Decidability of a logic on general structures via showing the tree model property and then applying decidability of logics on trees More efficient decidability via translation to automata

18 Automata for modal logic
We consider finite labelled ranked ordered trees: labelled: we have a set A1....An of node predicates, and each node is labelled with a subset of the A1.... An ranked: every non-leaf node has r children ordered: the children are numbered first child, second child, etc.

19 Automata on r-ranked ordered finite trees
A tree automaton is given by (Q, S, q0,F, d) where: Q is a finite set of states S is the set of label predicates I Í Q is the set of initial states F Í P(S)£Q is the leaf acceptance condition d : Q £ P(S) → P(Qr) is the transition function

20 Automata on r-ranked ordered finite trees
A tree automaton is given by (Q, S, q0,F, d) where: Q is a finite set of states S is the set of label predicates I Í Q is the set of initial states F Í P(S)£Q is the leaf acceptance condition d : Q £ P(S) → P(Qr) is the transition function An accepting run of an automaton on a tree T is a labelling of each node with a state such that: the initial state is labelled with q in I for each leaf node, if S is the set of predicates holding of the node, and q the state label, then (S,q) is in F if a node is labelled with q, the predicates holding at node are S, and state labels of the children are q1 ... qr then (q1, ... ,qr)2d(q, S)

21 Examples Let S = { P1, P2 } and consider languages of finite binary trees over S. We can construct nondeterministic tree automata for the following languages. L1 = { t : there is exactly one P1 node in t } L2 = { t : below every P1 node in t there is a P2 node }

22 Non-emptiness testing
The language L(A) of a tree automaton A is a the set of trees accepted by A. Theorem (Thatcher & Wright): There is a PTIME algorithm that decides whether L(A) is non-empty.

23 New goal Given an ML formula Á(x), we want to construct an automaton AÁ such that AÁ accepts exactly the labelled r-ranked trees t such that t, r ² Á where r is the root of t

24 Negation normal form Informal idea: a state of our automaton for Á is a set of subformulas of Á; node is in state S says subformulas hold at node include those in S. To help with the automaton construction, we first convert the formulas into a normal form. We use negation normal form (NNF), where negation only occurs on atoms. We can easily obtain this form by pushing negations inside using De Morgan’s laws. Given Á in NNF, let cl(Á) be the set of subformulas of Á (with some fresh c substituted for any free variables).

25 Nondeterministic automata for ML
Let 𝜙 be a formula in modal logic in NNF. Then define A𝜙 as follows. Q includes a state q for every consistent subset of cl(Á): q does not contain both P(c) and ¬P(c) whenever q contains a disjunction, it contains at least one of the disjuncts whenever q contains a conjunction, it contains both conjuncts Q also includes a special non-accepting sink state I consists of sets in Q containing 𝜙 F consists of all pairs (𝜏,q) where q does not contain any formulas starting with an existential quantifier, and {P(c) : P in 𝜏}∪{:P(c) : P in S ∖ 𝜏}∪q is consistent

26 Nondeterministic automata for ML
Let 𝜙 be a formula in modal logic in NNF. Then define A𝜙 as follows. If {P(c) : P in 𝜏}∪{:P(c) : P in S ∖ 𝜏}∪q is not consistent, then 𝛿(q,𝜏):=(False,…,False) where False is a special non-accepting sink state. Otherwise 𝛿(q,𝜏) is the set of all (q1,…,qr) such that if q contains ∃y R(c,y) ∧ 𝜓(y) then some qi contains 𝜓 if q contains ∀y R(c,y) → 𝜓(y) then every qi contains 𝜓

27 Testing satisfiability using automata
Theorem: The satisfiability problem for ML is decidable. Given ML formula Á(x), convert to NNF and construct automaton A𝜙 Test non-emptiness of A𝜙 If L(A𝜙) is non-empty, then output “Satisfiable”; otherwise output “Unsatisfiable” Since the size of A𝜙 is exponential in the size of Á(x) this gives an EXPTIME upper bound (this can be improved to PSPACE).

28 Summary A key property of ML is that we can restrict to tree structures: For any ML formula Á(x), if it is satisfied in some model then there is a !-tree model T such T, root(T) ² Á Since satisfiability of FO is decidable on !-trees, this implies decidability of satisfiability for ML. More efficient decidability can be obtained by compiling Á(x) into a finite tree automaton and testing non-emptiness.


Download ppt "First case study: Modal Logic"

Similar presentations


Ads by Google