runtimeverification/stable-mir-json

Graph Improvements: Mutability specifiers on locals

Open

#108 aperta il 23 nov 2025

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Rust (5 fork)auto 404
good first issue

Metriche repository

Star
 (10 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Currently there are no mutability specifiers on locals, often this means trying to figure out from context, or the json artifact, or the KMIR proof state what the mutability is. Sometimes this information is not close together and it takes time to track down.

^^^ Local 3 must have been mutable, since Local 5 has a mutable reference to it.

Much like rust, probably the best representation is omitting information if it is immutable, and adding mut prefixed if it is mutable.

So the example in the image above, it would be clearer if it printed in the LOCALS:

3 = mut std::array::IntoIter<i32, 1>

Guida contributor