make_tree.js and make_tree_interactive.py are tools to visualize the json output from commonAST and static analysis as trees.
node make_tree.js ./filename
This will output the tree in a .svg format. Make sure to include the
filename in order for node.js to read the file.
python make_tree_interactive.py filename
This will output the tree in a .html format. Unlike make_tree.js, the trees produced by this tool are collapsible.
node make_tree.js ./ex1a.json
Outputs an uninteractive .svg tree from the data of ex1a.json
python make_tree_interactive ex1a.json
Outputs an interactive .html tree from the data of ex1a.json
Additional Install Steps
make_tree.js requires the additional install of node.js in order to run. In order to install node.js on the VM, follow these steps:
sudo apt-get update
sudo apt-get install build-essential libssl-dev
- Install nvm with
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | sh
- Update session with
nvm ls-remoteto list the versions of node.js
- Install node.js with
nvm install version#with the most up-to-date version