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 2602, Wed Apr 23 20:01:52 2014 UTC revision 2603, Thu Apr 24 03:58:37 2014 UTC
# Line 24  Line 24 
24      | (E.Delta(ix,jx), E.Delta(ix2,jx2))=>isIndex([ix, jx],[ix2, jx2])      | (E.Delta(ix,jx), E.Delta(ix2,jx2))=>isIndex([ix, jx],[ix2, jx2])
25       | (E.Epsilon(i,j,k),E.Epsilon(i2,j2,k2))=>(print "EPs-";       | (E.Epsilon(i,j,k),E.Epsilon(i2,j2,k2))=>(print "EPs-";
26          isIndex([i,j,k], [i2, j2, k2]))          isIndex([i,j,k], [i2, j2, k2]))
27        | (E.Lift e1, E.Lift e2)=> isEqual(e1,e2)
28      | (E.Neg e1, E.Neg e2)=> isEqual(e1,e2)      | (E.Neg e1, E.Neg e2)=> isEqual(e1,e2)
29      | (E.Add es, E.Add es2)=>let      | (E.Add es, E.Add es2)=>let
30          fun filter([],[])=0          fun filter([],[])=0
# Line 64  Line 65 
65          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")
66          in gg end          in gg end
67      | (E.Value i, E.Value j)=> isIndex([i],[j])      | (E.Value i, E.Value j)=> isIndex([i],[j])
68    (*| _ =>(print "else";1)*)      | _ =>(print "else";1)
69    
70  (*end case*))  (*end case*))
71    
72    
73  fun isEinEqual(e1,e2)=let  fun isEinEqual(e1,e2)=let
74          val E.EIN{params, index, body}=e1          val E.EIN{params, index, body}=e1
75         (*  val pp=print(String.concat["\n IN-EQUAL",P.printerE(e1), P.printerE(e2)])*)          (* val pp=print(String.concat["\n IN-EQUAL",P.printerE(e1), " with ",P.printerE(e2)])*)
76          val body1=body          val body1=body
77          val E.EIN{params, index, body}=e2          val E.EIN{params, index, body}=e2
78          val n=isEqual(body1,body)          val n=isEqual(body1,body)

Legend:
Removed from v.2602  
changed lines
  Added in v.2603

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