Static Value-Flow Analysis
|
#include <CFLGraphBuilder.h>
Public Member Functions | |
template<class N , class E > | |
CFLGraph * | build (GenericGraph< N, E > *graph, GrammarBase *grammar, BuildDirection direction=BuildDirection::plain) |
CFLGraph * | build (std::string fileName, GrammarBase *grammar, BuildDirection direction=BuildDirection::plain) |
Method to build a CFL graph from external file. | |
Map< std::string, Kind > & | getLabelToKindMap () |
Returns a reference to the map that associates string labels with their corresponding Kind. | |
Map< Kind, std::string > & | getKindToLabelMap () |
Returns a reference to the map that associates Kinds with their corresponding string labels. | |
Map< CFGrammar::Kind, Set< CFGrammar::Attribute > > & | getKindToAttrsMap () |
Returns a reference to the map that associates Kinds with their corresponding attributes. | |
Protected Types | |
typedef CFGrammar::Kind | Kind |
typedef CFGrammar::Symbol | Symbol |
Protected Member Functions | |
void | addAttribute (CFGrammar::Kind kind, CFGrammar::Attribute attribute) |
Method to add an attribute to a specific kind. | |
void | buildlabelToKindMap (GrammarBase *grammar) |
build label and kind connect from the grammar | |
CFLNode * | addGNode (u32_t NodeID) |
add src and dst node from file | |
CFLGraph * | buildFromText (std::string fileName, GrammarBase *grammar, BuildDirection direction=BuildDirection::plain) |
Method to build a CFL graph from a Text file. | |
CFLGraph * | buildFromDot (std::string filename, GrammarBase *grammar, BuildDirection direction=BuildDirection::plain) |
Method to build a CFL graph from a Dot file. | |
CFLGraph * | buildFromJson (std::string filename, GrammarBase *grammar, BuildDirection direction=BuildDirection::plain) |
Method to build a CFL graph from a Json file. | |
Protected Attributes | |
Map< std::string, Kind > | labelToKindMap |
Maps to maintain mapping between labels and kinds. | |
Map< Kind, std::string > | kindToLabelMap |
Map< CFGrammar::Kind, Set< CFGrammar::Attribute > > | kindToAttrsMap |
Map to maintain attributes associated with each kind. | |
Kind | current |
CFLGraph * | cflGraph |
CFLGraphBuilder class is responsible for building CFL (Context-Free Language) graphs from text files, dot files, json file or from memory graph.
Definition at line 50 of file CFLGraphBuilder.h.
|
protected |
Define Kind(Not contain attribute) and Symbol(May contain attribute) as types derived from CFGrammar to numerically represent label
Definition at line 55 of file CFLGraphBuilder.h.
Definition at line 56 of file CFLGraphBuilder.h.
|
protected |
Method to add an attribute to a specific kind.
Add attribute to kindToAttribute Map.
Definition at line 37 of file CFLGraphBuilder.cpp.
add src and dst node from file
Definition at line 82 of file CFLGraphBuilder.cpp.
CFLGraph * SVF::CFLGraphBuilder::build | ( | GenericGraph< N, E > * | graph, |
GrammarBase * | grammar, | ||
BuildDirection | direction = BuildDirection::plain |
||
) |
Method to build a CFL graph by copying nodes and edges from any graph inherited from GenericGraph
Method to build a bidirectional CFL graph by copying nodes and edges from any graph inherited from GenericGraph
Definition at line 101 of file CFLGraphBuilder.cpp.
CFLGraph * SVF::CFLGraphBuilder::build | ( | std::string | fileName, |
GrammarBase * | grammar, | ||
BuildDirection | direction = BuildDirection::plain |
||
) |
Method to build a CFL graph from external file.
Definition at line 128 of file CFLGraphBuilder.cpp.
|
protected |
Method to build a CFL graph from a Dot file.
Definition at line 196 of file CFLGraphBuilder.cpp.
|
protected |
Method to build a CFL graph from a Json file.
Definition at line 274 of file CFLGraphBuilder.cpp.
|
protected |
Method to build a CFL graph from a Text file.
Definition at line 142 of file CFLGraphBuilder.cpp.
|
protected |
build label and kind connect from the grammar
Definition at line 54 of file CFLGraphBuilder.cpp.
|
inline |
Returns a reference to the map that associates Kinds with their corresponding attributes.
Definition at line 111 of file CFLGraphBuilder.h.
Returns a reference to the map that associates Kinds with their corresponding string labels.
Definition at line 105 of file CFLGraphBuilder.h.
Returns a reference to the map that associates string labels with their corresponding Kind.
Getter methods for accessing class variables
Definition at line 99 of file CFLGraphBuilder.h.
|
protected |
Definition at line 66 of file CFLGraphBuilder.h.
|
protected |
Definition at line 65 of file CFLGraphBuilder.h.
|
protected |
Map to maintain attributes associated with each kind.
Definition at line 63 of file CFLGraphBuilder.h.
Definition at line 60 of file CFLGraphBuilder.h.
Maps to maintain mapping between labels and kinds.
Definition at line 59 of file CFLGraphBuilder.h.