public interface ProgramState extends Cloneable, LabelledProgramState, State
INVALID_STATE_SPACE_ID| Modifier and Type | Method and Description |
|---|---|
ProgramState |
clone() |
void |
flagAsContinueState() |
ConcreteValue |
getConstant(String constantName)
Gets the requested constant
|
StateSpace |
getContainingStateSpace() |
HeapConfiguration |
getHeap() |
int |
getProgramCounter() |
ConcreteValue |
getSelectorTarget(ConcreteValue from,
SelectorLabel selectorLabel)
Gets the target of the given selector starting at a given object on the heap.
|
ConcreteValue |
getUndefined()
Gets an undefined value.
|
ConcreteValue |
getVariableTarget(String variableName)
Gets the target of the variable in the current scopes.
|
ConcreteValue |
insertNewElement(Type type)
Adds a new element on the heap to the executable and returns it.
|
boolean |
isContinueState()
determines whether this state is just about to be continued (partial state space)
This is a necessary information to merge duplicate applications of previously known contracts
|
boolean |
isFromTopLevelStateSpace()
determines whether this state is part of the top level statespace
(and not of the state space of a method call)
|
ProgramState |
prepareHeap()
Adds all required constants if not yet present,
converts variables from the semantics format to the
format used inside the heap, etc.
|
ConcreteValue |
removeIntermediate(String name)
Removes an intermediate (in the current scopes) from the executable.
|
void |
removeVariable(String variableName)
Removes the variable (in the current scopes) from the executable.
|
void |
setContainingStateSpace(StateSpace containingStateSpace) |
void |
setIntermediate(String name,
ConcreteValue value)
Sets an intermediate to the given value.
|
void |
setProgramCounter(int pc) |
void |
setSelector(ConcreteValue from,
SelectorLabel selectorLabel,
ConcreteValue to)
(Re)sets the given selector starting at the given object on the heap to a (new) target.
|
void |
setVariable(String variableName,
ConcreteValue value)
Sets the variable of the given name to the given value.
|
ProgramState |
shallowCopy()
Creates a shallow copy of this program state in which the underlying heap configuration
is the same as in the copied object.
|
ProgramState |
shallowCopyUpdatePC(int newPC)
Creates a shallow copy of this program state in which the underlying heap configuration is the same as in the
copied object.
|
ProgramState |
shallowCopyWithUpdateHeap(HeapConfiguration newHeap)
Creates a shallow copy in which the underlying heap is set to newHeap without creating a copy first.
|
int |
size() |
void |
unflagContinueState() |
addAP, getAPs, satisfiesAPgetStateSpaceId, setStateSpaceIdint getProgramCounter()
void setProgramCounter(int pc)
pc - The program location assigned to this state.ProgramState prepareHeap()
HeapConfiguration getHeap()
int size()
ConcreteValue getVariableTarget(String variableName)
variableName - The name of the requested variablevoid removeVariable(String variableName)
variableName - The name of the variable to remove.void setVariable(String variableName, ConcreteValue value)
variableName - the name of the variablevalue - the value (i.e. node) to which the variable should be setConcreteValue getConstant(String constantName)
constantName - The name of the requested constant.ConcreteValue removeIntermediate(String name)
name - The name of the intermediatevoid setIntermediate(String name, ConcreteValue value)
name - The name of the intermediate .value - The ConcreteValue that will should be referenced by the intermediate.ConcreteValue getSelectorTarget(ConcreteValue from, SelectorLabel selectorLabel)
from - The element on the heap whose selectors should be considered.selectorLabel - The label of the selector.void setSelector(ConcreteValue from, SelectorLabel selectorLabel, ConcreteValue to)
from - The element on the heap whose selectors should be considered.selectorLabel - The label of the selector.to - The element on the heap that should be the target of the selector.ConcreteValue insertNewElement(Type type)
type - The type of the new element.ConcreteValue getUndefined()
ProgramState shallowCopy()
ProgramState shallowCopyWithUpdateHeap(HeapConfiguration newHeap)
newHeap - The heap underlying the copy.ProgramState shallowCopyUpdatePC(int newPC)
newPC - The value of the program counter of the copy.ProgramState clone()
boolean isFromTopLevelStateSpace()
StateSpace getContainingStateSpace()
void setContainingStateSpace(StateSpace containingStateSpace)
boolean isContinueState()
void flagAsContinueState()
void unflagContinueState()
Copyright © 2019. All rights reserved.