clang
3.7.0
|
#include <ExplodedGraph.h>
Public Types | |
typedef ExplodedNode | NodeTy |
typedef llvm::FoldingSet < ExplodedNode > | AllNodesTy |
typedef NodeVector::iterator | roots_iterator |
typedef NodeVector::const_iterator | const_roots_iterator |
typedef NodeVector::iterator | eop_iterator |
typedef NodeVector::const_iterator | const_eop_iterator |
typedef AllNodesTy::iterator | node_iterator |
typedef AllNodesTy::const_iterator | const_node_iterator |
typedef llvm::DenseMap< const ExplodedNode *, ExplodedNode * > | NodeMap |
Static Public Member Functions | |
static bool | isInterestingLValueExpr (const Expr *Ex) |
Returns true if nodes for the given expression kind are always kept around. More... | |
Protected Types | |
typedef std::vector < ExplodedNode * > | NodeVector |
Protected Attributes | |
NodeVector | Roots |
NodeVector | EndNodes |
llvm::FoldingSet< ExplodedNode > | Nodes |
Nodes - The nodes in the graph. More... | |
BumpVectorContext | BVC |
unsigned | NumNodes |
NumNodes - The number of nodes in the graph. More... | |
NodeVector | ChangedNodes |
A list of recently allocated nodes that can potentially be recycled. More... | |
NodeVector | FreeNodes |
A list of nodes that can be reused. More... | |
unsigned | ReclaimNodeInterval |
unsigned | ReclaimCounter |
Counter to determine when to reclaim nodes. More... | |
Friends | |
class | CoreEngine |
Definition at line 247 of file ExplodedGraph.h.
typedef llvm::FoldingSet<ExplodedNode> clang::ento::ExplodedGraph::AllNodesTy |
Definition at line 326 of file ExplodedGraph.h.
typedef NodeVector::const_iterator clang::ento::ExplodedGraph::const_eop_iterator |
Definition at line 330 of file ExplodedGraph.h.
typedef AllNodesTy::const_iterator clang::ento::ExplodedGraph::const_node_iterator |
Definition at line 332 of file ExplodedGraph.h.
typedef NodeVector::const_iterator clang::ento::ExplodedGraph::const_roots_iterator |
Definition at line 328 of file ExplodedGraph.h.
typedef NodeVector::iterator clang::ento::ExplodedGraph::eop_iterator |
Definition at line 329 of file ExplodedGraph.h.
typedef AllNodesTy::iterator clang::ento::ExplodedGraph::node_iterator |
Definition at line 331 of file ExplodedGraph.h.
typedef llvm::DenseMap<const ExplodedNode*, ExplodedNode*> clang::ento::ExplodedGraph::NodeMap |
Definition at line 361 of file ExplodedGraph.h.
Definition at line 325 of file ExplodedGraph.h.
|
protected |
Definition at line 252 of file ExplodedGraph.h.
typedef NodeVector::iterator clang::ento::ExplodedGraph::roots_iterator |
Definition at line 327 of file ExplodedGraph.h.
ExplodedGraph::ExplodedGraph | ( | ) |
Definition at line 50 of file ExplodedGraph.cpp.
ExplodedGraph::~ExplodedGraph | ( | ) |
Definition at line 53 of file ExplodedGraph.cpp.
|
inline |
addEndOfPath - Add an untyped node to the set of EOP nodes.
Definition at line 309 of file ExplodedGraph.h.
References EndNodes.
|
inline |
addRoot - Add an untyped node to the set of roots.
Definition at line 303 of file ExplodedGraph.h.
References Roots.
|
inline |
Definition at line 321 of file ExplodedGraph.h.
References NumNodes.
|
inline |
Enable tracking of recently allocated nodes for potential reclamation when calling reclaimRecentlyAllocatedNodes().
Definition at line 380 of file ExplodedGraph.h.
References ReclaimCounter, and ReclaimNodeInterval.
|
inline |
Definition at line 350 of file ExplodedGraph.h.
References EndNodes.
|
inline |
Definition at line 354 of file ExplodedGraph.h.
References EndNodes.
|
inline |
Definition at line 352 of file ExplodedGraph.h.
References EndNodes.
|
inline |
Definition at line 356 of file ExplodedGraph.h.
References EndNodes.
|
inline |
Definition at line 358 of file ExplodedGraph.h.
References BVC, and clang::BumpVectorContext::getAllocator().
Referenced by getNode().
ExplodedNode * ExplodedGraph::getNode | ( | const ProgramPoint & | L, |
ProgramStateRef | State, | ||
bool | IsSink = false , |
||
bool * | IsNew = nullptr |
||
) |
Retrieve the node associated with a (Location,State) pair, where the 'Location' is a ProgramPoint in the CFG. If no node for this pair exists, it is created. IsNew is set to true if the node was freshly created.
Definition at line 301 of file ExplodedGraph.cpp.
References ChangedNodes, FreeNodes, getAllocator(), Nodes, NumNodes, clang::ento::ExplodedNode::Profile(), and ReclaimNodeInterval.
Referenced by clang::ento::ExprEngine::processCallEnter(), and clang::ento::ExprEngine::processCallExit().
|
inline |
Definition at line 359 of file ExplodedGraph.h.
References BVC.
Returns true if nodes for the given expression kind are always kept around.
Definition at line 59 of file ExplodedGraph.cpp.
References clang::Expr::isLValue().
Referenced by clang::ento::bugreporter::trackNullOrUndefValue().
|
inline |
Definition at line 298 of file ExplodedGraph.h.
Referenced by trim().
|
inline |
Definition at line 334 of file ExplodedGraph.h.
References Nodes.
|
inline |
Definition at line 338 of file ExplodedGraph.h.
References Nodes.
|
inline |
Definition at line 336 of file ExplodedGraph.h.
References Nodes.
|
inline |
Definition at line 340 of file ExplodedGraph.h.
References Nodes.
|
inline |
Definition at line 319 of file ExplodedGraph.h.
References EndNodes.
|
inline |
Definition at line 318 of file ExplodedGraph.h.
References Roots.
void ExplodedGraph::reclaimRecentlyAllocatedNodes | ( | ) |
Reclaim "uninteresting" nodes created since the last time this method was called.
Definition at line 180 of file ExplodedGraph.cpp.
References ChangedNodes, ReclaimCounter, and ReclaimNodeInterval.
Referenced by clang::ento::ExprEngine::ProcessStmt().
|
inline |
Definition at line 342 of file ExplodedGraph.h.
References Roots.
Referenced by clang::ento::ExprEngine::processCFGBlockEntrance(), and clang::ento::ExprEngine::ViewGraph().
|
inline |
Definition at line 346 of file ExplodedGraph.h.
References Roots.
|
inline |
Definition at line 344 of file ExplodedGraph.h.
References Roots.
|
inline |
Definition at line 348 of file ExplodedGraph.h.
References Roots.
|
inline |
Definition at line 322 of file ExplodedGraph.h.
References NumNodes.
std::unique_ptr< ExplodedGraph > ExplodedGraph::trim | ( | ArrayRef< const NodeTy * > | Nodes, |
InterExplodedGraphMap * | ForwardMap = nullptr , |
||
InterExplodedGraphMap * | InverseMap = nullptr |
||
) | const |
Creates a trimmed version of the graph that only contains paths leading to the given nodes.
Nodes | The nodes which must appear in the final graph. Presumably these are end-of-path nodes (i.e. they have no successors). | |
[out] | ForwardMap | A optional map from nodes in this graph to nodes in the returned graph. |
[out] | InverseMap | An optional map from nodes in the returned graph to nodes in this graph. |
Definition at line 340 of file ExplodedGraph.cpp.
References clang::ento::ExplodedNode::addPredecessor(), clang::ento::ExplodedNode::getLocation(), clang::ento::ExplodedNode::isSink(), MakeEmptyGraph(), and Nodes.
Referenced by clang::ento::ExprEngine::ViewGraph().
|
friend |
Definition at line 249 of file ExplodedGraph.h.
|
protected |
BVC - Allocator and context for allocating nodes and their predecessor and successor groups.
Definition at line 269 of file ExplodedGraph.h.
Referenced by getAllocator(), and getNodeAllocator().
|
protected |
A list of recently allocated nodes that can potentially be recycled.
Definition at line 275 of file ExplodedGraph.h.
Referenced by getNode(), and reclaimRecentlyAllocatedNodes().
|
protected |
The nodes in the simulation graph which have been specially marked as the endpoint of an abstract simulation path.
Definition at line 262 of file ExplodedGraph.h.
Referenced by addEndOfPath(), eop_begin(), eop_end(), and num_eops().
|
protected |
A list of nodes that can be reused.
Definition at line 278 of file ExplodedGraph.h.
Referenced by getNode().
|
protected |
Nodes - The nodes in the graph.
Definition at line 265 of file ExplodedGraph.h.
Referenced by getNode(), nodes_begin(), nodes_end(), and trim().
|
protected |
NumNodes - The number of nodes in the graph.
Definition at line 272 of file ExplodedGraph.h.
|
protected |
Counter to determine when to reclaim nodes.
Definition at line 286 of file ExplodedGraph.h.
Referenced by enableNodeReclamation(), and reclaimRecentlyAllocatedNodes().
|
protected |
Determines how often nodes are reclaimed.
If this is 0, nodes will never be reclaimed.
Definition at line 283 of file ExplodedGraph.h.
Referenced by enableNodeReclamation(), getNode(), and reclaimRecentlyAllocatedNodes().
|
protected |
The roots of the simulation graph. Usually there will be only one, but clients are free to establish multiple subgraphs within a single SimulGraph. Moreover, these subgraphs can often merge when paths from different roots reach the same state at the same program location.
Definition at line 258 of file ExplodedGraph.h.
Referenced by addRoot(), num_roots(), roots_begin(), and roots_end().