SCM Repository
[smlnj] / sml / trunk / src / MLRISC / visualization / graphViewer.sml |
View of /sml/trunk/src/MLRISC/visualization/graphViewer.sml
Parent Directory
|
Revision Log
Revision 412 -
(download)
(annotate)
Fri Sep 3 00:25:03 1999 UTC (20 years, 3 months ago) by monnier
File size: 1279 byte(s)
Fri Sep 3 00:25:03 1999 UTC (20 years, 3 months ago) by monnier
File size: 1279 byte(s)
This commit was generated by cvs2svn to compensate for changes in r411, which included commits to RCS files with non-trunk default branches.
(* * This module starts a graph viewer. * * -- Allen *) functor GraphViewerFn(D : GRAPH_DISPLAY) : GRAPH_VIEWER = struct structure L = GraphLayout structure G = Graph structure FileSys = OS.FileSys fun display exec (layout as G.GRAPH l) filename = let val filename = filename ^ D.suffix() val _ = print("[ "^ #name l^": "^ D.program() ^ " " ^ filename ^ " "^Int.toString(#order l ())^" nodes"^ " "^Int.toString(#size l ())^" edges"); val file = TextIO.openOut filename val out = fn s => TextIO.output(file,s) val _ = D.visualize out layout val _ = TextIO.closeOut file val _ = print(" ]\n") val _ = exec filename in () end handle e => (print("[Uncaught exception in "^exnName e^" graph viewer]\n"); raise e) fun system filename = (OS.Process.system ((D.program()) ^ " " ^ filename); FileSys.remove filename) fun fork filename = (OS.Process.system( "(" ^ (D.program()) ^ " " ^ filename ^ "; /bin/rm " ^ filename ^ ") &")) fun view layout = display system layout (FileSys.tmpName()) end
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |