clang  7.0.0
Public Member Functions | List of all members
clang::ento::SMTSolver Class Referenceabstract

Generic base class for SMT Solvers. More...

#include "clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h"

Public Member Functions

 SMTSolver ()=default
 
virtual ~SMTSolver ()=default
 
LLVM_DUMP_METHOD void dump () const
 
SMTSortRef getFloatSort (unsigned BitWidth)
 
SMTSortRef mkSort (const QualType &Ty, unsigned BitWidth)
 
SMTExprRef fromUnOp (const UnaryOperator::Opcode Op, const SMTExprRef &Exp)
 Constructs an SMTExprRef from an unary operator. More...
 
SMTExprRef fromFloatUnOp (const UnaryOperator::Opcode Op, const SMTExprRef &Exp)
 Constructs an SMTExprRef from a floating-point unary operator. More...
 
SMTExprRef fromNBinOp (const BinaryOperator::Opcode Op, const std::vector< SMTExprRef > &ASTs)
 Construct an SMTExprRef from a n-ary binary operator. More...
 
SMTExprRef fromBinOp (const SMTExprRef &LHS, const BinaryOperator::Opcode Op, const SMTExprRef &RHS, bool isSigned)
 Construct an SMTExprRef from a binary operator. More...
 
SMTExprRef fromFloatSpecialBinOp (const SMTExprRef &LHS, const BinaryOperator::Opcode Op, const llvm::APFloat::fltCategory &RHS)
 Construct an SMTExprRef from a special floating-point binary operator. More...
 
SMTExprRef fromFloatBinOp (const SMTExprRef &LHS, const BinaryOperator::Opcode Op, const SMTExprRef &RHS)
 Construct an SMTExprRef from a floating-point binary operator. More...
 
SMTExprRef fromCast (const SMTExprRef &Exp, QualType ToTy, uint64_t ToBitWidth, QualType FromTy, uint64_t FromBitWidth)
 Construct an SMTExprRef from a QualType FromTy to a QualType ToTy, and their bit widths. More...
 
llvm::APSInt castAPSInt (const llvm::APSInt &V, QualType ToTy, uint64_t ToWidth, QualType FromTy, uint64_t FromWidth)
 
SMTExprRef getExpr (ASTContext &Ctx, SymbolRef Sym, QualType *RetTy=nullptr, bool *hasComparison=nullptr)
 
SMTExprRef getZeroExpr (ASTContext &Ctx, const SMTExprRef &Exp, QualType Ty, bool Assumption)
 
SMTExprRef getSymExpr (ASTContext &Ctx, SymbolRef Sym, QualType *RetTy, bool *hasComparison)
 
SMTExprRef getCastExpr (ASTContext &Ctx, const SMTExprRef &Exp, QualType FromTy, QualType ToTy)
 
SMTExprRef getSymBinExpr (ASTContext &Ctx, const BinarySymExpr *BSE, bool *hasComparison, QualType *RetTy)
 
SMTExprRef getBinExpr (ASTContext &Ctx, const SMTExprRef &LHS, QualType LTy, BinaryOperator::Opcode Op, const SMTExprRef &RHS, QualType RTy, QualType *RetTy)
 
SMTExprRef getRangeExpr (ASTContext &Ctx, SymbolRef Sym, const llvm::APSInt &From, const llvm::APSInt &To, bool InRange)
 
QualType getAPSIntType (ASTContext &Ctx, const llvm::APSInt &Int)
 
std::pair< llvm::APSInt, QualTypefixAPSInt (ASTContext &Ctx, const llvm::APSInt &Int)
 
void doTypeConversion (ASTContext &Ctx, SMTExprRef &LHS, SMTExprRef &RHS, QualType &LTy, QualType &RTy)
 
template<typename T , T(SMTSolver::*)(const T &, QualType, uint64_t, QualType, uint64_t) doCast>
void doIntTypeConversion (ASTContext &Ctx, T &LHS, QualType &LTy, T &RHS, QualType &RTy)
 
template<typename T , T(SMTSolver::*)(const T &, QualType, uint64_t, QualType, uint64_t) doCast>
void doFloatTypeConversion (ASTContext &Ctx, T &LHS, QualType &LTy, T &RHS, QualType &RTy)
 
virtual SMTSortRef getBoolSort ()=0
 
virtual SMTSortRef getBitvectorSort (const unsigned BitWidth)=0
 
virtual SMTSortRef getFloat16Sort ()=0
 
virtual SMTSortRef getFloat32Sort ()=0
 
virtual SMTSortRef getFloat64Sort ()=0
 
