Package org.sonar.java.se
Class ProgramState
java.lang.Object
org.sonar.java.se.ProgramState
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classThis class is used to keep on stack symbolic value together with symbol which was used to evaluate this value. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddConstraint(SymbolicValue symbolicValue, Constraint constraint) addConstraints(SymbolicValue symbolicValue, ConstraintsByDomain constraintsForSV) addConstraintTransitively(SymbolicValue symbolicValue, Constraint constraint) booleancanReach(SymbolicValue symbolicValue) cleanupConstraints(Collection<SymbolicValue> protectedSymbolicValues) cleanupDeadSymbols(Set<Symbol> liveVariables, Collection<SymbolicValue> protectedSymbolicValues) intbooleanboolean<T extends Constraint>
TgetConstraint(SymbolicValue sv, Class<T> domain) getValue(int index) getValuesWithConstraints(Constraint constraint) inthashCode()static booleanintnumberOfTimeVisited(ProgramPoint programPoint) peekValue(int i) peekValues(int n) peekValuesAndSymbols(int n) put(Symbol symbol, SymbolicValue value) To be used only by the ExplodedGraphWalker only, when manipulating program states.removeConstraintsOnDomain(SymbolicValue sv, Class<? extends Constraint> domain) stackValue(SymbolicValue sv, Symbol symbol) voidvoidstoreExitValue(SymbolicValue exitSymbolicValue) toString()unstackValue(int nbElements) visitedPoint(ProgramPoint programPoint, int nbOfVisit)
-
Field Details
-
EMPTY_STATE
-
-
Method Details
-
withEntryException
-
getEntryException
-
stackValue
-
stackValue
-
unstackValue
-
peekValue
-
peekValueSymbol
-
peekValue
-
peekValues
-
peekValuesAndSymbols
-
numberOfTimeVisited
-
equals
-
hashCode
public int hashCode() -
toString
-
addConstraintTransitively
-
knownRelations
-
addConstraint
-
addConstraints
public ProgramState addConstraints(SymbolicValue symbolicValue, ConstraintsByDomain constraintsForSV) -
removeConstraintsOnDomain
-
put
To be used only by the ExplodedGraphWalker only, when manipulating program states. Only made 'public' because of some method yield tests. -
cleanupDeadSymbols
public ProgramState cleanupDeadSymbols(Set<Symbol> liveVariables, Collection<SymbolicValue> protectedSymbolicValues) -
cleanupConstraints
-
isField
-
canReach
-
visitedPoint
-
getConstraints
-
getConstraint
-
constraintsSize
public int constraintsSize() -
getValue
-
getValue
-
getValuesWithConstraints
-
storeExitValue
public void storeExitValue() -
storeExitValue
-
exitValue
-
exitingOnRuntimeException
public boolean exitingOnRuntimeException()
-