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/cm/stable/verify.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/stable/verify.sml

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

revision 569, Tue Mar 7 04:01:07 2000 UTC revision 652, Tue Jun 6 02:14:56 2000 UTC
# Line 21  Line 21 
21      val verify' : GP.info -> exportmap      val verify' : GP.info -> exportmap
22          -> SrcPath.t *                  (* grouppath *)          -> SrcPath.t *                  (* grouppath *)
23             DG.sbnode list *             (* export_nodes *)             DG.sbnode list *             (* export_nodes *)
24             (SrcPath.t * GG.group) list * (* sublibs *)             GG.subgrouplist *            (* sublibs *)
25             SrcPathSet.set               (* groups *)             SrcPathSet.set *             (* groups *)
26               Version.t option
27          -> bool          -> bool
28      val verify : GP.info -> exportmap -> GG.group -> bool      val verify : GP.info -> exportmap -> GG.group -> bool
29  end  end
# Line 31  Line 32 
32    
33      type exportmap = SmlInfo.info StableMap.map      type exportmap = SmlInfo.info StableMap.map
34    
35      fun verify' (gp: GP.info) em (grouppath, export_nodes, sublibs, groups) =      fun verify' (gp: GP.info) em args = let
36      let val groups = SrcPathSet.add (groups, grouppath)          val (grouppath, export_nodes, sublibs, groups, version) = args
37            val groups = SrcPathSet.add (groups, grouppath)
38          val policy = #fnpolicy (#param gp)          val policy = #fnpolicy (#param gp)
39          fun sname p = FilenamePolicy.mkStableName policy p          val stablename =
40          val stablename = sname grouppath              FilenamePolicy.mkStableName policy (grouppath, version)
41    
42          fun invalidMember stab_t i = let          fun invalidMember stab_t i = let
43              val p = SmlInfo.sourcepath i              val p = SmlInfo.sourcepath i
# Line 49  Line 51 
51                | _ => true                | _ => true
52          end          end
53    
54          fun nonstabSublib (_, GG.GROUP { kind = GG.STABLELIB _, ... }) = false          fun nonstabSublib (_, gth) =
55            | nonstabSublib _ = true              case gth () of
56                    GG.GROUP { kind = GG.LIB { kind = GG.STABLE _,
57                                               ... }, ... } => false
58                  | _ => true
59    
60          fun invalidGroup stab_t p =          fun invalidGroup stab_t p =
61              case SrcPath.tstamp p of              case SrcPath.tstamp p of
# Line 67  Line 72 
72                      (* The group itself is included in "groups"... *)                      (* The group itself is included in "groups"... *)
73                      not (SrcPathSet.exists (invalidGroup st) groups) andalso                      not (SrcPathSet.exists (invalidGroup st) groups) andalso
74                      not (List.exists nonstabSublib sublibs) andalso                      not (List.exists nonstabSublib sublibs) andalso
75                      validStamp (grouppath, export_nodes, sublibs) andalso                      validStamp ((grouppath, export_nodes, sublibs), version)
76                      not (SmlInfoSet.exists (invalidMember st) m)                      andalso not (SmlInfoSet.exists (invalidMember st) m)
77                  end                  end
78                | _ => false                | _ => false
79      in      in
# Line 78  Line 83 
83          isValid          isValid
84      end      end
85    
86      fun verify gp em (group as GG.GROUP g) = let      fun verify _ _ GG.ERRORGROUP = false
87          val { exports, grouppath, sublibs, ... } = g        | verify gp em (group as GG.GROUP g) = let
88                val { exports, grouppath, sublibs, kind, ... } = g
89          val groups = Reachable.groupsOf group          val groups = Reachable.groupsOf group
90                val version =
91                    case kind of
92                        GG.NOLIB _ => NONE
93                      | GG.LIB { version, ... } => version
94                fun force f = f ()
95      in      in
96          verify' gp em (grouppath,          verify' gp em (grouppath,
97                         map (#2 o #1) (SymbolMap.listItems exports),                             map (#2 o force o #1) (SymbolMap.listItems exports),
98                         sublibs, groups)                             sublibs, groups, version)
99      end      end
100  end  end
101  end  end

Legend:
Removed from v.569  
changed lines
  Added in v.652

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