Skip to content

Implement mixed-size access in UM promising model#98

Open
febyeji wants to merge 1 commit intomainfrom
feature/mixed-size-um
Open

Implement mixed-size access in UM promising model#98
febyeji wants to merge 1 commit intomainfrom
feature/mixed-size-um

Conversation

@febyeji
Copy link
Copy Markdown
Collaborator

@febyeji febyeji commented Mar 30, 2026

Summary

  • Add mixed-size memory access support to the UM promising model
  • Msg.t is now a dependent record with val : bv (8 * size) so all messages live in one list
  • Exclusive monitor stores LDXR's addr/size; mismatch → non-deterministic per ARM ARM B2.12
  • VMPromising.v unchanged (keeps fixed 8-byte access)
  • bv_eq_dec_compute, bv_countable_compute, bv_finite_compute in CBitvector.v: vm_compute-friendly replacements for stdpp's opaque bv_eq_dec / bv_countable / bv_finite, whose bv_wf_pi (Qed) blocks reduction of equality proofs

@febyeji febyeji force-pushed the feature/mixed-size-um branch 3 times, most recently from 2ecafff to 34623fa Compare April 1, 2026 08:00
@febyeji febyeji marked this pull request as ready for review April 1, 2026 08:03
Copy link
Copy Markdown
Collaborator

@tperami tperami left a comment

Choose a reason for hiding this comment

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

This is good work! There are still some kinks to iron out both in the fiddly part of the mixed-semantics and in general organization, but I think this is close to being mergeable

- Msg.t: dependent record with `val : bv (8 * size)` so all messages share one list
- Multi-byte reads: single observation point per load
- Exclusive monitor: stores LDXR addr/size, mismatch is non-deterministic (ARM ARM B2.12)
- CBitvector: vm_compute-friendly bv_eq_dec/countable/finite replacing stdpp's opaque versions
- GenPromising: mEvent_eqb / remove_dups_by to bypass eq_dec blocking under vm_compute
@febyeji febyeji force-pushed the feature/mixed-size-um branch from 34623fa to 19bd9df Compare April 9, 2026 07:42
- [tr]: snapshot time
- [mv]: byte value from the snapshot
- [tw]: write timestamp from the snapshot *)
Definition read_fwd (macc : mem_acc) (fwdb : gmap address FwdItem.t)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Move this outside Memory module and split fwdbank and memory

End Memory.
Import (hints) Memory.

Module FwdItem.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It should be after Memory module. (It should patch the results from Memory itself.)

let resolved :=
map (λ '(a, (sv, tw)), read_fwd macc fwdb init mem t a sv tw)
(zip addrs snap) in
Some (bv_of_bytes (8 * size) (map (λ '(v, _, _), v) resolved),
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reduce the number of bitvector <-> list casting.

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.

2 participants