Closed robrix closed 9 years ago
We currently export e.g.:
digraph tesseract { "if" -> "result"; "x" -> "if"; "0" -> "lessThan"; "x" -> "lessThan"; "unaryMinus" -> "if"; "lessThan" -> "if"; "x" -> "unaryMinus"; }
which graphviz renders as:
if has three in-edges, but they’re unlabelled and only ordered by convention. We’d get a better result if we labelled the head and tail of the edges.
if
We should also use sametail and samehead. Here’s an example of abs gussied up a little:
sametail
samehead
abs
digraph tesseract { "if" -> "result"; "x" -> "if" [headlabel=0,sametail=0,labeldistance=2]; "0" -> "lessThan" [headlabel=0,labeldistance=2]; "x" -> "lessThan" [headlabel=1,sametail=0,labeldistance=2]; "unaryMinus" -> "if" [headlabel=1,labeldistance=2]; "lessThan" -> "if" [headlabel=2,labeldistance=2]; "x" -> "unaryMinus" [sametail=0,labeldistance=2]; }
Went for headlabel/sametail in #51.
headlabel
We currently export e.g.:
which graphviz renders as:
if
has three in-edges, but they’re unlabelled and only ordered by convention. We’d get a better result if we labelled the head and tail of the edges.We should also use
sametail
andsamehead
. Here’s an example ofabs
gussied up a little: