/[svn]/types/types.ml
ViewVC logotype

Diff of /types/types.ml

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

revision 68 by abate, Tue Jul 10 17:03:05 2007 UTC revision 69 by abate, Tue Jul 10 17:03:11 2007 UTC
# Line 51  Line 51 
51    let any_record = { empty with record = any.record }    let any_record = { empty with record = any.record }
52    
53    let cup x y =    let cup x y =
54      if x == y then x else {      if x = y then x else {
55        times = Boolean.cup x.times y.times;        times = Boolean.cup x.times y.times;
56        arrow = Boolean.cup x.arrow y.arrow;        arrow = Boolean.cup x.arrow y.arrow;
57        record= Boolean.cup x.record y.record;        record= Boolean.cup x.record y.record;
# Line 61  Line 61 
61      }      }
62    
63    let cap x y =    let cap x y =
64      if x == y then x else {      if x = y then x else {
65        times = Boolean.cap x.times y.times;        times = Boolean.cap x.times y.times;
66        record= Boolean.cap x.record y.record;        record= Boolean.cap x.record y.record;
67        arrow = Boolean.cap x.arrow y.arrow;        arrow = Boolean.cap x.arrow y.arrow;
# Line 71  Line 71 
71      }      }
72    
73    let diff x y =    let diff x y =
74      if x == y then empty else {      if x = y then empty else {
75        times = Boolean.diff x.times y.times;        times = Boolean.diff x.times y.times;
76        arrow = Boolean.diff x.arrow y.arrow;        arrow = Boolean.diff x.arrow y.arrow;
77        record= Boolean.diff x.record y.record;        record= Boolean.diff x.record y.record;
# Line 83  Line 83 
83    let neg x = diff any x    let neg x = diff any x
84    
85    let equal e a b =    let equal e a b =
     if not (Intervals.equal a.ints b.ints) then raise NotEqual;  
86      if a.atoms <> b.atoms then raise NotEqual;      if a.atoms <> b.atoms then raise NotEqual;
87      if a.chars <> b.chars then raise NotEqual;      if a.chars <> b.chars then raise NotEqual;
88        if a.ints <> b.ints then raise NotEqual;
89      Boolean.equal (fun (x1,x2) (y1,y2) -> e x1 y1; e x2 y2) a.times b.times;      Boolean.equal (fun (x1,x2) (y1,y2) -> e x1 y1; e x2 y2) a.times b.times;
90      Boolean.equal (fun (x1,x2) (y1,y2) -> e x1 y1; e x2 y2) a.arrow b.arrow;      Boolean.equal (fun (x1,x2) (y1,y2) -> e x1 y1; e x2 y2) a.arrow b.arrow;
91      Boolean.equal (fun (l1,o1,x1) (l2,o2,x2) ->      Boolean.equal (fun (l1,o1,x1) (l2,o2,x2) ->
# Line 102  Line 102 
102      }      }
103    
104    let hash h a =    let hash h a =
105        Hashtbl.hash (map h a)
106    (*
107      (Hashtbl.hash { (map h a) with ints = Intervals.empty })      (Hashtbl.hash { (map h a) with ints = Intervals.empty })
108      + (Intervals.hash a.ints)      + (Intervals.hash a.ints)
109    *)
110    
111    let iter f a =    let iter f a =
112      ignore (map f a)      ignore (map f a)

Legend:
Removed from v.68  
changed lines
  Added in v.69

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5