19 std::shared_ptr<SymbolTable> symTable;
20 std::shared_ptr<TypeInference> typeResults;
21 std::shared_ptr<CallGraph> callGraph;
25 std::shared_ptr<TypeInference> t,
26 std::shared_ptr<CallGraph> cg)
27 : symTable(std::move(s)), typeResults(std::move(t)),
28 callGraph(std::move(cg)) {}
Class for a program which is a name and a list of functions.
Definition: ASTProgram.h:11
Performs control flow analysis and records results for subsequent phases Generates call graph of a pr...
Definition: CallGraph.h:22
Stores the results of semantic analysis passes.
Definition: SemanticAnalysis.h:18
TypeInference * getTypeResults()
Returns the type inference results.
Definition: SemanticAnalysis.cpp:16
SemanticAnalysis(std::shared_ptr< SymbolTable > s, std::shared_ptr< TypeInference > t, std::shared_ptr< CallGraph > cg)
Definition: SemanticAnalysis.h:24
static std::shared_ptr< SemanticAnalysis > analyze(ASTProgram *ast, bool polyInf)
Perform semantic analysis on program AST.
Definition: SemanticAnalysis.cpp:4
SymbolTable * getSymbolTable()
Returns the symbol table computed for the program.
Definition: SemanticAnalysis.cpp:14
CallGraph * getCallGraph()
Returns the call graph for the program.
Definition: SemanticAnalysis.cpp:18
Performs symbol analysis and records results for subsequent phases.
Definition: SymbolTable.h:17
Perform type inference and checking.
Definition: TypeInference.h:17