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

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/visualization/graphViewer.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/visualization/graphViewer.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 245, Sat Apr 17 18:47:12 1999 UTC revision 411, Fri Sep 3 00:25:03 1999 UTC
# Line 1  Line 1 
1    (*
2     * This module starts a graph viewer.
3     *
4     * -- Allen
5     *)
6    
7  functor GraphViewerFn(D : GRAPH_DISPLAY) : GRAPH_VIEWER =  functor GraphViewerFn(D : GRAPH_DISPLAY) : GRAPH_VIEWER =
8  struct  struct
9    
# Line 8  Line 14 
14     fun display exec (layout as G.GRAPH l) filename =     fun display exec (layout as G.GRAPH l) filename =
15        let val filename  = filename ^ D.suffix()        let val filename  = filename ^ D.suffix()
16            val _     = print("[ "^ #name l^": "^            val _     = print("[ "^ #name l^": "^
17                              D.program() ^ " " ^ filename ^ " ]\n")                              D.program() ^ " " ^ filename ^
18                                " "^Int.toString(#order l ())^" nodes"^
19                                " "^Int.toString(#size l ())^" edges");
20            val file  = TextIO.openOut filename            val file  = TextIO.openOut filename
21            val out   = fn s => TextIO.output(file,s)            val out   = fn s => TextIO.output(file,s)
22            val _     = D.visualize out layout            val _     = D.visualize out layout
23            val _     = TextIO.closeOut file            val _     = TextIO.closeOut file
24              val _     = print(" ]\n")
25            val _     = exec filename            val _     = exec filename
26        in        in
27            ()            ()
# Line 23  Line 32 
32                             ((D.program()) ^ " " ^ filename);                             ((D.program()) ^ " " ^ filename);
33                            FileSys.remove filename)                            FileSys.remove filename)
34    
35       fun fork filename = (OS.Process.system(
36                              "(" ^ (D.program()) ^ " " ^ filename ^
37                                  "; /bin/rm " ^ filename ^ ") &"))
38    
39     fun view layout = display system layout (FileSys.tmpName())     fun view layout = display system layout (FileSys.tmpName())
40  end  end
41    
 (*  
  * $Log$  
  *)  

Legend:
Removed from v.245  
changed lines
  Added in v.411

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