flowistry 0.3.0

Static analysis for program comprehension
docs.rs failed to build flowistry-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: flowistry-0.5.39

Flowistry

ci

Flowistry is a VSCode extension that helps developers understand Rust programs. Flowistry uses dataflow analysis and pointer analysis to analyze Rust programs at a deeper semantic level than just types can offer. Flowistry's capabilities are:

Backward slicing

A backward slice identifies every piece of code that affects a value of interest. For example, let's say you're debugging an assertion failure on x. Then you could compute the backward slice of x to rule out lines of code that don't influence its value, as shown here:

Screen Shot 2021-09-15 at 3 21 22 PM

Forward slicing

A forward slice identifiers every piece of code that is affected by a value of interest. For example, let's say you have a program that times a calculation, and you want to find all the code related to timing. You could compute a forward slice of the timer to rule out the actual calculation:

Screen Shot 2021-09-15 at 3 24 45 PM

Function effects

A function's effects are either inputs that it mutates, or values that it returns. The function effects panel helps identify lines of code that either mutate arguments or return values. Selecting an effect then shows the backward slice of that effect.

demo mp4

Installation

You can install Flowistry from the Visual Studio Marketplace. Alternatively, you can install it from source:

Flowistry server

From Cargo

# Install flowistry binaries
rustup toolchain install nightly -c rust-src,rustc-dev,llvm-tools-preview
git clone https://github.com/willcrichton/flowistry
cd flowistry
cargo +nightly install --path .

# Install vscode extension
cd ide
npm run install
npm run build
ln -s $(pwd) ~/.vscode/extensions/flowistry

Usage

TODO: explain flowistry keybindings