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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2399 - (download) (annotate)
Sun Jul 7 02:22:44 2013 UTC (7 years, 3 months ago) by cchiw
File size: 1122 byte(s)
Tester
structure  tOrder = struct

    local
    structure E = Ein
    structure EinOp = Operators
    structure P= Printer
    structure O= OrderEin
	structure N = NormalizeEin

    in



fun testO(rator, e)=(print" \n " ;print(P.printerE(e)); print("     =>  "); let val newbie=rator(e)
in print(P.printerE(newbie)); print(P.printerE(N.normalize(newbie))) end )

fun createO(tester,b)= testO(tester, Ein.EIN{params=[], index=[], body=b})



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]) ])])

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)])))


(*S11(AxB) x (CxD)*)
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]) ])])])

val eps= createO(O.orderfn,E.Prod[E.Epsilon(2,5,6),E.Epsilon(1,5,6),E.Epsilon(0,5,6)])







  end; (* local *)

    end (* local *)

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