clang API Documentation

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

This is the simplest builder which generates nodes in the ExplodedGraph. More...

#include <CoreEngine.h>

Inheritance diagram for clang::ento::NodeBuilder:
Inheritance graph
[legend]
Collaboration diagram for clang::ento::NodeBuilder:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ExplodedNodeSet::iterator iterator

Public Member Functions

 NodeBuilder (ExplodedNode *SrcNode, ExplodedNodeSet &DstSet, const NodeBuilderContext &Ctx, bool F=true)
 NodeBuilder (const ExplodedNodeSet &SrcSet, ExplodedNodeSet &DstSet, const NodeBuilderContext &Ctx, bool F=true)
virtual ~NodeBuilder ()
ExplodedNodegenerateNode (const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred)
 Generates a node in the ExplodedGraph.
ExplodedNodegenerateSink (const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred)
 Generates a sink in the ExplodedGraph.
const ExplodedNodeSetgetResults ()
iterator begin ()
 Iterators through the results frontier.
iterator end ()
const NodeBuilderContextgetContext ()
bool hasGeneratedNodes ()
void takeNodes (const ExplodedNodeSet &S)
void takeNodes (ExplodedNode *N)
void addNodes (const ExplodedNodeSet &S)
void addNodes (ExplodedNode *N)

Protected Member Functions

virtual bool checkResults ()
 Checkes if the results are ready.
bool hasNoSinksInFrontier ()
virtual void finalizeResults ()
 Allow subclasses to finalize results before result_begin() is executed.
ExplodedNodegenerateNodeImpl (const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred, bool MarkAsSink=false)

Protected Attributes

const NodeBuilderContextC
bool Finalized
bool HasGeneratedNodes
ExplodedNodeSetFrontier
 The frontier set - a set of nodes which need to be propagated after the builder dies.

Detailed Description

This is the simplest builder which generates nodes in the ExplodedGraph.

The main benefit of the builder is that it automatically tracks the frontier nodes (or destination set). This is the set of nodes which should be propagated to the next step / builder. They are the nodes which have been added to the builder (either as the input node set or as the newly constructed nodes) but did not have any outgoing transitions added.

Definition at line 207 of file CoreEngine.h.


Member Typedef Documentation

Definition at line 283 of file CoreEngine.h.


Constructor & Destructor Documentation

clang::ento::NodeBuilder::NodeBuilder ( ExplodedNode SrcNode,
ExplodedNodeSet DstSet,
const NodeBuilderContext Ctx,
bool  F = true 
) [inline]

Definition at line 244 of file CoreEngine.h.

References clang::ento::ExplodedNodeSet::Add(), and Frontier.

clang::ento::NodeBuilder::NodeBuilder ( const ExplodedNodeSet SrcSet,
ExplodedNodeSet DstSet,
const NodeBuilderContext Ctx,
bool  F = true 
) [inline]
virtual clang::ento::NodeBuilder::~NodeBuilder ( ) [inline, virtual]

Definition at line 257 of file CoreEngine.h.


Member Function Documentation

Definition at line 304 of file CoreEngine.h.

References clang::ento::ExplodedNodeSet::Add(), and Frontier.

Iterators through the results frontier.

Definition at line 285 of file CoreEngine.h.

References clang::ento::ExplodedNodeSet::begin(), checkResults(), finalizeResults(), and Frontier.

virtual bool clang::ento::NodeBuilder::checkResults ( ) [inline, protected, virtual]

Checkes if the results are ready.

Definition at line 221 of file CoreEngine.h.

References Finalized.

Referenced by begin(), and getResults().

Definition at line 290 of file CoreEngine.h.

References clang::ento::ExplodedNodeSet::end(), finalizeResults(), and Frontier.

virtual void clang::ento::NodeBuilder::finalizeResults ( ) [inline, protected, virtual]

Allow subclasses to finalize results before result_begin() is executed.

Definition at line 236 of file CoreEngine.h.

Referenced by begin(), end(), and getResults().

Generates a node in the ExplodedGraph.

Definition at line 260 of file CoreEngine.h.

References generateNodeImpl().

Referenced by clang::ento::ExprEngine::ProcessInitializer(), and clang::ento::ExprEngine::ProcessNewAllocator().

ExplodedNode * NodeBuilder::generateNodeImpl ( const ProgramPoint PP,
ProgramStateRef  State,
ExplodedNode Pred,
bool  MarkAsSink = false 
) [protected]

Generates a sink in the ExplodedGraph.

When a node is marked as sink, the exploration from the node is stopped - the node becomes the last node on the path and certain kinds of bugs are suppressed.

Definition at line 271 of file CoreEngine.h.

References generateNodeImpl().

Definition at line 296 of file CoreEngine.h.

References HasGeneratedNodes.

Definition at line 302 of file CoreEngine.h.

References clang::ento::ExplodedNodeSet::erase(), and Frontier.


Member Data Documentation

Definition at line 210 of file CoreEngine.h.

Referenced by getContext().

Specifies if the builder results have been finalized. For example, if it is set to false, autotransitions are yet to be generated.

Definition at line 214 of file CoreEngine.h.

Referenced by checkResults().

The frontier set - a set of nodes which need to be propagated after the builder dies.

Definition at line 218 of file CoreEngine.h.

Referenced by addNodes(), begin(), end(), getResults(), hasNoSinksInFrontier(), NodeBuilder(), and takeNodes().

Definition at line 215 of file CoreEngine.h.

Referenced by hasGeneratedNodes().


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