Commit 09d218f2 authored by Erwan Jahier's avatar Erwan Jahier

lurette 0.127 Mon, 24 Feb 2003 09:14:09 +0100 by jahier

Parent-Version:      0.126
Version-Log:

source/command_line_luc_exe.ml:
source/command_line_luc_exe.mli:
source/luc_exe.ml:
source/store.ml:
source/lurette.ml:
source/lurettetop.ml:
   Put back the verteces draw. It was not such a great idea to remove
   after all...

   Also change verteces into vertices (oops...).

Project-Description: Lurette
parent 5a165497
......@@ -12,7 +12,7 @@
(doc/ocamldoc.sty 1380 1008328137 b/12_ocamldoc.s 1.1)
(mlcuddidl/Makefile 7150 1034006019 d/9_Makefile 1.1)
(test/tram_simple.h 1746 1013519411 b/25_tram_simpl 1.1)
(test/time-ossau.res 6497 1045849760 b/49_time.res 1.34)
(test/time-ossau.res 6497 1046074449 b/49_time.res 1.35)
(mlcuddidl/session.ml 603 1034006019 c/37_session.ml 1.1)
(cuddaux/cuddauxGenCof.c 12011 1034006019 c/29_cuddauxGen 1.1)
(mlcuddidl/rdd.idl 14806 1034006019 c/42_rdd.idl 1.1)
......@@ -22,15 +22,15 @@
(source/automata.mli 3396 1033738731 b/46_automata.m 1.3)
(test/heater_int.rif.exp 886 1034951022 b/28_heater_int 1.10)
(source/ne.ml 9275 1045489850 c/21_ne.ml 1.5)
(source/store.mli 2895 1045849760 b/26_rnumsolver 1.15)
(source/store.mli 2891 1046074449 b/26_rnumsolver 1.16)
(source/prevar.ml 981 1037192189 d/18_prevar.ml 1.1)
(test/time-ecrins.exp 6497 1045849760 d/21_time-ecrin 1.8)
(test/time-ecrins.exp 6496 1046074449 d/21_time-ecrin 1.9)
(source/value.mli 1101 1033723811 c/24_value.mli 1.1)
(user-rules.skel 1167 1040226023 c/25_user-rules 1.2)
(source/Makefile.gen_stubs 212 1036048863 b/42_Makefile.g 1.5)
(test/heater_float.rif.exp 1116 1045834161 b/30_heater_flo 1.12)
(test/temp_int.luc 700 1045841411 b/50_temp_int.e 1.4)
(source/luc_exe.ml 12687 1045849760 b/32_ima_exe.ml 1.25)
(source/luc_exe.ml 12758 1046074449 b/32_ima_exe.ml 1.26)
(source/prevar.mli 623 1037192189 d/19_prevar.mli 1.1)
(source/graph.ml 2339 1037625990 14_graph.ml 1.8)
(ihm/xlurette/makefile 1601 1040226023 c/16_makefile 1.7)
......@@ -42,27 +42,27 @@
(source/env.ml 8013 1027349504 16_env.ml 1.29)
(demo/chaudiere/buggy_chaudiere_ctrl.lus 219 1031732392 c/10_buggy_chau 1.1)
(source/Makefile.show_luc 1026 1037192189 b/40_Makefile.s 1.8)
(source/env_state.mli 6780 1045849760 50_env_state. 1.26)
(source/env_state.mli 6791 1046074449 50_env_state. 1.27)
(mlcuddidl/idd.ml 7061 1034006019 d/0_idd.ml 1.1)
(test/time-ossau.exp 6497 1045849760 b/48_time.exp 1.31)
(test/time-ossau.exp 6497 1046074449 b/48_time.exp 1.32)
(source/print.mli 1136 1045558187 46_print.mli 1.13)
(mlcuddidl/rdd.mli 7174 1034006019 c/40_rdd.mli 1.1)
(test/Makefile 32 1035531408 c/0_Makefile 1.8)
(source/parse_env.ml 33544 1045849760 41_parse_env. 1.38)
(ihm/xlurette/xlurette_glade_main.ml 23620 1036675177 c/12_xlurette_g 1.15)
(ihm/xlurette/xlurette_glade_main.ml 23620 1046074449 c/12_xlurette_g 1.16)
(demo/chaudiere/chaudiere_oracle.lus 107 1031732392 c/8_chaudiere_ 1.1)
(source/solver.ml 29697 1045849760 39_solver.ml 1.43)
(source/solver.ml 29799 1046074449 39_solver.ml 1.44)
(source/pnumsolver.ml 9273 1045489850 d/23_pnumsolver 1.2)
(test/ControleurPorte.lus 3219 1032940601 c/17_Controleur 1.1)
(source/gen_fake_lutin.ml 3449 1036048863 d/16_gen_fake_l 1.1)
(source/lurette.ml 14381 1045849760 12_lurette.ml 1.62)
(source/lurette.ml 14452 1046074449 12_lurette.ml 1.63)
(TODO 5368 1045849760 d/22_TODO 1.6)
(source/Makefile 1627 1044958837 c/20_Makefile 1.10)
(source/util.ml 21073 1045849760 35_util.ml 1.40)
(mlcuddidl/manager.mli 7912 1034006019 c/46_manager.ml 1.1)
(doc/Interface_draft 5232 1003928781 19_Interface_ 1.1)
(source/sim2chro.mli 1524 1037625990 b/23_sim2chro.m 1.6)
(source/command_line_luc_exe.mli 1084 1045849760 b/34_command_li 1.7)
(source/command_line_luc_exe.mli 1095 1046074449 b/34_command_li 1.8)
(test/giro/onlyroll.lus 18298 1031732392 c/7_onlyroll.l 1.1)
(source/Makefile.lucky 2562 1045834161 b/41_Makefile.i 1.14)
(TAGS 9825 1007379917 21_TAGS 1.6)
......@@ -72,22 +72,22 @@
(source/gen_stubs.ml 27065 1036048863 24_generate_l 1.41)
(OcamlMakefile 22765 1045558187 17_OcamlMakef 1.47)
(source/polyhedron.ml 7493 1045834161 d/25_polyhedron 1.3)
(source/command_line.ml 4958 1045849760 b/20_command_li 1.11)
(source/command_line.ml 5083 1046074449 b/20_command_li 1.12)
(mlcuddidl/bdd.ml 10889 1034006019 d/6_bdd.ml 1.1)
(mlcuddidl/idd_caml.c 15964 1034006019 c/50_idd_caml.c 1.1)
(cuddaux/cuddauxCompose.c 13638 1034006019 c/30_cuddauxCom 1.1)
(test/porte.luc 994 1045841411 b/16_porte.env 1.9)
(make_lurette 1306 1034006019 27_make_luret 1.17)
(source/control.ml 4445 1036675177 c/4_control.ml 1.4)
(ihm/xlurette/xlurette_glade_interface.ml 32774 1035885606 c/15_xlurette_g 1.8)
(source/lurettetop.ml 31026 1045849760 c/1_lurettetop 1.25)
(ihm/xlurette/xlurette_glade_interface.ml 32774 1046074449 c/15_xlurette_g 1.9)
(source/lurettetop.ml 31026 1046074449 c/1_lurettetop 1.26)
(mlcuddidl/README 1574 1034006019 d/8_README 1.1)
(cuddaux/README 1427 1034006019 c/34_README 1.1)
(source/Makefile.lurettetop 368 1037192189 d/14_Makefile.l 1.2)
(source/ne.mli 2116 1045834161 c/22_ne.mli 1.5)
(README 2266 1037625990 10_README 1.5)
(test/vrai_tram.lus 564 1027066799 b/6_vrai_tram. 1.2)
(source/env_state.ml 21340 1045849760 51_env_state. 1.38)
(source/env_state.ml 21351 1046074449 51_env_state. 1.39)
(mlcuddidl/manager_caml.c 39233 1034006019 c/45_manager_ca 1.1)
(mlcuddidl/mtbdd.mli 4395 1034006019 c/43_mtbdd.mli 1.1)
(source/env.mli 2026 1040290175 15_env.mli 1.17)
......@@ -96,7 +96,7 @@
(user-rules 15733 1045849760 c/14_myrules 1.25)
(doc/archi.fig 3693 1003928781 20_archi.fig 1.1)
(source/lurette.mli 448 1016027474 11_lurette.ml 1.12)
(source/store.ml 31012 1045849760 b/27_rnumsolver 1.22)
(source/store.ml 30658 1046074449 b/27_rnumsolver 1.23)
(source/gne.mli 1552 1033397911 b/36_gne.mli 1.4)
(test/giro/giro.luc 2755 1033738731 c/6_giro.ima 1.4)
(source/show_env.mli 1091 1033738731 42_show_env.m 1.8)
......@@ -108,8 +108,8 @@
(mlcuddidl/manager.idl 11024 1034006019 c/48_manager.id 1.1)
(test/vrai_tram.c 3060 1027066799 b/8_vrai_tram. 1.3)
(Makefile 941 1035531408 d/13_Makefile 1.1)
(source/command_line.mli 1492 1045849760 b/21_command_li 1.10)
(ihm/xlurette/xlurette.glade 49433 1035885606 c/13_xlurette.g 1.9)
(source/command_line.mli 1503 1046074449 b/21_command_li 1.11)
(ihm/xlurette/xlurette.glade 49469 1046074449 c/13_xlurette.g 1.10)
(demo/chaudiere/chaudiere.luc 446 1032789516 c/11_chaudiere. 1.5)
(source/graph.mli 2185 1037625990 13_graph.mli 1.10)
(mlcuddidl/bdd_caml.c 57199 1034006019 d/4_bdd_caml.c 1.1)
......@@ -145,11 +145,11 @@
(source/parse_poc.ml 7093 1036048863 d/15_parse_poc. 1.1)
(cuddaux/cuddauxAddIte.c 12812 1034006019 c/32_cuddauxAdd 1.1)
(source/sim2chro.ml 2721 1033397911 b/24_sim2chro.m 1.14)
(source/command_line_luc_exe.ml 3129 1045849760 b/33_command_li 1.10)
(source/command_line_luc_exe.ml 3255 1046074449 b/33_command_li 1.11)
(mlcuddidl/cudd_caml.h 1210 1034006019 d/2_cudd_caml. 1.1)
(source/value.ml 2361 1045849760 c/23_value.ml 1.3)
(test/giro/allocator.lus 1087 1031732392 c/5_allocator. 1.1)
(test/time-ecrins.res 6497 1045849760 d/20_time-ecrin 1.8)
(test/time-ecrins.res 6496 1046074449 d/20_time-ecrin 1.9)
(lurette.depfull.dot 49 1007651448 b/5_lurette.de 1.2)
(mlcuddidl/idd.mli 5470 1034006019 c/51_idd.mli 1.1)
(ID_EN_VRAC 2184 1002196285 0_ID_EN_VRAC 1.1)
......@@ -1257,7 +1257,7 @@
<widget>
<class>GtkRadioButton</class>
<name>radiobutton_edges</name>
<tooltip>Draw among the edges of the polyhedra of solutions</tooltip>
<tooltip>Draw inside the convex hull of solutions, but a little bit more often among the edges </tooltip>
<can_focus>True</can_focus>
<label> Edges</label>
<active>False</active>
......@@ -1272,8 +1272,8 @@
<widget>
<class>GtkRadioButton</class>
<name>radiobutton_verteces</name>
<tooltip>Draw among the verteces of the polyhedra of solutions</tooltip>
<name>radiobutton_vertices</name>
<tooltip>Draw among the vertices of the polyhedra of solutions</tooltip>
<can_focus>True</can_focus>
<label>Vertices</label>
<active>False</active>
......
......@@ -882,7 +882,7 @@ let radiobutton_edges = GButton.radio_button
in
let _ = GtkBase.Widget.set_can_focus radiobutton_edges#as_widget true in
let _ = tooltips#set_tip ~text:"Draw among the edges of the polyhedra of solutions" radiobutton_edges#coerce in
let radiobutton_verteces = GButton.radio_button
let radiobutton_vertices = GButton.radio_button
~group:radiobutton_inside#group
~packing:(hbox3#pack ~padding:0
~fill:false
......@@ -893,8 +893,8 @@ let radiobutton_verteces = GButton.radio_button
~active:false
()
in
let _ = GtkBase.Widget.set_can_focus radiobutton_verteces#as_widget true in
let _ = tooltips#set_tip ~text:"Draw among the verteces of the polyhedra of solutions" radiobutton_verteces#coerce in
let _ = GtkBase.Widget.set_can_focus radiobutton_vertices#as_widget true in
let _ = tooltips#set_tip ~text:"Draw among the vertices of the polyhedra of solutions" radiobutton_vertices#coerce in
let hbox4 = GPack.hbox
~spacing:0
~homogeneous:false
......@@ -1220,7 +1220,7 @@ method hbox3 = hbox3
method draw_mode_label = draw_mode_label
method radiobutton_inside = radiobutton_inside
method radiobutton_edges = radiobutton_edges
method radiobutton_verteces = radiobutton_verteces
method radiobutton_vertices = radiobutton_vertices
method hbox4 = hbox4
method call_sim2chro_label = call_sim2chro_label
method radiobutton_call_sim2chro_yes = radiobutton_call_sim2chro_yes
......
......@@ -28,7 +28,7 @@ let _ =
(* ; Unix.set_nonblock lurette_stdout_out *)
; Unix.set_nonblock lurette_stdout_in
type draw_mode = Verteces | Edges | Inside
type draw_mode = Vertices | Edges | Inside
type tok = Genlex.token Stream.t
let ok_str = " OK!
......@@ -305,7 +305,7 @@ class customized_callbacks = object(self)
then "set_draw_mode inside \n"
else if self#top_xlurette#radiobutton_edges#active
then "set_draw_mode edges \n"
else "set_draw_mode verteces \n"
else "set_draw_mode vertices \n"
in
let cmd_call_sim2chro =
......@@ -462,7 +462,7 @@ class customized_callbacks = object(self)
method set_draw_mode dm =
match dm with
Edges -> self#top_xlurette#radiobutton_edges#set_active true
| Verteces -> self#top_xlurette#radiobutton_verteces#set_active true
| Vertices -> self#top_xlurette#radiobutton_vertices#set_active true
| Inside -> self#top_xlurette#radiobutton_inside#set_active true
......@@ -514,7 +514,7 @@ class customized_callbacks = object(self)
match id with
"inside" -> self#set_draw_mode Inside
| "edges" -> self#set_draw_mode Edges
| "verteces" -> self#set_draw_mode Verteces
| "vertices" -> self#set_draw_mode Vertices
| _ -> print_string ("Unknown draw mode (" ^ id ^ ")\n")
)
| [< 'Genlex.Ident "set_env" ; 'Genlex.String str >] ->
......@@ -639,8 +639,8 @@ let rec speclist callbacks =
"--draw-edges", Arg.Unit (fun _ -> callbacks#set_draw_mode Edges),
"\t\tDraw on the edges of the polyhedron of solutions.\n ";
"--draw-verteces", Arg.Unit (fun _ -> callbacks#set_draw_mode Verteces),
"\t\tDraw among the verteces of the polyhedron of solutions.\n ";
"--draw-vertices", Arg.Unit (fun _ -> callbacks#set_draw_mode Vertices),
"\t\tDraw among the vertices of the polyhedron of solutions.\n ";
......
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Lurette")
(Project-Version lurette 0 126)
(Parent-Version lurette 0 125)
(Project-Version lurette 0 127)
(Parent-Version lurette 0 126)
(Version-Log "
source/command_line_luc_exe.ml:
source/command_line_luc_exe.mli:
source/command_line.ml:
source/command_line.mli:
source/luc_exe.ml:
source/store.ml:
source/lurette.ml:
source/lurettetop.ml:
Add the possibility to set the precision from lucky and lurette command lines.
Put back the verteces draw. It was not such a great idea to remove
after all...
Remove the draw-vertices stuff.
source/command_line_luc_exe.ml:
source/command_line_luc_exe.mli:
source/luc_exe.ml:
Also add the --edges and the inside options for lucky.
source/parse_env.ml:
Allow to forget empty fields in the automata format.
source/store.ml:
Plug the new drawing heuristic
Also change verteces into vertices (oops...).
")
(New-Version-Log ""
)
(Checkin-Time "Fri, 21 Feb 2003 18:49:20 +0100")
(Checkin-Time "Mon, 24 Feb 2003 09:14:09 +0100")
(Checkin-Login jahier)
(Populate-Ignore ())
(Project-Keywords)
......@@ -44,17 +30,17 @@ source/store.ml:
;; Sources files for luc_exe
(source/luc_exe.mli (lurette/b/31_ima_exe.ml 1.2 644))
(source/luc_exe.ml (lurette/b/32_ima_exe.ml 1.25 644))
(source/luc_exe.ml (lurette/b/32_ima_exe.ml 1.26 644))
(source/command_line_luc_exe.ml (lurette/b/33_command_li 1.10 644))
(source/command_line_luc_exe.mli (lurette/b/34_command_li 1.7 644))
(source/command_line_luc_exe.ml (lurette/b/33_command_li 1.11 644))
(source/command_line_luc_exe.mli (lurette/b/34_command_li 1.8 644))
;; Sources files for lurette only
(source/lurette.mli (lurette/11_lurette.ml 1.12 644))
(source/lurette.ml (lurette/12_lurette.ml 1.62 644))
(source/lurette.ml (lurette/12_lurette.ml 1.63 644))
(source/command_line.ml (lurette/b/20_command_li 1.11 644))
(source/command_line.mli (lurette/b/21_command_li 1.10 644))
(source/command_line.ml (lurette/b/20_command_li 1.12 644))
(source/command_line.mli (lurette/b/21_command_li 1.11 644))
;; Sources files common to lurette and luc_exe
(source/graph.mli (lurette/13_graph.mli 1.10 644))
......@@ -66,13 +52,13 @@ source/store.ml:
(source/util.ml (lurette/35_util.ml 1.40 444))
(source/solver.mli (lurette/38_solver.mli 1.13 644))
(source/solver.ml (lurette/39_solver.ml 1.43 644))
(source/solver.ml (lurette/39_solver.ml 1.44 644))
(source/polyhedron.ml (lurette/d/25_polyhedron 1.3 644))
(source/polyhedron.mli (lurette/d/26_polyhedron 1.1 644))
(source/store.mli (lurette/b/26_rnumsolver 1.15 644))
(source/store.ml (lurette/b/27_rnumsolver 1.22 644))
(source/store.mli (lurette/b/26_rnumsolver 1.16 644))
(source/store.ml (lurette/b/27_rnumsolver 1.23 644))
(source/pnumsolver.ml (lurette/d/23_pnumsolver 1.2 644))
(source/pnumsolver.mli (lurette/d/24_pnumsolver 1.2 644))
......@@ -92,8 +78,8 @@ source/store.ml:
(source/eval.mli (lurette/48_eval.mli 1.10 644))
(source/eval.ml (lurette/49_eval.ml 1.13 644))
(source/env_state.mli (lurette/50_env_state. 1.26 644))
(source/env_state.ml (lurette/51_env_state. 1.38 644))
(source/env_state.mli (lurette/50_env_state. 1.27 644))
(source/env_state.ml (lurette/51_env_state. 1.39 644))
(source/automata.mli (lurette/b/46_automata.m 1.3 644))
(source/automata.ml (lurette/b/47_automata.m 1.6 644))
......@@ -104,7 +90,7 @@ source/store.ml:
(source/gne.mli (lurette/b/36_gne.mli 1.4 644))
(source/gne.ml (lurette/b/37_gne.ml 1.4 644))
(source/lurettetop.ml (lurette/c/1_lurettetop 1.25 644))
(source/lurettetop.ml (lurette/c/1_lurettetop 1.26 644))
(source/gen_stubs.ml (lurette/24_generate_l 1.41 644))
(source/control.mli (lurette/c/3_control.ml 1.3 644))
......@@ -160,10 +146,10 @@ source/store.ml:
(lurette.depfull.dot (lurette/b/5_lurette.de 1.2 644))
(TAGS (lurette/21_TAGS 1.6 644))
(test/time-ossau.exp (lurette/b/48_time.exp 1.31 644))
(test/time-ossau.res (lurette/b/49_time.res 1.34 644))
(test/time-ecrins.res (lurette/d/20_time-ecrin 1.8 644))
(test/time-ecrins.exp (lurette/d/21_time-ecrin 1.8 644))
(test/time-ossau.exp (lurette/b/48_time.exp 1.32 644))
(test/time-ossau.res (lurette/b/49_time.res 1.35 644))
(test/time-ecrins.res (lurette/d/20_time-ecrin 1.9 644))
(test/time-ecrins.exp (lurette/d/21_time-ecrin 1.9 644))
;; Various files used for testing purposes
(test/usager.luc (lurette/b/14_usager.env 1.10 644))
......@@ -201,9 +187,9 @@ source/store.ml:
(test/Makefile (lurette/c/0_Makefile 1.8 644))
;; xlurette
(ihm/xlurette/xlurette_glade_main.ml (lurette/c/12_xlurette_g 1.15 644))
(ihm/xlurette/xlurette.glade (lurette/c/13_xlurette.g 1.9 644))
(ihm/xlurette/xlurette_glade_interface.ml (lurette/c/15_xlurette_g 1.8 644))
(ihm/xlurette/xlurette_glade_main.ml (lurette/c/12_xlurette_g 1.16 644))
(ihm/xlurette/xlurette.glade (lurette/c/13_xlurette.g 1.10 644))
(ihm/xlurette/xlurette_glade_interface.ml (lurette/c/15_xlurette_g 1.9 644))
(ihm/xlurette/makefile (lurette/c/16_makefile 1.7 644))
......
......@@ -26,7 +26,7 @@ type cmd_line_optionT =
Step | NoStep | Help
| DisplayLocalVar | NoDisplayLocalVar
| Sim2chro | NoSim2chro
| Inside | Edges
| Inside | Edges | Vertices
(* | CuddHeapInit *)
| Seed | Precision | NoOracle | Verbose | ShowStep | Output
......@@ -66,6 +66,7 @@ let (string_to_option: (string * cmd_line_optionT) list) = [
("--draw-inside", Inside);
("--draw-edges", Edges);
("--draw-vertices", Vertices);
(* ("--init-cudd-heap", CuddHeapInit) *)
]
......@@ -86,6 +87,7 @@ let (option_to_usage: cmd_line_optionT -> string) =
| NoOracle -> "Do not run the oracle.\n "
| Inside -> "Draw inside the convex hull of solutions.\n "
| Edges -> "Draw inside the convex hull of solutions, but a little bit more at edges and vertices.\n "
| Vertices -> "Draw among the vertices of the convex hull of solutions.\n "
| Verbose -> "Set on a wordier mode.\n"
| ShowStep -> "Set on a mode where the step number is printed on the standard output.\n"
| Help -> "Print this message.\n"
......
......@@ -40,7 +40,7 @@ type cmd_line_optionT =
| DisplayLocalVar | NoDisplayLocalVar
| Sim2chro | NoSim2chro
(* | CuddHeapInit *)
| Inside | Edges
| Inside | Edges | Vertices
| Seed | Precision | NoOracle | Verbose | ShowStep | Output
......
......@@ -16,7 +16,7 @@ type optionsT = {
}
type cmd_line_optionT =
Seed | Inside | Edges | Precision | Boot | ShowAut | NoShowAut | Verbose
Seed | Inside | Edges | Vertices | Precision | Boot | ShowAut | NoShowAut | Verbose
(* Names of the command line options to override the defaults. *)
let (string_to_option: (string * cmd_line_optionT) list) = [
......@@ -31,6 +31,7 @@ let (string_to_option: (string * cmd_line_optionT) list) = [
("--draw-inside", Inside);
("--draw-edges", Edges);
("--draw-vertices", Vertices);
("--show-aut", ShowAut);
("-s", ShowAut);
......@@ -50,6 +51,7 @@ let (option_to_usage: cmd_line_optionT -> string) =
| Precision -> "Set the precision used for numerical values (number of digits).\n"
| Inside -> "Draw inside the convex hull of solutions.\n "
| Edges -> "Draw inside the convex hull of solutions, but a little bit more at edges and vertices.\n "
| Vertices -> "Draw among the vertices of the convex hull of solutions.\n "
| Seed -> "Set the value of the seed the random engine is initialized with (0 lets the system draw a seed).\n"
| Verbose -> "Set on a verbose mode.\n"
......
......@@ -28,7 +28,7 @@ val cmd_line_string_to_int : string -> string -> int
*)
type cmd_line_optionT =
Seed | Inside | Edges | Precision | Boot | ShowAut | NoShowAut | Verbose
Seed | Inside | Edges | Vertices | Precision | Boot | ShowAut | NoShowAut | Verbose
val string_to_option: (string * cmd_line_optionT) list
......
......@@ -16,7 +16,7 @@ open Formula
(****************************************************************************)
type draw_mode = Edges | Inside
type draw_mode = Edges | Inside | Vertices
(*
** The environment is a list of graphs whose arcs are labelled by weighted
......@@ -99,7 +99,7 @@ type env_stateT = {
executed. *)
mutable draw_mode : draw_mode;
(** Whether we draw on verteces, edges, or inside the convex hull of solution *)
(** Whether we draw on vertices, edges, or inside the convex hull of solution *)
mutable verbose : bool;
......
......@@ -14,7 +14,7 @@
open Formula
type draw_mode = Edges | Inside
type draw_mode = Edges | Inside | Vertices
val read_env_state : string list list -> unit
(** [read_env_state files_ll] updates the global variable
......@@ -187,7 +187,7 @@ val ctrl_state: unit -> Control.state
val set_ctrl_state: Control.state -> unit
(** Returns and sets a mode of draw, namely, whether the draw
is done among the verteces the the convex hull of sol,
is done among the vertices the the convex hull of sol,
on its edges, or inside it. *)
val draw_mode: unit -> draw_mode
val set_draw_mode: draw_mode -> unit
......
......@@ -257,6 +257,7 @@ and
| Verbose -> Env_state.set_verbose true ; (n+1)
| Inside -> Env_state.set_draw_mode Env_state.Inside ; (n+1)
| Edges -> Env_state.set_draw_mode Env_state.Edges ; (n+1)
| Vertices -> Env_state.set_draw_mode Env_state.Vertices ; (n+1)
| Precision ->
let str = (Sys.argv.(n+1)) in
Util.precision := (cmd_line_string_to_int str
......
......@@ -168,6 +168,7 @@ and
| ShowStep -> options.show_step <- true ; (n+1)
| Inside -> Env_state.set_draw_mode Env_state.Inside ; (n+1)
| Edges -> Env_state.set_draw_mode Env_state.Edges ; (n+1)
| Vertices -> Env_state.set_draw_mode Env_state.Vertices ; (n+1)
| Help -> options.help <- true ; (n+1)
| Output ->
let str = (Sys.argv.(n+1)) in
......
......@@ -20,7 +20,7 @@ Type help and/or man at the prompt for more info.
Command line <options> are:
"
type draw_mode = Verteces | Edges | Inside
type draw_mode = Vertices | Edges | Inside
type flagT = {
mutable sut : string ;
......@@ -149,8 +149,8 @@ let rec speclist =
"--draw-edges", Arg.Unit (fun _ -> flag.draw_mode <- Edges),
"\t\tDraw on the edges of the convex hull of solutions.\n ";
"--draw-verteces", Arg.Unit (fun _ -> flag.draw_mode <- Verteces),
"\tDraw among the verteces of the convex hull of solutions.\n ";
"--draw-vertices", Arg.Unit (fun _ -> flag.draw_mode <- Vertices),
"\tDraw among the vertices of the convex hull of solutions.\n ";
"--seed", Arg.Int (fun i -> flag.seed <- Some i),
......@@ -335,7 +335,7 @@ let (run : string -> int) =
match flag.draw_mode with
Inside -> ["--draw-inside"]
| Edges -> ["--draw-edges"]
| Verteces -> ["--draw-verteces" ]
| Vertices -> ["--draw-vertices" ]
and orac_str =
match flag.oracle with
None -> ["--no-oracle"]
......@@ -455,7 +455,7 @@ type cmd =
| Run
| DrawInside
| DrawEdges
| DrawVerteces
| DrawVertices
| Quit
| Help
| Man
......@@ -496,7 +496,7 @@ let rec
match id with
"inside" -> DrawInside
| "edges" -> DrawEdges
| "verteces" -> DrawVerteces
| "vertices" -> DrawVertices
| _ -> Error ("Unknown draw mode (" ^ id ^ ")\n")
)
| [< 'Genlex.Ident "show" >] -> Show
......@@ -698,14 +698,14 @@ set_draw_nb <integer>
Its current value is \"" ^ (string_of_int flag.draw_nb) ^ "\"
set_draw_mode <draw_mode>
set the draw mode, which can be either be inside, edges, or verteces.
set the draw mode, which can be either be inside, edges, or vertices.
- inside : draw inside the convex hull of solutions.
- edges : draw on the edges of the convex hull of solutions.
- verteces : draw among the verteces of the convex hull of solutions.
- vertices : draw among the vertices of the convex hull of solutions.
Its current mode is \"" ^ (match flag.draw_mode with
Inside -> "inside"
| Edges -> "edges"
| Verteces -> "verteces"
| Vertices -> "vertices"
) ^ "\".
set_seed <integer>
......@@ -835,8 +835,8 @@ let (read_commands : string -> string -> string -> (unit -> string) -> bool) =
flag.draw_mode <- Inside; true
| DrawEdges ->
flag.draw_mode <- Edges; true
| DrawVerteces ->
flag.draw_mode <- Verteces; true
| DrawVertices ->
flag.draw_mode <- Vertices; true
| Output(str) ->
flag.output <- str; true
| Clean ->
......
......@@ -872,6 +872,9 @@ let (draw : vn list -> vnt list -> Bdd.t -> Bdd.t -> subst list * subst list) =
| Env_state.Inside ->
let sl = draw_inside store_poly [] in
draw_inside store_range sl
| Env_state.Vertices ->
let sl = draw_vertices store_poly [] in
draw_inside store_range sl
in
let num_subst_l =
List.map
......
......@@ -950,7 +950,7 @@ let (draw_inside_gen : (int -> point list -> point list) ->
| Poly vntl_poly_rtn_list ->
(List.fold_left
(fun sl_acc (vntl, poly, rank_to_name) ->
let pl = Draw.get_verteces poly rank_to_name in
let pl = Draw.get_vertices poly rank_to_name in
let lgt = List.length pl in
let dim = Poly.dim poly in
let pl2 = draw_n_pts (min lgt (dim+1)) pl in
......@@ -1013,65 +1013,65 @@ let (draw_edges : t -> Formula.num_subst list -> Formula.num_subst list) =
(* exported *)
(* let (draw_verteces : t -> Formula.num_subst list -> Formula.num_subst list) = *)
(* fun store sl_prev -> *)
(* match store.var with *)
(* Unsat -> assert false *)
(* | Poly vntl_poly_rtn_list -> *)
(* (List.fold_left *)
(* (fun sl_acc (vntl, poly, rank_to_name) -> *)
(* let pl = Draw.get_verteces poly rank_to_name in *)
(* let i = Random.int (List.length pl) in *)
(* let p = List.nth pl i in *)
(* let sl = *)
(* (* print_points pl; *) *)
(* snd *)
(* (List.fold_left *)
(* (fun (j, sl) x -> *)
(* let vn = rank_to_name j in *)
(* let vt = List.assoc vn vntl in *)
(* let s = *)
(* match vt with *)
(* BoolT -> assert false *)
(* | FloatT(_,_) -> (vn, F(x)) *)
(* | IntT(_,_) -> *)
(* (* XXX brrrr, this is wrong !! *) *)
(* (vn, I(truncate x)) *)
(* in *)
(* (j+1, s::sl) *)
(* ) *)
(* (0, []) *)
(* p *)
(* ) *)
(* in *)
(* rev_append sl sl_acc *)
(* ) *)
(* [] *)
(* vntl_poly_rtn_list *)
(* ) *)
(* | Range(tbl) -> *)
(* let sl0 = *)
(* Hashtbl.fold *)
(* (fun vn range acc -> *)
(* ( match range with *)
(* | RangeI(min, max) -> *)
(* let ran = Random.int 2 *)
(* in *)
(* if ran = 0 *)
(* then ((vn, I(min))::acc) *)
(* else ((vn, I(max))::acc) *)
(* | RangeF(min, max) -> *)
(* let ran = Random.int 2 in *)
(* if ran = 0 *)
(* then ((vn, F(min))::acc) *)
(* else ((vn, F(max))::acc) *)
(* )) *)
(* tbl *)
(* [] *)
(* in *)
(* let sl = rev_append sl0 sl_prev in *)
(* List.rev_append sl (deduce_remaining_vars sl store) *)
(* *)
let (draw_vertices : t -> Formula.num_subst list -> Formula.num_subst list) =
fun store sl_prev ->
match store.var with
Unsat -> assert false
| Poly vntl_poly_rtn_list ->
(List.fold_left
(fun sl_acc (vntl, poly, rank_to_name) ->
let pl = Draw.get_vertices poly rank_to_name in
let i = Random.int (List.length pl) in
let p = List.nth pl i in
let sl =
(* print_points pl; *)
snd
(List.fold_left
(fun (j, sl) x ->
let vn = rank_to_name j in
let vt = List.assoc vn vntl in
let s =
match vt with
BoolT -> assert false
| FloatT(_,_) -> (vn, F(x))
| IntT(_,_) ->
(* XXX brrrr, this is wrong !! *)
(vn, I(truncate x))
in
(j+1, s::sl)
)
(