|
@@ -4011,8 +4011,27 @@ The \key{lookup} function ...
|
|
|
|
|
|
The \key{map2} function ...
|
|
|
|
|
|
-The \code{make-graph}, \code{add-edge}, and \code{adjacent}
|
|
|
-functions...
|
|
|
+
|
|
|
+\subsection{Graphs}
|
|
|
+
|
|
|
+\begin{itemize}
|
|
|
+\item The \code{make-graph} function takes a list of vertices
|
|
|
+ (symbols) and returns a graph.
|
|
|
+
|
|
|
+\item The \code{add-edge} function takes a graph and two vertices and
|
|
|
+ adds an edge to the graph that connects the two vertices. The graph
|
|
|
+ is updated in-place. There is no return value for this function.
|
|
|
+
|
|
|
+\item The \code{adjacent} function takes a graph and a vertex and
|
|
|
+ returns the set of vertices that are adjacent to the given
|
|
|
+ vertex. The return value is a Racket \code{hash-set} so it can be
|
|
|
+ used with functions from the \code{racket/set} module.
|
|
|
+
|
|
|
+\item The \code{vertices} function takes a graph and returns the list
|
|
|
+ of vertices in the graph.
|
|
|
+\end{itemize}
|
|
|
+
|
|
|
+\subsection{Testing}
|
|
|
|
|
|
The \key{interp-tests} function takes a compiler name (a string), a
|
|
|
description of the passes, an interpreter for the source language, a
|