|
19 | 19 | print_table |
20 | 20 | ) |
21 | 21 | from .draw import draw_cfgs, draw_lattices |
| 22 | +from .expr_visitor import make_cfg |
22 | 23 | from .fixed_point import analyse |
23 | 24 | from .framework_adaptor import FrameworkAdaptor |
24 | 25 | from .framework_helper import ( |
|
28 | 29 | is_function_without_leading_ |
29 | 30 | ) |
30 | 31 | from .github_search import scan_github, set_github_api_token |
31 | | -from .interprocedural_cfg import interprocedural |
32 | 32 | from .lattice import print_lattice |
33 | 33 | from .liveness import LivenessAnalysis |
34 | 34 | from .project_handler import get_directory_modules, get_modules |
@@ -183,13 +183,13 @@ def analyse_repo(github_repo, analysis_type, ui_mode): |
183 | 183 | project_modules = get_modules(directory) |
184 | 184 | local_modules = get_directory_modules(directory) |
185 | 185 | tree = generate_ast(github_repo.path) |
186 | | - interprocedural_cfg = interprocedural( |
| 186 | + cfg = make_cfg( |
187 | 187 | tree, |
188 | 188 | project_modules, |
189 | 189 | local_modules, |
190 | 190 | github_repo.path |
191 | 191 | ) |
192 | | - cfg_list.append(interprocedural_cfg) |
| 192 | + cfg_list.append(cfg) |
193 | 193 |
|
194 | 194 | initialize_constraint_table(cfg_list) |
195 | 195 | analyse(cfg_list, analysis_type=analysis_type) |
@@ -256,14 +256,13 @@ def main(command_line_args=sys.argv[1:]): |
256 | 256 | tree = generate_ast(path, python_2=args.python_2) |
257 | 257 |
|
258 | 258 | cfg_list = list() |
259 | | - |
260 | | - interprocedural_cfg = interprocedural( |
| 259 | + cfg = make_cfg( |
261 | 260 | tree, |
262 | 261 | project_modules, |
263 | 262 | local_modules, |
264 | 263 | path |
265 | 264 | ) |
266 | | - cfg_list.append(interprocedural_cfg) |
| 265 | + cfg_list.append(cfg) |
267 | 266 | framework_route_criteria = is_flask_route_function |
268 | 267 | if args.adaptor: |
269 | 268 | if args.adaptor.lower().startswith('e'): |
|
0 commit comments