33 using namespace SVFUtil;
43 svfg = memSSA.buildFullSVFG(ander);
44 graph = cflGraphBuilder.
buildBigraph(svfg, grammarBase->getStartKind(), grammarBase);
51 cflChecker.
check(grammarBase, &cflGraphBuilder, graph);
66 normalizeCFLGrammar();
76 bool vfgfile = (filename.rfind(
"VFGGrammar.txt") == filename.length() -
std::string(
"VFGGrammar.txt").length());
80 <<
"Please use a file that ends with 'VFG.txt', "
81 <<
"or use the -customized flag to allow custom grammar files.\n";
82 assert(
false &&
"grammar loading failed!");
93 grammar->dump(
"Grammar");
94 graph->dump(
"CFLGraph");
static AndersenWaveDiff * createAndersenWaveDiff(SVFIR *_pag)
Create an singleton instance directly instead of invoking llvm pass manager.
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()