You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
static_input_port has multiple references in the code, where it gets used as a separate thing from other_input_port.
One would expect the same behaviour between input and output, so I consider this inconsistency a bug.
I'd propose changing the output_ports to mimic the input behaviour.
The text was updated successfully, but these errors were encountered:
Closes#777.
Now `OpTrait` clearly separates `other_port` from `static_port`, and
`OpType` has a uniform interface for `value` ports (from the signature),
`static` ports (contstants), and `other` ports.
Fixes#779. The bug was caused by the encoder ignoring the constant
input port offset, so the decoder reconnected the edge to the
`StateOrder` port instead. Now we use the proper OpType methods.
Fixes#778.
---------
Co-authored-by: Seyon Sivarajah <seyon.sivarajah@quantinuum.com>
The
Const
operation defines itsOpTrait::other_output
as theEdgeKind::Static
port with the const data.hugr/src/ops/constant.rs
Lines 108 to 110 in 968c8b0
This port is then exposed by
OpType::other_output_port
.On the other hand,
OpType::static_output_port
uses different logic to define the static output forConst
;hugr/src/ops.rs
Lines 196 to 201 in 968c8b0
This same situation happens with
FuncDecl
andFuncDef
.static_output_port
is rarely used, so we haven't seen problems yet, but it makes the logic inconsistent.If we compare the corresponding methods on the incoming side; we have
Call
andLoadConstant
with hard-coded static inputs:hugr/src/ops.rs
Lines 188 to 194 in 968c8b0
Both use
DataflowOpTrait
's defaultother_port
; aStateOrder
.hugr/src/ops/dataflow.rs
Lines 20 to 22 in 968c8b0
static_input_port
has multiple references in the code, where it gets used as a separate thing fromother_input_port
.One would expect the same behaviour between input and output, so I consider this inconsistency a bug.
I'd propose changing the
output_port
s to mimic the input behaviour.The text was updated successfully, but these errors were encountered: