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/no-exit.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/graphs/no-exit.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 412 - (view) (download)

1 : monnier 411 (*
2 :     * These modules provide views in which all entry or exit edges
3 :     * are invisible.
4 :     *
5 :     * -- Allen
6 :     *)
7 :    
8 : monnier 245 signature NO_ENTRY_VIEW =
9 :     sig
10 :     val no_entry_view : ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
11 :     end
12 :    
13 :     signature NO_EXIT_VIEW =
14 :     sig
15 :     val no_exit_view : ('n,'e,'g) Graph.graph -> ('n,'e,'g) Graph.graph
16 :     end
17 :    
18 :     structure NoEntryView : NO_ENTRY_VIEW =
19 :     struct
20 :    
21 :     structure G = Graph
22 :    
23 :     fun no_entry_view (G.GRAPH G) =
24 :     let fun none _ = []
25 :     fun unimplemented _ = raise G.Readonly
26 :     in
27 :     G.GRAPH
28 :     { name = #name G,
29 :     graph_info = #graph_info G,
30 :     new_id = #new_id G,
31 :     add_node = #add_node G,
32 :     add_edge = #add_edge G,
33 :     remove_node = #remove_node G,
34 :     set_in_edges = #set_in_edges G,
35 :     set_out_edges = #set_out_edges G,
36 :     set_entries = unimplemented,
37 :     set_exits = #set_exits G,
38 :     garbage_collect = #garbage_collect G,
39 :     nodes = #nodes G,
40 :     edges = #edges G,
41 :     order = #order G,
42 :     size = #size G,
43 :     capacity = #capacity G,
44 :     out_edges = #out_edges G,
45 :     in_edges = #in_edges G,
46 :     succ = #succ G,
47 :     pred = #pred G,
48 :     has_edge = #has_edge G,
49 :     has_node = #has_node G,
50 :     node_info = #node_info G,
51 :     entries = none,
52 :     exits = #exits G,
53 :     entry_edges = none,
54 :     exit_edges = #exit_edges G,
55 :     forall_nodes = #forall_nodes G,
56 :     forall_edges = #forall_edges G
57 :     }
58 :     end
59 :     end
60 :    
61 :     structure NoExitView : NO_EXIT_VIEW =
62 :     struct
63 :    
64 :     structure G = Graph
65 :    
66 :     fun no_exit_view (G.GRAPH G) =
67 :     let fun none _ = []
68 :     fun unimplemented _ = raise G.Readonly
69 :     in
70 :     G.GRAPH
71 :     { name = #name G,
72 :     graph_info = #graph_info G,
73 :     new_id = #new_id G,
74 :     add_node = #add_node G,
75 :     add_edge = #add_edge G,
76 :     remove_node = #remove_node G,
77 :     set_in_edges = #set_in_edges G,
78 :     set_out_edges = #set_out_edges G,
79 :     set_entries = #set_entries G,
80 :     set_exits = unimplemented,
81 :     garbage_collect = #garbage_collect G,
82 :     nodes = #nodes G,
83 :     edges = #edges G,
84 :     order = #order G,
85 :     size = #size G,
86 :     capacity = #capacity G,
87 :     out_edges = #out_edges G,
88 :     in_edges = #in_edges G,
89 :     succ = #succ G,
90 :     pred = #pred G,
91 :     has_edge = #has_edge G,
92 :     has_node = #has_node G,
93 :     node_info = #node_info G,
94 :     entries = #entries G,
95 :     exits = none,
96 :     entry_edges = #entry_edges G,
97 :     exit_edges = none,
98 :     forall_nodes = #forall_nodes G,
99 :     forall_edges = #forall_edges G
100 :     }
101 :     end
102 :     end

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