public class CfgSwitchSequenceBackend extends CfgEmptyVisitor
The HDL parser backend that optimises sequences of CfgModel
model
CfgSwitchStatement
nodes. A sequence may include nested switch statements or sequential
switch statements. Collapsed switch nodes must have conditions of the following
form: x == const_1 || ... || x == const_n
, and the same x
variable must be used
in every statement of the sequence to be transformed. Related CfgCaseStatement
statements
should be mutually exclusive.
ModelVisitor.Status
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME
The backend name.
|
Constructor and Description |
---|
CfgSwitchSequenceBackend() |
Modifier and Type | Method and Description |
---|---|
void |
onProcessBegin(ModuleProcess process)
Starts visiting
ModuleProcess node. |
void |
onProcessEnd(ModuleProcess process)
Finishes visiting
ModuleProcess node. |
void |
onSwitchBegin(CfgSwitchStatement switchStmt)
Starts visiting
CfgSwitchStatement node. |
onAssertBegin, onAssertEnd, onBlockBegin, onBlockEnd, onCaseBegin, onCaseEnd, onLoopBegin, onLoopEnd, onSwitchEnd, onWaitBegin, onWaitEnd
getStatus, onModelBegin, onModelEnd, onModuleBegin, onModuleEnd, onRootBegin, onRootEnd, onStatementBegin, onStatementEnd
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getStatus, onModelBegin, onModelEnd, onModuleBegin, onModuleEnd, onRootBegin, onRootEnd, onStatementBegin, onStatementEnd
public static final java.lang.String NAME
public void onProcessBegin(ModuleProcess process)
ModelVisitor
ModuleProcess
node.onProcessBegin
in interface ModelVisitor
onProcessBegin
in class ModelEmptyVisitor
process
- Process node to be visited.public void onProcessEnd(ModuleProcess process)
ModelVisitor
ModuleProcess
node.onProcessEnd
in interface ModelVisitor
onProcessEnd
in class ModelEmptyVisitor
process
- Process node to be visited.public void onSwitchBegin(CfgSwitchStatement switchStmt)
CfgVisitor
CfgSwitchStatement
node.onSwitchBegin
in interface CfgVisitor
onSwitchBegin
in class CfgEmptyVisitor
switchStmt
- Switch statement to be visited.