aeneas icon indicating copy to clipboard operation
aeneas copied to clipboard

Improve the extraction of code manipulating arrays/slices

Open sonmarcho opened this issue 11 months ago • 2 comments

When extracting Rust code of the following shape:

a[i] = x + y;

We get:

let (_, index_mut_back) ← Array.index_mut_usize a i
let tmp ← x + y
let a1 := index_mut_back tmp

We want to get:

let tmp ← x + y
let a1 ← update a i tmp

We can easily do so through a micro-pass (there already exists one for array/slice indexing functions: we simply need to improve it).

sonmarcho avatar Dec 03 '24 10:12 sonmarcho

Similar to https://github.com/AeneasVerif/aeneas/issues/188

R1kM avatar Dec 03 '24 10:12 R1kM

Ah indeed. But I'm closing this other issue because I took care of it in a recent PR. I basically need to generalize the micro-pass I implemented for it.

sonmarcho avatar Dec 03 '24 13:12 sonmarcho