-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Calling validate in Guppy (which leads to read_hugr_envelope in Selene underneath which calls package.validate()) validates a Hugr which should be invalid.
In this particular case there was a bug in the Guppy compiler where a struct was passed to an op that takes an array as input (discard_all_borrowed should only take a borrow array as input, not a tuple):
So this test for example (where the above diagram snippet is from and which used the buggy code, full file attached below) passed fine (and the bug was only discovered later during execution):
def test_hugr_gen(validate):
@guppy
def main() -> None:
for x in array(1, 2, 3):
pass
validate(main.compile())
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working