Static Value-Flow Analysis
Namespaces | Classes | Typedefs | Enumerations | Functions
SVF Namespace Reference

for isBitcode More...

Namespaces

 cppUtil
 
 DOT
 
 GraphProgram
 
 LLVMUtil
 
 SVFUtil
 

Classes

class  BreakConstantGEPs
 
class  MergeFunctionRets
 
class  CHGBuilder
 
class  DCHEdge
 
class  DCHNode
 
class  DCHGraph
 Dwarf based CHG. More...
 
struct  GenericGraphTraits< SVF::DCHNode * >
 
struct  GenericGraphTraits< Inverse< SVF::DCHNode * > >
 Inverse GenericGraphTraits specializations for call graph node, it is used for inverse traversal. More...
 
struct  GenericGraphTraits< SVF::DCHGraph * >
 
class  ICFGBuilder
 
class  LLVMLoopAnalysis
 
class  LLVMModuleSet
 
class  ObjTypeInference
 
class  SVFIRBuilder
 
class  SymbolTableBuilder
 
class  AbstractState
 
class  AbstractValue
 
class  AddressValue
 
class  ICFGWTO
 
class  IntervalValue
 
class  BoundedInt
 A class representing a bounded 64-bit integer. More...
 
class  BoundedDouble
 
class  RelationSolver
 
class  RelExeState
 
class  AbsExtAPI
 Handles external API calls and manages abstract states. More...
 
class  FILOWorkList
 
class  AEStat
 AEStat: Statistic for AE. More...
 
class  AbstractInterpretation
 AbstractInterpretation is same as Abstract Execution. More...
 
class  AEDetector
 Base class for all detectors. More...
 
class  AEException
 Exception class for handling errors in Abstract Execution. More...
 
class  BufOverflowDetector
 Detector for identifying buffer overflow issues. More...
 
class  CFGNormalizer
 
class  GrammarBase
 
class  CFGrammar
 
class  CFLFIFOWorkList
 
class  CFLAlias
 
class  POCRAlias
 
class  POCRHybrid
 
class  CFLBase
 CFL Client Base Class. More...
 
class  CFLGramGraphChecker
 
class  CFLGraphBuilder
 
class  AliasCFLGraphBuilder
 AliasCFLGraphBuilder: a CFLGraphBuilder specialized for handling aliasing. More...
 
class  VFCFLGraphBuilder
 VFCFLGraphBuilder: a CFLGraphBuilder specialized for handling value-flow. More...
 
class  CFLSolver
 
class  POCRSolver
 Solver Utilize CFLData. More...
 
class  POCRHybridSolver
 Solver Utilize Hybrid Representation of Graph. More...
 
class  CFLStat
 
class  CFLSVFGBuilder
 
class  CFLVF
 
class  GrammarBuilder
 
class  ContextDDA
 
class  DDAClient
 
class  FunptrDDAClient
 
class  AliasDDAClient
 
class  DDAPass
 
class  DDAStat
 
class  DDAVFSolver
 
class  FlowDDA
 
class  CDGEdge
 
class  CDGNode
 
class  CDG
 
struct  GenericGraphTraits< SVF::CDGNode * >
 
struct  GenericGraphTraits< Inverse< SVF::CDGNode * > >
 Inverse GenericGraphTraits specializations for call graph node, it is used for inverse ICFGTraversal. More...
 
struct  GenericGraphTraits< SVF::CDG * >
 
struct  DOTGraphTraits< SVF::CDG * >
 
class  CFLEdge
 
class  CFLNode
 
class  CFLGraph
 
struct  GenericGraphTraits< SVF::CFLNode * >
 
struct  GenericGraphTraits< Inverse< SVF::CFLNode * > >
 Inverse GenericGraphTraits specializations for call graph node, it is used for inverse traversal. More...
 
struct  GenericGraphTraits< SVF::CFLGraph * >
 
class  CommonCHGraph
 Common base for class hierarchy graph. Only implements what PointerAnalysis needs. More...
 
class  CHEdge
 
class  CHNode
 
class  CHGraph
 
struct  GenericGraphTraits< SVF::CHNode * >
 
struct  GenericGraphTraits< Inverse< SVF::CHNode * > >
 
struct  GenericGraphTraits< SVF::CHGraph * >
 
class  ConstraintGraph
 
struct  GenericGraphTraits< SVF::ConstraintNode * >
 
struct  GenericGraphTraits< Inverse< SVF::ConstraintNode * > >
 Inverse GenericGraphTraits specializations for Value flow node, it is used for inverse traversal. More...
 
struct  GenericGraphTraits< SVF::ConstraintGraph * >
 
class  ConstraintEdge
 
class  AddrCGEdge
 
class  CopyCGEdge
 
class  StoreCGEdge
 
class  LoadCGEdge
 
class  GepCGEdge
 
class  NormalGepCGEdge
 
class  VariantGepCGEdge
 
class  ConstraintNode
 
struct  DefaultDOTGraphTraits
 
struct  DOTGraphTraits
 
class  GenericGraphWriter
 
class  GenericGraphReader
 
class  GenericEdge
 
class  SVFBaseNode
 
class  GenericNode
 
class  GenericGraph
 
class  mapped_iter
 
struct  GenericGraphTraits< SVF::GenericNode< NodeTy, EdgeTy > * >
 
struct  GenericGraphTraits< Inverse< SVF::GenericNode< NodeTy, EdgeTy > * > >
 
struct  GenericGraphTraits< SVF::GenericGraph< NodeTy, EdgeTy > * >
 
class  GraphPrinter
 
struct  GenericGraphTraits
 
struct  Inverse
 
struct  GenericGraphTraits< Inverse< Inverse< T > > >
 
class  GraphWriter
 
class  ICFG
 
struct  GenericGraphTraits< SVF::ICFGNode * >
 
struct  GenericGraphTraits< Inverse< SVF::ICFGNode * > >
 Inverse GenericGraphTraits specializations for call graph node, it is used for inverse traversal. More...
 
struct  GenericGraphTraits< SVF::ICFG * >
 
class  ICFGEdge
 
class  IntraCFGEdge
 
class  CallCFGEdge
 
class  RetCFGEdge
 
class  ICFGNode
 
class  GlobalICFGNode
 
class  IntraICFGNode
 
class  InterICFGNode
 
class  FunEntryICFGNode
 
class  FunExitICFGNode
 
class  CallICFGNode
 
class  RetICFGNode
 
class  ICFGStat
 
class  IRGraph
 
struct  GenericGraphTraits< SVF::SVFVar * >
 
struct  GenericGraphTraits< Inverse< SVF::SVFVar * > >
 Inverse GenericGraphTraits specializations for SVFIR node, it is used for inverse traversal. More...
 
struct  GenericGraphTraits< SVF::IRGraph * >
 
class  PTACallGraphEdge
 
class  PTACallGraphNode
 
class  PTACallGraph
 
struct  GenericGraphTraits< SVF::PTACallGraphNode * >
 
struct  GenericGraphTraits< Inverse< SVF::PTACallGraphNode * > >
 Inverse GenericGraphTraits specializations for call graph node, it is used for inverse traversal. More...
 
struct  GenericGraphTraits< SVF::PTACallGraph * >
 
class  SCCDetection
 
class  SVFG
 
struct  GenericGraphTraits< SVF::SVFG * >
 
class  IndirectSVFGEdge
 
class  IntraIndSVFGEdge
 
class  CallIndSVFGEdge
 
class  RetIndSVFGEdge
 
class  ThreadMHPIndSVFGEdge
 
class  MRSVFGNode
 
class  FormalINSVFGNode
 
class  FormalOUTSVFGNode
 
class  ActualINSVFGNode
 
class  ActualOUTSVFGNode
 
class  MSSAPHISVFGNode
 
class  IntraMSSAPHISVFGNode
 
class  InterMSSAPHISVFGNode
 
class  DummyVersionPropSVFGNode
 
class  SVFGOPT
 
class  MemSSAStat
 
class  SVFGStat
 
class  ThreadForkEdge
 
class  ThreadJoinEdge
 
class  HareParForEdge
 
class  ThreadCallGraph
 
class  VFG
 
struct  GenericGraphTraits< SVF::VFGNode * >
 
struct  GenericGraphTraits< Inverse< SVF::VFGNode * > >
 Inverse GenericGraphTraits specializations for call graph node, it is used for inverse traversal. More...
 
struct  GenericGraphTraits< SVF::VFG * >
 
class  VFGEdge
 
class  DirectSVFGEdge
 
class  IntraDirSVFGEdge
 
class  CallDirSVFGEdge
 
class  RetDirSVFGEdge
 
class  VFGNode
 
class  StmtVFGNode
 
class  LoadVFGNode
 
class  StoreVFGNode
 
class  CopyVFGNode
 
class  CmpVFGNode
 
class  BinaryOPVFGNode
 
class  UnaryOPVFGNode
 
class  BranchVFGNode
 
class  GepVFGNode
 
class  PHIVFGNode
 
class  IntraPHIVFGNode
 
class  AddrVFGNode
 
class  ArgumentVFGNode
 
class  ActualParmVFGNode
 
class  FormalParmVFGNode
 
class  ActualRetVFGNode
 
class  FormalRetVFGNode
 
class  InterPHIVFGNode
 
class  NullPtrVFGNode
 
class  WTO
 
class  WTONode
 
class  WTOCycle
 
class  WTOComponentVisitor
 
struct  has_nodetype
 
struct  has_nodetype< T, std::void_t< typename T::NodeType > >
 
struct  has_edgetype
 
struct  has_edgetype< T, std::void_t< typename T::EdgeType > >
 
class  WTOCycleDepth
 
class  WTOComponent
 
class  PTData
 
class  DiffPTData
 
class  DFPTData
 
class  VersionedPTData
 
class  AccessPath
 
class  CondVar
 
class  CondStdSet
 
class  CondPointsToSet
 
class  MutableDFPTData
 
class  MutablePTData
 PTData implemented using points-to sets which are created once and updated continuously. More...
 
class  MutableDiffPTData
 DiffPTData implemented with points-to sets which are updated continuously. More...
 
class  MutableIncDFPTData
 Incremental version of the mutable data-flow points-to data structure. More...
 
class  MutableVersionedPTData
 
class  PersistentPointsToCache
 
class  PersistentDFPTData
 DFPTData backed by a PersistentPointsToCache. More...
 
class  PersistentIncDFPTData
 Incremental version of the persistent data-flow points-to data structure. More...
 
class  PersistentVersionedPTData
 
class  PersistentPTData
 PTData backed by a PersistentPointsToCache. More...
 
class  PersistentDiffPTData
 DiffPTData implemented with a persistent points-to backing. More...
 
class  PointerAnalysis
 
class  BVDataPTAImpl
 
class  CondPTAImpl
 
class  PointsTo
 
class  SVFLoop
 
class  DistinctMRG
 
class  IntraDisjointMRG
 
class  InterDisjointMRG
 
class  MemRegion
 Memory Region class. More...
 
class  MRGenerator
 
class  MemSSA
 
class  MRVer
 
class  MSSAMU
 
class  LoadMU
 
class  CallMU
 
class  RetMU
 
class  MSSADEF
 
class  MSSACHI
 
class  StoreCHI
 
class  CallCHI
 
class  EntryCHI
 
class  MSSAPHI
 
class  SVFGBuilder
 
class  LockAnalysis
 
class  MHP
 
class  ForkJoinAnalysis
 
class  MTA
 
class  MTAStat
 
class  TCTEdge
 
class  TCTNode
 
class  TCT
 
struct  GenericGraphTraits< SVF::TCTNode * >
 
struct  GenericGraphTraits< Inverse< SVF::TCTNode * > >
 Inverse GenericGraphTraits specializations for Value flow node, it is used for inverse traversal. More...
 
struct  GenericGraphTraits< SVF::TCT * >
 
class  DoubleFreeChecker
 
class  FileChecker
 
class  LeakChecker
 
class  ProgSlice
 
class  SaberCheckerAPI
 
class  SaberCondAllocator
 
class  SaberSVFGBuilder
 
class  SrcSnkDDA
 
class  SrcSnkSolver
 
class  PAGBuilderFromFile
 
class  WriterPtrPool
 Bookkeeping class to keep track of the IDs of objects that doesn't have any ID. E.g., SVFValue, XXXEdge. More...
 
class  ICFGWriter
 
class  SVFModuleWriter
 
class  SVFIRWriter
 
struct  KindBaseHelper
 Type trait to get base type. Helper struct to detect inheritance from Node/Edge. More...
 
class  ReaderIDToObjMap
 Keeps a map from IDs to T objects, such as XXNode. More...
 
class  ReaderPtrPool
 Reverse of WriterPtrPool where T is object type without ID field. More...
 
class  SymbolTableInfoReader
 
class  ICFGReader
 
class  SVFModuleReader
 
class  SVFIRReader
 
class  SVFIR
 
class  SVFModule
 
class  SVFStmt
 
class  AssignStmt
 
class  AddrStmt
 
class  CopyStmt
 
class  StoreStmt
 
class  LoadStmt
 
class  GepStmt
 
class  CallPE
 
class  RetPE
 
class  MultiOpndStmt
 
class  PhiStmt
 
class  SelectStmt
 
class  CmpStmt
 
class  BinaryOPStmt
 
class  UnaryOPStmt
 
class  BranchStmt
 
class  TDForkPE
 
class  TDJoinPE
 
class  StInfo
 
class  SVFType
 
class  SVFPointerType
 
class  SVFIntegerType
 
class  SVFFunctionType
 
class  SVFStructType
 
class  SVFArrayType
 
class  SVFOtherType
 
struct  Hash< NodePair >
 
class  SVFLoopAndDomInfo
 
class  SVFValue
 
class  SVFFunction
 
class  SVFBasicBlock
 
class  SVFInstruction
 
class  SVFCallInst
 
class  SVFVirtualCallInst
 
class  SVFConstant
 
class  SVFGlobalValue
 
class  SVFArgument
 
class  SVFConstantData
 
class  SVFConstantInt
 
class  SVFConstantFP
 
class  SVFConstantNullPtr
 
class  SVFBlackHoleValue
 
class  SVFOtherValue
 
class  SVFMetadataAsValue
 
class  SVFVar
 
class  ValVar
 
class  ObjVar
 
class  GepValVar
 
class  GepObjVar
 
class  FIObjVar
 
class  RetPN
 
class  VarArgPN
 
class  DummyValVar
 
class  DummyObjVar
 
class  SymbolTableInfo
 
class  MemObj
 
class  ObjTypeInfo
 
class  Annotator
 
class  BitVector
 
class  CallGraphBuilder
 
class  CDGBuilder
 
class  CoreBitVector
 
struct  Hash< CoreBitVector >
 
class  CxtStmt
 
class  CxtThreadStmt
 
class  CxtThread
 
class  CxtProc
 
class  CxtThreadProc
 
class  DPItem
 
