Flowistry is an IDE extension that helps developers understand Rust programs. Flowistry uses dataflow analysis to analyze Rust programs at a deeper semantic level than just types can offer. Flowistry's capabilities are:
A backward slice identifies every piece of code that affects a value of interest. For example, this screenshot shows the slice of input
on line 14:
The value of buffer
affects the value of input
, so stdin.read_buffer(..)
and buffer.clear()
are highlighted. The variable count
does not affect the value of input
, so let mut count = 0
and count += 1
are not highlighted.
TODO
rustup toolchain install nightly -c rust-src,rustc-dev,llvm-tools-preview
cargo +nightly install flowistry
git clone https://github.com/willcrichton/flowistry
cd flowistry
cargo install --path .
cd ide
npm run vscode:prepublish
ln -s $(pwd) ~/.vscode/extensions/flowistry
Flowistry contains two components: a program analyzer, and a VSCode extension that bridges the analyzer to a code editor. To try slicing a program, open a Rust project in VSCode and go to a Rust file. Select an expression you want to slice, then press ⌘+⇧+P, type "Slice", and hit enter.