svf-tools 1.0.1282 → 1.0.1283

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/package.json +1 -1
  2. package/svf/include/Graphs/CDG.h +9 -9
  3. package/svf/include/Graphs/GraphWriter.h +1 -1
  4. package/svf/lib/Graphs/CallGraph.cpp +1 -1
  5. package/svf/lib/Graphs/ICFG.cpp +8 -8
  6. package/svf/lib/Graphs/IRGraph.cpp +25 -17
  7. package/svf/lib/Graphs/SVFG.cpp +23 -24
  8. package/svf/lib/Graphs/VFG.cpp +19 -19
  9. package/svf/lib/MTA/TCT.cpp +2 -2
  10. package/SVF-doxygen/doxygen.config +0 -2548
  11. package/SVF-doxygen/wiki/PAG.png +0 -0
  12. package/SVF-doxygen/wiki/andersen.png +0 -0
  13. package/SVF-doxygen/wiki/callgraph.png +0 -0
  14. package/SVF-doxygen/wiki/consG.png +0 -0
  15. package/SVF-doxygen/wiki/cpu2000-flto +0 -432
  16. package/SVF-doxygen/wiki/cpu2006-flto +0 -417
  17. package/SVF-doxygen/wiki/cpu2017-wllvm.cfg +0 -999
  18. package/SVF-doxygen/wiki/database.png +0 -0
  19. package/SVF-doxygen/wiki/framework.png +0 -0
  20. package/SVF-doxygen/wiki/help.png +0 -0
  21. package/SVF-doxygen/wiki/icfg.png +0 -0
  22. package/SVF-doxygen/wiki/mssa-cha.png +0 -0
  23. package/SVF-doxygen/wiki/pagedge.png +0 -0
  24. package/SVF-doxygen/wiki/pagnode.png +0 -0
  25. package/SVF-doxygen/wiki/pt.png +0 -0
  26. package/SVF-doxygen/wiki/setupcmake.png +0 -0
  27. package/SVF-doxygen/wiki/setupconfiguration.png +0 -0
  28. package/SVF-doxygen/wiki/setupdashboard.png +0 -0
  29. package/SVF-doxygen/wiki/setupdebug.png +0 -0
  30. package/SVF-doxygen/wiki/setupenv.png +0 -0
  31. package/SVF-doxygen/wiki/startup.png +0 -0
  32. package/SVF-doxygen/wiki/svf-stat.pdf +0 -0
  33. package/SVF-doxygen/wiki/svfg-framework.png +0 -0
  34. package/SVF-doxygen/wiki/svfg.png +0 -0
  35. package/SVF-doxygen/wiki/svfg_opt.png +0 -0
  36. package/SVF-doxygen/wiki/svfgedge-cha.png +0 -0
  37. package/SVF-doxygen/wiki/svfgnode-cha.png +0 -0
  38. package/SVF-doxygen/wiki/svfpic/README.md +0 -6
  39. package/SVF-doxygen/wiki/svfpic/ass-1debug1.png +0 -0
  40. package/SVF-doxygen/wiki/svfpic/ass-1debug2.png +0 -0
  41. package/SVF-doxygen/wiki/svfpic/build.jpg +0 -0
  42. package/SVF-doxygen/wiki/svfpic/cmd.png +0 -0
  43. package/SVF-doxygen/wiki/svfpic/connect1.jpg +0 -0
  44. package/SVF-doxygen/wiki/svfpic/connect2.png +0 -0
  45. package/SVF-doxygen/wiki/svfpic/connect3.png +0 -0
  46. package/SVF-doxygen/wiki/svfpic/connect4.jpg +0 -0
  47. package/SVF-doxygen/wiki/svfpic/connect5.jpg +0 -0
  48. package/SVF-doxygen/wiki/svfpic/connect6.png +0 -0
  49. package/SVF-doxygen/wiki/svfpic/connect7.jpg +0 -0
  50. package/SVF-doxygen/wiki/svfpic/continue.png +0 -0
  51. package/SVF-doxygen/wiki/svfpic/debug-new.png +0 -0
  52. package/SVF-doxygen/wiki/svfpic/debug-new2.png +0 -0
  53. package/SVF-doxygen/wiki/svfpic/debug1.jpeg +0 -0
  54. package/SVF-doxygen/wiki/svfpic/debug2.jpeg +0 -0
  55. package/SVF-doxygen/wiki/svfpic/debug3.png +0 -0
  56. package/SVF-doxygen/wiki/svfpic/debug4.png +0 -0
  57. package/SVF-doxygen/wiki/svfpic/debug5.jpeg +0 -0
  58. package/SVF-doxygen/wiki/svfpic/debug6.jpeg +0 -0
  59. package/SVF-doxygen/wiki/svfpic/docker_sys_requirement.png +0 -0
  60. package/SVF-doxygen/wiki/svfpic/docker_sys_requirements.png +0 -0
  61. package/SVF-doxygen/wiki/svfpic/dockerbuild.png +0 -0
  62. package/SVF-doxygen/wiki/svfpic/dockerbuild2.jpg +0 -0
  63. package/SVF-doxygen/wiki/svfpic/dockerbuild3.jpg +0 -0
  64. package/SVF-doxygen/wiki/svfpic/dockerbuild4.png +0 -0
  65. package/SVF-doxygen/wiki/svfpic/dockerbuild5.jpg +0 -0
  66. package/SVF-doxygen/wiki/svfpic/dockerbuildimage.png +0 -0
  67. package/SVF-doxygen/wiki/svfpic/dockercmd.png +0 -0
  68. package/SVF-doxygen/wiki/svfpic/dockercmd2.png +0 -0
  69. package/SVF-doxygen/wiki/svfpic/dockercontainer.png +0 -0
  70. package/SVF-doxygen/wiki/svfpic/dockerdb1.jpg +0 -0
  71. package/SVF-doxygen/wiki/svfpic/dockerdb10.jpeg +0 -0
  72. package/SVF-doxygen/wiki/svfpic/dockerdb2.jpg +0 -0
  73. package/SVF-doxygen/wiki/svfpic/dockerdb3.jpg +0 -0
  74. package/SVF-doxygen/wiki/svfpic/dockerdb4.jpg +0 -0
  75. package/SVF-doxygen/wiki/svfpic/dockerdb5.png +0 -0
  76. package/SVF-doxygen/wiki/svfpic/dockerdb6.jpeg +0 -0
  77. package/SVF-doxygen/wiki/svfpic/dockerdb7.png +0 -0
  78. package/SVF-doxygen/wiki/svfpic/dockerdb8.png +0 -0
  79. package/SVF-doxygen/wiki/svfpic/dockerdb9.jpeg +0 -0
  80. package/SVF-doxygen/wiki/svfpic/dockerfinshbuilt.png +0 -0
  81. package/SVF-doxygen/wiki/svfpic/dockerimage.png +0 -0
  82. package/SVF-doxygen/wiki/svfpic/dockernameImage.png +0 -0
  83. package/SVF-doxygen/wiki/svfpic/dockerpull.png +0 -0
  84. package/SVF-doxygen/wiki/svfpic/dockerpull2.png +0 -0
  85. package/SVF-doxygen/wiki/svfpic/download.jpg +0 -0
  86. package/SVF-doxygen/wiki/svfpic/extension1.jpeg +0 -0
  87. package/SVF-doxygen/wiki/svfpic/extension2.jpeg +0 -0
  88. package/SVF-doxygen/wiki/svfpic/graphviz.png +0 -0
  89. package/SVF-doxygen/wiki/svfpic/hellodb.png +0 -0
  90. package/SVF-doxygen/wiki/svfpic/hellodb2.png +0 -0
  91. package/SVF-doxygen/wiki/svfpic/hviz_0.png +0 -0
  92. package/SVF-doxygen/wiki/svfpic/hviz_1.png +0 -0
  93. package/SVF-doxygen/wiki/svfpic/hviz_2.png +0 -0
  94. package/SVF-doxygen/wiki/svfpic/installC:C++Ext.png +0 -0
  95. package/SVF-doxygen/wiki/svfpic/installCMakeExt.png +0 -0
  96. package/SVF-doxygen/wiki/svfpic/installRCext.png +0 -0
  97. package/SVF-doxygen/wiki/svfpic/installdockerext.png +0 -0
  98. package/SVF-doxygen/wiki/svfpic/launch1.png +0 -0
  99. package/SVF-doxygen/wiki/svfpic/openfile.png +0 -0
  100. package/SVF-doxygen/wiki/svfpic/pathfolder.png +0 -0
  101. package/SVF-doxygen/wiki/svfpic/restart.png +0 -0
  102. package/SVF-doxygen/wiki/svfpic/rundocker.png +0 -0
  103. package/SVF-doxygen/wiki/svfpic/runinCLI.png +0 -0
  104. package/SVF-doxygen/wiki/svfpic/screen.png +0 -0
  105. package/SVF-doxygen/wiki/svfpic/settings1.jpg +0 -0
  106. package/SVF-doxygen/wiki/svfpic/settings2.jpg +0 -0
  107. package/SVF-doxygen/wiki/svfpic/settings3.jpg +0 -0
  108. package/SVF-doxygen/wiki/svfpic/shortlists.png +0 -0
  109. package/SVF-doxygen/wiki/svfpic/start.png +0 -0
  110. package/SVF-doxygen/wiki/svfpic/start1.png +0 -0
  111. package/SVF-doxygen/wiki/svfpic/update0.png +0 -0
  112. package/SVF-doxygen/wiki/svfpic/verify_docker.png +0 -0
  113. package/SVF-doxygen/wiki/svfpic/vs_entry_window.png +0 -0
  114. package/SVF-doxygen/wiki/svfpic/wsl.png +0 -0
  115. package/SVF-doxygen/wiki/svfpic/wsl_1.png +0 -0
  116. package/SVF-doxygen/wiki/svfpic/wsl_2.png +0 -0
  117. package/SVF-doxygen/wiki/svfpic/wsl_3.png +0 -0
  118. package/SVF-doxygen/wiki/tools.png +0 -0
  119. package/SVF-doxygen/wiki/users.png +0 -0
  120. package/SVF-doxygen/wiki/vm1.png +0 -0
  121. package/SVF-doxygen/wiki/vm2.png +0 -0
  122. package/SVF-doxygen/wiki/vm3.png +0 -0
  123. package/SVF-doxygen/wiki/vm4.png +0 -0
  124. package/SVF-doxygen/wiki/vm5.png +0 -0
  125. package/SVF-doxygen/wiki/vscode_build_tasks.png +0 -0
  126. package/SVF-doxygen/wiki/vscode_cpp_extension.png +0 -0
  127. package/SVF-doxygen/wiki/vscode_debug_list.png +0 -0
  128. package/SVF-doxygen/wiki/vscode_dir_structure.png +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-tools",
