1 / 42

Downward Closed Language Generators

Downward Closed Language Generators. Parosh Aziz Abdulla Pritha Mahata Aletta Nyl é n. Uppsala University. Outline. Reachability Approaches Downward-closed languages Recognizability of Reachable sets Simple Regular Expressions Downward closed language generators

lavina
Download Presentation

Downward Closed Language Generators

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. Downward Closed Language Generators Parosh Aziz Abdulla Pritha Mahata Aletta Nylén Uppsala University

  2. Outline • Reachability Approaches • Downward-closed languages • Recognizability of Reachable sets • Simple Regular Expressions • Downward closed language generators • Hierarchical dlgs • Timed Petri Net • Ongoing Work

  3. Systems and properties • Transition Systems (Set of states, set of initial states, alphabet, transition rules) • Safety Properties ( Nothing bad will ever happen) Reachability of a bad state in the system Verification of Safety property

  4. Reachability Approaches Post* Bad states Forward Reachability Initial state Pre* Initial states Bad state Backward Reachability Forward Reachability Reachability Analysis Backward Reachability

  5. Reachability Approaches(contd.) Still,Forward Reachabilityis an appealing approach. Why ? • Forward Reachability set is usually not • computable , e.g LCS[CFI96]. • Backward reachability set is sometimes computable, • e.g LCS[AJ96b].

  6. Forward Reachability Set of reachable states of a system – R • (finite state) abstraction Computability of R • Symbolic graph G (V, E) l V = partitions of R wrt some criterion E : v1 v2 iff (e.g control states) l v2 v1

  7. Forward Reachability Set of reachable states of a system – R • (finite state) abstraction Computability of R • Symbolic graph G (V, E) l V = partitions of R wrt some criterion E : v1 v2 iff (e.g control states) l h f v1 v2

  8. Forward Reachability (contd.) Yes, if R is downward-closed [ABJ98] !! G simulates the transition system. If G satisfies a safetyproperty Same result holds for the concrete system. Verification is easier in G. Problem : R is often not computable. But, is R recognizable !

  9. Downward Closed Languages  - finite alphabet - substring relation on * L - a language over * If x L and y x => y L, then L is downward closed. y x - downward closed set x - upward closed set • x • L

  10. Why downward closed languages ? LCS – Channel Language is downward closed. A channel can always lose messages and become empty. Reachability set is downward-closed for LCS . TPN - TPN has monotonicity wrt a preorder on markings. M2 and M1 M3 M1 M2 M4 M4 M3

  11. Why downward closed languages ? B’ B M B’ Timed Petri Net, N Lossy TPN, N’ Set of Bad States, Bad (upward closed) Initial states, I Initial states, I Bad loss M M B’ Ml B Bad M Ml Note : Considering safety properties only, markings can be made downward-closed in TPN. and Ml B

  12. Is R recognizable ? If a language R  A* is downward closed, then R is upward closed. R is characterized by finite set of minimal elements {w1,….,wm}. [Higman] R = w1 U …. U wm R = w1 …. wm U U for each a1,a2,….A, there is i,j such that (A, ) is wqo if i < j and aiaj If (A, ) is wqo, (A*, *) is a wqo. (Higman) Question : Can we find some generator  such that R = L() ?

  13. Is R recognizable ? (contd.) • Answer : We can find some generator  such that R = L() if • for a word w in A*, w = L() and • generators are closed under intersection. • Let A = {a,b,c} and w1 = ab, w2 = bc, • then w1 = A* a A* b A* , w2 = A* b A* c A* and • w1 = (A\a)*(a+)(A\b)* w2 = (A\b)*(b+)(A\c)* • = (b+c)*(a+)(c+a)* = (c+a)*(b+)(a+b)* • e = w1 w2 = c* a* + c* (b + ) b* (a + ) a* + • c* (a + ) (a + c)* a* U Question : Can we find  s such that w1 , w2 , e are expressed by  s ?

  14. Simple Regular Expressions • A product p over M - a concatenation (possibly empty) • (e1• e2••••• en ), where e1,e2,….,en are atomic expressions over M. • Simple regular expression over M - has the form • p1 + p2 + …. + pn , where p1,p2,….,pn are products over M. Generators – simple regular expressions. • M - a finite alphabet. • Atomic expression e over M - a regular expression of the form • (a + )where a  M • (a1 + a2 + …. +am )*, where a1,a2,….,am M

  15. R is recognizable ! w1 = (b+c)*(a+)(c+a)* atomic expressions w2 = (c+a)*(b+)(a+b)* e = c* a* + c* (b + ) b* (a + ) a* + c* (a + ) (a + c)* a* Products of atomic expressions e = sum of products – an SRE

  16. Lossy Channel System c?m Control ( LTS) c!n Channel • M – Finite alphabet of messages • State – (s, w) s - control state, w  M* - channel content • Set of reachable states of LCS is downward closed and can be expressed by SREs.

  17. Well Quasi Ordering Finite sets (A , = ) is wqo, if A is finite, a1,a2, a3,a4,b, a5,a6, a7,a8,b, a9…. Strings w1 = 2 . 3 . 4 w1* w2 * (N*, *) is wqo w2 = 1 . 3 . 2 . 5 . 3 . 7 . 1 . 1 Natural numbers (N , ) is wqo x1,x2……natural numbers, there is i,j such that i < j and xixj

  18. SRE Downward Closed Language Generators (a1 + a2 + …. +am )* s.t a1,a2,….,am M ~B * e.g Let A = N, B = {3} and L(~B) = {0,1,2}* = (L(~B))* * (M, =) , M : finite alphabet A wqo (A, ) (M*, =*) , =* : substring (A*, *) is wqo Atomic expressions : Let B  A. (a + ) s.t a  M ~B : L(~B) = {a | a A and a is not larger or equal to any element of B} e.g Let A = N, B = {3} and L(~B) = {0,1,2} U {}

  19. Downward Closed Language Generators ~  ~  Assume a wqo (A, ) Let B A • Atomic expressions are of the form ~ B or B • L(~ B) = Set of elements in A which are not larger or equal to • any element in B. • L( B) = (L(~ B) )* • A product p over A • L(e1••••• en ) = {w1 ….. wn | w1L (e1), ….. , wnL (en)} • where e1,e2,….,en are atomic expressions over A. • DLG over A – L(p1 + p2 + …. + pn) = L(p1) U ….. U L(pn), • where p1,p2,….,pn are products over A.

  20. DLG Answer : For a downward closed language R, we can find some generator  such that R = L() if for a word w in A*, w = L() and dlgs are closed under intersection. • Let (N, ) be the wqo. and w1 = 2 • 3, w2 = 1 • 2, • then w1 = N* 2 N* 3 N* and w2 = N* 1 N* 2 N* • w1 = {0,1}*(N U {}){0,1,2}* w2 = 0*(N U {}){0,1}* = L( 2) L(~ ø) L( 3) = L( 1) L(~ ø) L( 2) = L( 1 • 2) = L( 2 • 3) ~  ~  ~  ~   ~ ~  ~  ~   2  1

  21. DLG (contd.)  ~  ~  ~ ~  ~  ~   2. R = w1 w2 = {0}* (N U {}){0,1}* + {0}* {0,1, } {0,1}* {0,1, } {0,1}* + {0}* {0, } {0}* {0,1,2, } {0,1}* = L( {1}) L(~ ø) L( {2}) + ……………… + ……………… = L( {1} • ( {2}) ) + L(………………) + L(……………..) = L( {1} • ( {2}) + ……………… + ……………..) 

  22. Bags (A, ) is wqo and is equality. B1, B2 : N N B1 B2 B1B B2 (AB, B) is wqo • Application : Markings of a Petri Net are represented by bags.

  23. Dlg for bags DLGs for bags DLGs for words with operator • both associative and commutative. A bag dlg, - ~{3} ~ {1} * = {0,1,2} 0*  L() 0 0 0 2  L() 1 0 0  L() 0 0 3

  24. String of Bags S1 S2 S1 *S2 ((AB)*, *) is wqo

  25. Dlg for String of Bags A dlg for string of bags, s= ~{bag} ~ {bag} * 32 6 2 3 = ~ ~ * ~ ~ ~4 ~7 ~3 ~4 ~4 ~6 6 Bag dlg = + ~ * + + * * * ~4 ~2 3 Bag dlg* ~ + ~ * + * 0 125 9 2 1 0 5 8 3 e.g 5 3 2 1 16 210 3 3 21 are in language of s.

  26. Dlg for String of Bags(contd.) A = {a,b,c} : a finite alphabet A dlg for string of bags, s= ~ a2 b ~ ~ ~{b,c} ~{b,c} ~b ~{b,c} ~{a,c} ~a {a,b} + ~ * + + Bag dlg = * * c c c c c a b e.g a a a a c c a b a c b b c c c c are in language of s.

  27. Hierarchical DLGs Example : A wqo (A, ) LdcAB is recognizable by a dlg. Bags(A) (AB, B) Atomic expressions are dlgs for bag. Strings of Bags(A) ((AB)*, *) L’dc (AB)* is recognizable by a dlg. • (A, ) is wqo implies (A*, *) is a wqo ( Higman’s Theorem). • If L A* is downward closed, then L is recognizable by some dlg . • We can hierarchically define dlgs over A.

  28. Timed Petri Net P1 P2 2.0 3.0 [1:3] [2:4] Tokens have “ages” : Real numbers. [0:1] [2:5] Conditions on “ages” : Intervals. [4:5] [4:5] [4:5] [1:6] 4.0 0.0 P3 P4 Extended bags of Real Numbers : Mapping from real numbers to natural numbers N U {ω}. B = {4.0, 4.0, 2.0} B(4.0) = 2 MarkingM : A Ebag over (Places x Reals). M(P3,4.0) = 2, M(P1, 2.0) = 1

  29. Timed Transitions T P1 P2 P1 P2 3.0 2.0 3.0 4.0 [1:3] [2:4] [1:3] [2:4] [2:5] [0:1] [2:5] [0:1] Increase of time by 1.0 t t [4:5] [4:5] [4:5] [4:5] [0:0] [0:0] [0:0] [0:0] P3 P4 P3 P4

  30. Discrete Transitions D P1 P2 P1 P2 3.0 2.0 [1:3] [2:4] [1:3] [2:4] Firing t [0:1] [4:5] [0:1] [4:5] t t [4:5] [4:5] [2:5] [2:5] [0:0] [0:0] [0:0] [0:0] 0.0 0.0 P3 P4 P3 P4

  31. Transitions U = D T M2 IfM1 M2 M1 T orM1 M2 D Additionally, there are some lossy transitions in lossy TPN. Remark : A TPN can have unbounded number of tokens !!

  32. Ordering on Marking P2,3.7 P1,2.0 M1 P2,3.5 P4,max P1,2.2 P1,2.0 M2 Increasing fractional parts age >= 5 frac = 0 P1 P2 P1 P2 3.7 2.0 2.2 2.0 3.5 [1:3] [2:4] [1:3] [2:4] [0:1] [4:5] [0:1] [4:5] t t [4:5] [4:5] [2:5] [2:5] [0:0] [0:0] [0:0] [0:0] 4.0 6.2 P3 P4 P3 P4 M1 M2

  33. Regions • Finite no. of clocks (e.g Timed Automata) y 3 Two clocks x,y and cmax = 3 2 1 0 x 1 2 3 0 • Clock values are equivalent in timed automata if they have • same integral parts • same ordering of fractional parts • clock values beyond cmax are equivalent

  34. Regions(Example) • Region R : y • V(x) = 0.6, V(y) = 0.5 • V € R 1 0 x 0 1 Not Powerful for Timed Petri Nets……

  35. Dlgs for LTPN P1 P2 [1:3] [2:4] [0:1] [2:5] • Unboundedness in two directions : • number of tokens • age of tokens [4:5] [4:5] [4:5] [1:5] P3 P4 cmax= 5 Abstraction of ages to express sets of markings : • Tokens with same fractional parts are in the same ebag. • Ordering of ebags is according to the ordering of fractional parts of ages. • Ages of tokens beyond cmax are equivalent.

  36. Dlgs for LTPN Constraints = strings of bags over a finite alphabet of (Places x {0,..max}) Sets of markings and Markings are downward closed for LTPN Constraints are dlgs for strings of bags over a finite set !!!

  37. Universal Regions ! P1 P2 2.0 3.5 3.75 [1:3] [2:4] Note :M can have at most same number of tokens as R. [0:1] [2:5] [4:5] [4:5] [4:5] [1:5] 4.2 P3 P4 frac = 0 Increasing frac age >= 5 * 4* 5 3 2 0 R = If M’ < M, then M’ R 4.2 4.2 2.0 3.5 3.75 M = P1 P2 P2 P3 P4

  38. Universal Regions (contd.) 3 2 Let Universal Region R = T Zero bag dlg Max bag cmax= 5 2 3 4 2 + + P1 P2 4 2 3 4 + + [1:3) [2:4) 3 4 + 3 max + [0:1) [2:5) t [4:5) [4:5) [0:5) [1:3) + 4 max 4 max + max max P3 P4 Generates O((max-1)*2 + sizeof(product) + 1) new regions by timed transition.

  39. Universal Regions (contd.) 3 2 followed by t T x4 5 At most one token in P3 and one token in P4 with ages as follows : 4 3 2 1 0 0 1 2 3 4 5 x3 Lot of universal regions !!! Solution : Universal Zones !!

  40. Acceleration • Compute Post* • Acceleration - a sequence of transitions at each step • Lossy Channel system - accelerate by arbitrary iteration of control loops • Lossy TPN - accelerate by • arbitrary firing of enabled transitions followed by • timed transitions and • combine atomic expressions of the universal regions

  41. Comparison with earlier TPN work • Forward ReachabilityBackward Reachability • Compute Post* Compute Pre* • Markings are downward closed(lossy TPN). Markings are upward closed. • Universal region. Existential region. • Maximal number of tokens in a Minimal number of tokens universal region. in an existential region.

  42. Ongoing Work • Compute Post*(R,t) for all transitions t. • Define universal zones. • Apply forward reachability algorithm.

More Related