Expand description
Centralized, derived port-classification “rules broker” (Phase 1).
§What this is (and is NOT)
Stage formation today scatters its boundary decisions across several
analyses: signal_flow decides feedback vs cascade, neighbor_roles
infers per-terminal Load/Ref/Signal roles, the modulation-sink machinery
(bind.rs) knows transducer ports, and graph knows the rail sets. Each
re-derives a slice of “what does this port DO” from the device models.
This module is the single place that owns BOTH:
- the detection rules —
PortClass::from_componentderives a port’s class from the existing model facts (no new hand-maintained tag), and - their declarative consequences —
BoundaryPolicyis the whole rule table in oneBoundaryPolicy::classify, andDirectiveis the consequence a later formation phase would apply.
Phase 1 is behaviour-neutral. Nothing here is wired into formation,
find_flow_groups, partitioning, or stamping. Directive outputs are
defined but UNUSED by compilation/audio. This mirrors how
super::neighbor_roles landed safely: a pure classification + diagnostic
that a later arbitration phase will consume.
§Derivation provenance (which model fact each PortClass comes from)
PortClass | Derived from |
|---|---|
PortClass::Rail | graph.gnd_node / vcc_node / supply_nodes / ac_ground_nodes |
PortClass::Transducer | Component::modulation_sink(pin) → ModulationSinkKind (the .led/.cv/.iabc/.vgs ports) |
PortClass::ControlInput | Component::signal_terminals() Amplifier { input, control } (grid/base/gate, op-amp pos+neg) |
PortClass::Conducting | everything else (stamped MNA/WDF terminals: plate, collector, R/C/L pins) |
The forward-vs-back-edge bit consumed by BoundaryPolicy::classify is the
directed, rail-blocked signal flow from [super::signal_flow] (Defect B’s
directed_signal_distances_from_in). The broker does not re-derive flow.
Structs§
- Classified
Edge - One classified edge (a
from_port -> to_portboundary) in a compiled circuit, with its derivedBoundaryPolicy. - Classified
Port - One classified port of one component pin in a compiled circuit.
- Delayed
CutDiagnostic - Public diagnostic view of the Phase-2a cut set for a
PedalDef: the cut edges’ owning component ids, and the already-isolated (Behavioral) coupling component ids. Mirrorsclassify_edgesas the external-test entry point (the internaldelayed_cut_edgestakes a compiledCircuitGraph). - Delayed
CutSet - The set of edges a delayed-coupling formation pass must CUT before grouping, plus the tap-mouth boundary nodes each cut exposes as a stage port.
Enums§
- Boundary
Policy - The boundary policy for an edge between two ports, given the directed signal-flow orientation and component memory.
- Directive
- Declarative consequence of a
BoundaryPolicyfor a future formation pass. - Domain
- Physical coupling domain of a transducer port.
- Port
Class - Device-agnostic classification of what a single port (a
component.pin) is, derived entirely from existing model facts — no new annotation.
Functions§
- classify_
control_ path - Classify the boundary along a passive PATH from
out/a source node into a named control electrode, following the graph topology rather than a single component edge. This is the proof-diagnostic helper used to classify multi-hop boundaries such as LA-2A’sout -> ... -> V4.gridfeedback tap or theV1.plate -> C_c1 -> Gain -> V2.gridmakeup cascade: it resolves the control electrode’s node, derives itsPortClass, and determines feedback vs forward by whether the control electrode is fed from the output side (see [control_sink_is_back_edge]). - classify_
edges - Classify the boundary of every component edge in
pedalinto aBoundaryPolicy, oriented by directed signal flow. - classify_
ports - Classify EVERY pin of EVERY component in
pedalinto aPortClass. - delayed_
cut_ diagnostic - Compute the Phase-2a
DelayedCutDiagnosticfor a parsedpedal. - delayed_
cut_ edges - Derive the delayed-coupling cut set for
graph(Phase 2a). - detector_
control_ nodes - The nodes of every
PortClass::ControlInputelectrode that is fed from the output side (aBoundaryPolicy::DelayedSensesense sink) AND whose circuit contains a cross-network coupler — i.e. a true DELAYED feedback detector’s control electrode (LA-2A’sV4.grid). - detector_
subnetwork_ nodes - All circuit nodes belonging to the DELAYED detector SUB-NETWORK (Phase 2b).
- distinct_
classes - Set of all distinct
PortClassdiscriminants seen in a corpus pass — helper for coverage assertions in the proof diagnostic. - smoke_
classify - Robustness probe: classify every pin of every component for
pedaland confirm the derivation never panics and yields a class for each resolved pin. Returns the number of pins classified. Used by the corpus smoke gate.