3
- "version": "1.0.1282",
3
+ "version": "1.0.1283",
4
4
  "description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -420,35 +420,35 @@ struct DOTGraphTraits<SVF::CDG *> : public DOTGraphTraits<SVF::PAG *>
420
420
  std::stringstream rawstr(str);
421
421
  const SVF::ICFGNode *icfgNode = node->getICFGNode();
422
422
 
423
+ rawstr << "shape=record";
424
+
423
425
  if (SVF::SVFUtil::isa<SVF::IntraICFGNode>(icfgNode))
424
426
  {
425
- rawstr << "color=black";
427
+ rawstr << ",color=black";
426
428
  }
427
429
  else if (SVF::SVFUtil::isa<SVF::FunEntryICFGNode>(icfgNode))
428
430
  {
429
- rawstr << "color=yellow";
431
+ rawstr << ",color=yellow";
430
432
  }
431
433
  else if (SVF::SVFUtil::isa<SVF::FunExitICFGNode>(icfgNode))
432
434
  {
433
- rawstr << "color=green";
435
+ rawstr << ",color=green";
434
436
  }
435
437
  else if (SVF::SVFUtil::isa<SVF::CallICFGNode>(icfgNode))
436
438
  {
437
- rawstr << "color=red";
439
+ rawstr << ",color=red";
438
440
  }
439
441
  else if (SVF::SVFUtil::isa<SVF::RetICFGNode>(icfgNode))
440
442
  {
441
- rawstr << "color=blue";
443
+ rawstr << ",color=blue";
442
444
  }
443
445
  else if (SVF::SVFUtil::isa<SVF::GlobalICFGNode>(icfgNode))
444
446
  {
445
- rawstr << "color=purple";
447
+ rawstr << ",color=purple";
446
448
  }
447
449
  else
448
450
  assert(false && "no such kind of node!!");
449
451
 
450
- rawstr << "";
451
-
452
452
  return rawstr.str();
453
453
  }
454
454
 
@@ -479,4 +479,4 @@ struct DOTGraphTraits<SVF::CDG *> : public DOTGraphTraits<SVF::PAG *>
479
479
  };
480
480
 
481
481
  } // End namespace SVF
482
- #endif //SVF_CONTROLDG_H
482
+ #endif //SVF_CONTROLDG_H
@@ -171,7 +171,7 @@ public:
171
171
  {
172
172
  std::string NodeAttributes = DTraits.getNodeAttributes(Node, G);
173
173
 
174
- O << "\tNode" << static_cast<const void*>(Node) << " [shape=record,";
174
+ O << "\tNode" << static_cast<const void*>(Node) << " [";
175
175
  if (!NodeAttributes.empty()) O << NodeAttributes << ",";
176
176
  O << "label=\"{";
177
177
 
@@ -449,7 +449,7 @@ struct DOTGraphTraits<CallGraph*> : public DefaultDOTGraphTraits
449
449
  const FunObjVar* fun = node->getFunction();
450
450
  if (!SVFUtil::isExtCall(fun))
451
451
  {
452
- return "shape=box";
452
+ return "shape=record";
453
453
  }
454
454
  else
455
455
  return "shape=Mrecord";
@@ -516,35 +516,35 @@ struct DOTGraphTraits<ICFG*> : public DOTGraphTraits<SVFIR*>
516
516
  std::string str;
517
517
  std::stringstream rawstr(str);
518
518
 
519
+ rawstr << "shape=record";
520
+
519
521
  if(SVFUtil::isa<IntraICFGNode>(node))
520
522
  {
521
- rawstr << "color=black";
523
+ rawstr << ",color=black";
522
524
  }
523
525
  else if(SVFUtil::isa<FunEntryICFGNode>(node))
524
526
  {
525
- rawstr << "color=yellow";
527
+ rawstr << ",color=yellow";
526
528
  }
527
529
  else if(SVFUtil::isa<FunExitICFGNode>(node))
528
530
  {
529
- rawstr << "color=green";
531
+ rawstr << ",color=green";
530
532
  }
531
533
  else if(SVFUtil::isa<CallICFGNode>(node))
532
534
  {
533
- rawstr << "color=red";
535
+ rawstr << ",color=red";
534
536
  }
535
537
  else if(SVFUtil::isa<RetICFGNode>(node))
536
538
  {
537
- rawstr << "color=blue";
539
+ rawstr << ",color=blue";
538
540
  }
539
541
  else if(SVFUtil::isa<GlobalICFGNode>(node))
540
542
  {
541
- rawstr << "color=purple";
543
+ rawstr << ",color=purple";
542
544
  }
543
545
  else
544
546
  assert(false && "no such kind of node!!");
545
547
 
546
- rawstr << "";
547
-
548
548
  return rawstr.str();
549
549
  }
