Static Value-Flow Analysis
|
#include <SVFFileSystem.h>
Public Types | |
using | autoJSON = std::unique_ptr< cJSON, decltype(&cJSON_Delete)> |
using | autoCStr = std::unique_ptr< char, decltype(&cJSON_free)> |
Public Member Functions | |
SVFIRWriter (const SVFIR *svfir) | |
Constructor. | |
Static Public Member Functions | |
static void | writeJsonToOstream (const SVFIR *svfir, std::ostream &os) |
static void | writeJsonToPath (const SVFIR *svfir, const std::string &path) |
Static Private Member Functions | |
static cJSON * | toJson (bool flag) |
static cJSON * | toJson (unsigned number) |
static cJSON * | toJson (int number) |
static cJSON * | toJson (float number) |
static cJSON * | toJson (const std::string &str) |
Private Attributes | |
const SVFIR * | svfIR |
SVFModuleWriter | svfModuleWriter |
ICFGWriter | icfgWriter |
CHGraphWriter | chgWriter |
IRGraphWriter | irGraphWriter |
OrderedMap< size_t, std::string > | numToStrMap |
Definition at line 376 of file SVFFileSystem.h.
using SVF::SVFIRWriter::autoCStr = std::unique_ptr<char, decltype(&cJSON_free)> |
Definition at line 390 of file SVFFileSystem.h.
using SVF::SVFIRWriter::autoJSON = std::unique_ptr<cJSON, decltype(&cJSON_Delete)> |
Definition at line 389 of file SVFFileSystem.h.
Constructor.
Definition at line 943 of file SVFFileSystem.cpp.
Definition at line 639 of file SVFFileSystem.cpp.
|
private |
Definition at line 634 of file SVFFileSystem.cpp.
|
private |
Definition at line 313 of file SVFFileSystem.cpp.
|
private |
Definition at line 713 of file SVFFileSystem.cpp.
|
private |
Definition at line 727 of file SVFFileSystem.cpp.
|
private |
Definition at line 409 of file SVFFileSystem.cpp.
|
private |
Definition at line 380 of file SVFFileSystem.cpp.
Definition at line 669 of file SVFFileSystem.cpp.
Definition at line 433 of file SVFFileSystem.cpp.
Definition at line 423 of file SVFFileSystem.cpp.
Definition at line 706 of file SVFFileSystem.cpp.
Definition at line 644 of file SVFFileSystem.cpp.
|
private |
Definition at line 333 of file SVFFileSystem.cpp.
|
private |
Definition at line 328 of file SVFFileSystem.cpp.
|
private |
Definition at line 366 of file SVFFileSystem.cpp.
|
private |
Definition at line 373 of file SVFFileSystem.cpp.
Definition at line 305 of file SVFFileSystem.cpp.
Definition at line 661 of file SVFFileSystem.cpp.
Definition at line 297 of file SVFFileSystem.cpp.
|
private |
Definition at line 349 of file SVFFileSystem.cpp.
Definition at line 396 of file SVFFileSystem.cpp.
Definition at line 338 of file SVFFileSystem.cpp.
|
private |
Definition at line 361 of file SVFFileSystem.cpp.
|
private |
Definition at line 401 of file SVFFileSystem.cpp.
|
private |
Definition at line 354 of file SVFFileSystem.cpp.
Definition at line 656 of file SVFFileSystem.cpp.
|
private |
Definition at line 685 of file SVFFileSystem.cpp.
Definition at line 291 of file SVFFileSystem.cpp.
Definition at line 692 of file SVFFileSystem.cpp.
|
private |
Definition at line 416 of file SVFFileSystem.cpp.
|
private |
Definition at line 388 of file SVFFileSystem.cpp.
Definition at line 677 of file SVFFileSystem.cpp.
Definition at line 318 of file SVFFileSystem.cpp.
|
private |
Definition at line 699 of file SVFFileSystem.cpp.
Definition at line 1136 of file SVFFileSystem.cpp.
Definition at line 651 of file SVFFileSystem.cpp.
|
private |
Definition at line 561 of file SVFFileSystem.cpp.
|
private |
Definition at line 476 of file SVFFileSystem.cpp.
|
private |
Definition at line 522 of file SVFFileSystem.cpp.
|
private |
Definition at line 595 of file SVFFileSystem.cpp.
|
private |
Definition at line 540 of file SVFFileSystem.cpp.
|
private |
Definition at line 549 of file SVFFileSystem.cpp.
|
private |
Definition at line 570 of file SVFFileSystem.cpp.
|
private |
Definition at line 583 of file SVFFileSystem.cpp.
|
private |
Definition at line 575 of file SVFFileSystem.cpp.
|
private |
Definition at line 590 of file SVFFileSystem.cpp.
|
private |
Definition at line 503 of file SVFFileSystem.cpp.
|
private |
Definition at line 462 of file SVFFileSystem.cpp.
|
private |
Definition at line 554 of file SVFFileSystem.cpp.
|
private |
Definition at line 531 of file SVFFileSystem.cpp.
|
private |
Definition at line 455 of file SVFFileSystem.cpp.
Definition at line 620 of file SVFFileSystem.cpp.
|
private |
Definition at line 605 of file SVFFileSystem.cpp.
|
private |
Definition at line 484 of file SVFFileSystem.cpp.
|
private |
Definition at line 600 of file SVFFileSystem.cpp.
|
private |
Definition at line 449 of file SVFFileSystem.cpp.
Definition at line 610 of file SVFFileSystem.cpp.
|
private |
Definition at line 469 of file SVFFileSystem.cpp.
Definition at line 440 of file SVFFileSystem.cpp.
Definition at line 491 of file SVFFileSystem.cpp.
Definition at line 276 of file SVFFileSystem.cpp.
Definition at line 736 of file SVFFileSystem.cpp.
Definition at line 741 of file SVFFileSystem.cpp.
|
private |
Definition at line 720 of file SVFFileSystem.cpp.
Definition at line 286 of file SVFFileSystem.cpp.
Definition at line 323 of file SVFFileSystem.cpp.
|
private |
Main logic to dump a SVFIR to a JSON object.
Definition at line 989 of file SVFFileSystem.cpp.
|
private |
Definition at line 981 of file SVFFileSystem.cpp.
|
inlineprivate |
Definition at line 543 of file SVFFileSystem.h.
|
inlineprivate |
Definition at line 553 of file SVFFileSystem.h.
|
inlineprivate |
Definition at line 532 of file SVFFileSystem.h.
|
inlineprivate |
Definition at line 636 of file SVFFileSystem.h.
|
inlineprivate |
Definition at line 629 of file SVFFileSystem.h.
Definition at line 971 of file SVFFileSystem.cpp.
Definition at line 59 of file SVFFileSystem.cpp.
|
private |
Definition at line 1184 of file SVFFileSystem.cpp.
Definition at line 1126 of file SVFFileSystem.cpp.
Definition at line 1100 of file SVFFileSystem.cpp.
Definition at line 1121 of file SVFFileSystem.cpp.
|
private |
Definition at line 1093 of file SVFFileSystem.cpp.
Definition at line 1060 of file SVFFileSystem.cpp.
Definition at line 1087 of file SVFFileSystem.cpp.
Definition at line 1081 of file SVFFileSystem.cpp.
Definition at line 1034 of file SVFFileSystem.cpp.
|
private |
Definition at line 1192 of file SVFFileSystem.cpp.
|
private |
Definition at line 1152 of file SVFFileSystem.cpp.
The following 2 functions are intended to convert SparseBitVectors to JSON. But they're buggy. Commenting them out would enable the toJson(T) where is_iterable_v<T> is true. But that implementation is less space-efficient if the bitvector contains many elements. It is observed that upon construction, SVF IR bitvectors contain at most 1 element. In that case, we can just use the toJson(T) for iterable T without much space overhead.
template <unsigned ElementSize> cJSON* toJson(const SparseBitVectorElement<ElementSize>& element) { cJSON* array = jsonCreateArray(); for (const auto v : element.Bits) { jsonAddItemToArray(array, toJson(v)); } return array; }
template <unsigned ElementSize> cJSON* toJson(const SparseBitVector<ElementSize>& bv) { return toJson(bv.Elements); }
Definition at line 607 of file SVFFileSystem.h.
Definition at line 76 of file SVFFileSystem.cpp.
Definition at line 1179 of file SVFFileSystem.cpp.
Definition at line 1131 of file SVFFileSystem.cpp.
|
private |
Definition at line 1164 of file SVFFileSystem.cpp.
Definition at line 1233 of file SVFFileSystem.cpp.
Definition at line 1055 of file SVFFileSystem.cpp.
Definition at line 1024 of file SVFFileSystem.cpp.
Definition at line 1029 of file SVFFileSystem.cpp.
Definition at line 1050 of file SVFFileSystem.cpp.
|
private |
Definition at line 1205 of file SVFFileSystem.cpp.
Definition at line 617 of file SVFFileSystem.h.
Definition at line 81 of file SVFFileSystem.cpp.
Definition at line 70 of file SVFFileSystem.cpp.
Definition at line 92 of file SVFFileSystem.cpp.
Definition at line 97 of file SVFFileSystem.cpp.
Definition at line 86 of file SVFFileSystem.cpp.
Definition at line 64 of file SVFFileSystem.cpp.
Definition at line 271 of file SVFFileSystem.cpp.
Definition at line 266 of file SVFFileSystem.cpp.
Definition at line 251 of file SVFFileSystem.cpp.
Definition at line 230 of file SVFFileSystem.cpp.
Definition at line 200 of file SVFFileSystem.cpp.
Parameter types of these functions are all pointers. When they are used as arguments of toJson(), they will be dumped as an index. contentToJson()
will dump the actual content.
Definition at line 102 of file SVFFileSystem.cpp.
Definition at line 126 of file SVFFileSystem.cpp.
Definition at line 158 of file SVFFileSystem.cpp.
Definition at line 950 of file SVFFileSystem.cpp.
Definition at line 956 of file SVFFileSystem.cpp.
|
private |
Definition at line 383 of file SVFFileSystem.h.
|
private |
Definition at line 382 of file SVFFileSystem.h.
|
private |
Definition at line 384 of file SVFFileSystem.h.
|
private |
Definition at line 386 of file SVFFileSystem.h.
Definition at line 379 of file SVFFileSystem.h.
|
private |
Definition at line 381 of file SVFFileSystem.h.