shared objects
play

SHARED OBJECTS 1.1 incr_count 1.1.1 set_count_1 AND 1.1.2 - PowerPoint PPT Presentation

dependability engineering & Petri nets October 2018 dependability engineering & Petri nets October 2018 G ARDENS , HIERARCHY TREE Top 1 turnstile1 SHARED OBJECTS 1.1 incr_count 1.1.1 set_count_1 AND 1.1.2 set_count_2 MUTEX


  1. dependability engineering & Petri nets October 2018 dependability engineering & Petri nets October 2018 G ARDENS , HIERARCHY TREE Top 1 turnstile1 SHARED OBJECTS 1.1 incr_count 1.1.1 set_count_1 AND 1.1.2 set_count_2 MUTEX 1.1.3 set_count_3 - 1.1.4 set_count_4 2 set_count_to_0 BOTANICAL GARDEN 3 turnstile2 3.1 incr_count 3.1.1 set_count_1 3.1.2 set_count_2 3.1.3 set_count_3 3.1.4 set_count_4 4 next_run Y:\Documents\teaching\course-concurrency\skript-sources\nl_skript_fm\nl05_mutex_garden.sld.fm 5 - 1 / 20 monika.heiner@b-tu.de 5 - 2 / 20

  2. dependability engineering & Petri nets October 2018 dependability engineering & Petri nets October 2018 G ARDENS , TOP LEVEL G ARDENS 1. turnstile1 begin 2. set_count_to_0 process_begin1 cobegin turnstile1 cobegin T1_loop co_loop1 process_begin1 process_begin2 loop1 (2) 1. turnstile1 3. turnstile2 begin_for end_for process_end1 process_end2 T1_in_loop process_end1 1.1. incr_count coend write 4. next_run write end pnt: ORD HOM NBM PUR CSV SCF CON SC Ft0 tF0 Fp0 pF0 MG SM FC EFC ES N Y N N N N Y Y N N N N N N N N N DTP CPI CTI B SB REV DSt BSt DTr DCF L LV L&S ? Y Y Y Y N N ? Y N N N N cnt: ORD HOM NBM PUR CSV SCF CON SC Ft0 tF0 Fp0 pF0 MG SM FC EFC ES N Y N N N N Y Y N N N N N N N N N DTP CPI CTI B SB REV DSt BSt DTr DCF L LV L&S WL CL ? Y Y Y Y N N ? Y N N N N N Y monika.heiner@b-tu.de 5 - 3 / 20 monika.heiner@b-tu.de 5 - 4 / 20

  3. dependability engineering & Petri nets October 2018 dependability engineering & Petri nets October 2018 G ARDENS G ARDENS T1_read_4F count_4 1.1.1. set_count_1 1.1. incr_count T1_fact fact T1_set_1 1.1.4. set_count_4 T1_read_3 count_3 T1_set_4 count_0 count_1 count_2 count_3 count_4 T1_read_2 count_2 T1_set_3 1.1.3. set_count_3 count_1 count_1 count_1 count_1 count_1 T1_read_1 count_1 T1_set_2 1.1.2. set_count_2 T1_loop T1_read_0 count_0 T1_set_1 T1_in_loop 1.1.1. set_count_1 T1_loop monika.heiner@b-tu.de 5 - 5 / 20 monika.heiner@b-tu.de 5 - 6 / 20

  4. dependability engineering & Petri nets October 2018 dependability engineering & Petri nets October 2018 G ARDENS 1 4. next_run end next_run reset_loop1 reset_loop2 (2) (2) loop1 loop2 loop2_set loop1_set begin AND THEN THERE WAS COLOUR monika.heiner@b-tu.de 5 - 7 / 20 monika.heiner@b-tu.de 5 - 8 / 20

  5. dependability engineering & Petri nets October 2018 dependability engineering & Petri nets October 2018 C OLOUR , C OLOUR , B OOLEAN OPERATIONS CONTROL FLOW swap swap swap 1`T 1`F 1`F Boolean x x x Boolean Boolean +x +x +x A B C A 1`false B 1`false C 1`false Boolean Boolean Boolean not_fun(a) not_fun(a) not_fun(a) a 1`false a a C Boolean z notB notC 1`false notA 1`false Dot Dot B B Boolean y y Boolean x x A 1`false A 1`false A := B A := B and C Boolean Boolean y y&z in Dot Dot 1`T 1`F dot 1`F Boolean Boolean Boolean A B p3 C Dot dot b c a 1`false 1`false 1`false 1`false or_fun(b,c) Boolean Boolean assign Boolean Boolean Dot A := B or C Dot A A A A dot 1`false 1`false if_A if_AandB B B Boolean x Boolean T F x p4 y y Dot [!(x&y)] [x&y] then else then else dot Dot Dot out endif endif monika.heiner@b-tu.de 5 - 9 / 20 monika.heiner@b-tu.de 5 - 10 / 20

  6. dependability engineering & Petri nets October 2018 dependability engineering & Petri nets October 2018 C OLOUR C OLOUR dot 2`dot papaya p_salat pre_p_salat dot [y=t1]2`p++ 3`dot dot [y=t2]1`p++ bananas 4 fruit_salat [y=t2]3`b++ prep_fruit_salat 2`dot [y=t2]2`m++ dot dot [y=t3]1`m mango mango_salat prep_mango_salat Edibles 8 edibles preps 4`b++ [y=t1]1`ps++ 1`ps 2`p 2`m++ [y=t2]1`fs++ pre_p_salat 2`p [y=t3]1`ms p++ Fruits Salats 1`fs 3`b++ fruits salat 8 2`m it should be possible to combine equal guards. prep_fruit_salat 4`b++ 2`m++ m 1`ms 2`p prep_mango_salat [y=t1]2`p++ [y=t2](1`p++ 3`b++ 2`m)++ 1`ps [y=t3]1`m pre_p_salat 2`p p++ 3`b++ Edibles Edibles 8 2`m edibles prep_fruit_salat edibles 8 preps 1`fs 4`b++ [y=t1]1`ps++ 4`b++ 2`m++ m [y=t2]1`fs++ 2`m++ 2`p [y=t3]1`ms prep_mango_salat 2`p 1`ms monika.heiner@b-tu.de 5 - 11 / 20 monika.heiner@b-tu.de 5 - 12 / 20

  7. dependability engineering & Petri nets October 2018 dependability engineering & Petri nets October 2018 C OLOURED GARDEN C OLOURED GARDEN Dot 1`dot begin Dot set_count_to_0 process_begin1 Dot cobegin turnstile1 cobegin T1_loop Dot Dot Dot 1`2 Loop process_begin2 process_begin1 loop1 x-1 0 turnstile2 x turnstile1 T1_end_for [x<>0] 0 T1_begin_for process_end1 process_end2 Dot Dot Dot Dot T1_in_loop coend incr_count process_end1 Dot write write next_run end Dot monika.heiner@b-tu.de 5 - 13 / 20 monika.heiner@b-tu.de 5 - 14 / 20

  8. dependability engineering & Petri nets October 2018 dependability engineering & Petri nets October 2018 C OLOURED GARDEN C OLOURED GARDEN Dot Dot begin T1_in_loop 1`dot 1`0 x Count T1_read x x 1`0 count Count x set_0 count 0 Count T1_set x y 1`0 Count Dot T1_incr count x+1 cobegin Dot T1_loop monika.heiner@b-tu.de 5 - 15 / 20 monika.heiner@b-tu.de 5 - 16 / 20

  9. dependability engineering & Petri nets October 2018 dependability engineering & Petri nets October 2018 C OLOURED GARDEN COLOURED NETS , OBSERVATIONS ❑ coloured Petri nets may serve as a short-hand notation for place/transition Petri nets Dot ❑ a coloured place has (like a program variable) end -> a name next_run1 -> a colour set = data type = set of values (colours) Dot Dot reset_loop1 ❑ reset_loop2 any token on a given place has a specific colour of the place‘s colour set i i Loop Loop loop2 loop1 ❑ a coloured place contains generally reset_loop2 reset_loop1 2 1`2 2 1`2 a multiset (bug) of coloured tokens Dot Dot loop2_set loop1_set ❑ the arc inscriptions consist of next_run2 -> constants Dot -> “formal sums” of coloured tokens begin -> variables 1`dot -> functions . . . or a combination of all those ❑ arc inscriptions’s readability = net readability ! monika.heiner@b-tu.de 5 - 17 / 20 monika.heiner@b-tu.de 5 - 18 / 20

  10. dependability engineering & Petri nets October 2018 dependability engineering & Petri nets October 2018 COLOURED COLOURED PETRI NETS , PETRI NETS , SUMMARY ANALYSIS ❑ by unfolding ❑ information-preserving transformation -> reuse of all P/T net analysis techniques folding -> symmetrically reduced rg coloured Petrinetz Petrinetz ❑ without unfolding Petri net Petri net -> reachability graph (CPN - occurrence graph) unfolding -> invariants (tools ?) -> CTL model checking (tools ?) ❑ folding needs user interaction ❑ -> partitions of transition set and place set dedicated notion of liveness: collectively live transitions -> all transition colours of ❑ trivial transformation: a given coloured transition only one colour (black colour) guarantee together the liveness -> no structure compression -> very useful for control flow models -->> garden example ❑ any Petri net may be transformed into -->> mutex examples -> all structure information in arc inscriptions monika.heiner@b-tu.de 5 - 19 / 20 monika.heiner@b-tu.de 5 - 20 / 20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend