clang API Documentation

Public Types | Public Member Functions | Protected Types | Protected Attributes | Friends
clang::ento::ExplodedGraph Class Reference

#include <ExplodedGraph.h>

Collaboration diagram for clang::ento::ExplodedGraph:
Collaboration graph
[legend]

List of all members.

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

Public Member Functions

ExplodedNodegetNode (const ProgramPoint &L, ProgramStateRef State, bool IsSink=false, bool *IsNew=0)
 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.
ExplodedGraphMakeEmptyGraph () const
ExplodedNodeaddRoot (ExplodedNode *V)
 addRoot - Add an untyped node to the set of roots.
ExplodedNodeaddEndOfPath (ExplodedNode *V)
 addEndOfPath - Add an untyped node to the set of EOP nodes.
 ExplodedGraph ()
 ~ExplodedGraph ()
unsigned num_roots () const
unsigned num_eops () const
bool empty () const
unsigned size () const
node_iterator nodes_begin ()
node_iterator nodes_end ()
const_node_iterator nodes_begin () const
const_node_iterator nodes_end () const
roots_iterator roots_begin ()
roots_iterator roots_end ()
const_roots_iterator roots_begin () const
const_roots_iterator roots_end () const
eop_iterator eop_begin ()
eop_iterator eop_end ()
const_eop_iterator eop_begin () const
const_eop_iterator eop_end () const
llvm::BumpPtrAllocator & getAllocator ()
BumpVectorContextgetNodeAllocator ()
std::pair< ExplodedGraph
*, InterExplodedGraphMap * > 
Trim (const NodeTy *const *NBeg, const NodeTy *const *NEnd, llvm::DenseMap< const void *, const void * > *InverseMap=0) const
ExplodedGraphTrimInternal (const ExplodedNode *const *NBeg, const ExplodedNode *const *NEnd, InterExplodedGraphMap *M, llvm::DenseMap< const void *, const void * > *InverseMap) const
void enableNodeReclamation ()
void reclaimRecentlyAllocatedNodes ()

Protected Types

typedef std::vector
< ExplodedNode * > 
NodeVector

Protected Attributes

NodeVector Roots
NodeVector EndNodes
llvm::FoldingSet< ExplodedNodeNodes
 Nodes - The nodes in the graph.
BumpVectorContext BVC
unsigned NumNodes
 NumNodes - The number of nodes in the graph.
NodeVector ChangedNodes
 A list of recently allocated nodes that can potentially be recycled.
NodeVector FreeNodes
 A list of nodes that can be reused.
bool reclaimNodes
 A flag that indicates whether nodes should be recycled.
unsigned reclaimCounter
 Counter to determine when to reclaim nodes.

Friends

class CoreEngine

Detailed Description

Definition at line 244 of file ExplodedGraph.h.


Member Typedef Documentation

Definition at line 321 of file ExplodedGraph.h.

typedef NodeVector::const_iterator clang::ento::ExplodedGraph::const_eop_iterator

Definition at line 325 of file ExplodedGraph.h.

typedef AllNodesTy::const_iterator clang::ento::ExplodedGraph::const_node_iterator

Definition at line 327 of file ExplodedGraph.h.

typedef NodeVector::const_iterator clang::ento::ExplodedGraph::const_roots_iterator

Definition at line 323 of file ExplodedGraph.h.

typedef NodeVector::iterator clang::ento::ExplodedGraph::eop_iterator

Definition at line 324 of file ExplodedGraph.h.

typedef AllNodesTy::iterator clang::ento::ExplodedGraph::node_iterator

Definition at line 326 of file ExplodedGraph.h.

Definition at line 356 of file ExplodedGraph.h.

Definition at line 320 of file ExplodedGraph.h.

typedef std::vector<ExplodedNode *> clang::ento::ExplodedGraph::NodeVector [protected]

Definition at line 249 of file ExplodedGraph.h.

typedef NodeVector::iterator clang::ento::ExplodedGraph::roots_iterator

Definition at line 322 of file ExplodedGraph.h.


Constructor & Destructor Documentation

ExplodedGraph::ExplodedGraph ( )

Definition at line 50 of file ExplodedGraph.cpp.

Referenced by MakeEmptyGraph().

ExplodedGraph::~ExplodedGraph ( )

Definition at line 53 of file ExplodedGraph.cpp.


Member Function Documentation

ExplodedNode* clang::ento::ExplodedGraph::addEndOfPath ( ExplodedNode V) [inline]

addEndOfPath - Add an untyped node to the set of EOP nodes.

Definition at line 304 of file ExplodedGraph.h.

References EndNodes.

ExplodedNode* clang::ento::ExplodedGraph::addRoot ( ExplodedNode V) [inline]

addRoot - Add an untyped node to the set of roots.

Definition at line 298 of file ExplodedGraph.h.

References Roots.

Referenced by TrimInternal().

bool clang::ento::ExplodedGraph::empty ( ) const [inline]

Definition at line 316 of file ExplodedGraph.h.

References NumNodes.

void clang::ento::ExplodedGraph::enableNodeReclamation ( ) [inline]

Enable tracking of recently allocated nodes for potential reclamation when calling reclaimRecentlyAllocatedNodes().

Definition at line 369 of file ExplodedGraph.h.

References reclaimNodes.

Referenced by clang::ento::ExprEngine::ExprEngine().

eop_iterator clang::ento::ExplodedGraph::eop_begin ( ) [inline]

Definition at line 345 of file ExplodedGraph.h.

References EndNodes.

const_eop_iterator clang::ento::ExplodedGraph::eop_begin ( ) const [inline]

Definition at line 349 of file ExplodedGraph.h.

References EndNodes.

eop_iterator clang::ento::ExplodedGraph::eop_end ( ) [inline]

