Skip to content

Slice fixes#172

Merged
Aurel300 merged 2 commits into
rewrite-2023from
fix/slices
May 5, 2026
Merged

Slice fixes#172
Aurel300 merged 2 commits into
rewrite-2023from
fix/slices

Conversation

@Aurel300
Copy link
Copy Markdown
Owner

@Aurel300 Aurel300 commented May 5, 2026

  • slice access should preserve slice length
  • mutslice should preserve slice contents
    • use the Ref part of the mutref snapshot instead of the "value" snapshot -- the latter is unconstrainted by p_Ref_mutable_arbitrary_value
    • some triggering issue remains

@Aurel300 Aurel300 marked this pull request as ready for review May 5, 2026 16:18
Comment on lines +356 to +362
// TODO: this is very hacky! we let-bind an array access to
// make sure the quantifier is triggered at least once
vcx.mk_let_expr(
vcx.mk_local_decl("_trigger_hack", elem_pure.snapshot),
src_array_pure.index(src_value, vcx.mk_int::<0>()),
vcx.mk_bool::<true>(),
),
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

At some point we should investigate what is happening here. I guess just triggering the quantifier from the postcondition doesn't make sense (it has a sane trigger I think?), maybe this is actually causing it to trigger the quantifier from the unsize postcondition?

@Aurel300 Aurel300 merged commit 29fff11 into rewrite-2023 May 5, 2026
5 of 7 checks passed
@Aurel300 Aurel300 deleted the fix/slices branch May 5, 2026 16: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.

1 participant