src/Tools/isac/xmlsrc/pbl-met-hierarchy.sml
author Walther Neuper <neuper@ist.tugraz.at>
Tue, 28 Sep 2010 09:06:56 +0200
branchisac-update-Isa09-2
changeset 38031 460c24a6a6ba
parent 38015 67ba02dffacc
child 38050 4c52ad406c20
permissions -rw-r--r--
tuned error and writeln

# raise error --> error
# writeln in atomtyp, atomty, atomt and xmlsrc
neuper@37906
     1
(* export problem-data and method-data to xml
neuper@37906
     2
   author: Walther Neuper
neuper@37906
     3
   (c) isac-team
neuper@37906
     4
neuper@37906
     5
use"xmlsrc/pbl-met-hierarchy.sml";
neuper@37906
     6
use"pbl-met-hierarchy.sml";
neuper@37906
     7
*)
neuper@37906
     8
neuper@37906
     9
fun str2file (fnm:filename) (str:string) =
neuper@37906
    10
    let val file = TextIO.openOut fnm
neuper@37906
    11
    in (TextIO.output (file, str);
neuper@37906
    12
	TextIO.flushOut file;
neuper@37906
    13
	TextIO.closeOut file) end;
neuper@38031
    14
fun pos2filename [] = error "pos2filename called with []"
neuper@37906
    15
  | pos2filename [i] = "_" ^ string_of_int i ^ ".xml"
neuper@37906
    16
  | pos2filename (i::is) = "_" ^ string_of_int i ^ pos2filename is;
neuper@37906
    17
(* pos2filename [1,22,3];
neuper@37906
    18
val it = "_1_22_3.xml" : string
neuper@37906
    19
*)
neuper@38031
    20
fun id2filename [] = error "id2filename called with []"
neuper@37906
    21
  | id2filename [s] = s ^ ".xml"
neuper@37906
    22
  | id2filename (s::ss) = s ^ "_" ^ id2filename ss;
neuper@37906
    23
(* id2filename ["linear","univariate","equation"];
neuper@37906
    24
val it = "linear_univariate_equation.xml" : string
neuper@37906
    25
*)
neuper@37906
    26
neuper@37906
    27
neuper@37906
    28
neuper@37906
    29
(*ad DTD: a NODE contains an ID and zero or more NODEs*)
neuper@37906
    30
(*old version with pos2filename*)
neuper@37906
    31
fun hierarchy pm(*"pbl" | "met"*) h =
neuper@37906
    32
    let val j = indentation
neuper@37906
    33
	fun nd i p (Ptyp (id,_,ns)) = 
neuper@37906
    34
	    let val p' = lev_on p
neuper@37906
    35
	    in (indt i) ^ "<NODE>\n" ^ 
neuper@37906
    36
	       (indt (i+j)) ^ "<ID> " ^ id ^ " </ID>\n" ^ 
neuper@37906
    37
	       (indt (i+j)) ^ "<NO> " (*on this level*) ^ 
neuper@37906
    38
	       (string_of_int o last_elem) p' ^ " </NO>\n" ^ 
neuper@37906
    39
	       (indt (i+j)) ^ "<CONTENTREF> " ^ pm ^ pos2filename p' ^ 
neuper@37906
    40
	       " </CONTENTREF>\n" ^
