CoreEngine.h revision 9a1e3ab97c48a0381cce449b833c56997048a6d1
1//==- CoreEngine.h - Path-Sensitive Dataflow Engine ----------------*- C++ -*-// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file defines a generic engine for intraprocedural, path-sensitive, 11// dataflow analysis via graph reachability. 12// 13//===----------------------------------------------------------------------===// 14 15#ifndef LLVM_CLANG_GR_COREENGINE 16#define LLVM_CLANG_GR_COREENGINE 17 18#include "clang/AST/Expr.h" 19#include "clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h" 20#include "clang/StaticAnalyzer/Core/PathSensitive/WorkList.h" 21#include "clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h" 22#include "llvm/ADT/OwningPtr.h" 23 24namespace clang { 25 26class ProgramPointTag; 27 28namespace ento { 29 30class NodeBuilder; 31 32//===----------------------------------------------------------------------===// 33/// CoreEngine - Implements the core logic of the graph-reachability 34/// analysis. It traverses the CFG and generates the ExplodedGraph. 35/// Program "states" are treated as opaque void pointers. 36/// The template class CoreEngine (which subclasses CoreEngine) 37/// provides the matching component to the engine that knows the actual types 38/// for states. Note that this engine only dispatches to transfer functions 39/// at the statement and block-level. The analyses themselves must implement 40/// any transfer function logic and the sub-expression level (if any). 41class CoreEngine { 42 friend class CommonNodeBuilder; 43 friend class NodeBuilder; 44 friend class StmtNodeBuilder; 45 friend class GenericNodeBuilderImpl; 46 friend class BranchNodeBuilder; 47 friend class IndirectGotoNodeBuilder; 48 friend class SwitchNodeBuilder; 49 friend class EndOfFunctionNodeBuilder; 50 friend class CallEnterNodeBuilder; 51 friend class CallExitNodeBuilder; 52 53public: 54 typedef std::vector<std::pair<BlockEdge, const ExplodedNode*> > 55 BlocksExhausted; 56 57 typedef std::vector<std::pair<const CFGBlock*, const ExplodedNode*> > 58 BlocksAborted; 59 60private: 61 62 SubEngine& SubEng; 63 64 /// G - The simulation graph. Each node is a (location,state) pair. 65 llvm::OwningPtr<ExplodedGraph> G; 66 67 /// WList - A set of queued nodes that need to be processed by the 68 /// worklist algorithm. It is up to the implementation of WList to decide 69 /// the order that nodes are processed. 70 WorkList* WList; 71 72 /// BCounterFactory - A factory object for created BlockCounter objects. 73 /// These are used to record for key nodes in the ExplodedGraph the 74 /// number of times different CFGBlocks have been visited along a path. 75 BlockCounter::Factory BCounterFactory; 76 77 /// The locations where we stopped doing work because we visited a location 78 /// too many times. 79 BlocksExhausted blocksExhausted; 80 81 /// The locations where we stopped because the engine aborted analysis, 82 /// usually because it could not reason about something. 83 BlocksAborted blocksAborted; 84 85 void generateNode(const ProgramPoint &Loc, 86 const ProgramState *State, 87 ExplodedNode *Pred); 88 89 void HandleBlockEdge(const BlockEdge &E, ExplodedNode *Pred); 90 void HandleBlockEntrance(const BlockEntrance &E, ExplodedNode *Pred); 91 void HandleBlockExit(const CFGBlock *B, ExplodedNode *Pred); 92 void HandlePostStmt(const CFGBlock *B, unsigned StmtIdx, ExplodedNode *Pred); 93 94 void HandleBranch(const Stmt *Cond, const Stmt *Term, const CFGBlock *B, 95 ExplodedNode *Pred); 96 void HandleCallEnter(const CallEnter &L, const CFGBlock *Block, 97 unsigned Index, ExplodedNode *Pred); 98 void HandleCallExit(const CallExit &L, ExplodedNode *Pred); 99 100private: 101 CoreEngine(const CoreEngine&); // Do not implement. 102 CoreEngine& operator=(const CoreEngine&); 103 104public: 105 /// Construct a CoreEngine object to analyze the provided CFG using 106 /// a DFS exploration of the exploded graph. 107 CoreEngine(SubEngine& subengine) 108 : SubEng(subengine), G(new ExplodedGraph()), 109 WList(WorkList::makeBFS()), 110 BCounterFactory(G->getAllocator()) {} 111 112 /// Construct a CoreEngine object to analyze the provided CFG and to 113 /// use the provided worklist object to execute the worklist algorithm. 114 /// The CoreEngine object assumes ownership of 'wlist'. 115 CoreEngine(WorkList* wlist, SubEngine& subengine) 116 : SubEng(subengine), G(new ExplodedGraph()), WList(wlist), 117 BCounterFactory(G->getAllocator()) {} 118 119 ~CoreEngine() { 120 delete WList; 121 } 122 123 /// getGraph - Returns the exploded graph. 124 ExplodedGraph& getGraph() { return *G.get(); } 125 126 /// takeGraph - Returns the exploded graph. Ownership of the graph is 127 /// transferred to the caller. 128 ExplodedGraph* takeGraph() { return G.take(); } 129 130 /// ExecuteWorkList - Run the worklist algorithm for a maximum number of 131 /// steps. Returns true if there is still simulation state on the worklist. 132 bool ExecuteWorkList(const LocationContext *L, unsigned Steps, 133 const ProgramState *InitState); 134 void ExecuteWorkListWithInitialState(const LocationContext *L, 135 unsigned Steps, 136 const ProgramState *InitState, 137 ExplodedNodeSet &Dst); 138 139 // Functions for external checking of whether we have unfinished work 140 bool wasBlockAborted() const { return !blocksAborted.empty(); } 141 bool wasBlocksExhausted() const { return !blocksExhausted.empty(); } 142 bool hasWorkRemaining() const { return wasBlocksExhausted() || 143 WList->hasWork() || 144 wasBlockAborted(); } 145 146 /// Inform the CoreEngine that a basic block was aborted because 147 /// it could not be completely analyzed. 148 void addAbortedBlock(const ExplodedNode *node, const CFGBlock *block) { 149 blocksAborted.push_back(std::make_pair(block, node)); 150 } 151 152 WorkList *getWorkList() const { return WList; } 153 154 BlocksExhausted::const_iterator blocks_exhausted_begin() const { 155 return blocksExhausted.begin(); 156 } 157 BlocksExhausted::const_iterator blocks_exhausted_end() const { 158 return blocksExhausted.end(); 159 } 160 BlocksAborted::const_iterator blocks_aborted_begin() const { 161 return blocksAborted.begin(); 162 } 163 BlocksAborted::const_iterator blocks_aborted_end() const { 164 return blocksAborted.end(); 165 } 166 167 /// Enqueue the results of the node builder onto the work list. 168 void enqueue(NodeBuilder &NB); 169}; 170 171struct NodeBuilderContext { 172 CoreEngine &Eng; 173 const CFGBlock *Block; 174 NodeBuilderContext(CoreEngine &E, const CFGBlock *B) 175 : Eng(E), Block(B) { assert(B); } 176}; 177 178/// This is the simplest builder which generates nodes in the ExplodedGraph. 179class NodeBuilder { 180protected: 181 friend class StmtNodeBuilder; 182 183 ExplodedNode *BuilderPred; 184 const NodeBuilderContext &C; 185 bool Finalized; 186 187 /// \brief The frontier set - a set of nodes which need to be propagated after 188 /// the builder dies. 189 typedef llvm::SmallPtrSet<ExplodedNode*,5> DeferredTy; 190 DeferredTy Deferred; 191 192 BlockCounter getBlockCounter() const { return C.Eng.WList->getBlockCounter();} 193 194 bool checkResults() { 195 if (!Finalized) 196 return false; 197 for (DeferredTy::iterator I=Deferred.begin(), E=Deferred.end(); I!=E; ++I) 198 if ((*I)->isSink()) 199 return false; 200 return true; 201 } 202 203 virtual void finalizeResults() { 204 if (!Finalized) { 205 Finalized = true; 206 } 207 } 208 209 ExplodedNode *generateNodeImpl(const ProgramPoint &PP, 210 const ProgramState *State, 211 ExplodedNode *Pred, 212 bool MarkAsSink = false); 213 214public: 215 NodeBuilder(ExplodedNode *N, NodeBuilderContext &Ctx) 216 : BuilderPred(N), C(Ctx), Finalized(false) { 217 assert(!N->isSink()); 218 Deferred.insert(N); 219 } 220 221 /// Create a new builder using the parent builder's context. 222 NodeBuilder(ExplodedNode *N, const NodeBuilder &ParentBldr) 223 : BuilderPred(N), C(ParentBldr.C), Finalized(false) { 224 assert(!N->isSink()); 225 Deferred.insert(N); 226 } 227 228 virtual ~NodeBuilder() {} 229 230 /// \brief Generates a node in the ExplodedGraph. 231 /// 232 /// When a node is marked as sink, the exploration from the node is stopped - 233 /// the node becomes the last node on the path. 234 ExplodedNode *generateNode(const ProgramPoint &PP, 235 const ProgramState *State, 236 ExplodedNode *Pred, 237 bool MarkAsSink = false) { 238 return generateNodeImpl(PP, State, Pred, MarkAsSink); 239 } 240 241 bool hasGeneratedNodes() const { 242 return (!Deferred.count(BuilderPred)); 243 } 244 245 typedef DeferredTy::iterator iterator; 246 /// \brief Iterators through the results frontier. 247 inline iterator results_begin() { 248 finalizeResults(); 249 assert(checkResults()); 250 return Deferred.begin(); 251 } 252 inline iterator results_end() { 253 finalizeResults(); 254 return Deferred.end(); 255 } 256 257 /// \brief Returns the number of times the current basic block has been 258 /// visited on the exploded graph path. 259 unsigned getCurrentBlockCount() const { 260 return getBlockCounter().getNumVisited( 261 BuilderPred->getLocationContext()->getCurrentStackFrame(), 262 C.Block->getBlockID()); 263 } 264 265 // \brief Get the builder's predecessor - the parent to all the other nodes. 266 ExplodedNode *getPredecessor() const { return BuilderPred; } 267 268 // \brief Returns state of the predecessor. 269 const ProgramState *getState() const { return BuilderPred->getState(); } 270}; 271 272class CommonNodeBuilder { 273protected: 274 ExplodedNode *Pred; 275public: 276 // TODO: make protected. 277 CoreEngine& Eng; 278 279 CommonNodeBuilder(CoreEngine* E, ExplodedNode *P) : Pred(P), Eng(*E) {} 280 BlockCounter getBlockCounter() const { return Eng.WList->getBlockCounter(); } 281}; 282 283 284class StmtNodeBuilder: public CommonNodeBuilder { 285 const CFGBlock &B; 286 const unsigned Idx; 287 288public: 289 bool PurgingDeadSymbols; 290 bool BuildSinks; 291 bool hasGeneratedNode; 292 ProgramPoint::Kind PointKind; 293 const ProgramPointTag *Tag; 294 295 typedef llvm::SmallPtrSet<ExplodedNode*,5> DeferredTy; 296 DeferredTy Deferred; 297 298 void GenerateAutoTransition(ExplodedNode *N); 299 300public: 301 StmtNodeBuilder(const CFGBlock *b, 302 unsigned idx, 303 ExplodedNode *N, 304 CoreEngine* e); 305 306 ~StmtNodeBuilder(); 307 308 ExplodedNode *getPredecessor() const { return Pred; } 309 310 unsigned getCurrentBlockCount() const { 311 return getBlockCounter().getNumVisited( 312 Pred->getLocationContext()->getCurrentStackFrame(), 313 B.getBlockID()); 314 } 315 316 ExplodedNode *generateNode(const Stmt *S, 317 const ProgramState *St, 318 ExplodedNode *Pred, 319 ProgramPoint::Kind K, 320 const ProgramPointTag *tag = 0) { 321 hasGeneratedNode = true; 322 323 if (PurgingDeadSymbols) 324 K = ProgramPoint::PostPurgeDeadSymbolsKind; 325 326 return generateNodeInternal(S, St, Pred, K, tag ? tag : Tag); 327 } 328 329 ExplodedNode *generateNode(const Stmt *S, 330 const ProgramState *St, 331 ExplodedNode *Pred, 332 const ProgramPointTag *tag = 0) { 333 return generateNode(S, St, Pred, PointKind, tag); 334 } 335 336 ExplodedNode *generateNode(const ProgramPoint &PP, 337 const ProgramState *State, 338 ExplodedNode *Pred) { 339 hasGeneratedNode = true; 340 return generateNodeInternal(PP, State, Pred); 341 } 342 343 ExplodedNode* 344 generateNodeInternal(const ProgramPoint &PP, 345 const ProgramState *State, 346 ExplodedNode *Pred); 347 348 ExplodedNode* 349 generateNodeInternal(const Stmt *S, 350 const ProgramState *State, 351 ExplodedNode *Pred, 352 ProgramPoint::Kind K, 353 const ProgramPointTag *tag = 0); 354 355 /// getStmt - Return the current block-level expression associated with 356 /// this builder. 357 const Stmt *getStmt() const { 358 const CFGStmt *CS = B[Idx].getAs<CFGStmt>(); 359 return CS ? CS->getStmt() : 0; 360 } 361 362 /// getBlock - Return the CFGBlock associated with the block-level expression 363 /// of this builder. 364 const CFGBlock *getBlock() const { return &B; } 365 366 unsigned getIndex() const { return Idx; } 367 368 ExplodedNode *MakeNode(ExplodedNodeSet &Dst, 369 const Stmt *S, 370 ExplodedNode *Pred, 371 const ProgramState *St) { 372 return MakeNode(Dst, S, Pred, St, PointKind); 373 } 374 375 ExplodedNode *MakeNode(ExplodedNodeSet &Dst, 376 const Stmt *S, 377 ExplodedNode *Pred, 378 const ProgramState *St, 379 ProgramPoint::Kind K); 380 381 ExplodedNode *MakeSinkNode(ExplodedNodeSet &Dst, 382 const Stmt *S, 383 ExplodedNode *Pred, 384 const ProgramState *St) { 385 bool Tmp = BuildSinks; 386 BuildSinks = true; 387 ExplodedNode *N = MakeNode(Dst, S, Pred, St); 388 BuildSinks = Tmp; 389 return N; 390 } 391 392 void importNodesFromBuilder(const NodeBuilder &NB) { 393 ExplodedNode *NBPred = const_cast<ExplodedNode*>(NB.getPredecessor()); 394 if (NB.hasGeneratedNodes()) { 395 Deferred.erase(NBPred); 396 Deferred.insert(NB.Deferred.begin(), NB.Deferred.end()); 397 hasGeneratedNode = true; 398 } 399 } 400}; 401 402class BranchNodeBuilder: public NodeBuilder { 403 const CFGBlock *DstT; 404 const CFGBlock *DstF; 405 406 bool GeneratedTrue; 407 bool GeneratedFalse; 408 bool InFeasibleTrue; 409 bool InFeasibleFalse; 410 411 void finalizeResults() { 412 if (Finalized) 413 return; 414 if (!GeneratedTrue) generateNode(BuilderPred->State, true); 415 if (!GeneratedFalse) generateNode(BuilderPred->State, false); 416 Finalized = true; 417 } 418 419public: 420 BranchNodeBuilder(ExplodedNode *Pred, NodeBuilderContext &C, 421 const CFGBlock *dstT, const CFGBlock *dstF) 422 : NodeBuilder(Pred, C), DstT(dstT), DstF(dstF), 423 GeneratedTrue(false), GeneratedFalse(false), 424 InFeasibleTrue(!DstT), InFeasibleFalse(!DstF) { 425 } 426 427 /// Create a new builder using the parent builder's context. 428 BranchNodeBuilder(ExplodedNode *Pred, BranchNodeBuilder &ParentBldr) 429 : NodeBuilder(Pred, ParentBldr), DstT(ParentBldr.DstT), DstF(ParentBldr.DstF), 430 GeneratedTrue(false), GeneratedFalse(false), 431 InFeasibleTrue(!DstT), InFeasibleFalse(!DstF) { 432 } 433 434 ExplodedNode *generateNode(const ProgramState *State, bool branch, 435 ExplodedNode *Pred = 0); 436 437 const CFGBlock *getTargetBlock(bool branch) const { 438 return branch ? DstT : DstF; 439 } 440 441 void markInfeasible(bool branch) { 442 if (branch) 443 InFeasibleTrue = GeneratedTrue = true; 444 else 445 InFeasibleFalse = GeneratedFalse = true; 446 } 447 448 bool isFeasible(bool branch) { 449 return branch ? !InFeasibleTrue : !InFeasibleFalse; 450 } 451}; 452 453class IndirectGotoNodeBuilder { 454 CoreEngine& Eng; 455 const CFGBlock *Src; 456 const CFGBlock &DispatchBlock; 457 const Expr *E; 458 ExplodedNode *Pred; 459 460public: 461 IndirectGotoNodeBuilder(ExplodedNode *pred, const CFGBlock *src, 462 const Expr *e, const CFGBlock *dispatch, CoreEngine* eng) 463 : Eng(*eng), Src(src), DispatchBlock(*dispatch), E(e), Pred(pred) {} 464 465 class iterator { 466 CFGBlock::const_succ_iterator I; 467 468 friend class IndirectGotoNodeBuilder; 469 iterator(CFGBlock::const_succ_iterator i) : I(i) {} 470 public: 471 472 iterator &operator++() { ++I; return *this; } 473 bool operator!=(const iterator &X) const { return I != X.I; } 474 475 const LabelDecl *getLabel() const { 476 return llvm::cast<LabelStmt>((*I)->getLabel())->getDecl(); 477 } 478 479 const CFGBlock *getBlock() const { 480 return *I; 481 } 482 }; 483 484 iterator begin() { return iterator(DispatchBlock.succ_begin()); } 485 iterator end() { return iterator(DispatchBlock.succ_end()); } 486 487 ExplodedNode *generateNode(const iterator &I, 488 const ProgramState *State, 489 bool isSink = false); 490 491 const Expr *getTarget() const { return E; } 492 493 const ProgramState *getState() const { return Pred->State; } 494}; 495 496class SwitchNodeBuilder { 497 CoreEngine& Eng; 498 const CFGBlock *Src; 499 const Expr *Condition; 500 ExplodedNode *Pred; 501 502public: 503 SwitchNodeBuilder(ExplodedNode *pred, const CFGBlock *src, 504 const Expr *condition, CoreEngine* eng) 505 : Eng(*eng), Src(src), Condition(condition), Pred(pred) {} 506 507 class iterator { 508 CFGBlock::const_succ_reverse_iterator I; 509 510 friend class SwitchNodeBuilder; 511 iterator(CFGBlock::const_succ_reverse_iterator i) : I(i) {} 512 513 public: 514 iterator &operator++() { ++I; return *this; } 515 bool operator!=(const iterator &X) const { return I != X.I; } 516 bool operator==(const iterator &X) const { return I == X.I; } 517 518 const CaseStmt *getCase() const { 519 return llvm::cast<CaseStmt>((*I)->getLabel()); 520 } 521 522 const CFGBlock *getBlock() const { 523 return *I; 524 } 525 }; 526 527 iterator begin() { return iterator(Src->succ_rbegin()+1); } 528 iterator end() { return iterator(Src->succ_rend()); } 529 530 const SwitchStmt *getSwitch() const { 531 return llvm::cast<SwitchStmt>(Src->getTerminator()); 532 } 533 534 ExplodedNode *generateCaseStmtNode(const iterator &I, 535 const ProgramState *State); 536 537 ExplodedNode *generateDefaultCaseNode(const ProgramState *State, 538 bool isSink = false); 539 540 const Expr *getCondition() const { return Condition; } 541 542 const ProgramState *getState() const { return Pred->State; } 543}; 544 545class GenericNodeBuilderImpl { 546protected: 547 CoreEngine &engine; 548 ExplodedNode *pred; 549 ProgramPoint pp; 550 SmallVector<ExplodedNode*, 2> sinksGenerated; 551 552 ExplodedNode *generateNodeImpl(const ProgramState *state, 553 ExplodedNode *pred, 554 ProgramPoint programPoint, 555 bool asSink); 556 557 GenericNodeBuilderImpl(CoreEngine &eng, ExplodedNode *pr, ProgramPoint p) 558 : engine(eng), pred(pr), pp(p), hasGeneratedNode(false) {} 559 560public: 561 bool hasGeneratedNode; 562 563 WorkList &getWorkList() { return *engine.WList; } 564 565 ExplodedNode *getPredecessor() const { return pred; } 566 567 BlockCounter getBlockCounter() const { 568 return engine.WList->getBlockCounter(); 569 } 570 571 const SmallVectorImpl<ExplodedNode*> &sinks() const { 572 return sinksGenerated; 573 } 574}; 575 576template <typename PP_T> 577class GenericNodeBuilder : public GenericNodeBuilderImpl { 578public: 579 GenericNodeBuilder(CoreEngine &eng, ExplodedNode *pr, const PP_T &p) 580 : GenericNodeBuilderImpl(eng, pr, p) {} 581 582 ExplodedNode *generateNode(const ProgramState *state, ExplodedNode *pred, 583 const ProgramPointTag *tag, bool asSink) { 584 return generateNodeImpl(state, pred, cast<PP_T>(pp).withTag(tag), 585 asSink); 586 } 587 588 const PP_T &getProgramPoint() const { return cast<PP_T>(pp); } 589}; 590 591class EndOfFunctionNodeBuilder : public CommonNodeBuilder { 592 const CFGBlock &B; 593 const ProgramPointTag *Tag; 594 595public: 596 bool hasGeneratedNode; 597 598public: 599 EndOfFunctionNodeBuilder(const CFGBlock *b, ExplodedNode *N, CoreEngine* e, 600 const ProgramPointTag *tag = 0) 601 : CommonNodeBuilder(e, N), B(*b), Tag(tag), hasGeneratedNode(false) {} 602 603 ~EndOfFunctionNodeBuilder(); 604 605 EndOfFunctionNodeBuilder withCheckerTag(const ProgramPointTag *tag) { 606 return EndOfFunctionNodeBuilder(&B, Pred, &Eng, tag); 607 } 608 609 WorkList &getWorkList() { return *Eng.WList; } 610 611 ExplodedNode *getPredecessor() const { return Pred; } 612 613 unsigned getCurrentBlockCount() const { 614 return getBlockCounter().getNumVisited( 615 Pred->getLocationContext()->getCurrentStackFrame(), 616 B.getBlockID()); 617 } 618 619 ExplodedNode *generateNode(const ProgramState *State, 620 ExplodedNode *P = 0, 621 const ProgramPointTag *tag = 0); 622 623 void GenerateCallExitNode(const ProgramState *state); 624 625 const CFGBlock *getBlock() const { return &B; } 626 627 const ProgramState *getState() const { 628 return getPredecessor()->getState(); 629 } 630}; 631 632class CallEnterNodeBuilder { 633 CoreEngine &Eng; 634 635 const ExplodedNode *Pred; 636 637 // The call site. For implicit automatic object dtor, this is the trigger 638 // statement. 639 const Stmt *CE; 640 641 // The context of the callee. 642 const StackFrameContext *CalleeCtx; 643 644 // The parent block of the CallExpr. 645 const CFGBlock *Block; 646 647 // The CFGBlock index of the CallExpr. 648 unsigned Index; 649 650public: 651 CallEnterNodeBuilder(CoreEngine &eng, const ExplodedNode *pred, 652 const Stmt *s, const StackFrameContext *callee, 653 const CFGBlock *blk, unsigned idx) 654 : Eng(eng), Pred(pred), CE(s), CalleeCtx(callee), Block(blk), Index(idx) {} 655 656 const ProgramState *getState() const { return Pred->getState(); } 657 658 const LocationContext *getLocationContext() const { 659 return Pred->getLocationContext(); 660 } 661 662 const Stmt *getCallExpr() const { return CE; } 663 664 const StackFrameContext *getCalleeContext() const { return CalleeCtx; } 665 666 const CFGBlock *getBlock() const { return Block; } 667 668 unsigned getIndex() const { return Index; } 669 670 void generateNode(const ProgramState *state); 671}; 672 673class CallExitNodeBuilder { 674 CoreEngine &Eng; 675 const ExplodedNode *Pred; 676 677public: 678 CallExitNodeBuilder(CoreEngine &eng, const ExplodedNode *pred) 679 : Eng(eng), Pred(pred) {} 680 681 const ExplodedNode *getPredecessor() const { return Pred; } 682 683 const ProgramState *getState() const { return Pred->getState(); } 684 685 void generateNode(const ProgramState *state); 686}; 687 688} // end GR namespace 689 690} // end clang namespace 691 692#endif 693