vakaras / flowistry

Home Page:https://willcrichton.net/demos/slicer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flowistry

ci

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:

Backward slicing

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:

Screen Shot 2021-03-22 at 2 00 43 PM

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.

Forward slicing

TODO

Installation

Currently, Rust Slicer only supports installation from source.

From source

git clone https://github.com/willcrichton/flowistry
cd flowistry
cargo install --path .
cd ide
npm run vscode:prepublish
ln -s $(pwd) ~/.vscode/extensions/flowistry

Usage

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.

About

https://willcrichton.net/demos/slicer/


Languages

Language:Rust 95.2%Language:TypeScript 4.8%