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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/einTest/testOrder.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/einTest/testOrder.sml

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

revision 2496, Tue Oct 29 05:29:46 2013 UTC revision 2499, Mon Nov 4 16:10:36 2013 UTC
# Line 2  Line 2 
2    
3      local      local
4      structure E = Ein      structure E = Ein
     structure EinOp = Operators  
5      structure P= Printer      structure P= Printer
6      structure O= OrderEin      structure O= OrderEin
7      structure N = NormalizeEin      structure N = NormalizeEin
# Line 11  Line 10 
10    
11  val line="-----------------------------------------------"  val line="-----------------------------------------------"
12  fun testO(e)= (  fun testO(e)= (
13          print line; P.printerE e ; print("     =>  "); let val u=(O.orderfn e)          print line; print (P.printerE e ); print("     =>  "); let val u=(O.orderfn e)
14  in (P.printerE(u);print("     =>  "); P.printerE(N.normalize(u))  )  end  in (print(P.printerE(u));print("     =>  "); print(P.printerE(N.normalize(u)))  )  end
15          )          )
16    
17    
# Line 20  Line 19 
19    
20    
21    
22  val o1=E.Prod[E.Sum([E.V 1], E.Prod[E.Tensor(0,[E.V 1]), E.Tensor(1, [E.V 1])]),  val o1=E.Prod[E.Sum([(E.V 1,0,3)], E.Prod[E.Tensor(0,[E.V 1]), E.Tensor(1, [E.V 1])]),
23                E.Sum([E.V 2, E.V 3], E.Prod[E.Epsilon(0,2,3), E.Tensor(2,[E.V 2]), E.Tensor(3, [E.V 3])])]                E.Sum([(E.V 2,0,3), (E.V 3,0,3)], E.Prod[E.Epsilon(0,2,3), E.Tensor(2,[E.V 2]), E.Tensor(3, [E.V 3])])]
24    
25  val o2 =E.Apply(E.Partial([E.V 1]),E.Sum([E.V 1],E.Prod[E.Sum([E.V 3, E.V 4],E.Prod[E.Epsilon(2, 3, 4), E.Tensor(0, [E.V 3]), E.Tensor(1, [E.V 4])]) ,E.Epsilon(0,1,2)]))  val o2 =E.Apply(E.Partial([E.V 1]),E.Sum([(E.V 1,0,3)],E.Prod[E.Sum([(E.V 3,0,3),( E.V 4,0,3)],E.Prod[E.Epsilon(2, 3, 4), E.Tensor(0, [E.V 3]), E.Tensor(1, [E.V 4])]) ,E.Epsilon(0,1,2)]))
26    
27    
28  (*S11(AxB) x (CxD)*)  (*S11(AxB) x (CxD)*)
29  val o3=E.Prod[E.Sum([E.V 1, E.V 2],  val o3=E.Prod[E.Sum([(E.V 1,0,3), (E.V 2,0,3)],
30      E.Prod[E.Epsilon(0,1,2),      E.Prod[E.Epsilon(0,1,2),
31      E.Sum([E.V 3, E.V 4],E.Prod[E.Epsilon(1,3,4),E.Tensor(0,[E.V 3]), E.Tensor(1, [E.V 4])]),      E.Sum([(E.V 3,0,3), (E.V 4,0,3)],E.Prod[E.Epsilon(1,3,4),E.Tensor(0,[E.V 3]), E.Tensor(1, [E.V 4])]),
32      E.Sum([E.V 5, E.V 6], E.Prod[E.Epsilon(2,5,6), E.Tensor(2,[E.V 5]), E.Tensor(3, [E.V 6]) ])]      E.Sum([(E.V 5,0,3), (E.V 6,0,3)], E.Prod[E.Epsilon(2,5,6), E.Tensor(2,[E.V 5]), E.Tensor(3, [E.V 6]) ])]
33  )]  )]
34    
35    
36  val o4=E.Prod[E.Epsilon(2,5,6),E.Delta(E.V 1,E.V 2),E.Epsilon(1,5,6),E.Tensor(0,[E.V 1]),E.Epsilon(0,5,6)]  val o4=E.Prod[E.Epsilon(2,5,6),E.Delta(E.V 1,E.V 2),E.Epsilon(1,5,6),E.Tensor(0,[E.V 1]),E.Epsilon(0,5,6)]
37    
38  val o5=E.Prod[E.Sum([E.V 5, E.V 6],E.Prod[E.Epsilon(2,5,6),E.Delta(E.V 1,E.V 2),E.Epsilon(1,5,6)]),E.Sum([E.V 1,E.V 2],E.Prod[E.Tensor(0,[E.V 1]),E.Epsilon(0,5,6)])]  val o5=E.Prod[E.Sum([(E.V 5,0,3), (E.V 6,0,3)],E.Prod[E.Epsilon(2,5,6),E.Delta(E.V 1,E.V 2),E.Epsilon(1,5,6)]),E.Sum([(E.V 1,0,3), (E.V 2,0,3)],E.Prod[E.Tensor(0,[E.V 1]),E.Epsilon(0,5,6)])]
39    
40    
41  val o6=E.Prod[  val o6=E.Prod[
42      E.Sum([E.V 5, E.V 6],      E.Sum([(E.V 5,0,3), (E.V 6,0,3)],
43          E.Prod[E.Epsilon(2,0,3),E.Delta(E.V 1,E.V 2),E.Epsilon(1,5,6),E.Tensor(1,[E.V 0])]),          E.Prod[E.Epsilon(2,0,3),E.Delta(E.V 1,E.V 2),E.Epsilon(1,5,6),E.Tensor(1,[E.V 0])]),
44      E.Sum([E.V 1,E.V 2],      E.Sum([(E.V 1,0,3), (E.V 2,0,3)],
45          E.Prod[E.Tensor(0,[E.V 1]),E.Value(1), E.Tensor(1,[]),E.Epsilon(0,5,6)])]          E.Prod[E.Tensor(0,[E.V 1]),E.Value(1), E.Tensor(1,[]),E.Epsilon(0,5,6)])]
46    
47    
48  (*val r=List.map createO [o1,o2,o3,o4,o5,o6]  (*
49    val r=List.map createO [o1,o2,o3,o4,o5,o6]
50  *)  *)
51    
52    

Legend:
Removed from v.2496  
changed lines
  Added in v.2499

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