public class BasicBlock extends CfgNode implements UseDef
childNode, parentNode
Constructor and Description |
---|
BasicBlock(Assignment assignment)
Constructs object with the specified assignment and of non-concurrent type.
|
BasicBlock(Assignment assignment,
boolean isConcurrent)
Constructs object with the specified assignment and the flag type.
|
BasicBlock(boolean isConcurrent)
Constructs object of the specified type flag.
|
BasicBlock(java.util.List<Assignment> assignments,
boolean isConcurrent)
Constructs object with the specified assignments and the type flag.
|
Modifier and Type | Method and Description |
---|---|
void |
addAssignment(Assignment stmt)
Adds assignment statement.
|
void |
appendAssignments(java.util.List<Assignment> statements)
Appends assignments list to the last assignment of basic block.
|
void |
clearStatements()
Removes all block statements.
|
CfgModelNode |
deepcopy()
Returns a copy of this node.
|
java.util.List<Assignment> |
getAssignments()
Returns all block assignments.
|
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getDefines()
Throws an exception.
|
java.lang.String |
getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
Returns node string description in the format of the specified printer.
|
CfgModelNode |
getOnlyChild()
Returns the only child node.
|
CfgModelNode |
getOnlyParent()
Returns the only parent node.
|
CfgNodeType |
getType()
Returns node type.
|
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getUses()
Throws an exception.
|
boolean |
isConcurrent()
Checks rather object contains only concurrent assignments.
|
void |
setConcurrent(boolean concurrent)
Sets the concurrent flag to the specified value.
|
addChild, addParent, getChildren, getParents, hasChildren, hasParents, removeChild, removeParent
getId
addMetaInfo, addMetaInfo, addMetaInfo, addMetaInfo, getMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo, removeMetaInfo, removeMetaInfo
public BasicBlock(boolean isConcurrent)
isConcurrent
- block type flagpublic BasicBlock(java.util.List<Assignment> assignments, boolean isConcurrent)
assignments
- assignmentsisConcurrent
- block type flagjava.lang.NullPointerException
- when argument is null
.public BasicBlock(Assignment assignment, boolean isConcurrent)
assignment
- assignmentisConcurrent
- block type flagjava.lang.NullPointerException
- when argument is null
.public BasicBlock(Assignment assignment)
assignment
- assignmentpublic void addAssignment(Assignment stmt)
stmt
- assignment to be addedjava.lang.NullPointerException
- when argument is null
.public void appendAssignments(java.util.List<Assignment> statements)
statements
- list of concurrent assignmentsjava.lang.NullPointerException
- when argument is null
.public java.util.List<Assignment> getAssignments()
public void clearStatements()
public boolean isConcurrent()
true
if contains only concurrent assignments,
false
otherwise.public void setConcurrent(boolean concurrent)
concurrent
- concurrent flagpublic CfgModelNode deepcopy()
CfgModelNode
deepcopy
in class CfgModelNode
public java.lang.String getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
CfgModelNode
getDescription
in class CfgNode
printer
- printerpublic CfgNodeType getType()
CfgModelNode
CfgNodeType.NODE
type.getType
in class CfgModelNode
public CfgModelNode getOnlyParent()
CfgModelNode
getOnlyParent
in class CfgModelNode
public CfgModelNode getOnlyChild()
CfgModelNode
getOnlyChild
in class CfgModelNode
public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getUses()
CfgNode
public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getDefines()
CfgNode
getDefines
in interface UseDef
getDefines
in class CfgNode
null