Skip to content

Conversation

@Stevengre
Copy link
Contributor

@Stevengre Stevengre commented Oct 30, 2025

  • new tests:
    • kmir/src/tests/integration/data/prove-rs/refcell.rs: mock the spl-token domain data access process which provides
      • main function to validate the semantics' concrete support for pack/unpack RefCell<&'a mut [u8]>;
      • dual_account_demo function to validate the symbolic support.
    • struct_cast_fail.rs‎
    • unsafe_cell_cast.rs‎
  • todos:
    • reach end for refcell.rs's main function;
    • reach end for refcell.rs's dual_account_demo function (which may need more cheatcode support)

@Stevengre Stevengre self-assigned this Oct 30, 2025
Comment on lines -103 to -107
// Extract field offsets from the struct layout when available (Arbitrary only).
syntax MachineSizes ::= #structOffsets ( MaybeLayoutShape ) [function, total]
rule #structOffsets(someLayoutShape(layoutShape(fieldsShapeArbitrary(mk(OFFSETS)), _, _, _, _))) => OFFSETS
rule #structOffsets(noLayoutShape) => .MachineSizes
rule #structOffsets(_) => .MachineSizes [owise]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to types.md

rule #projectionsFor(CtxPointerOffset( _, OFFSET, ORIGIN_LENGTH) CTXS, PROJS) => #projectionsFor(CTXS, PointerOffset(OFFSET, ORIGIN_LENGTH) PROJS)
// Borrowing a zero-sized local that is still `NewLocal`: materialise a dummy ZST value so projection traversal succeeds without reading uninitialised data.
rule <k> rvalueRef(_REGION, KIND, place(local(I), PROJS))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

use reference-zero-sized.rs to test this rule

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a internal step for refcell

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