From 79fca35500c7fb9ee8a2bd6317d86da8ddb6aca3 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Sun, 2 Mar 2014 16:00:45 +0000 Subject: [PATCH] add work-in-progress replacement for figure illustrate dispatch using tikZ because why not? --- dispatch-relationships.tikz | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 dispatch-relationships.tikz diff --git a/dispatch-relationships.tikz b/dispatch-relationships.tikz new file mode 100644 index 0000000..18f774f --- /dev/null +++ b/dispatch-relationships.tikz @@ -0,0 +1,33 @@ +\documentclass{article} + +\usepackage{tikz} +\usetikzlibrary{shapes.geometric} +\usetikzlibrary{arrows} + +\begin{document} + +\begin{tikzpicture} + \begin{scope}[minimum width=8em,minimum height=3ex] + \node[draw,rectangle] (eql) at (0,0) {\texttt{eql-specializer}}; + \node[draw,rectangle] (class) at (1,2) {\texttt{class}}; + \node[draw,rectangle] (specializer) at (0.5,6) {\texttt{specializer}}; + \node[draw,ellipse] (argument) at (7,2) {\textit{argument}}; + + \node[draw,red,ellipse] (generalizer) at (7,4) {\textit{\color{red}generalizer}}; + \node[draw,red,rectangle] (genspec) at (2,4) {\texttt{\color{red}gen.-spec.}}; + \end{scope} + + \draw[->,>=open triangle 60] (eql.168) |- (specializer); + \draw[->,>=open triangle 60] (class.160) -- (class.160 |- specializer.south); + \draw[->,>=open triangle 60,red] (genspec.150) -- (genspec.150 |- specializer.south); + + \draw[dashed] (argument.south) |- node[right,near start] {\texttt{eql}} node[below,near end] {\texttt{eql-specializer-object}} (eql.east); + \draw[dashed] (argument.west) -- node[below] {\texttt{typep}} node[above] {\texttt{class-of}} (class.east); + \draw[red] (argument.north) -- node[right] {\texttt{\color{red}generalizer-of}} (generalizer.south); + \draw[red] (generalizer.west) -- node[above] (sagp) {\texttt{\color{red}s-a-g-p}} (genspec.east); + \node (specaccgenp) at (6,5.5) {\texttt{\footnotesize{\color{red}specializer-accepts-generalizer-p}}}; + \draw[red,dotted] (sagp) -- (specaccgenp); + +\end{tikzpicture} + +\end{document} \ No newline at end of file -- 2.39.5