30 std::map<ASTFunction *, std::set<ASTFunction *>>
getCallGraph();
36 std::map<ASTFunAppExpr *, std::set<ASTFunction *>>
getMayCall();
43 std::map<std::string, ASTFunction *>
getFunMap();
50 std::map<ASTFunction *, std::set<ASTFunction *>> graph;
51 std::map<ASTFunAppExpr *, std::set<ASTFunction *>> mayCall;
52 std::map<std::string, ASTFunction *> fromFunNameToASTFun;
Class for function call expressions.
Definition: ASTFunAppExpr.h:7
Class for defining the signature, local declarations, and a body of a function.
Definition: ASTFunction.h:11
Abstract base class for all AST nodes.
Definition: ASTNode.h:34
Class for a program which is a name and a list of functions.
Definition: ASTProgram.h:11
Base class for AST visitors.
Definition: ASTVisitor.h:23
Performs control flow analyses with the help of AST and Symbol table of a program Provides helper fun...
Definition: CFAnalyzer.h:15
Builds call graph of a program that represents calling relationships between subroutines This class o...
Definition: CallGraphBuilder.h:16
std::map< std::string, ASTFunction * > getFunMap()
Returns the map from a function name to its ASTFunction*, ASTFunction* is then used to fetch further ...
Definition: CallGraphBuilder.cpp:43
std::map< ASTFunction *, std::set< ASTFunction * > > getCallGraph()
Returns the call graph, call graph a map from caller to callee, the callee is a set of ASTFunction* a...
Definition: CallGraphBuilder.cpp:34
std::map< ASTFunAppExpr *, std::set< ASTFunction * > > getMayCall()
Returns the may call relation, which relates each call expression to the set of possible called funct...
Definition: CallGraphBuilder.cpp:39
static CallGraphBuilder build(ASTProgram *ast, CFAnalyzer cfa)
Returns the CallGraphBuilder for a given program.
Definition: CallGraphBuilder.cpp:4
bool visit(ASTFunction *element) override
Definition: CallGraphBuilder.cpp:12