Skip to content

feat(flow-symbols): sixteen more symbols, for the handshake ops that were boxes - #269

Merged
endrix merged 3 commits into
mainfrom
feat/flow-symbols-sixteen
Dec 2, 2026
Merged

endrix merged 3 commits into
mainfrom
feat/flow-symbols-sixteen

Conversation

@endrix

@endrix endrix commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Sixteen more flow symbols, for the ops of Dynamatic's handshake dialect that were still drawn as boxes. FlowSymbols.KINDS goes from 29 to 45. A product that names none of the new kinds draws as before.

The kinds

  • Decisions (choice family): first, priority and race are a rounded block with an italic F, P or R. A priority names its inputs hi and lo at the edge, beside their pins. The flags of a race, its last operands, end in a dot as a condition does. share is a mux over a branch, with the unit it serves on the side.
  • A pass that does one more thing (branch family): tap gives a second result out of its side (variant: 'at-valid' taps the base), stand-in takes what stops it on the side, stall is a die on the wire.
  • Storage: dead-buffer, a buffer crossed out, with an input and no output.
  • Channels (bundle family): no-ready and valid-merge.
  • Speculation, a new family spec: speculator, spec-save, spec-commit, spec-save-commit, spec-branch, spec-tag. A guess is a ring, a token that is not a guess is a dot. The family has its own colour, flow-spec in flow-symbols.css.

What a product sees

  • FlowDepiction.group is new, a number: the flags of a race and the operands of the unit a share serves. A share gets no spec without it, or when the counts do not fit (n operations of group operands give n × group + 1 operands and n + group results).
  • A symbol with several pins on its side spreads them along it, a pin pitch apart.
  • A race draws a dot on its last group inputs, and none when group is no count of its inputs.
  • A race with a spec is new. mlir-viewer used race in a test as its example of a kind that is not drawn, and endrix/mlir-viewer#84 changes that example. This PR is merged after it.

Changed after the drawings were approved

The review of this PR found two drawings that came out wrong for counts the approved sheet did not show. Both are fixed in b8e71a4, and both change a shape that was on the sheet.

  • Share. In a share of three or more operations the number of the last operation was drawn on the ring of the first pin of the unit, and in a share of five the end numbers crossed the outline. The body now has a straight band at either end, as wide as the body gets, and the numbers stand in it. The pins of the unit sit on the slopes between the bands. The outline of every share has those two bands now, the one of two operations on the sheet too, and a share whose unit takes two or more operands is a little longer.
  • Stand-in. With two or more signals that stop it, the triangle was stretched over all of them and each ended in a dot on the edge, so the last dot covered the tip and read as a dot on the output wire. The triangle is now a frame long however many signals there are. Several signals meet on a rail beside the body, and the rail ends in one dot. A stand-in with one signal is drawn as on the sheet.

Three smaller findings: a share of one operation with one operand is drawn, a race whose group is larger than its inputs draws no flag where it drew one on every input, and the doc of fits says that a share needs more than its counts.

Checks

  • npm run typecheck (5 of 5 packages, and the client strict) and npm run check:neutrality (5 of 5 gates) pass.
  • Every spec of the 29 kinds on main was compared with the branch, for operand and result counts from 0 to 6 in both directions and with each field: 99470 specs, 19950 of them drawn, none differs.
  • The tests added for the review findings fail on the source before b8e71a4.
  • npm test passes in shared, diagram-client and extension-core. In sidecar-toolkit one test ran into its 5 s limit on my machine: variant-node-create-wizard > a variant palette entry > opens the type picker instead of a bare name box. It does the same on main there. The document of that test is /tmp/flow.py, so the wizard looks for the types of the project in the real /tmp of the machine, once per kind of node. Mine holds about 8000 Python files, and the first test of each kind takes about 4 s when the file runs alone, more under load. The order of the tests plays no part. Nothing is changed for it here.

https://claude.ai/code/session_01EToj6NxqLABK3H5cucHNsY

…iew yet)

A design round, kept local: the drawings are for a sheet to choose from,
and a PR follows once they are chosen.

- first, priority, race: a rounded block with an italic F, P or R, in the
  choice family. A priority has the bar of a join on the input it waits
  for. The flags of a race, its last inputs (`group`), end in a dot.
- share: a mux over a branch, with the unit they share on the side at the
  waist. `group` says how many operands the unit takes, which places the
  pins.
- tap, stand-in: a pass with a signal out of its side (a ring) or signals
  into it (dots) and a 0. stall: a die on the wire. dead-buffer: a buffer
  crossed out, with nothing after it.
- no-ready, valid-merge: channels drawn wide, as a bundle draws one, with
  the ready that stops on a bar and the valid that goes over to the other.
- speculator, spec-save, spec-commit, spec-save-commit, spec-branch,
  spec-tag: a family of their own, `spec`, in purple, which the forks and
  the joins have in the stylesheet and show on no body. A token that is a
  guess is a ring, one that is not a dot.
- Several pins on the side are spread along it (`alongSide`, `sideAt`).
  The pen writes an italic letter and draws an arrow across the flow.
- Variants kept for the sheet and marked so in the code: `labels` and
  `arrow` on a priority, `nest` on a race, `dashed` on a stall.

No drawing of the 29 kinds changes: 96040 specs compared with main, none
differs.

Claude-Session: https://claude.ai/code/session_01EToj6NxqLABK3H5cucHNsY
A priority names its two inputs at the edge, beside their pins: `hi` and
`lo`, under the pins down the page and after them to the right. The block is
four units longer than a frame, so the italic P keeps the size a first and a
race draw theirs. The bar and the arrow on the `hi` input are gone.

A race is the plain block with a dot on each flag, with no outline nested in
it. A stall is the die, with no dashed pass.

Tests for each new kind in both directions: the pins on the edges and on the
side, the names of a priority, the tap and the signals that stop a stand-in,
the die and the buffer crossed out, the wide channels, the pins of a share
from its `group` and no symbol on other counts, ring and dot across the
speculation family. The CHANGELOG lists the sixteen and `group`.

No drawing of a kind on main changes: 96040 specs compared, 0 differ.

Claude-Session: https://claude.ai/code/session_01EToj6NxqLABK3H5cucHNsY
… of a stand-in meet on a rail

Two drawings came out wrong for counts the sheet did not show.

- A share of three or more operations drew the number of its last
  operation on the ring of the unit's first pin, and a share of five drew
  its end numbers across the outline. The body now has a straight band at
  either end, as wide as the body gets, which holds the numbers. The pins
  of the unit sit on the slopes between the bands. A share of two or more
  operands is a little longer for it.
- A stand-in stretched its triangle over all the signals that stop it and
  ended each in a dot on the edge, so the last dot covered the tip. The
  triangle is now a frame long however many signals there are. One signal
  ends in a dot on the body, as before. Several meet on a rail beside the
  body, and the rail ends in that same dot.

Smaller ones:

- A share of one operation with one operand fits the rule and is drawn.
- A race whose `group` is no count of its operands draws no flag, as one
  without a `group` does. It drew a dot on every input. A race may still
  flag every input.
- `fits` says that a share needs more than its counts.

The tests for each fail on the source before this commit.

Claude-Session: https://claude.ai/code/session_01EToj6NxqLABK3H5cucHNsY
@endrix
endrix merged commit 8def3f3 into main Dec 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant