Franck Pommereau

fixed a bug with MultiArcs + invalid test in plugin gv

...@@ -2435,12 +2435,12 @@ class Transition (Node) : ...@@ -2435,12 +2435,12 @@ class Transition (Node) :
2435 if input : 2435 if input :
2436 for place, label in self.input() : 2436 for place, label in self.input() :
2437 try : 2437 try :
2438 - place.check(v.value for v in iterate(label.bind(binding))) 2438 + place.check(v for v in iterate(label.flow(binding)))
2439 except ValueError : 2439 except ValueError :
2440 return False 2440 return False
2441 for place, label in self.output() : 2441 for place, label in self.output() :
2442 try : 2442 try :
2443 - place.check(v.value for v in iterate(label.bind(binding))) 2443 + place.check(v for v in iterate(label.flow(binding)))
2444 except ValueError : 2444 except ValueError :
2445 return False 2445 return False
2446 return True 2446 return True
......
...@@ -22,6 +22,11 @@ GraphViz; we can also draw the state graph: ...@@ -22,6 +22,11 @@ GraphViz; we can also draw the state graph:
22 22
23 >>> for engine in ('neato', 'dot', 'circo', 'twopi', 'fdp') : 23 >>> for engine in ('neato', 'dot', 'circo', 'twopi', 'fdp') :
24 ... n.draw(',test-gv-%s.png' % engine, engine=engine) 24 ... n.draw(',test-gv-%s.png' % engine, engine=engine)
25 +Graph(...)
26 +Graph(...)
27 +Graph(...)
28 +Graph(...)
29 +Graph(...)
25 >>> s = StateGraph(n) 30 >>> s = StateGraph(n)
26 >>> s.build() 31 >>> s.build()
27 >>> s.draw(',test-gv-graph.png') 32 >>> s.draw(',test-gv-graph.png')
...@@ -204,6 +209,7 @@ def extend (module) : ...@@ -204,6 +209,7 @@ def extend (module) :
204 ... attr['label'] = '%s\\n%s' % (trans.name, trans.guard) 209 ... attr['label'] = '%s\\n%s' % (trans.name, trans.guard)
205 >>> n.draw(',net-with-colors.png', 210 >>> n.draw(',net-with-colors.png',
206 ... place_attr=draw_place, trans_attr=draw_transition) 211 ... place_attr=draw_place, trans_attr=draw_transition)
212 + Graph(...)
207 213
208 @param filename: the name of the image file to create 214 @param filename: the name of the image file to create
209 @type filename: `str` 215 @type filename: `str`
......