Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prusti 2.0: Coupling Graph #1449

Draft
wants to merge 66 commits into
base: master
Choose a base branch
from
Draft

Prusti 2.0: Coupling Graph #1449

wants to merge 66 commits into from

Conversation

JonasAlaif
Copy link
Contributor

@JonasAlaif JonasAlaif commented Aug 22, 2023

To test either the Free PCS or the Coupling Graph implementation, check out this branch and then use the following commands:

To try the FreePCS (owned stuff only) using the following command:

./x.py run --bin prusti-rustc -- --edition=2021 -Z dump_mir_dataflow -Ptest_free_pcs=true ./path/to/rust/file.rs

and make sure to put the following in the .rs file:

#![feature(core_intrinsics, rustc_attrs)] // At the top of the file

#[rustc_mir(borrowck_graphviz_postflow="log/analysis/foo/foo.dot")] // Above any fn you want to dump info on
fn foo( ... ) { ... }

Which will create a log/analysis/foo/free_pcs_foo.dot file (along with others from the compiler analyses)

To try out the Coupling Graph (borrows only), use the following:

./x.py run --bin prusti-rustc -- --edition=2021 -Z dump_mir_dataflow -Ptest_coupling_graph=true ./path/to/rust/file.rs

Which will dump the graphs under log/coupling (a combined .dot with all the graphs lives under log/coupling/all.dot). While looking at those, it can be useful to open e.g. log/analysis/foo/borrows_foo.dot in parallel to inspect the CFG.

TODO:

  • Integrate with Free PCS
  • Add comments to current implementation

@Aurel300 Aurel300 changed the title Prusti 2.0: Couplig Graph Prusti 2.0: Coupling Graph Aug 24, 2023
@JonasAlaif JonasAlaif force-pushed the coupling-graph-engine branch 2 times, most recently from 050bdb2 to c714230 Compare October 11, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant