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 2408 - (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 : cchiw 2408 fun testO(rator, e)= print ""
15 :    
16 :     (*(print" \n " ;print(P.printerE(e)); print(" => "); let val newbie=rator(e)
17 : cchiw 2399 in print(P.printerE(newbie)); print(P.printerE(N.normalize(newbie))) end )
18 : cchiw 2408 *)
19 : cchiw 2399 fun createO(tester,b)= testO(tester, Ein.EIN{params=[], index=[], body=b})
20 :    
21 :    
22 :    
23 :     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]) ])])
24 :    
25 :     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)])))
26 :    
27 :    
28 :     (*S11(AxB) x (CxD)*)
29 :     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]) ])])])
30 :    
31 :     val eps= createO(O.orderfn,E.Prod[E.Epsilon(2,5,6),E.Epsilon(1,5,6),E.Epsilon(0,5,6)])
32 :    
33 :    
34 :    
35 :    
36 :    
37 :    
38 :    
39 :     end; (* local *)
40 :    
41 :     end (* local *)

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