Last step of template cleanup: merge *BuilderImpl to *Builder.
Some Builders need further cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78301 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index bf24248..47f77ce 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -82,7 +82,7 @@
     AllStmts = F.Concat(A, AllStmts);    
   }
 
-  virtual bool Audit(NodeTy* N, GRStateManager& VMgr) {
+  virtual bool Audit(ExplodedNode* N, GRStateManager& VMgr) {
     // First handle the auditors that accept all statements.
     bool isSink = false;
     for (Checks::iterator I = AllStmts.begin(), E = AllStmts.end(); I!=E; ++I)
@@ -107,25 +107,26 @@
 // Checker worklist routines.
 //===----------------------------------------------------------------------===//
   
-void GRExprEngine::CheckerVisit(Stmt *S, NodeSet &Dst, NodeSet &Src,
-                                bool isPrevisit) {
+void GRExprEngine::CheckerVisit(Stmt *S, ExplodedNodeSet &Dst, 
+                                ExplodedNodeSet &Src, bool isPrevisit) {
   
   if (Checkers.empty()) {
     Dst = Src;
     return;
   }
   
-  NodeSet Tmp;
-  NodeSet *PrevSet = &Src;
+  ExplodedNodeSet Tmp;
+  ExplodedNodeSet *PrevSet = &Src;
   
   for (std::vector<Checker*>::iterator I = Checkers.begin(), E = Checkers.end();
        I != E; ++I) {
 
-    NodeSet *CurrSet = (I+1 == E) ? &Dst : (PrevSet == &Tmp) ? &Src : &Tmp;
+    ExplodedNodeSet *CurrSet = (I+1 == E) ? &Dst 
+                                          : (PrevSet == &Tmp) ? &Src : &Tmp;
     CurrSet->clear();
     Checker *checker = *I;
     
-    for (NodeSet::iterator NI = PrevSet->begin(), NE = PrevSet->end();
+    for (ExplodedNodeSet::iterator NI = PrevSet->begin(), NE = PrevSet->end();
          NI != NE; ++NI)
       checker->GR_Visit(*CurrSet, *Builder, *this, S, *NI, isPrevisit);
     
@@ -231,7 +232,7 @@
 // Top-level transfer function logic (Dispatcher).
 //===----------------------------------------------------------------------===//
 
-void GRExprEngine::ProcessStmt(Stmt* S, StmtNodeBuilder& builder) {
+void GRExprEngine::ProcessStmt(Stmt* S, GRStmtNodeBuilder& builder) {
   
   PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
                                 S->getLocStart(),
@@ -255,7 +256,7 @@
                            : EntryNode->getState();
 
   // Process any special transfer function for dead symbols.
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
   
   if (!SymReaper.hasDeadSymbols())
     Tmp.Add(EntryNode);
@@ -275,9 +276,9 @@
   
   bool HasAutoGenerated = false;
 
-  for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
+  for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
 
-    NodeSet Dst;
+    ExplodedNodeSet Dst;
     
     // Set the cleaned state.  
     Builder->SetCleanedState(*I == EntryNode ? CleanedState : GetState(*I));
@@ -306,7 +307,7 @@
   Builder = NULL;
 }
 
-void GRExprEngine::Visit(Stmt* S, NodeTy* Pred, NodeSet& Dst) {  
+void GRExprEngine::Visit(Stmt* S, ExplodedNode* Pred, ExplodedNodeSet& Dst) {  
   PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
                                 S->getLocStart(),
                                 "Error evaluating statement");
@@ -351,7 +352,7 @@
       }
 
       if (EagerlyAssume && (B->isRelationalOp() || B->isEqualityOp())) {
-        NodeSet Tmp;
+        ExplodedNodeSet Tmp;
         VisitBinaryOperator(cast<BinaryOperator>(S), Pred, Tmp);
         EvalEagerlyAssume(Dst, Tmp, cast<Expr>(S));        
       }
@@ -477,7 +478,7 @@
     case Stmt::UnaryOperatorClass: {
       UnaryOperator *U = cast<UnaryOperator>(S);
       if (EagerlyAssume && (U->getOpcode() == UnaryOperator::LNot)) {
-        NodeSet Tmp;
+        ExplodedNodeSet Tmp;
         VisitUnaryOperator(U, Pred, Tmp, false);
         EvalEagerlyAssume(Dst, Tmp, U);
       }
@@ -488,7 +489,8 @@
   }
 }
 
-void GRExprEngine::VisitLValue(Expr* Ex, NodeTy* Pred, NodeSet& Dst) {
+void GRExprEngine::VisitLValue(Expr* Ex, ExplodedNode* Pred, 
+                               ExplodedNodeSet& Dst) {
   
   Ex = Ex->IgnoreParens();
   
@@ -574,12 +576,9 @@
 // Generic node creation.
 //===----------------------------------------------------------------------===//
 
-GRExprEngine::NodeTy* GRExprEngine::MakeNode(NodeSet& Dst, Stmt* S,
-                                             NodeTy* Pred,
-                                             const GRState* St,
-                                             ProgramPoint::Kind K,
-                                             const void *tag) {
-  
+ExplodedNode* GRExprEngine::MakeNode(ExplodedNodeSet& Dst, Stmt* S,
+                                     ExplodedNode* Pred, const GRState* St,
+                                     ProgramPoint::Kind K, const void *tag) {
   assert (Builder && "GRStmtNodeBuilder not present.");
   SaveAndRestore<const void*> OldTag(Builder->Tag);
   Builder->Tag = tag;
@@ -685,7 +684,7 @@
 }
 
 void GRExprEngine::ProcessBranch(Stmt* Condition, Stmt* Term,
-                                 BranchNodeBuilder& builder) {
+                                 GRBranchNodeBuilder& builder) {
   
   // Remove old bindings for subexpressions.
   const GRState* PrevState =
@@ -731,7 +730,7 @@
     }
       
     case SVal::UndefinedKind: {      
-      NodeTy* N = builder.generateNode(PrevState, true);
+      ExplodedNode* N = builder.generateNode(PrevState, true);
 
       if (N) {
         N->markAsSink();
@@ -762,7 +761,7 @@
 
 /// ProcessIndirectGoto - Called by GRCoreEngine.  Used to generate successor
 ///  nodes by processing the 'effects' of a computed goto jump.
-void GRExprEngine::ProcessIndirectGoto(IndirectGotoNodeBuilder& builder) {
+void GRExprEngine::ProcessIndirectGoto(GRIndirectGotoNodeBuilder& builder) {
 
   const GRState *state = builder.getState();  
   SVal V = state->getSVal(builder.getTarget());
@@ -774,7 +773,7 @@
   //   (3) We have no clue about the label.  Dispatch to all targets.
   //
   
-  typedef IndirectGotoNodeBuilder::iterator iterator;
+  typedef GRIndirectGotoNodeBuilder::iterator iterator;
 
   if (isa<loc::GotoLabel>(V)) {
     LabelStmt* L = cast<loc::GotoLabel>(V).getLabel();
@@ -792,7 +791,7 @@
 
   if (isa<loc::ConcreteInt>(V) || isa<UndefinedVal>(V)) {
     // Dispatch to the first target and mark it as a sink.
-    NodeTy* N = builder.generateNode(builder.begin(), state, true);
+    ExplodedNode* N = builder.generateNode(builder.begin(), state, true);
     UndefBranches.insert(N);
     return;
   }
@@ -806,7 +805,7 @@
 
 
 void GRExprEngine::VisitGuardedExpr(Expr* Ex, Expr* L, Expr* R,
-                                    NodeTy* Pred, NodeSet& Dst) {
+                                    ExplodedNode* Pred, ExplodedNodeSet& Dst) {
   
   assert (Ex == CurrentStmt && getCFG().isBlkExpr(Ex));
   
@@ -825,14 +824,14 @@
 
 /// ProcessSwitch - Called by GRCoreEngine.  Used to generate successor
 ///  nodes by processing the 'effects' of a switch statement.
-void GRExprEngine::ProcessSwitch(SwitchNodeBuilder& builder) {  
-  typedef SwitchNodeBuilder::iterator iterator;  
+void GRExprEngine::ProcessSwitch(GRSwitchNodeBuilder& builder) {  
+  typedef GRSwitchNodeBuilder::iterator iterator;  
   const GRState* state = builder.getState();  
   Expr* CondE = builder.getCondition();
   SVal  CondV = state->getSVal(CondE);
 
   if (CondV.isUndef()) {
-    NodeTy* N = builder.generateDefaultCaseNode(state, true);
+    ExplodedNode* N = builder.generateDefaultCaseNode(state, true);
     UndefBranches.insert(N);
     return;
   }
@@ -912,8 +911,8 @@
 // Transfer functions: logical operations ('&&', '||').
 //===----------------------------------------------------------------------===//
 
-void GRExprEngine::VisitLogicalExpr(BinaryOperator* B, NodeTy* Pred,
-                                    NodeSet& Dst) {
+void GRExprEngine::VisitLogicalExpr(BinaryOperator* B, ExplodedNode* Pred,
+                                    ExplodedNodeSet& Dst) {
   
   assert(B->getOpcode() == BinaryOperator::LAnd ||
          B->getOpcode() == BinaryOperator::LOr);
@@ -967,8 +966,8 @@
 // Transfer functions: Loads and stores.
 //===----------------------------------------------------------------------===//
 
-void GRExprEngine::VisitDeclRefExpr(DeclRefExpr* Ex, NodeTy* Pred, NodeSet& Dst,
-                                    bool asLValue) {
+void GRExprEngine::VisitDeclRefExpr(DeclRefExpr* Ex, ExplodedNode* Pred, 
+                                    ExplodedNodeSet& Dst, bool asLValue) {
   
   const GRState* state = GetState(Pred);
 
@@ -1005,12 +1004,13 @@
 }
 
 /// VisitArraySubscriptExpr - Transfer function for array accesses
-void GRExprEngine::VisitArraySubscriptExpr(ArraySubscriptExpr* A, NodeTy* Pred,
-                                           NodeSet& Dst, bool asLValue) {
+void GRExprEngine::VisitArraySubscriptExpr(ArraySubscriptExpr* A, 
+                                           ExplodedNode* Pred,
+                                           ExplodedNodeSet& Dst, bool asLValue){
   
   Expr* Base = A->getBase()->IgnoreParens();
   Expr* Idx  = A->getIdx()->IgnoreParens();
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
   
   if (Base->getType()->isVectorType()) {
     // For vector types get its lvalue.
@@ -1022,11 +1022,11 @@
   else  
     Visit(Base, Pred, Tmp);   // Get Base's rvalue, which should be an LocVal.
   
-  for (NodeSet::iterator I1=Tmp.begin(), E1=Tmp.end(); I1!=E1; ++I1) {    
-    NodeSet Tmp2;
+  for (ExplodedNodeSet::iterator I1=Tmp.begin(), E1=Tmp.end(); I1!=E1; ++I1) {
+    ExplodedNodeSet Tmp2;
     Visit(Idx, *I1, Tmp2);     // Evaluate the index.
       
-    for (NodeSet::iterator I2=Tmp2.begin(), E2=Tmp2.end(); I2!=E2; ++I2) {
+    for (ExplodedNodeSet::iterator I2=Tmp2.begin(),E2=Tmp2.end();I2!=E2; ++I2) {
       const GRState* state = GetState(*I2);
       SVal V = state->getLValue(A->getType(), state->getSVal(Base),
                                 state->getSVal(Idx));
@@ -1041,11 +1041,11 @@
 }
 
 /// VisitMemberExpr - Transfer function for member expressions.
-void GRExprEngine::VisitMemberExpr(MemberExpr* M, NodeTy* Pred,
-                                   NodeSet& Dst, bool asLValue) {
+void GRExprEngine::VisitMemberExpr(MemberExpr* M, ExplodedNode* Pred,
+                                   ExplodedNodeSet& Dst, bool asLValue) {
   
   Expr* Base = M->getBase()->IgnoreParens();
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
   
   if (M->isArrow()) 
     Visit(Base, Pred, Tmp);        // p->f = ...  or   ... = p->f
@@ -1056,7 +1056,7 @@
   if (!Field) // FIXME: skipping member expressions for non-fields
     return;
 
-  for (NodeSet::iterator I = Tmp.begin(), E = Tmp.end(); I != E; ++I) {
+  for (ExplodedNodeSet::iterator I = Tmp.begin(), E = Tmp.end(); I != E; ++I) {
     const GRState* state = GetState(*I);
     // FIXME: Should we insert some assumption logic in here to determine
     // if "Base" is a valid piece of memory?  Before we put this assumption
@@ -1073,7 +1073,7 @@
 
 /// EvalBind - Handle the semantics of binding a value to a specific location.
 ///  This method is used by EvalStore and (soon) VisitDeclStmt, and others.
-void GRExprEngine::EvalBind(NodeSet& Dst, Expr* Ex, NodeTy* Pred,
+void GRExprEngine::EvalBind(ExplodedNodeSet& Dst, Expr* Ex, ExplodedNode* Pred,
                             const GRState* state, SVal location, SVal Val) {
 
   const GRState* newState = 0;
@@ -1105,7 +1105,7 @@
 ///  @param state The current simulation state
 ///  @param location The location to store the value
 ///  @param Val The value to be stored
-void GRExprEngine::EvalStore(NodeSet& Dst, Expr* Ex, NodeTy* Pred,
+void GRExprEngine::EvalStore(ExplodedNodeSet& Dst, Expr* Ex, ExplodedNode* Pred,
                              const GRState* state, SVal location, SVal Val,
                              const void *tag) {
   
@@ -1128,7 +1128,7 @@
   EvalBind(Dst, Ex, Pred, state, location, Val);
 }
 
-void GRExprEngine::EvalLoad(NodeSet& Dst, Expr* Ex, NodeTy* Pred,
+void GRExprEngine::EvalLoad(ExplodedNodeSet& Dst, Expr* Ex, ExplodedNode* Pred,
                             const GRState* state, SVal location,
                             const void *tag) {
 
@@ -1169,28 +1169,27 @@
   }
 }
 
-void GRExprEngine::EvalStore(NodeSet& Dst, Expr* Ex, Expr* StoreE, NodeTy* Pred,
-                             const GRState* state, SVal location, SVal Val,
-                             const void *tag) {
+void GRExprEngine::EvalStore(ExplodedNodeSet& Dst, Expr* Ex, Expr* StoreE, 
+                             ExplodedNode* Pred, const GRState* state, 
+                             SVal location, SVal Val, const void *tag) {
  
-  NodeSet TmpDst;
+  ExplodedNodeSet TmpDst;
   EvalStore(TmpDst, StoreE, Pred, state, location, Val, tag);
 
-  for (NodeSet::iterator I=TmpDst.begin(), E=TmpDst.end(); I!=E; ++I)
+  for (ExplodedNodeSet::iterator I=TmpDst.begin(), E=TmpDst.end(); I!=E; ++I)
     MakeNode(Dst, Ex, *I, (*I)->getState(), ProgramPoint::PostStmtKind, tag);
 }
 
-GRExprEngine::NodeTy* GRExprEngine::EvalLocation(Stmt* Ex, NodeTy* Pred,
-                                                 const GRState* state,
-                                                 SVal location,
-                                                 const void *tag) {
+ExplodedNode* GRExprEngine::EvalLocation(Stmt* Ex, ExplodedNode* Pred,
+                                         const GRState* state, SVal location,
+                                         const void *tag) {
   
   SaveAndRestore<const void*> OldTag(Builder->Tag);
   Builder->Tag = tag;
   
   // Check for loads/stores from/to undefined values.  
   if (location.isUndef()) {
-    NodeTy* N =
+    ExplodedNode* N =
       Builder->generateNode(Ex, state, Pred,
                             ProgramPoint::PostUndefLocationCheckFailedKind);
     
@@ -1227,7 +1226,7 @@
     
     // We don't use "MakeNode" here because the node will be a sink
     // and we have no intention of processing it later.
-    NodeTy* NullNode =
+    ExplodedNode* NullNode =
       Builder->generateNode(Ex, StNull, Pred, 
                             ProgramPoint::PostNullCheckFailedKind);
 
@@ -1261,7 +1260,7 @@
 
       if (StOutBound) {
         // Report warning.  Make sink node manually.
-        NodeTy* OOBNode =
+        ExplodedNode* OOBNode =
           Builder->generateNode(Ex, StOutBound, Pred,
                                 ProgramPoint::PostOutOfBoundsCheckFailedKind);
 
@@ -1300,7 +1299,7 @@
 //
 static bool EvalOSAtomicCompareAndSwap(ExplodedNodeSet& Dst,
                                        GRExprEngine& Engine,
-                                       GRStmtNodeBuilder<GRState>& Builder,
+                                       GRStmtNodeBuilder& Builder,
                                        CallExpr* CE, SVal L,                 
                                        ExplodedNode* Pred) {
 
@@ -1404,7 +1403,7 @@
 
 static bool EvalOSAtomic(ExplodedNodeSet& Dst,
                          GRExprEngine& Engine,
-                         GRStmtNodeBuilder<GRState>& Builder,
+                         GRStmtNodeBuilder& Builder,
                          CallExpr* CE, SVal L,
                          ExplodedNode* Pred) {
   const FunctionDecl* FD = L.getAsFunctionDecl();
@@ -1426,7 +1425,8 @@
 // Transfer function: Function calls.
 //===----------------------------------------------------------------------===//
 
-void GRExprEngine::EvalCall(NodeSet& Dst, CallExpr* CE, SVal L, NodeTy* Pred) {
+void GRExprEngine::EvalCall(ExplodedNodeSet& Dst, CallExpr* CE, SVal L, 
+                            ExplodedNode* Pred) {
   assert (Builder && "GRStmtNodeBuilder must be defined.");
   
   // FIXME: Allow us to chain together transfer functions.
@@ -1436,10 +1436,10 @@
   getTF().EvalCall(Dst, *this, *Builder, CE, L, Pred);
 }
 
-void GRExprEngine::VisitCall(CallExpr* CE, NodeTy* Pred,
+void GRExprEngine::VisitCall(CallExpr* CE, ExplodedNode* Pred,
                              CallExpr::arg_iterator AI,
                              CallExpr::arg_iterator AE,
-                             NodeSet& Dst)
+                             ExplodedNodeSet& Dst)
 {
   // Determine the type of function we're calling (if available).
   const FunctionProtoType *Proto = NULL;
@@ -1450,10 +1450,11 @@
   VisitCallRec(CE, Pred, AI, AE, Dst, Proto, /*ParamIdx=*/0);
 }
 
-void GRExprEngine::VisitCallRec(CallExpr* CE, NodeTy* Pred,
+void GRExprEngine::VisitCallRec(CallExpr* CE, ExplodedNode* Pred,
                                 CallExpr::arg_iterator AI,
                                 CallExpr::arg_iterator AE,
-                                NodeSet& Dst, const FunctionProtoType *Proto,
+                                ExplodedNodeSet& Dst, 
+                                const FunctionProtoType *Proto, 
                                 unsigned ParamIdx) {
   
   // Process the arguments.
@@ -1464,14 +1465,15 @@
     if (Proto && ParamIdx < Proto->getNumArgs())
       VisitAsLvalue = Proto->getArgType(ParamIdx)->isReferenceType();
 
-    NodeSet DstTmp;  
+    ExplodedNodeSet DstTmp;  
     if (VisitAsLvalue)
       VisitLValue(*AI, Pred, DstTmp);    
     else
       Visit(*AI, Pred, DstTmp);    
     ++AI;
     
-    for (NodeSet::iterator DI=DstTmp.begin(), DE=DstTmp.end(); DI != DE; ++DI)
+    for (ExplodedNodeSet::iterator DI=DstTmp.begin(), DE=DstTmp.end(); DI != DE;
+         ++DI)
       VisitCallRec(CE, *DI, AI, AE, Dst, Proto, ParamIdx + 1);
     
     return;
@@ -1479,11 +1481,11 @@
 
   // If we reach here we have processed all of the arguments.  Evaluate
   // the callee expression.
-  NodeSet DstTmp;
+  ExplodedNodeSet DstTmp;
   Expr* Callee = CE->getCallee()->IgnoreParens();
   
   { // Enter new scope to make the lifetime of 'DstTmp2' bounded.
-    NodeSet DstTmp2;
+    ExplodedNodeSet DstTmp2;
     Visit(Callee, Pred, DstTmp2);
     
     // Perform the previsit of the CallExpr, storing the results in DstTmp.
@@ -1491,7 +1493,7 @@
   }
   
   // Finally, evaluate the function call.
-  for (NodeSet::iterator DI = DstTmp.begin(), DE = DstTmp.end(); DI!=DE; ++DI) {
+  for (ExplodedNodeSet::iterator DI = DstTmp.begin(), DE = DstTmp.end(); DI!=DE; ++DI) {
 
     const GRState* state = GetState(*DI);
     SVal L = state->getSVal(Callee);
@@ -1502,7 +1504,7 @@
     // Check for undefined control-flow or calls to NULL.
     
     if (L.isUndef() || isa<loc::ConcreteInt>(L)) {      
-      NodeTy* N = Builder->generateNode(CE, state, *DI);
+      ExplodedNode* N = Builder->generateNode(CE, state, *DI);
       
       if (N) {
         N->markAsSink();
@@ -1640,7 +1642,7 @@
          I != E; ++I) {
 
       if (GetState(*DI)->getSVal(*I).isUndef()) {        
-        NodeTy* N = Builder->generateNode(CE, GetState(*DI), *DI);
+        ExplodedNode* N = Builder->generateNode(CE, GetState(*DI), *DI);
       
         if (N) {
           N->markAsSink();
@@ -1677,9 +1679,9 @@
 static std::pair<const void*,const void*> EagerlyAssumeTag
   = std::pair<const void*,const void*>(&EagerlyAssumeTag,0);
 
-void GRExprEngine::EvalEagerlyAssume(NodeSet &Dst, NodeSet &Src, Expr *Ex) {
-  for (NodeSet::iterator I=Src.begin(), E=Src.end(); I!=E; ++I) {
-    NodeTy *Pred = *I;
+void GRExprEngine::EvalEagerlyAssume(ExplodedNodeSet &Dst, ExplodedNodeSet &Src, Expr *Ex) {
+  for (ExplodedNodeSet::iterator I=Src.begin(), E=Src.end(); I!=E; ++I) {
+    ExplodedNode *Pred = *I;
     
     // Test if the previous node was as the same expression.  This can happen
     // when the expression fails to evaluate to anything meaningful and
@@ -1719,14 +1721,14 @@
 //===----------------------------------------------------------------------===//
 
 void GRExprEngine::VisitObjCIvarRefExpr(ObjCIvarRefExpr* Ex,
-                                            NodeTy* Pred, NodeSet& Dst,
+                                            ExplodedNode* Pred, ExplodedNodeSet& Dst,
                                             bool asLValue) {
   
   Expr* Base = cast<Expr>(Ex->getBase());
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
   Visit(Base, Pred, Tmp);
   
-  for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
+  for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
     const GRState* state = GetState(*I);
     SVal BaseVal = state->getSVal(Base);
     SVal location = state->getLValue(Ex->getDecl(), BaseVal);
@@ -1743,7 +1745,7 @@
 //===----------------------------------------------------------------------===//
 
 void GRExprEngine::VisitObjCForCollectionStmt(ObjCForCollectionStmt* S,
-                                              NodeTy* Pred, NodeSet& Dst) {
+                                              ExplodedNode* Pred, ExplodedNodeSet& Dst) {
     
   // ObjCForCollectionStmts are processed in two places.  This method
   // handles the case where an ObjCForCollectionStmt* occurs as one of the
@@ -1781,17 +1783,17 @@
     return;
   }
 
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
   VisitLValue(cast<Expr>(elem), Pred, Tmp);
   
-  for (NodeSet::iterator I = Tmp.begin(), E = Tmp.end(); I!=E; ++I) {
+  for (ExplodedNodeSet::iterator I = Tmp.begin(), E = Tmp.end(); I!=E; ++I) {
     const GRState* state = GetState(*I);
     VisitObjCForCollectionStmtAux(S, *I, Dst, state->getSVal(elem));
   }
 }
 
 void GRExprEngine::VisitObjCForCollectionStmtAux(ObjCForCollectionStmt* S,
-                                                 NodeTy* Pred, NodeSet& Dst,
+                                                 ExplodedNode* Pred, ExplodedNodeSet& Dst,
                                                  SVal ElementV) {
     
 
@@ -1840,8 +1842,8 @@
 // Transfer function: Objective-C message expressions.
 //===----------------------------------------------------------------------===//
 
-void GRExprEngine::VisitObjCMessageExpr(ObjCMessageExpr* ME, NodeTy* Pred,
-                                        NodeSet& Dst){
+void GRExprEngine::VisitObjCMessageExpr(ObjCMessageExpr* ME, ExplodedNode* Pred,
+                                        ExplodedNodeSet& Dst){
   
   VisitObjCMessageExprArgHelper(ME, ME->arg_begin(), ME->arg_end(),
                                 Pred, Dst);
@@ -1850,16 +1852,16 @@
 void GRExprEngine::VisitObjCMessageExprArgHelper(ObjCMessageExpr* ME,
                                               ObjCMessageExpr::arg_iterator AI,
                                               ObjCMessageExpr::arg_iterator AE,
-                                              NodeTy* Pred, NodeSet& Dst) {
+                                              ExplodedNode* Pred, ExplodedNodeSet& Dst) {
   if (AI == AE) {
     
     // Process the receiver.
     
     if (Expr* Receiver = ME->getReceiver()) {
-      NodeSet Tmp;
+      ExplodedNodeSet Tmp;
       Visit(Receiver, Pred, Tmp);
       
-      for (NodeSet::iterator NI = Tmp.begin(), NE = Tmp.end(); NI != NE; ++NI)
+      for (ExplodedNodeSet::iterator NI = Tmp.begin(), NE = Tmp.end(); NI != NE; ++NI)
         VisitObjCMessageExprDispatchHelper(ME, *NI, Dst);
       
       return;
@@ -1869,18 +1871,18 @@
     return;
   }
   
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
   Visit(*AI, Pred, Tmp);
   
   ++AI;
   
-  for (NodeSet::iterator NI = Tmp.begin(), NE = Tmp.end(); NI != NE; ++NI)
+  for (ExplodedNodeSet::iterator NI = Tmp.begin(), NE = Tmp.end(); NI != NE; ++NI)
     VisitObjCMessageExprArgHelper(ME, AI, AE, *NI, Dst);
 }
 
 void GRExprEngine::VisitObjCMessageExprDispatchHelper(ObjCMessageExpr* ME,
-                                                      NodeTy* Pred,
-                                                      NodeSet& Dst) {
+                                                      ExplodedNode* Pred,
+                                                      ExplodedNodeSet& Dst) {
   
   // FIXME: More logic for the processing the method call. 
   
@@ -1894,7 +1896,7 @@
     
     // Check for undefined control-flow.    
     if (L.isUndef()) {
-      NodeTy* N = Builder->generateNode(ME, state, Pred);
+      ExplodedNode* N = Builder->generateNode(ME, state, Pred);
       
       if (N) {
         N->markAsSink();
@@ -1922,7 +1924,7 @@
           // this point.
           // FIXME: We should bifurcate and fill the returned struct with
           //  garbage.                
-          if (NodeTy* N = Builder->generateNode(ME, StNull, Pred)) {
+          if (ExplodedNode* N = Builder->generateNode(ME, StNull, Pred)) {
             N->markAsSink();
             if (StNotNull)
               NilReceiverStructRetImplicit.insert(N);
@@ -1941,7 +1943,7 @@
             const uint64_t returnTypeSize = Ctx.getTypeSize(ME->getType());
 
             if(voidPtrSize < returnTypeSize) {
-              if (NodeTy* N = Builder->generateNode(ME, StNull, Pred)) {
+              if (ExplodedNode* N = Builder->generateNode(ME, StNull, Pred)) {
                 N->markAsSink();
                 if(StNotNull)
                   NilReceiverLargerThanVoidPtrRetImplicit.insert(N);
@@ -2038,7 +2040,7 @@
       
       // Generate an error node for passing an uninitialized/undefined value
       // as an argument to a message expression.  This node is a sink.
-      NodeTy* N = Builder->generateNode(ME, state, Pred);
+      ExplodedNode* N = Builder->generateNode(ME, state, Pred);
       
       if (N) {
         N->markAsSink();
@@ -2075,8 +2077,8 @@
 // Transfer functions: Miscellaneous statements.
 //===----------------------------------------------------------------------===//
 
-void GRExprEngine::VisitCast(Expr* CastE, Expr* Ex, NodeTy* Pred, NodeSet& Dst){
-  NodeSet S1;
+void GRExprEngine::VisitCast(Expr* CastE, Expr* Ex, ExplodedNode* Pred, ExplodedNodeSet& Dst){
+  ExplodedNodeSet S1;
   QualType T = CastE->getType();
   QualType ExTy = Ex->getType();
 
@@ -2090,14 +2092,14 @@
   
   // Check for casting to "void".
   if (T->isVoidType()) {    
-    for (NodeSet::iterator I1 = S1.begin(), E1 = S1.end(); I1 != E1; ++I1)
+    for (ExplodedNodeSet::iterator I1 = S1.begin(), E1 = S1.end(); I1 != E1; ++I1)
       Dst.Add(*I1);
 
     return;
   }
 
-  for (NodeSet::iterator I1 = S1.begin(), E1 = S1.end(); I1 != E1; ++I1) {
-    NodeTy* N = *I1;
+  for (ExplodedNodeSet::iterator I1 = S1.begin(), E1 = S1.end(); I1 != E1; ++I1) {
+    ExplodedNode* N = *I1;
     const GRState* state = GetState(N);
     SVal V = state->getSVal(Ex);
     const SValuator::CastResult &Res = SVator.EvalCast(V, state, T, ExTy);
@@ -2107,13 +2109,13 @@
 }
 
 void GRExprEngine::VisitCompoundLiteralExpr(CompoundLiteralExpr* CL,
-                                            NodeTy* Pred, NodeSet& Dst, 
+                                            ExplodedNode* Pred, ExplodedNodeSet& Dst, 
                                             bool asLValue) {
   InitListExpr* ILE = cast<InitListExpr>(CL->getInitializer()->IgnoreParens());
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
   Visit(ILE, Pred, Tmp);
   
-  for (NodeSet::iterator I = Tmp.begin(), EI = Tmp.end(); I!=EI; ++I) {
+  for (ExplodedNodeSet::iterator I = Tmp.begin(), EI = Tmp.end(); I!=EI; ++I) {
     const GRState* state = GetState(*I);
     SVal ILV = state->getSVal(ILE);
     state = state->bindCompoundLiteral(CL, ILV);
@@ -2125,7 +2127,7 @@
   }
 }
 
-void GRExprEngine::VisitDeclStmt(DeclStmt* DS, NodeTy* Pred, NodeSet& Dst) {  
+void GRExprEngine::VisitDeclStmt(DeclStmt* DS, ExplodedNode* Pred, ExplodedNodeSet& Dst) {  
 
   // The CFG has one DeclStmt per Decl.  
   Decl* D = *DS->decl_begin();
@@ -2138,14 +2140,14 @@
 
   // FIXME: static variables may have an initializer, but the second
   //  time a function is called those values may not be current.
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
 
   if (InitEx)
     Visit(InitEx, Pred, Tmp);
   else
     Tmp.Add(Pred);
   
-  for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
+  for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
     const GRState* state = GetState(*I);
     unsigned Count = Builder->getCurrentBlockCount();
 
@@ -2158,7 +2160,7 @@
       SVal Size = state->getSVal(SE);
       
       if (Size.isUndef()) {
-        if (NodeTy* N = Builder->generateNode(DS, state, Pred)) {
+        if (ExplodedNode* N = Builder->generateNode(DS, state, Pred)) {
           N->markAsSink();          
           ExplicitBadSizedVLA.insert(N);
         }
@@ -2169,7 +2171,7 @@
       state = state->assume(Size, true);
       
       if (zeroState) {
-        if (NodeTy* N = Builder->generateNode(DS, zeroState, Pred)) {
+        if (ExplodedNode* N = Builder->generateNode(DS, zeroState, Pred)) {
           N->markAsSink();          
           if (state)
             ImplicitBadSizedVLA.insert(N);
@@ -2216,18 +2218,18 @@
 class VISIBILITY_HIDDEN InitListWLItem {
 public:
   llvm::ImmutableList<SVal> Vals;
-  GRExprEngine::NodeTy* N;
+  ExplodedNode* N;
   InitListExpr::reverse_iterator Itr;
   
-  InitListWLItem(GRExprEngine::NodeTy* n, llvm::ImmutableList<SVal> vals,
-         InitListExpr::reverse_iterator itr)
+  InitListWLItem(ExplodedNode* n, llvm::ImmutableList<SVal> vals,
+                 InitListExpr::reverse_iterator itr)
   : Vals(vals), N(n), Itr(itr) {}
 };
 }
 
 
-void GRExprEngine::VisitInitListExpr(InitListExpr* E, NodeTy* Pred, 
-                                     NodeSet& Dst) {
+void GRExprEngine::VisitInitListExpr(InitListExpr* E, ExplodedNode* Pred, 
+                                     ExplodedNodeSet& Dst) {
 
   const GRState* state = GetState(Pred);
   QualType T = getContext().getCanonicalType(E->getType());
@@ -2257,12 +2259,12 @@
       InitListWLItem X = WorkList.back();
       WorkList.pop_back();
       
-      NodeSet Tmp;
+      ExplodedNodeSet Tmp;
       Visit(*X.Itr, X.N, Tmp);
       
       InitListExpr::reverse_iterator NewItr = X.Itr + 1;
 
-      for (NodeSet::iterator NI=Tmp.begin(), NE=Tmp.end(); NI!=NE; ++NI) {
+      for (ExplodedNodeSet::iterator NI=Tmp.begin(), NE=Tmp.end(); NI!=NE; ++NI) {
         // Get the last initializer value.
         state = GetState(*NI);
         SVal InitV = state->getSVal(cast<Expr>(*X.Itr));
@@ -2291,10 +2293,10 @@
 
   if (Loc::IsLocType(T) || T->isIntegerType()) {
     assert (E->getNumInits() == 1);
-    NodeSet Tmp;
+    ExplodedNodeSet Tmp;
     Expr* Init = E->getInit(0);
     Visit(Init, Pred, Tmp);
-    for (NodeSet::iterator I = Tmp.begin(), EI = Tmp.end(); I != EI; ++I) {
+    for (ExplodedNodeSet::iterator I = Tmp.begin(), EI = Tmp.end(); I != EI; ++I) {
       state = GetState(*I);
       MakeNode(Dst, E, *I, state->bindExpr(E, state->getSVal(Init)));
     }
@@ -2308,8 +2310,8 @@
 
 /// VisitSizeOfAlignOfExpr - Transfer function for sizeof(type).
 void GRExprEngine::VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr* Ex,
-                                          NodeTy* Pred,
-                                          NodeSet& Dst) {
+                                          ExplodedNode* Pred,
+                                          ExplodedNodeSet& Dst) {
   QualType T = Ex->getTypeOfArgument();
   uint64_t amt;  
   
@@ -2341,8 +2343,8 @@
 }
 
 
-void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred,
-                                      NodeSet& Dst, bool asLValue) {
+void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, ExplodedNode* Pred,
+                                      ExplodedNodeSet& Dst, bool asLValue) {
 
   switch (U->getOpcode()) {
       
@@ -2352,10 +2354,10 @@
     case UnaryOperator::Deref: {
       
       Expr* Ex = U->getSubExpr()->IgnoreParens();
-      NodeSet Tmp;
+      ExplodedNodeSet Tmp;
       Visit(Ex, Pred, Tmp);
       
-      for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
+      for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
         
         const GRState* state = GetState(*I);
         SVal location = state->getSVal(Ex);
@@ -2373,10 +2375,10 @@
     case UnaryOperator::Real: {
       
       Expr* Ex = U->getSubExpr()->IgnoreParens();
-      NodeSet Tmp;
+      ExplodedNodeSet Tmp;
       Visit(Ex, Pred, Tmp);
       
-      for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
+      for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
         
         // FIXME: We don't have complex SValues yet.
         if (Ex->getType()->isAnyComplexType()) {
@@ -2397,10 +2399,10 @@
     case UnaryOperator::Imag: {
       
       Expr* Ex = U->getSubExpr()->IgnoreParens();
-      NodeSet Tmp;
+      ExplodedNodeSet Tmp;
       Visit(Ex, Pred, Tmp);
       
-      for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
+      for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
         // FIXME: We don't have complex SValues yet.
         if (Ex->getType()->isAnyComplexType()) {
           // Just report "Unknown."
@@ -2432,10 +2434,10 @@
       // subexpression.
 
       Expr* Ex = U->getSubExpr()->IgnoreParens();
-      NodeSet Tmp;
+      ExplodedNodeSet Tmp;
       Visit(Ex, Pred, Tmp);
       
-      for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {        
+      for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {        
         const GRState* state = GetState(*I);
         MakeNode(Dst, U, *I, state->bindExpr(U, state->getSVal(Ex)));
       }
@@ -2447,10 +2449,10 @@
       
       assert(!asLValue);
       Expr* Ex = U->getSubExpr()->IgnoreParens();
-      NodeSet Tmp;
+      ExplodedNodeSet Tmp;
       VisitLValue(Ex, Pred, Tmp);
      
-      for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {        
+      for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {        
         const GRState* state = GetState(*I);
         SVal V = state->getSVal(Ex);
         state = state->bindExpr(U, V);
@@ -2466,10 +2468,10 @@
       
       assert (!asLValue);
       Expr* Ex = U->getSubExpr()->IgnoreParens();
-      NodeSet Tmp;
+      ExplodedNodeSet Tmp;
       Visit(Ex, Pred, Tmp);
       
-      for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {        
+      for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {        
         const GRState* state = GetState(*I);
         
         // Get the value of the subexpression.
@@ -2540,20 +2542,20 @@
   // Handle ++ and -- (both pre- and post-increment).
 
   assert (U->isIncrementDecrementOp());
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
   Expr* Ex = U->getSubExpr()->IgnoreParens();
   VisitLValue(Ex, Pred, Tmp);
   
-  for (NodeSet::iterator I = Tmp.begin(), E = Tmp.end(); I!=E; ++I) {
+  for (ExplodedNodeSet::iterator I = Tmp.begin(), E = Tmp.end(); I!=E; ++I) {
     
     const GRState* state = GetState(*I);
     SVal V1 = state->getSVal(Ex);
     
     // Perform a load.      
-    NodeSet Tmp2;
+    ExplodedNodeSet Tmp2;
     EvalLoad(Tmp2, Ex, *I, state, V1);
 
-    for (NodeSet::iterator I2 = Tmp2.begin(), E2 = Tmp2.end(); I2!=E2; ++I2) {
+    for (ExplodedNodeSet::iterator I2 = Tmp2.begin(), E2 = Tmp2.end(); I2!=E2; ++I2) {
         
       state = GetState(*I2);
       SVal V2 = state->getSVal(Ex);
@@ -2614,32 +2616,32 @@
   }
 }
 
-void GRExprEngine::VisitAsmStmt(AsmStmt* A, NodeTy* Pred, NodeSet& Dst) {
+void GRExprEngine::VisitAsmStmt(AsmStmt* A, ExplodedNode* Pred, ExplodedNodeSet& Dst) {
   VisitAsmStmtHelperOutputs(A, A->begin_outputs(), A->end_outputs(), Pred, Dst);
 }  
 
 void GRExprEngine::VisitAsmStmtHelperOutputs(AsmStmt* A,
                                              AsmStmt::outputs_iterator I,
                                              AsmStmt::outputs_iterator E,
-                                             NodeTy* Pred, NodeSet& Dst) {
+                                             ExplodedNode* Pred, ExplodedNodeSet& Dst) {
   if (I == E) {
     VisitAsmStmtHelperInputs(A, A->begin_inputs(), A->end_inputs(), Pred, Dst);
     return;
   }
   
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
   VisitLValue(*I, Pred, Tmp);
   
   ++I;
   
-  for (NodeSet::iterator NI = Tmp.begin(), NE = Tmp.end(); NI != NE; ++NI)
+  for (ExplodedNodeSet::iterator NI = Tmp.begin(), NE = Tmp.end(); NI != NE; ++NI)
     VisitAsmStmtHelperOutputs(A, I, E, *NI, Dst);
 }
 
 void GRExprEngine::VisitAsmStmtHelperInputs(AsmStmt* A,
                                             AsmStmt::inputs_iterator I,
                                             AsmStmt::inputs_iterator E,
-                                            NodeTy* Pred, NodeSet& Dst) {
+                                            ExplodedNode* Pred, ExplodedNodeSet& Dst) {
   if (I == E) {
     
     // We have processed both the inputs and the outputs.  All of the outputs
@@ -2665,16 +2667,16 @@
     return;
   }
   
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
   Visit(*I, Pred, Tmp);
   
   ++I;
   
-  for (NodeSet::iterator NI = Tmp.begin(), NE = Tmp.end(); NI != NE; ++NI)
+  for (ExplodedNodeSet::iterator NI = Tmp.begin(), NE = Tmp.end(); NI != NE; ++NI)
     VisitAsmStmtHelperInputs(A, I, E, *NI, Dst);
 }
 
-void GRExprEngine::EvalReturn(NodeSet& Dst, ReturnStmt* S, NodeTy* Pred) {
+void GRExprEngine::EvalReturn(ExplodedNodeSet& Dst, ReturnStmt* S, ExplodedNode* Pred) {
   assert (Builder && "GRStmtNodeBuilder must be defined.");
   
   unsigned size = Dst.size();  
@@ -2690,7 +2692,7 @@
     MakeNode(Dst, S, Pred, GetState(Pred));
 }
 
-void GRExprEngine::VisitReturnStmt(ReturnStmt* S, NodeTy* Pred, NodeSet& Dst) {
+void GRExprEngine::VisitReturnStmt(ReturnStmt* S, ExplodedNode* Pred, ExplodedNodeSet& Dst) {
 
   Expr* R = S->getRetValue();
   
@@ -2699,10 +2701,10 @@
     return;
   }
 
-  NodeSet Tmp;
+  ExplodedNodeSet Tmp;
   Visit(R, Pred, Tmp);
 
-  for (NodeSet::iterator I = Tmp.begin(), E = Tmp.end(); I != E; ++I) {
+  for (ExplodedNodeSet::iterator I = Tmp.begin(), E = Tmp.end(); I != E; ++I) {
     SVal X = (*I)->getState()->getSVal(R);
     
     // Check if we return the address of a stack variable.
@@ -2712,7 +2714,7 @@
       
       if (R && R->hasStackStorage()) {
         // Create a special node representing the error.
-        if (NodeTy* N = Builder->generateNode(S, GetState(*I), *I)) {
+        if (ExplodedNode* N = Builder->generateNode(S, GetState(*I), *I)) {
           N->markAsSink();
           RetsStackAddr.insert(N);
         }
@@ -2721,7 +2723,7 @@
     }
     // Check if we return an undefined value.
     else if (X.isUndef()) {
-      if (NodeTy* N = Builder->generateNode(S, GetState(*I), *I)) {
+      if (ExplodedNode* N = Builder->generateNode(S, GetState(*I), *I)) {
         N->markAsSink();
         RetsUndef.insert(N);
       }
@@ -2737,12 +2739,12 @@
 //===----------------------------------------------------------------------===//
 
 const GRState* GRExprEngine::CheckDivideZero(Expr* Ex, const GRState* state,
-                                             NodeTy* Pred, SVal Denom) {
+                                             ExplodedNode* Pred, SVal Denom) {
   
   // Divide by undefined? (potentially zero)
   
   if (Denom.isUndef()) {
-    NodeTy* DivUndef = Builder->generateNode(Ex, state, Pred);
+    ExplodedNode* DivUndef = Builder->generateNode(Ex, state, Pred);
     
     if (DivUndef) {
       DivUndef->markAsSink();
@@ -2761,7 +2763,7 @@
   
   // Create the node for the divide-by-zero (if it occurred).  
   if (zeroState)
-    if (NodeTy* DivZeroNode = Builder->generateNode(Ex, zeroState, Pred)) {
+    if (ExplodedNode* DivZeroNode = Builder->generateNode(Ex, zeroState, Pred)) {
       DivZeroNode->markAsSink();
       
       if (state)
@@ -2775,10 +2777,10 @@
 }
 
 void GRExprEngine::VisitBinaryOperator(BinaryOperator* B,
-                                       GRExprEngine::NodeTy* Pred,
-                                       GRExprEngine::NodeSet& Dst) {
+                                       ExplodedNode* Pred,
+                                       ExplodedNodeSet& Dst) {
 
-  NodeSet Tmp1;
+  ExplodedNodeSet Tmp1;
   Expr* LHS = B->getLHS()->IgnoreParens();
   Expr* RHS = B->getRHS()->IgnoreParens();
   
@@ -2793,18 +2795,18 @@
   else
     Visit(LHS, Pred, Tmp1);
 
-  for (NodeSet::iterator I1=Tmp1.begin(), E1=Tmp1.end(); I1 != E1; ++I1) {
+  for (ExplodedNodeSet::iterator I1=Tmp1.begin(), E1=Tmp1.end(); I1 != E1; ++I1) {
 
     SVal LeftV = (*I1)->getState()->getSVal(LHS);
     
     // Process the RHS.
     
-    NodeSet Tmp2;
+    ExplodedNodeSet Tmp2;
     Visit(RHS, *I1, Tmp2);
     
     // With both the LHS and RHS evaluated, process the operation itself.
     
-    for (NodeSet::iterator I2=Tmp2.begin(), E2=Tmp2.end(); I2 != E2; ++I2) {
+    for (ExplodedNodeSet::iterator I2=Tmp2.begin(), E2=Tmp2.end(); I2 != E2; ++I2) {
 
       const GRState* state = GetState(*I2);
       const GRState* OldSt = state;
@@ -2873,7 +2875,7 @@
             // The operands were *not* undefined, but the result is undefined.
             // This is a special node that should be flagged as an error.
             
-            if (NodeTy* UndefNode = Builder->generateNode(B, state, *I2)) {
+            if (ExplodedNode* UndefNode = Builder->generateNode(B, state, *I2)) {
               UndefNode->markAsSink();            
               UndefResults.insert(UndefNode);
             }
@@ -2907,11 +2909,11 @@
           
       // Perform a load (the LHS).  This performs the checks for
       // null dereferences, and so on.
-      NodeSet Tmp3;
+      ExplodedNodeSet Tmp3;
       SVal location = state->getSVal(LHS);
       EvalLoad(Tmp3, LHS, *I2, state, location);
       
-      for (NodeSet::iterator I3=Tmp3.begin(), E3=Tmp3.end(); I3!=E3; ++I3) {
+      for (ExplodedNodeSet::iterator I3=Tmp3.begin(), E3=Tmp3.end(); I3!=E3; ++I3) {
         
         state = GetState(*I3);
         SVal V = state->getSVal(LHS);
@@ -2978,7 +2980,7 @@
           
         if (Result.isUndef()) {
           // The operands were not undefined, but the result is undefined.
-          if (NodeTy* UndefNode = Builder->generateNode(B, state, *I3)) {
+          if (ExplodedNode* UndefNode = Builder->generateNode(B, state, *I3)) {
             UndefNode->markAsSink();            
             UndefResults.insert(UndefNode);
           }
@@ -3061,10 +3063,10 @@
 
 namespace llvm {
 template<>
-struct VISIBILITY_HIDDEN DOTGraphTraits<GRExprEngine::NodeTy*> :
+struct VISIBILITY_HIDDEN DOTGraphTraits<ExplodedNode*> :
   public DefaultDOTGraphTraits {
     
-  static std::string getNodeAttributes(const GRExprEngine::NodeTy* N, void*) {
+  static std::string getNodeAttributes(const ExplodedNode* N, void*) {
     
     if (GraphPrintCheckerState->isImplicitNullDeref(N) ||
         GraphPrintCheckerState->isExplicitNullDeref(N) ||
@@ -3084,8 +3086,7 @@
     return "";
   }
     
-  static std::string getNodeLabel(const GRExprEngine::NodeTy* N, void*,
-                                  bool ShortNames) {
+  static std::string getNodeLabel(const ExplodedNode* N, void*,bool ShortNames){
     
     std::string sbuf;
     llvm::raw_string_ostream Out(sbuf);
@@ -3234,12 +3235,11 @@
 
 #ifndef NDEBUG
 template <typename ITERATOR>
-GRExprEngine::NodeTy* GetGraphNode(ITERATOR I) { return *I; }
+ExplodedNode* GetGraphNode(ITERATOR I) { return *I; }
 
-template <>
-GRExprEngine::NodeTy*
-GetGraphNode<llvm::DenseMap<GRExprEngine::NodeTy*, Expr*>::iterator>
-  (llvm::DenseMap<GRExprEngine::NodeTy*, Expr*>::iterator I) {
+template <> ExplodedNode*
+GetGraphNode<llvm::DenseMap<ExplodedNode*, Expr*>::iterator>
+  (llvm::DenseMap<ExplodedNode*, Expr*>::iterator I) {
   return I->first;
 }
 #endif
@@ -3247,7 +3247,7 @@
 void GRExprEngine::ViewGraph(bool trim) {
 #ifndef NDEBUG  
   if (trim) {
-    std::vector<NodeTy*> Src;
+    std::vector<ExplodedNode*> Src;
 
     // Flush any outstanding reports to make sure we cover all the nodes.
     // This does not cause them to get displayed.
@@ -3259,7 +3259,7 @@
       for (BugType::const_iterator I2=(*I)->begin(), E2=(*I)->end(); I2!=E2; ++I2) {        
         const BugReportEquivClass& EQ = *I2;
         const BugReport &R = **EQ.begin();
-        NodeTy *N = const_cast<NodeTy*>(R.getEndNode());
+        ExplodedNode *N = const_cast<ExplodedNode*>(R.getEndNode());
         if (N) Src.push_back(N);
       }
     }
@@ -3278,12 +3278,12 @@
 #endif
 }
 
-void GRExprEngine::ViewGraph(NodeTy** Beg, NodeTy** End) {
+void GRExprEngine::ViewGraph(ExplodedNode** Beg, ExplodedNode** End) {
 #ifndef NDEBUG
   GraphPrintCheckerState = this;
   GraphPrintSourceManager = &getContext().getSourceManager();
     
-  std::auto_ptr<GRExprEngine::GraphTy> TrimmedG(G.Trim(Beg, End).first);
+  std::auto_ptr<ExplodedGraph> TrimmedG(G.Trim(Beg, End).first);
 
   if (!TrimmedG.get())
     llvm::cerr << "warning: Trimmed ExplodedGraph is empty.\n";