miden-vm icon indicating copy to clipboard operation
miden-vm copied to clipboard

Implement error codes for the `mtree_verify` instructions.

Open Fumuran opened this issue 11 months ago • 3 comments

This PR implements the ability to specify error codes for mtree_verify instruction the same way it is done for assert instructions.

Related issue: #1264

Fumuran avatar Mar 06 '24 21:03 Fumuran

I noticed that for some reason we still use Felt as an error code for the U32assert2 operation (link), so I probably should create an issue to change it to the u32.

Fumuran avatar Mar 06 '24 21:03 Fumuran

We should put this on hold until #1277 is merged and then make this work with the new structure.

bobbinth avatar Mar 08 '24 20:03 bobbinth

@Overcastan I think you'll find it pretty easy to port this to #1277, if you look at how your implementation of u32clz, etc. was ported to the new structure, it's basically identical, though you'll probably want to reference the Assert non-terminal production in assembly/src/parser/grammar.lalrpop to see how to handle error code immediates specifically. Other than that, most everything else is relatively unchanged from the implementation in this PR.

bitwalker avatar Mar 09 '24 01:03 bitwalker

@Overcastan Are you still working on this?

plafer avatar Apr 29 '24 16:04 plafer

Now that #1277 has been merged, we should refresh this PR.

bobbinth avatar Apr 29 '24 18:04 bobbinth

@plafer Yep, I'll rework it to work with a new version of assembler.

Fumuran avatar Apr 29 '24 19:04 Fumuran

I decided to create a new PR for this issue, I think it will be easier than resolving conflicts in this one.

Fumuran avatar May 07 '24 21:05 Fumuran