Repository navigation
feat: add dsl::toDot, a Graphviz DOT export of a parsed graph - #18
Merged
Merged
Conversation
Renders the same picture as toMermaid, with the same node ids: stages as boxes listing their arguments, edges as ellipses, a box per dead end, slot names on the links of a named group. The edge display names and config lines both renderers use move into shared helpers. TODO.md: adds the console-rendering item that remains (dsl::toAscii).
psyinf
force-pushed
the
feature/to-dot
branch
from
September 19, 2026 20:53
12d14c6 to
b7a1658
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the Graphviz export from the console-rendering discussion. Stacked on #17. Merge that first; this PR then retargets to
main.What
dsl::toDot(program)renders a parsed graph as a Graphviz DOT digraph. It draws the same picture astoMermaid, with the same node ids:RunRecord\nlabel=tap)in/in.<key>/out/out.<key>/out[i]-> endgets its own double-bordered boxe3 -> s2 [label="name"];)std::cout << dsl::toDot(graph.program()); // | dot -Tsvg -o graph.svg, or | graph-easy --as=boxartChecked against Graphviz 9.0 (
dot -Tpng) with thenamedPipelinegreet graph (named inputs plus a named-slot merge).Also
toMermaidandtoDotsharedetail::edgeDisplayNames/detail::configLines.toMermaid's output is unchanged.dsl::toAscii) is added as item 7; the stacked follow-up PR implements its first step.Docs / tests
README (feature list + "Visualizing"), EXAMPLE.md section 6, CHANGELOG. Three new cases: layout/ids, escaping of
"and\, slot labels. All 110 tests pass (MSVC debug, ASan).