14 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CONSTRAINTMANAGER_H
15 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CONSTRAINTMANAGER_H
19 #include "llvm/Support/SaveAndRestore.h"
42 return Val.hasValue() && Val.getValue();
47 return Val.hasValue() && !Val.getValue();
52 return Val.hasValue();
58 return !Val.hasValue();
86 assert(
assume(State, Cond,
false) &&
"System is over constrained.");
104 const llvm::APSInt &From,
105 const llvm::APSInt &To,
110 const llvm::APSInt &To) {
147 const char *sep) = 0;
180 std::unique_ptr<ConstraintManager>
virtual ProgramStateRef assume(ProgramStateRef state, DefinedSVal Cond, bool Assumption)=0
bool isConstrainedFalse() const
Return true if the constraint is perfectly constrained to 'false'.
std::unique_ptr< ConstraintManager > CreateRangeConstraintManager(ProgramStateManager &statemgr, SubEngine *subengine)
virtual void EndPath(ProgramStateRef state)
virtual ConditionTruthVal checkNull(ProgramStateRef State, SymbolRef Sym)
Returns whether or not a symbol is known to be null ("true"), known to be non-null ("false")...
virtual ~ConstraintManager()
ConditionTruthVal isNull(ProgramStateRef State, SymbolRef Sym)
Convenience method to query the state to see if a symbol is null or not null, or if neither assumptio...
i32 captured_struct **param SharedsTy A type which contains references the shared variables *param Shareds Context with the list of shared variables from the p *TaskFunction *param Data Additional data for task generation like final * state
bool NotifyAssumeClients
A flag to indicate that clients should be notified of assumptions.
virtual ProgramStateRef assumeWithinInclusiveRange(ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, const llvm::APSInt &To, bool InBound)=0
virtual ProgramStatePair assumeWithinInclusiveRangeDual(ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, const llvm::APSInt &To)
virtual void print(ProgramStateRef state, raw_ostream &Out, const char *nl, const char *sep)=0
ProgramStatePair assumeDual(ProgramStateRef State, DefinedSVal Cond)
Returns a pair of states (StTrue, StFalse) where the given condition is assumed to be true or false...
virtual ProgramStateRef removeDeadBindings(ProgramStateRef state, SymbolReaper &SymReaper)=0
std::pair< ProgramStateRef, ProgramStateRef > ProgramStatePair
SVal - This represents a symbolic expression, which can be either an L-value or an R-value...
A class responsible for cleaning up unused symbols.
virtual bool canReasonAbout(SVal X) const =0
canReasonAbout - Not all ConstraintManagers can accurately reason about all SVal values.
ConditionTruthVal(bool constraint)
Construct a ConditionTruthVal indicating the constraint is constrained to either true or false...
bool isConstrainedTrue() const
Return true if the constraint is perfectly constrained to 'true'.
ConditionTruthVal()
Construct a ConstraintVal indicating the constraint is underconstrained.
bool isUnderconstrained() const
Return true if the constrained is underconstrained and we do not know if the constraint is true of va...
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
bool isConstrained() const
Return true if the constrained is perfectly constrained.
virtual const llvm::APSInt * getSymVal(ProgramStateRef state, SymbolRef sym) const
If a symbol is perfectly constrained to a constant, attempt to return the concrete value...