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

[iv1.7, ivy1.8] collections.ivy array.append unsoundness bug #81

Open
plredmond opened this issue Nov 14, 2024 · 0 comments
Open

[iv1.7, ivy1.8] collections.ivy array.append unsoundness bug #81

plredmond opened this issue Nov 14, 2024 · 0 comments

Comments

@plredmond
Copy link

plredmond commented Nov 14, 2024

Summary

Appending to an array whose domain is already exhausted should be an error, however it results in unsoundness (assert false; passes).

Steps to reproduce

Put the following in a file oops.ivy.

#lang ivy1.8

include collections

instance domain_t : iterable
type range_t
instance array_t : array(domain_t, range_t)

action oops = {
    var a: array_t;
    a := array_t.create(domain_t.max, 0);
    a := a.append(0);
    assert false;
}

export oops

Check the file with the following command.

$ ivy_check trace=true oops.ivy
  • Expected: Line 12 assert false; should fail.
  • Actual: Whole file passes.

Removing line 11 a := a.append(0); fixes the issue (line 12 assert false; fails).

Present in versions

On kenmcmil/ivy@dbe45e7 on macOS Sonoma.


Found by @nano-o.

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

No branches or pull requests

1 participant