Skip to content

Conversation

RyanGlScott
Copy link
Contributor

@RyanGlScott RyanGlScott commented Sep 29, 2025

This contains the SAW-side changes needed to properly support const generics in the MIR backend, as detailed in
GaloisInc/mir-json#64. Specifically, this adds a mir_const : MIRType -> Term -> MIRType function that can be used to specify a constant used to instantiate a const generic parameter. The MIRType that this returns can then be passed to mir_find_adt to look up an instantiation of a const generic ADT. (See the new text in the SAW user manual for limitations of this approach.)

This bumps the mir-json submodule to bring in the changes from GaloisInc/mir-json#173, as well as the crucible submodule to bring in the changes from GaloisInc/crucible#1552. Because this requires a bump to the MIR JSON schema version, corresponding changes to the version number must also be made here.

@RyanGlScott RyanGlScott self-assigned this Sep 29, 2025
@RyanGlScott RyanGlScott added the subsystem: crucible-mir Issues related to Rust verification with crucible-mir and/or mir-json label Sep 29, 2025
@RyanGlScott RyanGlScott force-pushed the mir-json-T64-const-generics branch 3 times, most recently from 2977201 to 778e57d Compare October 2, 2025 20:06
Both `eval_int` and `default_typed_term` do the exact same form of Cryptol type
defaulting, so we can save ourselves some repetition by defining the former in
terms of the latter.

Refactoring only, no change in behavior.
This contains the SAW-side changes needed to properly support const generics in
the MIR backend, as detailed in
GaloisInc/mir-json#64. Specifically, this adds a
`mir_const : MIRType -> Term -> MIRType` function that can be used to specify a
constant used to instantiate a const generic parameter. The `MIRType` that this
returns can then be passed to `mir_find_adt` to look up an instantiation of a
const generic ADT. (See the new text in the SAW user manual for limitations of
this approach.)

This bumps the `mir-json` submodule to bring in the changes from
GaloisInc/mir-json#173, as well as the `crucible` submodule to bring in the
changes from GaloisInc/crucible#1552. Because this
requires a bump to the MIR JSON schema version, corresponding changes to the
version number must also be made here.
@RyanGlScott RyanGlScott force-pushed the mir-json-T64-const-generics branch from 778e57d to 5b73b06 Compare October 6, 2025 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subsystem: crucible-mir Issues related to Rust verification with crucible-mir and/or mir-json
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants