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

feat!: Flatten LeafOp #922

Merged
merged 9 commits into from
Apr 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion specification/hugr.md
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,6 @@ including `Module`.
| `LoadConstant` | 0, 1 | +, ✱ | 1, 0 | 0, 0 | 0, 0 | 1, 0 | |
| `Input` | 0, ✱ | 0, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, 0 | |
| `Output` | ✱, 0 | ✱, 0 | 0, 0 | 0, 0 | 0, 0 | 1, 0 | |
| `LeafOp` | ✱, ✱ | ✱, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, 0 | |
| `Call` | ✱, ✱ | ✱, ✱ | 0, 0 | 1, 0 | 0, 0 | 1, 0 | |
| `DFG` | ✱, ✱ | ✱, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, + | DSG |
| `CFG` | ✱, ✱ | ✱, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, + | CSG |
Expand All @@ -2007,6 +2006,12 @@ including `Module`.
| `TailLoop` | ✱, ✱ | ✱, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, + | DSG |
| `Conditional` | ✱, ✱ | ✱, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, + | `Case` |
| `Case` | 0, 0 | 0, 0 | 0, 0 | 0, 0 | 0, 0 | 1, + | DSG |
| `CustomOp` | ✱, ✱ | ✱, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, 0 | |
| `Noop` | 1, 1 | ✱, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, 0 | |
| `MakeTuple` | ✱, 1 | ✱, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, 0 | |
| `UnpackTuple` | 1, ✱ | ✱, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, 0 | |
| `Tag` | 1, 1 | ✱, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, 0 | |
| `Lift` | ✱, ✱ | ✱, ✱ | 0, 0 | 0, 0 | 0, 0 | 1, 0 | |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatetd the whole table:

| Node type      | `Value` | `Order` | `Const` | `Function` | `ControlFlow` | `Hierarchy` | Children |
|----------------|---------|---------|---------|------------|---------------|-------------|----------|
| Root           | 0, 0    | 0, 0    | 0, 0    | 0, 0       | 0, 0          | 0, ✱        |          |
| `FuncDefn`     | 0, 0    | 0, 0    | 0, 0    | 0, *       | 0, 0          | 1, +        | DSG      |
| `FuncDecl`     | 0, 0    | 0, 0    | 0, 0    | 0, *       | 0, 0          | 1, 0        |          |
| `AliasDefn`    | 0, 0    | 0, 0    | 0, 0    | 0, 0       | 0, 0          | 1, 0        |          |
| `AliasDecl`    | 0, 0    | 0, 0    | 0, 0    | 0, 0       | 0, 0          | 1, 0        |          |
| `Const`        | 0, 0    | 0, 0    | 0, ✱    | 0, 0       | 0, 0          | 1, 0        |          |
| `LoadConstant` | 0, 1    | +, ✱    | 1, 0    | 0, 0       | 0, 0          | 1, 0        |          |
| `Input`        | 0, ✱    | 0, ✱    | 0, 0    | 0, 0       | 0, 0          | 1, 0        |          |
| `Output`       | ✱, 0    | ✱, 0    | 0, 0    | 0, 0       | 0, 0          | 1, 0        |          |
| `Call`         | ✱, ✱    | ✱, ✱    | 0, 0    | 1, 0       | 0, 0          | 1, 0        |          |
| `DFG`          | ✱, ✱    | ✱, ✱    | 0, 0    | 0, 0       | 0, 0          | 1, +        | DSG      |
| `CFG`          | ✱, ✱    | ✱, ✱    | 0, 0    | 0, 0       | 0, 0          | 1, +        | CSG      |
| `DFB`          | 0, 0    | 0, 0    | 0, 0    | 0, 0       | ✱, ✱          | 1, +        | DSG      |
| `Exit`         | 0, 0    | 0, 0    | 0, 0    | 0, 0       | +, 0          | 1, 0        |          |
| `TailLoop`     | ✱, ✱    | ✱, ✱    | 0, 0    | 0, 0       | 0, 0          | 1, +        | DSG      |
| `Conditional`  | ✱, ✱    | ✱, ✱    | 0, 0    | 0, 0       | 0, 0          | 1, +        | `Case`   |
| `Case`         | 0, 0    | 0, 0    | 0, 0    | 0, 0       | 0, 0          | 1, +        | DSG      |
| `CustomOp`     | ✱, ✱    | ✱, ✱    | 0, 0    | 0, 0       | 0, 0          | 1, 0        |          |
| `Noop`         | 1, 1    | ✱, ✱    | 0, 0    | 0, 0       | 0, 0          | 1, 0        |          |
| `MakeTuple`    | ✱, 1    | ✱, ✱    | 0, 0    | 0, 0       | 0, 0          | 1, 0        |          |
| `UnpackTuple`  | 1, ✱    | ✱, ✱    | 0, 0    | 0, 0       | 0, 0          | 1, 0        |          |
| `Tag`          | 1, 1    | ✱, ✱    | 0, 0    | 0, 0       | 0, 0          | 1, 0        |          |
| `Lift`         | ✱, ✱    | ✱, ✱    | 0, 0    | 0, 0       | 0, 0          | 1, 0        |          |

http://markdowntable.com/


### Appendix 3: Binary `compute_signature`

Expand Down