if !Options.count_only then
let module R = ResJIT.Count in
let module M = Runtime.Make(R) in
- mk_runtime M.bottom_up_run auto v (query, pattern) R.NS.length R.NS.serialize None
+ mk_runtime M.bottom_up_run auto v (query, pattern) R.NS.length R.NS.serialize !Options.output_file
else
let module R = ResJIT.Mat in
let module M = Runtime.Make(R) in
if !Options.twopass then
mk_runtime M.twopass_top_down_run auto v Tree.root R.NS.length R.NS.serialize None
else
- mk_runtime M.top_down_run auto v Tree.root R.NS.length R.NS.serialize None
+ mk_runtime M.top_down_run auto v Tree.root R.NS.length R.NS.serialize !Options.output_file
else
let module R = ResJIT.Mat in
let module M = Runtime.Make(R) in
let fold _ _ _ = failwith "fold not implemented"
let map _ _ = failwith "map not implemented"
let length x = x
- let serialize _ _ _ = ()
+ let serialize f _ x =
+ let o = open_out f in
+ output_string o "<xml_result>\n";
+ output_string o (string_of_int x);
+ output_string o "\n</xml_result>\n";
+ close_out o
end
type clist =