TimeloopFE
|
Base class for all processors, which are used to modify the specification before it is passed to Accelergy/Timeloop. More...
Public Member Functions | |
__init__ (self, Optional["Specification"] spec=None) | |
pre_parse_process (self, "Specification" spec) | |
Process the specification before parsing. | |
process (self, "Specification" spec) | |
Process the specification. | |
declare_attrs (self) | |
Initialize the attributes that the processor is responsible for. | |
get_index (self, type processor_type, "Specification" spec) | |
Get the index of the processor in the list of processors. | |
must_run_after (self, type other, "Specification" spec, bool ok_if_not_found=False) | |
Ensure that this processor runs after another processor. | |
add_attr (self, Node target, *args, **kwargs) | |
Public Attributes | |
logger = logging.getLogger(self.__class__.__name__) | |
spec = spec | |
Protected Attributes | |
bool | _initialized = True |
Base class for all processors, which are used to modify the specification before it is passed to Accelergy/Timeloop.
Attributes: spec: The specification to process. logger: The logger for this processor.
timeloopfe.common.processor.Processor.__init__ | ( | self, | |
Optional["Specification"] | spec = None ) |
Reimplemented in timeloopfe.common.processor.References2CopiesProcessor, timeloopfe.common.processor.SimpleProcessor, timeloopfe.v4.processors.constraint_attacher.ConstraintAttacherProcessor, timeloopfe.v4.processors.constraint_macro.ConstraintMacroProcessor, timeloopfe.v4.processors.enable_dummy_table.EnableDummyTableProcessor, timeloopfe.v4.processors.permutation_optimizer.PermutationOptimizerProcessor, timeloopfe.v4.processors.required_actions.RequiredActionsProcessor, timeloopfe.v4.processors.sparse_opt_attacher.SparseOptAttacherProcessor, and timeloopfe.v4.processors.to_diagram_processor.ToDiagramProcessor.
timeloopfe.common.processor.Processor.add_attr | ( | self, | |
Node | target, | ||
* | args, | ||
** | kwargs ) |
timeloopfe.common.processor.Processor.declare_attrs | ( | self | ) |
Initialize the attributes that the processor is responsible for.
!
Reimplemented in timeloopfe.common.processor.SimpleProcessor, timeloopfe.v4.processors.constraint_attacher.ConstraintAttacherProcessor, and timeloopfe.v4.processors.constraint_macro.ConstraintMacroProcessor.
timeloopfe.common.processor.Processor.get_index | ( | self, | |
type | processor_type, | ||
"Specification" | spec ) |
Get the index of the processor in the list of processors.
timeloopfe.common.processor.Processor.must_run_after | ( | self, | |
type | other, | ||
"Specification" | spec, | ||
bool | ok_if_not_found = False ) |
Ensure that this processor runs after another processor.
!
other | The processor that this processor must run after. |
!
ok_if_not_found | If False, OK if the other processor is not found. If True, raise an exception if the other processor is not found. |
timeloopfe.common.processor.Processor.pre_parse_process | ( | self, | |
"Specification" | spec ) |
Process the specification before parsing.
timeloopfe.common.processor.Processor.process | ( | self, | |
"Specification" | spec ) |
Process the specification.
Reimplemented in timeloopfe.common.processor.References2CopiesProcessor, timeloopfe.common.processor.SimpleProcessor, timeloopfe.v4.processors.constraint_attacher.ConstraintAttacherProcessor, timeloopfe.v4.processors.constraint_macro.ConstraintMacroProcessor, timeloopfe.v4.processors.dataspace2branch.Dataspace2BranchProcessor, timeloopfe.v4.processors.enable_dummy_table.EnableDummyTableProcessor, timeloopfe.v4.processors.permutation_optimizer.PermutationOptimizerProcessor, timeloopfe.v4.processors.required_actions.RequiredActionsProcessor, timeloopfe.v4.processors.sparse_opt_attacher.SparseOptAttacherProcessor, and timeloopfe.v4.processors.to_diagram_processor.ToDiagramProcessor.
|
protected |
timeloopfe.common.processor.Processor.logger = logging.getLogger(self.__class__.__name__) |
timeloopfe.common.processor.Processor.spec = spec |