Skip to content
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

Open
14 of 22 tasks
croyzor opened this issue Aug 21, 2023 · 1 comment
Open
14 of 22 tasks

Tracking issue for extension requirement inference #426

croyzor opened this issue Aug 21, 2023 · 1 comment
Assignees
Labels
tracking-issue An issue tracking progress on multiple sub-tasks.

Comments

@croyzor
Copy link
Contributor

croyzor commented Aug 21, 2023


Completed steps ---- (of new plan following Re^n-super-redux proposed by Lukas:


Below 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:

@croyzor croyzor added the tracking-issue An issue tracking progress on multiple sub-tasks. label Aug 21, 2023
@ss2165 ss2165 pinned this issue Aug 22, 2023
@ss2165 ss2165 unpinned this issue Aug 22, 2023
@ss2165 ss2165 pinned this issue Aug 22, 2023
@croyzor croyzor self-assigned this Aug 24, 2023
@acl-cqc
Copy link
Contributor

acl-cqc commented Oct 25, 2023

A few suggestions...[EDIT: all these now redundant following the "Reredux" on confluence and "Redux plan" above]

  • Can we make lift nodes, and Plus constraints, take an ExtensionSet rather than a single Extension?
  • ....and then, can we make Lift nodes not specify the ExtensionSet, and get inference to figure it out?

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. (Node,Direction)) for each Meta (in report_mismatch) isn't terribly helpful.

Can we allow a non-mutating infer_and_validate that calls validate_with_extension_closure passing the union of the solution and closure? (These have disjoint keys, right)

  • Rename gen_union_constraint to gen_plus_constraint, or rename Constraint::Plus to Constraint::Union

@ss2165 ss2165 modified the milestone: v0.1.0 Jan 4, 2024
@acl-cqc acl-cqc self-assigned this Jun 14, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 10, 2024
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracking-issue An issue tracking progress on multiple sub-tasks.
Projects
None yet
Development

No branches or pull requests

3 participants