<meta name="robots" content="noindex" />
Filters and Pipelines
AST file generation
- Clang-check is used to generate AST files for C and C++ programs
- The Python AST library is used to generate AST for Python programs
- SpiderMonkey is used to generate the AST for JavaScript programs
Monolingual procedure call filters
- cFunCall.py reads a NAMCE.c_ast.txt (or cpp) file and generates a NAME.c_call.csv file containing the function call information in the file, while also adding to a shared file NAME_funcs.csv that collects information about all the functions defined in the program.
- pyFunCall.py reads a NAME.py_ast.json file and generates a NAME.py_call.csv file containing the function call information in the file, while also adding to a shared file NAME_funcs.csv that collects information about all the functions defined in the program.
- jsFunCall.py reads a NAME.js_ast.json file and generates a NAME.js_call.csv file containing the function call information in the file, while also adding to a shared file NAME_funcs.csv that collects information about all the functions defined in the program.
Interoperability filters
- pyViaC.py reads a C function call file NAME.c_call.csv and scans for Python interoperability. Currently it only implements the Python.h PyRun _SimpleFile API. It ouputs a revised csv function call file NAME.c_finalcall.csv.
- jsViaPy.py reads a Python function call file NAME.py_call.csv and scans for JavaScript interoperability. Currently it only implements the PyV8 eval API. It outputs a revised csv function call file NAME.py_finalcall.csv.
- pyViaJs.py reads a JavaScript function call file NAME.js_call.csv and scans for Python interoperatbility. Currently it only implements the JQuerry ajax API. It outputs a revised csv function call file NAME.py_finalcall.csv.
Multilingual combination and graphin filters
- mergeFunCall.py merges the function calls in the XX_finalcall.csv files into a single function call file. It also finds the interoperability of python programs calling C/C++ procedures(pybind11). When called from mlcg.py, this output is given the name of the first argument to mlcg.py, e.g. if the argument was test0, then the file is called test0_callgraph.csv.
- Pybind11:
- MLSA processes all the call.csv files of the programs(C++, Python) and generates a merged csv file that shows the interoperability of programs by showing all function calls (shows where a function is defined and where is it called).
- In Python csvfile, it sees function calls , if it is of type 'A.B' it splits it and tries to find for a module/file named A and searches for the function definition in its csv file –'B' (using funcs.csv). It then adds the function call program name as 'A' and if the module appears to be a C++ file ,it tries to find if 'B' is present as the first argument of “OBJ.def” . If that is the case it replaces 'B' to the function name present in the second argument of “OBJ.def”in the csvfile.
- generateDOT.py produces a PDF file from a call graph csv file displaying the call graph.
Flow Control Filters
- cFlowControl.py reads an AST file NAME.c_ast.txt (or cpp) and generates a csv file containing the forward flow control information NAME.c_fcfg.csv, and reverse control flow information NAME.c_rcfg.csv.
- pyFlowControl.py - does not currently exist
- jsFlowControl.py - does not currently exist
Assignment collectors
- cAssignmentCollector.py reads the C AST file and locates all variable assignments and their line numbers. This provides an input that can be used in various kinds of assignment analysis. It is currently only used in the RDA analysis. It can currently also implement two simple static evaluation functions:
- It can report the assignment of a literal to a variable
- It can detect the use of strcpy in a C program to set a character array to a literal
- Anything else it marks as an expression or a function call
- pyAssignmentCollector.py - does not currently exist
- jsAssignmentCollector.py - does not currently exist
Reaching Definitions
- RDA (Kill-Gen/Exit-Entry) implements a reaching definitions analysis for each variable in the program. It reads the NAME.c_vars.csv file for the program to identify all variable assignments, and it reads the NAME.c_rcfg.csv file to get the reverse control flow for the program. It generates the file NAME.c_rda.csv with the solutions for the line entry sets. It doesnt record the exit set solutions, but it does derive them.
- cRDAGroup.py sets up the RDA pipeline of cAssignmentCollector, cFlowControl, and the RDA.
- pyRDAGroup.py - does not currently exist
- jsRDAGoup.py - does not currently exist
Pipelines
- cSA.py sets up the call graph and RDA pipeline for C/C++ sources
- pySA.py sets up the call graph pipeline for Python sources
- jsSA.py sets up the call graph pipeline for JavaScript sources
- mlcg.py processes its argument list of files and folders, calling cSA, pySA, jsSA as necessary to product a combined multilingual call graph.
Permissions
- Persons/group who can view/change the page:
-- (c) Fordham University Robotics and Computer Vision
Topic revision: r4 - 2019-05-29
- LabTech