Program

class Program(rule_sequences: Dict[str, RuleSequence], entry_point: str)

A Program acts as a map of RuleSequence objects keyed by their labels.

Defines __iter__, __contains__, __getitem__, and __setitem__ to operate on the dict of rule sequences provided.

Parameters:
  • rule_sequences – The rule sequences of the program.

  • entry_point – The label of the sequence to run first when applied to a Shape by ShapeMachine.

Methods