CoreEngine.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. //==- CoreEngine.cpp - 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 engine.
  12. //
  13. //===----------------------------------------------------------------------===//
  14. #include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
  15. #include "clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h"
  16. #include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
  17. #include "clang/Index/TranslationUnit.h"
  18. #include "clang/AST/Expr.h"
  19. #include "clang/AST/StmtCXX.h"
  20. #include "llvm/Support/Casting.h"
  21. #include "llvm/ADT/DenseMap.h"
  22. using namespace clang;
  23. using namespace ento;
  24. //===----------------------------------------------------------------------===//
  25. // Worklist classes for exploration of reachable states.
  26. //===----------------------------------------------------------------------===//
  27. WorkList::Visitor::~Visitor() {}
  28. namespace {
  29. class DFS : public WorkList {
  30. SmallVector<WorkListUnit,20> Stack;
  31. public:
  32. virtual bool hasWork() const {
  33. return !Stack.empty();
  34. }
  35. virtual void enqueue(const WorkListUnit& U) {
  36. Stack.push_back(U);
  37. }
  38. virtual WorkListUnit dequeue() {
  39. assert (!Stack.empty());
  40. const WorkListUnit& U = Stack.back();
  41. Stack.pop_back(); // This technically "invalidates" U, but we are fine.
  42. return U;
  43. }
  44. virtual bool visitItemsInWorkList(Visitor &V) {
  45. for (SmallVectorImpl<WorkListUnit>::iterator
  46. I = Stack.begin(), E = Stack.end(); I != E; ++I) {
  47. if (V.visit(*I))
  48. return true;
  49. }
  50. return false;
  51. }
  52. };
  53. class BFS : public WorkList {
  54. std::deque<WorkListUnit> Queue;
  55. public:
  56. virtual bool hasWork() const {
  57. return !Queue.empty();
  58. }
  59. virtual void enqueue(const WorkListUnit& U) {
  60. Queue.push_front(U);
  61. }
  62. virtual WorkListUnit dequeue() {
  63. WorkListUnit U = Queue.front();
  64. Queue.pop_front();
  65. return U;
  66. }
  67. virtual bool visitItemsInWorkList(Visitor &V) {
  68. for (std::deque<WorkListUnit>::iterator
  69. I = Queue.begin(), E = Queue.end(); I != E; ++I) {
  70. if (V.visit(*I))
  71. return true;
  72. }
  73. return false;
  74. }
  75. };
  76. } // end anonymous namespace
  77. // Place the dstor for WorkList here because it contains virtual member
  78. // functions, and we the code for the dstor generated in one compilation unit.
  79. WorkList::~WorkList() {}
  80. WorkList *WorkList::makeDFS() { return new DFS(); }
  81. WorkList *WorkList::makeBFS() { return new BFS(); }
  82. namespace {
  83. class BFSBlockDFSContents : public WorkList {
  84. std::deque<WorkListUnit> Queue;
  85. SmallVector<WorkListUnit,20> Stack;
  86. public:
  87. virtual bool hasWork() const {
  88. return !Queue.empty() || !Stack.empty();
  89. }
  90. virtual void enqueue(const WorkListUnit& U) {
  91. if (isa<BlockEntrance>(U.getNode()->getLocation()))
  92. Queue.push_front(U);
  93. else
  94. Stack.push_back(U);
  95. }
  96. virtual WorkListUnit dequeue() {
  97. // Process all basic blocks to completion.
  98. if (!Stack.empty()) {
  99. const WorkListUnit& U = Stack.back();
  100. Stack.pop_back(); // This technically "invalidates" U, but we are fine.
  101. return U;
  102. }
  103. assert(!Queue.empty());
  104. // Don't use const reference. The subsequent pop_back() might make it
  105. // unsafe.
  106. WorkListUnit U = Queue.front();
  107. Queue.pop_front();
  108. return U;
  109. }
  110. virtual bool visitItemsInWorkList(Visitor &V) {
  111. for (SmallVectorImpl<WorkListUnit>::iterator
  112. I = Stack.begin(), E = Stack.end(); I != E; ++I) {
  113. if (V.visit(*I))
  114. return true;
  115. }
  116. for (std::deque<WorkListUnit>::iterator
  117. I = Queue.begin(), E = Queue.end(); I != E; ++I) {
  118. if (V.visit(*I))
  119. return true;
  120. }
  121. return false;
  122. }
  123. };
  124. } // end anonymous namespace
  125. WorkList* WorkList::makeBFSBlockDFSContents() {
  126. return new BFSBlockDFSContents();
  127. }
  128. //===----------------------------------------------------------------------===//
  129. // Core analysis engine.
  130. //===----------------------------------------------------------------------===//
  131. /// ExecuteWorkList - Run the worklist algorithm for a maximum number of steps.
  132. bool CoreEngine::ExecuteWorkList(const LocationContext *L, unsigned Steps,
  133. ProgramStateRef InitState) {
  134. if (G->num_roots() == 0) { // Initialize the analysis by constructing
  135. // the root if none exists.
  136. const CFGBlock *Entry = &(L->getCFG()->getEntry());
  137. assert (Entry->empty() &&
  138. "Entry block must be empty.");
  139. assert (Entry->succ_size() == 1 &&
  140. "Entry block must have 1 successor.");
  141. // Get the solitary successor.
  142. const CFGBlock *Succ = *(Entry->succ_begin());
  143. // Construct an edge representing the
  144. // starting location in the function.
  145. BlockEdge StartLoc(Entry, Succ, L);
  146. // Set the current block counter to being empty.
  147. WList->setBlockCounter(BCounterFactory.GetEmptyCounter());
  148. if (!InitState)
  149. // Generate the root.
  150. generateNode(StartLoc, SubEng.getInitialState(L), 0);
  151. else
  152. generateNode(StartLoc, InitState, 0);
  153. }
  154. // Check if we have a steps limit
  155. bool UnlimitedSteps = Steps == 0;
  156. while (WList->hasWork()) {
  157. if (!UnlimitedSteps) {
  158. if (Steps == 0)
  159. break;
  160. --Steps;
  161. }
  162. const WorkListUnit& WU = WList->dequeue();
  163. // Set the current block counter.
  164. WList->setBlockCounter(WU.getBlockCounter());
  165. // Retrieve the node.
  166. ExplodedNode *Node = WU.getNode();
  167. // Dispatch on the location type.
  168. switch (Node->getLocation().getKind()) {
  169. case ProgramPoint::BlockEdgeKind:
  170. HandleBlockEdge(cast<BlockEdge>(Node->getLocation()), Node);
  171. break;
  172. case ProgramPoint::BlockEntranceKind:
  173. HandleBlockEntrance(cast<BlockEntrance>(Node->getLocation()), Node);
  174. break;
  175. case ProgramPoint::BlockExitKind:
  176. assert (false && "BlockExit location never occur in forward analysis.");
  177. break;
  178. case ProgramPoint::CallEnterKind: {
  179. CallEnter CEnter = cast<CallEnter>(Node->getLocation());
  180. if (AnalyzedCallees)
  181. if (const CallExpr* CE =
  182. dyn_cast_or_null<CallExpr>(CEnter.getCallExpr()))
  183. if (const Decl *CD = CE->getCalleeDecl())
  184. AnalyzedCallees->insert(CD);
  185. SubEng.processCallEnter(CEnter, Node);
  186. break;
  187. }
  188. case ProgramPoint::CallExitKind:
  189. SubEng.processCallExit(Node);
  190. break;
  191. default:
  192. assert(isa<PostStmt>(Node->getLocation()) ||
  193. isa<PostInitializer>(Node->getLocation()));
  194. HandlePostStmt(WU.getBlock(), WU.getIndex(), Node);
  195. break;
  196. }
  197. }
  198. SubEng.processEndWorklist(hasWorkRemaining());
  199. return WList->hasWork();
  200. }
  201. void CoreEngine::ExecuteWorkListWithInitialState(const LocationContext *L,
  202. unsigned Steps,
  203. ProgramStateRef InitState,
  204. ExplodedNodeSet &Dst) {
  205. ExecuteWorkList(L, Steps, InitState);
  206. for (ExplodedGraph::eop_iterator I = G->eop_begin(),
  207. E = G->eop_end(); I != E; ++I) {
  208. Dst.Add(*I);
  209. }
  210. }
  211. void CoreEngine::HandleBlockEdge(const BlockEdge &L, ExplodedNode *Pred) {
  212. const CFGBlock *Blk = L.getDst();
  213. NodeBuilderContext BuilderCtx(*this, Blk, Pred);
  214. // Check if we are entering the EXIT block.
  215. if (Blk == &(L.getLocationContext()->getCFG()->getExit())) {
  216. assert (L.getLocationContext()->getCFG()->getExit().size() == 0
  217. && "EXIT block cannot contain Stmts.");
  218. // Process the final state transition.
  219. SubEng.processEndOfFunction(BuilderCtx);
  220. // This path is done. Don't enqueue any more nodes.
  221. return;
  222. }
  223. // Call into the SubEngine to process entering the CFGBlock.
  224. ExplodedNodeSet dstNodes;
  225. BlockEntrance BE(Blk, Pred->getLocationContext());
  226. NodeBuilderWithSinks nodeBuilder(Pred, dstNodes, BuilderCtx, BE);
  227. SubEng.processCFGBlockEntrance(nodeBuilder);
  228. // Auto-generate a node.
  229. if (!nodeBuilder.hasGeneratedNodes()) {
  230. nodeBuilder.generateNode(Pred->State, Pred);
  231. }
  232. // Enqueue nodes onto the worklist.
  233. enqueue(dstNodes);
  234. // Make sink nodes as exhausted.
  235. const SmallVectorImpl<ExplodedNode*> &Sinks = nodeBuilder.getSinks();
  236. for (SmallVectorImpl<ExplodedNode*>::const_iterator
  237. I =Sinks.begin(), E = Sinks.end(); I != E; ++I) {
  238. blocksExhausted.push_back(std::make_pair(L, *I));
  239. }
  240. }
  241. void CoreEngine::HandleBlockEntrance(const BlockEntrance &L,
  242. ExplodedNode *Pred) {
  243. // Increment the block counter.
  244. BlockCounter Counter = WList->getBlockCounter();
  245. Counter = BCounterFactory.IncrementCount(Counter,
  246. Pred->getLocationContext()->getCurrentStackFrame(),
  247. L.getBlock()->getBlockID());
  248. WList->setBlockCounter(Counter);
  249. // Process the entrance of the block.
  250. if (CFGElement E = L.getFirstElement()) {
  251. NodeBuilderContext Ctx(*this, L.getBlock(), Pred);
  252. SubEng.processCFGElement(E, Pred, 0, &Ctx);
  253. }
  254. else
  255. HandleBlockExit(L.getBlock(), Pred);
  256. }
  257. void CoreEngine::HandleBlockExit(const CFGBlock * B, ExplodedNode *Pred) {
  258. if (const Stmt *Term = B->getTerminator()) {
  259. switch (Term->getStmtClass()) {
  260. default:
  261. llvm_unreachable("Analysis for this terminator not implemented.");
  262. case Stmt::BinaryOperatorClass: // '&&' and '||'
  263. HandleBranch(cast<BinaryOperator>(Term)->getLHS(), Term, B, Pred);
  264. return;
  265. case Stmt::BinaryConditionalOperatorClass:
  266. case Stmt::ConditionalOperatorClass:
  267. HandleBranch(cast<AbstractConditionalOperator>(Term)->getCond(),
  268. Term, B, Pred);
  269. return;
  270. // FIXME: Use constant-folding in CFG construction to simplify this
  271. // case.
  272. case Stmt::ChooseExprClass:
  273. HandleBranch(cast<ChooseExpr>(Term)->getCond(), Term, B, Pred);
  274. return;
  275. case Stmt::DoStmtClass:
  276. HandleBranch(cast<DoStmt>(Term)->getCond(), Term, B, Pred);
  277. return;
  278. case Stmt::CXXForRangeStmtClass:
  279. HandleBranch(cast<CXXForRangeStmt>(Term)->getCond(), Term, B, Pred);
  280. return;
  281. case Stmt::ForStmtClass:
  282. HandleBranch(cast<ForStmt>(Term)->getCond(), Term, B, Pred);
  283. return;
  284. case Stmt::ContinueStmtClass:
  285. case Stmt::BreakStmtClass:
  286. case Stmt::GotoStmtClass:
  287. break;
  288. case Stmt::IfStmtClass:
  289. HandleBranch(cast<IfStmt>(Term)->getCond(), Term, B, Pred);
  290. return;
  291. case Stmt::IndirectGotoStmtClass: {
  292. // Only 1 successor: the indirect goto dispatch block.
  293. assert (B->succ_size() == 1);
  294. IndirectGotoNodeBuilder
  295. builder(Pred, B, cast<IndirectGotoStmt>(Term)->getTarget(),
  296. *(B->succ_begin()), this);
  297. SubEng.processIndirectGoto(builder);
  298. return;
  299. }
  300. case Stmt::ObjCForCollectionStmtClass: {
  301. // In the case of ObjCForCollectionStmt, it appears twice in a CFG:
  302. //
  303. // (1) inside a basic block, which represents the binding of the
  304. // 'element' variable to a value.
  305. // (2) in a terminator, which represents the branch.
  306. //
  307. // For (1), subengines will bind a value (i.e., 0 or 1) indicating
  308. // whether or not collection contains any more elements. We cannot
  309. // just test to see if the element is nil because a container can
  310. // contain nil elements.
  311. HandleBranch(Term, Term, B, Pred);
  312. return;
  313. }
  314. case Stmt::SwitchStmtClass: {
  315. SwitchNodeBuilder builder(Pred, B, cast<SwitchStmt>(Term)->getCond(),
  316. this);
  317. SubEng.processSwitch(builder);
  318. return;
  319. }
  320. case Stmt::WhileStmtClass:
  321. HandleBranch(cast<WhileStmt>(Term)->getCond(), Term, B, Pred);
  322. return;
  323. }
  324. }
  325. assert (B->succ_size() == 1 &&
  326. "Blocks with no terminator should have at most 1 successor.");
  327. generateNode(BlockEdge(B, *(B->succ_begin()), Pred->getLocationContext()),
  328. Pred->State, Pred);
  329. }
  330. void CoreEngine::HandleBranch(const Stmt *Cond, const Stmt *Term,
  331. const CFGBlock * B, ExplodedNode *Pred) {
  332. assert(B->succ_size() == 2);
  333. NodeBuilderContext Ctx(*this, B, Pred);
  334. ExplodedNodeSet Dst;
  335. SubEng.processBranch(Cond, Term, Ctx, Pred, Dst,
  336. *(B->succ_begin()), *(B->succ_begin()+1));
  337. // Enqueue the new frontier onto the worklist.
  338. enqueue(Dst);
  339. }
  340. void CoreEngine::HandlePostStmt(const CFGBlock *B, unsigned StmtIdx,
  341. ExplodedNode *Pred) {
  342. assert(B);
  343. assert(!B->empty());
  344. if (StmtIdx == B->size())
  345. HandleBlockExit(B, Pred);
  346. else {
  347. NodeBuilderContext Ctx(*this, B, Pred);
  348. SubEng.processCFGElement((*B)[StmtIdx], Pred, StmtIdx, &Ctx);
  349. }
  350. }
  351. /// generateNode - Utility method to generate nodes, hook up successors,
  352. /// and add nodes to the worklist.
  353. void CoreEngine::generateNode(const ProgramPoint &Loc,
  354. ProgramStateRef State,
  355. ExplodedNode *Pred) {
  356. bool IsNew;
  357. ExplodedNode *Node = G->getNode(Loc, State, false, &IsNew);
  358. if (Pred)
  359. Node->addPredecessor(Pred, *G); // Link 'Node' with its predecessor.
  360. else {
  361. assert (IsNew);
  362. G->addRoot(Node); // 'Node' has no predecessor. Make it a root.
  363. }
  364. // Only add 'Node' to the worklist if it was freshly generated.
  365. if (IsNew) WList->enqueue(Node);
  366. }
  367. void CoreEngine::enqueueStmtNode(ExplodedNode *N,
  368. const CFGBlock *Block, unsigned Idx) {
  369. assert(Block);
  370. assert (!N->isSink());
  371. // Check if this node entered a callee.
  372. if (isa<CallEnter>(N->getLocation())) {
  373. // Still use the index of the CallExpr. It's needed to create the callee
  374. // StackFrameContext.
  375. WList->enqueue(N, Block, Idx);
  376. return;
  377. }
  378. // Do not create extra nodes. Move to the next CFG element.
  379. if (isa<PostInitializer>(N->getLocation())) {
  380. WList->enqueue(N, Block, Idx+1);
  381. return;
  382. }
  383. const CFGStmt *CS = (*Block)[Idx].getAs<CFGStmt>();
  384. const Stmt *St = CS ? CS->getStmt() : 0;
  385. PostStmt Loc(St, N->getLocationContext());
  386. if (Loc == N->getLocation()) {
  387. // Note: 'N' should be a fresh node because otherwise it shouldn't be
  388. // a member of Deferred.
  389. WList->enqueue(N, Block, Idx+1);
  390. return;
  391. }
  392. bool IsNew;
  393. ExplodedNode *Succ = G->getNode(Loc, N->getState(), false, &IsNew);
  394. Succ->addPredecessor(N, *G);
  395. if (IsNew)
  396. WList->enqueue(Succ, Block, Idx+1);
  397. }
  398. ExplodedNode *CoreEngine::generateCallExitNode(ExplodedNode *N) {
  399. // Create a CallExit node and enqueue it.
  400. const StackFrameContext *LocCtx
  401. = cast<StackFrameContext>(N->getLocationContext());
  402. const Stmt *CE = LocCtx->getCallSite();
  403. // Use the the callee location context.
  404. CallExit Loc(CE, LocCtx);
  405. bool isNew;
  406. ExplodedNode *Node = G->getNode(Loc, N->getState(), false, &isNew);
  407. Node->addPredecessor(N, *G);
  408. return isNew ? Node : 0;
  409. }
  410. void CoreEngine::enqueue(ExplodedNodeSet &Set) {
  411. for (ExplodedNodeSet::iterator I = Set.begin(),
  412. E = Set.end(); I != E; ++I) {
  413. WList->enqueue(*I);
  414. }
  415. }
  416. void CoreEngine::enqueue(ExplodedNodeSet &Set,
  417. const CFGBlock *Block, unsigned Idx) {
  418. for (ExplodedNodeSet::iterator I = Set.begin(),
  419. E = Set.end(); I != E; ++I) {
  420. enqueueStmtNode(*I, Block, Idx);
  421. }
  422. }
  423. void CoreEngine::enqueueEndOfFunction(ExplodedNodeSet &Set) {
  424. for (ExplodedNodeSet::iterator I = Set.begin(), E = Set.end(); I != E; ++I) {
  425. ExplodedNode *N = *I;
  426. // If we are in an inlined call, generate CallExit node.
  427. if (N->getLocationContext()->getParent()) {
  428. N = generateCallExitNode(N);
  429. if (N)
  430. WList->enqueue(N);
  431. } else
  432. G->addEndOfPath(N);
  433. }
  434. }
  435. void NodeBuilder::anchor() { }
  436. ExplodedNode* NodeBuilder::generateNodeImpl(const ProgramPoint &Loc,
  437. ProgramStateRef State,
  438. ExplodedNode *FromN,
  439. bool MarkAsSink) {
  440. HasGeneratedNodes = true;
  441. bool IsNew;
  442. ExplodedNode *N = C.Eng.G->getNode(Loc, State, MarkAsSink, &IsNew);
  443. N->addPredecessor(FromN, *C.Eng.G);
  444. Frontier.erase(FromN);
  445. if (!IsNew)
  446. return 0;
  447. if (!MarkAsSink)
  448. Frontier.Add(N);
  449. return N;
  450. }
  451. void NodeBuilderWithSinks::anchor() { }
  452. StmtNodeBuilder::~StmtNodeBuilder() {
  453. if (EnclosingBldr)
  454. for (ExplodedNodeSet::iterator I = Frontier.begin(),
  455. E = Frontier.end(); I != E; ++I )
  456. EnclosingBldr->addNodes(*I);
  457. }
  458. void BranchNodeBuilder::anchor() { }
  459. ExplodedNode *BranchNodeBuilder::generateNode(ProgramStateRef State,
  460. bool branch,
  461. ExplodedNode *NodePred) {
  462. // If the branch has been marked infeasible we should not generate a node.
  463. if (!isFeasible(branch))
  464. return NULL;
  465. ProgramPoint Loc = BlockEdge(C.Block, branch ? DstT:DstF,
  466. NodePred->getLocationContext());
  467. ExplodedNode *Succ = generateNodeImpl(Loc, State, NodePred);
  468. return Succ;
  469. }
  470. ExplodedNode*
  471. IndirectGotoNodeBuilder::generateNode(const iterator &I,
  472. ProgramStateRef St,
  473. bool IsSink) {
  474. bool IsNew;
  475. ExplodedNode *Succ = Eng.G->getNode(BlockEdge(Src, I.getBlock(),
  476. Pred->getLocationContext()), St,
  477. IsSink, &IsNew);
  478. Succ->addPredecessor(Pred, *Eng.G);
  479. if (!IsNew)
  480. return 0;
  481. if (!IsSink)
  482. Eng.WList->enqueue(Succ);
  483. return Succ;
  484. }
  485. ExplodedNode*
  486. SwitchNodeBuilder::generateCaseStmtNode(const iterator &I,
  487. ProgramStateRef St) {
  488. bool IsNew;
  489. ExplodedNode *Succ = Eng.G->getNode(BlockEdge(Src, I.getBlock(),
  490. Pred->getLocationContext()), St,
  491. false, &IsNew);
  492. Succ->addPredecessor(Pred, *Eng.G);
  493. if (!IsNew)
  494. return 0;
  495. Eng.WList->enqueue(Succ);
  496. return Succ;
  497. }
  498. ExplodedNode*
  499. SwitchNodeBuilder::generateDefaultCaseNode(ProgramStateRef St,
  500. bool IsSink) {
  501. // Get the block for the default case.
  502. assert(Src->succ_rbegin() != Src->succ_rend());
  503. CFGBlock *DefaultBlock = *Src->succ_rbegin();
  504. // Sanity check for default blocks that are unreachable and not caught
  505. // by earlier stages.
  506. if (!DefaultBlock)
  507. return NULL;
  508. bool IsNew;
  509. ExplodedNode *Succ = Eng.G->getNode(BlockEdge(Src, DefaultBlock,
  510. Pred->getLocationContext()), St,
  511. IsSink, &IsNew);
  512. Succ->addPredecessor(Pred, *Eng.G);
  513. if (!IsNew)
  514. return 0;
  515. if (!IsSink)
  516. Eng.WList->enqueue(Succ);
  517. return Succ;
  518. }