Expand description
Rewrite operations on the HUGR - replacement, outlining, etc.
Re-exports§
pub use simple_replace::SimpleReplacement;
pub use simple_replace::SimpleReplacementError;
Modules§
- consts
- Rewrite operations involving Const and
LoadConst
operations - inline_
call - Rewrite to inline a Call to a
FuncDefn
by copying the body of the function into a DFG which replaces the Call node. - inline_
dfg - A rewrite that inlines a DFG node, moving all children of the DFG except Input+Output into the DFG’s parent, and deleting the DFG along with its Input + Output
- insert_
cut - Patch for inserting a sub-HUGR as a “cut” across existing edges.
- insert_
identity - Implementation of the
InsertIdentity
operation. - outline_
cfg - Rewrite for inserting a CFG-node into the hierarchy containing a subsection of an existing CFG
- peel_
loop - Rewrite to peel one iteration of a TailLoop, creating a DFG containing a copy of
the loop body, and a Conditional containing the original
TailLoop
node. - replace
- Implementation of the
Replace
operation. - simple_
replace - Implementation of the
SimpleReplace
operation.
Structs§
- Host
Port - A port in the host graph.
- Replacement
Port - A port in the replacement graph.
- Transactional
- Wraps any rewrite into a transaction (i.e. that has no effect upon failure)
Enums§
- Boundary
Port - A port in either the host or replacement graph.
Traits§
- Patch
- A patch that can be applied to a mutable Hugr of type
H
. - Patch
Hugr Mut - A patch that can be applied to any
HugrMut
. - Patch
Verification - Verify that a patch application would succeed.