digraph devmap {
	rankdir=LR;
	ranksep=1

	subgraph cluster_1 {
		label="concrete schematics symbol"
		a_devmap [label="devmap\nattribute"]
		a_slot [label="slot\nattribute"]
		subgraph cluster_2 {
			label="terminal"
			bgcolor=lightgrey
			a_name [label="name\nattribute"]
			a_noslot [label="noslot\nattribute"]
		}
	}

	subgraph cluster_3 {
		label="devmap plugin"

		slot_prefix [label="slot prefixing\nmechanism"; color=red]

		devmap [label="devmap\nmechanism"; color=green]
		pinmap [label="pinmap\nmechanism"; color=blue]
	}

	subgraph cluster_4 {
		label="abstract component"
		a_footprint [label="pcb/footprint attribute,\nspice/model attribute"]
		a_pinmap [label="pinmap\nattribute"]
		a_devmap2 [label="devmap\nattribute"]
		subgraph cluster_5 {
			label="port"
			bgcolor=lightgrey
			a_pname [label="name attribute\n(often slot-prefixed)"]
			a_pinname [label="pcb/pin attribute,\nspice/pin attribute"]
		}
	}

	output [label="output:\nfootprint & pin number,\nspice model & node position"; shape=plaintext]

	a_slot -> slot_prefix    [color=red]
	a_noslot -> slot_prefix  [color=red]
	a_name -> slot_prefix    [color=red]
	slot_prefix -> a_pname   [color=red]

	a_devmap -> a_devmap2

	a_devmap2 -> devmap      [color=green; weight=0]
	a_pname:s -> devmap:e    [color=green; weight=0]
	devmap:s -> a_pinmap     [color=green]
	devmap:se -> a_footprint [color=green]

	a_pinmap -> pinmap       [color=blue; weight=0]
	pinmap -> a_pinname      [color=blue]

	a_pinname -> output
	a_footprint -> output
}