550
550
 
@@ -440,71 +440,79 @@ struct DOTGraphTraits<IRGraph*> : public DefaultDOTGraphTraits
440
440
  template<class EdgeIter>
441
441
  static std::string getEdgeAttributes(SVFVar*, EdgeIter EI, IRGraph*)
442
442
  {
443
+ std::string str;
444
+ std::stringstream rawstr(str);
445
+
446
+ rawstr << "shape=record";
447
+
443
448
  const SVFStmt* edge = *(EI.getCurrent());
444
449
  assert(edge && "No edge found!!");
445
450
  if (SVFUtil::isa<AddrStmt>(edge))
446
451
  {
447
- return "color=green";
452
+ rawstr << ",color=green";
448
453
  }
449
454
  else if (SVFUtil::isa<CopyStmt>(edge))
450
455
  {
451
- return "color=black";
456
+ rawstr << ",color=black";
452
457
  }
453
458
  else if (SVFUtil::isa<GepStmt>(edge))
454
459
  {
455
- return "color=purple";
460
+ rawstr << ",color=purple";
456
461
  }
457
462
  else if (SVFUtil::isa<StoreStmt>(edge))
458
463
  {
459
- return "color=blue";
464
+ rawstr << ",color=blue";
460
465
  }
461
466
  else if (SVFUtil::isa<LoadStmt>(edge))
462
467
  {
463
- return "color=red";
468
+ rawstr << ",color=red";
464
469
  }
465
470
  else if (SVFUtil::isa<PhiStmt>(edge))
466
471
  {
467
- return "color=grey";
472
+ rawstr << ",color=grey";
468
473
  }
469
474
  else if (SVFUtil::isa<SelectStmt>(edge))
470
475
  {
471
- return "color=grey";
476
+ rawstr << ",color=grey";
472
477
  }
473
478
  else if (SVFUtil::isa<CmpStmt>(edge))
474
479
  {
475
- return "color=grey";
480
+ rawstr << ",color=grey";
476
481
  }
477
482
  else if (SVFUtil::isa<BinaryOPStmt>(edge))
478
483
  {
479
- return "color=grey";
484
+ rawstr << ",color=grey";
480
485
  }
481
486
  else if (SVFUtil::isa<UnaryOPStmt>(edge))
482
487
  {
483
- return "color=grey";
488
+ rawstr << ",color=grey";
484
489
  }
485
490
  else if (SVFUtil::isa<BranchStmt>(edge))
486
491
  {
487
- return "color=grey";
492
+ rawstr << ",color=grey";
488
493
  }
489
494
  else if (SVFUtil::isa<TDForkPE>(edge))
490
495
  {
491
- return "color=Turquoise";
496
+ rawstr << ",color=Turquoise";
492
497
  }
493
498
  else if (SVFUtil::isa<TDJoinPE>(edge))
494
499
  {
495
- return "color=Turquoise";
500
+ rawstr << ",color=Turquoise";
496
501
  }
497
502
  else if (SVFUtil::isa<CallPE>(edge))
498
503
  {
499
- return "color=black,style=dashed";
504
+ rawstr << ",color=black,style=dashed";
500
505
  }
501
506
  else if (SVFUtil::isa<RetPE>(edge))
502
507
  {
503
- return "color=black,style=dotted";
508
+ rawstr << ",color=black,style=dotted";
509
+ }
510
+ else
511
+ {
512
+ assert(false && "No such kind edge!!");
504
513
  }
505
514
 
506
- assert(false && "No such kind edge!!");
507
- exit(1);
515
+ return rawstr.str();
508
516
  }
