- def rewrite(self):
- """
- Rewrite critical structures.
- Call rewrite on all sub elements.
- """
- Element.rewrite(self)
- for elem in self.get_elements(): elem.rewrite()
-
- def validate(self):
- """
- Validate the flow graph.
- Validate only the blocks.
- Connections will be validated within the blocks.
- """
- Element.validate(self)
- for c in self.get_blocks():
- c.validate()
- if not c.is_valid():
- self.add_error_message('Element "%s" is not valid.'%c)
-