The replication package contains:
- Scripts for generating call-based dependency networks
- Scraper for mining toolchain & build status on Docs.rs
- Analysis scripts for producing results of the paper
- Links to datasets
Generating CDNs using rust-callgraphs constructed call graphs
There are two options for generating a CDN:
- Static CDN: a one-time generation that uses the resolved dependency versions available in the call graphs.
- Dynamic CDN: on-the-fly generation based on user-provided timestamps. Constructs API-mappings based on entry and exit points of packages.
# Annontate and prune (i.e., remove std calls) call graphs
./ufify/run.sh
# Create a CDN and PDN
./gen/run.sh
./api-pair-extract/run.sh
- Rust toolchain
- Python 3
- pandas
- numpy
- networkx
Python bindings to Rust's semver library
- Generate an FFI-compatible C-ABI library in Rust
cd bindings
cargo build --release
- Replace lookup path to the library
After compilation, a generated library (libsemver_ffi.so
) should be available under the target
folder:
target/release/libsemver_ffi.so
Replace the path in evolysis-rustcg.py to match your absolute path.
Running the evolysis-rustcg.py will automatically create 3 PDNs (index, docs.rs, RustPräzi) and 1 CDN (RustPräzi).
After generation, you can run analysis such as num_of_dependency_fns(praezi_fn_closure, "praezi")
and result will be dumped to out/
folder.
python3 -i analysis/evolysis-rustcg.py <timestamp>
Example
python3 -i analysis/evolysis-rustcg.py 2015-08
The Jupyter Notebook CDN Analysis.ipynb provide examples of how to load a CDN and perform descriptive statistics
The call graph corpus and a statically generated CDN is available at Zenodo for download.