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:
parent
915660c8a7
commit
33d8bac511
87 changed files with 3252 additions and 0 deletions
23
tiger/chap9/graph.sig
Normal file
23
tiger/chap9/graph.sig
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue