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

Linking #882

Open
Tracked by #814
ss2165 opened this issue Mar 15, 2024 · 0 comments
Open
Tracked by #814

Linking #882

ss2165 opened this issue Mar 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ss2165
Copy link
Member

ss2165 commented Mar 15, 2024

Roughly, this means combining two Hugrs into a single Hugr, and in the process replacing static edges from FuncDecls in each with edges from corresponding FuncDefns in the other Hugr. Note this may be done via hugr-model (@zrho link?). There are a number of questions still to be resolved....

  • Do both input Hugrs have to have a module root? or can one be a non-module (the children of the module can be transferred into any non-module, but potentially "one way" i.e. the Module cannot refer to FuncDefns in the non-module). I don't see how both can be non-module...
  • (How does the linker identify) which FuncDecls correspond to which FuncDefns?
    • We may wish to consider the ability to pass extra command-line flags to the linker to change this behaviour e.g. aliasing, extra directives, ....
    • The ability to rename functions could be useful to avoid conflicts, too
  • which FuncDefns/FuncDecls does it consider - all? or only children of the (Module?) root(s)?

One answer to both of the "which" questions might be metadata. Or, function name - if we consider only FuncDefns that are immediate children of the (Module) root, we can require these to be unique.

  • Does it make sense to link a Hugr against itself? There are some interpretations where this makes no sense (e.g. if we only consider FuncDecls+Defns that are immediate children of the root, and require them all to have different names), but others where it might (e.g. if we consider FuncDecls further down the tree, we might link these with FuncDefns just beneath the root)
@ss2165 ss2165 added enhancement New feature or request breaking-change Changes that break semver and removed breaking-change Changes that break semver labels Mar 15, 2024
@acl-cqc acl-cqc mentioned this issue Apr 15, 2024
@zrho zrho self-assigned this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants