Skip to main content

Module viz

Module viz 

Source
Expand description

DAG visualization for Polydat Kernels.

Renders a Polydat Kernel’s node graph as DOT (with record nodes and port-based edge routing), Mermaid, or self-contained SVG.

The DOT output uses graphviz record syntax:

  • Each node has named input ports (top) and output ports (bottom)
  • Edges connect from output ports to input ports
  • Dark theme colors via graph/node/edge attributes

The program’s inputs are drawn as port nodes at the top of the graph, distinct from the binding nodes that read them:

  • Coordinates (input name: type) share one INPUTS register with one output port per coordinate.
  • External ports (extern name: type [= default], the kernel’s InputKind::ExternalWrite slots the host writes between cycles) each get their own register labeled with the port’s kind, name, type, and default, with one output port wired to every node that reads it.

Functions§

polydat_to_dot
Render a Polydat source string as DOT with record nodes and ports.
polydat_to_mermaid
Render a Polydat source string as a Mermaid flowchart.
polydat_to_svg
Render a Polydat source string as self-contained SVG.