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

SCM Repository

[diderot] Diff of /branches/charisee_dev/src/compiler/ein/printer.sml
ViewVC logotype

Diff of /branches/charisee_dev/src/compiler/ein/printer.sml

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

revision 2603, Thu Apr 24 03:58:37 2014 UTC revision 2605, Wed Apr 30 01:46:09 2014 UTC
# Line 12  Line 12 
12    
13  fun handleIndex e= (case e  fun handleIndex e= (case e
14      of E.C(cx)=> String.concat["'",Int.toString(cx),"'"]      of E.C(cx)=> String.concat["'",Int.toString(cx),"'"]
15      |  E.V(ix)=> Int.toString(ix)          |  E.V(ix)=> Int.toString(ix))
 )  
16    
17  fun handleAlpha alpha= String.concat[String.concatWith "," (List.map handleIndex alpha)]  fun handleAlpha alpha= String.concat[String.concatWith "," (List.map handleIndex alpha)]
   
   
18  fun handleBeta(a,b)=String.concat["δ_(",handleIndex a, ",", handleIndex b,")"]  fun handleBeta(a,b)=String.concat["δ_(",handleIndex a, ",", handleIndex b,")"]
   
19  fun handleSumRange (mu,lb,ub)= String.concat[(handleIndex mu),"[",Int.toString(lb),"-",Int.toString(ub),"]"]  fun handleSumRange (mu,lb,ub)= String.concat[(handleIndex mu),"[",Int.toString(lb),"-",Int.toString(ub),"]"]
20    
21  fun printbody term = (case term  fun printbody term = (case term
# Line 47  Line 43 
43      | E.Probe (e1,e2)=> String.concat ["[",printbody(e1), "","[", printbody(e2),"]]"]      | E.Probe (e1,e2)=> String.concat ["[",printbody(e1), "","[", printbody(e2),"]]"]
44      | E.Img (fid,alpha,pos)=> String.concat [" V", Int.toString(fid),"_",handleAlpha alpha,"[",      | E.Img (fid,alpha,pos)=> String.concat [" V", Int.toString(fid),"_",handleAlpha alpha,"[",
45                  (String.concatWith "," (List.map printbody pos)),"]"]                  (String.concatWith "," (List.map printbody pos)),"]"]
   
   
   
46              (* end case *))              (* end case *))
47    
48          fun printerE (Ein.EIN{params, index, body}) = let          fun printerE (Ein.EIN{params, index, body}) = let
49          fun Index (dim::i, count) = String.concat["(", Int.toString count,          fun Index (dim::i, count) = String.concat["(", Int.toString count,
50                  " DIM:", Int.toString dim, ")", Index(i,count+1)]                  " DIM:", Int.toString dim, ")", Index(i,count+1)]
# Line 69  Line 63 
63              str              str
64          end          end
65    
        (* fun printerApp(R.App(e,l))= printerE(e)  
             | printerApp(_)= ""*)  
   
66      end (* local *)      end (* local *)
67    end    end

Legend:
Removed from v.2603  
changed lines
  Added in v.2605

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