Infer extension-deltas for FuncDefn's
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 71
- Forks
- 18
- Avg merge
- 22h 26m
- Merged PRs (30d)
- 34
Description
We need to decide whether this is really worth it, i.e. is it too painful (and not enough of a good thing anyway) to require FuncDefn authors to declare what extensions they use. But there is at least some utility in that it's optional anyway.
This could be done with the same interface to that for DFGs/CFGs/etc. (using TO_BE_INFERRED: ExtensionId as per #1195), but the algorithm needs to be significantly more complicated:
- Build a (directed) call graph of functions, each node has a lower-bound ExtensionSet of the non-Call leaf ops
- Identify cycles - all functions on a cycle must have the same ExtensionSet, so "merge metas" (replace cycle with single node with lower-bound being the union)
- Solve the unknowns - each is just union over the successors (things it must contain)
This is very roughly what was in old https://github.com/CQCL/hugr/pull/1137
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining FuncDefn extension declarations and the interface proposed in #1195, then compare the approach with old pull request #1137. First establish whether optional inference is wanted; done means a decided design and an implementation that handles call graphs, cycles, and successor extension unions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100