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

SCM Repository

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

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

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

revision 2484, Sun Oct 20 11:50:37 2013 UTC revision 2485, Mon Oct 21 16:34:57 2013 UTC
# Line 28  Line 28 
28              | E.Tensor(id, alpha) =>String.concat[" T",Int.toString(id),"_",printAlpha alpha]              | E.Tensor(id, alpha) =>String.concat[" T",Int.toString(id),"_",printAlpha alpha]
29              | E.Field(id, []) =>String.concat[" F",Int.toString(id)]              | E.Field(id, []) =>String.concat[" F",Int.toString(id)]
30              | E.Field(id, alpha) =>String.concat[" F",Int.toString(id),"_",printAlpha alpha]              | E.Field(id, alpha) =>String.concat[" F",Int.toString(id),"_",printAlpha alpha]
31              | E.Kernel([]) =>String.concat["h"]  
32              | E.Kernel(betas) =>String.concat["h^{",String.concat(List.map handleBeta betas),"}"]  
33                | E.Krn([],pos) =>String.concat["h [",  (printbody pos),"]"]
34    
35                | E.Krn(betas,pos) =>String.concat["h^{",String.concat(List.map handleBeta betas),"} [",
36                    (printbody pos),"]"]
37    
38    
39              | E.Delta(ix) =>  handleBeta ix              | E.Delta(ix) =>  handleBeta ix
40              | E.Value(ix)=> String.concat["_",Int.toString(ix),"_"]              | E.Value(ix)=> String.concat["_",Int.toString(ix),"_"]
41              | E.Epsilon(ix, jx, kx) => String.concat["E_",Int.toString(ix), Int.toString(jx), Int.toString(kx)]              | E.Epsilon(ix, jx, kx) => String.concat["E_",Int.toString(ix), Int.toString(jx), Int.toString(kx)]
42              | E.Sum (alpha,e1)=> String.concat["Sigma:", printAlpha alpha," (", printbody e1,")"]              | E.Sum (alpha,e1)=> String.concat["\n \t Sigma:", printAlpha alpha," (", printbody e1,")"]
43              | E.Neg e1 => String.concat["-", printbody e1]              | E.Neg e1 => String.concat["-", printbody e1]
44              | E.Add el => String.concat["(",String.concatWith "+" (List.map printbody el),")"]              | E.Add el => String.concat["(",String.concatWith "+" (List.map printbody el),")"]
45              | E.Sub(e1, e2) => String.concat ["(",printbody(e1),"- ",printbody(e2), ")"]              | E.Sub(e1, e2) => String.concat ["(",printbody(e1),"- ",printbody(e2), ")"]
# Line 44  Line 50 
50  | E.Conv(e1, [])=> String.concat["|",printbody(e1), "★h|"]  | E.Conv(e1, [])=> String.concat["|",printbody(e1), "★h|"]
51  | E.Conv(e1, alpha)=> String.concat["|",printbody(e1), "★ d/dx_{",printAlpha alpha,"}h|"]  | E.Conv(e1, alpha)=> String.concat["|",printbody(e1), "★ d/dx_{",printAlpha alpha,"}h|"]
52              | E.Probe (e1,e2)=> String.concat ["",printbody(e1), "","[", printbody(e2),"]"]              | E.Probe (e1,e2)=> String.concat ["",printbody(e1), "","[", printbody(e2),"]"]
53                | E.Img ((e1,pos),hs)=> String.concat [printbody e1, "[",
54                    (String.concatWith "," (List.map printbody pos)),"] *",String.concatWith "*" (List.map printbody hs)]
55    
56                (*
57              | E.Image(e1::es)=> let              | E.Image(e1::es)=> let
58                      val position=  String.concatWith "," (List.map printbody es)                      val position=  String.concatWith "," (List.map printbody es)
59                  in                  in
60                      String.concat [printbody(e1),"[", position,"]"]                      String.concat [printbody(e1),"[", position,"]"]
61                  end                  end
62                *)
63    
64              (* end case *))              (* end case *))
65          fun printerE (Ein.EIN{params, index, body}) = let          fun printerE (Ein.EIN{params, index, body}) = let
66          fun Index ((E.IX(dim))::i, count) = String.concat["(", Int.toString count,          fun Index ((E.IX(dim))::i, count) = String.concat["(", Int.toString count,

Legend:
Removed from v.2484  
changed lines
  Added in v.2485

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