-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update number of ports for PartialOps, and sanitize orderd edges (…
…#1635) The number of ports in a `PartialOp` dataflow node didn't get updated after connecting it. We didn't see any problem with this because by default the number of output ports is grown when connecting new outputs, so the count ended up being correct. #1625 found a bug where an `UnpackTuple` didn't connect its last output, so the serialization though the node had less output ports than it should have, and connected the order edge at an incorrect offset. As part of this change I added various checks for the order edge index. We use a special `-1` offset to identify them, so we should panic when that is seen on invalid places. - drive-by: Add a `Hugr::has_link` method - drive-by: Avoid adding duplicated order edges Closes #1625
- Loading branch information
Showing
4 changed files
with
76 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters