30#ifndef INCLUDE_CFL_CFLGRAPHBUILDER_H_ 
   31#define INCLUDE_CFL_CFLGRAPHBUILDER_H_ 
   89    template<
class N, 
class E>
 
 
AliasCFLGraphBuilder: a CFLGraphBuilder specialized for handling aliasing.
 
void addBiCFLEdge(CFLGraph *cflGraph, ConstraintNode *src, ConstraintNode *dst, CFGrammar::Kind label)
Handles edges, with the exception of the GEP.
 
void connectVGep(CFLGraph *cflGraph, ConstraintGraph *graph, ConstraintNode *src, ConstraintNode *dst, u32_t level, SVFIR *pag)
Connects VGep (Variable GEP)
 
void addBiGepCFLEdge(CFLGraph *cflGraph, ConstraintNode *src, ConstraintNode *dst, CFGrammar::Attribute attri)
Adds bidirectional GEP edges with attributes.
 
CFLGraph * buildBigraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar)
Builds a bidirectional CFL graph by copying nodes and edges from a const graph that inherits from Gen...
 
CFLGraph * buildBiPEGgraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar, SVFIR *pag)
 
void buildlabelToKindMap(GrammarBase *grammar)
build label and kind connect from the grammar
 
Map< CFGrammar::Kind, Set< CFGrammar::Attribute > > & getKindToAttrsMap()
Returns a reference to the map that associates Kinds with their corresponding attributes.
 
Map< std::string, Kind > & getLabelToKindMap()
Returns a reference to the map that associates string labels with their corresponding Kind.
 
CFLGraph * buildFromDot(std::string filename, GrammarBase *grammar, BuildDirection direction=BuildDirection::plain)
Method to build a CFL graph from a Dot file.
 
Map< std::string, Kind > labelToKindMap
Maps to maintain mapping between labels and kinds.
 
CFLGraph * build(GenericGraph< N, E > *graph, GrammarBase *grammar, BuildDirection direction=BuildDirection::plain)
 
Map< Kind, std::string > & getKindToLabelMap()
Returns a reference to the map that associates Kinds with their corresponding string labels.
 
Map< Kind, std::string > kindToLabelMap
 
CFLGraph * buildFromJson(std::string filename, GrammarBase *grammar, BuildDirection direction=BuildDirection::plain)
Method to build a CFL graph from a Json file.
 
CFLGraph * buildFromText(std::string fileName, GrammarBase *grammar, BuildDirection direction=BuildDirection::plain)
Method to build a CFL graph from a Text file.
 
CFLNode * addGNode(u32_t NodeID)
add src and dst node from file
 
void addAttribute(CFGrammar::Kind kind, CFGrammar::Attribute attribute)
Method to add an attribute to a specific kind.
 
Map< CFGrammar::Kind, Set< CFGrammar::Attribute > > kindToAttrsMap
Map to maintain attributes associated with each kind.
 
VFCFLGraphBuilder: a CFLGraphBuilder specialized for handling value-flow.
 
void connectVGep(CFLGraph *cflGraph, ConstraintGraph *graph, ConstraintNode *src, ConstraintNode *dst, u32_t level, SVFIR *pag)
Connects VGep (Variable GEP)
 
void addBiCFLEdge(CFLGraph *cflGraph, ConstraintNode *src, ConstraintNode *dst, CFGrammar::Kind label)
Handles edges, with the exception of the GEP.
 
void addBiGepCFLEdge(CFLGraph *cflGraph, ConstraintNode *src, ConstraintNode *dst, CFGrammar::Attribute attri)
Adds bidirectional GEP edges with attributes.
 
CFLGraph * buildBiPEGgraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar, SVFIR *pag)
 
CFLGraph * buildBigraph(SVFG *graph, Kind startKind, GrammarBase *grammar)
Builds a bidirectional CFL graph by copying nodes and edges from a const graph that inherits from SVF...
 
llvm::IRBuilder IRBuilder