Module hugr_core::extension

source ·
Expand description

Extensions

TODO: YAML declaration and parsing. This should be similar to a plugin system (outside the types module), which also parses nested OpDefs.

Re-exports§

  • pub use prelude::PRELUDE;
  • pub use prelude::PRELUDE;
  • pub use prelude::PRELUDE_REGISTRY;
  • pub use prelude::PRELUDE_REGISTRY;

Modules§

  • Declarative extension definitions.
  • Prelude extension - available in all contexts, defining common types, operations and constants.
  • A trait that enum for op definitions that gathers up some shared functionality.
  • Validation routines for instantiations of a extension ops and types in a Hugr.

Structs§

  • Encode a signature as PolyFuncType but optionally allow validating type arguments via a custom binary. The binary cannot be serialized so will be lost over a serialization round-trip.
  • A extension is a set of capabilities required to execute a graph.
  • Extension Registries store extensions to be looked up e.g. during validation.
  • A set of extensions identified by their unique ExtensionId.
  • A constant value provided by a extension. Must be an instance of a type available to the extension.
  • Type holding a boxed const-folding function.
  • Serializable definition for dynamically loaded operations.
  • A declaration of an opaque type. Note this does not provide any way to create instances

Enums§

Constants§

  • An Extension Registry containing no extensions.

Traits§

  • Trait implemented by extension operations that can perform constant folding.
  • Trait necessary for binary computations of OpDef signature
  • Compute signature of OpDef given type arguments.
  • Trait for validating type arguments to a PolyFuncType beyond conformation to declared type parameter (which should have been checked beforehand), given just the arguments.
  • Trait for validating type arguments to a PolyFuncType beyond conformation to declared type parameter (which should have been checked beforehand).

Type Aliases§

  • Output of constant folding an operation, None indicates folding was either not possible or unsuccessful. An empty vector indicates folding was successful and no values are output.
  • A unique identifier for a extension.
  • A mapping from nodes on the hugr to extension requirement sets which have been inferred for their inputs.