Package org.sonar.java.se
Class ProgramState
- java.lang.Object
-
- org.sonar.java.se.ProgramState
-
public class ProgramState extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProgramState.Pop
static class
ProgramState.SymbolicValueSymbol
This class is used to keep on stack symbolic value together with symbol which was used to evaluate this value.
-
Field Summary
Fields Modifier and Type Field Description static ProgramState
EMPTY_STATE
-
Method Summary
-
-
-
Field Detail
-
EMPTY_STATE
public static final ProgramState EMPTY_STATE
-
-
Method Detail
-
stackValue
public ProgramState stackValue(SymbolicValue sv)
-
stackValue
public ProgramState stackValue(SymbolicValue sv, @Nullable Symbol symbol)
-
unstackValue
public ProgramState.Pop unstackValue(int nbElements)
-
peekValue
@CheckForNull public SymbolicValue peekValue()
-
peekValueSymbol
public ProgramState.SymbolicValueSymbol peekValueSymbol()
-
peekValue
public SymbolicValue peekValue(int i)
-
peekValues
public List<SymbolicValue> peekValues(int n)
-
peekValuesAndSymbols
public List<ProgramState.SymbolicValueSymbol> peekValuesAndSymbols(int n)
-
numberOfTimeVisited
public int numberOfTimeVisited(ProgramPoint programPoint)
-
addConstraintTransitively
public ProgramState addConstraintTransitively(SymbolicValue symbolicValue, Constraint constraint)
-
knownRelations
public Set<RelationalSymbolicValue> knownRelations()
-
addConstraint
public ProgramState addConstraint(SymbolicValue symbolicValue, Constraint constraint)
-
addConstraints
public ProgramState addConstraints(SymbolicValue symbolicValue, ConstraintsByDomain constraintsForSV)
-
removeConstraintsOnDomain
public ProgramState removeConstraintsOnDomain(SymbolicValue sv, Class<? extends Constraint> domain)
-
put
public ProgramState put(int index, SymbolicValue value)
-
put
public ProgramState put(Symbol symbol, SymbolicValue value)
-
cleanupDeadSymbols
public ProgramState cleanupDeadSymbols(Set<Symbol> liveVariables, Collection<SymbolicValue> protectedSymbolicValues)
-
cleanupConstraints
public ProgramState cleanupConstraints(Collection<SymbolicValue> protectedSymbolicValues)
-
isField
public static boolean isField(Symbol symbol)
-
canReach
public boolean canReach(SymbolicValue symbolicValue)
-
visitedPoint
public ProgramState visitedPoint(ProgramPoint programPoint, int nbOfVisit)
-
getConstraints
@Nullable public ConstraintsByDomain getConstraints(SymbolicValue sv)
-
getConstraint
@CheckForNull public <T extends Constraint> T getConstraint(SymbolicValue sv, Class<T> domain)
-
constraintsSize
public int constraintsSize()
-
getValue
@CheckForNull public SymbolicValue getValue(int index)
-
getValue
@CheckForNull public SymbolicValue getValue(Symbol symbol)
-
getValuesWithConstraints
public List<SymbolicValue> getValuesWithConstraints(Constraint constraint)
-
storeExitValue
public void storeExitValue()
-
exitValue
@CheckForNull public SymbolicValue exitValue()
-
exitingOnRuntimeException
public boolean exitingOnRuntimeException()
-
-