Definition at line 347 of file ExplodedGraph.h.

References EndNodes.

const_eop_iterator clang::ento::ExplodedGraph::eop_end ( ) const [inline]

Definition at line 351 of file ExplodedGraph.h.

References EndNodes.

llvm::BumpPtrAllocator& clang::ento::ExplodedGraph::getAllocator ( ) [inline]

Definition at line 353 of file ExplodedGraph.h.

References BVC, and clang::BumpVectorContext::getAllocator().

ExplodedNode* clang::ento::ExplodedGraph::getNode ( const ProgramPoint L,
ProgramStateRef  State,
bool  IsSink = false,
bool *  IsNew = 0 
)

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.

Referenced by clang::ento::SubEngine::processCallEnter(), clang::ento::SubEngine::processCallExit(), and TrimInternal().

BumpVectorContext& clang::ento::ExplodedGraph::getNodeAllocator ( ) [inline]

Definition at line 354 of file ExplodedGraph.h.

References BVC.

ExplodedGraph* clang::ento::ExplodedGraph::MakeEmptyGraph ( ) const [inline]

Definition at line 293 of file ExplodedGraph.h.

References ExplodedGraph().

Referenced by TrimInternal().

node_iterator clang::ento::ExplodedGraph::nodes_begin ( ) [inline]

Definition at line 329 of file ExplodedGraph.h.

References Nodes.

const_node_iterator clang::ento::ExplodedGraph::nodes_begin ( ) const [inline]

Definition at line 333 of file ExplodedGraph.h.

References Nodes.

node_iterator clang::ento::ExplodedGraph::nodes_end ( ) [inline]

Definition at line 331 of file ExplodedGraph.h.

References Nodes.

const_node_iterator clang::ento::ExplodedGraph::nodes_end ( ) const [inline]

Definition at line 335 of file ExplodedGraph.h.

References Nodes.

unsigned clang::ento::ExplodedGraph::num_eops ( ) const [inline]

Definition at line 314 of file ExplodedGraph.h.

References EndNodes.

unsigned clang::ento::ExplodedGraph::num_roots ( ) const [inline]

Definition at line 313 of file ExplodedGraph.h.

References Roots.

void ExplodedGraph::reclaimRecentlyAllocatedNodes ( )

Reclaim "uninteresting" nodes created since the last time this method was called.

Definition at line 131 of file ExplodedGraph.cpp.

References ChangedNodes, CounterTop, and reclaimCounter.

Referenced by clang::ento::ExprEngine::ProcessStmt().

roots_iterator clang::ento::ExplodedGraph::roots_begin ( ) [inline]

Definition at line 337 of file ExplodedGraph.h.

References Roots.

Referenced by clang::ento::SubEngine::processCFGBlockEntrance().

const_roots_iterator clang::ento::ExplodedGraph::roots_begin ( ) const [inline]

Definition at line 341 of file ExplodedGraph.h.

References Roots.

roots_iterator clang::ento::ExplodedGraph::roots_end ( ) [inline]

Definition at line 339 of file ExplodedGraph.h.

References Roots.

const_roots_iterator clang::ento::ExplodedGraph::roots_end ( ) const [inline]

Definition at line 343 of file ExplodedGraph.h.

References Roots.

unsigned clang::ento::ExplodedGraph::size ( ) const [inline]

Definition at line 317 of file ExplodedGraph.h.

References NumNodes.

std::pair< ExplodedGraph *, InterExplodedGraphMap * > ExplodedGraph::Trim ( const NodeTy *const *  NBeg,
const NodeTy *const *  NEnd,
llvm::DenseMap< const void *, const void * > *  InverseMap = 0 
) const

Definition at line 276 of file ExplodedGraph.cpp.

References TrimInternal().

Referenced by clang::ento::ExprEngine::ViewGraph().

ExplodedGraph * ExplodedGraph::TrimInternal ( const ExplodedNode *const *  NBeg,
const ExplodedNode *const *  NEnd,
InterExplodedGraphMap M,
llvm::DenseMap< const void *, const void * > *  InverseMap 
) const

Friends And Related Function Documentation

friend class CoreEngine [friend]

Definition at line 246 of file ExplodedGraph.h.


Member Data Documentation

BVC - Allocator and context for allocating nodes and their predecessor and successor groups.

Definition at line 266 of file ExplodedGraph.h.

Referenced by getAllocator(), and getNodeAllocator().

A list of recently allocated nodes that can potentially be recycled.

Definition at line 272 of file ExplodedGraph.h.

Referenced by reclaimRecentlyAllocatedNodes().

The nodes in the simulation graph which have been specially marked as the endpoint of an abstract simulation path.

Definition at line 259 of file ExplodedGraph.h.

Referenced by addEndOfPath(), eop_begin(), eop_end(), and num_eops().

A list of nodes that can be reused.

Definition at line 275 of file ExplodedGraph.h.

llvm::FoldingSet<ExplodedNode> clang::ento::ExplodedGraph::Nodes [protected]

Nodes - The nodes in the graph.

Definition at line 262 of file ExplodedGraph.h.

Referenced by nodes_begin(), and nodes_end().

NumNodes - The number of nodes in the graph.

Definition at line 269 of file ExplodedGraph.h.

Referenced by empty(), and size().

Counter to determine when to reclaim nodes.

Definition at line 281 of file ExplodedGraph.h.

Referenced by reclaimRecentlyAllocatedNodes().

A flag that indicates whether nodes should be recycled.

Definition at line 278 of file ExplodedGraph.h.

Referenced by enableNodeReclamation().

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 255 of file ExplodedGraph.h.

Referenced by addRoot(), num_roots(), roots_begin(), and roots_end().


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