clang: clang::ento::CoreEngine Class Reference (original) (raw)
CoreEngine - Implements the core logic of the graph-reachability analysis. More...
#include "[clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h](CoreEngine%5F8h%5Fsource.html)"
Public Member Functions | |
---|---|
CoreEngine (ExprEngine &exprengine, FunctionSummariesTy *FS, AnalyzerOptions &Opts) | |
Construct a CoreEngine object to analyze the provided CFG. | |
CoreEngine (const CoreEngine &)=delete | |
CoreEngine & | operator= (const CoreEngine &)=delete |
ExplodedGraph & | getGraph () |
getGraph - Returns the exploded graph. | |
bool | ExecuteWorkList (const LocationContext *L, unsigned Steps, ProgramStateRef InitState) |
ExecuteWorkList - Run the worklist algorithm for a maximum number of steps. | |
void | dispatchWorkItem (ExplodedNode *Pred, ProgramPoint Loc, const WorkListUnit &WU) |
Dispatch the work list item based on the given location information. | |
bool | wasBlockAborted () const |
bool | wasBlocksExhausted () const |
bool | hasWorkRemaining () const |
void | addAbortedBlock (const ExplodedNode *node, const CFGBlock *block) |
Inform the CoreEngine that a basic block was aborted because it could not be completely analyzed. | |
WorkList * | getWorkList () const |
WorkList * | getCTUWorkList () const |
auto | exhausted_blocks () const |
auto | aborted_blocks () const |
void | enqueue (ExplodedNodeSet &Set) |
Enqueue the given set of nodes onto the work list. | |
void | enqueue (ExplodedNodeSet &Set, const CFGBlock *Block, unsigned Idx) |
Enqueue nodes that were created as a result of processing a statement onto the work list. | |
void | enqueueEndOfFunction (ExplodedNodeSet &Set, const ReturnStmt *RS) |
enqueue the nodes corresponding to the end of function onto the end of path / work list. | |
void | enqueueStmtNode (ExplodedNode *N, const CFGBlock *Block, unsigned Idx) |
Enqueue a single node created as a result of statement processing. | |
DataTag::Factory & | getDataTags () |
Friends | |
---|---|
class | CommonNodeBuilder |
class | EndOfFunctionNodeBuilder |
class | ExprEngine |
class | IndirectGotoNodeBuilder |
class | NodeBuilder |
class | NodeBuilderContext |
class | SwitchNodeBuilder |
CoreEngine - Implements the core logic of the graph-reachability analysis.
It traverses the CFG and generates the ExplodedGraph.
Definition at line 50 of file CoreEngine.h.
◆ BlocksAborted
◆ BlocksExhausted
◆ CoreEngine() [2/2]
clang::ento::CoreEngine::CoreEngine ( const CoreEngine & ) | delete |
---|
◆ aborted_blocks()
auto clang::ento::CoreEngine::aborted_blocks ( ) const | inline |
---|
◆ addAbortedBlock()
void clang::ento::CoreEngine::addAbortedBlock ( const ExplodedNode * node, const CFGBlock * block ) | inline |
---|
◆ dispatchWorkItem()
Dispatch the work list item based on the given location information.
Use Pred parameter as the predecessor state.
Definition at line 182 of file CoreEngine.cpp.
References clang::ProgramPoint::BlockEdgeKind, clang::ProgramPoint::BlockEntranceKind, clang::ProgramPoint::BlockExitKind, clang::ProgramPoint::CallEnterKind, clang::ProgramPoint::CallExitBeginKind, clang::ento::SVal::castAs(), dispatchWorkItem(), clang::ProgramPoint::EpsilonKind, clang::ento::SVal::getAs(), clang::ento::WorkListUnit::getBlock(), clang::ento::ExplodedNode::getFirstPred(), clang::ento::WorkListUnit::getIndex(), clang::ento::SVal::getKind(), clang::ento::ExplodedNode::getLocation(), clang::ento::ExplodedNode::hasSinglePred(), and clang::ento::ExprEngine::processCallExit().
Referenced by dispatchWorkItem(), and ExecuteWorkList().
◆ enqueue() [1/2]
◆ enqueue() [2/2]
◆ enqueueEndOfFunction()
◆ enqueueStmtNode()
Enqueue a single node created as a result of statement processing.
Definition at line 531 of file CoreEngine.cpp.
References clang::ento::ExplodedNode::addPredecessor(), clang::Block, clang::CFGElement::castAs(), clang::ProgramPoint::getAs(), getKind(), clang::ento::ExplodedNode::getLocation(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedGraph::getNode(), clang::ento::ExplodedNode::getState(), clang::CFGStmt::getStmt(), clang::ento::ExplodedNode::isSink(), clang::CFGElement::NewAllocator, and clang::ProgramPoint::withTag().
Referenced by enqueue().
◆ ExecuteWorkList()
ExecuteWorkList - Run the worklist algorithm for a maximum number of steps.
Returns true if there is still simulation state on the worklist.
Definition at line 88 of file CoreEngine.cpp.
References clang::ento::ExplodedGraph::addRoot(), dispatchWorkItem(), clang::CFGBlock::empty(), enqueue(), clang::ento::ExprEngine::getAnalysisManager(), clang::ento::WorkListUnit::getBlockCounter(), clang::CFGBlock::getBlockID(), clang::LocationContext::getCFG(), clang::LocationContext::getDecl(), clang::BlockEdge::getDst(), clang::ento::BlockCounter::Factory::GetEmptyCounter(), clang::CFG::getEntry(), clang::ento::ExprEngine::getInitialState(), clang::ento::WorkListUnit::getNode(), clang::ento::ExplodedGraph::getNode(), clang::CFG::getNumBlockIDs(), clang::ento::FunctionSummariesTy::markVisitedBasicBlock(), Node, clang::ento::ExplodedGraph::num_roots(), clang::ento::AnalysisManager::options, clang::ento::ExprEngine::processBeginOfFunction(), clang::ento::ExprEngine::processEndWorklist(), clang::ento::ExplodedGraph::reserve(), clang::CFGBlock::succ_begin(), and clang::CFGBlock::succ_size().
Referenced by clang::ento::ExprEngine::ExecuteWorkList().
◆ exhausted_blocks()
auto clang::ento::CoreEngine::exhausted_blocks ( ) const | inline |
---|
◆ getCTUWorkList()
WorkList * clang::ento::CoreEngine::getCTUWorkList ( ) const | inline |
---|
◆ getDataTags()
◆ getGraph()
getGraph - Returns the exploded graph.
Definition at line 147 of file CoreEngine.h.
◆ getWorkList()
WorkList * clang::ento::CoreEngine::getWorkList ( ) const | inline |
---|
◆ hasWorkRemaining()
bool clang::ento::CoreEngine::hasWorkRemaining ( ) const | inline |
---|
◆ operator=()
◆ wasBlockAborted()
bool clang::ento::CoreEngine::wasBlockAborted ( ) const | inline |
---|
◆ wasBlocksExhausted()
bool clang::ento::CoreEngine::wasBlocksExhausted ( ) const | inline |
---|
◆ CommonNodeBuilder
friend class CommonNodeBuilder | friend |
---|
◆ EndOfFunctionNodeBuilder
friend class EndOfFunctionNodeBuilder | friend |
---|
◆ ExprEngine
◆ IndirectGotoNodeBuilder
◆ NodeBuilder
◆ NodeBuilderContext
◆ SwitchNodeBuilder
The documentation for this class was generated from the following files:
- include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
- lib/StaticAnalyzer/Core/CoreEngine.cpp