class  StmtDPItem
 
class  ContextCond
 
class  CxtStmtDPItem
 
class  CxtDPItem
 
class  ExtAPI
 
struct  Hash
 provide extra hash function for std::pair handling More...
 
struct  Hash< std::pair< S, T > >
 
class  GraphReachSolver
 
class  iter_facade_base
 
class  iter_adaptor_base
 
struct  pointee_iter
 
class  pointer_iterator
 
class  iter_range
 
class  NodeIDAllocator
 
class  Options
 Carries around command line options. More...
 
class  PTAStat
 
struct  TrailingZerosCounter
 
struct  PopulationCounter
 
struct  LeadingZerosCounter
 
struct  PopulationCounter< T, 8 >
 
struct  SparseBitVectorElement
 
class  SparseBitVector
 
class  SVFBugEvent
 
class  GenericBug
 
class  BufferOverflowBug
 
class  FullBufferOverflowBug
 
class  PartialBufferOverflowBug
 
class  NeverFreeBug
 
class  PartialLeakBug
 
class  DoubleFreeBug
 
class  FileNeverCloseBug
 
class  FilePartialCloseBug
 
class  FullNullPtrDereferenceBug
 
class  PartialNullPtrDereferenceBug
 
class  SVFBugReport
 
class  SVFStat
 
class  ThreadAPI
 
class  List
 
class  FIFOWorkList
 
class  Z3Expr
 
class  AndersenBase
 
class  Andersen
 
class  AndersenWaveDiff
 
class  AndersenSCD
 
class  AndersenSFR
 
class  CSC
 
class  FlowSensitive
 
class  Steensgaard
 
class  TypeAnalysis
 
class  VersionedFlowSensitive
 
class  WPAFSSolver
 
class  WPASCCSolver
 
class  WPAMinimumSolver
 
class  WPAPass
 
class  WPASolver
 
class  AndersenStat
 
class  FlowSensitiveStat
 
class  VersionedFlowSensitiveStat
 
struct  DOTGraphTraits< CFLGraph * >
 
struct  DOTGraphTraits< CHGraph * >
 
struct  DOTGraphTraits< ConstraintGraph * >
 
struct  DOTGraphTraits< ICFG * >
 
struct  DOTGraphTraits< IRGraph * >
 
struct  DOTGraphTraits< PTACallGraph * >
 
struct  DOTGraphTraits< SVFG * >
 
struct  DOTGraphTraits< VFG * >
 
struct  DOTGraphTraits< TCT * >
 

Typedefs

typedef llvm::LLVMContext LLVMContext
 
typedef llvm::GlobalObject GlobalObject
 
typedef llvm::Use Use
 
typedef llvm::ModulePass ModulePass
 
typedef llvm::IRBuilder IRBuilder
 
typedef llvm::UnifyFunctionExitNodes UnifyFunctionExitNodes
 
typedef llvm::Value Value
 LLVM Basic classes. More...
 
typedef llvm::Type Type
 
typedef llvm::Module Module
 
typedef llvm::Function Function
 
typedef llvm::BasicBlock BasicBlock
 
typedef llvm::Instruction Instruction
 
typedef llvm::GlobalValue GlobalValue
 
typedef llvm::SMDiagnostic SMDiagnostic
 
typedef llvm::BlockAddress BlockAddress
 
typedef llvm::StructType StructType
 LLVM types. More...
 
typedef llvm::ArrayType ArrayType
 
typedef llvm::PointerType PointerType
 
typedef llvm::IntegerType IntegerType
 
typedef llvm::FunctionType FunctionType
 
typedef llvm::MDString MDString
 
typedef llvm::MetadataAsValue MetadataAsValue
 
typedef llvm::StructLayout StructLayout
 
typedef llvm::ConstantStruct ConstantStruct
 
typedef llvm::MemoryLocation MemoryLocation
 
typedef llvm::DataLayout DataLayout
 
typedef llvm::NamedMDNode NamedMDNode
 LLVM metadata and debug information. More...
 
typedef llvm::MDNode MDNode
 
typedef llvm::DISubprogram DISubprogram
 
typedef llvm::ConstantData ConstantData
 
typedef llvm::ConstantAggregate ConstantAggregate
 
typedef llvm::ConstantAggregateZero ConstantAggregateZero
 
typedef llvm::ConstantDataSequential ConstantDataSequential
 
typedef llvm::ConstantExpr ConstantExpr
 
typedef llvm::ConstantDataArray ConstantDataArray
 
typedef llvm::ConstantArray ConstantArray
 
typedef llvm::Constant Constant
 
typedef llvm::ConstantInt ConstantInt
 
typedef llvm::ConstantFP ConstantFP
 
typedef llvm::ConstantPointerNull ConstantPointerNull
 
typedef llvm::GlobalAlias GlobalAlias
 
typedef llvm::GlobalIFunc GlobalIFunc
 
typedef llvm::GlobalVariable GlobalVariable
 
typedef llvm::DominatorTree DominatorTree
 LLVM Dominators. More...
 
typedef llvm::DomTreeNode DomTreeNode
 
typedef llvm::DominanceFrontier DominanceFrontier
 
typedef llvm::PostDominatorTree PostDominatorTree
 
typedef llvm::DominanceFrontierBase< llvm::BasicBlock, falseDominanceFrontierBase
 
typedef llvm::Loop Loop
 LLVM Loop. More...
 
typedef llvm::LoopInfo LoopInfo
 
typedef llvm::User User
 
typedef llvm::Argument Argument
 
typedef llvm::CallBase CallBase
 
typedef llvm::CallInst CallInst
 
typedef llvm::StoreInst StoreInst
 
typedef llvm::LoadInst LoadInst
 
typedef llvm::AllocaInst AllocaInst
 
typedef llvm::AtomicCmpXchgInst AtomicCmpXchgInst
 
typedef llvm::AtomicRMWInst AtomicRMWInst
 
typedef llvm::BitCastInst BitCastInst
 
typedef llvm::BranchInst BranchInst
 
typedef llvm::SwitchInst SwitchInst
 
typedef llvm::CallBrInst CallBrInst
 
typedef llvm::ReturnInst ReturnInst
 
typedef llvm::CastInst CastInst
 
typedef llvm::CmpInst CmpInst
 
typedef llvm::ExtractValueInst ExtractValueInst
 
typedef llvm::ExtractElementInst ExtractElementInst
 
typedef llvm::GetElementPtrInst GetElementPtrInst
 
typedef llvm::InvokeInst InvokeInst
 
typedef llvm::ShuffleVectorInst ShuffleVectorInst
 
typedef llvm::PHINode PHINode
 
typedef llvm::IntToPtrInst IntToPtrInst
 
typedef llvm::InsertValueInst InsertValueInst
 
typedef llvm::FenceInst FenceInst
 
typedef llvm::FreezeInst FreezeInst
 
typedef llvm::UnreachableInst UnreachableInst
 
typedef llvm::InsertElementInst InsertElementInst
 
typedef llvm::LandingPadInst LandingPadInst
 
typedef llvm::ResumeInst ResumeInst
 
typedef llvm::SelectInst SelectInst
 
typedef llvm::VAArgInst VAArgInst
 
typedef llvm::VACopyInst VACopyInst
 
typedef llvm::VAEndInst VAEndInst
 
typedef llvm::VAStartInst VAStartInst
 
typedef llvm::BinaryOperator BinaryOperator
 
typedef llvm::UnaryOperator UnaryOperator
 
typedef llvm::UndefValue UndefValue
 
typedef llvm::GEPOperator GEPOperator
 
typedef std::pair< const BasicBlock *, const ConstantInt * > SuccBBAndCondValPair
 
typedef std::vector< SuccBBAndCondValPairSuccBBAndCondValPairVec
 
typedef llvm::DIType DIType
 
typedef llvm::DICompositeType DICompositeType
 
typedef llvm::DIDerivedType DIDerivedType
 
typedef llvm::DebugInfoFinder DebugInfoFinder
 
typedef llvm::DISubroutineType DISubroutineType
 
typedef llvm::DIBasicType DIBasicType
 
typedef llvm::DISubrange DISubrange
 
typedef llvm::DINode DINode
 
typedef llvm::DINodeArray DINodeArray
 
typedef llvm::DITypeRefArray DITypeRefArray
 
typedef llvm::inst_iterator inst_iterator
 
typedef llvm::const_inst_iterator const_inst_iterator
 
typedef llvm::gep_type_iterator gep_type_iterator
 
typedef llvm::bridge_gep_iterator bridge_gep_iterator
 
typedef llvm::const_pred_iterator const_pred_iterator
 
typedef llvm::ScalarEvolutionWrapperPass ScalarEvolutionWrapperPass
 
typedef llvm::SCEVAddRecExpr SCEVAddRecExpr
 
typedef llvm::SCEVConstant SCEVConstant
 
typedef llvm::ScalarEvolution ScalarEvolution
 
typedef llvm::SCEV SCEV
 
typedef llvm::raw_fd_ostream raw_fd_ostream
 LLVM outputs. More...
 
typedef llvm::VectorType VectorType
 
typedef llvm::succ_const_iterator succ_const_iterator
 LLVM Iterators. More...
 
typedef WTOComponent< ICFGICFGWTOComp
 
typedef WTONode< ICFGICFGSingletonWTO
 
typedef WTOCycle< ICFGICFGCycleWTO
 
typedef GrammarBase::Symbol Label
 
typedef CxtStmtDPItem< SVFGNodeCxtLocDPItem
 
typedef StmtDPItem< SVFGNodeLocDPItem
 
typedef GenericEdge< CDGNodeGenericCDGEdgeTy
 
typedef GenericNode< CDGNode, CDGEdgeGenericCDGNodeTy
 
typedef std::vector< std::pair< NodeID, NodeID > > NodePairVector
 
typedef GenericGraph< CDGNode, CDGEdgeGenericCDGTy
 
typedef GenericEdge< CFLNodeGenericCFLEdgeTy
 
typedef GenericNode< CFLNode, CFLEdgeGenericCFLNodeTy
 
typedef GenericGraph< CFLNode, CFLEdgeGenericCFLGraphTy
 Edge-labeled graph for CFL Reachability analysis. More...
 
typedef Set< const SVFGlobalValue * > VTableSet
 
typedef Set< const SVFFunction * > VFunSet
 
typedef GenericEdge< CHNodeGenericCHEdgeTy
 
typedef GenericNode< CHNode, CHEdgeGenericCHNodeTy
 
typedef GenericGraph< CHNode, CHEdgeGenericCHGraphTy
 class hierarchy graph More...
 
typedef GenericEdge< ConstraintNodeGenericConsEdgeTy
 
typedef GenericNode< ConstraintNode, ConstraintEdgeGenericConsNodeTy
 
typedef GenericGraph< ICFGNode, ICFGEdgeGenericICFGTy
 
typedef GenericEdge< ICFGNodeGenericICFGEdgeTy
 
typedef GenericNode< ICFGNode, ICFGEdgeGenericICFGNodeTy
 
typedef SVFVar PAGNode
 
typedef SVFStmt PAGEdge
 
typedef GenericEdge< PTACallGraphNodeGenericCallGraphEdgeTy
 
typedef GenericNode< PTACallGraphNode, PTACallGraphEdgeGenericCallGraphNodeTy
 
typedef GenericGraph< PTACallGraphNode, PTACallGraphEdgeGenericCallGraphTy
 
typedef VFGEdge SVFGEdge
 
typedef VFGNode SVFGNode
 
typedef ActualParmVFGNode ActualParmSVFGNode
 
typedef ActualRetVFGNode ActualRetSVFGNode
 
typedef FormalParmVFGNode FormalParmSVFGNode
 
typedef FormalRetVFGNode FormalRetSVFGNode
 
typedef NullPtrVFGNode NullPtrSVFGNode
 
typedef StmtVFGNode StmtSVFGNode
 
typedef AddrVFGNode AddrSVFGNode
 
typedef CopyVFGNode CopySVFGNode
 
typedef StoreVFGNode StoreSVFGNode
 
typedef LoadVFGNode LoadSVFGNode
 
typedef GepVFGNode GepSVFGNode
 
typedef PHIVFGNode PHISVFGNode
 
typedef IntraPHIVFGNode IntraPHISVFGNode
 
typedef InterPHIVFGNode InterPHISVFGNode
 
typedef GenericGraph< VFGNode, VFGEdgeGenericVFGTy
 
typedef GenericEdge< VFGNodeGenericVFGEdgeTy
 
typedef GenericNode< VFGNode, VFGEdgeGenericVFGNodeTy
 
typedef NodeID MRID
 
typedef NodeID MRVERID
 
typedef NodeID MRVERSION
 
typedef GenericEdge< TCTNodeGenericTCTEdgeTy
 
typedef GenericNode< TCTNode, TCTEdgeGenericTCTNodeTy
 
typedef GenericGraph< TCTNode, TCTEdgeGenericThreadCreateTreeTy
 
typedef GraphReachSolver< SVFG *, CxtDPItemCFLSrcSnkSolver
 
using GenericICFGWriter = GenericGraphWriter< ICFGNode, ICFGEdge >
 
using IRGraphWriter = GenericGraphWriter< SVFVar, SVFStmt >
 
using CHGraphWriter = GenericGraphWriter< CHNode, CHEdge >
 
template<typename T >
using KindBaseT = typename KindBaseHelper< T >::type
 
using GenericICFGReader = GenericGraphReader< ICFGNode, ICFGEdge >
 
using CHGraphReader = GenericGraphReader< CHNode, CHEdge >
 
using IRGraphReader = GenericGraphReader< SVFVar, SVFStmt >
 
typedef SVFIR PAG
 
typedef GenericEdge< SVFVarGenericPAGEdgeTy
 
typedef SVF::GraphPrinter GraphPrinter
 LLVM Aliases and constants. More...
 
typedef GenericNode< SVFVar, SVFStmtGenericPAGNodeTy
 
typedef CondVar< ContextCondCxtVar
 
typedef CondStdSet< CxtVarCxtPtSet
 
typedef std::ostream OutStream
 
typedef unsigned u32_t
 
typedef signed s32_t
 
typedef unsigned long long u64_t
 
typedef signed long long s64_t
 
typedef unsigned char u8_t
 
typedef signed char s8_t
 
typedef unsigned short u16_t
 
typedef signed short s16_t
 
typedef u32_t NodeID
 
typedef u32_t EdgeID
 
typedef unsigned SymID
 
typedef unsigned CallSiteID
 
typedef unsigned ThreadID
 
typedef s64_t APOffset
 
typedef SparseBitVector NodeBS
 
typedef unsigned PointsToID
 
template<typename Key , typename Hash = Hash<Key>, typename KeyEqual = std::equal_to<Key>, typename Allocator = std::allocator<Key>>
using Set = std::unordered_set< Key, Hash, KeyEqual, Allocator >
 
