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
 [diderot] / branches / charisee / src / compiler / einTest / testOrder.sml

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

revision 2449, Thu Oct 3 20:15:16 2013 UTC revision 2463, Fri Oct 11 03:18:53 2013 UTC
# Line 5  Line 5
5      structure EinOp = Operators      structure EinOp = Operators
6      structure P= Printer      structure P= Printer
7      structure O= OrderEin      structure O= OrderEin
8        structure N = NormalizeEin
9      in      in
10
11
12  val line="-----------------------------------------------"  val line="-----------------------------------------------"
13  fun testO(e)= (print line; P.printerE e ; print("     =>  "); P.printerE(O.orderfn e))  fun testO(e)= (print line; P.printerE e ; print("     =>  ");let val ordered=(O.orderfn e)
14    in (P.printerE(ordered); print"\n => \n"; (let val n=N.normalize(ordered) in P.printerE(n) end)) end)
15
16
17  fun createO(b)= testO(Ein.EIN{params=[], index=[], body=b})  fun createO(b)= testO(Ein.EIN{params=[], index=[], body=b})
# Line 35  Line 36
36
37  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, 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)])]
38
39  (*
40  val r=List.map createO [o1,o2,o3,o4,o5]  (*val r=List.map createO [o1,o2,o3,o4,o5]*)
41  *)
42
43
44

Legend:
 Removed from v.2449 changed lines Added in v.2463

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