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 378 of file SVFFileSystem.h.
using SVF::SVFIRWriter::autoCStr = std::unique_ptr<char, decltype(&cJSON_free)> |
Definition at line 392 of file SVFFileSystem.h.
using SVF::SVFIRWriter::autoJSON = std::unique_ptr<cJSON, decltype(&cJSON_Delete)> |
Definition at line 391 of file SVFFileSystem.h.
Constructor.
Definition at line 976 of file SVFFileSystem.cpp.
Definition at line 672 of file SVFFileSystem.cpp.
|
private |
Definition at line 667 of file SVFFileSystem.cpp.
|
private |
Definition at line 346 of file SVFFileSystem.cpp.
|
private |
Definition at line 746 of file SVFFileSystem.cpp.
|
private |
Definition at line 760 of file SVFFileSystem.cpp.
|
private |
Definition at line 442 of file SVFFileSystem.cpp.
|
private |
Definition at line 413 of file SVFFileSystem.cpp.
Definition at line 702 of file SVFFileSystem.cpp.
Definition at line 466 of file SVFFileSystem.cpp.
Definition at line 456 of file SVFFileSystem.cpp.
Definition at line 739 of file SVFFileSystem.cpp.
Definition at line 677 of file SVFFileSystem.cpp.
|
private |
Definition at line 366 of file SVFFileSystem.cpp.
|
private |
Definition at line 361 of file SVFFileSystem.cpp.
|
private |
Definition at line 399 of file SVFFileSystem.cpp.
|
private |
Definition at line 406 of file SVFFileSystem.cpp.
Definition at line 338 of file SVFFileSystem.cpp.
Definition at line 694 of file SVFFileSystem.cpp.
Definition at line 330 of file SVFFileSystem.cpp.
|
private |
Definition at line 382 of file SVFFileSystem.cpp.
Definition at line 429 of file SVFFileSystem.cpp.
Definition at line 371 of file SVFFileSystem.cpp.
|
private |
Definition at line 394 of file SVFFileSystem.cpp.
|
private |
Definition at line 434 of file SVFFileSystem.cpp.
|
private |
Definition at line 387 of file SVFFileSystem.cpp.
Definition at line 689 of file SVFFileSystem.cpp.
Definition at line 1169 of file SVFFileSystem.cpp.
|
private |
Definition at line 718 of file SVFFileSystem.cpp.
Definition at line 323 of file SVFFileSystem.cpp.
Definition at line 725 of file SVFFileSystem.cpp.
|
private |
Definition at line 449 of file SVFFileSystem.cpp.
|
private |
Definition at line 421 of file SVFFileSystem.cpp.
Definition at line 710 of file SVFFileSystem.cpp.
Definition at line 351 of file SVFFileSystem.cpp.
|
private |
Definition at line 732 of file SVFFileSystem.cpp.
Definition at line 1178 of file SVFFileSystem.cpp.
Definition at line 684 of file SVFFileSystem.cpp.
|
private |
Definition at line 594 of file SVFFileSystem.cpp.
|
private |
Definition at line 509 of file SVFFileSystem.cpp.
|
private |
Definition at line 555 of file SVFFileSystem.cpp.
|
private |
Definition at line 628 of file SVFFileSystem.cpp.
|
private |
Definition at line 573 of file SVFFileSystem.cpp.
|
private |
Definition at line 582 of file SVFFileSystem.cpp.
|
private |
Definition at line 603 of file SVFFileSystem.cpp.
|
private |
Definition at line 616 of file SVFFileSystem.cpp.
|
private |
Definition at line 608 of file SVFFileSystem.cpp.
|
private |
Definition at line 623 of file SVFFileSystem.cpp.
|
private |
Definition at line 536 of file SVFFileSystem.cpp.
|
private |
Definition at line 495 of file SVFFileSystem.cpp.
|
private |
Definition at line 587 of file SVFFileSystem.cpp.
|
private |
Definition at line 564 of file SVFFileSystem.cpp.
|
private |
Definition at line 488 of file SVFFileSystem.cpp.
Definition at line 653 of file SVFFileSystem.cpp.
|
private |
Definition at line 638 of file SVFFileSystem.cpp.
|
private |
Definition at line 517 of file SVFFileSystem.cpp.
|
private |
Definition at line 633 of file SVFFileSystem.cpp.
|
private |
Definition at line 482 of file SVFFileSystem.cpp.
Definition at line 643 of file SVFFileSystem.cpp.
|
private |
Definition at line 502 of file SVFFileSystem.cpp.
Definition at line 473 of file SVFFileSystem.cpp.
Definition at line 524 of file SVFFileSystem.cpp.
Definition at line 308 of file SVFFileSystem.cpp.
Definition at line 769 of file SVFFileSystem.cpp.
Definition at line 774 of file SVFFileSystem.cpp.
|
private |
Definition at line 753 of file SVFFileSystem.cpp.
Definition at line 318 of file SVFFileSystem.cpp.
Definition at line 356 of file SVFFileSystem.cpp.
|
private |
Main logic to dump a SVFIR to a JSON object.
Definition at line 1022 of file SVFFileSystem.cpp.
|
private |
Definition at line 1014 of file SVFFileSystem.cpp.
|
inlineprivate |
Definition at line 547 of file SVFFileSystem.h.
|
inlineprivate |
Definition at line 557 of file SVFFileSystem.h.
|
inlineprivate |
Definition at line 536 of file SVFFileSystem.h.
|
inlineprivate |
Definition at line 640 of file SVFFileSystem.h.
|
inlineprivate |
Definition at line 633 of file SVFFileSystem.h.
Definition at line 1004 of file SVFFileSystem.cpp.
Definition at line 105 of file SVFFileSystem.cpp.
|
private |
Definition at line 1231 of file SVFFileSystem.cpp.
Definition at line 1159 of file SVFFileSystem.cpp.
Definition at line 1133 of file SVFFileSystem.cpp.
Definition at line 1154 of file SVFFileSystem.cpp.
|
private |
Definition at line 1126 of file SVFFileSystem.cpp.
Definition at line 1093 of file SVFFileSystem.cpp.
Definition at line 1120 of file SVFFileSystem.cpp.
Definition at line 1114 of file SVFFileSystem.cpp.
Definition at line 1067 of file SVFFileSystem.cpp.
Definition at line 1206 of file SVFFileSystem.cpp.
|
private |
Definition at line 1239 of file SVFFileSystem.cpp.
|
private |
Definition at line 1194 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 611 of file SVFFileSystem.h.
Definition at line 122 of file SVFFileSystem.cpp.
Definition at line 1226 of file SVFFileSystem.cpp.
Definition at line 1164 of file SVFFileSystem.cpp.
|
private |
Definition at line 1211 of file SVFFileSystem.cpp.
Definition at line 1286 of file SVFFileSystem.cpp.
Definition at line 1088 of file SVFFileSystem.cpp.
Definition at line 1057 of file SVFFileSystem.cpp.
Definition at line 1062 of file SVFFileSystem.cpp.
Definition at line 1083 of file SVFFileSystem.cpp.
|
private |
Definition at line 1252 of file SVFFileSystem.cpp.
Definition at line 621 of file SVFFileSystem.h.
Definition at line 127 of file SVFFileSystem.cpp.
Definition at line 116 of file SVFFileSystem.cpp.
Definition at line 138 of file SVFFileSystem.cpp.
Definition at line 143 of file SVFFileSystem.cpp.
Definition at line 132 of file SVFFileSystem.cpp.
Definition at line 110 of file SVFFileSystem.cpp.
Definition at line 303 of file SVFFileSystem.cpp.
Definition at line 298 of file SVFFileSystem.cpp.
Definition at line 283 of file SVFFileSystem.cpp.
Definition at line 262 of file SVFFileSystem.cpp.
Definition at line 232 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 148 of file SVFFileSystem.cpp.
Definition at line 172 of file SVFFileSystem.cpp.
Definition at line 204 of file SVFFileSystem.cpp.
Definition at line 983 of file SVFFileSystem.cpp.
Definition at line 989 of file SVFFileSystem.cpp.
|
private |
Definition at line 385 of file SVFFileSystem.h.
|
private |
Definition at line 384 of file SVFFileSystem.h.
|
private |
Definition at line 386 of file SVFFileSystem.h.
|
private |
Definition at line 388 of file SVFFileSystem.h.
Definition at line 381 of file SVFFileSystem.h.
|
private |
Definition at line 383 of file SVFFileSystem.h.