509
517
 
510
518
  template<class EdgeIter>
@@ -1010,98 +1010,99 @@ struct DOTGraphTraits<SVFG*> : public DOTGraphTraits<SVFIR*>
1010
1010
  std::string str;
1011
1011
  std::stringstream rawstr(str);
1012
1012
 
1013
+ rawstr << "shape=record";
1014
+
1013
1015
  if(StmtSVFGNode* stmtNode = SVFUtil::dyn_cast<StmtSVFGNode>(node))
1014
1016
  {
1015
1017
  const SVFStmt* edge = stmtNode->getSVFStmt();
1016
1018
  if (SVFUtil::isa<AddrStmt>(edge))
1017
1019
  {
1018
- rawstr << "color=green";
1020
+ rawstr << ",color=green";
1019
1021
  }
1020
1022
  else if (SVFUtil::isa<CopyStmt>(edge))
1021
1023
  {
1022
- rawstr << "color=black";
1024
+ rawstr << ",color=black";
1023
1025
  }
1024
1026
  else if (SVFUtil::isa<RetPE>(edge))
1025
1027
  {
1026
- rawstr << "color=black,style=dotted";
1028
+ rawstr << ",color=black,style=dotted";
1027
1029
  }
1028
1030
  else if (SVFUtil::isa<GepStmt>(edge))
1029
1031
  {
1030
- rawstr << "color=purple";
1032
+ rawstr << ",color=purple";
1031
1033
  }
1032
1034
  else if (SVFUtil::isa<StoreStmt>(edge))
1033
1035
  {
1034
- rawstr << "color=blue";
1036
+ rawstr << ",color=blue";
1035
1037
  }
1036
1038
  else if (SVFUtil::isa<LoadStmt>(edge))
1037
1039
  {
1038
- rawstr << "color=red";
1040
+ rawstr << ",color=red";
1039
1041
  }
1040
1042
  else
1041
1043
  {
1042
1044
  assert(0 && "No such kind edge!!");
1043
1045
  }
1044
- rawstr << "";
1045
1046
  }
1046
1047
  else if(SVFUtil::isa<MSSAPHISVFGNode>(node))
1047
1048
  {
1048
- rawstr << "color=black";
1049
+ rawstr << ",color=black";
1049
1050
  }
1050
1051
  else if(SVFUtil::isa<PHISVFGNode>(node))
1051
1052
  {
1052
- rawstr << "color=black";
1053
+ rawstr << ",color=black";
1053
1054
  }
1054
1055
  else if(SVFUtil::isa<NullPtrSVFGNode>(node))
1055
1056
  {
1056
- rawstr << "color=grey";
1057
+ rawstr << ",color=grey";
1057
1058
  }
1058
1059
  else if(SVFUtil::isa<FormalINSVFGNode>(node))
1059
1060
  {
1060
- rawstr << "color=yellow,penwidth=2";
1061
+ rawstr << ",color=yellow,penwidth=2";
1061
1062
  }
1062
1063
  else if(SVFUtil::isa<FormalOUTSVFGNode>(node))
1063
1064
  {
1064
- rawstr << "color=yellow,penwidth=2";
1065
+ rawstr << ",color=yellow,penwidth=2";
1065
1066
  }
1066
1067
  else if(SVFUtil::isa<FormalParmSVFGNode>(node))
1067
1068
  {
1068
- rawstr << "color=yellow,penwidth=2";
1069
+ rawstr << ",color=yellow,penwidth=2";
1069
1070
  }
1070
1071
  else if(SVFUtil::isa<ActualINSVFGNode>(node))
1071
1072
  {
1072
- rawstr << "color=yellow,penwidth=2";
1073
+ rawstr << ",color=yellow,penwidth=2";
1073
1074
  }
1074
1075
  else if(SVFUtil::isa<ActualOUTSVFGNode>(node))
1075
1076
  {
1076
- rawstr << "color=yellow,penwidth=2";
1077
+ rawstr << ",color=yellow,penwidth=2";
1077
1078
  }
