When the designated function used to call another program of another language, such as “PyRun_SimpleFile” , JSContext().eval() or $.ajax(), is found, its argument (name of the Python or JavaScript file) is considered a function call and the executable portion of that file is represented as the main function in the original program. That creates the connection between the two files, which allows the subsequent programs to build the call graph.
“mergeFunCall.py” combines all individual csv files from the list of source files into one. This file is then used as input to “generateDot.py”. This program translates the csv file to a dot file, which represents the csv file as a graph. The Dot program builds the final graph via GraphViz and saves it as a PDF file. Circular nodes represent C programs, rectangular nodes represent Python programs, and hexagonal nodes represent JavaScript programs. Recursive functions are denoted by dashed nodes. Errors, such as circularity in a system or unidentifiable interoperability, are denoted by double-lined dashed nodes.
Figure 4: Example of a multilingual call graphI | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
jpeg | C_AST.jpeg | r1 | manage | 35.9 K | 2016-07-27 - 14:46 | DamianLyons | |
png | Call_Graph_diagram.png | r1 | manage | 41.1 K | 2017-04-11 - 15:28 | MaggieGates | |
png | MLSA_logo.png | r1 | manage | 38.5 K | 2017-07-12 - 19:25 | AnneMarieBogar | |
png | Static_Analysis_diagram.png | r1 | manage | 85.7 K | 2019-05-29 - 16:19 | LabTech | |
png | Static_Analysis_diagram2.png | r1 | manage | 85.7 K | 2019-05-29 - 16:24 | LabTech | |
png | jsJSON.png | r1 | manage | 25.7 K | 2017-04-07 - 19:27 | DamianLyons | javascript AST |
png | pythonJSON.png | r1 | manage | 21.0 K | 2017-04-07 - 19:25 | DamianLyons | python AST |
png | test6_callgraph.png | r1 | manage | 430.2 K | 2017-07-11 - 20:45 | AnneMarieBogar |