public class VariableDeclaration
extends java.lang.Object
Constructor and Description |
---|
VariableDeclaration(ru.ispras.fortress.expression.Node varExpr)
Constructs a variable declaration object from the specified expression
and
null invariant. |
VariableDeclaration(ru.ispras.fortress.expression.Node varExpr,
ru.ispras.fortress.expression.Node invariant)
Constructs a variable declaration object
from the specified variable/expression and it's invariant.
|
Modifier and Type | Method and Description |
---|---|
ru.ispras.fortress.expression.Node |
getInvariant()
Returns variable invariant.
|
ru.ispras.fortress.expression.Node |
getVarExpression()
Returns the declared variable or it's bound expression.
|
boolean |
hasInvariant()
Checks rather variable also has it's own invariant.
|
public VariableDeclaration(ru.ispras.fortress.expression.Node varExpr)
null
invariant.varExpr
- variable or it's bound expressionjava.lang.NullPointerException
- when argument is null
public VariableDeclaration(ru.ispras.fortress.expression.Node varExpr, ru.ispras.fortress.expression.Node invariant)
varExpr
- variable or it's bound expressioninvariant
- invariantjava.lang.NullPointerException
- when any of the arguments is null
.public ru.ispras.fortress.expression.Node getVarExpression()
public boolean hasInvariant()
true
if there is not-null invariant for this variable,
false
otherwisepublic ru.ispras.fortress.expression.Node getInvariant()