virtual SMTSortRef getFloat128Sort ()=0
 
virtual SMTSortRef getSort (const SMTExprRef &AST)=0
 
virtual SMTExprRef newExprRef (const SMTExpr &E) const =0
 
virtual void addConstraint (const SMTExprRef &Exp) const =0
 Given a constraint, adds it to the solver. More...
 
virtual SMTExprRef mkBVAdd (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector addition operation. More...
 
virtual SMTExprRef mkBVSub (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector subtraction operation. More...
 
virtual SMTExprRef mkBVMul (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector multiplication operation. More...
 
virtual SMTExprRef mkBVSRem (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector signed modulus operation. More...
 
virtual SMTExprRef mkBVURem (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector unsigned modulus operation. More...
 
virtual SMTExprRef mkBVSDiv (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector signed division operation. More...
 
virtual SMTExprRef mkBVUDiv (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector unsigned division operation. More...
 
virtual SMTExprRef mkBVShl (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector logical shift left operation. More...
 
virtual SMTExprRef mkBVAshr (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector arithmetic shift right operation. More...
 
virtual SMTExprRef mkBVLshr (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector logical shift right operation. More...
 
virtual SMTExprRef mkBVNeg (const SMTExprRef &Exp)=0
 Creates a bitvector negation operation. More...
 
virtual SMTExprRef mkBVNot (const SMTExprRef &Exp)=0
 Creates a bitvector not operation. More...
 
virtual SMTExprRef mkBVXor (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector xor operation. More...
 
virtual SMTExprRef mkBVOr (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector or operation. More...
 
virtual SMTExprRef mkBVAnd (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector and operation. More...
 
virtual SMTExprRef mkBVUlt (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector unsigned less-than operation. More...
 
virtual SMTExprRef mkBVSlt (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector signed less-than operation. More...
 
virtual SMTExprRef mkBVUgt (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector unsigned greater-than operation. More...
 
virtual SMTExprRef mkBVSgt (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector signed greater-than operation. More...
 
virtual SMTExprRef mkBVUle (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector unsigned less-equal-than operation. More...
 
virtual SMTExprRef mkBVSle (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector signed less-equal-than operation. More...
 
virtual SMTExprRef mkBVUge (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector unsigned greater-equal-than operation. More...
 
virtual SMTExprRef mkBVSge (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector signed greater-equal-than operation. More...
 
virtual SMTExprRef mkNot (const SMTExprRef &Exp)=0
 Creates a boolean not operation. More...
 
virtual SMTExprRef mkEqual (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a boolean equality operation. More...
 
virtual SMTExprRef mkAnd (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a boolean and operation. More...
 
virtual SMTExprRef mkOr (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a boolean or operation. More...
 
virtual SMTExprRef mkIte (const SMTExprRef &Cond, const SMTExprRef &T, const SMTExprRef &F)=0
 Creates a boolean ite operation. More...
 
virtual SMTExprRef mkBVSignExt (unsigned i, const SMTExprRef &Exp)=0
 Creates a bitvector sign extension operation. More...
 
virtual SMTExprRef mkBVZeroExt (unsigned i, const SMTExprRef &Exp)=0
 Creates a bitvector zero extension operation. More...
 
virtual SMTExprRef mkBVExtract (unsigned High, unsigned Low, const SMTExprRef &Exp)=0
 Creates a bitvector extract operation. More...
 
virtual SMTExprRef mkBVConcat (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a bitvector concat operation. More...
 
virtual SMTExprRef mkFPNeg (const SMTExprRef &Exp)=0
 Creates a floating-point negation operation. More...
 
virtual SMTExprRef mkFPIsInfinite (const SMTExprRef &Exp)=0
 Creates a floating-point isInfinite operation. More...
 
virtual SMTExprRef mkFPIsNaN (const SMTExprRef &Exp)=0
 Creates a floating-point isNaN operation. More...
 
virtual SMTExprRef mkFPIsNormal (const SMTExprRef &Exp)=0
 Creates a floating-point isNormal operation. More...
 
virtual SMTExprRef mkFPIsZero (const SMTExprRef &Exp)=0
 Creates a floating-point isZero operation. More...
 
virtual SMTExprRef mkFPMul (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a floating-point multiplication operation. More...
 
virtual SMTExprRef mkFPDiv (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a floating-point division operation. More...
 
virtual SMTExprRef mkFPRem (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a floating-point remainder operation. More...
 
virtual SMTExprRef mkFPAdd (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a floating-point addition operation. More...
 
virtual SMTExprRef mkFPSub (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a floating-point subtraction operation. More...
 
virtual SMTExprRef mkFPLt (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a floating-point less-than operation. More...
 
virtual SMTExprRef mkFPGt (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a floating-point greater-than operation. More...
 
virtual SMTExprRef mkFPLe (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a floating-point less-than-or-equal operation. More...
 
virtual SMTExprRef mkFPGe (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a floating-point greater-than-or-equal operation. More...
 
virtual SMTExprRef mkFPEqual (const SMTExprRef &LHS, const SMTExprRef &RHS)=0
 Creates a floating-point equality operation. More...
 
virtual SMTExprRef mkFPtoFP (const SMTExprRef &From, const SMTSortRef &To)=0
 Creates a floating-point conversion from floatint-point to floating-point operation. More...
 
virtual SMTExprRef mkFPtoSBV (const SMTExprRef &From, const SMTSortRef &To)=0
 Creates a floating-point conversion from floatint-point to signed bitvector operation. More...
 
virtual SMTExprRef mkFPtoUBV (const SMTExprRef &From, const SMTSortRef &To)=0
 Creates a floating-point conversion from floatint-point to unsigned bitvector operation. More...
 
virtual SMTExprRef mkSBVtoFP (const SMTExprRef &From, unsigned ToWidth)=0
 Creates a floating-point conversion from signed bitvector to floatint-point operation. More...
 
virtual SMTExprRef mkUBVtoFP (const SMTExprRef &From, unsigned ToWidth)=0
 Creates a floating-point conversion from unsigned bitvector to floatint-point operation. More...
 
virtual SMTExprRef mkSymbol (const char *Name, SMTSortRef Sort)=0
 Creates a new symbol, given a name and a sort. More...
 
virtual SMTExprRef getFloatRoundingMode ()=0
 
virtual llvm::APSInt getBitvector (const SMTExprRef &Exp, unsigned BitWidth, bool isUnsigned)=0
 
virtual bool getBoolean (const SMTExprRef &Exp)=0
 
virtual SMTExprRef mkBoolean (const bool b)=0
 Constructs an SMTExprRef from a boolean. More...
 
virtual SMTExprRef mkFloat (const llvm::APFloat Float)=0
 Constructs an SMTExprRef from a finite APFloat. More...
 
virtual SMTExprRef mkBitvector (const llvm::APSInt Int, unsigned BitWidth)=0
 Constructs an SMTExprRef from an APSInt and its bit width. More...
 
virtual bool getInterpretation (const SMTExprRef &Exp, llvm::APSInt &Int)=0
 Given an expression, extract the value of this operand in the model. More...
 
virtual bool getInterpretation (const SMTExprRef &Exp, llvm::APFloat &Float)=0
 Given an expression extract the value of this operand in the model. More...
 
virtual SMTExprRef fromBoolean (const bool Bool)=0
 Construct an SMTExprRef value from a boolean. More...
 
virtual SMTExprRef fromAPFloat (const llvm::APFloat &Float)=0
 Construct an SMTExprRef value from a finite APFloat. More...
 
virtual SMTExprRef fromAPSInt (const llvm::APSInt &Int)=0
 Construct an SMTExprRef value from an APSInt. More...
 
virtual SMTExprRef fromInt (const char *Int, uint64_t BitWidth)=0
 Construct an SMTExprRef value from an integer. More...
 
virtual SMTExprRef fromData (const SymbolID ID, const QualType &Ty, uint64_t BitWidth)=0
 Construct an SMTExprRef from a SymbolData. More...
 
virtual ConditionTruthVal check () const =0
 Check if the constraints are satisfiable. More...
 
virtual void push ()=0
 Push the current solver state. More...
 
virtual void pop (unsigned NumStates=1)=0
 Pop the previous solver state. More...
 
virtual void reset () const =0
 Reset the solver and remove all constraints. More...
 
virtual void print (raw_ostream &OS) const =0
 

Detailed Description

Generic base class for SMT Solvers.

This class is responsible for wrapping all sorts and expression generation, through the mk* methods. It also provides methods to create SMT expressions straight from clang's AST, through the from* methods.

Definition at line 33 of file SMTSolver.h.

Constructor & Destructor Documentation

◆ SMTSolver()

clang::ento::SMTSolver::SMTSolver ( )
default

◆ ~SMTSolver()

virtual clang::ento::SMTSolver::~SMTSolver ( )
virtualdefault

Member Function Documentation

◆ addConstraint()

virtual void clang::ento::SMTSolver::addConstraint ( const SMTExprRef Exp) const
pure virtual

Given a constraint, adds it to the solver.

◆ castAPSInt()

llvm::APSInt clang::ento::SMTSolver::castAPSInt ( const llvm::APSInt &  V,
QualType  ToTy,
uint64_t  ToWidth,
QualType  FromTy,
uint64_t  FromWidth 
)
inline

◆ check()

virtual ConditionTruthVal clang::ento::SMTSolver::check ( ) const
pure virtual

Check if the constraints are satisfiable.

◆ doFloatTypeConversion()

template<typename T , T(SMTSolver::*)(const T &, QualType, uint64_t, QualType, uint64_t) doCast>
void clang::ento::SMTSolver::doFloatTypeConversion ( ASTContext Ctx,
T &  LHS,
QualType LTy,
T &  RHS,
QualType RTy 
)
inline

◆ doIntTypeConversion()

template<typename T , T(SMTSolver::*)(const T &, QualType, uint64_t, QualType, uint64_t) doCast>
void clang::ento::SMTSolver::doIntTypeConversion ( ASTContext Ctx,
T &  LHS,
QualType LTy,
T &  RHS,
QualType RTy 
)
inline

◆ doTypeConversion()

void clang::ento::SMTSolver::doTypeConversion ( ASTContext Ctx,
SMTExprRef LHS,
SMTExprRef RHS,
QualType LTy,
QualType RTy 
)
inline

◆ dump()

LLVM_DUMP_METHOD void clang::ento::SMTSolver::dump ( ) const
inline

Definition at line 38 of file SMTSolver.h.

References print().

◆ fixAPSInt()

std::pair<llvm::APSInt, QualType> clang::ento::SMTSolver::fixAPSInt ( ASTContext Ctx,
const llvm::APSInt &  Int 
)
inline

◆ fromAPFloat()

virtual SMTExprRef clang::ento::SMTSolver::fromAPFloat ( const llvm::APFloat &  Float)
pure virtual

Construct an SMTExprRef value from a finite APFloat.

Referenced by getZeroExpr().

◆ fromAPSInt()

virtual SMTExprRef clang::ento::SMTSolver::fromAPSInt ( const llvm::APSInt &  Int)
pure virtual

Construct an SMTExprRef value from an APSInt.

Referenced by getRangeExpr(), and getSymBinExpr().

◆ fromBinOp()

SMTExprRef clang::ento::SMTSolver::fromBinOp ( const SMTExprRef LHS,
const BinaryOperator::Opcode  Op,
const SMTExprRef RHS,
bool  isSigned 
)
inline

◆ fromBoolean()

virtual SMTExprRef clang::ento::SMTSolver::fromBoolean ( const bool  Bool)
pure virtual

Construct an SMTExprRef value from a boolean.

◆ fromCast()

SMTExprRef clang::ento::SMTSolver::fromCast ( const SMTExprRef Exp,
QualType  ToTy,
uint64_t  ToBitWidth,
QualType  FromTy,
uint64_t  FromBitWidth 
)
inline

◆ fromData()

virtual SMTExprRef clang::ento::SMTSolver::fromData ( const SymbolID  ID,
const QualType Ty,
uint64_t  BitWidth 
)
pure virtual

Construct an SMTExprRef from a SymbolData.

Referenced by getSymExpr().

◆ fromFloatBinOp()

SMTExprRef clang::ento::SMTSolver::fromFloatBinOp ( const SMTExprRef LHS,
const BinaryOperator::Opcode  Op,
const SMTExprRef RHS 
)
inline

Construct an SMTExprRef from a floating-point binary operator.

Definition at line 217 of file SMTSolver.h.

References fromBinOp(), fromFloatUnOp(), getSort(), mkFPAdd(), mkFPDiv(), mkFPEqual(), mkFPGe(), mkFPGt(), mkFPLe(), mkFPLt(), mkFPMul(), mkFPRem(), and mkFPSub().

Referenced by getBinExpr(), and getZeroExpr().

◆ fromFloatSpecialBinOp()

SMTExprRef clang::ento::SMTSolver::fromFloatSpecialBinOp ( const SMTExprRef LHS,
const BinaryOperator::Opcode  Op,
const llvm::APFloat::fltCategory &  RHS 
)
inline

Construct an SMTExprRef from a special floating-point binary operator.

Definition at line 186 of file SMTSolver.h.

References fromFloatUnOp(), mkFPIsInfinite(), mkFPIsNaN(), mkFPIsNormal(), and mkFPIsZero().

◆ fromFloatUnOp()

SMTExprRef clang::ento::SMTSolver::fromFloatUnOp ( const UnaryOperator::Opcode  Op,
const SMTExprRef Exp 
)
inline

Constructs an SMTExprRef from a floating-point unary operator.

Definition at line 85 of file SMTSolver.h.

References fromUnOp(), and mkFPNeg().

Referenced by fromFloatBinOp(), and fromFloatSpecialBinOp().

◆ fromInt()

virtual SMTExprRef clang::ento::SMTSolver::fromInt ( const char *  Int,
uint64_t  BitWidth 
)
pure virtual

Construct an SMTExprRef value from an integer.

Referenced by getZeroExpr().

◆ fromNBinOp()

SMTExprRef clang::ento::SMTSolver::fromNBinOp ( const BinaryOperator::Opcode  Op,
const std::vector< SMTExprRef > &  ASTs 
)
inline

Construct an SMTExprRef from a n-ary binary operator.

Definition at line 100 of file SMTSolver.h.

References mkAnd(), and mkOr().

◆ fromUnOp()

SMTExprRef clang::ento::SMTSolver::fromUnOp ( const UnaryOperator::Opcode  Op,
const SMTExprRef Exp 
)
inline

Constructs an SMTExprRef from an unary operator.

Definition at line 68 of file SMTSolver.h.

References mkBVNeg(), mkBVNot(), and mkNot().

Referenced by fromBinOp(), fromFloatUnOp(), and getZeroExpr().

◆ getAPSIntType()

QualType clang::ento::SMTSolver::getAPSIntType ( ASTContext Ctx,
const llvm::APSInt &  Int 
)
inline

Definition at line 517 of file SMTSolver.h.

References clang::ASTContext::getIntTypeForBitwidth().

Referenced by fixAPSInt().

◆ getBinExpr()

SMTExprRef clang::ento::SMTSolver::getBinExpr ( ASTContext Ctx,
const SMTExprRef LHS,
QualType  LTy,
BinaryOperator::Opcode  Op,
const SMTExprRef RHS,
QualType  RTy,
QualType RetTy 
)
inline

◆ getBitvector()

virtual llvm::APSInt clang::ento::SMTSolver::getBitvector ( const SMTExprRef Exp,
unsigned  BitWidth,
bool  isUnsigned 
)
pure virtual

◆ getBitvectorSort()

virtual SMTSortRef clang::ento::SMTSolver::getBitvectorSort ( const unsigned  BitWidth)
pure virtual

Referenced by doFloatTypeConversion(), and mkSort().

◆ getBoolean()

virtual bool clang::ento::SMTSolver::getBoolean ( const SMTExprRef Exp)
pure virtual

◆ getBoolSort()

virtual SMTSortRef clang::ento::SMTSolver::getBoolSort ( )
pure virtual

Referenced by doFloatTypeConversion(), and mkSort().

◆ getCastExpr()

SMTExprRef clang::ento::SMTSolver::getCastExpr ( ASTContext Ctx,
const SMTExprRef Exp,
QualType  FromTy,
QualType  ToTy 
)
inline

Definition at line 406 of file SMTSolver.h.

References fromCast(), and clang::ASTContext::getTypeSize().

Referenced by getSymExpr().

◆ getExpr()

SMTExprRef clang::ento::SMTSolver::getExpr ( ASTContext Ctx,
SymbolRef  Sym,
QualType RetTy = nullptr,
bool hasComparison = nullptr 
)
inline

Definition at line 333 of file SMTSolver.h.

References getSymExpr().

Referenced by getRangeExpr().

◆ getFloat128Sort()

virtual SMTSortRef clang::ento::SMTSolver::getFloat128Sort ( )
pure virtual

◆ getFloat16Sort()

virtual SMTSortRef clang::ento::SMTSolver::getFloat16Sort ( )
pure virtual

◆ getFloat32Sort()

virtual SMTSortRef clang::ento::SMTSolver::getFloat32Sort ( )
pure virtual

◆ getFloat64Sort()

virtual SMTSortRef clang::ento::SMTSolver::getFloat64Sort ( )
pure virtual

◆ getFloatRoundingMode()

virtual SMTExprRef clang::ento::SMTSolver::getFloatRoundingMode ( )
pure virtual

◆ getFloatSort()

SMTSortRef clang::ento::SMTSolver::getFloatSort ( unsigned  BitWidth)
inline

Definition at line 41 of file SMTSolver.h.

References getFloat128Sort(), getFloat16Sort(), getFloat32Sort(), and getFloat64Sort().

Referenced by fromCast(), and mkSort().

◆ getInterpretation() [1/2]

virtual bool clang::ento::SMTSolver::getInterpretation ( const SMTExprRef Exp,
llvm::APSInt &  Int 
)
pure virtual

Given an expression, extract the value of this operand in the model.

◆ getInterpretation() [2/2]

virtual bool clang::ento::SMTSolver::getInterpretation ( const SMTExprRef Exp,
llvm::APFloat &  Float 
)
pure virtual

Given an expression extract the value of this operand in the model.

◆ getRangeExpr()

SMTExprRef clang::ento::SMTSolver::getRangeExpr ( ASTContext Ctx,
SymbolRef  Sym,
const llvm::APSInt &  From,
const llvm::APSInt &  To,
bool  InRange 
)
inline

◆ getSort()

virtual SMTSortRef clang::ento::SMTSolver::getSort ( const SMTExprRef AST)
pure virtual

◆ getSymBinExpr()

SMTExprRef clang::ento::SMTSolver::getSymBinExpr ( ASTContext Ctx,
const BinarySymExpr BSE,
bool hasComparison,
QualType RetTy 
)
inline

◆ getSymExpr()

SMTExprRef clang::ento::SMTSolver::getSymExpr ( ASTContext Ctx,
SymbolRef  Sym,
QualType RetTy,
bool hasComparison 
)
inline

◆ getZeroExpr()

SMTExprRef clang::ento::SMTSolver::getZeroExpr ( ASTContext Ctx,
const SMTExprRef Exp,
QualType  Ty,
bool  Assumption 
)
inline

◆ mkAnd()

virtual SMTExprRef clang::ento::SMTSolver::mkAnd ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a boolean and operation.

Referenced by fromBinOp(), and fromNBinOp().

◆ mkBitvector()

virtual SMTExprRef clang::ento::SMTSolver::mkBitvector ( const llvm::APSInt  Int,
unsigned  BitWidth 
)
pure virtual

Constructs an SMTExprRef from an APSInt and its bit width.

Referenced by fromCast().

◆ mkBoolean()

virtual SMTExprRef clang::ento::SMTSolver::mkBoolean ( const bool  b)
pure virtual

Constructs an SMTExprRef from a boolean.

◆ mkBVAdd()

virtual SMTExprRef clang::ento::SMTSolver::mkBVAdd ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector addition operation.

Referenced by fromBinOp().

◆ mkBVAnd()

virtual SMTExprRef clang::ento::SMTSolver::mkBVAnd ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector and operation.

Referenced by fromBinOp().

◆ mkBVAshr()

virtual SMTExprRef clang::ento::SMTSolver::mkBVAshr ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector arithmetic shift right operation.

Referenced by fromBinOp().

◆ mkBVConcat()

virtual SMTExprRef clang::ento::SMTSolver::mkBVConcat ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector concat operation.

◆ mkBVExtract()

virtual SMTExprRef clang::ento::SMTSolver::mkBVExtract ( unsigned  High,
unsigned  Low,
const SMTExprRef Exp 
)
pure virtual

Creates a bitvector extract operation.

Referenced by fromCast().

◆ mkBVLshr()

virtual SMTExprRef clang::ento::SMTSolver::mkBVLshr ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector logical shift right operation.

Referenced by fromBinOp().

◆ mkBVMul()

virtual SMTExprRef clang::ento::SMTSolver::mkBVMul ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector multiplication operation.

Referenced by fromBinOp().

◆ mkBVNeg()

virtual SMTExprRef clang::ento::SMTSolver::mkBVNeg ( const SMTExprRef Exp)
pure virtual

Creates a bitvector negation operation.

Referenced by fromUnOp().

◆ mkBVNot()

virtual SMTExprRef clang::ento::SMTSolver::mkBVNot ( const SMTExprRef Exp)
pure virtual

Creates a bitvector not operation.

Referenced by fromUnOp().

◆ mkBVOr()

virtual SMTExprRef clang::ento::SMTSolver::mkBVOr ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector or operation.

Referenced by fromBinOp().

◆ mkBVSDiv()

virtual SMTExprRef clang::ento::SMTSolver::mkBVSDiv ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector signed division operation.

Referenced by fromBinOp().

◆ mkBVSge()

virtual SMTExprRef clang::ento::SMTSolver::mkBVSge ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector signed greater-equal-than operation.

Referenced by fromBinOp().

◆ mkBVSgt()

virtual SMTExprRef clang::ento::SMTSolver::mkBVSgt ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector signed greater-than operation.

Referenced by fromBinOp().

◆ mkBVShl()

virtual SMTExprRef clang::ento::SMTSolver::mkBVShl ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector logical shift left operation.

Referenced by fromBinOp().

◆ mkBVSignExt()

virtual SMTExprRef clang::ento::SMTSolver::mkBVSignExt ( unsigned  i,
const SMTExprRef Exp 
)
pure virtual

Creates a bitvector sign extension operation.

Referenced by fromCast().

◆ mkBVSle()

virtual SMTExprRef clang::ento::SMTSolver::mkBVSle ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector signed less-equal-than operation.

Referenced by fromBinOp().

◆ mkBVSlt()

virtual SMTExprRef clang::ento::SMTSolver::mkBVSlt ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector signed less-than operation.

Referenced by fromBinOp().

◆ mkBVSRem()

virtual SMTExprRef clang::ento::SMTSolver::mkBVSRem ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector signed modulus operation.

Referenced by fromBinOp().

◆ mkBVSub()

virtual SMTExprRef clang::ento::SMTSolver::mkBVSub ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector subtraction operation.

Referenced by fromBinOp().

◆ mkBVUDiv()

virtual SMTExprRef clang::ento::SMTSolver::mkBVUDiv ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector unsigned division operation.

Referenced by fromBinOp().

◆ mkBVUge()

virtual SMTExprRef clang::ento::SMTSolver::mkBVUge ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector unsigned greater-equal-than operation.

Referenced by fromBinOp().

◆ mkBVUgt()

virtual SMTExprRef clang::ento::SMTSolver::mkBVUgt ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector unsigned greater-than operation.

Referenced by fromBinOp().

◆ mkBVUle()

virtual SMTExprRef clang::ento::SMTSolver::mkBVUle ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector unsigned less-equal-than operation.

Referenced by fromBinOp().

◆ mkBVUlt()

virtual SMTExprRef clang::ento::SMTSolver::mkBVUlt ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector unsigned less-than operation.

Referenced by fromBinOp().

◆ mkBVURem()

virtual SMTExprRef clang::ento::SMTSolver::mkBVURem ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector unsigned modulus operation.

Referenced by fromBinOp().

◆ mkBVXor()

virtual SMTExprRef clang::ento::SMTSolver::mkBVXor ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a bitvector xor operation.

Referenced by fromBinOp().

◆ mkBVZeroExt()

virtual SMTExprRef clang::ento::SMTSolver::mkBVZeroExt ( unsigned  i,
const SMTExprRef Exp 
)
pure virtual

Creates a bitvector zero extension operation.

Referenced by fromCast().

◆ mkEqual()

virtual SMTExprRef clang::ento::SMTSolver::mkEqual ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a boolean equality operation.

Referenced by fromBinOp().

◆ mkFloat()

virtual SMTExprRef clang::ento::SMTSolver::mkFloat ( const llvm::APFloat  Float)
pure virtual

Constructs an SMTExprRef from a finite APFloat.

◆ mkFPAdd()

virtual SMTExprRef clang::ento::SMTSolver::mkFPAdd ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a floating-point addition operation.

Referenced by fromFloatBinOp().

◆ mkFPDiv()

virtual SMTExprRef clang::ento::SMTSolver::mkFPDiv ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a floating-point division operation.

Referenced by fromFloatBinOp().

◆ mkFPEqual()

virtual SMTExprRef clang::ento::SMTSolver::mkFPEqual ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a floating-point equality operation.

Referenced by fromFloatBinOp().

◆ mkFPGe()

virtual SMTExprRef clang::ento::SMTSolver::mkFPGe ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a floating-point greater-than-or-equal operation.

Referenced by fromFloatBinOp().

◆ mkFPGt()

virtual SMTExprRef clang::ento::SMTSolver::mkFPGt ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a floating-point greater-than operation.

Referenced by fromFloatBinOp().

◆ mkFPIsInfinite()

virtual SMTExprRef clang::ento::SMTSolver::mkFPIsInfinite ( const SMTExprRef Exp)
pure virtual

Creates a floating-point isInfinite operation.

Referenced by fromFloatSpecialBinOp().

◆ mkFPIsNaN()

virtual SMTExprRef clang::ento::SMTSolver::mkFPIsNaN ( const SMTExprRef Exp)
pure virtual

Creates a floating-point isNaN operation.

Referenced by fromFloatSpecialBinOp().

◆ mkFPIsNormal()

virtual SMTExprRef clang::ento::SMTSolver::mkFPIsNormal ( const SMTExprRef Exp)
pure virtual

Creates a floating-point isNormal operation.

Referenced by fromFloatSpecialBinOp().

◆ mkFPIsZero()

virtual SMTExprRef clang::ento::SMTSolver::mkFPIsZero ( const SMTExprRef Exp)
pure virtual

Creates a floating-point isZero operation.

Referenced by fromFloatSpecialBinOp().

◆ mkFPLe()

virtual SMTExprRef clang::ento::SMTSolver::mkFPLe ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a floating-point less-than-or-equal operation.

Referenced by fromFloatBinOp().

◆ mkFPLt()

virtual SMTExprRef clang::ento::SMTSolver::mkFPLt ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a floating-point less-than operation.

Referenced by fromFloatBinOp().

◆ mkFPMul()

virtual SMTExprRef clang::ento::SMTSolver::mkFPMul ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a floating-point multiplication operation.

Referenced by fromFloatBinOp().

◆ mkFPNeg()

virtual SMTExprRef clang::ento::SMTSolver::mkFPNeg ( const SMTExprRef Exp)
pure virtual

Creates a floating-point negation operation.

Referenced by fromFloatUnOp().

◆ mkFPRem()

virtual SMTExprRef clang::ento::SMTSolver::mkFPRem ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a floating-point remainder operation.

Referenced by fromFloatBinOp().

◆ mkFPSub()

virtual SMTExprRef clang::ento::SMTSolver::mkFPSub ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a floating-point subtraction operation.

Referenced by fromFloatBinOp().

◆ mkFPtoFP()

virtual SMTExprRef clang::ento::SMTSolver::mkFPtoFP ( const SMTExprRef From,
const SMTSortRef To 
)
pure virtual

Creates a floating-point conversion from floatint-point to floating-point operation.

Referenced by fromCast().

◆ mkFPtoSBV()

virtual SMTExprRef clang::ento::SMTSolver::mkFPtoSBV ( const SMTExprRef From,
const SMTSortRef To 
)
pure virtual

Creates a floating-point conversion from floatint-point to signed bitvector operation.

Referenced by fromCast().

◆ mkFPtoUBV()

virtual SMTExprRef clang::ento::SMTSolver::mkFPtoUBV ( const SMTExprRef From,
const SMTSortRef To 
)
pure virtual

Creates a floating-point conversion from floatint-point to unsigned bitvector operation.

Referenced by fromCast().

◆ mkIte()

virtual SMTExprRef clang::ento::SMTSolver::mkIte ( const SMTExprRef Cond,
const SMTExprRef T,
const SMTExprRef F 
)
pure virtual

Creates a boolean ite operation.

Referenced by fromCast().

◆ mkNot()

virtual SMTExprRef clang::ento::SMTSolver::mkNot ( const SMTExprRef Exp)
pure virtual

Creates a boolean not operation.

Referenced by fromUnOp().

◆ mkOr()

virtual SMTExprRef clang::ento::SMTSolver::mkOr ( const SMTExprRef LHS,
const SMTExprRef RHS 
)
pure virtual

Creates a boolean or operation.

Referenced by fromBinOp(), and fromNBinOp().

◆ mkSBVtoFP()

virtual SMTExprRef clang::ento::SMTSolver::mkSBVtoFP ( const SMTExprRef From,
unsigned  ToWidth 
)
pure virtual

Creates a floating-point conversion from signed bitvector to floatint-point operation.

Referenced by fromCast().

◆ mkSort()

SMTSortRef clang::ento::SMTSolver::mkSort ( const QualType Ty,
unsigned  BitWidth 
)
inline

◆ mkSymbol()

virtual SMTExprRef clang::ento::SMTSolver::mkSymbol ( const char *  Name,
SMTSortRef  Sort 
)
pure virtual

Creates a new symbol, given a name and a sort.

◆ mkUBVtoFP()

virtual SMTExprRef clang::ento::SMTSolver::mkUBVtoFP ( const SMTExprRef From,
unsigned  ToWidth 
)
pure virtual

Creates a floating-point conversion from unsigned bitvector to floatint-point operation.

Referenced by fromCast().

◆ newExprRef()

virtual SMTExprRef clang::ento::SMTSolver::newExprRef ( const SMTExpr E) const
pure virtual

Referenced by doFloatTypeConversion().

◆ pop()

virtual void clang::ento::SMTSolver::pop ( unsigned  NumStates = 1)
pure virtual

Pop the previous solver state.

◆ print()

virtual void clang::ento::SMTSolver::print ( raw_ostream &  OS) const
pure virtual

Referenced by dump().

◆ push()

virtual void clang::ento::SMTSolver::push ( )
pure virtual

Push the current solver state.

◆ reset()

virtual void clang::ento::SMTSolver::reset ( ) const
pure virtual

Reset the solver and remove all constraints.


The documentation for this class was generated from the following file: