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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/einTest/testNormalize.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/einTest/testNormalize.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2493, Tue Oct 22 15:32:46 2013 UTC revision 2494, Wed Oct 23 14:32:58 2013 UTC
# Line 13  Line 13 
13    
14    
15    
 (*  
 using product  
 F@(x)=> V*h @(x)  
   
 (nabla F)@(x)=> (nabla conv) @(x)  
 (nabla conv) @(x)=> (v * nabla h )@ (x)  
 Probe(Conv...,x)  
   
 using apply  
 (Apply(nabla, F))@(x)=>Apply(nabla, conv), (x)  
 Apply(nabla, conv ), (x)=> (v nabla h ),(x)  
 *)  
   
   
   
   
16    
17    
18    
# Line 38  Line 22 
22    
23    
24  fun test(e)=   (print"------------------ " ; P.printerE(e);  fun test(e)=   (print"------------------ " ; P.printerE(e);
25      let val n=N.normalize(e) in n end )  let val n=N.normalize(e) in (P.printerE(n);n) end )
26    
27    
28  fun create(b)= E.EIN{params=[], index=[], body=b}  fun create(b)= E.EIN{params=[], index=[], body=b}
# Line 47  Line 31 
31    
32    
33  fun tester(e)=  List.map (fn(e1)=>  fun tester(e)=  List.map (fn(e1)=>
34      let val norm=test(create e1) in print" \n ------------------------"   end )    e  let val norm=test(create e1) in (print" \n ------------------------";norm )end)    e
35    
36  fun tester2(e)=  List.map (fn(e1)=>  fun tester2(e)=  List.map (fn(e1)=>
37  let val norm=test(e1) in print" \n ------------------------"   end )    e  let val norm=test(e1) in (print" \n ------------------------"; norm)   end )    e
38    
39    
40    
# Line 83  Line 67 
67      val r7=[X.R7,X.R7b,X.R7c,X.R7d,X.R7e]      val r7=[X.R7,X.R7b,X.R7c,X.R7d,X.R7e]
68      val r8=[X.R8,X.R8b,X.R8c,X.R8d,X.R8e]      val r8=[X.R8,X.R8b,X.R8c,X.R8d,X.R8e]
69      val r9=[X.R9,X.R9b,X.R9c,X.R9d]      val r9=[X.R9,X.R9b,X.R9c,X.R9d]
70      val r10=[X.R10, X.R10b, X.R10c,X.R10d, X.R10e, X.R10f,X.R10g,X.R10h,X.R10i]  
71        (*val r10=[X.R10, X.R10a,X.R10b, X.R10c,X.R10d, X.R10e, X.R10f,X.R10g,X.R10h,X.R10i]*)
72    
73        val r10 =[X.R10f, X.R10h]
74      val r11=[X.R11,X.R11b, X.R11c, X.R11d, X.R11e]      val r11=[X.R11,X.R11b, X.R11c, X.R11d, X.R11e]
75      val r12=[X.R12,X.R12b, X.R12c, X.R12d,X.R12e,X.R12f, X.R12g, X.R12h,X.R12i,X.R12j, X.R12k, X.R12l,X.R12m,X.R12n, X.R12o, X.R12p,X.R12q, X.R12r]      val r12=[X.R12,X.R12b, X.R12c, X.R12d,X.R12e,X.R12f, X.R12g, X.R12h,X.R12i,X.R12j, X.R12k, X.R12l,X.R12m,X.R12n, X.R12o, X.R12p,X.R12q, X.R12r]
76      val r13=[X.R13, X.R13b, X.R13c]      val r13=[X.R13, X.R13b, X.R13c]
# Line 116  Line 103 
103    
104    
105    
   
106  (*Test Nnormalize, against should be answer*)  (*Test Nnormalize, against should be answer*)
107  fun runEqual (set)=  fun runEqual (set)=
108       let       let
# Line 131  Line 117 
117    
118    
119  (*Run test on normalzie*)  (*Run test on normalzie*)
120  (*val r1=run 23*)  val r1=List.map run [10]
121  val r3=runEqual 0  
122    (*val r3=runEqual 0*)
123    
124    
125    

Legend:
Removed from v.2493  
changed lines
  Added in v.2494

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