PseudoScript
Module

emit

data

BoundaryFrame #

private
emit::BoundaryFrame

An enclosing frame of a boundary view: the boundary node's FQN (so the canvas can drill into it), title, C4 kind (frame accent), and the cluster rectangle.

Entities Entity diagram scroll to zoom · drag to pan
RECORDBoundaryFramefqnstringtitlestringkindstringrectemit::RectRECORDRectxnumberynumberwnumberhnumber
data

C4EdgeKind #

private
emit::C4EdgeKind

The relationship a routed edge expresses: a body `call`, a synthesised `trigger` from an initiator, or a `from` `provenance` link. Maps from `model::EdgeKind`, dropping the structural `for`-parent link.

Entities Entity diagram scroll to zoom · drag to pan
UNIONC4EdgeKindCallTriggerProvenanceRECORDCallmessagestringUNIONTriggerOnEventScheduleHttpManual
data

C4Layout #

public
emit::C4Layout

A dot-placed C4 view for the interactive canvas and the static SVG: canvas size, placed node cards, routed edges, the enclosing boundary frames (outermost first; empty for a context view), and — only under experimental grid placement — the grid geometry for drag-to-pin.

Entities Entity diagram scroll to zoom · drag to pan
RECORDC4Layoutwidthnumberheightnumbernodesemit::LaidOutNode[]edgesemit::LaidOutEdge[]boundariesemit::BoundaryFrame[]gridOption<emit::GridInfo>RECORDLaidOutNodefqnstringkindstringlabelstringsummaryOption<string>rectemit::RectRECORDLaidOutEdgesourcestringtostringkindemit::C4EdgeKindlabelsstring[]pointsemit::PointI[]labelPosOption<emit::PointI>dashedboolRECORDBoundaryFramefqnstringtitlestringkindstringrectemit::Rect
data

C4Scene #

public
emit::C4Scene
Entities Entity diagram scroll to zoom · drag to pan
RECORDC4Sceneviewemit::C4ViewofOption<string>nodesemit::PlacedNode[]edgesemit::RoutedEdge[]UNIONC4ViewContextViewContainerViewComponentViewRECORDPlacedNodefqnstringkindstringlabelstringsummarystringboundarystringrectemit::RectRECORDRoutedEdgesourcestringtostringkindemit::C4EdgeKindlabelsstring[]
data

C4Tweaks #

public
emit::C4Tweaks

