clang API Documentation
This is the simplest builder which generates nodes in the ExplodedGraph. More...
#include <CoreEngine.h>


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 () |
| ExplodedNode * | generateNode (const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred, bool MarkAsSink=false) |
| Generates a node in the ExplodedGraph. | |
| const ExplodedNodeSet & | getResults () |
| iterator | begin () |
| Iterators through the results frontier. | |
| iterator | end () |
| const NodeBuilderContext & | getContext () |
| 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. | |
| ExplodedNode * | generateNodeImpl (const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred, bool MarkAsSink=false) |
Protected Attributes | |
| const NodeBuilderContext & | C |
| bool | Finalized |
| bool | HasGeneratedNodes |
| ExplodedNodeSet & | Frontier |
| The frontier set - a set of nodes which need to be propagated after the builder dies. | |
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 220 of file CoreEngine.h.
Definition at line 289 of file CoreEngine.h.
| clang::ento::NodeBuilder::NodeBuilder | ( | ExplodedNode * | SrcNode, |
| ExplodedNodeSet & | DstSet, | ||
| const NodeBuilderContext & | Ctx, | ||
| bool | F = true |
||
| ) | [inline] |
Definition at line 257 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] |
Definition at line 263 of file CoreEngine.h.
References Frontier, hasNoSinksInFrontier(), and clang::ento::ExplodedNodeSet::insert().
| virtual clang::ento::NodeBuilder::~NodeBuilder | ( | ) | [inline, virtual] |
Definition at line 270 of file CoreEngine.h.
| void clang::ento::NodeBuilder::addNodes | ( | const ExplodedNodeSet & | S | ) | [inline] |
Definition at line 309 of file CoreEngine.h.
References Frontier, and clang::ento::ExplodedNodeSet::insert().
Referenced by clang::ento::ExprEngine::VisitCXXNewExpr(), clang::ento::ExprEngine::VisitDeclStmt(), clang::ento::ExprEngine::VisitIncrementDecrementOperator(), clang::ento::ExprEngine::VisitMemberExpr(), and clang::ento::ExprEngine::VisitObjCForCollectionStmt().
| void clang::ento::NodeBuilder::addNodes | ( | ExplodedNode * | N | ) | [inline] |
Definition at line 310 of file CoreEngine.h.
References clang::ento::ExplodedNodeSet::Add(), and Frontier.
| iterator clang::ento::NodeBuilder::begin | ( | ) | [inline] |
Iterators through the results frontier.
Definition at line 291 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 234 of file CoreEngine.h.
References Finalized.
Referenced by begin(), and getResults().
| iterator clang::ento::NodeBuilder::end | ( | ) | [inline] |
Definition at line 296 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 249 of file CoreEngine.h.
Referenced by begin(), end(), and getResults().
| ExplodedNode* clang::ento::NodeBuilder::generateNode | ( | const ProgramPoint & | PP, |
| ProgramStateRef | State, | ||
| ExplodedNode * | Pred, | ||
| bool | MarkAsSink = false |
||
| ) | [inline] |
Generates a node 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.
Definition at line 276 of file CoreEngine.h.
References generateNodeImpl().
| ExplodedNode * NodeBuilder::generateNodeImpl | ( | const ProgramPoint & | PP, |
| ProgramStateRef | State, | ||
| ExplodedNode * | Pred, | ||
| bool | MarkAsSink = false |
||
| ) | [protected] |
Definition at line 584 of file CoreEngine.cpp.
References clang::ento::ExplodedNode::addPredecessor().
Referenced by generateNode(), clang::ento::NodeBuilderWithSinks::generateNode(), and clang::ento::StmtNodeBuilder::generateNode().
| const NodeBuilderContext& clang::ento::NodeBuilder::getContext | ( | ) | [inline] |
Definition at line 301 of file CoreEngine.h.
References C.
Referenced by clang::ento::CheckerContext::getCurrentBlockCount(), and clang::ento::SubEngine::processCFGBlockEntrance().
| const ExplodedNodeSet& clang::ento::NodeBuilder::getResults | ( | ) | [inline] |
Definition at line 283 of file CoreEngine.h.
References checkResults(), finalizeResults(), and Frontier.
| bool clang::ento::NodeBuilder::hasGeneratedNodes | ( | ) | [inline] |
Definition at line 302 of file CoreEngine.h.
References HasGeneratedNodes.
Referenced by clang::ento::ExprEngine::evalObjCMessage().
| bool clang::ento::NodeBuilder::hasNoSinksInFrontier | ( | ) | [inline, protected] |
Definition at line 240 of file CoreEngine.h.
References clang::ento::ExplodedNodeSet::begin(), clang::ento::ExplodedNodeSet::end(), and Frontier.
Referenced by NodeBuilder().
| void clang::ento::NodeBuilder::takeNodes | ( | const ExplodedNodeSet & | S | ) | [inline] |
Definition at line 304 of file CoreEngine.h.
References clang::ento::ExplodedNodeSet::begin(), clang::ento::ExplodedNodeSet::end(), clang::ento::ExplodedNodeSet::erase(), and Frontier.
Referenced by clang::ento::BranchNodeBuilder::BranchNodeBuilder(), clang::ento::StmtNodeBuilder::StmtNodeBuilder(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::ento::ExprEngine::VisitDeclStmt(), clang::ento::ExprEngine::VisitIncrementDecrementOperator(), clang::ento::ExprEngine::VisitMemberExpr(), and clang::ento::ExprEngine::VisitObjCForCollectionStmt().
| void clang::ento::NodeBuilder::takeNodes | ( | ExplodedNode * | N | ) | [inline] |
Definition at line 308 of file CoreEngine.h.
References clang::ento::ExplodedNodeSet::erase(), and Frontier.
const NodeBuilderContext& clang::ento::NodeBuilder::C [protected] |
Definition at line 223 of file CoreEngine.h.
Referenced by getContext().
bool clang::ento::NodeBuilder::Finalized [protected] |
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 227 of file CoreEngine.h.
Referenced by checkResults().
ExplodedNodeSet& clang::ento::NodeBuilder::Frontier [protected] |
The frontier set - a set of nodes which need to be propagated after the builder dies.
Definition at line 231 of file CoreEngine.h.
Referenced by addNodes(), begin(), end(), getResults(), hasNoSinksInFrontier(), NodeBuilder(), and takeNodes().
bool clang::ento::NodeBuilder::HasGeneratedNodes [protected] |
Definition at line 228 of file CoreEngine.h.
Referenced by hasGeneratedNodes().