blob: 0de311987bad39c67eb1f81281830ae0a429b124 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
(* ========================================================================== *)
(* BIOLAYOUT EXPORT (HOL LIGHT) *)
(* - Support for BioLayout graph display of recorded tactics *)
(* *)
(* By Mark Adams *)
(* Copyright (c) Univeristy of Edinburgh, 2012 *)
(* ========================================================================== *)
(* biolayout_nodename *)
let biolayout_nodename n =
"Node" ^ string_of_int n;;
(* biolayout_export *)
let biolayout_export path name =
let nns = gtree_graph () in
let suffix = ".layout" in
let fullname = Filename.concat path (name ^ suffix) in
let ch = open_out fullname in
let export_line ch (n1,n2) =
(output_string ch (biolayout_nodename n1);
output_string ch "\t";
output_string ch (biolayout_nodename n2);
output_string ch "\n") in
(print_string ("Exporting to file \"" ^ fullname ^ "\"\n");
do_list (export_line ch) nns;
close_out ch);;
|