Constructor and Description |
---|
RangedVariable(ru.ispras.fortress.expression.NodeVariable variable)
Constructs object with the specified variable.
|
RangedVariable(ru.ispras.fortress.expression.NodeVariable variable,
java.util.List<ru.ispras.fortress.expression.Node> indices)
Creates object with the specified variable and it's range.
|
RangedVariable(ru.ispras.fortress.expression.NodeVariable variable,
Range range)
Constructs object with the specified variable and it's range.
|
RangedVariable(ru.ispras.fortress.expression.NodeVariable var,
Range range,
java.util.List<ru.ispras.fortress.expression.Node> indices)
Creates object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
addIndex(ru.ispras.fortress.expression.Node index)
Add the specified node as index for this object.
|
RangedVariable |
deepCopy()
Creates a deep copy of the current object.
|
boolean |
equals(java.lang.Object obj) |
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getDefines()
Returns a set of defined variables.
|
java.util.List<ru.ispras.fortress.expression.Node> |
getIndices()
Returns the sequence of object's indices.
|
IntegerRange |
getIntegerRange()
Returns the integer range of this object.
|
Range |
getRange()
Returns range.
|
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getUses()
Returns a set of used variables.
|
ru.ispras.fortress.expression.NodeVariable |
getVariable()
Returns variable.
|
java.lang.String |
getVariableName()
Returns variable name.
|
int |
hashCode() |
boolean |
indexed()
Checks whether this object has indices.
|
boolean |
ranged()
Checks whether this object has sub-range.
|
void |
setIndices(java.util.List<ru.ispras.fortress.expression.Node> indices)
Sets new sequence on indices.
|
void |
setRange(ru.ispras.fortress.expression.Node low,
ru.ispras.fortress.expression.Node high)
Sets new range from the pair of the specified nodes.
|
void |
setRange(Range range)
Sets new range.
|
ru.ispras.fortress.expression.Node |
toNode()
Returns the syntax node that is equivalent to this object.
|
java.lang.String |
toString() |
public RangedVariable(ru.ispras.fortress.expression.NodeVariable variable)
variable
- The target variable.java.lang.IllegalArgumentException
- when argument is null
.public RangedVariable(ru.ispras.fortress.expression.NodeVariable variable, Range range)
The ranged variable MUST have either bit vector data type or map data type.
variable
- The target variable.range
- The variable's sub-range.java.lang.IllegalArgumentException
- when any of the arguments is null
;public RangedVariable(ru.ispras.fortress.expression.NodeVariable variable, java.util.List<ru.ispras.fortress.expression.Node> indices)
The indexed variable MUST be of map data type.
variable
- The target variable.indices
- The list of indices describing the variable's element.java.lang.IllegalArgumentException
- when any of the arguments is null
;public RangedVariable(ru.ispras.fortress.expression.NodeVariable var, Range range, java.util.List<ru.ispras.fortress.expression.Node> indices)
var
- The target variable.range
- The variable sub-range (for bit-vectors and bit-vector arrays).indices
- The variable element indices (for arrays).public RangedVariable deepCopy()
public ru.ispras.fortress.expression.NodeVariable getVariable()
public java.lang.String getVariableName()
public Range getRange()
public IntegerRange getIntegerRange()
public java.util.List<ru.ispras.fortress.expression.Node> getIndices()
public void setRange(Range range)
range
- Range to be set.java.lang.IllegalArgumentException
- when argument is null
;public void setRange(ru.ispras.fortress.expression.Node low, ru.ispras.fortress.expression.Node high)
low
- The low border node.high
- The high border node.public void setIndices(java.util.List<ru.ispras.fortress.expression.Node> indices)
indices
- The sequence of indices.java.lang.IllegalArgumentException
- in the following situations:
(1) when any argument is null
;
(2) when this object's variable is not of
DataMap
data types;public void addIndex(ru.ispras.fortress.expression.Node index)
index
- The index.java.lang.IllegalArgumentException
- in the following situations:
(1) when any argument is null
;
(2) when this object's variable is not of
DataMap
data types;public boolean ranged()
true
if this contains non-null
range, false
otherwise.public boolean indexed()
true
if this object has indices, false
otherwise.public ru.ispras.fortress.expression.Node toNode()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getUses()
UseDef
public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getDefines()
UseDef
getDefines
in interface UseDef