public class ExpressionStack extends Object
ProgramState has corresponding instance of ExpressionStack.
Note that this class is immutable.| Modifier and Type | Method and Description |
|---|---|
ExpressionStack |
apply(Consumer<Deque<SymbolicValue>> action)
This method allows to perform one or more operations on a copy of the internal stack.
|
static ExpressionStack |
emptyStack() |
boolean |
equals(Object obj) |
ExpressionStack |
execute(ExpressionTree expression,
ProgramStateConstraints constraints)
This method executes expression: it pushes to the stack a new symbolic value based (if required) on popped symbolic values.
|
int |
hashCode() |
boolean |
isEmpty() |
SymbolicValue |
peek() |
SymbolicValue |
peek(int n) |
ExpressionStack |
push(SymbolicValue newValue) |
ExpressionStack |
removeLastValue() |
int |
size() |
String |
toString() |
public static ExpressionStack emptyStack()
public ExpressionStack push(SymbolicValue newValue)
public ExpressionStack execute(ExpressionTree expression, ProgramStateConstraints constraints)
ExpressionStack is an immutable class,
this method will return new resulting instance of ExpressionStack while the calling this method instance will not be changed.expression - to be executedconstraints - ExpressionStackpublic SymbolicValue peek()
public int size()
public boolean isEmpty()
public SymbolicValue peek(int n)
public ExpressionStack removeLastValue()
public ExpressionStack apply(Consumer<Deque<SymbolicValue>> action)
action - the operation to perform on the internal stackCopyright © 2011–2017 SonarSource and Eriks Nukis. All rights reserved.