Home My Page Projects Code Snippets Project Openings diderot

# 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 2463, Fri Oct 11 03:18:53 2013 UTC revision 2496, Tue Oct 29 05:29:46 2013 UTC
# Line 10  Line 10
10
11
12  val line="-----------------------------------------------"  val line="-----------------------------------------------"
13  fun testO(e)= (print line; P.printerE e ; print("     =>  ");let val ordered=(O.orderfn e)  fun testO(e)= (
14  in (P.printerE(ordered); print"\n => \n"; (let val n=N.normalize(ordered) in P.printerE(n) end)) end)          print line; P.printerE e ; print("     =>  "); let val u=(O.orderfn e)
15    in (P.printerE(u);print("     =>  "); P.printerE(N.normalize(u))  )  end
16            )
17
18
19  fun createO(b)= testO(Ein.EIN{params=[], index=[], body=b})  fun createO(b)= testO(Ein.EIN{params=[], index=[], body=b})
# Line 37  Line 39
39  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)])]
40
41
42  (*val r=List.map createO [o1,o2,o3,o4,o5]*)  val o6=E.Prod[
43        E.Sum([E.V 5, E.V 6],
44            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])]),
45        E.Sum([E.V 1,E.V 2],
46            E.Prod[E.Tensor(0,[E.V 1]),E.Value(1), E.Tensor(1,[]),E.Epsilon(0,5,6)])]
47
48
49    (*val r=List.map createO [o1,o2,o3,o4,o5,o6]
50    *)
51
52
53
54    end; (* local *)    end; (* local *)

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