-
Notifications
You must be signed in to change notification settings - Fork 62
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
Implement mir_load_module
#1863
Conversation
doc/manual/manual.md
Outdated
* `CRUX_RUST_LIBRARY_PATH` should point to the the MIR files for the Rust | ||
standard library. TODO RGS: Describe how to produce this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name "CRUX_RUST_LIBRARY_PATH
" is somewhat unfortunate here, as SAW is a completely separate tool from Crux. This needn't be a blocker for this patch, but we should consider renaming CRUX_RUST_LIBRARY_PATH
to something else going forward. I have opened GaloisInc/mir-json#43 to track this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GaloisInc/mir-json#46 introduces SAW_RUST_LIBRARY_PATH
as an alias for CRUX_RUST_LIBRARY_PATH
, and I've updated the SAW manual to reference the former. The explanation for how to know where to point SAW_RUST_LIBRARY_PATH
is still somewhat unsatisfactory, but I think may need to include a copy of the MIR-ified Rust standard library in SAW bindists before we can provide better documentation. I've added a reminder to do this as a checkbox in #1859.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really know the saw-script codebase, but this seems reasonable to me. The actual mir_load_module
implementation looks good.
fbc988a
to
6583923
Compare
This implements an experimental `mir_load_module` command, the first SAW command dedicated to MIR (Rust) code. I have added a basic test case to kick the tires and ensure that everything works as you would expect. You can't do much with the resulting MIR module yet (besides printing it in the SAW REPL), but more functionality for verifying the MIR code will come in future patches. Note that in order to produce a MIR JSON file suitable for SAW's needs, you must build your Rust code with one of the two `mir-json` tools added in GaloisInc/mir-json#41. This checks off one box in #1859.
6583923
to
7bb990f
Compare
This implements an experimental
mir_load_module
command, the first SAW command dedicated to MIR (Rust) code. I have added a basic test case to kick the tires and ensure that everything works as you would expect. You can't do much with the resulting MIR module yet (besides printing it in the SAW REPL), but more functionality for verifying the MIR code will come in future patches.Note that in order to produce a MIR JSON file suitable for SAW's needs, you must build your Rust code with one of the two
mir-json
tools added in GaloisInc/mir-json#41.This checks off one box in #1859.