1 / 37

Translating from LTL to automata Book: Chapter 6

Translating from LTL to automata Book: Chapter 6. Why translating?. Want to write the specification in some logic. Want model-checking tools to be able to check the specification automatically. Preprocessing. Convert into normal form, where negation only applies to propositional variables.

Download Presentation

Translating from LTL to automata Book: Chapter 6

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. Translating from LTL to automataBook: Chapter 6

  2. Why translating? • Want to write the specification in some logic. • Want model-checking tools to be able to check the specification automatically.

  3. Preprocessing • Convert into normal form, where negation only applies to propositional variables. • ¬ð becomes }¬. • ¬} becomes ð ¬. • What about ¬ ( U )? • Define operator R (Release) such that¬ (  U ) = (¬) R (¬), ¬ (  R ) = (¬) U (¬).

  4. ¬p ¬p ¬p ¬p p ¬p ¬p ¬p ¬p p q q q q q q q q q Semantics of p R q p R q: Almost like q W p, but not exactly:

  5. 1.Convert to Negation Normal Form • Replace ¬T by F, and ¬F by T. • Replace ¬ (Ç) by (¬) Æ (¬) and¬ (Æ) by (¬) Ç (¬)

  6. 2. Eliminate !, }, ð • Replace ! by (¬) Ç. • Replace } by (T U). • Replace ð by (F R).

  7. Example • Translate ( ð} P ) ! ( ð} Q ) • Eliminate implication ¬( ð} P ) Ç ( ð} Q ) • Eliminate ð, } :¬( F R ( T U P ) ) Ç ( F R ( T U Q ) ) • Push negation inwards:(T U (F R¬ P ) ) Ç ( F R ( T U Q ) )

  8. Incoming New Old Next The data structure Incoming = Set of nodes with an edge to this node Name

  9. The main idea •  U  = Ç ( Æ O (  U  ) ) •  R  = Æ ( Ç O (  R  ) ) This separates the formulas to two parts: • One holds in the current state, and • The other in the next state.

  10. How to translate? • Take one formula from “New” and add it to “Old”. • According to the formula, either • Split the current node into two, or • Evolve the node into a new version.

  11. Incoming New Old Next Incoming Incoming New Old New Old Next Next Splitting Copy incoming edges, update other field.

  12. Incoming New Old Next Incoming New Old Next Evolving Copy incoming edges, update other field.

  13. Possible cases: •  U  , split: • Add  to New, add  U  to Next. • Add  to New. Because  U  = Ç ( Æ O ( U  )). •  R  , split: • Add  to New. • Add  to New,  R  to Next. Because  R  = Æ ( Ç O ( R  )).

  14. More cases: • Ç, split: • Add  to New. • Add  to New. • Æ, evolve: • Add  to New. • O , evolve: • Add  to Next.

  15. Example } p T p p Old: {} New: {TU p} Next: {} (TU p) Old: {TU p} New: {T} Next: {TU p} Old:{TU p} New:{} Next:{TU p} Old: {TU p} New: {p} Next: {} Old:{TU p, p} New:{} Next:{} Old:{} New:{} Next:{} Old:{TU p} Next:{TU p} Old:{TU p, p} Next:{} Old:{} Next:{}

  16. How to start? init Incoming New Old aU(bUc) Next

  17. Incoming Incoming a aU(bUc) bUc aU(bUc) aU(bUc) New Old init Incoming Next New Old aU(bUc) Next Keep track of nodes evolving from original formula (init) init init

  18. New Old Incoming Next bUc aU(bUc) init init init Incoming Incoming aU(bUc),bUc aU(bUc), bUc b c (bUc)

  19. When to stop splitting? • When “New” is empty. • Then compare against a list of existing nodes “Nodes”: • If a node with the same “Old”, “Next” exists,just add the incoming edges of the new versionto the old one. • Otherwise, add the node to “Nodes”. Generate a successor with “New” set to “Next” of father.

  20. New Old init Next Incoming Incoming aU(bUc) a,aU(bUc) Creating a successor node. aU(bUc)

  21. Incoming New Old Next How to obtain the automaton? Node X • There is an edge from node X to Y if X is in the incoming list of Y • Initial node is init. a, b, ¬c Node Y

  22. Old: aU(bUc) New:a Next: aU(bUc) Old: aU(bUc) New:(bUc) Next: Old: aU(bUc),a New: Next: aU(bUc) Old: aU(bUc),(bUc) New:b Next:(bUc) Old: aU(bUc),(bUc) New:c Next: 1 Old: aU(bUc),(bUc),c New: Next: 3 Old: aU(bUc),(bUc),b New: Next:(bUc) 2 Old: New: aU(bUc) Next:

  23. Old: aU(bUc),a New: Next: aU(bUc) Old: aU(bUc),(bUc),b New: Next:(bUc) Old: aU(bUc),(bUc),c New: Next: 3 1 2 Old: New: aU(bUc) Next: Old: New: bUc Next: Old: New: Next: 6 Old: bUc New: b Next: bUc Old: bUc New: c Next: If we continue here, we re-create nodes 1,2,3. So ‘1’ will be added to the ‘incoming’ list of 1,2,3. Old: bUc,b New: Next: bUc Old: bUc,c New: Next: If we continue here, we re-create nodes 4,5. So ‘4’ will be added to the ‘incoming’ list of 4,5. 5 4

  24. The resulting nodes. a, aU(bUc) b, bUc, aU(bUc) c, bUc, aU(bUc) b, bUc c, bUc Initial states: All nodes with incoming edge from “init”.

  25. A S0 S1 B A B Reminder: Buchi automata • A=<, S, , I, F> • : Alphabet (finite). • S: States (finite). • : S x  x S ) S is the transition relation. • I µ S are the Initial states. • F µ S is a set of accepting states. • An infinite word is accepted in A if it passes an infinite no. of times in at least one of the F states

  26. Generalized Buchi automata • A=<, S, , I, F> • : Alphabet (finite). • S: States (finite). • : S x  x S ) S is the transition relation. • I µ S are the Initial states. • F µ 2S is a set of sets of accepting states. • An infinite word is accepted in A if it passes an infinite no. of times in at least one state in element of F A S0 S1 B A B F1 = {S0} F2 = {S0,S1}

  27. Accepting states • Generalized Büchi automaton • Multiple accepting sets, one for each Untilsub-formula ( U ) such that • The Oldfield contains  or • The Oldfield doesn’t contain  U 

  28. Accepting w.r.t. bUc a, aU(bUc) b, bUc, aU(bUc) c, bUc, aU(bUc) b, bUc c, bUc All nodes with c in their past (Old), or without (commitment for) bUc in their past.

  29. Acceptance w.r.t. aU(bUc) a, aU(bUc) b, bUc, aU(bUc) c, bUc, aU(bUc) b, bUc c, bUc All nodes with bUc in their past, or without aU(bUc) in their past.

  30. Acceptance w.r.t. aU(bUc) a b c b c bUc aU(bUc) Accepting sets:

  31. De-generalization of GBA • Turn a generalized Büchi automaton into a Büchi automaton • Consider as many copies of the automaton as the number of accepting sets • Replace incoming edges from accepting states with edges to the nextcopy • Each cycle must go through every copy • Each cycle must contain accepting states from each accepting set

  32. Example F a  F b T a b a b 2 1 T T 1,2 1,2 correspond to F1 and F2, the accepting sets

  33. Example T T a b a b a b T T T T

  34. Example T T a b a b a b T T T T

  35. Example T T a b a b a T T T

  36. Example T a b a T T T

  37. T a b a T T T Example

More Related