0xPolygonMiden / miden-vm

STARK-based virtual machine
MIT License
621 stars 158 forks source link

MaslLibrary should validate the code it compiles #1295

Closed hackaugusto closed 1 month ago

hackaugusto commented 6 months ago
#[test]
fn call_invalid_loc_store() {
    ModuleAst::parse(
        "\
    proc.invalid.1
        loc_store.1
    end
    ",
    )
    .unwrap();
}
hackaugusto commented 6 months ago

I split the above into multiple, smaller issues. Some of them may already be worked on, or even fixed on some of the existing PRs.

bitwalker commented 6 months ago

I wonder if this issue is going to remain relevant once we switch to distributing MAST instead (which I expect to happen shortly after 1277 is merged, as the next in that series of changes):

As part of that switch, the new package format would also be introduced and used in place of MASL libraries. As a result, I'm not sure MASL libraries will even need to exist at that point. So I suppose my question is: do we try to address these issues before that happens, or do we address them in the switch to MAST?

bobbinth commented 6 months ago

My preference would be to fix this as a part of transition to MAST-based libraries.

bobbinth commented 1 month ago

Closing this as libraries are now not just parsed but also compiled to MAST.