MIR backend: Properly support const generics #2662
Draft
+840
−266
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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. TheMIRType
that this returns can then be passed tomir_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 thecrucible
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.