template<typename Key , typename Value , typename Hash = Hash<Key>, typename KeyEqual = std::equal_to<Key>, typename Allocator = std::allocator<std::pair<const Key, Value>>>
using Map = std::unordered_map< Key, Value, Hash, KeyEqual, Allocator >
 
template<typename Key , typename Compare = std::less<Key>, typename Allocator = std::allocator<Key>>
using OrderedSet = std::set< Key, Compare, Allocator >
 
template<typename Key , typename Value , typename Compare = std::less<Key>, typename Allocator = std::allocator<std::pair<const Key, Value>>>
using OrderedMap = std::map< Key, Value, Compare, Allocator >
 
typedef std::pair< NodeID, NodeIDNodePair
 
typedef OrderedSet< NodeIDOrderedNodeSet
 
typedef Set< NodeIDNodeSet
 
typedef Set< NodePairNodePairSet
 
typedef Map< NodePair, NodeIDNodePairMap
 
typedef std::vector< NodeIDNodeVector
 
typedef std::vector< EdgeIDEdgeVector
 
typedef std::stack< NodeIDNodeStack
 
typedef std::list< NodeIDNodeList
 
typedef std::deque< NodeIDNodeDeque
 
typedef NodeSet EdgeSet
 
typedef std::vector< u32_tCallStrCxt
 
typedef unsigned Version
 
typedef Set< VersionVersionSet
 
typedef std::pair< NodeID, VersionVersionedVar
 
typedef Set< VersionedVarVersionedVarSet
 
template<typename WrappedIteratorT , typename T1 = std::remove_reference_t<decltype( **std::declval<WrappedIteratorT>())>, typename T2 = std::add_pointer_t<T1>>
using raw_pointer_iterator = pointer_iterator< pointee_iter< WrappedIteratorT, T1 >, T2 >
 
typedef WPASolver< ConstraintGraph * > WPAConstraintSolver
 
typedef SCCDetection< ConstraintGraph * > CGSCC
 
typedef WPAFSSolver< SVFG * > WPASVFGFSSolver
 

Enumerations

enum class  BuildDirection { plain , bidirection }
 
enum  ModRefInfo { ModRef , Ref , Mod , NoModRef }
 
enum  AliasResult { NoAlias , MayAlias , MustAlias , PartialAlias }
 
enum  ZeroBehavior { ZB_Undefined , ZB_Max , ZB_Width }
 The behavior an operation has on an input of 0. More...
 

Functions

IntervalValue operator+ (const IntervalValue &lhs, const IntervalValue &rhs)
 Add IntervalValues. More...
 
IntervalValue operator- (const IntervalValue &lhs, const IntervalValue &rhs)
 Subtract IntervalValues. More...
 
IntervalValue operator* (const IntervalValue &lhs, const IntervalValue &rhs)
 Multiply IntervalValues. More...
 
IntervalValue operator/ (const IntervalValue &lhs, const IntervalValue &rhs)
 Divide IntervalValues. More...
 
IntervalValue operator% (const IntervalValue &lhs, const IntervalValue &rhs)
 Divide IntervalValues. More...
 
IntervalValue operator> (const IntervalValue &lhs, const IntervalValue &rhs)
 
IntervalValue operator< (const IntervalValue &lhs, const IntervalValue &rhs)
 
IntervalValue operator>= (const IntervalValue &lhs, const IntervalValue &rhs)
 
IntervalValue operator<= (const IntervalValue &lhs, const IntervalValue &rhs)
 
IntervalValue operator<< (const IntervalValue &lhs, const IntervalValue &rhs)
 Left binary shift of IntervalValues. More...
 
IntervalValue operator>> (const IntervalValue &lhs, const IntervalValue &rhs)
 Left binary shift of IntervalValues. More...
 
IntervalValue operator& (const IntervalValue &lhs, const IntervalValue &rhs)
 Bitwise AND of IntervalValues. More...
 
IntervalValue operator| (const IntervalValue &lhs, const IntervalValue &rhs)
 Bitwise OR of IntervalValues. More...
 
IntervalValue operator^ (const IntervalValue &lhs, const IntervalValue &rhs)
 Bitwise XOR of IntervalValues. More...
 
std::ostream & operator<< (std::ostream &o, const IntervalValue &IntervalValue)
 Write an IntervalValue on a stream. More...
 
template<class ItTy , class FuncTy >
mapped_iter< ItTy, FuncTy > map_iter (ItTy I, FuncTy F)
 
template<class GraphType >
iter_range< typename GenericGraphTraits< GraphType >::nodes_iterator > nodes (const GraphType &G)
 
template<class GraphType >
iter_range< typename GenericGraphTraits< Inverse< GraphType > >::nodes_iterator > inverse_nodes (const GraphType &G)
 
template<class GraphType >
iter_range< typename GenericGraphTraits< GraphType >::ChildIteratorType > children (const typename GenericGraphTraits< GraphType >::NodeRef &G)
 
template<class GraphType >
iter_range< typename GenericGraphTraits< Inverse< GraphType > >::ChildIteratorType > inverse_children (const typename GenericGraphTraits< GraphType >::NodeRef &G)
 
template<class GraphType >
iter_range< typename GenericGraphTraits< GraphType >::ChildEdgeIteratorType > children_edges (const typename GenericGraphTraits< GraphType >::NodeRef &G)
 
template<typename GraphType >
std::ofstream & WriteGraph (std::ofstream &O, const GraphType &G, bool ShortNames=false)
 
template<typename GraphType >
std::string WriteGraph (const GraphType &G, bool ShortNames=false, std::string Filename="")
 
template<typename GraphType >
void ViewGraph (const GraphType &G, const std::string &name, bool ShortNames=false, GraphProgram::Name Program=GraphProgram::DOT)
 
PointsTo operator| (const PointsTo &lhs, const PointsTo &rhs)
 Returns a new lhs | rhs. More...
 
PointsTo operator& (const PointsTo &lhs, const PointsTo &rhs)
 Returns a new lhs & rhs. More...
 
PointsTo operator- (const PointsTo &lhs, const PointsTo &rhs)
 Returns a new lhs - rhs. More...
 
std::ostream & operator<< (std::ostream &o, const MRVer &mrver)
 
bool jsonIsBool (const cJSON *item)
 
bool jsonIsBool (const cJSON *item, bool &flag)
 
bool jsonIsNumber (const cJSON *item)
 
bool jsonIsString (const cJSON *item)
 
bool jsonIsNullId (const cJSON *item)
 
bool jsonIsArray (const cJSON *item)
 
bool jsonIsMap (const cJSON *item)
 
bool jsonIsObject (const cJSON *item)
 
bool jsonKeyEquals (const cJSON *item, const char *key)
 
std::pair< const cJSON *, const cJSON * > jsonUnpackPair (const cJSON *item)
 
double jsonGetNumber (const cJSON *item)
 
cJSONjsonCreateNullId ()
 
cJSONjsonCreateObject ()
 
cJSONjsonCreateArray ()
 
cJSONjsonCreateString (const char *str)
 
cJSONjsonCreateIndex (size_t index)
 
cJSONjsonCreateBool (bool flag)
 
cJSONjsonCreateNumber (double num)
 
bool jsonAddPairToMap (cJSON *obj, cJSON *key, cJSON *value)
 
bool jsonAddItemToObject (cJSON *obj, const char *name, cJSON *item)
 
bool jsonAddItemToArray (cJSON *array, cJSON *item)
 
bool jsonAddNumberToObject (cJSON *obj, const char *name, double number)
 Helper function to write a number to a JSON object. More...
 
bool jsonAddStringToObject (cJSON *obj, const char *name, const char *str)
 
bool jsonAddStringToObject (cJSON *obj, const char *name, const std::string &s)
 
 KIND_BASE (SVFType, getKind)
 
 KIND_BASE (SVFValue, getKind)
 
 KIND_BASE (SVFVar, getNodeKind)
 
 KIND_BASE (SVFStmt, getEdgeKind)
 
 KIND_BASE (ICFGNode, getNodeKind)
 
 KIND_BASE (ICFGEdge, getEdgeKind)
 
 KIND_BASE (CHNode, getNodeKind)
 
 KIND_BASE (CHEdge, getEdgeKind)
 
std::ostream & operator<< (std::ostream &os, const SVFType &type)
 
std::string dumpLLVMValue (const SVFValue *svfValue)
 
template<typename F , typename S >
OutStreamoperator<< (OutStream &o, const std::pair< F, S > &var)
 
template<typename RangeT , typename WrappedIteratorT = decltype(std::begin(std::declval<RangeT>()))>
iter_range< pointee_iter< WrappedIteratorT > > make_pointee_range (RangeT &&Range)
 
template<typename RangeT , typename WrappedIteratorT = decltype(std::begin(std::declval<RangeT>()))>
iter_range< pointer_iterator< WrappedIteratorT > > make_pointer_range (RangeT &&Range)
 
template<class T >
iter_range< T > make_range (T x, T y)
 
template<typename T >
iter_range< T > make_range (std::pair< T, T > p)
 
template<typename T >
unsigned countTrailingZeros (T Val, ZeroBehavior ZB=ZB_Width)
 
template<typename T >
unsigned countLeadingZeros (T Val, ZeroBehavior ZB=ZB_Width)
 
template<typename T >
unsigned countPopulation (T Value)
 
template<unsigned ElementSize>
bool operator|= (SparseBitVector< ElementSize > &LHS, const SparseBitVector< ElementSize > *RHS)
 
template<unsigned ElementSize>
bool operator|= (SparseBitVector< ElementSize > *LHS, const SparseBitVector< ElementSize > &RHS)
 
template<unsigned ElementSize>
bool operator&= (SparseBitVector< ElementSize > *LHS, const SparseBitVector< ElementSize > &RHS)
 
template<unsigned ElementSize>
bool operator&= (SparseBitVector< ElementSize > &LHS, const SparseBitVector< ElementSize > *RHS)
 
template<unsigned ElementSize>
SparseBitVector< ElementSize > operator| (const SparseBitVector< ElementSize > &LHS, const SparseBitVector< ElementSize > &RHS)
 
template<unsigned ElementSize>
SparseBitVector< ElementSize > operator& (const SparseBitVector< ElementSize > &LHS, const SparseBitVector< ElementSize > &RHS)
 
template<unsigned ElementSize>
SparseBitVector< ElementSize > operator- (const SparseBitVector< ElementSize > &LHS, const SparseBitVector< ElementSize > &RHS)
 
template<unsigned ElementSize>
void dump (const SparseBitVector< ElementSize > &LHS, std::ostream &out)
 
SVFTypecreateSVFType (SVFType::GNodeK kind, bool isSingleValTy)
 
static SVFValuecreateSVFValue (SVFValue::GNodeK kind, const SVFType *type, std::string &&name)
 
template<typename SmallNumberType >
static void readSmallNumber (const cJSON *obj, SmallNumberType &val)
 
template<typename BigNumberType , typename CStrToVal >
static void readBigNumber (const cJSON *obj, BigNumberType &val, CStrToVal conv)
 
cJSONjsonCreateMap ()
 
 __attribute__ ((weak)) std
 

Detailed Description

for isBitcode

For a more detailed explanation of how External APIs are handled in SVF, please refer to the SVF Wiki: https://github.com/SVF-tools/SVF/wiki/Handling-External-APIs-with-extapi.c.

Contains abstract classes for: PTData: basic points-to data structure derived by all others. DiffPTData: PTData which only propagates new changes, not entire points-to sets. DFPTData: flow-sensitive PTData as defined by Hardekopf and Lin (CGO '11).

Hierarchy (square brackets indicate abstract class):

  +------------> [PTData] <----------------+---------------------+
  |                 ^                      |                     |
  |                 |                      |                     |

MutablePTData [DiffPTData] [DFPTData] [VersionedPTData] ^ ^ ^ | | | MutableDiffPTData MutableDFPTData MutableVersionedPTData ^ | MutableIncDFPTData

PTData (AbstractPointsToDS.h) implementations with a mutable backend. Each Key is given a points-to set which is itself updated till the analysis terminates.

PTData (AbstractPointsToDS.h) implementations with a persistent backend. Each Key is given a cheap points-to ID which refers to some real points-to set.

GraphTraits specialization for constraint graph

GraphTraits specialization

Typedef Documentation

◆ ActualParmSVFGNode

Definition at line 44 of file SVFG.h.

◆ ActualRetSVFGNode

Definition at line 45 of file SVFG.h.

◆ AddrSVFGNode

Definition at line 51 of file SVFG.h.

◆ AllocaInst

typedef llvm::AllocaInst SVF::AllocaInst

Definition at line 150 of file BasicTypes.h.

◆ APOffset

Definition at line 60 of file GeneralType.h.

◆ Argument

typedef llvm::Argument SVF::Argument

Definition at line 145 of file BasicTypes.h.

◆ ArrayType

typedef llvm::ArrayType SVF::ArrayType

Definition at line 95 of file BasicTypes.h.

◆ AtomicCmpXchgInst

typedef llvm::AtomicCmpXchgInst SVF::AtomicCmpXchgInst

Definition at line 151 of file BasicTypes.h.

◆ AtomicRMWInst

typedef llvm::AtomicRMWInst SVF::AtomicRMWInst

Definition at line 152 of file BasicTypes.h.

◆ BasicBlock

typedef llvm::BasicBlock SVF::BasicBlock

Definition at line 86 of file BasicTypes.h.

◆ BinaryOperator

typedef llvm::BinaryOperator SVF::BinaryOperator

Definition at line 179 of file BasicTypes.h.

◆ BitCastInst

typedef llvm::BitCastInst SVF::BitCastInst

Definition at line 153 of file BasicTypes.h.

◆ BlockAddress

typedef llvm::BlockAddress SVF::BlockAddress

Definition at line 91 of file BasicTypes.h.

◆ BranchInst

typedef llvm::BranchInst SVF::BranchInst

Definition at line 154 of file BasicTypes.h.

◆ bridge_gep_iterator

Definition at line 252 of file BasicTypes.h.

◆ CallBase

typedef llvm::CallBase SVF::CallBase

Definition at line 146 of file BasicTypes.h.

◆ CallBrInst

typedef llvm::CallBrInst SVF::CallBrInst

Definition at line 156 of file BasicTypes.h.

◆ CallInst

typedef llvm::CallInst SVF::CallInst

Definition at line 147 of file BasicTypes.h.

◆ CallSiteID

typedef unsigned SVF::CallSiteID

Definition at line 58 of file GeneralType.h.

◆ CallStrCxt

typedef std::vector<u32_t> SVF::CallStrCxt

Definition at line 122 of file GeneralType.h.

◆ CastInst

typedef llvm::CastInst SVF::CastInst

Definition at line 158 of file BasicTypes.h.

◆ CFLSrcSnkSolver

Definition at line 49 of file SrcSnkDDA.h.

◆ CGSCC

Definition at line 44 of file CSC.h.

◆ CHGraphReader

Definition at line 932 of file SVFFileSystem.h.

◆ CHGraphWriter

Definition at line 343 of file SVFFileSystem.h.

◆ CmpInst

typedef llvm::CmpInst SVF::CmpInst

Definition at line 159 of file BasicTypes.h.

◆ const_inst_iterator

typedef llvm::const_inst_iterator SVF::const_inst_iterator

Definition at line 250 of file BasicTypes.h.

◆ const_pred_iterator

typedef llvm::const_pred_iterator SVF::const_pred_iterator

Definition at line 254 of file BasicTypes.h.

◆ Constant

typedef llvm::Constant SVF::Constant

Definition at line 124 of file BasicTypes.h.

◆ ConstantAggregate

typedef llvm::ConstantAggregate SVF::ConstantAggregate

Definition at line 117 of file BasicTypes.h.

◆ ConstantAggregateZero

typedef llvm::ConstantAggregateZero SVF::ConstantAggregateZero

Definition at line 118 of file BasicTypes.h.

◆ ConstantArray

typedef llvm::ConstantArray SVF::ConstantArray

Definition at line 123 of file BasicTypes.h.

◆ ConstantData

typedef llvm::ConstantData SVF::ConstantData

Definition at line 116 of file BasicTypes.h.

◆ ConstantDataArray

typedef llvm::ConstantDataArray SVF::ConstantDataArray

Definition at line 121 of file BasicTypes.h.

◆ ConstantDataSequential

typedef llvm::ConstantDataSequential SVF::ConstantDataSequential

Definition at line 119 of file BasicTypes.h.

◆ ConstantExpr

typedef llvm::ConstantExpr SVF::ConstantExpr

Definition at line 120 of file BasicTypes.h.

◆ ConstantFP

typedef llvm::ConstantFP SVF::ConstantFP

Definition at line 126 of file BasicTypes.h.

◆ ConstantInt

typedef llvm::ConstantInt SVF::ConstantInt

Definition at line 125 of file BasicTypes.h.

◆ ConstantPointerNull

typedef llvm::ConstantPointerNull SVF::ConstantPointerNull

Definition at line 127 of file BasicTypes.h.

◆ ConstantStruct

typedef llvm::ConstantStruct SVF::ConstantStruct

Definition at line 106 of file BasicTypes.h.

◆ CopySVFGNode

Definition at line 52 of file SVFG.h.

◆ CxtLocDPItem

Definition at line 49 of file ContextDDA.h.

◆ CxtPtSet

Definition at line 386 of file DPItem.h.

◆ CxtVar

Context-, flow- sensitive DPItem

Context DPItem

Definition at line 385 of file DPItem.h.

◆ DataLayout

typedef llvm::DataLayout SVF::DataLayout

Definition at line 108 of file BasicTypes.h.

◆ DebugInfoFinder

typedef llvm::DebugInfoFinder SVF::DebugInfoFinder

Definition at line 239 of file BasicTypes.h.

◆ DIBasicType

typedef llvm::DIBasicType SVF::DIBasicType

Definition at line 241 of file BasicTypes.h.

◆ DICompositeType

typedef llvm::DICompositeType SVF::DICompositeType

Definition at line 237 of file BasicTypes.h.

◆ DIDerivedType

typedef llvm::DIDerivedType SVF::DIDerivedType

Definition at line 238 of file BasicTypes.h.

◆ DINode

typedef llvm::DINode SVF::DINode

Definition at line 243 of file BasicTypes.h.

◆ DINodeArray

typedef llvm::DINodeArray SVF::DINodeArray

Definition at line 244 of file BasicTypes.h.

◆ DISubprogram

typedef llvm::DISubprogram SVF::DISubprogram

Definition at line 113 of file BasicTypes.h.

◆ DISubrange

typedef llvm::DISubrange SVF::DISubrange

Definition at line 242 of file BasicTypes.h.

◆ DISubroutineType

typedef llvm::DISubroutineType SVF::DISubroutineType

Definition at line 240 of file BasicTypes.h.

◆ DIType

typedef llvm::DIType SVF::DIType

Definition at line 236 of file BasicTypes.h.

◆ DITypeRefArray

typedef llvm::DITypeRefArray SVF::DITypeRefArray

Definition at line 245 of file BasicTypes.h.

◆ DominanceFrontier

typedef llvm::DominanceFrontier SVF::DominanceFrontier

Definition at line 135 of file BasicTypes.h.

◆ DominanceFrontierBase

typedef llvm::DominanceFrontierBase<llvm::BasicBlock, false> SVF::DominanceFrontierBase

Definition at line 137 of file BasicTypes.h.

◆ DominatorTree

typedef llvm::DominatorTree SVF::DominatorTree

LLVM Dominators.

Definition at line 133 of file BasicTypes.h.

◆ DomTreeNode

typedef llvm::DomTreeNode SVF::DomTreeNode

Definition at line 134 of file BasicTypes.h.

◆ EdgeID

typedef u32_t SVF::EdgeID

Definition at line 56 of file GeneralType.h.

◆ EdgeSet

Definition at line 121 of file GeneralType.h.

◆ EdgeVector

typedef std::vector<EdgeID> SVF::EdgeVector

Definition at line 117 of file GeneralType.h.

◆ ExtractElementInst

typedef llvm::ExtractElementInst SVF::ExtractElementInst

Definition at line 161 of file BasicTypes.h.

◆ ExtractValueInst

typedef llvm::ExtractValueInst SVF::ExtractValueInst

Definition at line 160 of file BasicTypes.h.

◆ FenceInst

typedef llvm::FenceInst SVF::FenceInst

Definition at line 168 of file BasicTypes.h.

◆ FormalParmSVFGNode

Definition at line 46 of file SVFG.h.

◆ FormalRetSVFGNode

Definition at line 47 of file SVFG.h.

◆ FreezeInst

typedef llvm::FreezeInst SVF::FreezeInst

Definition at line 169 of file BasicTypes.h.

◆ Function

typedef llvm::Function SVF::Function

Definition at line 85 of file BasicTypes.h.

◆ FunctionType

typedef llvm::FunctionType SVF::FunctionType

Definition at line 98 of file BasicTypes.h.

◆ GenericCallGraphEdgeTy

Definition at line 50 of file PTACallGraph.h.

◆ GenericCallGraphNodeTy

Definition at line 173 of file PTACallGraph.h.

◆ GenericCallGraphTy

Pointer Analysis Call Graph used internally for various pointer analysis

Definition at line 240 of file PTACallGraph.h.

◆ GenericCDGEdgeTy

Definition at line 40 of file CDG.h.

◆ GenericCDGNodeTy

Definition at line 87 of file CDG.h.

◆ GenericCDGTy

Definition at line 140 of file CDG.h.

◆ GenericCFLEdgeTy

Definition at line 45 of file CFLGraph.h.

◆ GenericCFLGraphTy

Edge-labeled graph for CFL Reachability analysis.

Definition at line 172 of file CFLGraph.h.

◆ GenericCFLNodeTy

Definition at line 75 of file CFLGraph.h.

◆ GenericCHEdgeTy

Definition at line 77 of file CHG.h.

◆ GenericCHGraphTy

class hierarchy graph

Definition at line 232 of file CHG.h.

◆ GenericCHNodeTy

Definition at line 107 of file CHG.h.

◆ GenericConsEdgeTy

Self-defined edge for constraint resolution including add/remove/re-target, but all the operations do not affect original SVFIR Edges

Definition at line 47 of file ConsGEdge.h.

◆ GenericConsNodeTy

Constraint node

Definition at line 39 of file ConsGNode.h.

◆ GenericICFGEdgeTy

Interprocedural control-flow and value-flow edge, representing the control- and value-flow dependence between two nodes

Definition at line 43 of file ICFGEdge.h.

◆ GenericICFGNodeTy

Interprocedural control-flow graph node, representing different kinds of program statements including top-level pointers (ValVar) and address-taken objects (ObjVar)

Definition at line 52 of file ICFGNode.h.

◆ GenericICFGReader

Definition at line 931 of file SVFFileSystem.h.

◆ GenericICFGTy

Interprocedural Control-Flow Graph (ICFG)

Definition at line 46 of file ICFG.h.

◆ GenericICFGWriter

Definition at line 324 of file SVFFileSystem.h.

◆ GenericPAGEdgeTy

Definition at line 50 of file SVFStatements.h.

◆ GenericPAGNodeTy

Definition at line 44 of file SVFVariables.h.

◆ GenericTCTEdgeTy

Definition at line 49 of file TCT.h.

◆ GenericTCTNodeTy

Definition at line 84 of file TCT.h.

◆ GenericThreadCreateTreeTy

Pointer Analysis Call Graph used internally for various pointer analysis

Definition at line 152 of file TCT.h.

◆ GenericVFGEdgeTy

Interprocedural control-flow and value-flow edge, representing the control- and value-flow dependence between two nodes

Definition at line 43 of file VFGEdge.h.

◆ GenericVFGNodeTy

Interprocedural control-flow graph node, representing different kinds of program statements including top-level pointers (ValVar) and address-taken objects (ObjVar)

Definition at line 45 of file VFGNode.h.

◆ GenericVFGTy

Value Flow Graph (VFG)

Definition at line 49 of file VFG.h.

◆ gep_type_iterator

typedef llvm::gep_type_iterator SVF::gep_type_iterator

Definition at line 251 of file BasicTypes.h.

◆ GEPOperator

typedef llvm::GEPOperator SVF::GEPOperator

Definition at line 182 of file BasicTypes.h.

◆ GepSVFGNode

Definition at line 55 of file SVFG.h.

◆ GetElementPtrInst

typedef llvm::GetElementPtrInst SVF::GetElementPtrInst

Definition at line 162 of file BasicTypes.h.

◆ GlobalAlias

typedef llvm::GlobalAlias SVF::GlobalAlias

Definition at line 128 of file BasicTypes.h.

◆ GlobalIFunc

typedef llvm::GlobalIFunc SVF::GlobalIFunc

Definition at line 129 of file BasicTypes.h.

◆ GlobalObject

typedef llvm::GlobalObject SVF::GlobalObject

Definition at line 71 of file BasicTypes.h.

◆ GlobalValue

typedef llvm::GlobalValue SVF::GlobalValue

Definition at line 88 of file BasicTypes.h.

◆ GlobalVariable

typedef llvm::GlobalVariable SVF::GlobalVariable

Definition at line 130 of file BasicTypes.h.

◆ GraphPrinter

LLVM Aliases and constants.

Definition at line 41 of file SVFValue.h.

◆ ICFGCycleWTO

Definition at line 45 of file ICFGWTO.h.

◆ ICFGSingletonWTO

Definition at line 44 of file ICFGWTO.h.

◆ ICFGWTOComp

Definition at line 43 of file ICFGWTO.h.

◆ InsertElementInst

typedef llvm::InsertElementInst SVF::InsertElementInst

Definition at line 171 of file BasicTypes.h.

◆ InsertValueInst

typedef llvm::InsertValueInst SVF::InsertValueInst

Definition at line 167 of file BasicTypes.h.

◆ inst_iterator

typedef llvm::inst_iterator SVF::inst_iterator

Definition at line 249 of file BasicTypes.h.

◆ Instruction

typedef llvm::Instruction SVF::Instruction

Definition at line 87 of file BasicTypes.h.

◆ IntegerType

typedef llvm::IntegerType SVF::IntegerType

Definition at line 97 of file BasicTypes.h.

◆ InterPHISVFGNode

Definition at line 58 of file SVFG.h.

◆ IntraPHISVFGNode

Definition at line 57 of file SVFG.h.

◆ IntToPtrInst

typedef llvm::IntToPtrInst SVF::IntToPtrInst

Definition at line 166 of file BasicTypes.h.

◆ InvokeInst

typedef llvm::InvokeInst SVF::InvokeInst

Definition at line 163 of file BasicTypes.h.

◆ IRBuilder

typedef llvm::IRBuilder SVF::IRBuilder

Definition at line 74 of file BasicTypes.h.

◆ IRGraphReader

Definition at line 933 of file SVFFileSystem.h.

◆ IRGraphWriter

Definition at line 342 of file SVFFileSystem.h.

◆ KindBaseT

template<typename T >
using SVF::KindBaseT = typedef typename KindBaseHelper<T>::type

Definition at line 679 of file SVFFileSystem.h.

◆ Label

Definition at line 41 of file CFLSolver.h.

◆ LandingPadInst

typedef llvm::LandingPadInst SVF::LandingPadInst

Definition at line 172 of file BasicTypes.h.

◆ LLVMContext

typedef llvm::LLVMContext SVF::LLVMContext

Definition at line 70 of file BasicTypes.h.

◆ LoadInst

typedef llvm::LoadInst SVF::LoadInst

Definition at line 149 of file BasicTypes.h.

◆ LoadSVFGNode

Definition at line 54 of file SVFG.h.

◆ LocDPItem

Definition at line 48 of file FlowDDA.h.

◆ Loop

typedef llvm::Loop SVF::Loop

LLVM Loop.

Definition at line 140 of file BasicTypes.h.

◆ LoopInfo

typedef llvm::LoopInfo SVF::LoopInfo

Definition at line 141 of file BasicTypes.h.

◆ Map

template<typename Key , typename Value , typename Hash = Hash<Key>, typename KeyEqual = std::equal_to<Key>, typename Allocator = std::allocator<std::pair<const Key, Value>>>
using SVF::Map = typedef std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>

Definition at line 101 of file GeneralType.h.

◆ MDNode

typedef llvm::MDNode SVF::MDNode

Definition at line 112 of file BasicTypes.h.

◆ MDString

typedef llvm::MDString SVF::MDString

Definition at line 101 of file BasicTypes.h.

◆ MemoryLocation

typedef llvm::MemoryLocation SVF::MemoryLocation

Definition at line 107 of file BasicTypes.h.

◆ MetadataAsValue

typedef llvm::MetadataAsValue SVF::MetadataAsValue

Definition at line 102 of file BasicTypes.h.

◆ Module

typedef llvm::Module SVF::Module

Definition at line 84 of file BasicTypes.h.

◆ ModulePass

typedef llvm::ModulePass SVF::ModulePass

Definition at line 73 of file BasicTypes.h.

◆ MRID

typedef NodeID SVF::MRID

Definition at line 50 of file MemRegion.h.

◆ MRVERID

Definition at line 51 of file MemRegion.h.

◆ MRVERSION

Definition at line 52 of file MemRegion.h.

◆ NamedMDNode

typedef llvm::NamedMDNode SVF::NamedMDNode

LLVM metadata and debug information.

Definition at line 111 of file BasicTypes.h.

◆ NodeBS

Definition at line 62 of file GeneralType.h.

◆ NodeDeque

typedef std::deque<NodeID> SVF::NodeDeque

Definition at line 120 of file GeneralType.h.

◆ NodeID

typedef u32_t SVF::NodeID

Definition at line 55 of file GeneralType.h.

◆ NodeList

typedef std::list<NodeID> SVF::NodeList

Definition at line 119 of file GeneralType.h.

◆ NodePair

typedef std::pair<NodeID, NodeID> SVF::NodePair

Definition at line 111 of file GeneralType.h.

◆ NodePairMap

Definition at line 115 of file GeneralType.h.

◆ NodePairSet

Definition at line 114 of file GeneralType.h.

◆ NodePairVector

typedef std::vector<std::pair<NodeID, NodeID> > SVF::NodePairVector

Definition at line 139 of file CDG.h.

◆ NodeSet

Definition at line 113 of file GeneralType.h.

◆ NodeStack

typedef std::stack<NodeID> SVF::NodeStack

Definition at line 118 of file GeneralType.h.

◆ NodeVector

typedef std::vector<NodeID> SVF::NodeVector

Definition at line 116 of file GeneralType.h.

◆ NullPtrSVFGNode

Definition at line 49 of file SVFG.h.

◆ OrderedMap

template<typename Key , typename Value , typename Compare = std::less<Key>, typename Allocator = std::allocator<std::pair<const Key, Value>>>
using SVF::OrderedMap = typedef std::map<Key, Value, Compare, Allocator>

Definition at line 109 of file GeneralType.h.

◆ OrderedNodeSet

Definition at line 112 of file GeneralType.h.

◆ OrderedSet

template<typename Key , typename Compare = std::less<Key>, typename Allocator = std::allocator<Key>>
using SVF::OrderedSet = typedef std::set<Key, Compare, Allocator>

Definition at line 105 of file GeneralType.h.

◆ OutStream

typedef std::ostream SVF::OutStream

Definition at line 45 of file GeneralType.h.

◆ PAG

typedef SVFIR SVF::PAG

Definition at line 700 of file SVFIR.h.

◆ PAGEdge

Definition at line 43 of file IRGraph.h.

◆ PAGNode

Definition at line 42 of file IRGraph.h.

◆ PHINode

typedef llvm::PHINode SVF::PHINode

Definition at line 165 of file BasicTypes.h.

◆ PHISVFGNode

Definition at line 56 of file SVFG.h.

◆ PointerType

typedef llvm::PointerType SVF::PointerType

Definition at line 96 of file BasicTypes.h.

◆ PointsToID

typedef unsigned SVF::PointsToID

Definition at line 63 of file GeneralType.h.

◆ PostDominatorTree

typedef llvm::PostDominatorTree SVF::PostDominatorTree

Definition at line 136 of file BasicTypes.h.

◆ raw_fd_ostream

typedef llvm::raw_fd_ostream SVF::raw_fd_ostream

LLVM outputs.

Definition at line 264 of file BasicTypes.h.

◆ raw_pointer_iterator

template<typename WrappedIteratorT , typename T1 = std::remove_reference_t<decltype( **std::declval<WrappedIteratorT>())>, typename T2 = std::add_pointer_t<T1>>
using SVF::raw_pointer_iterator = typedef pointer_iterator<pointee_iter<WrappedIteratorT, T1>, T2>

Definition at line 402 of file iterator.h.

◆ ResumeInst

typedef llvm::ResumeInst SVF::ResumeInst

Definition at line 173 of file BasicTypes.h.

◆ ReturnInst

typedef llvm::ReturnInst SVF::ReturnInst

Definition at line 157 of file BasicTypes.h.

◆ s16_t

typedef signed short SVF::s16_t

Definition at line 53 of file GeneralType.h.

◆ s32_t

typedef signed SVF::s32_t

Definition at line 47 of file GeneralType.h.

◆ s64_t

typedef signed long long SVF::s64_t

Definition at line 49 of file GeneralType.h.

◆ s8_t

typedef signed char SVF::s8_t

Definition at line 51 of file GeneralType.h.

◆ ScalarEvolution

typedef llvm::ScalarEvolution SVF::ScalarEvolution

Definition at line 260 of file BasicTypes.h.

◆ ScalarEvolutionWrapperPass

typedef llvm::ScalarEvolutionWrapperPass SVF::ScalarEvolutionWrapperPass

Definition at line 257 of file BasicTypes.h.

◆ SCEV

typedef llvm::SCEV SVF::SCEV

Definition at line 261 of file BasicTypes.h.

◆ SCEVAddRecExpr

typedef llvm::SCEVAddRecExpr SVF::SCEVAddRecExpr

Definition at line 258 of file BasicTypes.h.

◆ SCEVConstant

typedef llvm::SCEVConstant SVF::SCEVConstant

Definition at line 259 of file BasicTypes.h.

◆ SelectInst

typedef llvm::SelectInst SVF::SelectInst

Definition at line 174 of file BasicTypes.h.

◆ Set

template<typename Key , typename Hash = Hash<Key>, typename KeyEqual = std::equal_to<Key>, typename Allocator = std::allocator<Key>>
using SVF::Set = typedef std::unordered_set<Key, Hash, KeyEqual, Allocator>

Definition at line 96 of file GeneralType.h.

◆ ShuffleVectorInst

typedef llvm::ShuffleVectorInst SVF::ShuffleVectorInst

Definition at line 164 of file BasicTypes.h.

◆ SMDiagnostic

typedef llvm::SMDiagnostic SVF::SMDiagnostic

Definition at line 90 of file BasicTypes.h.

◆ StmtSVFGNode

Definition at line 50 of file SVFG.h.

◆ StoreInst

typedef llvm::StoreInst SVF::StoreInst

Definition at line 148 of file BasicTypes.h.

◆ StoreSVFGNode

Definition at line 53 of file SVFG.h.

◆ StructLayout

typedef llvm::StructLayout SVF::StructLayout

Definition at line 105 of file BasicTypes.h.

◆ StructType

typedef llvm::StructType SVF::StructType

LLVM types.

Definition at line 94 of file BasicTypes.h.

◆ succ_const_iterator

typedef llvm::succ_const_iterator SVF::succ_const_iterator

LLVM Iterators.

Definition at line 276 of file BasicTypes.h.

◆ SuccBBAndCondValPair

typedef std::pair<const BasicBlock*, const ConstantInt*> SVF::SuccBBAndCondValPair

Definition at line 185 of file BasicTypes.h.

◆ SuccBBAndCondValPairVec

Definition at line 186 of file BasicTypes.h.

◆ SVFGEdge

Definition at line 42 of file SVFG.h.

◆ SVFGNode

Definition at line 43 of file SVFG.h.

◆ SwitchInst

typedef llvm::SwitchInst SVF::SwitchInst

Definition at line 155 of file BasicTypes.h.

◆ SymID

typedef unsigned SVF::SymID

Definition at line 57 of file GeneralType.h.

◆ ThreadID

typedef unsigned SVF::ThreadID

Definition at line 59 of file GeneralType.h.

◆ Type

typedef llvm::Type SVF::Type

Definition at line 83 of file BasicTypes.h.

◆ u16_t

typedef unsigned short SVF::u16_t

Definition at line 52 of file GeneralType.h.

◆ u32_t

typedef unsigned SVF::u32_t

Definition at line 46 of file GeneralType.h.

◆ u64_t

typedef unsigned long long SVF::u64_t

Definition at line 48 of file GeneralType.h.

◆ u8_t

typedef unsigned char SVF::u8_t

Definition at line 50 of file GeneralType.h.

◆ UnaryOperator

typedef llvm::UnaryOperator SVF::UnaryOperator

Definition at line 180 of file BasicTypes.h.

◆ UndefValue

typedef llvm::UndefValue SVF::UndefValue

Definition at line 181 of file BasicTypes.h.

◆ UnifyFunctionExitNodes

typedef llvm::UnifyFunctionExitNodes SVF::UnifyFunctionExitNodes

Definition at line 78 of file BasicTypes.h.

◆ UnreachableInst

typedef llvm::UnreachableInst SVF::UnreachableInst

Definition at line 170 of file BasicTypes.h.

◆ Use

typedef llvm::Use SVF::Use

Definition at line 72 of file BasicTypes.h.

◆ User

typedef llvm::User SVF::User

Definition at line 142 of file BasicTypes.h.

◆ VAArgInst

typedef llvm::VAArgInst SVF::VAArgInst

Definition at line 175 of file BasicTypes.h.

◆ VACopyInst

typedef llvm::VACopyInst SVF::VACopyInst

Definition at line 176 of file BasicTypes.h.

◆ VAEndInst

typedef llvm::VAEndInst SVF::VAEndInst

Definition at line 177 of file BasicTypes.h.

◆ Value

typedef llvm::Value SVF::Value

LLVM Basic classes.

Definition at line 82 of file BasicTypes.h.

◆ VAStartInst

typedef llvm::VAStartInst SVF::VAStartInst

Definition at line 178 of file BasicTypes.h.

◆ VectorType

typedef llvm::VectorType SVF::VectorType

Definition at line 267 of file BasicTypes.h.

◆ Version

typedef unsigned SVF::Version

Definition at line 123 of file GeneralType.h.

◆ VersionedVar

typedef std::pair<NodeID, Version> SVF::VersionedVar

Definition at line 125 of file GeneralType.h.

◆ VersionedVarSet

Definition at line 126 of file GeneralType.h.

◆ VersionSet

Definition at line 124 of file GeneralType.h.

◆ VFunSet

typedef Set<const SVFFunction*> SVF::VFunSet

Definition at line 47 of file CHG.h.

◆ VTableSet

Definition at line 46 of file CHG.h.

◆ WPAConstraintSolver

Abstract class of inclusion-based Pointer Analysis

Equivalence-based Pointer Analysis

Definition at line 55 of file Andersen.h.

◆ WPASVFGFSSolver

Flow sensitive whole program pointer analysis

Definition at line 48 of file FlowSensitive.h.

Enumeration Type Documentation

◆ AliasResult

Enumerator
NoAlias 
MayAlias 
MustAlias 
PartialAlias 

Definition at line 526 of file SVFType.h.

527 {
528  NoAlias,
529  MayAlias,
530  MustAlias,
531  PartialAlias,
532 };
@ PartialAlias
Definition: SVFType.h:531
@ MustAlias
Definition: SVFType.h:530
@ MayAlias
Definition: SVFType.h:529
@ NoAlias
Definition: SVFType.h:528

◆ BuildDirection

enum SVF::BuildDirection
strong
Enumerator
plain 
bidirection 

Definition at line 40 of file CFLGraphBuilder.h.

41 {
42  plain,
44 };

◆ ModRefInfo

Enumerator
ModRef 
Ref 
Mod 
NoModRef 

Definition at line 518 of file SVFType.h.

519 {
520  ModRef,
521  Ref,
522  Mod,
523  NoModRef,
524 };
@ Ref
Definition: SVFType.h:521
@ NoModRef
Definition: SVFType.h:523
@ ModRef
Definition: SVFType.h:520
@ Mod
Definition: SVFType.h:522

◆ ZeroBehavior

The behavior an operation has on an input of 0.

Enumerator
ZB_Undefined 

The returned value is undefined.

ZB_Max 

The returned value is numeric_limits<T>::max()

ZB_Width 

The returned value is numeric_limits<T>::digits.

Definition at line 36 of file SparseBitVector.h.

37 {
41  ZB_Max,
43  ZB_Width
44 };
@ ZB_Undefined
The returned value is undefined.
@ ZB_Max
The returned value is numeric_limits<T>::max()
@ ZB_Width
The returned value is numeric_limits<T>::digits.

Function Documentation

◆ __attribute__()

SVF::__attribute__ ( (weak)  )

Definition at line 10 of file SVFType.cpp.

12 {
13  std::ostringstream os;
14  print(os);
15  return os.str();
16 }
17 
18 std::ostream& operator<<(std::ostream& os, const SVFType& type)
19 {
20  type.print(os);
21  return os;
22 }
newitem type
Definition: cJSON.cpp:2739
static unsigned char * print(const cJSON *const item, cJSON_bool format, const internal_hooks *const hooks)
Definition: cJSON.cpp:1189
IntervalValue operator<<(const IntervalValue &lhs, const IntervalValue &rhs)
Left binary shift of IntervalValues.

◆ children()

template<class GraphType >
iter_range<typename GenericGraphTraits<GraphType>::ChildIteratorType> SVF::children ( const typename GenericGraphTraits< GraphType >::NodeRef &  G)

Definition at line 126 of file GraphTraits.h.

127 {
128  return make_range(GenericGraphTraits<GraphType>::child_begin(G),
129  GenericGraphTraits<GraphType>::child_end(G));
130 }
iter_range< T > make_range(T x, T y)

◆ children_edges()

template<class GraphType >
iter_range<typename GenericGraphTraits<GraphType>::ChildEdgeIteratorType> SVF::children_edges ( const typename GenericGraphTraits< GraphType >::NodeRef &  G)

Definition at line 142 of file GraphTraits.h.

143 {
144  return make_range(GenericGraphTraits<GraphType>::child_edge_begin(G),
145  GenericGraphTraits<GraphType>::child_edge_end(G));
146 }

◆ countLeadingZeros()

template<typename T >
unsigned SVF::countLeadingZeros ( Val,
ZeroBehavior  ZB = ZB_Width 
)

Count number of 0's from the most significant bit to the least stopping at the first 1.

Only unsigned integral types are allowed.

Parameters
ZBthe behavior on an input of 0. Only ZB_Width and ZB_Undefined are valid arguments.

Definition at line 211 of file SparseBitVector.h.

212 {
213  static_assert(std::numeric_limits<T>::is_integer &&
214  !std::numeric_limits<T>::is_signed,
215  "Only unsigned integral types are allowed.");
216  return LeadingZerosCounter<T, sizeof(T)>::count(Val, ZB);
217 }
int count
Definition: cJSON.h:216

◆ countPopulation()

template<typename T >
unsigned SVF::countPopulation ( Value)
inline

Count the number of set bits in a value. Ex. countPopulation(0xF000F000) = 8 Returns 0 if the word is zero.

Definition at line 239 of file SparseBitVector.h.

240 {
241  static_assert(std::numeric_limits<T>::is_integer &&
242  !std::numeric_limits<T>::is_signed,
243  "Only unsigned integral types are allowed.");
244  return PopulationCounter<T, sizeof(T)>::count(Value);
245 }
llvm::Value Value
LLVM Basic classes.
Definition: BasicTypes.h:82

◆ countTrailingZeros()

template<typename T >
unsigned SVF::countTrailingZeros ( Val,
ZeroBehavior  ZB = ZB_Width 
)

Count number of 0's from the least significant bit to the most stopping at the first 1.

Only unsigned integral types are allowed.

Parameters
ZBthe behavior on an input of 0. Only ZB_Width and ZB_Undefined are valid arguments.

Definition at line 119 of file SparseBitVector.h.

120 {
121  static_assert(std::numeric_limits<T>::is_integer &&
122  !std::numeric_limits<T>::is_signed,
123  "Only unsigned integral types are allowed.");
124  return TrailingZerosCounter<T, sizeof(T)>::count(Val, ZB);
125 }

◆ createSVFType()

SVFType* SVF::createSVFType ( SVFType::GNodeK  kind,
bool  isSingleValTy 
)

Definition at line 17 of file SVFFileSystem.cpp.

18 {
19  switch (kind)
20  {
21  default:
22  ABORT_MSG(kind << " is an impossible SVFTyKind in create()");
23  case SVFType::SVFTy:
24  ABORT_MSG("Creation of RAW SVFType isn't allowed");
25  case SVFType::SVFPointerTy:
26  ABORT_IFNOT(isSingleValTy, "Pointer type must be single-valued");
27  return new SVFPointerType();
28  case SVFType::SVFIntegerTy:
29  ABORT_IFNOT(isSingleValTy, "Integer type must be single-valued");
30  return new SVFIntegerType();
31  case SVFType::SVFFunctionTy:
32  ABORT_IFNOT(!isSingleValTy, "Function type must be multi-valued");
33  return new SVFFunctionType(nullptr);
34  case SVFType::SVFStructTy:
35  ABORT_IFNOT(!isSingleValTy, "Struct type must be multi-valued");
36  return new SVFStructType();
37  case SVFType::SVFArrayTy:
38  ABORT_IFNOT(!isSingleValTy, "Array type must be multi-valued");
39  return new SVFArrayType();
40  case SVFType::SVFOtherTy:
41  return new SVFOtherType(isSingleValTy);
42  }
43 }
#define ABORT_MSG(msg)
#define ABORT_IFNOT(condition, msg)

◆ createSVFValue()

static SVFValue* SVF::createSVFValue ( SVFValue::GNodeK  kind,
const SVFType type,
std::string &&  name 
)
static

Definition at line 45 of file SVFFileSystem.cpp.

47 {
48  auto creator = [=]() -> SVFValue*
49  {
50  switch (kind)
51  {
52  default:
53  ABORT_MSG(kind << " is an impossible SVFValueKind in create()");
54  case SVFValue::SVFVal:
55  ABORT_MSG("Creation of RAW SVFValue isn't allowed");
56  case SVFValue::SVFFunc:
57  return new SVFFunction(type, {}, {}, {}, {}, {}, {});
58  case SVFValue::SVFBB:
59  return new SVFBasicBlock(type, {});
60  case SVFValue::SVFInst:
61  return new SVFInstruction(type, {}, {}, {});
62  case SVFValue::SVFCall:
63  return new SVFCallInst(type, {}, {}, {});
64  case SVFValue::SVFVCall:
65  return new SVFVirtualCallInst(type, {}, {}, {});
66  case SVFValue::SVFGlob:
67  return new SVFGlobalValue(type);
68  case SVFValue::SVFArg:
69  return new SVFArgument(type, {}, {}, {});
70  case SVFValue::SVFConst:
71  return new SVFConstant(type);
72  case SVFValue::SVFConstData:
73  return new SVFConstantData(type);
74  case SVFValue::SVFConstInt:
75  return new SVFConstantInt(type, {}, {});
76  case SVFValue::SVFConstFP:
77  return new SVFConstantFP(type, {});
78  case SVFValue::SVFNullPtr:
79  return new SVFConstantNullPtr(type);
80  case SVFValue::SVFBlackHole:
81  return new SVFBlackHoleValue(type);
82  case SVFValue::SVFMetaAsValue:
83  return new SVFMetadataAsValue(type);
84  case SVFValue::SVFOther:
85  return new SVFOtherValue(type);
86  }
87  };
88  auto val = creator();
89  val->setName(std::move(name));
90  return val;
91 }
const char *const name
Definition: cJSON.h:264
constexpr std::remove_reference< T >::type && move(T &&t) noexcept
Definition: SVFUtil.h:447

◆ dump()

template<unsigned ElementSize>
void SVF::dump ( const SparseBitVector< ElementSize > &  LHS,
std::ostream &  out 
)

Definition at line 1233 of file SparseBitVector.h.

1234 {
1235  out << "[";
1236 
1237  typename SparseBitVector<ElementSize>::iterator bi = LHS.begin(),
1238  be = LHS.end();
1239  if (bi != be)
1240  {
1241  out << *bi;
1242  for (++bi; bi != be; ++bi)
1243  {
1244  out << " " << *bi;
1245  }
1246  }
1247  out << "]\n";
1248 }
SparseBitVectorIterator iterator
iterator end() const
iterator begin() const

◆ dumpLLVMValue()

std::string SVF::dumpLLVMValue ( const SVFValue svfValue)

[FOR DEBUG ONLY, DON'T USE IT UNSIDE svf!] Converts an SVFValue to corresponding LLVM::Value, then get the string representation of it. Use it only when you are debugging. Don't use it in any SVF algorithm because it relies on information stored in LLVM bc.

◆ inverse_children()

template<class GraphType >
iter_range<typename GenericGraphTraits<Inverse<GraphType> >::ChildIteratorType> SVF::inverse_children ( const typename GenericGraphTraits< GraphType >::NodeRef &  G)

Definition at line 134 of file GraphTraits.h.

135 {
136  return make_range(GenericGraphTraits<Inverse<GraphType>>::child_begin(G),
137  GenericGraphTraits<Inverse<GraphType>>::child_end(G));
138 }

◆ inverse_nodes()

template<class GraphType >
iter_range<typename GenericGraphTraits<Inverse<GraphType> >::nodes_iterator> SVF::inverse_nodes ( const GraphType &  G)

Definition at line 118 of file GraphTraits.h.

119 {
120  return make_range(GenericGraphTraits<Inverse<GraphType>>::nodes_begin(G),
121  GenericGraphTraits<Inverse<GraphType>>::nodes_end(G));
122 }

◆ jsonAddItemToArray()

bool SVF::jsonAddItemToArray ( cJSON array,
cJSON item 
)

Definition at line 944 of file SVFFileSystem.cpp.

945 {
946  return cJSON_AddItemToArray(array, item);
947 }
cJSON * item
Definition: cJSON.h:222

◆ jsonAddItemToObject()

bool SVF::jsonAddItemToObject ( cJSON obj,
const char *  name,
cJSON item 
)

Definition at line 938 of file SVFFileSystem.cpp.

939 {
940  return humanReadableOption() ? cJSON_AddItemToObject(obj, name, item)
941  : cJSON_AddItemToArray(obj, item);
942 }
static const Option< bool > humanReadableOption("human-readable", "Whether to output human-readable JSON", true)

◆ jsonAddNumberToObject()

bool SVF::jsonAddNumberToObject ( cJSON obj,
const char *  name,
double  number 
)

Helper function to write a number to a JSON object.

Definition at line 787 of file SVFFileSystem.cpp.

788 {
789  cJSON* node = cJSON_CreateNumber(number);
790  return jsonAddItemToObject(obj, name, node);
791 }
const char *const const double number
Definition: cJSON.h:268
bool jsonAddItemToObject(cJSON *obj, const char *name, cJSON *item)
Definition: cJSON.h:104

◆ jsonAddPairToMap()

bool SVF::jsonAddPairToMap ( cJSON obj,
cJSON key,
cJSON value 
)

Definition at line 929 of file SVFFileSystem.cpp.

930 {
931  cJSON* pair = cJSON_CreateArray();
932  jsonAddItemToArray(pair, key);
933  jsonAddItemToArray(pair, value);
934  jsonAddItemToArray(mapObj, pair);
935  return pair;
936 }
bool jsonAddItemToArray(cJSON *array, cJSON *item)

◆ jsonAddStringToObject() [1/2]

bool SVF::jsonAddStringToObject ( cJSON obj,
const char *  name,
const char *  str 
)

Definition at line 793 of file SVFFileSystem.cpp.

794 {
795  cJSON* node = cJSON_CreateStringReference(str);
796  return jsonAddItemToObject(obj, name, node);
797 }

◆ jsonAddStringToObject() [2/2]

bool SVF::jsonAddStringToObject ( cJSON obj,
const char *  name,
const std::string s 
)

Definition at line 799 of file SVFFileSystem.cpp.

800 {
801  return jsonAddStringToObject(obj, name, s.c_str());
802 }
bool jsonAddStringToObject(cJSON *obj, const char *name, const char *str)

◆ jsonCreateArray()

cJSON * SVF::jsonCreateArray ( )

Definition at line 894 of file SVFFileSystem.cpp.

895 {
896  return cJSON_CreateArray();
897 }

◆ jsonCreateBool()

cJSON * SVF::jsonCreateBool ( bool  flag)

Definition at line 918 of file SVFFileSystem.cpp.

919 {
920  bool hr = humanReadableOption();
921  return hr ? cJSON_CreateBool(flag) : cJSON_CreateNumber(flag);
922 }

◆ jsonCreateIndex()

cJSON * SVF::jsonCreateIndex ( size_t  index)

Definition at line 910 of file SVFFileSystem.cpp.

911 {
912  constexpr size_t maxPreciseIntInDouble = (1ull << 53);
913  (void)maxPreciseIntInDouble; // silence unused warning
914  assert(index <= maxPreciseIntInDouble);
915  return cJSON_CreateNumber(index);
916 }
int index
Definition: cJSON.h:170

◆ jsonCreateMap()

cJSON* SVF::jsonCreateMap ( )

Definition at line 899 of file SVFFileSystem.cpp.

900 {
901  // Don't use cJSON_CreateObject() here, because it only allows string keys.
902  return cJSON_CreateArray();
903 }

◆ jsonCreateNullId()

cJSON * SVF::jsonCreateNullId ( )

Definition at line 883 of file SVFFileSystem.cpp.

884 {
885  // TODO: optimize
886  return cJSON_CreateNull();
887 }

◆ jsonCreateNumber()

cJSON * SVF::jsonCreateNumber ( double  num)

Definition at line 924 of file SVFFileSystem.cpp.

925 {
926  return cJSON_CreateNumber(num);
927 }

◆ jsonCreateObject()

cJSON * SVF::jsonCreateObject ( )

Definition at line 889 of file SVFFileSystem.cpp.

890 {
891  return humanReadableOption() ? cJSON_CreateObject() : cJSON_CreateArray();
892 }

◆ jsonCreateString()

cJSON * SVF::jsonCreateString ( const char *  str)

Definition at line 905 of file SVFFileSystem.cpp.

906 {
907  return cJSON_CreateStringReference(str);
908 }

◆ jsonGetNumber()

double SVF::jsonGetNumber ( const cJSON item)

Definition at line 877 of file SVFFileSystem.cpp.

878 {
879  ABORT_IFNOT(jsonIsNumber(item), "Expected number for " << JSON_KEY(item));
880  return item->valuedouble;
881 }
#define JSON_KEY(json)
Definition: SVFFileSystem.h:64
bool jsonIsNumber(const cJSON *item)
double valuedouble
Definition: cJSON.h:119

◆ jsonIsArray()

bool SVF::jsonIsArray ( const cJSON item)

Definition at line 846 of file SVFFileSystem.cpp.

847 {
848  return cJSON_IsArray(item);
849 }

◆ jsonIsBool() [1/2]

bool SVF::jsonIsBool ( const cJSON item)

Definition at line 804 of file SVFFileSystem.cpp.

805 {
806  return humanReadableOption()
807  ? cJSON_IsBool(item)
808  : cJSON_IsNumber(item) &&
809  (item->valuedouble == 0 || item->valuedouble == 1);
810 }
newitem valuedouble
Definition: cJSON.cpp:2741

◆ jsonIsBool() [2/2]

bool SVF::jsonIsBool ( const cJSON item,
bool &  flag 
)

Definition at line 812 of file SVFFileSystem.cpp.

813 {
814  if (humanReadableOption())
815  {
816  if (!cJSON_IsBool(item))
817  return false;
818  flag = cJSON_IsTrue(item);
819  return true;
820  }
821  else
822  {
823  if (!cJSON_IsNumber(item))
824  return false;
825  flag = item->valuedouble == 1;
826  return true;
827  }
828 }

◆ jsonIsMap()

bool SVF::jsonIsMap ( const cJSON item)

Definition at line 851 of file SVFFileSystem.cpp.

852 {
853  return cJSON_IsArray(item);
854 }

◆ jsonIsNullId()

bool SVF::jsonIsNullId ( const cJSON item)

Definition at line 840 of file SVFFileSystem.cpp.

841 {
842  // TODO: optimize
843  return cJSON_IsNull(item);
844 }

◆ jsonIsNumber()

bool SVF::jsonIsNumber ( const cJSON item)

Definition at line 830 of file SVFFileSystem.cpp.

831 {
832  return cJSON_IsNumber(item);
833 }

◆ jsonIsObject()

bool SVF::jsonIsObject ( const cJSON item)

Definition at line 856 of file SVFFileSystem.cpp.

857 {
858  return humanReadableOption() ? cJSON_IsObject(item) : cJSON_IsArray(item);
859 }

◆ jsonIsString()

bool SVF::jsonIsString ( const cJSON item)

Definition at line 835 of file SVFFileSystem.cpp.

836 {
837  return cJSON_IsString(item);
838 }

◆ jsonKeyEquals()

bool SVF::jsonKeyEquals ( const cJSON item,
const char *  key 
)

Definition at line 861 of file SVFFileSystem.cpp.

862 {
863  return item && !(humanReadableOption() && std::strcmp(item->string, key));
864 }
char * string
Definition: cJSON.h:122

◆ jsonUnpackPair()

std::pair< const cJSON *, const cJSON * > SVF::jsonUnpackPair ( const cJSON item)

Definition at line 866 of file SVFFileSystem.cpp.

867 {
868  ABORT_IFNOT(jsonIsArray(item), "Expected array as pair");
869  cJSON* child1 = item->child;
870  ABORT_IFNOT(child1, "Missing first child of pair");
871  cJSON* child2 = child1->next;
872  ABORT_IFNOT(child2, "Missing first child of pair");
873  ABORT_IFNOT(!child2->next, "Pair has more than two children");
874  return {child1, child2};
875 }
bool jsonIsArray(const cJSON *item)
struct cJSON * child
Definition: cJSON.h:109
struct cJSON * next
Definition: cJSON.h:106

◆ KIND_BASE() [1/8]

SVF::KIND_BASE ( CHEdge  ,
getEdgeKind   
)

◆ KIND_BASE() [2/8]

SVF::KIND_BASE ( CHNode  ,
getNodeKind   
)

◆ KIND_BASE() [3/8]

SVF::KIND_BASE ( ICFGEdge  ,
getEdgeKind   
)

◆ KIND_BASE() [4/8]

SVF::KIND_BASE ( ICFGNode  ,
getNodeKind   
)

◆ KIND_BASE() [5/8]

SVF::KIND_BASE ( SVFStmt  ,
getEdgeKind   
)

◆ KIND_BASE() [6/8]

SVF::KIND_BASE ( SVFType  ,
getKind   
)

◆ KIND_BASE() [7/8]

SVF::KIND_BASE ( SVFValue  ,
getKind   
)

◆ KIND_BASE() [8/8]

SVF::KIND_BASE ( SVFVar  ,
getNodeKind   
)

◆ make_pointee_range()

template<typename RangeT , typename WrappedIteratorT = decltype(std::begin(std::declval<RangeT>()))>
iter_range<pointee_iter<WrappedIteratorT> > SVF::make_pointee_range ( RangeT &&  Range)

Definition at line 355 of file iterator.h.

356 {
357  using PointeeIteratorT = pointee_iter<WrappedIteratorT>;
358  return make_range(PointeeIteratorT(std::begin(std::forward<RangeT>(Range))),
359  PointeeIteratorT(std::end(std::forward<RangeT>(Range))));
360 }

◆ make_pointer_range()

template<typename RangeT , typename WrappedIteratorT = decltype(std::begin(std::declval<RangeT>()))>
iter_range<pointer_iterator<WrappedIteratorT> > SVF::make_pointer_range ( RangeT &&  Range)

Definition at line 391 of file iterator.h.

392 {
393  using PointerIteratorT = pointer_iterator<WrappedIteratorT>;
394  return make_range(PointerIteratorT(std::begin(std::forward<RangeT>(Range))),
395  PointerIteratorT(std::end(std::forward<RangeT>(Range))));
396 }

◆ make_range() [1/2]

template<typename T >
iter_range<T> SVF::make_range ( std::pair< T, T >  p)

Definition at line 69 of file iterator_range.h.

70 {
71  return iter_range<T>(std::move(p.first), std::move(p.second));
72 }
cJSON * p
Definition: cJSON.cpp:2559

◆ make_range() [2/2]

template<class T >
iter_range<T> SVF::make_range ( x,
y 
)

Convenience function for iterating over sub-ranges.

This provides a bit of syntactic sugar to make using sub-ranges in for loops a bit easier. Analogous to std::make_pair().

Definition at line 64 of file iterator_range.h.

65 {
66  return iter_range<T>(std::move(x), std::move(y));
67 }

◆ map_iter()

template<class ItTy , class FuncTy >
mapped_iter<ItTy, FuncTy> SVF::map_iter ( ItTy  I,
FuncTy  F 
)
inline

Definition at line 748 of file GenericGraph.h.

749 {
750  return mapped_iter<ItTy, FuncTy>(std::move(I), std::move(F));
751 }
#define F(f)

◆ nodes()

template<class GraphType >
iter_range<typename GenericGraphTraits<GraphType>::nodes_iterator> SVF::nodes ( const GraphType &  G)

Definition at line 111 of file GraphTraits.h.

112 {
113  return make_range(GenericGraphTraits<GraphType>::nodes_begin(G),
114  GenericGraphTraits<GraphType>::nodes_end(G));
115 }

◆ operator%()

IntervalValue SVF::operator% ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Divide IntervalValues.

Definition at line 645 of file IntervalValue.h.

647 {
648  if (lhs.isBottom() || rhs.isBottom())
649  {
650  return IntervalValue::bottom();
651  }
652  else if (rhs.contains(0))
653  {
654  return lhs.is_zero() ? IntervalValue(0, 0) : IntervalValue::top();
655  }
656  else if (lhs.is_numeral() && rhs.is_numeral())
657  {
658  return IntervalValue(lhs.lb() % rhs.lb(), lhs.lb() % rhs.lb());
659  }
660  else
661  {
662  BoundedInt n_ub = max(abs(lhs.lb()), abs(lhs.ub()));
663  BoundedInt d_ub = max(abs(rhs.lb()), rhs.ub()) - 1;
664  BoundedInt ub = min(n_ub, d_ub);
665 
666  if (lhs.lb().getNumeral() < 0)
667  {
668  if (lhs.ub().getNumeral() > 0)
669  {
670  return IntervalValue(-ub, ub);
671  }
672  else
673  {
674  return IntervalValue(-ub, 0);
675  }
676  }
677  else
678  {
679  return IntervalValue(0, ub);
680  }
681  }
682 }

◆ operator&() [1/3]

IntervalValue SVF::operator& ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Bitwise AND of IntervalValues.

Definition at line 962 of file IntervalValue.h.

963 {
964  if (lhs.isBottom() || rhs.isBottom())
965  return IntervalValue::bottom();
966  else if (lhs.is_numeral() && rhs.is_numeral())
967  {
968  return IntervalValue(lhs.lb() & rhs.lb());
969  }
970  else if (lhs.lb().getNumeral() >= 0 && rhs.lb().getNumeral() >= 0)
971  {
972  return IntervalValue((s64_t) 0, min(lhs.ub(), rhs.ub()));
973  }
974  else if (lhs.lb().getNumeral() >= 0)
975  {
976  return IntervalValue((s64_t) 0, lhs.ub());
977  }
978  else if (rhs.lb().getNumeral() >= 0)
979  {
980  return IntervalValue((s64_t) 0, rhs.ub());
981  }
982  else
983  {
984  return IntervalValue::top();
985  }
986 }
signed long long s64_t
Definition: GeneralType.h:49

◆ operator&() [2/3]

PointsTo SVF::operator& ( const PointsTo lhs,
const PointsTo rhs 
)

Returns a new lhs & rhs.

Definition at line 573 of file PointsTo.cpp.

574 {
575  // TODO: optimise.
576  PointsTo result = lhs;
577  result &= rhs;
578  return result;
579 }

◆ operator&() [3/3]

template<unsigned ElementSize>
SparseBitVector<ElementSize> SVF::operator& ( const SparseBitVector< ElementSize > &  LHS,
const SparseBitVector< ElementSize > &  RHS 
)
inline

Definition at line 1213 of file SparseBitVector.h.

1215 {
1216  SparseBitVector<ElementSize> Result(LHS);
1217  Result &= RHS;
1218  return Result;
1219 }

◆ operator&=() [1/2]

template<unsigned ElementSize>
bool SVF::operator&= ( SparseBitVector< ElementSize > &  LHS,
const SparseBitVector< ElementSize > *  RHS 
)
inline

Definition at line 1193 of file SparseBitVector.h.

1195 {
1196  return LHS &= *RHS;
1197 }

◆ operator&=() [2/2]

template<unsigned ElementSize>
bool SVF::operator&= ( SparseBitVector< ElementSize > *  LHS,
const SparseBitVector< ElementSize > &  RHS 
)
inline

Definition at line 1186 of file SparseBitVector.h.

1188 {
1189  return LHS->operator&=(RHS);
1190 }

◆ operator*()

IntervalValue SVF::operator* ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Multiply IntervalValues.

Definition at line 583 of file IntervalValue.h.

585 {
586  if (lhs.isBottom() || rhs.isBottom())
587  {
588  return IntervalValue::bottom();
589  }
590  else
591  {
592  BoundedInt ll = lhs.lb() * rhs.lb();
593  BoundedInt lu = lhs.lb() * rhs.ub();
594  BoundedInt ul = lhs.ub() * rhs.lb();
595  BoundedInt uu = lhs.ub() * rhs.ub();
596  std::vector<BoundedInt> vec{ll, lu, ul, uu};
597  return IntervalValue(BoundedInt::min(vec),
598  BoundedInt::max(vec));
599  }
600 }

◆ operator+()

IntervalValue SVF::operator+ ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Add IntervalValues.

Definition at line 547 of file IntervalValue.h.

549 {
550  if (lhs.isBottom() || rhs.isBottom())
551  {
552  return IntervalValue::bottom();
553  }
554  else if (lhs.isTop() || rhs.isTop())
555  {
556  return IntervalValue::top();
557  }
558  else
559  {
560  return IntervalValue(lhs.lb() + rhs.lb(), lhs.ub() + rhs.ub());
561  }
562 }

◆ operator-() [1/3]

IntervalValue SVF::operator- ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Subtract IntervalValues.

Definition at line 565 of file IntervalValue.h.

567 {
568  if (lhs.isBottom() || rhs.isBottom())
569  {
570  return IntervalValue::bottom();
571  }
572  else if (lhs.isTop() || rhs.isTop())
573  {
574  return IntervalValue::top();
575  }
576  else
577  {
578  return IntervalValue(lhs.lb() - rhs.ub(), lhs.ub() - rhs.lb());
579  }
580 }

◆ operator-() [2/3]

PointsTo SVF::operator- ( const PointsTo lhs,
const PointsTo rhs 
)

Returns a new lhs - rhs.

Definition at line 581 of file PointsTo.cpp.

582 {
583  // TODO: optimise.
584  PointsTo result = lhs;
585  result -= rhs;
586  return result;
587 }

◆ operator-() [3/3]

template<unsigned ElementSize>
SparseBitVector<ElementSize> SVF::operator- ( const SparseBitVector< ElementSize > &  LHS,
const SparseBitVector< ElementSize > &  RHS 
)
inline

Definition at line 1223 of file SparseBitVector.h.

1225 {
1226  SparseBitVector<ElementSize> Result;
1227  Result.intersectWithComplement(LHS, RHS);
1228  return Result;
1229 }

◆ operator/()

IntervalValue SVF::operator/ ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Divide IntervalValues.

Definition at line 603 of file IntervalValue.h.

605 {
606  if (lhs.isBottom() || rhs.isBottom())
607  {
608  return IntervalValue::bottom();
609  }
610  else if (rhs.contains(0))
611  {
612  IntervalValue lb = IntervalValue::create(rhs.lb(), -1);
613  IntervalValue ub = IntervalValue::create(1, rhs.ub());
614  IntervalValue l_res = lhs / lb;
615  IntervalValue r_res = lhs / ub;
616  l_res.join_with(r_res);
617  return l_res;
618  }
619  else if (lhs.contains(0))
620  {
621  IntervalValue lb = IntervalValue::create(lhs.lb(), -1);
622  IntervalValue ub = IntervalValue::create(1, lhs.ub());
623  IntervalValue l_res = lb / rhs;
624  IntervalValue r_res = ub / rhs;
625  l_res.join_with(r_res);
626  l_res.join_with(IntervalValue(0));
627  return l_res;
628  }
629  else
630  {
631  // Neither the dividend nor the divisor contains 0
632  BoundedInt ll = lhs.lb() / rhs.lb();
633  BoundedInt lu = lhs.lb() / rhs.ub();
634  BoundedInt ul = lhs.ub() / rhs.lb();
635  BoundedInt uu = lhs.ub() / rhs.ub();
636  std::vector<BoundedInt> vec{ll, lu, ul, uu};
637 
638  IntervalValue res = IntervalValue(BoundedInt::min(vec),
639  BoundedInt::max(vec));
640  return res;
641  }
642 }

◆ operator<()

IntervalValue SVF::operator< ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Definition at line 736 of file IntervalValue.h.

737 {
738  // If either lhs or rhs is bottom, the result is bottom
739  if (lhs.isBottom() || rhs.isBottom())
740  {
741  return IntervalValue::bottom();
742  }
743  // If either lhs or rhs is top, the result is top
744  else if (lhs.isTop() || rhs.isTop())
745  {
746  return IntervalValue::top();
747  }
748  else
749  {
750  // If both lhs and rhs are numerals (lb = ub), directly compare their values
751  if (lhs.is_numeral() && rhs.is_numeral())
752  {
753  // It means lhs.lb() < rhs.lb()? true: false
754  return lhs.lb().geq(rhs.lb()) ? IntervalValue(0, 0) : IntervalValue(1, 1);
755  }
756  else
757  {
758  // Return [1,1] means lhs is totally less than rhs
759  // When lhs.ub < rhs.lb, e.g., lhs:[1, 2] rhs:[3, 4]
760  // lhs.ub(2) < rhs.lb(3)
761  // It means lhs.ub() < rhs.lb()
762  if (!lhs.ub().geq(rhs.lb()))
763  {
764  return IntervalValue(1, 1);
765  }
766  // Return [0,0] means lhs is totally impossible to be less than rhs
767  // i.e., lhs is totally greater than or equal to rhs
768  // When lhs.lb >= rhs.ub, e.g., lhs:[4,5] rhs:[3,4]
769  // lhs.lb(4) >= rhs.ub(4)
770  else if (lhs.lb().geq(rhs.ub()))
771  {
772  return IntervalValue(0, 0);
773  }
774  // For other cases, lhs can be less than rhs or not, depending on the values
775  // e.g., lhs: [2,4], rhs: [1,3],
776  // lhs can be less than rhs if lhs is 2, rhs is 3.
777  // lhs can also not be less than rhs if lhs is 4 and rhs is 1
778  else
779  {
780  return IntervalValue(0, 1);
781  }
782  }
783  }
784 }

◆ operator<<() [1/5]

IntervalValue SVF::operator<< ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Left binary shift of IntervalValues.

Definition at line 888 of file IntervalValue.h.

889 {
890  //TODO: implement <<
891  if (lhs.isBottom() || rhs.isBottom())
892  return IntervalValue::bottom();
893  if (lhs.isTop() && rhs.isTop())
894  return IntervalValue::top();
895  else
896  {
897  IntervalValue shift = rhs;
898  shift.meet_with(IntervalValue(0, IntervalValue::plus_infinity()));
899  if (shift.isBottom())
900  return IntervalValue::bottom();
901  BoundedInt lb = 0;
902  // If the shift is greater than 32, the result is always 0
903  if ((s32_t) shift.lb().getNumeral() >= 32 || shift.lb().is_infinity())
904  {
905  lb = IntervalValue::minus_infinity();
906  }
907  else
908  {
909  lb = (1 << (s32_t) shift.lb().getNumeral());
910  }
911  BoundedInt ub = 0;
912  if (shift.ub().is_infinity())
913  {
914  ub = IntervalValue::plus_infinity();
915  }
916  else
917  {
918  ub = (1 << (s32_t) shift.ub().getNumeral());
919  }
920  IntervalValue coeff(lb, ub);
921  return lhs * coeff;
922  }
923 }
signed s32_t
Definition: GeneralType.h:47

◆ operator<<() [2/5]

template<typename F , typename S >
OutStream& SVF::operator<< ( OutStream o,
const std::pair< F, S > &  var 
)

Definition at line 1085 of file SVFValue.h.

1086 {
1087  o << "<" << var.first << ", " << var.second << ">";
1088  return o;
1089 }

◆ operator<<() [3/5]

std::ostream& SVF::operator<< ( std::ostream &  o,
const IntervalValue IntervalValue 
)
inline

Write an IntervalValue on a stream.

Definition at line 1047 of file IntervalValue.h.

1049 {
1050  IntervalValue.dump(o);
1051  return o;
1052 }

◆ operator<<() [4/5]

std::ostream & SVF::operator<< ( std::ostream &  o,
const MRVer mrver 
)

Definition at line 808 of file MemRegion.cpp.

809 {
810  o << "MRVERID: " << mrver.getID() <<" MemRegion: " << mrver.getMR()->dumpStr() << " MRVERSION: " << mrver.getSSAVersion() << " MSSADef: " << mrver.getDef()->getType() << ", "
811  << mrver.getDef()->getMR()->dumpStr() ;
812  return o;
813 }
MRVERSION getSSAVersion() const
Return SSA version.
Definition: MSSAMuChi.h:69
MRVERID getID() const
Get MRVERID.
Definition: MSSAMuChi.h:81
MSSADef * getDef() const
Get MSSADef.
Definition: MSSAMuChi.h:75
const MemRegion * getMR() const
Return the memory region.
Definition: MSSAMuChi.h:63
DEFTYPE getType() const
Return type of this CHI.
Definition: MSSAMuChi.h:360
const MemRegion * getMR() const
Return memory region.
Definition: MSSAMuChi.h:354
std::string dumpStr() const
Dump string.
Definition: MemRegion.h:93

◆ operator<<() [5/5]

std::ostream& SVF::operator<< ( std::ostream &  os,
const SVFType type 
)

◆ operator<=()

IntervalValue SVF::operator<= ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Definition at line 838 of file IntervalValue.h.

839 {
840  // If either lhs or rhs is bottom, the result is bottom
841  if (lhs.isBottom() || rhs.isBottom())
842  {
843  return IntervalValue::bottom();
844  }
845  // If either lhs or rhs is top, the result is top
846  else if (lhs.isTop() || rhs.isTop())
847  {
848  return IntervalValue::top();
849  }
850  else
851  {
852  // If both lhs and rhs are numerals (lb = ub), directly compare their values
853  if (lhs.is_numeral() && rhs.is_numeral())
854  {
855  return lhs.lb().leq(rhs.lb()) ? IntervalValue(1, 1) : IntervalValue(0, 0);
856  }
857  else
858  {
859  // Return [1,1] means lhs is totally less than or equal to rhs
860  // When lhs.ub <= rhs.lb, e.g., lhs:[1, 2] rhs:[2, 3]
861  // lhs.ub(2) <= rhs.lb(2)
862  if (lhs.ub().leq(rhs.lb()))
863  {
864  return IntervalValue(1, 1);
865  }
866  // Return [0,0] means lhs is totally impossible to be less than or equal to rhs
867  // i.e., lhs is totally greater than rhs
868  // When lhs.lb > rhs.ub, e.g., lhs:[3, 4] rhs:[1, 2]
869  // lhs.lb(3) > rhs.ub(2)
870  // It means lhs.lb() > rhs.ub()
871  else if (!lhs.lb().leq(rhs.ub()))
872  {
873  return IntervalValue(0, 0);
874  }
875  // For other cases, lhs can be less than or equal to rhs or not, depending on the values
876  // e.g., lhs: [2,4], rhs: [1,3],
877  // lhs can be less than or equal to rhs if lhs is 3, rhs is 3.
878  // lhs can also not be less than or equal to rhs if lhs is 3 and rhs is 2
879  else
880  {
881  return IntervalValue(0, 1);
882  }
883  }
884  }
885 }

◆ operator>()

IntervalValue SVF::operator> ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Definition at line 685 of file IntervalValue.h.

686 {
687  // If either lhs or rhs is bottom, the result is bottom
688  if (lhs.isBottom() || rhs.isBottom())
689  {
690  return IntervalValue::bottom();
691  }
692  // If either lhs or rhs is top, the result is top
693  else if (lhs.isTop() || rhs.isTop())
694  {
695  return IntervalValue::top();
696  }
697  else
698  {
699  // If both lhs and rhs are numerals (lb = ub), directly compare their values
700  if (lhs.is_numeral() && rhs.is_numeral())
701  {
702  // It means lhs.lb() > rhs.lb()? true: false
703  return lhs.lb().leq(rhs.lb()) ? IntervalValue(0, 0) : IntervalValue(1, 1);
704  }
705  else
706  {
707  // Return [1,1] means lhs is totally greater than rhs
708  // When lhs.lb > rhs.ub, e.g., lhs:[3, 4] rhs:[1, 2]
709  // lhs.lb(3) > rhs.ub(2)
710  // It means lhs.lb() > rhs.ub()
711  if (!lhs.lb().leq(rhs.ub()))
712  {
713  return IntervalValue(1, 1);
714  }
715  // Return [0,0] means lhs is totally impossible to be greater than rhs
716  // i.e., lhs is totally less than or equal to rhs
717  // When lhs.ub <= rhs.lb, e.g., lhs:[3, 4] rhs:[4,5]
718  // lhs.ub(4) <= rhs.lb(4)
719  else if (lhs.ub().leq(rhs.lb()))
720  {
721  return IntervalValue(0, 0);
722  }
723  // For other cases, lhs can be greater than or not, depending on the values
724  // e.g., lhs: [2,4], rhs: [1,3],
725  // lhs can be greater than rhs if lhs is 4 and rhs is 1.
726  // lhs can also not be greater than rhs if lhs is 2 and rhs is 3
727  else
728  {
729  return IntervalValue(0, 1);
730  }
731  }
732  }
733 }

◆ operator>=()

IntervalValue SVF::operator>= ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Definition at line 788 of file IntervalValue.h.

789 {
790  // If either lhs or rhs is bottom, the result is bottom
791  if (lhs.isBottom() || rhs.isBottom())
792  {
793  return IntervalValue::bottom();
794  }
795  // If either lhs or rhs is top, the result is top
796  else if (lhs.isTop() || rhs.isTop())
797  {
798  return IntervalValue::top();
799  }
800  else
801  {
802  // If both lhs and rhs are numerals (lb = ub), directly compare their values
803  if (lhs.is_numeral() && rhs.is_numeral())
804  {
805  return lhs.lb().geq(rhs.lb()) ? IntervalValue(1, 1) : IntervalValue(0, 0);
806  }
807  else
808  {
809  // Return [1,1] means lhs is totally greater than or equal to rhs
810  // When lhs.lb >= rhs.ub, e.g., lhs:[2, 3] rhs:[1, 2]
811  // lhs.lb(2) >= rhs.ub(2)
812  if (lhs.lb().geq(rhs.ub()))
813  {
814  return IntervalValue(1, 1);
815  }
816  // Return [0,0] means lhs is totally impossible to be greater than or equal to rhs
817  // i.e., lhs is totally less than rhs
818  // When lhs.ub < rhs.lb, e.g., lhs:[1, 2] rhs:[3, 4]
819  // lhs.ub(2) < rhs.lb(3)
820  // It means lhs.ub() < rhs.lb()
821  else if (!lhs.ub().geq(rhs.lb()))
822  {
823  return IntervalValue(0, 0);
824  }
825  // For other cases, lhs can be greater than or equal to rhs or not, depending on the values
826  // e.g., lhs: [2,4], rhs: [1,3],
827  // lhs can be greater than or equal to rhs if lhs is 3, rhs is 2.
828  // lhs can also not be greater than or equal to rhs if lhs is 2 and rhs is 3
829  else
830  {
831  return IntervalValue(0, 1);
832  }
833  }
834  }
835 }

◆ operator>>()

IntervalValue SVF::operator>> ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Left binary shift of IntervalValues.

Definition at line 926 of file IntervalValue.h.

927 {
928  //TODO: implement >>
929  if (lhs.isBottom() || rhs.isBottom())
930  return IntervalValue::bottom();
931  else if (lhs.isTop() && rhs.isTop())
932  return IntervalValue::top();
933  else
934  {
935  IntervalValue shift = rhs;
936  shift.meet_with(IntervalValue(0, IntervalValue::plus_infinity()));
937  if (shift.isBottom())
938  return IntervalValue::bottom();
939  if (lhs.contains(0))
940  {
941  IntervalValue l = IntervalValue::create(lhs.lb(), -1);
942  IntervalValue u = IntervalValue::create(1, lhs.ub());
943  IntervalValue tmp = l >> rhs;
944  tmp.join_with(u >> rhs);
945  tmp.join_with(IntervalValue(0));
946  return tmp;
947  }
948  else
949  {
950  BoundedInt ll = lhs.lb() >> shift.lb();
951  BoundedInt lu = lhs.lb() >> shift.ub();
952  BoundedInt ul = lhs.ub() >> shift.lb();
953  BoundedInt uu = lhs.ub() >> shift.ub();
954  std::vector<BoundedInt> vec{ll, lu, ul, uu};
955  return IntervalValue(BoundedInt::min(vec),
956  BoundedInt::max(vec));
957  }
958  }
959 }

◆ operator^()

IntervalValue SVF::operator^ ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Bitwise XOR of IntervalValues.

Definition at line 1018 of file IntervalValue.h.

1019 {
1020  auto next_power_of_2 = [](s64_t num)
1021  {
1022  int i = 1;
1023  while ((num >> i) != 0)
1024  {
1025  ++i;
1026  }
1027  return 1 << i;
1028  };
1029  if (lhs.isBottom() || rhs.isBottom())
1030  return IntervalValue::bottom();
1031  else if (lhs.is_numeral() && rhs.is_numeral())
1032  return IntervalValue(lhs.lb() ^ rhs.lb());
1033  else if (lhs.lb().getNumeral() >= 0 && !lhs.ub().is_infinity() &&
1034  rhs.lb().getNumeral() >= 0 && !rhs.ub().is_infinity())
1035  {
1036  s64_t m = std::max(lhs.ub().getNumeral(), rhs.ub().getNumeral());
1037  s64_t ub = next_power_of_2(s64_t(m)) - 1;
1038  return IntervalValue((s64_t) 0, (s64_t) ub);
1039  }
1040  else
1041  {
1042  return IntervalValue::top();
1043  }
1044 }

◆ operator|() [1/3]

IntervalValue SVF::operator| ( const IntervalValue lhs,
const IntervalValue rhs 
)
inline

Bitwise OR of IntervalValues.

Definition at line 989 of file IntervalValue.h.

990 {
991  auto next_power_of_2 = [](s64_t num)
992  {
993  int i = 1;
994  while ((num >> i) != 0)
995  {
996  ++i;
997  }
998  return 1 << i;
999  };
1000  if (lhs.isBottom() || rhs.isBottom())
1001  return IntervalValue::bottom();
1002  else if (lhs.is_numeral() && rhs.is_numeral())
1003  return IntervalValue(lhs.lb() | rhs.lb());
1004  else if (lhs.lb().getNumeral() >= 0 && !lhs.ub().is_infinity() &&
1005  rhs.lb().getNumeral() >= 0 && !rhs.ub().is_infinity())
1006  {
1007  s64_t m = std::max(lhs.ub().getNumeral(), rhs.ub().getNumeral());
1008  s64_t ub = next_power_of_2(s64_t(m)) - 1;
1009  return IntervalValue((s64_t) 0, (s64_t) ub);
1010  }
1011  else
1012  {
1013  return IntervalValue::top();
1014  }
1015 }

◆ operator|() [2/3]

PointsTo SVF::operator| ( const PointsTo lhs,
const PointsTo rhs 
)

Returns a new lhs | rhs.

Definition at line 565 of file PointsTo.cpp.

566 {
567  // TODO: optimise.
568  PointsTo result = lhs;
569  result |= rhs;
570  return result;
571 }

◆ operator|() [3/3]

template<unsigned ElementSize>
SparseBitVector<ElementSize> SVF::operator| ( const SparseBitVector< ElementSize > &  LHS,
const SparseBitVector< ElementSize > &  RHS 
)
inline

Definition at line 1203 of file SparseBitVector.h.

1205 {
1206  SparseBitVector<ElementSize> Result(LHS);
1207  Result |= RHS;
1208  return Result;
1209 }

◆ operator|=() [1/2]

template<unsigned ElementSize>
bool SVF::operator|= ( SparseBitVector< ElementSize > &  LHS,
const SparseBitVector< ElementSize > *  RHS 
)
inline

Definition at line 1172 of file SparseBitVector.h.

1174 {
1175  return LHS |= *RHS;
1176 }

◆ operator|=() [2/2]

template<unsigned ElementSize>
bool SVF::operator|= ( SparseBitVector< ElementSize > *  LHS,
const SparseBitVector< ElementSize > &  RHS 
)
inline

Definition at line 1179 of file SparseBitVector.h.

1181 {
1182  return LHS->operator|=(RHS);
1183 }

◆ readBigNumber()

template<typename BigNumberType , typename CStrToVal >
static void SVF::readBigNumber ( const cJSON obj,
BigNumberType &  val,
CStrToVal  conv 
)
inlinestatic

Definition at line 100 of file SVFFileSystem.cpp.

101 {
103  "Expect (number) string JSON for " << JSON_KEY(obj));
104  val = conv(obj->valuestring);
105 }
bool jsonIsString(const cJSON *item)
char * valuestring
Definition: cJSON.h:115

◆ readSmallNumber()

template<typename SmallNumberType >
static void SVF::readSmallNumber ( const cJSON obj,
SmallNumberType &  val 
)
inlinestatic

Definition at line 94 of file SVFFileSystem.cpp.

95 {
96  val = static_cast<SmallNumberType>(jsonGetNumber(obj));
97 }
double jsonGetNumber(const cJSON *item)

◆ ViewGraph()

template<typename GraphType >
void SVF::ViewGraph ( const GraphType &  G,
const std::string name,
bool  ShortNames = false,
GraphProgram::Name  Program = GraphProgram::DOT 
)

ViewGraph - Emit a dot graph, run 'dot', run gv on the postscript file, then cleanup. For use from the debugger.

Definition at line 371 of file GraphWriter.h.

374 {
375  SVF::WriteGraph(G, ShortNames);
376 }
std::ofstream & WriteGraph(std::ofstream &O, const GraphType &G, bool ShortNames=false)
Definition: GraphWriter.h:328

◆ WriteGraph() [1/2]

template<typename GraphType >
std::string SVF::WriteGraph ( const GraphType &  G,
bool  ShortNames = false,
std::string  Filename = "" 
)

Writes graph into a provided Filename. If Filename is empty, generates a random one.

Returns
The resulting filename, or an empty string if writing failed.

Definition at line 345 of file GraphWriter.h.

348 {
349 
350  std::ofstream O(Filename);
351 
352  if (O.fail())
353  {
354  std::cerr << "error opening file '" << Filename << "' for writing!\n";
355  O.close();
356  return "";
357  }
358 
359  SVF::WriteGraph(O, G, ShortNames);
360  O.close();
361 
362  std::cerr << " done. \n";
363 
364  return Filename;
365 }

◆ WriteGraph() [2/2]

template<typename GraphType >
std::ofstream& SVF::WriteGraph ( std::ofstream &  O,
const GraphType &  G,
bool  ShortNames = false 
)

Definition at line 328 of file GraphWriter.h.

330 {
331  // Start the graph emission process...
332  GraphWriter<GraphType> W(O, G, ShortNames);
333 
334  // Emit the graph.
335  W.writeGraph("");
336 
337  return O;
338 }