-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue for extension requirement inference #426
Comments
A few suggestions...[EDIT: all these now redundant following the "Reredux" on confluence and "Redux plan" above]
Even that might be a lesser step than #423, but I'm wondering how easy that will be We might want to work on error reporting. Picking out a random (HashSet-iteration-order) location (i.e. Can we allow a non-mutating
|
…1738) Closes #1613. Depends on #1739. Hugrs now keep an `Extensions` registry that is automatically computed when using the builder or deserializing from json (using the new `Hugr::load_json`). This set can contain unneeded extensions, but it should always be sufficient to validate the HUGR definition. Note that this is **not** runtime extensions (see #426, #1734). A big chunk of the diff is removing the extension registry when finishing building a hugr. The extension tracking is now done automatically while adding operations. drive-by: Remove unneeded `set_num_ports` call in `insert_hugr_internal`. BREAKING CHANGE: Removed `update_validate`. The hugr extensions should be resolved at load time, so we can use `validate` instead. BREAKING CHANGE: The builder `finish_hugr` function family no longer takes a registry as parameter, and the `_prelude` variants have been removed.
extension_reqs
toruntime_reqs
#1734validate_no_extensions
when they don't want it. This may involve changing e.g.ValidationLevel
.validate()
andvalidate_no_extensions()
tovalidate(bool)
is a syntactic difference only but we can CONSIDER that too.Completed steps ---- (of new plan following Re^n-super-redux proposed by Lukas:
input_extensions
andNodeType
- this is refactor!: Remove NodeType and input_extensions #1183input_extensions
-based scheme because we don't have the "empty delta so inputs = outputs" escape hatch)dfg_builder
): in feat: Helper functions for requesting inference, use with builder in tests #1219 (DFGBuilder::new
takes a FunctionType so no need to update)conditional_builder
, (simple_
)block_builder
/entry_builder
- in fix!: Ops require their own extension #1226Below relates to the "Reredux" where we retain
input_extensions
but switch to only subset constraints between them (effectively, every edge gains a lift node, with the delta of the lift being inferred) - detailed in https://cqc.atlassian.net/wiki/spaces/~221321769/pages/2803236998/HUGR+Extension+Inference+reredux.Redux Plan:
At this point, the following issues can be dropped (and
Lift
nodes removed):And these should become easy:
At which point we hopefully should find the system is usable enough to turn inference back on (no more feature gate)
Then we should revisit
Finally, we hope this last step is an "optional extra" / improvement, rather than part of the MVP:
The text was updated successfully, but these errors were encountered: