public class CfgModule extends CfgDeclarationStatement
Object contains child CfgProcess
processes and CfgModule
sub-modules.
When object is an instance of another module, it MUST have the instance name
with module name.
NEW_VAR_PREFIX
Constructor and Description |
---|
CfgModule(java.lang.String name)
Constructs object with the specified name.
|
Modifier and Type | Method and Description |
---|---|
void |
add(CfgStatement statement)
Adds the specified statement as child to this object.
|
void |
apply(java.util.Map<java.lang.String,ru.ispras.fortress.expression.Node> bindings)
Applies bindings to this statement.
|
CfgStatement |
deepCopy()
Returns a copy of this statement and all it's sub-statements.
|
java.lang.String |
getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
Returns a string description in the format of the specified printer.
|
java.lang.String |
getFullName()
Returns a full name.
|
java.util.Collection<ru.ispras.fortress.expression.NodeVariable> |
getInputs()
Returns all the variables, that are of input signal type,
or empty collection, if there are no such.
|
java.lang.String |
getInstanceName()
Returns instance name.
|
java.util.Collection<CfgModule> |
getModules()
Returns sub-modules.
|
java.lang.String |
getName()
Returns name.
|
java.util.Collection<ru.ispras.fortress.expression.NodeVariable> |
getOutputs()
Returns all variables that are of output signal type,
or empty collection, if there are no such.
|
java.util.Collection<CfgProcess> |
getProcesses()
Returns processes.
|
CfgStatementType |
getType()
Returns statement type.
|
void |
instantiate(java.lang.String instanceName,
java.util.Map<java.lang.String,ru.ispras.fortress.expression.Node> bindings)
Instantiates this object with the specified name and bindings.
|
void |
removeProcesses()
Remove internal processes.
|
void |
setInstanceName(java.lang.String instanceName)
Sets instance name.
|
void |
setParent(CfgStatement statement)
Sets the specified statement as parent.
|
contains, containsInput, containsOutput, containsRegister, containsVariable, declareNewVariable, declareVariable, declareVariable, declareVariable, declareVariables, getDataType, getDeclaration, getDeclarationMap, getDeclarations, getDefines, getInitialValue, getInputNames, getInvariant, getOutputNames, getRegisterNames, getUses, getVariable, getVariableNames, getVariables, removeDeclaration, setVariablesMapping
add, addAll, contains, containStatements, equals, getDescription, getId, getParent, getStatement, getStatement, getStatementNum, hashCode, hasParent, indexOf, isType, remove, removeAll, removeParent, removeStatement
addMetaInfo, addMetaInfo, addMetaInfo, addMetaInfo, getMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo, removeMetaInfo
public CfgModule(java.lang.String name)
name
- module namejava.lang.IllegalArgumentException
- when argument is null
.public void setInstanceName(java.lang.String instanceName)
instanceName
- name of current instancejava.lang.IllegalArgumentException
- when argument is null
.public java.util.Collection<CfgProcess> getProcesses()
public java.util.Collection<CfgModule> getModules()
public void instantiate(java.lang.String instanceName, java.util.Map<java.lang.String,ru.ispras.fortress.expression.Node> bindings)
instanceName
- instance namebindings
- instance bindingsjava.lang.IllegalArgumentException
- when any of the arguments is null
.public java.lang.String getFullName()
A full name is a combination of name and instance name.
public java.lang.String getName()
public java.lang.String getInstanceName()
public java.util.Collection<ru.ispras.fortress.expression.NodeVariable> getInputs()
public java.util.Collection<ru.ispras.fortress.expression.NodeVariable> getOutputs()
public void removeProcesses()
public void add(CfgStatement statement)
CfgStatement
add
in class CfgStatement
statement
- Statement to be added.public void setParent(CfgStatement statement)
CfgStatement
setParent
in class CfgStatement
statement
- Statement to be set as parent.public java.lang.String getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
Identifiable
printer
- Printer that provides an output string format.public CfgStatementType getType()
CfgStatement
getType
in class CfgStatement
public CfgStatement deepCopy()
CfgStatement
deepCopy
in class CfgStatement
public void apply(java.util.Map<java.lang.String,ru.ispras.fortress.expression.Node> bindings)
CfgStatement
apply
in interface Instantiated
apply
in class CfgStatement
bindings
- Pairs of variable names and bounded expressions.