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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2399 - (view) (download)

1 : cchiw 2399 structure tOrder = struct
2 :    
3 :     local
4 :     structure E = Ein
5 :     structure EinOp = Operators
6 :     structure P= Printer
7 :     structure O= OrderEin
8 :     structure N = NormalizeEin
9 :    
10 :     in
11 :    
12 :    
13 :    
14 :     fun testO(rator, e)=(print" \n " ;print(P.printerE(e)); print(" => "); let val newbie=rator(e)
15 :     in print(P.printerE(newbie)); print(P.printerE(N.normalize(newbie))) end )
16 :    
17 :     fun createO(tester,b)= testO(tester, Ein.EIN{params=[], index=[], body=b})
18 :    
19 :    
20 :    
21 :     val o2=createO(O.orderfn,E.Prod[E.Sum(1, E.Prod[E.Tensor(0,[1]), E.Tensor(1, [1])]),E.Sum(2, E.Prod[E.Epsilon(0,2,3), E.Tensor(2,[2]), E.Tensor(3, [3]) ])])
22 :    
23 :     val os7 =createO(O.orderfn,E.Apply(E.Partial([1]),E.Sum(2,E.Prod[E.Sum(2,E.Prod[E.Epsilon(2, 3, 4), E.Tensor(0, [3]), E.Tensor(1, [4])]) ,E.Epsilon(0,1,2)])))
24 :    
25 :    
26 :     (*S11(AxB) x (CxD)*)
27 :     val os11=createO(O.orderfn,E.Prod[E.Sum(2,E.Prod[E.Epsilon(0,1,2), E.Sum(2,E.Prod[E.Epsilon(1,3,4),E.Tensor(0,[3]), E.Tensor(1, [4])]), E.Sum(2, E.Prod[E.Epsilon(2,5,6), E.Tensor(2,[5]), E.Tensor(3, [6]) ])])])
28 :    
29 :     val eps= createO(O.orderfn,E.Prod[E.Epsilon(2,5,6),E.Epsilon(1,5,6),E.Epsilon(0,5,6)])
30 :    
31 :    
32 :    
33 :    
34 :    
35 :    
36 :    
37 :     end; (* local *)
38 :    
39 :     end (* local *)

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