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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log

Revision 2502 - (download) (annotate)
Mon Nov 4 21:33:35 2013 UTC (6 years, 11 months ago) by cchiw
File size: 1246 byte(s)
mid-il fixes
structure TypeCheck = struct


structure E = Ein
structure P = Printer
structure TE= TypeEin
structure PE= PhaseEin
structure F=ExamplesF
structure N = NormalizeEin


fun tester(e,phase,expect)=

    val b= PE.checkPhase(e,phase)
    in if(b=expect) then(
          if(b=true) then (let 
             val p=print(P.printerE e)
             val a1=TE.checker(e,phase)
             val x= TE.printTy(a1)
             val (n,_)=N.normalize(e)
             val a2=TE.checker(n,phase)
in (print "==>";print(P.printerE n);TE.printTy(a1))end )
         else print "")
        else (print(P.printerE e);print "\n Failed")


val r1=List.map tester [(F.probe1,1,true),(F.probe1,2,false),(F.probe2,1,true),(F.probe3,2,false),(F.probe4,1,true),(F.probe5,2,false),(F.probe6,1,true),(F.probe7,2,false),(F.probe8,1,true),(F.probe8,2,false)]

val r1=List.map tester [(F.sum1,1,true),(F.sum2,1,true),(F.sum3,1,true),(F.sum4,1,true),(F.sum5,1,true),(F.sum6,1,true),(F.sum7,1,true),(F.sum8,1,true),(F.sum9,1,true)]

val r1=List.map tester [(F.sumapply1,1,true),(F.sumapply2,1,true),(F.sumapply3,1,true),(F.sumapply4,1,true),(F.sumapply5,1,true),(F.sumapply6,1,true),(F.sumapply7,1,true)]
end; (* local *)

end (* local *)

ViewVC Help
Powered by ViewVC 1.0.0