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

Interesting properties to prove #219

Open
3 of 10 tasks
hjorthjort opened this issue Sep 24, 2019 · 0 comments
Open
3 of 10 tasks

Interesting properties to prove #219

hjorthjort opened this issue Sep 24, 2019 · 0 comments

Comments

@hjorthjort
Copy link
Contributor

hjorthjort commented Sep 24, 2019

  • (local.get I:Int) (local.set I:Int) is ust identity (no effect)
  • (ITYPE.store (i32.const ADDR) (ITYPE.load (i32.const ADDR))) is just identity (no effect)
  • A loop invariant: 1+2+...+n = n(n+1)/2
  • Soundness of KWasm: Memory byte arrays maintain their invariants
    • Keys-in-range property: All keys K in the map maintain 0 <= K < SIZE * 65536
      • No instruction can store to out of bounds (< 0 or >= SIZE * 65536)
      • No instruction can load from out of bounds
      • Putting them together with an induction proof: an empty memory has keys-in-range, and no statement can cause it to be violated, so it always holds. May require modelling host calls.
    • Values-in-range property: No instruction can modify the memory so that the value in a slot is <1 or > 255
    • Induction proof: an empty memory is valid, and no statement can cause a memory to become invalid, so the semantics never violate the invariant.

Feel free to add more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant