src/Tools/isac/xmlsrc/pbl-met-hierarchy.sml
branchisac-update-Isa09-2
changeset 38031 460c24a6a6ba
parent 38015 67ba02dffacc
child 38050 4c52ad406c20
     1.1 --- a/src/Tools/isac/xmlsrc/pbl-met-hierarchy.sml	Tue Sep 28 08:58:06 2010 +0200
     1.2 +++ b/src/Tools/isac/xmlsrc/pbl-met-hierarchy.sml	Tue Sep 28 09:06:56 2010 +0200
     1.3 @@ -11,13 +11,13 @@
     1.4      in (TextIO.output (file, str);
     1.5  	TextIO.flushOut file;
     1.6  	TextIO.closeOut file) end;
     1.7 -fun pos2filename [] = raise error "pos2filename called with []"
     1.8 +fun pos2filename [] = error "pos2filename called with []"
     1.9    | pos2filename [i] = "_" ^ string_of_int i ^ ".xml"
    1.10    | pos2filename (i::is) = "_" ^ string_of_int i ^ pos2filename is;
    1.11  (* pos2filename [1,22,3];
    1.12  val it = "_1_22_3.xml" : string
    1.13  *)
    1.14 -fun id2filename [] = raise error "id2filename called with []"
    1.15 +fun id2filename [] = error "id2filename called with []"
    1.16    | id2filename [s] = s ^ ".xml"
    1.17    | id2filename (s::ss) = s ^ "_" ^ id2filename ss;
    1.18  (* id2filename ["linear","univariate","equation"];
    1.19 @@ -77,7 +77,7 @@
    1.20  	and nds _ _ [] = ""
    1.21  	  | nds i p (n::ns) = (nd i p n) ^ (nds i (lev_on p) ns);
    1.22      in nds j [0] h  : xml end;
    1.23 -(* (tracing o hierarchy_pbl) (!ptyps);
    1.24 +(* (writeln o hierarchy_pbl) (!ptyps);
    1.25     *)
    1.26  
    1.27  fun pbl_hierarchy2file (path:path) = 
    1.28 @@ -192,7 +192,7 @@
    1.29  (* 
    1.30  val pblID = ["linear","univariate","equation"];
    1.31  val pblID = ["degree_4","polynomial","univariate","equation"];
    1.32 -tracing (pbl2xml pblID (get_pbt pblID));
    1.33 +writeln (pbl2xml pblID (get_pbt pblID));
    1.34  *)
    1.35  
    1.36  (*replace by 'fun calc2xml' as developed for thy in 0607*)
    1.37 @@ -270,7 +270,7 @@
    1.38      authors2xml i "COURSEDESIGNS" ["isac team 2006"] ^
    1.39      "</NODECONTENT>" : xml;
    1.40  
    1.41 -(* tracing (met2xml ["Test", "solve_linear"]
    1.42 +(* writeln (met2xml ["Test", "solve_linear"]
    1.43  		    (get_met ["Test", "solve_linear"]));
    1.44     *)
    1.45  
    1.46 @@ -278,14 +278,14 @@
    1.47  
    1.48  (*.write the files using an int-key (pos') as filename.*)
    1.49  fun pbl2file (path:path) (pos:pos) (id:metID) (pbl as {guh,...}) =
    1.50 -    (tracing ("### pbl2file: id = " ^ strs2str id);
    1.51 +    (writeln ("### pbl2file: id = " ^ strs2str id);
    1.52      ((str2file (path ^ pos2filename pos)) o (pbl2xml id)) pbl
    1.53      );
    1.54  
    1.55  (*.write the files using the guh as filename.*)
    1.56  (*    *)
    1.57  fun pbl2file (path:path) (pos:pos) (id:metID) (pbl as {guh,...}) =
    1.58 -    (tracing ("### pbl2file: id = " ^ strs2str id ^ ", pos = " ^ pos2str pos);
    1.59 +    (writeln ("### pbl2file: id = " ^ strs2str id ^ ", pos = " ^ pos2str pos);
    1.60       ((str2file (path ^ guh2filename guh)) o (pbl2xml id)) pbl
    1.61       );
    1.62      
    1.63 @@ -293,12 +293,12 @@
    1.64  
    1.65  (*.write the files using an int-key (pos') as filename.*)
    1.66  fun met2file (path:path) (pos:pos) (id:metID) met =
    1.67 -    (tracing ("### met2file: id = " ^ strs2str id);
    1.68 +    (writeln ("### met2file: id = " ^ strs2str id);
    1.69       ((str2file (path ^ "met" ^ pos2filename pos)) o (met2xml id)) met);
    1.70  
    1.71  (*.write the files using the guh as filename.*)
    1.72  fun met2file (path:path) (pos:pos) (id:metID) (met as {guh,...}) =
    1.73 -    (tracing ("### met2file: id = " ^ strs2str id);
    1.74 +    (writeln ("### met2file: id = " ^ strs2str id);
    1.75       ((str2file (path ^ guh2filename guh)) o (met2xml id)) met);
    1.76  
    1.77