1078
1079
  else if(SVFUtil::isa<ActualParmSVFGNode>(node))
1079
1080
  {
1080
- rawstr << "color=yellow,penwidth=2";
1081
+ rawstr << ",color=yellow,penwidth=2";
1081
1082
  }
1082
1083
  else if (SVFUtil::isa<ActualRetSVFGNode>(node))
1083
1084
  {
1084
- rawstr << "color=yellow,penwidth=2";
1085
+ rawstr << ",color=yellow,penwidth=2";
1085
1086
  }
1086
1087
  else if (SVFUtil::isa<FormalRetSVFGNode>(node))
1087
1088
  {
1088
- rawstr << "color=yellow,penwidth=2";
1089
+ rawstr << ",color=yellow,penwidth=2";
1089
1090
  }
1090
1091
  else if (SVFUtil::isa<BinaryOPVFGNode>(node))
1091
1092
  {
1092
- rawstr << "color=black,penwidth=2";
1093
+ rawstr << ",color=black,penwidth=2";
1093
1094
  }
1094
1095
  else if (SVFUtil::isa<CmpVFGNode>(node))
1095
1096
  {
1096
- rawstr << "color=black,penwidth=2";
1097
+ rawstr << ",color=black,penwidth=2";
1097
1098
  }
1098
1099
  else if (SVFUtil::isa<UnaryOPVFGNode>(node))
1099
1100
  {
1100
- rawstr << "color=black,penwidth=2";
1101
+ rawstr << ",color=black,penwidth=2";
1101
1102
  }
1102
1103
  else if (SVFUtil::isa<BranchVFGNode>(node))
1103
1104
  {
1104
- rawstr << "color=gold,penwidth=2";
1105
+ rawstr << ",color=gold,penwidth=2";
1105
1106
  }
1106
1107
  else
1107
1108
  assert(false && "no such kind of node!!");
@@ -1122,8 +1123,6 @@ struct DOTGraphTraits<SVFG*> : public DOTGraphTraits<SVFIR*>
1122
1123
  else if(graph->getStat()->inForwardSlice(node))
1123
1124
  rawstr << ",style=filled, fillcolor=gray";
1124
1125
 
1125
- rawstr << "";
1126
-
1127
1126
  return rawstr.str();
1128
1127
  }
1129
1128
 
@@ -1224,32 +1224,34 @@ struct DOTGraphTraits<VFG*> : public DOTGraphTraits<SVFIR*>
1224
1224
  std::string str;
1225
1225
  std::stringstream rawstr(str);
1226
1226
 
1227
+ rawstr << "shape=record";
1228
+
1227
1229
  if(StmtVFGNode* stmtNode = SVFUtil::dyn_cast<StmtVFGNode>(node))
