Commit a092979c authored by Erwan Jahier's avatar Erwan Jahier
Browse files

lurette 0.67 Thu, 16 May 2002 13:51:48 +0200 by jahier

Parent-Version:      0.66
Version-Log:

Draw loop nodes as circles and other nodes as boxes in the dot output
of the ima files.

Project-Description: Lurette
parent 66e00627
......@@ -5,11 +5,11 @@
(source/command_line_ima_exe.mli 1045 1020420514 b/34_command_li 1.2)
(doc/ocamldoc.sty 1380 1008328137 b/12_ocamldoc.s 1.1)
(source/env_state.ml 13465 1021042464 51_env_state. 1.21)
(source/graph.ml 1819 1016011748 14_graph.ml 1.5)
(source/graph.ml 1822 1021539278 14_graph.ml 1.6)
(bin/Makefile.ima_exe 1926 1020420514 b/41_Makefile.i 1.2)
(source/util.ml 13368 1021041152 35_util.ml 1.20)
(source/wtree.ml 13232 1021041152 b/1_wtree.ml 1.12)
(source/solver.ml 24560 1017837703 39_solver.ml 1.21)
(source/wtree.ml 13340 1021539278 b/1_wtree.ml 1.13)
(source/solver.ml 24391 1021539278 39_solver.ml 1.22)
(test/test_gen_stubs.h 1818 1020068208 b/45_test_gen_s 1.1)
(source/command_line.ml 4388 1019207707 b/20_command_li 1.7)
(source/lurette.ml 11959 1021042464 12_lurette.ml 1.38)
......@@ -17,7 +17,7 @@
(source/env.mli 2077 1020420514 15_env.mli 1.13)
(test/heater_float.rif.exp 1461 1015514807 b/30_heater_flo 1.2)
(lurette.depfull.dot 49 1007651448 b/5_lurette.de 1.2)
(source/env.ml 8154 1021041152 16_env.ml 1.26)
(source/env.ml 8348 1021539278 16_env.ml 1.27)
(make_lurette 1242 1020420514 27_make_luret 1.12)
(test/vrai_tram.lus 453 1007379917 b/6_vrai_tram. 1.1)
(lurette.dep.dot 49 1007651448 b/4_lurette.de 1.2)
......@@ -27,7 +27,7 @@
(ID_EN_VRAC 2184 1002196285 0_ID_EN_VRAC 1.1)
(source/parse_env.mli 908 1020420514 40_parse_env. 1.7)
(source/sim2chro.mli 1429 1017929190 b/23_sim2chro.m 1.4)
(source/ima_exe.ml 9703 1021042464 b/32_ima_exe.ml 1.10)
(source/ima_exe.ml 9860 1021539278 b/32_ima_exe.ml 1.11)
(doc/automata_format 0 1007379917 b/3_automata_f 1.1)
(source/eval.ml 7749 1016803757 49_eval.ml 1.12)
(source/gen_stubs.ml 36621 1021042464 24_generate_l 1.26)
......@@ -38,7 +38,7 @@
(source/formula.mli 3640 1021041152 44_formula.ml 1.13)
(TAGS 9825 1007379917 21_TAGS 1.6)
(source/command_line.mli 1421 1017929190 b/21_command_li 1.6)
(source/wtree.mli 3417 1021041152 b/0_wtree.mli 1.10)
(source/wtree.mli 3320 1021539278 b/0_wtree.mli 1.11)
(test/porte.env 1130 1019479246 b/16_porte.env 1.6)
(source/env_state.mli 5887 1021041152 50_env_state. 1.18)
(source/rnumsolver.mli 1764 1017335442 b/26_rnumsolver 1.3)
......@@ -51,7 +51,7 @@
(test/ControleurPorte.rif.exp 4746 1016803757 b/29_Controleur 1.4)
(test/tram.env 1149 1019479246 b/15_tram.env 1.6)
(Makefile.lurette 1866 1020420514 b/38_Makefile.l 1.3)
(source/show_env.ml 2989 1020432102 43_show_env.m 1.7)
(source/show_env.ml 3701 1021549908 43_show_env.m 1.8)
(source/gne.mli 1107 1016803757 b/36_gne.mli 1.1)
(bin/Makefile.gen_stubs 467 1020068208 b/42_Makefile.g 1.1)
(doc/synthese 2556 1007379917 b/2_synthese 1.1)
......@@ -63,7 +63,7 @@
(test/vrai_tram.c 3060 1012914629 b/8_vrai_tram. 1.2)
(source/print.mli 844 1021041152 46_print.mli 1.9)
(test/heater_int.lus 170 1020068208 b/43_heater_int 1.1)
(source/graph.mli 1499 1020432102 13_graph.mli 1.7)
(source/graph.mli 1494 1021539278 13_graph.mli 1.8)
(test/heater_int.rif.exp 858 1017837703 b/28_heater_int 1.2)
(source/formula.ml 7387 1021041152 45_formula.ml 1.15)
(source/lurette.mli 448 1016027474 11_lurette.ml 1.12)
......
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Lurette")
(Project-Version lurette 0 66)
(Parent-Version lurette 0 65)
(Project-Version lurette 0 67)
(Parent-Version lurette 0 66)
(Version-Log "
solver.ml:
Fix a bug is draw_in_bdd where it was unable to draw in a true
formula when it was a top level one. The reason was that the
tossing of remaining vars was not done at draw_in_bdd top level,
which is wrong since true can appear on ima transitions.
Draw loop nodes as circles and other nodes as boxes in the dot output
of the ima files.
")
(New-Version-Log "")
(Checkin-Time "Thu, 16 May 2002 10:54:38 +0200")
(Checkin-Time "Thu, 16 May 2002 13:51:48 +0200")
(Checkin-Login jahier)
(Populate-Ignore ())
(Project-Keywords)
......@@ -56,7 +51,7 @@ solver.ml:
(source/parse_env.ml (lurette/41_parse_env. 1.19 644))
(source/show_env.mli (lurette/42_show_env.m 1.6 644))
(source/show_env.ml (lurette/43_show_env.m 1.7 644))
(source/show_env.ml (lurette/43_show_env.m 1.8 644))
(source/formula.mli (lurette/44_formula.ml 1.13 644))
(source/formula.ml (lurette/45_formula.ml 1.15 644))
......
......@@ -12,24 +12,49 @@
open Formula
let (dump_nodes_list: out_channel -> node list -> node list -> node list -> unit) =
fun oc pnodes cnodes node_list ->
let (dump_node: out_channel -> node list -> node list -> node -> unit) =
fun oc pnodes cnodes node ->
let (dump_nodes_list: out_channel -> node list -> node list -> node list
-> node list -> unit) =
fun oc pnodes cnodes loopnodes node_list ->
let (dump_node: node -> unit) =
fun node ->
output_string oc ("\t;\t" ^ (string_of_int node) ^ "\n");
if (List.mem node cnodes) then
output_string oc "[style=filled,peripheries=2,color=red] "
else if (List.mem node pnodes) then
output_string oc "[style=filled,color=green] "
if
(List.mem node cnodes)
then
(
output_string oc "[style=filled,peripheries=2,color=red ";
if
(not (List.mem node loopnodes))
then
output_string oc ", shape=box] "
else
output_string oc "] ";
)
else if
(List.mem node pnodes)
then
(
output_string oc "style=filled,color=green ";
if
(not (List.mem node loopnodes))
then
output_string oc ", shape=box] "
else
output_string oc "] "
) ;
if
(not (List.mem node loopnodes))
then
output_string oc "[shape=box] ";
in
match node_list with
elt::tail ->
output_string oc ("\t\t" ^ (string_of_int elt)) ;
if (List.mem elt cnodes) then
output_string oc "[style=filled,peripheries=2,color=red]\n "
output_string oc "[shape=box,style=filled,peripheries=2,color=red]\n "
else
output_string oc "\n";
List.iter (dump_node oc pnodes cnodes) tail
output_string oc "[shape=box]\n";
List.iter (dump_node) tail
| [] -> ()
type trans = (node * arc_info * node)
......@@ -54,16 +79,30 @@ let (dump_trans_list: out_channel -> trans list -> unit) =
let (get_loop_nodes : trans list -> node list) =
fun tl ->
let looptrans =
List.filter
(fun (nf, (_,_, isloop), nt) -> not (isloop = NoLoop))
tl
in
List.map
(fun (nf, (_,_, _), nt) -> nt)
looptrans
let (dump_graph: out_channel -> node list -> node list ->
(node, arc_info) Graph.t -> unit) =
fun oc pnodes cnodes graph ->
output_string oc "digraph G {\n\n ";
(* output_string oc "ordering=out;\n\n"; *)
output_string oc " ratio = compress;\n";
(* output_string oc " size = \"7,10\";\n\n"; *)
dump_nodes_list oc pnodes cnodes (Graph.get_all_nodes graph) ;
dump_trans_list oc (Graph.get_all_trans graph) ;
output_string oc "} \n"
let trans = (Graph.get_all_trans graph) in
let loopnodes = get_loop_nodes trans in
output_string oc "digraph G {\n\n ";
(* output_string oc "ordering=out;\n\n"; *)
output_string oc " ratio = compress;\n";
(* output_string oc " size = \"7,10\";\n\n"; *)
dump_nodes_list oc pnodes cnodes loopnodes (Graph.get_all_nodes graph) ;
dump_trans_list oc trans ;
output_string oc "} \n"
(* Exported *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment