Handle reference types in mir_fresh_expanded_value
#1975
Labels
subsystem: crucible-mir
Issues related to Rust verification with crucible-mir and/or mir-json
type: enhancement
Issues describing an improvement to an existing feature or capability
Milestone
Currently, the
mir_fresh_expanded_value
command will fail if you give it a type that contains a reference type somewhere in it. This is annoying in situations where you have a large compound type that incidentally contains a reference somewhere in it, e.g.,It is conceivable that one would want to write a specification involving an
S
value that does not particularly care whatx100
looks like. For these situations, it would be helpful to usemir_fresh_expanded_value
to generate a reasonable default value for all ofS
's fields, includingx100
.Here, a reasonable default would be to make
x100
a fresh reference, i.e., a reference that is not required to point to allocated memory. This is close in spirit to the existingllvm_fresh_pointer
command, and in fact, we may want to export this functionality as a standalonemir_fresh_ref
command. Implementation-wise, we could likely create a fresh MIR reference by usingMirReference_Integer
:Namely, we could create a
MirReference_Integer
with a symbolic integer value. You wouldn't be able to do much with the resulting fresh reference (e.g., reading or writing to the reference would error), but for situations like the one above where you don't particularly care about the reference value, this would be fine.The text was updated successfully, but these errors were encountered: