svf-tools 1.0.1282 → 1.0.1284
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.
- package/package.json +1 -1
- package/svf/include/Graphs/CDG.h +9 -9
- package/svf/include/Graphs/GraphWriter.h +1 -1
- package/svf/lib/Graphs/CallGraph.cpp +1 -1
- package/svf/lib/Graphs/ICFG.cpp +8 -8
- package/svf/lib/Graphs/IRGraph.cpp +25 -17
- package/svf/lib/Graphs/SVFG.cpp +23 -24
- package/svf/lib/Graphs/VFG.cpp +19 -19
- package/svf/lib/MTA/TCT.cpp +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1284",
|
|
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": {
|
package/svf/include/Graphs/CDG.h
CHANGED
|
@@ -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) << " [
|
|
174
|
+
O << "\tNode" << static_cast<const void*>(Node) << " [";
|
|
175
175
|
if (!NodeAttributes.empty()) O << NodeAttributes << ",";
|
|
176
176
|
O << "label=\"{";
|
|
177
177
|
|
package/svf/lib/Graphs/ICFG.cpp
CHANGED
|
@@ -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
|
-
|
|
452
|
+
rawstr << ",color=green";
|
|
448
453
|
}
|
|
449
454
|
else if (SVFUtil::isa<CopyStmt>(edge))
|
|
450
455
|
{
|
|
451
|
-
|
|
456
|
+
rawstr << ",color=black";
|
|
452
457
|
}
|
|
453
458
|
else if (SVFUtil::isa<GepStmt>(edge))
|
|
454
459
|
{
|
|
455
|
-
|
|
460
|
+
rawstr << ",color=purple";
|
|
456
461
|
}
|
|
457
462
|
else if (SVFUtil::isa<StoreStmt>(edge))
|
|
458
463
|
{
|
|
459
|
-
|
|
464
|
+
rawstr << ",color=blue";
|
|
460
465
|
}
|
|
461
466
|
else if (SVFUtil::isa<LoadStmt>(edge))
|
|
462
467
|
{
|
|
463
|
-
|
|
468
|
+
rawstr << ",color=red";
|
|
464
469
|
}
|
|
465
470
|
else if (SVFUtil::isa<PhiStmt>(edge))
|
|
466
471
|
{
|
|
467
|
-
|
|
472
|
+
rawstr << ",color=grey";
|
|
468
473
|
}
|
|
469
474
|
else if (SVFUtil::isa<SelectStmt>(edge))
|
|
470
475
|
{
|
|
471
|
-
|
|
476
|
+
rawstr << ",color=grey";
|
|
472
477
|
}
|
|
473
478
|
else if (SVFUtil::isa<CmpStmt>(edge))
|
|
474
479
|
{
|
|
475
|
-
|
|
480
|
+
rawstr << ",color=grey";
|
|
476
481
|
}
|
|
477
482
|
else if (SVFUtil::isa<BinaryOPStmt>(edge))
|
|
478
483
|
{
|
|
479
|
-
|
|
484
|
+
rawstr << ",color=grey";
|
|
480
485
|
}
|
|
481
486
|
else if (SVFUtil::isa<UnaryOPStmt>(edge))
|
|
482
487
|
{
|
|
483
|
-
|
|
488
|
+
rawstr << ",color=grey";
|
|
484
489
|
}
|
|
485
490
|
else if (SVFUtil::isa<BranchStmt>(edge))
|
|
486
491
|
{
|
|
487
|
-
|
|
492
|
+
rawstr << ",color=grey";
|
|
488
493
|
}
|
|
489
494
|
else if (SVFUtil::isa<TDForkPE>(edge))
|
|
490
495
|
{
|
|
491
|
-
|
|
496
|
+
rawstr << ",color=Turquoise";
|
|
492
497
|
}
|
|
493
498
|
else if (SVFUtil::isa<TDJoinPE>(edge))
|
|
494
499
|
{
|
|
495
|
-
|
|
500
|
+
rawstr << ",color=Turquoise";
|
|
496
501
|
}
|
|
497
502
|
else if (SVFUtil::isa<CallPE>(edge))
|
|
498
503
|
{
|
|
499
|
-
|
|
504
|
+
rawstr << ",color=black,style=dashed";
|
|
500
505
|
}
|
|
501
506
|
else if (SVFUtil::isa<RetPE>(edge))
|
|
502
507
|
{
|
|
503
|
-
|
|
508
|
+
rawstr << ",color=black,style=dotted";
|
|
509
|
+
}
|
|
510
|
+
else
|
|
511
|
+
{
|
|
512
|
+
assert(false && "No such kind edge!!");
|
|
504
513
|
}
|
|
505
514
|
|
|
506
|
-
|
|
507
|
-
exit(1);
|
|
515
|
+
return rawstr.str();
|
|
508
516
|
}
|
|
509
517
|
|
|
510
518
|
template<class EdgeIter>
|
package/svf/lib/Graphs/SVFG.cpp
CHANGED
|
@@ -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
|
|
package/svf/lib/Graphs/VFG.cpp
CHANGED
|
@@ -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
|
|
package/svf/lib/MTA/TCT.cpp
CHANGED
|
@@ -612,11 +612,11 @@ struct DOTGraphTraits<TCT*> : public DefaultDOTGraphTraits
|
|
|
612
612
|
std::string attr;
|
|
613
613
|
if (node->isInloop())
|
|
614
614
|
{
|
|
615
|
-
attr.append("
|
|
615
|
+
attr.append("shape=record,style=filled,fillcolor=red");
|
|
616
616
|
}
|
|
617
617
|
else if (node->isIncycle())
|
|
618
618
|
{
|
|
619
|
-
attr.append("
|
|
619
|
+
attr.append("shape=record,style=filled,fillcolor=yellow");
|
|
620
620
|
}
|
|
621
621
|
return attr;
|
|
622
622
|
}
|