79 bool vfgfile = (filename.rfind(
"VFGGrammar.txt") == filename.length() - std::string(
"VFGGrammar.txt").length());
83 <<
"Please use a file that ends with 'VFG.txt', "
84 <<
"or use the -customized flag to allow custom grammar files.\n";
85 assert(
false &&
"grammar loading failed!");
97 graph->dump(
"CFLGraph");
static AndersenWaveDiff * createAndersenWaveDiff(SVFIR *_pag)
Create an singleton instance directly instead of invoking llvm pass manager.
virtual void normalizeCFLGrammar()
Normalize grammar.
virtual void buildCFLGrammar()
Build Grammar from text file.
GrammarBase * grammarBase
void check(GrammarBase *grammar, CFLGraphBuilder *graphBuilder, CFLGraph *graph)
CFLGraph * build(GenericGraph< N, E > *graph, GrammarBase *grammar, BuildDirection direction=BuildDirection::plain)
virtual void checkParameter()
Parameter Checking.
virtual void finalize()
Print grammar and graph.
virtual void initialize()
Initialize the grammar, graph, solver.
void buildCFLGraph()
Build CFLGraph via VFG.
static const Option< bool > Customized
static const Option< std::string > CFLGraph
static const Option< bool > PrintCFL
static const Option< std::string > GrammarFilename
virtual void initialize()
Initialization of a pointer analysis, including building symbol table and SVFIR etc.
VFCFLGraphBuilder: a CFLGraphBuilder specialized for handling value-flow.
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...
std::ostream & errs()
Overwrite llvm::errs().