40 likes | 106 Views
RTS Development by the formal approach Assignment #1. Ex. 1 : Given E={ p , q , r }, let =2 E . Express the behaviors over that satisfy the following properties by proper -regular expressions. 1. initial p is followed by q at the next step: [p] [q] [/{p}]
E N D
RTS Development by the formal approach Assignment #1 Ex. 1: Given E={p,q,r}, let =2E. Express the behaviors over that satisfy the following properties by proper -regular expressions. 1. initial p is followed by q at the next step: [p][q] [/{p}] 2. p and q never occursimultaneously: [/{p,q}] 3. p cannot occur before q : [/{p,q}]*[q] [/{q}] 4. poccurs at every step (strictly) between qandnextr: ([/{q}]*[q][p/{r}]*[r]) -- infinite occurrences ([/{q}]*[q][p/{r}]*[r])*([/{q}]*[q])1[/{r}] ([/{q}]*[q][p/{r}]*[r])*[/[q]] -- finite occurrences possibly r here
Ex. 2: Prove that L(), the set of all models of an LTL formula , is an -regular language. • By induction on the structure of • tt: Lω(tt) = Σω • p: Lω(p) = {Σω | p0} = [p]Σω • , where Lω() is ω-regular: • Lω() = {Σω | |=} • = Lω()c -- closure under complementation • , where Lω(), Lω() are ω-regular: • Lω(v ) = {Σω | |= or |=} • = {Σω | |=} U {Σω | |=} = Lω() U Lω(C) • -- closure under union
O, where Lω() is ω-regular: • Lω(O) = {Σω | |=O} • = {Σω | 1|=} = ΣLω() - by construction/definition • U, where Lω(), Lω() are ω-regular: • Lω(U) = {Σω | |= U} • = {Σω |∃k0 s.t. ∀0≤j<k j|= and k|=} • = Lω() U (Lω() ∩ (Σ1Lω()) • U (Lω() ∩ Σ1Lω() ∩ Σ2Lω()) U … • = Uk≥0 ((Σ0Lω() ∩ Σ1Lω() ∩… ∩ Σk-1Lω() ∩ ΣkLω()) • = Uk≥0 (∩0≤j≤k-1ΣjLω()∩ΣkLω()) • -- closure under union and intersection.
Ex. 3 Prove that qis semantically equivalent to (q) (namely: qiff (q) ). q iff iiq -- (semantics of q) iff iiq -- (semantics of q) iff i(iq) -- (semantics of ) iff i(iq) -- (semantics of , ) iff i(iq) -- (semantics of ) iff (q) -- (semantics of ) iff (q) -- (semantics of (q))