runtimeverification/stable-mir-json

Graph Improvements: Mutability specifiers on locals

Open

#108 创建于 2025年11月23日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)Rust (5 fork)auto 404
good first issue

仓库指标

Star
 (10 star)
PR 合并指标
 (PR 指标待抓取)

描述

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>

贡献者指南