Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verifying invariant preservation in the type-checker #633

Open
3 of 4 tasks
clarus opened this issue Dec 4, 2024 · 0 comments
Open
3 of 4 tasks

Verifying invariant preservation in the type-checker #633

clarus opened this issue Dec 4, 2024 · 0 comments
Assignees
Labels

Comments

@clarus
Copy link
Collaborator

clarus commented Dec 4, 2024

The goal of this task is to verify that the main type-checker function, verify_instr in https://github.com/formal-land/coq-of-rust/blob/main/CoqOfRust/move_sui/simulations/move_bytecode_verifier/type_safety.v , preserves the invariants on its parameters. Note that this is not the same as verifying the type-checker, but a step towards it.

  • Define TypeSafetyChecker.Valid.t as a record with one field stack calling AbstractStack.Valid.t on the field of the same name.
  • State a verify_instr_is_valid lemma that essentially says that if the TypeSafetyChecker.t parameter given to the function is valid, then in case it does not panic then the resulting value of type TypeSafetyChecker.t is also valid.
  • Start the proof by doing a few cases. The proof should quickly start with a destruct to follow the match bytecode with of the code.
  • Verify the cases which work well. For the other cases, we will need to also make lemma foobar_is_valid for all the foobar functions that are called in other tasks.
@clarus clarus added the Move label Dec 4, 2024
@0xMushow 0xMushow self-assigned this Dec 6, 2024
@0xMushow 0xMushow linked a pull request Dec 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants