public final class GaddHlddUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addBlockingNodes(Hldd hldd,
ru.ispras.fortress.expression.NodeVariable blockVar)
Adds the blocking condition to the specified phase variable HLDD.
|
static int |
compareVariablesByName(ru.ispras.fortress.expression.NodeVariable var1,
ru.ispras.fortress.expression.NodeVariable var2)
Compares the specified variable names.
|
static Hldd |
constructBlockingVarHldd(Module module,
ru.ispras.fortress.expression.NodeVariable blockingVariable,
ru.ispras.fortress.expression.NodeVariable phaseVar,
java.util.Map<ModuleProcess,ru.ispras.fortress.expression.NodeVariable> blockingVars)
Constructs the blocking variable HLDD using the specifed parameters.
|
static Hldd |
createGuardHldd(ru.ispras.fortress.expression.Node switchNode,
ru.ispras.fortress.expression.NodeVariable guardVariable)
Constructs a one-node HLDD from the specified switch node and the corresponding guard variable.
|
static int |
getArraySize(ru.ispras.fortress.expression.NodeVariable variable)
Returns the specified array size (for one-dimensional arrays).
|
static ru.ispras.fortress.expression.NodeVariable |
getOriginalVariable(ru.ispras.fortress.expression.NodeVariable variable)
Returns the original variable of the specified version variable.
|
static ru.ispras.fortress.expression.NodeVariable |
getPhaseVariable(Module module,
ModuleProcess process)
Gets the phase variable of the specified process.
|
static int |
getVersionNumber(ru.ispras.fortress.expression.NodeVariable variable)
Returns the version number of the specified variable.
|
static boolean |
isSelect(ru.ispras.fortress.expression.Node node)
Indicates that the specified node is the SELECT operation.
|
static boolean |
isStore(ru.ispras.fortress.expression.Node node)
Indicates that the specified node is the STORE operation.
|
static Hldd |
removeWrongVariableNodes(Hldd newHldd,
ru.ispras.fortress.expression.NodeVariable variable)
Removes all terminal nodes from the specified HLDD which are not associated with
the specified variable.
|
public static ru.ispras.fortress.expression.NodeVariable getPhaseVariable(Module module, ModuleProcess process)
module
- - the specified parent module.process
- - the specified process.null
otherwise.public static Hldd constructBlockingVarHldd(Module module, ru.ispras.fortress.expression.NodeVariable blockingVariable, ru.ispras.fortress.expression.NodeVariable phaseVar, java.util.Map<ModuleProcess,ru.ispras.fortress.expression.NodeVariable> blockingVars)
module
- - the specified parent module.blockingVariable
- - the specifed blocking variable.phaseVar
- - the specified phase variable.blockingVars
- - the specified process blocking variables mapping.Hldd
.public static void addBlockingNodes(Hldd hldd, ru.ispras.fortress.expression.NodeVariable blockVar)
hldd
- - the specified phase variable HLDD.blockVar
- - the specified blocking variable.public static Hldd createGuardHldd(ru.ispras.fortress.expression.Node switchNode, ru.ispras.fortress.expression.NodeVariable guardVariable)
switchNode
- - the specified node.guardVariable
- - the specified guard variable.Hldd
.public static Hldd removeWrongVariableNodes(Hldd newHldd, ru.ispras.fortress.expression.NodeVariable variable)
newHldd
- - the specified HLDD.variable
- - the specified variableHldd
.public static int getArraySize(ru.ispras.fortress.expression.NodeVariable variable)
variable
- - the specified variable.0
otherwise.public static int getVersionNumber(ru.ispras.fortress.expression.NodeVariable variable)
variable
- - the specified variable.-1
otherwise.public static ru.ispras.fortress.expression.NodeVariable getOriginalVariable(ru.ispras.fortress.expression.NodeVariable variable)
variable
- - the specified version variable.NodeVariable
, if possible, null
otherwise.public static boolean isStore(ru.ispras.fortress.expression.Node node)
node
- - the specified node.true
if the specified node represents the STORE operation, false
otherwise.public static boolean isSelect(ru.ispras.fortress.expression.Node node)
node
- - the specified node.true
if the specified node represents the SELECT operation, false
otherwise.public static int compareVariablesByName(ru.ispras.fortress.expression.NodeVariable var1, ru.ispras.fortress.expression.NodeVariable var2)
var1
- - the specified variable.var2
- - the specified variable.