Per-diagram C4 layout tweaks (the UI's "Layout" toggles): run the long-edge optimiser, lay out left-to-right instead of top-to-bottom, scale the spacing, and — experimentally — place by brute-force grid search instead of the layered engine, with its own cost dials and search mode.

Entities Entity diagram scroll to zoom · drag to pan
RECORDC4TweaksminimizeLongEdgesboolleftToRightboolspacingnumberexperimentalGridboolgridCrossingCostnumbergridDistanceCostnumbergridFlowCostnumbergridSearchemit::GridSearchUNIONGridSearchAutoHeuristicExhaustive
data

C4View #

private
emit::C4View

Which C4 view a `C4Scene` is — drives the golden header keyword.

Entities Entity diagram scroll to zoom · drag to pan
UNIONC4ViewContextViewContainerViewComponentView
data

Component #

public
emit::Component
Entities Entity diagram scroll to zoom · drag to pan
RECORDComponentofstring
data

Container #

public
emit::Container
Entities Entity diagram scroll to zoom · drag to pan
RECORDContainerofstring
data

Data #

public
emit::Data
Entities Entity diagram scroll to zoom · drag to pan
RECORDDataofstring
data

DataEntity #

private
emit::DataEntity

One entity in a `data` ER view: its FQN, label, disclosed form, rows, whether it is the focal type, and its laid-out card rectangle.

Entities Entity diagram scroll to zoom · drag to pan
RECORDDataEntityfqnstringlabelstringformemit::EntityFormrowsemit::EntityRow[]focalboolrectemit::RectUNIONEntityFormRecordUnionBlackBoxRECORDEntityRownamestringtystringtargetstringRECORDRectxnumberynumberwnumberhnumber
data

DataScene #

public
emit::DataScene
Entities Entity diagram scroll to zoom · drag to pan
RECORDDataSceneofstringentitiesemit::DataEntity[]linksemit::DataLink[]widthnumberheightnumberRECORDDataEntityfqnstringlabelstringformemit::EntityFormrowsemit::EntityRow[]focalboolrectemit::RectRECORDDataLinksourcestringtostringfieldstring
component

Edges #

private
emit::Edges

Builds the routed-edge set for a C4 scene from the graph's edges: maps each `model::EdgeKind` to a `C4EdgeKind` (dropping `for`-parent links), lifts each endpoint to the in-view node it belongs to, drops self-loops and out-of-view edges, then sorts and de-duplicates.

Parent

Inbound

Outbound

container

Emit #

public
emit::Emit

`crates/pseudoscript-emit`. Projects a view into a `Scene` and renders it to SVG; C4 views are placed by the `dot` layered engine, the sequence/data/feature views by the matching `layout` engine.

#headline

Inbound

Outbound

Scenarios

ProjectAView

A view projects to a notation-neutral scene, then to SVG.

  • given a resolved graph and a chosen view
  • when the view is projected
  • then the relevant nodes and edges are selected and laid out into a Scene
  • and the Scene renders to standalone SVG
  • but a missing or wrong-kind target fails with an EmitError
Flow Flow — ProjectAView scroll to zoom · drag to pan
FEATUREProjectAViewfor EmitGIVENa resolved graph and a chosen viewWHENthe view is projectedTHENthe relevant nodes and edges areselected and laid out into a SceneANDthe Scene renders to standalone SVGBUTa missing or wrong-kind target failswith an EmitError
SceneIsDeterministic

The Scene IR is the conformance surface: notation-neutral and deterministic.

  • given the same resolved graph and view projected twice
  • when the scenes are compared
  • then node order is source-declaration order
  • and parallel edges merge into one multi-label edge, sorted by from, to, then kind
  • but renderer coordinates never appear in the golden
Flow Flow — SceneIsDeterministic scroll to zoom · drag to pan
FEATURESceneIsDeterministicfor EmitGIVENthe same resolved graph and viewprojected twiceWHENthe scenes are comparedTHENnode order is source-declaration orderANDparallel edges merge into onemulti-label edge, sorted by from, to,then kindBUTrenderer coordinates never appear inthe golden
Components Component diagram scroll to zoom · drag to pan
PseudoscriptEmitCOMPONENTProjectorProjects a `View` out of the graph (LANG.md§9): dispatches on the view variant,…COMPONENTEdgesBuilds the routed-edge set for a C4 scenefrom the graph's edges: maps each…COMPONENTTraceWalks a callable's body trace into orderedsequence items, registering each participan…COMPONENTLayoutAssigns geometry. Projection stamps each C4scene with simple row-flow coordinates…COMPONENTSvgRendererRenders a laid-out `Scene` to standalone SVGmarkup — string-building, no template engin…CONTAINERDoc`crates/pseudoscript-doc`. Turns a resolvedgraph into a Svelte-rendered,…CONTAINERDot`crates/pseudoscript-dot`. Runs thefour-pass layered pipeline over a `Graph` t…CONTAINERLayout`crates/pseudoscript-layout`. Thegeometry/text `Core` and the sequence…CONTAINERUniverse`crates/pseudoscript-universe`. Maps theresolved C4 model into the software graph…flowsfromModelsnapshotgridLayoutrunPipelinelayoutcollectsolveC4blackBoxwalk
data

EmitError #

public
emit::EmitError

Why projecting a view failed: the target FQN names no node, or names a node of the wrong kind for the requested view.

Entities Entity diagram scroll to zoom · drag to pan
UNIONEmitErrorUnknownNodeWrongKindRECORDUnknownNodefqnstringRECORDWrongKindfqnstringexpectedstringfoundstring
data

EntityForm #

private
emit::EntityForm

The disclosed form of a data entity, driving the card's eyebrow and rows: a record of typed fields, a discriminated union of variants, or a black box.

Entities Entity diagram scroll to zoom · drag to pan
UNIONEntityFormRecordUnionBlackBoxRECORDRecordfieldsmodel::DataField[]RECORDUnionvariantsmodel::DataVariant[]
data

EntityRow #

private
emit::EntityRow

One row of a data entity: the field or variant name, its rendered type (empty for a union variant), and the FQN of the data type this row targets when it references one.

Entities Entity diagram scroll to zoom · drag to pan
RECORDEntityRownamestringtystringtargetstring
data

Feature #

public
emit::Feature
Entities Entity diagram scroll to zoom · drag to pan
RECORDFeatureofstring
data

FeatureScene #

public
emit::FeatureScene
Entities Entity diagram scroll to zoom · drag to pan
RECORDFeatureSceneentrystringtargetFqnstringtargetLabelstringnamestringstepsemit::FeatureStepNode[]widthnumberheightnumberRECORDFeatureStepNodekeywordstringtextstringrectemit::Rect
data

FeatureStepNode #

private
emit::FeatureStepNode

One step box in a `feature` flow view: the step keyword, its prose, and the laid-out box rectangle.

Entities Entity diagram scroll to zoom · drag to pan
RECORDFeatureStepNodekeywordstringtextstringrectemit::RectRECORDRectxnumberynumberwnumberhnumber
data

Frame #

private
emit::Frame

A nestable frame over a body of sequence items, drawn as an enclosing box with its condition label.

Entities Entity diagram scroll to zoom · drag to pan
RECORDFramekindemit::FrameKindcondstringbodyemit::SeqItem[]UNIONFrameKindAltLoopUNIONSeqItemMessageItemFrameItem
data

FrameItem #

private
emit::FrameItem
Entities Entity diagram scroll to zoom · drag to pan
RECORDFrameItemframeemit::FrameRECORDFramekindemit::FrameKindcondstringbodyemit::SeqItem[]
data

FrameKind #

private
emit::FrameKind

The kind of a sequence frame: `if`/`else` becomes an `alt` frame, `for`/ `while` becomes a `loop` frame.

Entities Entity diagram scroll to zoom · drag to pan
UNIONFrameKindAltLoopRECORDAltcondLabelstringthenStepsmodel::Step[]elseStepsmodel::Step[]RECORDLoopcondLabelstringbodymodel::Step[]
data

GridInfo #

private
emit::GridInfo

The grid the experimental placement used, in absolute canvas coordinates: cell `(r, c)` is centred at `origin + (c·cellW, r·cellH)`; `pad` is the drag-room frame, so a pixel maps to its pin cell by recovering the raw cell then subtracting `pad`.

Entities Entity diagram scroll to zoom · drag to pan
RECORDGridInfocolsnumberrowsnumbercellWnumbercellHnumberoriginemit::PointIpadnumberRECORDPointIxnumberynumber
data

GridPin #

public
emit::GridPin

A node the user has pinned to a grid cell (drag-to-pin), identified by FQN; the emit layer resolves it to a `dot` node index for the current view. Honoured only under experimental grid placement.

Entities Entity diagram scroll to zoom · drag to pan
RECORDGridPinfqnstringrownumbercolnumber
data

GridSearch #

public
emit::GridSearch

Which grid search the experimental grid placer runs — the UI's heuristic-vs-brute-force toggle. Mirrors `dot::SearchMode` so the IDE need not depend on `dot`.

Entities Entity diagram scroll to zoom · drag to pan
UNIONGridSearchAutoHeuristicExhaustive
data

LaidOutEdge #

private
emit::LaidOutEdge

A routed edge for the canvas/SVG: its endpoints (`source` stands for the wire `from`), kind, stacked labels, the engine's polyline (at least two points), the label position at the polyline midpoint when labels exist, and whether it draws dashed (a `from`-provenance edge).

Entities Entity diagram scroll to zoom · drag to pan
RECORDLaidOutEdgesourcestringtostringkindemit::C4EdgeKindlabelsstring[]pointsemit::PointI[]labelPosOption<emit::PointI>dashedboolUNIONC4EdgeKindCallTriggerProvenanceRECORDPointIxnumberynumber
data

LaidOutNode #

private
emit::LaidOutNode

A node card placed by the `dot` engine for the canvas/SVG: its FQN, C4 kind (accent and eyebrow), display label, optional `///` summary, and rectangle.

Entities Entity diagram scroll to zoom · drag to pan
RECORDLaidOutNodefqnstringkindstringlabelstringsummaryOption<string>rectemit::RectRECORDRectxnumberynumberwnumberhnumber
component

Layout #

private
emit::Layout

Assigns geometry. Projection stamps each C4 scene with simple row-flow coordinates (`solveC4`) — the panic-proof fallback geometry every scene carries. The real placement runs at render/canvas time: `layoutC4` drives the `dot` layered engine (rank/order/position/splines), framing boundary children as a cluster, tuned by per-diagram `C4Tweaks` and drag-to-pin cells. The sequence/data/feature scenes are placed by the matching `layout` engine.

Parent

Inbound

Outbound

Scenarios

LayoutDelegatesToDot

C4 layout is delegated to the `dot` layered engine.

  • given a projected C4 scene
  • when the scene is laid out
  • then it is translated into a dot input graph and placed by the dot layered engine
  • and a boundary view's children are framed as a dot cluster
  • but the engine tolerates cycles and never panics, so the placement stays deterministic
Flow Flow — LayoutDelegatesToDot scroll to zoom · drag to pan
FEATURELayoutDelegatesToDotfor LayoutGIVENa projected C4 sceneWHENthe scene is laid outTHENit is translated into a dot inputgraph and placed by the dot layeredengineANDa boundary view's children are framedas a dot clusterBUTthe engine tolerates cycles and neverpanics, so the placement staysdeterministic
TweaksAndPinsTuneC4Layout

Per-diagram tweaks and pins tune the C4 placement.

  • given a C4 scene and the UI's layout tweaks
  • when the scene is laid out with those tweaks
  • then the long-edge optimiser, reading direction, and spacing follow the tweaks
  • and under experimental grid placement, drag-to-pin cells fix their nodes
Flow Flow — TweaksAndPinsTuneC4Layout scroll to zoom · drag to pan
FEATURETweaksAndPinsTuneC4Layoutfor LayoutGIVENa C4 scene and the UI's layout tweaksWHENthe scene is laid out with thosetweaksTHENthe long-edge optimiser, readingdirection, and spacing follow thetweaksANDunder experimental grid placement,drag-to-pin cells fix their nodes
data

Lifeline #

private
emit::Lifeline

A sequence lifeline (a participant): its FQN, C4 kind for the head card, the node's `///` summary shown dimmed under the name, and the structural ancestry path under a container/component name. No coordinate — the sequence layout assigns the lifeline x.

Inbound

Entities Entity diagram scroll to zoom · drag to pan
RECORDLifelinefqnstringkindstringsummarystringparentPathstring
data

Message #

private
emit::Message

A message between two lifelines (or a self-message). `label` is the method name, or `Ok`/`Err`/empty for a return; `detail` is the type detail shown after it — a call's `(params): ret` signature or a return's concrete type.

Entities Entity diagram scroll to zoom · drag to pan
RECORDMessagesourcestringtostringkindemit::MessageKindlabelstringdetailstringUNIONMessageKindCallMsgReturnMsgSelfMsg
data

MessageItem #

private
emit::MessageItem
Entities Entity diagram scroll to zoom · drag to pan
RECORDMessageItemmessageemit::MessageRECORDMessagesourcestringtostringkindemit::MessageKindlabelstringdetailstring
data

MessageKind #

private
emit::MessageKind

The kind of a sequence message: a `call` to another lifeline, a `return` to the caller, or a `self`-message on the owner's own lifeline.

Entities Entity diagram scroll to zoom · drag to pan
UNIONMessageKindCallMsgReturnMsgSelfMsg
data

PlacedNode #

private
emit::PlacedNode

A node placed in a C4 view: its FQN, C4 kind, display label, optional `///` summary (the card's dimmed description), the boundary it sits inside, and the layout rectangle assigned by the placer.

Entities Entity diagram scroll to zoom · drag to pan
RECORDPlacedNodefqnstringkindstringlabelstringsummarystringboundarystringrectemit::RectRECORDRectxnumberynumberwnumberhnumber
data

PointI #

private
emit::PointI

An integer point on the canvas (a rounded layout coordinate).

Entities Entity diagram scroll to zoom · drag to pan
RECORDPointIxnumberynumber
component

Projector #

private
emit::Projector

Projects a `View` out of the graph (LANG.md §9): dispatches on the view variant, collecting nodes and edges for a C4 scene or tracing a callable body for a sequence scene, then hands off to the placer. Fails with `EmitError` when the view's target is missing or the wrong kind.

Parent

Inbound

Outbound

Scenarios

DispatchOnViewKind

Each view kind dispatches to its projection.

  • given a graph and a View variant
  • when project runs
  • then Context and the boundary views build a C4Scene
  • and Sequence traces the entry callable's body into a SequenceScene
  • and Data builds an entity (ER) scene and Feature builds a flow scene
Flow Flow — DispatchOnViewKind scroll to zoom · drag to pan
FEATUREDispatchOnViewKindfor ProjectorGIVENa graph and a View variantWHENproject runsTHENContext and the boundary views build aC4SceneANDSequence traces the entry callable'sbody into a SequenceSceneANDData builds an entity (ER) scene andFeature builds a flow scene
ProjectSymbolPicksAView

Project-symbol picks the view that best explains one symbol.

  • given a single symbol FQN — a callable, system, container, component, or data type
  • when the symbol is projected
  • then a callable traces as a sequence, a system or container with children shows them, a data type shows its entity view
  • and a childless boundary falls back to the view that frames it as a peer
  • and an FQN naming no graph node projects its feature flow view
  • but an FQN naming neither a node nor a feature fails with EmitError::UnknownNode
Flow Flow — ProjectSymbolPicksAView scroll to zoom · drag to pan
FEATUREProjectSymbolPicksAViewfor ProjectorGIVENa single symbol FQN — a callable,system, container, component, or datatypeWHENthe symbol is projectedTHENa callable traces as a sequence, asystem or container with childrenshows them, a data type shows itsentity viewANDa childless boundary falls back to theview that frames it as a peerANDan FQN naming no graph node projectsits feature flow viewBUTan FQN naming neither a node nor afeature fails withEmitError::UnknownNode
DataAndFeatureViews

The data and feature views project their own scene families.

  • given a Data view of a data type, or a Feature view of a scenario
  • when the view is projected
  • then the Data view collects the focal entity, its referenced types, and the links between them
  • and the Feature view lays the scenario's given/when/then steps out as a flow
Flow Flow — DataAndFeatureViews scroll to zoom · drag to pan
FEATUREDataAndFeatureViewsfor ProjectorGIVENa Data view of a data type, or aFeature view of a scenarioWHENthe view is projectedTHENthe Data view collects the focalentity, its referenced types, and thelinks between themANDthe Feature view lays the scenario'sgiven/when/then steps out as a flow
UnknownNodeFails

A missing node fails the projection.

  • given a boundary or sequence view whose target FQN names no node
  • when the view is projected
  • then projection fails with EmitError::UnknownNode
Flow Flow — UnknownNodeFails scroll to zoom · drag to pan
FEATUREUnknownNodeFailsfor ProjectorGIVENa boundary or sequence view whosetarget FQN names no nodeWHENthe view is projectedTHENprojection fails withEmitError::UnknownNode
WrongKindFails

A target of the wrong kind fails the projection.

  • given a container view whose of node is not a system
  • when the view is projected
  • then projection fails with EmitError::WrongKind carrying expected and found
Flow Flow — WrongKindFails scroll to zoom · drag to pan
FEATUREWrongKindFailsfor ProjectorGIVENa container view whose of node is nota systemWHENthe view is projectedTHENprojection fails withEmitError::WrongKind carrying expectedand found
BlackBoxEntryTracesSignature

A black-box sequence entry still traces — its signature is the trace.

  • given a sequence view whose entry callable is black-boxed (no disclosed body)
  • when the view is projected
  • then the trace is the single inbound call and its return the signature describes
  • but a non-callable entry still fails with EmitError::WrongKind
Flow Flow — BlackBoxEntryTracesSignature scroll to zoom · drag to pan
FEATUREBlackBoxEntryTracesSignaturefor ProjectorGIVENa sequence view whose entry callableis black-boxed (no disclosed body)WHENthe view is projectedTHENthe trace is the single inbound calland its return the signature describesBUTa non-callable entry still fails withEmitError::WrongKind
data

Rect #

private
emit::Rect

An axis-aligned layout rectangle in renderer coordinates.

Entities Entity diagram scroll to zoom · drag to pan
RECORDRectxnumberynumberwnumberhnumber
data

RoutedEdge #

private
emit::RoutedEdge

An edge routed between two C4 nodes: its endpoints, kind, and the merged call labels (sorted and de-duplicated; empty for a trigger or provenance edge). Parallel calls between the same pair collapse into one multi-label edge. `source` is the wire field `from`, renamed because `from` is a PseudoScript keyword.

Inbound

Entities Entity diagram scroll to zoom · drag to pan
RECORDRoutedEdgesourcestringtostringkindemit::C4EdgeKindlabelsstring[]UNIONC4EdgeKindCallTriggerProvenance
data

Scene #

public
emit::Scene

A laid-out diagram: the notation-neutral IR the SVG renderer consumes. A C4 scene carries placed nodes and routed edges; a sequence scene carries lifelines and ordered messages with nested frames. This IR is the generation conformance surface (ADR-017): coordinates are carried for the renderer only, never serialised to the golden.

Entities Entity diagram scroll to zoom · drag to pan
UNIONSceneC4SceneSequenceSceneDataSceneFeatureSceneRECORDC4Sceneviewemit::C4ViewofOption<string>nodesemit::PlacedNode[]edgesemit::RoutedEdge[]RECORDSequenceSceneentrystringparticipantsemit::Lifeline[]itemsemit::SeqItem[]RECORDDataSceneofstringentitiesemit::DataEntity[]linksemit::DataLink[]widthnumberheightnumberRECORDFeatureSceneentrystringtargetFqnstringtargetLabelstringnamestringstepsemit::FeatureStepNode[]widthnumberheightnumber
data

SeqItem #

private
emit::SeqItem

One ordered item in a sequence trace: a message or a nested frame.

Entities Entity diagram scroll to zoom · drag to pan
UNIONSeqItemMessageItemFrameItemRECORDMessageItemmessageemit::MessageRECORDFrameItemframeemit::Frame
data

Sequence #

public
emit::Sequence
Entities Entity diagram scroll to zoom · drag to pan
RECORDSequenceentrystring
data

SequenceScene #

public
emit::SequenceScene
Entities Entity diagram scroll to zoom · drag to pan
RECORDSequenceSceneentrystringparticipantsemit::Lifeline[]itemsemit::SeqItem[]RECORDLifelinefqnstringkindstringsummarystringparentPathstringUNIONSeqItemMessageItemFrameItem
component

SvgRenderer #

private
emit::SvgRenderer

Renders a laid-out `Scene` to standalone SVG markup — string-building, no template engine and no headless browser (LANG.md §9.3, ADR-017). Dispatches on the scene variant; the layout engine is wrapped so no input panics the render, falling back to the scene's own simple coordinates.

Parent

Inbound

Scenarios

RenderSvgAsString

SVG is built as a string — no headless browser.

  • given a laid-out Scene
  • when render runs
  • then a self-contained SVG document is built by string concatenation
  • but no template engine or headless browser is invoked
Flow Flow — RenderSvgAsString scroll to zoom · drag to pan
FEATURERenderSvgAsStringfor SvgRendererGIVENa laid-out SceneWHENrender runsTHENa self-contained SVG document is builtby string concatenationBUTno template engine or headless browseris invoked
AdaptiveSvgUsesCssVariables

The adaptive theme defers colour choice to the host stylesheet.

  • given a scene rendered under the adaptive theme
  • when the SVG is emitted
  • then every palette role paints as a --pds-* CSS variable with the light value as fallback
  • and the light and dark outputs stay byte-identical to their literal palettes
Flow Flow — AdaptiveSvgUsesCssVariables scroll to zoom · drag to pan
FEATUREAdaptiveSvgUsesCssVariablesfor SvgRendererGIVENa scene rendered under the adaptivethemeWHENthe SVG is emittedTHENevery palette role paints as a --pds-*CSS variable with the light value asfallbackANDthe light and dark outputs staybyte-identical to their literalpalettes
LayoutFallbackIsPanicSafe

A failed layout degrades to simple coordinates rather than crashing.

  • given a scene the layout engine cannot place, or an empty view
  • when the C4 scene is rendered
  • then rendering falls back to the scene's own simple coordinates
  • but the render never panics
Flow Flow — LayoutFallbackIsPanicSafe scroll to zoom · drag to pan
FEATURELayoutFallbackIsPanicSafefor SvgRendererGIVENa scene the layout engine cannotplace, or an empty viewWHENthe C4 scene is renderedTHENrendering falls back to the scene'sown simple coordinatesBUTthe render never panics
component

Trace #

private
emit::Trace

Walks a callable's body trace into ordered sequence items, registering each participant on first appearance (LANG.md §9.2, §7). A real trigger's initiator leads as the first lifeline with a synthesised inbound call; absent a trigger the owner leads. A `call` is a message to the target; a disclosed callee expands inline; a `self.` call is a self-message; a return marks `Ok`/`Err`; `if`/`else` nests an `alt` frame, `for`/`while` a `loop` frame.

Parent

Inbound

Outbound

Scenarios

ControlFlowBecomesFrames

Control flow becomes nested frames in the trace.

  • given a callable body with if/else and for/while
  • when the body is traced
  • then an if/else becomes an alt frame over its branches
  • and a for/while becomes a loop frame over its body
Flow Flow — ControlFlowBecomesFrames scroll to zoom · drag to pan
FEATUREControlFlowBecomesFramesfor TraceGIVENa callable body with if/else andfor/whileWHENthe body is tracedTHENan if/else becomes an alt frame overits branchesANDa for/while becomes a loop frame overits body
CallsBecomeMessages

Body calls become left-to-right messages; self-calls loop on the owner.

  • given a callable body with calls to other nodes and self-calls
  • when the body is traced
  • then each call to another node is a left-to-right message to that lifeline
  • and each self. call is a self-message on the owner's own lifeline
  • and every target is registered as a participant on first appearance
Flow Flow — CallsBecomeMessages scroll to zoom · drag to pan
FEATURECallsBecomeMessagesfor TraceGIVENa callable body with calls to othernodes and self-callsWHENthe body is tracedTHENeach call to another node is aleft-to-right message to that lifelineANDeach self. call is a self-message onthe owner's own lifelineANDevery target is registered as aparticipant on first appearance
DisclosedCalleesExpandInline

Disclosed callees expand inline; black boxes and recursion stay single calls.

  • given a traced body whose calls reach disclosed, black-box, and recursive callees
  • when each call is traced
  • then a disclosed callee's body expands inline, the active lifeline switching to it
  • and its own returns flow back to its caller
  • but a black-box callee, or one already in flight on the call stack, is one message closed by a synthesised return of its declared type
Flow Flow — DisclosedCalleesExpandInline scroll to zoom · drag to pan
FEATUREDisclosedCalleesExpandInlinefor TraceGIVENa traced body whose calls reachdisclosed, black-box, and recursivecalleesWHENeach call is tracedTHENa disclosed callee's body expandsinline, the active lifeline switchingto itANDits own returns flow back to itscallerBUTa black-box callee, or one already inflight on the call stack, is onemessage closed by a synthesised returnof its declared type
TriggerlessEntrySuppressesReturns

A triggerless entry suppresses its own returns.

  • given a sequence entry that bears no trigger macro
  • when its body is traced
  • then the owner leads with no inbound call and the entry's returns are suppressed
  • but inner expanded callees still return to their callers
Flow Flow — TriggerlessEntrySuppressesReturns scroll to zoom · drag to pan
FEATURETriggerlessEntrySuppressesReturnsfor TraceGIVENa sequence entry that bears no triggermacroWHENits body is tracedTHENthe owner leads with no inbound calland the entry's returns are suppressedBUTinner expanded callees still return totheir callers
data

UnknownNode #

public
emit::UnknownNode
Entities Entity diagram scroll to zoom · drag to pan
RECORDUnknownNodefqnstring
data

View #

public
emit::View

Which view to project from the graph (LANG.md §9). Context is the C1 whole; Container/Component zoom into one boundary; Sequence traces one entry point; Data draws a `data` type's entity (ER) view (§9.4); Feature draws a `feature` scenario's flow (§9.5).

Entities Entity diagram scroll to zoom · drag to pan
UNIONViewContextContainerComponentSequenceDataFeatureRECORDContainerofstringRECORDComponentofstringRECORDSequenceentrystringRECORDDataofstringRECORDFeatureofstring
data

WrongKind #

public
emit::WrongKind
Entities Entity diagram scroll to zoom · drag to pan
RECORDWrongKindfqnstringexpectedstringfoundstring
Generated by pds doc.