Skip to content

refactor: change memory-effects theorem to a quantifier-free statement#224

Merged
shigoel merged 17 commits intomainfrom
memory-effects-proof-as-mem-equals
Oct 16, 2024
Merged

refactor: change memory-effects theorem to a quantifier-free statement#224
shigoel merged 17 commits intomainfrom
memory-effects-proof-as-mem-equals

Conversation

@alexkeizer
Copy link
Copy Markdown
Collaborator

@alexkeizer alexkeizer commented Oct 7, 2024

Description:

Changes the memory effect proof to be of type <currentState>.mem = <trace of memory writes>.mem, instead of the quantified statement that the result of reading from memory at any bytes and any address of either state agrees.

  • To keep aggregation working with the new statement, we had to add memory_rules to the simpsets that are used by sym_n.
  • This meant we had to enhance memory_rules to do, e.g., read-over-write reasoning, and
  • We had to change the s[base, n] notation to desugar into s.mem.read_bytes ..

Testing:

What tests have been run? Did make all succeed for your changes? Was
conformance testing successful on an Aarch64 machine?

Yes

License:

By submitting this pull request, I confirm that my contribution is
made under the terms of the Apache 2.0 license.

@alexkeizer alexkeizer force-pushed the extract-memory-effects branch from 077b5da to 6295e15 Compare October 8, 2024 20:01
Base automatically changed from extract-memory-effects to main October 10, 2024 15:14
@alexkeizer alexkeizer force-pushed the memory-effects-proof-as-mem-equals branch from 072cea4 to 355d210 Compare October 11, 2024 19:09
@alexkeizer alexkeizer force-pushed the memory-effects-proof-as-mem-equals branch from f428b84 to a221670 Compare October 11, 2024 22:36
@alexkeizer alexkeizer changed the title WIP: refactor: change memory-effects theorem to a quantifier-free statement refactor: change memory-effects theorem to a quantifier-free statement Oct 14, 2024
@alexkeizer alexkeizer marked this pull request as ready for review October 14, 2024 19:13
@alexkeizer alexkeizer requested a review from shigoel as a code owner October 14, 2024 19:13
@alexkeizer
Copy link
Copy Markdown
Collaborator Author

alexkeizer commented Oct 14, 2024

@bollu I touched some memory lemmas here, care to review?

@alexkeizer
Copy link
Copy Markdown
Collaborator Author

All errors introduced by the merge of main should now be fixed

Comment thread Arm/Memory/MemoryProofs.lean
Comment thread Proofs/AES-GCM/GCMGmultV8Sym.lean
Comment thread Tactics/Aggregate.lean
bollu
bollu previously approved these changes Oct 15, 2024
Copy link
Copy Markdown
Collaborator

@bollu bollu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread Proofs/AES-GCM/GCMGmultV8Sym.lean Outdated
Co-authored-by: Siddharth <siddu.druid@gmail.com>
Comment thread Arm/Syntax.lean
Comment thread Proofs/AES-GCM/GCMGmultV8Sym.lean
@shigoel
Copy link
Copy Markdown
Collaborator

shigoel commented Oct 15, 2024

@alexkeizer LGTM, modulo one comment above.

@shigoel shigoel merged commit a47a266 into main Oct 16, 2024
@shigoel shigoel deleted the memory-effects-proof-as-mem-equals branch October 16, 2024 22:50
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

Successfully merging this pull request may close these issues.

3 participants