1228
1230
  {
1229
1231
  const SVFStmt* edge = stmtNode->getSVFStmt();
1230
1232
  if (SVFUtil::isa<AddrStmt>(edge))
1231
1233
  {
1232
- rawstr << "color=green";
1234
+ rawstr << ",color=green";
1233
1235
  }
1234
1236
  else if (SVFUtil::isa<CopyStmt>(edge))
1235
1237
  {
1236
- rawstr << "color=black";
1238
+ rawstr << ",color=black";
1237
1239
  }
1238
1240
  else if (SVFUtil::isa<RetPE>(edge))
1239
1241
  {
1240
- rawstr << "color=black,style=dotted";
1242
+ rawstr << ",color=black,style=dotted";
1241
1243
  }
1242
1244
  else if (SVFUtil::isa<GepStmt>(edge))
1243
1245
  {
1244
- rawstr << "color=purple";
1246
+ rawstr << ",color=purple";
1245
1247
  }
1246
1248
  else if (SVFUtil::isa<StoreStmt>(edge))
1247
1249
  {
1248
- rawstr << "color=blue";
1250
+ rawstr << ",color=blue";
1249
1251
  }
1250
1252
  else if (SVFUtil::isa<LoadStmt>(edge))
1251
1253
  {
1252
- rawstr << "color=red";
1254
+ rawstr << ",color=red";
1253
1255
  }
1254
1256
  else
1255
1257
  {
@@ -1259,53 +1261,51 @@ struct DOTGraphTraits<VFG*> : public DOTGraphTraits<SVFIR*>
1259
1261
  }
1260
1262
  else if (SVFUtil::isa<CmpVFGNode>(node))
1261
1263
  {
1262
- rawstr << "color=grey";
1264
+ rawstr << ",color=grey";
1263
1265
  }
1264
1266
  else if (SVFUtil::isa<BinaryOPVFGNode>(node))
1265
1267
  {
1266
- rawstr << "color=grey";
1268
+ rawstr << ",color=grey";
1267
1269
  }
1268
1270
  else if (SVFUtil::isa<UnaryOPVFGNode>(node))
1269
1271
  {
1270
- rawstr << "color=grey";
1272
+ rawstr << ",color=grey";
1271
1273
  }
1272
1274
  else if(SVFUtil::isa<PHIVFGNode>(node))
1273
1275
  {
1274
- rawstr << "color=black";
1276
+ rawstr << ",color=black";
1275
1277
  }
1276
1278
  else if(SVFUtil::isa<NullPtrVFGNode>(node))
1277
1279
  {
1278
- rawstr << "color=grey";
1280
+ rawstr << ",color=grey";
1279
1281
  }
1280
1282
  else if(SVFUtil::isa<FormalParmVFGNode>(node))
1281
1283
  {
1282
- rawstr << "color=yellow,penwidth=2";
1284
+ rawstr << ",color=yellow,penwidth=2";
1283
1285
  }
1284
1286
  else if(SVFUtil::isa<ActualParmVFGNode>(node))
1285
1287
  {
1286
- rawstr << "color=yellow,penwidth=2";
1288
+ rawstr << ",color=yellow,penwidth=2";
1287
1289
  }
1288
1290
  else if (SVFUtil::isa<ActualRetVFGNode>(node))
1289
1291
  {
1290
- rawstr << "color=yellow,penwidth=2";
1292
+ rawstr << ",color=yellow,penwidth=2";
1291
1293
  }
1292
1294
  else if (SVFUtil::isa<FormalRetVFGNode>(node))
1293
1295
  {
1294
- rawstr << "color=yellow,penwidth=2";
1296
+ rawstr << ",color=yellow,penwidth=2";
1295
1297
  }
1296
1298
  else if (SVFUtil::isa<MRSVFGNode>(node))
1297
1299
  {
1298
- rawstr << "color=orange,penwidth=2";
1300
+ rawstr << ",color=orange,penwidth=2";
1299
1301
  }
1300
1302
  else if (SVFUtil::isa<BranchVFGNode>(node))
1301
1303
  {
1302
- rawstr << "color=gold,penwidth=2";
1304
+ rawstr << ",color=gold,penwidth=2";
1303
1305
  }
1304
1306
  else
1305
1307
  assert(false && "no such kind of node!!");
1306
1308
 
1307
- rawstr << "";
1308
-
1309
1309
  return rawstr.str();
1310
1310
  }
1311
1311
 
@@ -612,11 +612,11 @@ struct DOTGraphTraits<TCT*> : public DefaultDOTGraphTraits
612
612
  std::string attr;
613
613
  if (node->isInloop())
614
614
  {
615
- attr.append(" style=filled fillcolor=red");
615
+ attr.append("shape=record,style=filled,fillcolor=red");
616
616
  }
617
617
  else if (node->isIncycle())
618
618
  {
619
- attr.append(" style=filled fillcolor=yellow");
619
+ attr.append("shape=record,style=filled,fillcolor=yellow");
620
620
  }
621
621
  return attr;
622
622
  }