neuper@37906
    41
	       (nds (i+j) (lev_dn p') ns) ^ 
neuper@37906
    42
	       (indt i) ^ "</NODE>\n"
neuper@37906
    43
	    end
neuper@37906
    44
	and nds _ _ [] = ""
neuper@37906
    45
	  | nds i p (n::ns) = (nd i p n) ^ (nds i (lev_on p) ns);
neuper@37906
    46
    in nds j [0] h end;
neuper@37906
    47
(*.create a hierarchy with references to the guh's.*)
neuper@37906
    48
fun hierarchy_pbl h =
neuper@37906
    49
    let val j = indentation
neuper@37906
    50
	fun nd i p (Ptyp (id,[n as {guh,...} : pbt],ns)) = 
neuper@37906
    51
	    let val p' = lev_on p
neuper@37906
    52
	    in (indt i) ^ "<NODE>\n" ^ 
neuper@37906
    53
	       (indt (i+j)) ^ "<ID> " ^ id ^ " </ID>\n" ^ 
neuper@37906
    54
	       (indt (i+j)) ^ "<NO> " (*on this level*) ^ 
neuper@37906
    55
	       (string_of_int o last_elem) p' ^ " </NO>\n" ^ 
neuper@37906
    56
	       (indt (i+j)) ^ "<CONTENTREF> " ^ guh ^ 
neuper@37906
    57
	       " </CONTENTREF>\n" ^
neuper@37906
    58
	       (nds (i+j) (lev_dn p') ns) ^ 
neuper@37906
    59
	       (indt i) ^ "</NODE>\n"
neuper@37906
    60
	    end
neuper@37906
    61
	and nds _ _ [] = "" 
neuper@37906
    62
	  | nds i p (n::ns) = (nd i p n) ^ (nds i (lev_on p) ns);
neuper@37906
    63
    in nds j [0] h : xml end;
neuper@37906
    64
fun hierarchy_met h =
neuper@37906
    65
    let val j = indentation
neuper@37906
    66
	fun nd i p (Ptyp (id,[n as {guh,...} : met],ns)) = 
neuper@37906
    67
	    let val p' = lev_on p
neuper@37906
    68
	    in (indt i) ^ "<NODE>\n" ^ 
neuper@37906
    69
	       (indt (i+j)) ^ "<ID> " ^ id ^ " </ID>\n" ^ 
neuper@37906
    70
	       (indt (i+j)) ^ "<NO> " (*on this level*) ^ 
neuper@37906
    71
	       (string_of_int o last_elem) p' ^ " </NO>\n" ^ 
neuper@37906
    72
	       (indt (i+j)) ^ "<CONTENTREF> " ^ guh ^ 
neuper@37906
    73
	       " </CONTENTREF>\n" ^
neuper@37906
    74
	       (nds (i+j) (lev_dn p') ns) ^ 
neuper@37906
    75
	       (indt i) ^ "</NODE>\n"
neuper@37906
    76
	    end
neuper@37906
    77
	and nds _ _ [] = ""
neuper@37906
    78
	  | nds i p (n::ns) = (nd i p n) ^ (nds i (lev_on p) ns);
neuper@37906
    79
    in nds j [0] h  : xml end;
neuper@38031
    80
(* (writeln o hierarchy_pbl) (!ptyps);
neuper@37906
    81
   *)
neuper@37906
    82
neuper@37906
    83
fun pbl_hierarchy2file (path:path) = 
neuper@37906
    84
    str2file (path ^ "pbl_hierarchy.xml") 
neuper@37906
    85
	     ("<NODE>\n" ^
neuper@37906
    86
	      "  <ID> problem hierarchy </ID>\n" ^
neuper@37906
    87
	      "  <NO> 1 </NO>\n" ^
neuper@37906
    88
	      "  <CONTENTREF> pbl_ROOT </CONTENTREF>\n" ^
neuper@37906
    89
	     (hierarchy_pbl (!ptyps)) ^
neuper@37906
    90
	     "</NODE>");
neuper@37906
    91
neuper@37906
    92
fun met_hierarchy2file (path:path) = 
neuper@37906
    93
    str2file (path ^ "met_hierarchy.xml") 
neuper@37906
    94
	     ("<NODE>\n" ^
neuper@37906
    95
	      "  <ID> method hierarchy </ID>\n" ^
neuper@37906
    96
	      "  <NO> 1 </NO>\n" ^
neuper@37906
    97
	      "  <CONTENTREF> met_ROOT </CONTENTREF>\n" ^
neuper@37906
    98
	     (hierarchy_met (!mets)) ^
neuper@37906
    99
	     "</NODE>");
neuper@37906
   100
neuper@37906
   101
neuper@37906
   102
neuper@37906
   103
(**.create the xml-files for the pbls, mets from the hierarchy.**)
neuper@37906
   104
neuper@37906
   105
val i = indentation;
neuper@37906
   106
neuper@37906
   107
fun pbl2term thy (pblRD:pblRD) =
neuper@37906
   108
    str2term ("Problem (" ^ 
neuper@37906
   109
	      (get_thy o theory2domID) thy ^ "_, " ^
neuper@37906
   110
	      (strs2str' o rev) pblRD ^ ")");
neuper@37906
   111
(* term2str (pbl2term Isac.thy ["equations","univariate","normalize"]);
neuper@37906
   112
val it = "Problem (Isac, [normalize, univariate, equations])" : string
neuper@37906
   113
*)
neuper@37906
   114
neuper@37906
   115
neuper@37906
   116
(*.format a problem in xml for presentation on the problem browser;
neuper@37906
   117
   new version with <KESTOREREF>s -- not used because linking
neuper@37906
   118
   requires elements (rls, calc, ...) to be reorganized.*)
neuper@37906
   119
(*######## ATTENTION: THIS IS not THE ACTUAL VERSION ################*)
neuper@37906
   120
fun pbl2xml (id:(*pblRD*)pblID) ({guh,mathauthors,init,cas,met,ppc,prls,
neuper@37906
   121
			 thy,where_}:pbt) =
neuper@37906
   122
    let val thy' = theory2theory' thy
neuper@37906
   123
	val prls' = (#id o rep_rls) prls
neuper@37906
   124
    in "<NODECONTENT>\n" ^
neuper@37906
   125
       indt i ^ "<GUH> " ^ guh ^ " </GUH>\n" ^
neuper@37906
   126
       (((id2xml i)(* o rev*)) id) ^ 
neuper@37906
   127
       indt i ^ "<META> </META>\n" ^
neuper@37906
   128
       (*--------------- begin display ------------------------------*)
neuper@37906
   129
       indt i ^ "<HEADLINE>\n" ^
neuper@37926
   130
       (case cas of NONE => term2xml i (pbl2term thy id)
neuper@37926
   131
		  | SOME t => term2xml i t) ^ "\n" ^
neuper@37906
   132
       indt i ^ "</HEADLINE>\n" ^
neuper@37906
   133
       (*--------------- hline --------------------------------------*)
neuper@37906
   134
       pattern2xml i ppc where_ ^
neuper@37906
   135
       (*--------------- hline --------------------------------------*)
neuper@37906
   136
       indt i ^ "<EXPLANATIONS> </EXPLANATIONS>\n"
neuper@37906
   137
       (*--------------- end display --------------------------------*)
neuper@37906
   138
       ^
neuper@37906
   139
       indt i ^ "<THEORY>\n" ^ 
neuper@37906
   140
       theref2xml (i+i) thy' "Theorems" "" ^
neuper@37906
   141
       indt i ^ "</THEORY>\n" ^
neuper@37906
   142
       (case met of [] => (indt i) ^ "<METHODS> </METHODS>\n"
neuper@37906
   143
		  | _ => (indt i) ^ "<METHODS>\n" ^
neuper@37906
   144
			 foldl op^ ("", map (keref2xml (i+i) Met_) met) ^
neuper@37906
   145
			 (indt i) ^ "</METHODS>\n") ^
neuper@37906
   146
       indt i ^ "<EVALPRECOND>\n" ^ 
neuper@37906
   147
       theref2xml (i+i) (snd (thy_containing_rls thy' prls')) "Rulesets" prls'^
neuper@37906
   148
       indt i ^ "</EVALPRECOND>\n" ^
neuper@37906
   149
       authors2xml i "MATHAUTHORS" mathauthors ^
neuper@37906
   150
       authors2xml i "COURSEDESIGNS" ["isac team 2006"] ^
neuper@37906
   151
       "</NODECONTENT>" : xml
neuper@37906
   152
    end;
neuper@37906
   153
neuper@37906
   154
(*.format a problem in xml for presentation on the problem browser;
neuper@37906
   155
   old version with 'dead' strings for rls, calc, ....*)
neuper@37906
   156
(* 
neuper@37906
   157
val pblID = ["linear","univariate","equation"];
neuper@37906
   158
val pblID = ["degree_4","polynomial","univariate","equation"];
neuper@37906
   159
val pblID = rev ["tool","find_values"];
neuper@37906
   160
val (id, {guh,mathauthors,init,cas,met,ppc,prls,thy,where_}:pbt) =
neuper@37906
   161
       (pblID, get_pbt pblID);
neuper@37906
   162
   *)
neuper@37906
   163
fun pbl2xml (id:(*pblRD*)pblID) ({guh,mathauthors,init,cas,met,ppc,prls,
neuper@37906
   164
			 thy,where_}:pbt) =
neuper@37906
   165
    "<NODECONTENT>\n" ^
neuper@37906
   166
    indt i ^ "<GUH> " ^ guh ^ " </GUH>\n" ^
neuper@37906
   167
    (((id2xml i)(* o rev*)) id) ^ 
neuper@37906
   168
    indt i ^ "<META> </META>\n" ^
neuper@37906
   169
    (*--------------- begin display ------------------------------*)
neuper@37906
   170
    indt i ^ "<HEADLINE>\n" ^
neuper@37926
   171
    (case cas of NONE => term2xml i (pbl2term thy id)
neuper@37926
   172
	       | SOME t => term2xml i t) ^ "\n" ^
neuper@37906
   173
    indt i ^ "</HEADLINE>\n" ^
neuper@37906
   174
    (*--------------- hline --------------------------------------*)
neuper@37906
   175
    pattern2xml i ppc where_ ^
neuper@37906
   176
    (*--------------- hline --------------------------------------*)
neuper@37906
   177
    indt i ^ "<EXPLANATIONS> </EXPLANATIONS>\n"
neuper@37906
   178
    (*--------------- end display --------------------------------*)
neuper@37906
   179
    ^
neuper@37906
   180
    indt i ^ "<THEORY>\n" ^ 
neuper@37906
   181
    theref2xml (i+i) (theory2theory' thy) "Theorems" "" ^
neuper@37906
   182
    indt i ^ "</THEORY>\n" ^
neuper@37906
   183
    (case met of [] => (indt i) ^ "<METHODS> </METHODS>\n"
neuper@37906
   184
	       | _ => (indt i) ^ "<METHODS>\n" ^
neuper@37906
   185
		      foldl op^ ("", map (keref2xml (i+i) Met_) met) ^
neuper@37906
   186
		      (indt i) ^ "</METHODS>\n") ^
neuper@37906
   187
    indt i ^ "<EVALPRECOND> " ^ (#id o rep_rls) 
neuper@37906
   188
				    prls ^ " </EVALPRECOND>\n" ^ 
neuper@37906
   189
    authors2xml i "MATHAUTHORS" mathauthors ^
neuper@37906
   190
    authors2xml i "COURSEDESIGNS" ["isac team 2006"] ^
neuper@37906
   191
    "</NODECONTENT>" : xml;
neuper@37906
   192
(* 
neuper@37906
   193
val pblID = ["linear","univariate","equation"];
neuper@37906
   194
val pblID = ["degree_4","polynomial","univariate","equation"];
neuper@38031
   195
writeln (pbl2xml pblID (get_pbt pblID));
neuper@37906
   196
*)
neuper@37906
   197
neuper@37906
   198
(*replace by 'fun calc2xml' as developed for thy in 0607*)
neuper@37906
   199
fun calc2xmlOLD j ((scr_op, (isa_op, _)):calc) =
neuper@37906
   200
    indt i ^ "<CALCULATE> (" ^ scr_op ^ ", (" ^ isa_op ^ ")) </CALCULATE>\n";
neuper@37906
   201
fun calcs2xmlOLD j [] = ("":xml) (*TODO replace with 'strs2xml'*)
neuper@37906
   202
  | calcs2xmlOLD j (r::rs) = calc2xmlOLD j r ^ calcs2xmlOLD j rs;
neuper@37906
   203
neuper@37906
   204
(* val (id, {guh,mathauthors,init,ppc,pre,scr,calc,
neuper@37906
   205
	     crls,erls,nrls,prls,srls,rew_ord'}) =
neuper@37906
   206
       (["Test", "solve_linear"],
neuper@37906
   207
	get_met ["Test", "solve_linear"]);
neuper@37906
   208
   *)
neuper@37906
   209
neuper@37906
   210
(*.format a method in xml for presentation on the method browser;
neuper@37906
   211
   new version with <KESTOREREF>s -- not used because linking
neuper@37906
   212
   requires elements (rls, calc, ...) to be reorganized.*)
neuper@37906
   213
(*######## ATTENTION: THIS IS not THE ACTUAL VERSION ################*)
neuper@37906
   214
fun met2xml (id:metID) ({guh,mathauthors,init,ppc,pre,scr,calc,
neuper@37906
   215
			 crls,erls,nrls,prls,srls,rew_ord'}:met) =
neuper@37906
   216
    let val thy' = "Isac.thy" (*FIXME.WN0607 get thy from met ?!?*)
neuper@37906
   217
	val crls' = (#id o rep_rls) crls
neuper@37906
   218
	val erls' = (#id o rep_rls) erls
neuper@37906
   219
	val nrls' = (#id o rep_rls) nrls
neuper@37906
   220
	val prls' = (#id o rep_rls) prls
neuper@37906
   221
	val srls' = (#id o rep_rls) srls
neuper@37906
   222
    in "<NODECONTENT>\n" ^
neuper@37906
   223
       indt i ^ "<GUH> " ^ guh ^ " </GUH>\n" ^
neuper@37906
   224
       id2xml i id ^ 
neuper@37906
   225
       indt i ^ "<META> </META>\n" ^
neuper@37906
   226
       scr2xml i scr ^
neuper@37906
   227
       pattern2xml i ppc pre ^
neuper@37906
   228
       indt i ^ "<EXPLANATIONS> </EXPLANATIONS>\n" ^
neuper@37906
   229
       indt i ^ "<EVALPRECOND>\n" ^ 
neuper@37906
   230
       theref2xml (i+i) (snd (thy_containing_rls thy' prls')) "Rulesets" prls'^
neuper@37906
   231
       indt i ^ "</EVALPRECOND>\n" ^
neuper@37906
   232
       indt i ^ "<EVALCOND>\n"    ^ 
neuper@37906
   233
       theref2xml (i+i) (snd (thy_containing_rls thy' erls')) "Rulesets" erls'^
neuper@37906
   234
       indt i ^ "</EVALCOND>\n" ^
neuper@37906
   235
       indt i ^ "<EVALLISTEXPR>\n"^ 
neuper@37906
   236
       theref2xml (i+i) (snd (thy_containing_rls thy' srls')) "Rulesets" srls'^
neuper@37906
   237
       indt i ^ "</EVALLISTEXPR>\n" ^
neuper@37906
   238
       indt i ^ "<CHECKELEMENTWISE>\n" ^ 
neuper@37906
   239
       theref2xml (i+i) (snd (thy_containing_rls thy' crls')) "Rulesets" crls'^
neuper@37906
   240
       indt i ^ "</CHECKELEMENTWISE>\n" ^
neuper@37906
   241
       indt i ^ "<NORMALFORM>\n"  ^ 
neuper@37906
   242
       theref2xml (i+i) (snd (thy_containing_rls thy' nrls')) "Rulesets" nrls'^
neuper@37906
   243
       indt i ^ "</NORMALFORM>\n" ^
neuper@37906
   244
       indt i ^ "<REWORDER> " ^ rew_ord' ^ " </REWORDER>\n" ^
neuper@37906
   245
       calcs2xmlOLD i calc ^
neuper@37906
   246
       authors2xml i "MATHAUTHORS" mathauthors ^
neuper@37906
   247
       authors2xml i "COURSEDESIGNS" ["isac team 2006"] ^
neuper@37906
   248
       "</NODECONTENT>" : xml
neuper@37906
   249
    end;
neuper@37906
   250
(*.format a method in xml for presentation on the method browser;
neuper@37906
   251
   old version with 'dead' strings for rls, calc, ....*)
neuper@37906
   252
fun met2xml (id:metID) ({guh,mathauthors,init,ppc,pre,scr,calc,
neuper@37906
   253
			 crls,erls,nrls,prls,srls,rew_ord'}:met) =
neuper@37906
   254
    "<NODECONTENT>\n" ^
neuper@37906
   255
    indt i ^ "<GUH> " ^ guh ^ " </GUH>\n" ^
neuper@37906
   256
    id2xml i id ^ 
neuper@37906
   257
    indt i ^ "<META> </META>\n" ^
neuper@37906
   258
    scr2xml i scr ^
neuper@37906
   259
    pattern2xml i ppc pre ^
neuper@37906
   260
    indt i ^ "<EXPLANATIONS> </EXPLANATIONS>\n" ^
neuper@37906
   261
    indt i ^ "<EVALPRECOND> " ^  (#id o rep_rls) prls ^ " </EVALPRECOND>\n" ^
neuper@37906
   262
    indt i ^ "<EVALCOND> " ^ (#id o rep_rls) erls ^ " </EVALCOND>\n" ^
neuper@37906
   263
    indt i ^ "<EVALLISTEXPR> "^ (#id o rep_rls) srls ^ " </EVALLISTEXPR>\n" ^
neuper@37906
   264
    indt i ^ "<CHECKELEMENTWISE> " ^ (#id o rep_rls) 
neuper@37906
   265
					 crls ^ " </CHECKELEMENTWISE>\n" ^
neuper@37906
   266
    indt i ^ "<NORMALFORM> "  ^ (#id o rep_rls) nrls ^ " </NORMALFORM>\n" ^
neuper@37906
   267
    indt i ^ "<REWORDER> " ^ rew_ord' ^ " </REWORDER>\n" ^
neuper@37906
   268
    calcs2xmlOLD i calc ^
neuper@37906
   269
    authors2xml i "MATHAUTHORS" mathauthors ^
neuper@37906
   270
    authors2xml i "COURSEDESIGNS" ["isac team 2006"] ^
neuper@37906
   271
    "</NODECONTENT>" : xml;
neuper@37906
   272
neuper@38031
   273
(* writeln (met2xml ["Test", "solve_linear"]
neuper@37906
   274
		    (get_met ["Test", "solve_linear"]));
neuper@37906
   275
   *)
neuper@37906
   276
neuper@37906
   277
(**. write pbls from hierarchy to files.**)
neuper@37906
   278
neuper@37906
   279
(*.write the files using an int-key (pos') as filename.*)
neuper@37906
   280
fun pbl2file (path:path) (pos:pos) (id:metID) (pbl as {guh,...}) =
neuper@38031
   281
    (writeln ("### pbl2file: id = " ^ strs2str id);
neuper@37906
   282
    ((str2file (path ^ pos2filename pos)) o (pbl2xml id)) pbl
neuper@37906
   283
    );
neuper@37906
   284
neuper@37906
   285
(*.write the files using the guh as filename.*)
neuper@37906
   286
(*    *)
neuper@37906
   287
fun pbl2file (path:path) (pos:pos) (id:metID) (pbl as {guh,...}) =
neuper@38031
   288
    (writeln ("### pbl2file: id = " ^ strs2str id ^ ", pos = " ^ pos2str pos);
neuper@37906
   289
     ((str2file (path ^ guh2filename guh)) o (pbl2xml id)) pbl
neuper@37906
   290
     );
neuper@37906
   291
    
neuper@37906
   292
(**. write mets from hierarchy to files.**)
neuper@37906
   293
neuper@37906
   294
(*.write the files using an int-key (pos') as filename.*)
neuper@37906
   295
fun met2file (path:path) (pos:pos) (id:metID) met =
neuper@38031
   296
    (writeln ("### met2file: id = " ^ strs2str id);
neuper@37906
   297
     ((str2file (path ^ "met" ^ pos2filename pos)) o (met2xml id)) met);
neuper@37906
   298
neuper@37906
   299
(*.write the files using the guh as filename.*)
neuper@37906
   300
fun met2file (path:path) (pos:pos) (id:metID) (met as {guh,...}) =
neuper@38031
   301
    (writeln ("### met2file: id = " ^ strs2str id);
neuper@37906
   302
     ((str2file (path ^ guh2filename guh)) o (met2xml id)) met);
neuper@37906
   303
neuper@37906
   304
neuper@37906
   305
(*.scan the mtree Ptyp and and print the nodes using wfn.*)
neuper@37906
   306
fun node (pa:path) ids po wfn (Ptyp (id,[n],ns)) = 
neuper@37906
   307
    let val po' = lev_on po
neuper@37906
   308
    in wfn pa po' (ids@[id]) n; 
neuper@37906
   309
    nodes pa (ids@[id]) ((lev_dn po'):pos) wfn ns end
neuper@37906
   310
and nodes _ _ _ _ [] = ()
neuper@37906
   311
  | nodes pa ids po wfn (n::ns) = (node pa ids po wfn n;  
neuper@37906
   312
				 nodes pa ids (lev_on po) wfn ns);
neuper@37906
   313
neuper@37906
   314
neuper@37906
   315
fun pbls2file (p:path) = nodes p [] [0] pbl2file (!ptyps);
neuper@37906
   316
fun mets2file (p:path) = nodes p [] [0] met2file (!mets);
neuper@37906
   317
(*
neuper@37906
   318
val path = "/home/neuper/proto2/isac/xmldata/"; 
neuper@37906
   319
val path = "/home/neuper/tmp/"; 
neuper@37906
   320
neuper@37906
   321
pbl_hierarchy2file (path ^ "pbl/");
neuper@37906
   322
pbls2file          (path ^ "pbl/");
neuper@37906
   323
neuper@37906
   324
met_hierarchy2file (path ^ "met/");
neuper@37906
   325
mets2file          (path ^ "met/");
neuper@37906
   326
neuper@37906
   327
thy_hierarchy2file (path ^ "thy/");
neuper@37906
   328
thes2file          (path ^ "thy/");
neuper@37906
   329
*)