-
Notifications
You must be signed in to change notification settings - Fork 4
feat: RefCell support #786
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
base: master
Are you sure you want to change the base?
Conversation
| // 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] |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
kmir/src/tests/integration/data/prove-rs/refcell.rs: mock the spl-token domain data access process which providesmainfunction to validate the semantics' concrete support for pack/unpackRefCell<&'a mut [u8]>;dual_account_demofunction to validate the symbolic support.struct_cast_fail.rsunsafe_cell_cast.rsrefcell.rs'smainfunction;refcell.rs'sdual_account_demofunction (which may need more cheatcode support)