Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/ein/equal.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/ein/equal.sml

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

revision 2555, Mon Mar 3 19:14:57 2014 UTC revision 2558, Mon Mar 3 22:55:30 2014 UTC
# Line 62  Line 62 
62      | (E.Sum(c,e1), E.Sum(c2,e2))=> let val gg=isEqual(e1,e2)      | (E.Sum(c,e1), E.Sum(c2,e2))=> let val gg=isEqual(e1,e2)
63          val ii= (case gg of 0=> print "sum true" |_=> print "Sum-not true")          val ii= (case gg of 0=> print "sum true" |_=> print "Sum-not true")
64          in gg end          in gg end
65  | _ =>(print "else";1)      | (E.Value i, E.Value j)=> isIndex([i],[j])
66      (*| _ =>(print "else";1)*)
67    
68  (*end case*))  (*end case*))
69    
70    
71  fun isEinEqual(e1,e2)=let  fun isEinEqual(e1,e2)=let
72          val E.EIN{params, index, body}=e1          val E.EIN{params, index, body}=e1
73          (* val pp=print(String.concat["\n EQUAL",P.printerE(e1), P.printerE(e2)])*)           val pp=print(String.concat["\n IN-EQUAL",P.printerE(e1), P.printerE(e2)])
74          val body1=body          val body1=body
75          val E.EIN{params, index, body}=e2          val E.EIN{params, index, body}=e2
76          val n=isEqual(body1,body)          val n=isEqual(body1,body)
77          in          in
78  if(n=0) then (true)  if(n=0) then (print "TRUE";true)
79  else (false)  else (print "FALSE";false)
80          end          end
81    end; (* local *)    end; (* local *)
82    

Legend:
Removed from v.2555  
changed lines
  Added in v.2558

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