diff --git a/specification/hugr.md b/specification/hugr.md index 5fd65cd3b..fc5f6f65b 100644 --- a/specification/hugr.md +++ b/specification/hugr.md @@ -267,19 +267,13 @@ the following basic dataflow operations are available (in addition to the - `Input/Output`: input/output nodes, the outputs of `Input` node are the inputs to the function, and the inputs to `Output` are the - outputs of the function. In a data dependency subgraph, a valid - ordering of operations can be achieved by topologically sorting the - nodes starting from `Input` with respect to the Value and Order - edges. + outputs of the function. - `Call`: Call a statically defined function. There is an incoming `Static` edge to specify the graph being called. The signature of the node (defined by its incoming and outgoing `Value` edges) matches the function being called. - `LoadConstant`: has an incoming `Static` edge, where `T` is a `CopyableType`, and a `Value` output, used to load a static constant into the local - dataflow graph. They also have an incoming `Order` edge connecting - them to the `Input` node, as should all operations that - take no dataflow input, to ensure they lie in the causal cone of the - `Input` node when traversing. + dataflow graph. - `identity`: pass-through, no operation is performed. - `DFG`: A nested dataflow graph. These nodes are parents in the hierarchy. @@ -515,10 +509,11 @@ graph: cycles. The common parent is a CFG-node. **Dataflow Sibling Graph (DSG)**: nodes are operations, `CFG`, -`Conditional`, `TailLoop` and `DFG` nodes; edges are `Value`, `Order` and `Static`; -and must be acyclic. There is a unique Input node and Output node. All nodes must be -reachable from the Input node, and must reach the Output node. The common parent -may be a `FuncDefn`, `TailLoop`, `DFG`, `Case` or `DFB` node. +`Conditional`, `TailLoop` and `DFG` nodes; edges are `Value`, `Order` and `Static`, and must be acyclic. +(Thus a valid ordering of operations can be achieved by topologically sorting the +nodes.) +There is a unique Input node and Output node. +The common parent may be a `FuncDefn`, `TailLoop`, `DFG`, `Case` or `DFB` node. | **Edge Kind** | **Locality** | | -------------- | ------------ | @@ -1355,8 +1350,7 @@ remove it. (If there is an non-local edge from `n0` to a descendent of Given a `Const` node `c`, and optionally `P`, a parent of a DSG, add a new `LoadConstant` node `n` as a child of `P` with a `Static` edge -from `c` to `n` and no outgoing edges from `n`. Also add an Order edge -from the Input node under `P` to `n`. Return the ID of `n`. If `P` is +from `c` to `n` and no outgoing edges from `n`. Return the ID of `n`. If `P` is omitted it defaults to the parent of `c` (in this case said `c` will have to be in a DSG or CSG rather than under the Module Root.) If `P` is provided, it must be a descendent of the parent of `c`. @@ -1364,7 +1358,7 @@ provided, it must be a descendent of the parent of `c`. ###### `RemoveConstIgnore` Given a `LoadConstant` node `n` that has no outgoing edges, remove -it (and its incoming value and Order edges) from the hugr. +it (and its incoming Static edge and any Order edges) from the hugr. ##### Insertion and removal of const nodes