+ <template>\r
+ <name>RedCar</name>\r
+ <parameter>const id_c id, int[0,5] x</parameter>\r
+ <declaration>void register() {
+ grid[x][3] = true;
+ grid[x+1][3] = true;
+}</declaration>\r
+ <location id="id8" x="51" y="-59">\r
+ </location>\r
+ <location id="id9" x="-93" y="-68">\r
+ </location>\r
+ <location id="id10" x="-204" y="-68">\r
+ <urgent/>\r
+ </location>\r
+ <init ref="id10"/>\r
+ <transition>\r
+ <source ref="id8"/>\r
+ <target ref="id8"/>\r
+ <label kind="guard" x="-7" y="-42">x > 0 && grid[x-1][3]</label>\r
+ <label kind="synchronisation" x="-7" y="-25">leftRed!</label>\r
+ <label kind="assignment" x="-7" y="-8">x := x-1, grid[x+1][3] := false, grid[x-1][3] := true</label>\r
+ <nail x="-25" y="42"/>\r
+ <nail x="178" y="51"/>\r
+ </transition>\r
+ <transition>\r
+ <source ref="id8"/>\r
+ <target ref="id8"/>\r
+ <label kind="guard" x="1" y="-135">x+2 < 6 && grid[x+2][3]</label>\r
+ <label kind="synchronisation" x="1" y="-118">rightRed!</label>\r
+ <label kind="assignment" x="1" y="-101">x := x+1, grid[x][3] := false, grid[x+2][3] := true</label>\r
+ <nail x="-17" y="-144"/>\r
+ <nail x="144" y="-136"/>\r
+ </transition>\r
+ <transition>\r
+ <source ref="id9"/>\r
+ <target ref="id8"/>\r
+ <label kind="synchronisation" x="-75" y="-80">start?</label>\r
+ </transition>\r
+ <transition>\r
+ <source ref="id10"/>\r
+ <target ref="id9"/>\r
+ <label kind="synchronisation" x="-186" y="-85">reg!</label>\r
+ <label kind="assignment" x="-186" y="-68">register()</label>\r
+ </transition>\r
+ </template>\r