Add the tiger source code bundle from the book site

Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
Mariano Uvalle 2024-12-18 15:18:45 -08:00
parent 915660c8a7
commit 33d8bac511
87 changed files with 3252 additions and 0 deletions

23
tiger/chap9/graph.sig Normal file
View file

@ -0,0 +1,23 @@
signature GRAPH =
sig
type graph
type node
val nodes: graph -> node list
val succ: node -> node list
val pred: node -> node list
val adj: node -> node list (* succ+pred *)
val eq: node*node -> bool
val newGraph: unit -> graph
val newNode : graph -> node
exception GraphEdge
val mk_edge: {from: node, to: node} -> unit
val rm_edge: {from: node, to: node} -> unit
structure Table : TABLE
sharing type Table.key = node
val nodename: node->string (* for debugging only *)
end