Skip to content
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

[DRAFT] Zero-sized arrays imply the default, empty array, and vica versa #665

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

msooseth
Copy link
Collaborator

@msooseth msooseth commented Feb 17, 2025

Description

This fixes the bug as reported in #664 The empty array is kinda special, actually. It implies zero length and zero length also implies the empty array. This was actually not the case before for empty arrays.

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

@msooseth msooseth force-pushed the new-bug-maybe branch 2 times, most recently from 985751a to ca74975 Compare February 17, 2025 18:31
@msooseth msooseth changed the title [DRAFT no review] Triage & fix the bug #664 Zero-sized arrays imply the default, empty array, and vica versa Feb 17, 2025
@msooseth msooseth marked this pull request as ready for review February 17, 2025 18:37
@msooseth
Copy link
Collaborator Author

@blishko what do you think of this? I think we need it, as per #664 It's a kind of a small change, but it also requires some thought. Let me know what you think.

@blishko
Copy link
Collaborator

blishko commented Feb 18, 2025

I don't think this is entirely correct. Maybe we can have a short call to discuss this?
But at least the second implication seems suspicious to me. I can have a non-empty buffer where all values are zero, no?
Then it would be represented in SMT as ((as const Buf) #b00000000) but the length would be non-empty.

@msooseth
Copy link
Collaborator Author

Yes, you are right. It's a bit unclear to me, too, hence me asking your advice :) It also depends on SMT semantics. And this as const is not even defined right now :S Call would be good actually. Let me think about this a bit more then I'll ask you for a timeslot :) Thanks so much!

@msooseth msooseth changed the title Zero-sized arrays imply the default, empty array, and vica versa [DRAFT] Zero-sized arrays imply the default, empty array, and vica versa Feb 18, 2025
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