A number of metadata keys are currently being used ad-hoc. Some are mentioned in the main spec document. We should instead have a structured document that lists the namespaces, keys, value types and meaning.
We also have metadata that can be attached to nodes but also metadata that can be attached to the contents of extension definitions.
Further, the way the model uses metadata is slightly different to how the core uses it.
Already used (what's missing)?:
General
core.generator for recording structured HUGR generator names and versions
core.used_extensions for names and versions of used extensions in HUGR
Model
core.meta.description for descriptions
core.order_hint prefix for recording order edges (is this actually metadata, it does not say meta, is this part of stable model spec instead?)
compat.meta_json to string encode existing metadata (like those in the General section above)
Proposed
A number of metadata keys are currently being used ad-hoc. Some are mentioned in the main spec document. We should instead have a structured document that lists the namespaces, keys, value types and meaning.
We also have metadata that can be attached to nodes but also metadata that can be attached to the contents of extension definitions.
Further, the way the model uses metadata is slightly different to how the core uses it.
Already used (what's missing)?:
General
core.generatorfor recording structured HUGR generator names and versionscore.used_extensionsfor names and versions of used extensions in HUGRModel
core.meta.descriptionfor descriptionscore.order_hintprefix for recording order edges (is this actually metadata, it does not saymeta, is this part of stable model spec instead?)compat.meta_jsonto string encode existing metadata (like those in the General section above)Proposed
core.hintprefix for adding compiler hints Compiler hints/annotations #2328 Global pass for DFG inlining #2372core.side_effectfor marking impure OpDefscore.passes.<pass name>prefix for targeting specific passes