Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/cm/depend/graph.sml
ViewVC logotype

Annotation of /sml/trunk/src/cm/depend/graph.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 278 - (view) (download)

1 : blume 270 (*
2 :     * Internal data structure representing a CM dependency graph.
3 :     *
4 :     * (C) 1999 Lucent Technologies, Bell Laboratories
5 :     *
6 :     * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
7 :     *)
8 : blume 269 structure DependencyGraph = struct
9 :    
10 : blume 278 type symbol = Symbol.symbol
11 : blume 270 type groupinfo = Dummy.t
12 : blume 272 type primitive = Primitive.primitive
13 : blume 269
14 :     type filter = SymbolSet.set option
15 :    
16 :     datatype node =
17 :     PNODE of primitive
18 : blume 270 | NODE of { smlinfo: SmlInfo.info,
19 : blume 269 localimports: node list,
20 :     globalimports: farnode list }
21 :    
22 :     withtype farnode = filter * node
23 :    
24 :     (* the filter is duplicated in each member of the map to
25 :     * make it easier to build the global graph *)
26 :     datatype gnode =
27 :     GNODE of { groupinfo: groupinfo,
28 :     imports: gnode list,
29 :     filter: filter,
30 :     exports: farnode SymbolMap.map,
31 :     dangling: node list }
32 :    
33 : blume 278 (* environments used for dependency analysis *)
34 :     datatype env =
35 :     EMPTY
36 :     | FCTENV of { looker: symbol -> value option,
37 :     domain: unit -> SymbolSet.set }
38 :     | BINDING of symbol * value
39 :     | LAYER of env * env
40 : blume 270
41 : blume 278 withtype value = env
42 :    
43 : blume 273 fun describeNode (PNODE p) = Primitive.toString p
44 : blume 270 | describeNode (NODE { smlinfo, ... }) = SmlInfo.describe smlinfo
45 : blume 269 end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0