Logic: Lecture 22, 12 November 2015 ----------------------------------- View a finite word as encoding a sequence of states rather than a sequence of actions. Example: Peterson's algorithm and mutual exclusion - Fix a set of atomic propositions AP - In each state, some subset of propositions are true - For an atomic proposition a, P_a is the subset of positions where a is true - P_a, P_b, ... no longer partition the set of position, unlike the word interpretation - Or, choose Sigma = 2^AP, in which case each letter describes a state valuation - Note: can absorb the transition label into the target state of each transition, so there is no loss of expressiveness MSO can now be used to reason about computational systems: Simplest case: Finite state automata, each state is labelled by a subset of AP Path through automaton is a sequence of states Example assertions In every execution (Linear time) Temporal Logic (LTL) Syntax : X, F, G, U System : (S,sin,->,v) S = states, sin = initial state -> = transition relation (direct edges between states) v : S -> 2^AP is valuation function Semantics : sigma = s0 s1 ... sn is a run of the sytem - i.e. s0 s1 ... sn is a path in the underlying dircted graph starting at s0 = sin sigma,i |= phi, i is a position in {0,2,...,n} Define sigma,i |= phi by induction on phi sigma,i |= p in AP iff p in v(si) sigma,i |= ~phi iff not(sigma,i |= phi) sigma,i |= phi or psi iff sigma,i |= phi or sigma,i |= psi sigma,i |= X phi iff i < n and sigma,i+1 |= phi sigma,i |= F phi iff for some i <= j <= n, sigma,j |= phi sigma,i |= G phi iff for every i <= j <= n, sigma,j |= phi sigma,i |= phi U psi iff for some i <= j <= n, sigma,j |= psi and for every i <= k < j, sigma,k |= phi Examples : Every p followed by q G (p -> Fq) If a request is made, it remains valid till it is granted. G (r -> r U g) X, U can express X, F, G, U F phi <=> true U phi G phi <=> ~F ~phi ======================================================================