cinspector.analysis package¶
Submodules¶
cinspector.analysis.call_graph module¶
Call Graph
- class cinspector.analysis.call_graph.CallGraph(funcs: Iterable[FunctionDefinitionNode])[source]¶
Bases:
object
Generate the call graph
Accept a list of function nodes and analyze the invocation relationship between them. Note that only explicit invocations will be catched instead of indirect calls.
- Attribtes:
funcs (Iterable[FunctionDefinitionNode]): involved functions
- is_identical(call: CallExpressionNode, func: FunctionDefinitionNode) bool [source]¶
check whether the <call> is the invocation of <func>
- We involve two checks to decide whether <call> is the invocation of <func>
same func name
same parameter number
#TODO: It would be more precise if add parameter type check. But this requires dataflow analysis which we will implement later.
cinspector.analysis.cfg module¶
Control Flow Graph-related analysis
- class cinspector.analysis.cfg.CFG(function_def: FunctionDefinitionNode)[source]¶
Bases:
BaseCFG