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/MLRISC/graphs/wrappers.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/graphs/wrappers.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 245 - (view) (download)
Original Path: sml/branches/SMLNJ/src/MLRISC/graphs/wrappers.sml

1 : monnier 245 signature GRAPH_WRAPPERS =
2 :     sig
3 :    
4 :     val do_before_new_id :
5 :     (unit -> unit) -> ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
6 :     val do_after_new_id :
7 :     (Graph.node_id -> unit) ->
8 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
9 :     val do_before_add_node :
10 :     ('n Graph.node -> unit) ->
11 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
12 :     val do_after_add_node :
13 :     ('n Graph.node -> unit) ->
14 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
15 :     val do_before_add_edge :
16 :     ('e Graph.edge -> unit) ->
17 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
18 :     val do_after_add_edge :
19 :     ('e Graph.edge -> unit) ->
20 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
21 :     val do_before_remove_node :
22 :     (Graph.node_id -> unit) ->
23 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
24 :     val do_after_remove_node :
25 :     (Graph.node_id -> unit) ->
26 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
27 :     val do_before_set_in_edges :
28 :     (Graph.node_id * 'e Graph.edge list -> unit) ->
29 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
30 :     val do_after_set_in_edges :
31 :     (Graph.node_id * 'e Graph.edge list -> unit) ->
32 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
33 :     val do_before_set_out_edges :
34 :     (Graph.node_id * 'e Graph.edge list -> unit) ->
35 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
36 :     val do_after_set_out_edges :
37 :     (Graph.node_id * 'e Graph.edge list -> unit) ->
38 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
39 :     val do_before_set_entries :
40 :     (Graph.node_id list -> unit) ->
41 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
42 :     val do_after_set_entries :
43 :     (Graph.node_id list -> unit) ->
44 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
45 :     val do_before_set_exits :
46 :     (Graph.node_id list -> unit) ->
47 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
48 :     val do_after_set_exits :
49 :     (Graph.node_id list -> unit) ->
50 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
51 :     val do_before_changed : (('n,'e,'g) Graph.graph -> unit) ->
52 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
53 :     val do_after_changed : (('n,'e,'g) Graph.graph -> unit) ->
54 :     ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
55 :     end
56 :    
57 :     structure GraphWrappers : GRAPH_WRAPPERS =
58 :     struct
59 :    
60 :     structure G = Graph
61 :    
62 :     fun do_before_new_id f (G.GRAPH G) =
63 :     G.GRAPH
64 :     { name = #name G,
65 :     graph_info = #graph_info G,
66 :     new_id = fn () => (f(); #new_id G ()),
67 :     add_node = #add_node G,
68 :     add_edge = #add_edge G,
69 :     remove_node = #remove_node G,
70 :     set_in_edges = #set_in_edges G,
71 :     set_out_edges = #set_out_edges G,
72 :     set_entries = #set_entries G,
73 :     set_exits = #set_exits G,
74 :     garbage_collect = #garbage_collect G,
75 :     nodes = #nodes G,
76 :     edges = #edges G,
77 :     order = #order G,
78 :     size = #size G,
79 :     capacity = #capacity G,
80 :     out_edges = #out_edges G,
81 :     in_edges = #in_edges G,
82 :     succ = #succ G,
83 :     pred = #pred G,
84 :     has_edge = #has_edge G,
85 :     has_node = #has_node G,
86 :     node_info = #node_info G,
87 :     entries = #entries G,
88 :     exits = #exits G,
89 :     entry_edges = #entry_edges G,
90 :     exit_edges = #exit_edges G,
91 :     forall_nodes = #forall_nodes G,
92 :     forall_edges = #forall_edges G
93 :     }
94 :    
95 :     fun do_after_new_id f (G.GRAPH G) =
96 :     G.GRAPH
97 :     { name = #name G,
98 :     graph_info = #graph_info G,
99 :     new_id = fn () => let val x = #new_id G () in f x; x end,
100 :     add_node = #add_node G,
101 :     add_edge = #add_edge G,
102 :     remove_node = #remove_node G,
103 :     set_in_edges = #set_in_edges G,
104 :     set_out_edges = #set_out_edges G,
105 :     set_entries = #set_entries G,
106 :     set_exits = #set_exits G,
107 :     garbage_collect = #garbage_collect G,
108 :     nodes = #nodes G,
109 :     edges = #edges G,
110 :     order = #order G,
111 :     size = #size G,
112 :     capacity = #capacity G,
113 :     out_edges = #out_edges G,
114 :     in_edges = #in_edges G,
115 :     succ = #succ G,
116 :     pred = #pred G,
117 :     has_edge = #has_edge G,
118 :     has_node = #has_node G,
119 :     node_info = #node_info G,
120 :     entries = #entries G,
121 :     exits = #exits G,
122 :     entry_edges = #entry_edges G,
123 :     exit_edges = #exit_edges G,
124 :     forall_nodes = #forall_nodes G,
125 :     forall_edges = #forall_edges G
126 :     }
127 :    
128 :     fun do_before_add_node f (G.GRAPH G) =
129 :     G.GRAPH
130 :     { name = #name G,
131 :     graph_info = #graph_info G,
132 :     new_id = #new_id G,
133 :     add_node = fn n => (f n; #add_node G n),
134 :     add_edge = #add_edge G,
135 :     remove_node = #remove_node G,
136 :     set_in_edges = #set_in_edges G,
137 :     set_out_edges = #set_out_edges G,
138 :     set_entries = #set_entries G,
139 :     set_exits = #set_exits G,
140 :     garbage_collect = #garbage_collect G,
141 :     nodes = #nodes G,
142 :     edges = #edges G,
143 :     order = #order G,
144 :     size = #size G,
145 :     capacity = #capacity G,
146 :     out_edges = #out_edges G,
147 :     in_edges = #in_edges G,
148 :     succ = #succ G,
149 :     pred = #pred G,
150 :     has_edge = #has_edge G,
151 :     has_node = #has_node G,
152 :     node_info = #node_info G,
153 :     entries = #entries G,
154 :     exits = #exits G,
155 :     entry_edges = #entry_edges G,
156 :     exit_edges = #exit_edges G,
157 :     forall_nodes = #forall_nodes G,
158 :     forall_edges = #forall_edges G
159 :     }
160 :    
161 :     fun do_after_add_node f (G.GRAPH G) =
162 :     G.GRAPH
163 :     { name = #name G,
164 :     graph_info = #graph_info G,
165 :     new_id = #new_id G,
166 :     add_node = fn n => (#add_node G n; f n),
167 :     add_edge = #add_edge G,
168 :     remove_node = #remove_node G,
169 :     set_in_edges = #set_in_edges G,
170 :     set_out_edges = #set_out_edges G,
171 :     set_entries = #set_entries G,
172 :     set_exits = #set_exits G,
173 :     garbage_collect = #garbage_collect G,
174 :     nodes = #nodes G,
175 :     edges = #edges G,
176 :     order = #order G,
177 :     size = #size G,
178 :     capacity = #capacity G,
179 :     out_edges = #out_edges G,
180 :     in_edges = #in_edges G,
181 :     succ = #succ G,
182 :     pred = #pred G,
183 :     has_edge = #has_edge G,
184 :     has_node = #has_node G,
185 :     node_info = #node_info G,
186 :     entries = #entries G,
187 :     exits = #exits G,
188 :     entry_edges = #entry_edges G,
189 :     exit_edges = #exit_edges G,
190 :     forall_nodes = #forall_nodes G,
191 :     forall_edges = #forall_edges G
192 :     }
193 :    
194 :     fun do_before_add_edge f (G.GRAPH G) =
195 :     G.GRAPH
196 :     { name = #name G,
197 :     graph_info = #graph_info G,
198 :     new_id = #new_id G,
199 :     add_node = #add_node G,
200 :     add_edge = fn e => (f e; #add_edge G e),
201 :     remove_node = #remove_node G,
202 :     set_in_edges = #set_in_edges G,
203 :     set_out_edges = #set_out_edges G,
204 :     set_entries = #set_entries G,
205 :     set_exits = #set_exits G,
206 :     garbage_collect = #garbage_collect G,
207 :     nodes = #nodes G,
208 :     edges = #edges G,
209 :     order = #order G,
210 :     size = #size G,
211 :     capacity = #capacity G,
212 :     out_edges = #out_edges G,
213 :     in_edges = #in_edges G,
214 :     succ = #succ G,
215 :     pred = #pred G,
216 :     has_edge = #has_edge G,
217 :     has_node = #has_node G,
218 :     node_info = #node_info G,
219 :     entries = #entries G,
220 :     exits = #exits G,
221 :     entry_edges = #entry_edges G,
222 :     exit_edges = #exit_edges G,
223 :     forall_nodes = #forall_nodes G,
224 :     forall_edges = #forall_edges G
225 :     }
226 :    
227 :     fun do_after_add_edge f (G.GRAPH G) =
228 :     G.GRAPH
229 :     { name = #name G,
230 :     graph_info = #graph_info G,
231 :     new_id = #new_id G,
232 :     add_node = #add_node G,
233 :     add_edge = fn e => (#add_edge G e; f e),
234 :     remove_node = #remove_node G,
235 :     set_in_edges = #set_in_edges G,
236 :     set_out_edges = #set_out_edges G,
237 :     set_entries = #set_entries G,
238 :     set_exits = #set_exits G,
239 :     garbage_collect = #garbage_collect G,
240 :     nodes = #nodes G,
241 :     edges = #edges G,
242 :     order = #order G,
243 :     size = #size G,
244 :     capacity = #capacity G,
245 :     out_edges = #out_edges G,
246 :     in_edges = #in_edges G,
247 :     succ = #succ G,
248 :     pred = #pred G,
249 :     has_edge = #has_edge G,
250 :     has_node = #has_node G,
251 :     node_info = #node_info G,
252 :     entries = #entries G,
253 :     exits = #exits G,
254 :     entry_edges = #entry_edges G,
255 :     exit_edges = #exit_edges G,
256 :     forall_nodes = #forall_nodes G,
257 :     forall_edges = #forall_edges G
258 :     }
259 :    
260 :     fun do_before_remove_node f (G.GRAPH G) =
261 :     G.GRAPH
262 :     { name = #name G,
263 :     graph_info = #graph_info G,
264 :     new_id = #new_id G,
265 :     add_node = #add_node G,
266 :     add_edge = #add_edge G,
267 :     remove_node = fn n => (f n; #remove_node G n),
268 :     set_in_edges = #set_in_edges G,
269 :     set_out_edges = #set_out_edges G,
270 :     set_entries = #set_entries G,
271 :     set_exits = #set_exits G,
272 :     garbage_collect = #garbage_collect G,
273 :     nodes = #nodes G,
274 :     edges = #edges G,
275 :     order = #order G,
276 :     size = #size G,
277 :     capacity = #capacity G,
278 :     out_edges = #out_edges G,
279 :     in_edges = #in_edges G,
280 :     succ = #succ G,
281 :     pred = #pred G,
282 :     has_edge = #has_edge G,
283 :     has_node = #has_node G,
284 :     node_info = #node_info G,
285 :     entries = #entries G,
286 :     exits = #exits G,
287 :     entry_edges = #entry_edges G,
288 :     exit_edges = #exit_edges G,
289 :     forall_nodes = #forall_nodes G,
290 :     forall_edges = #forall_edges G
291 :     }
292 :    
293 :     fun do_after_remove_node f (G.GRAPH G) =
294 :     G.GRAPH
295 :     { name = #name G,
296 :     graph_info = #graph_info G,
297 :     new_id = #new_id G,
298 :     add_node = #add_node G,
299 :     add_edge = #add_edge G,
300 :     remove_node = fn n => (#remove_node G n; f n),
301 :     set_in_edges = #set_in_edges G,
302 :     set_out_edges = #set_out_edges G,
303 :     set_entries = #set_entries G,
304 :     set_exits = #set_exits G,
305 :     garbage_collect = #garbage_collect G,
306 :     nodes = #nodes G,
307 :     edges = #edges G,
308 :     order = #order G,
309 :     size = #size G,
310 :     capacity = #capacity G,
311 :     out_edges = #out_edges G,
312 :     in_edges = #in_edges G,
313 :     succ = #succ G,
314 :     pred = #pred G,
315 :     has_edge = #has_edge G,
316 :     has_node = #has_node G,
317 :     node_info = #node_info G,
318 :     entries = #entries G,
319 :     exits = #exits G,
320 :     entry_edges = #entry_edges G,
321 :     exit_edges = #exit_edges G,
322 :     forall_nodes = #forall_nodes G,
323 :     forall_edges = #forall_edges G
324 :     }
325 :    
326 :     fun do_before_set_in_edges f (G.GRAPH G) =
327 :     G.GRAPH
328 :     { name = #name G,
329 :     graph_info = #graph_info G,
330 :     new_id = #new_id G,
331 :     add_node = #add_node G,
332 :     add_edge = #add_edge G,
333 :     remove_node = #remove_node G,
334 :     set_in_edges = fn e => (f e; #set_in_edges G e),
335 :     set_out_edges = #set_out_edges G,
336 :     set_entries = #set_entries G,
337 :     set_exits = #set_exits G,
338 :     garbage_collect = #garbage_collect G,
339 :     nodes = #nodes G,
340 :     edges = #edges G,
341 :     order = #order G,
342 :     size = #size G,
343 :     capacity = #capacity G,
344 :     out_edges = #out_edges G,
345 :     in_edges = #in_edges G,
346 :     succ = #succ G,
347 :     pred = #pred G,
348 :     has_edge = #has_edge G,
349 :     has_node = #has_node G,
350 :     node_info = #node_info G,
351 :     entries = #entries G,
352 :     exits = #exits G,
353 :     entry_edges = #entry_edges G,
354 :     exit_edges = #exit_edges G,
355 :     forall_nodes = #forall_nodes G,
356 :     forall_edges = #forall_edges G
357 :     }
358 :    
359 :     fun do_after_set_in_edges f (G.GRAPH G) =
360 :     G.GRAPH
361 :     { name = #name G,
362 :     graph_info = #graph_info G,
363 :     new_id = #new_id G,
364 :     add_node = #add_node G,
365 :     add_edge = #add_edge G,
366 :     remove_node = #remove_node G,
367 :     set_in_edges = fn e => (#set_in_edges G e; f e),
368 :     set_out_edges = #set_out_edges G,
369 :     set_entries = #set_entries G,
370 :     set_exits = #set_exits G,
371 :     garbage_collect = #garbage_collect G,
372 :     nodes = #nodes G,
373 :     edges = #edges G,
374 :     order = #order G,
375 :     size = #size G,
376 :     capacity = #capacity G,
377 :     out_edges = #out_edges G,
378 :     in_edges = #in_edges G,
379 :     succ = #succ G,
380 :     pred = #pred G,
381 :     has_edge = #has_edge G,
382 :     has_node = #has_node G,
383 :     node_info = #node_info G,
384 :     entries = #entries G,
385 :     exits = #exits G,
386 :     entry_edges = #entry_edges G,
387 :     exit_edges = #exit_edges G,
388 :     forall_nodes = #forall_nodes G,
389 :     forall_edges = #forall_edges G
390 :     }
391 :    
392 :     fun do_before_set_out_edges f (G.GRAPH G) =
393 :     G.GRAPH
394 :     { name = #name G,
395 :     graph_info = #graph_info G,
396 :     new_id = #new_id G,
397 :     add_node = #add_node G,
398 :     add_edge = #add_edge G,
399 :     remove_node = #remove_node G,
400 :     set_out_edges = fn e => (f e; #set_out_edges G e),
401 :     set_in_edges = #set_in_edges G,
402 :     set_entries = #set_entries G,
403 :     set_exits = #set_exits G,
404 :     garbage_collect = #garbage_collect G,
405 :     nodes = #nodes G,
406 :     edges = #edges G,
407 :     order = #order G,
408 :     size = #size G,
409 :     capacity = #capacity G,
410 :     out_edges = #out_edges G,
411 :     in_edges = #in_edges G,
412 :     succ = #succ G,
413 :     pred = #pred G,
414 :     has_edge = #has_edge G,
415 :     has_node = #has_node G,
416 :     node_info = #node_info G,
417 :     entries = #entries G,
418 :     exits = #exits G,
419 :     entry_edges = #entry_edges G,
420 :     exit_edges = #exit_edges G,
421 :     forall_nodes = #forall_nodes G,
422 :     forall_edges = #forall_edges G
423 :     }
424 :    
425 :     fun do_after_set_out_edges f (G.GRAPH G) =
426 :     G.GRAPH
427 :     { name = #name G,
428 :     graph_info = #graph_info G,
429 :     new_id = #new_id G,
430 :     add_node = #add_node G,
431 :     add_edge = #add_edge G,
432 :     remove_node = #remove_node G,
433 :     set_out_edges = fn e => (#set_out_edges G e; f e),
434 :     set_in_edges = #set_in_edges G,
435 :     set_entries = #set_entries G,
436 :     set_exits = #set_exits G,
437 :     garbage_collect = #garbage_collect G,
438 :     nodes = #nodes G,
439 :     edges = #edges G,
440 :     order = #order G,
441 :     size = #size G,
442 :     capacity = #capacity G,
443 :     out_edges = #out_edges G,
444 :     in_edges = #in_edges G,
445 :     succ = #succ G,
446 :     pred = #pred G,
447 :     has_edge = #has_edge G,
448 :     has_node = #has_node G,
449 :     node_info = #node_info G,
450 :     entries = #entries G,
451 :     exits = #exits G,
452 :     entry_edges = #entry_edges G,
453 :     exit_edges = #exit_edges G,
454 :     forall_nodes = #forall_nodes G,
455 :     forall_edges = #forall_edges G
456 :     }
457 :    
458 :     fun do_before_set_entries f (G.GRAPH G) =
459 :     G.GRAPH
460 :     { name = #name G,
461 :     graph_info = #graph_info G,
462 :     new_id = #new_id G,
463 :     add_node = #add_node G,
464 :     add_edge = #add_edge G,
465 :     remove_node = #remove_node G,
466 :     set_in_edges = #set_in_edges G,
467 :     set_out_edges = #set_out_edges G,
468 :     set_entries = fn ns => (f ns; #set_entries G ns),
469 :     set_exits = #set_exits G,
470 :     garbage_collect = #garbage_collect G,
471 :     nodes = #nodes G,
472 :     edges = #edges G,
473 :     order = #order G,
474 :     size = #size G,
475 :     capacity = #capacity G,
476 :     out_edges = #out_edges G,
477 :     in_edges = #in_edges G,
478 :     succ = #succ G,
479 :     pred = #pred G,
480 :     has_edge = #has_edge G,
481 :     has_node = #has_node G,
482 :     node_info = #node_info G,
483 :     entries = #entries G,
484 :     exits = #exits G,
485 :     entry_edges = #entry_edges G,
486 :     exit_edges = #exit_edges G,
487 :     forall_nodes = #forall_nodes G,
488 :     forall_edges = #forall_edges G
489 :     }
490 :    
491 :     fun do_after_set_entries f (G.GRAPH G) =
492 :     G.GRAPH
493 :     { name = #name G,
494 :     graph_info = #graph_info G,
495 :     new_id = #new_id G,
496 :     add_node = #add_node G,
497 :     add_edge = #add_edge G,
498 :     remove_node = #remove_node G,
499 :     set_in_edges = #set_in_edges G,
500 :     set_out_edges = #set_out_edges G,
501 :     set_entries = fn ns => (#set_entries G ns; f ns),
502 :     set_exits = #set_exits G,
503 :     garbage_collect = #garbage_collect G,
504 :     nodes = #nodes G,
505 :     edges = #edges G,
506 :     order = #order G,
507 :     size = #size G,
508 :     capacity = #capacity G,
509 :     out_edges = #out_edges G,
510 :     in_edges = #in_edges G,
511 :     succ = #succ G,
512 :     pred = #pred G,
513 :     has_edge = #has_edge G,
514 :     has_node = #has_node G,
515 :     node_info = #node_info G,
516 :     entries = #entries G,
517 :     exits = #exits G,
518 :     entry_edges = #entry_edges G,
519 :     exit_edges = #exit_edges G,
520 :     forall_nodes = #forall_nodes G,
521 :     forall_edges = #forall_edges G
522 :     }
523 :    
524 :     fun do_before_set_exits f (G.GRAPH G) =
525 :     G.GRAPH
526 :     { name = #name G,
527 :     graph_info = #graph_info G,
528 :     new_id = #new_id G,
529 :     add_node = #add_node G,
530 :     add_edge = #add_edge G,
531 :     remove_node = #remove_node G,
532 :     set_in_edges = #set_in_edges G,
533 :     set_out_edges = #set_out_edges G,
534 :     set_entries = #set_entries G,
535 :     set_exits = fn ns => (f ns; #set_exits G ns),
536 :     garbage_collect = #garbage_collect G,
537 :     nodes = #nodes G,
538 :     edges = #edges G,
539 :     order = #order G,
540 :     size = #size G,
541 :     capacity = #capacity G,
542 :     out_edges = #out_edges G,
543 :     in_edges = #in_edges G,
544 :     succ = #succ G,
545 :     pred = #pred G,
546 :     has_edge = #has_edge G,
547 :     has_node = #has_node G,
548 :     node_info = #node_info G,
549 :     entries = #entries G,
550 :     exits = #exits G,
551 :     entry_edges = #entry_edges G,
552 :     exit_edges = #exit_edges G,
553 :     forall_nodes = #forall_nodes G,
554 :     forall_edges = #forall_edges G
555 :     }
556 :    
557 :     fun do_after_set_exits f (G.GRAPH G) =
558 :     G.GRAPH
559 :     { name = #name G,
560 :     graph_info = #graph_info G,
561 :     new_id = #new_id G,
562 :     add_node = #add_node G,
563 :     add_edge = #add_edge G,
564 :     remove_node = #remove_node G,
565 :     set_in_edges = #set_in_edges G,
566 :     set_out_edges = #set_out_edges G,
567 :     set_entries = #set_entries G,
568 :     set_exits = fn ns => (#set_exits G ns; f ns),
569 :     garbage_collect = #garbage_collect G,
570 :     nodes = #nodes G,
571 :     edges = #edges G,
572 :     order = #order G,
573 :     size = #size G,
574 :     capacity = #capacity G,
575 :     out_edges = #out_edges G,
576 :     in_edges = #in_edges G,
577 :     succ = #succ G,
578 :     pred = #pred G,
579 :     has_edge = #has_edge G,
580 :     has_node = #has_node G,
581 :     node_info = #node_info G,
582 :     entries = #entries G,
583 :     exits = #exits G,
584 :     entry_edges = #entry_edges G,
585 :     exit_edges = #exit_edges G,
586 :     forall_nodes = #forall_nodes G,
587 :     forall_edges = #forall_edges G
588 :     }
589 :    
590 :     fun do_before_changed f (G' as G.GRAPH G) =
591 :     G.GRAPH
592 :     { name = #name G,
593 :     graph_info = #graph_info G,
594 :     new_id = (fn x => (f G'; #new_id G x)),
595 :     add_node = (fn x => (f G'; #add_node G x)),
596 :     add_edge = (fn x => (f G'; #add_edge G x)),
597 :     remove_node = (fn x => (f G'; #remove_node G x)),
598 :     set_in_edges = (fn x => (f G'; #set_in_edges G x)),
599 :     set_out_edges = (fn x => (f G'; #set_out_edges G x)),
600 :     set_entries = (fn x => (f G'; #set_entries G x)),
601 :     set_exits = (fn x => (f G'; #set_exits G x)),
602 :     garbage_collect = #garbage_collect G,
603 :     nodes = #nodes G,
604 :     edges = #edges G,
605 :     order = #order G,
606 :     size = #size G,
607 :     capacity = #capacity G,
608 :     out_edges = #out_edges G,
609 :     in_edges = #in_edges G,
610 :     succ = #succ G,
611 :     pred = #pred G,
612 :     has_edge = #has_edge G,
613 :     has_node = #has_node G,
614 :     node_info = #node_info G,
615 :     entries = #entries G,
616 :     exits = #exits G,
617 :     entry_edges = #entry_edges G,
618 :     exit_edges = #exit_edges G,
619 :     forall_nodes = #forall_nodes G,
620 :     forall_edges = #forall_edges G
621 :     }
622 :    
623 :     fun do_after_changed f (G' as G.GRAPH G) =
624 :     G.GRAPH
625 :     { name = #name G,
626 :     graph_info = #graph_info G,
627 :     new_id = (fn x => (#new_id G x before f G')),
628 :     add_node = (fn x => (#add_node G x before f G')),
629 :     add_edge = (fn x => (#add_edge G x before f G')),
630 :     remove_node = (fn x => (#remove_node G x before f G')),
631 :     set_out_edges = (fn x => (#set_out_edges G x before f G')),
632 :     set_in_edges = (fn x => (#set_in_edges G x before f G')),
633 :     set_entries = (fn x => (#set_entries G x before f G')),
634 :     set_exits = (fn x => (#set_exits G x before f G')),
635 :     garbage_collect = #garbage_collect G,
636 :     nodes = #nodes G,
637 :     edges = #edges G,
638 :     order = #order G,
639 :     size = #size G,
640 :     capacity = #capacity G,
641 :     out_edges = #out_edges G,
642 :     in_edges = #in_edges G,
643 :     succ = #succ G,
644 :     pred = #pred G,
645 :     has_edge = #has_edge G,
646 :     has_node = #has_node G,
647 :     node_info = #node_info G,
648 :     entries = #entries G,
649 :     exits = #exits G,
650 :     entry_edges = #entry_edges G,
651 :     exit_edges = #exit_edges G,
652 :     forall_nodes = #forall_nodes G,
653 :     forall_edges = #forall_edges G
654 :     }
655 :    
656 :     end
657 :    
658 :     (*
659 :     * $Log$
660 :     *)

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