Commit 5a165497 authored by Erwan Jahier's avatar Erwan Jahier

lurette 0.126 Fri, 21 Feb 2003 18:49:20 +0100 by jahier

Parent-Version:      0.125
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/lurette.ml:
source/lurettetop.ml:
   Add the possibility to set the precision from lucky and lurette command
lines.

   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

Project-Description: Lurette
parent 27272998
......@@ -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 6399 1045841411 b/49_time.res 1.33)
(test/time-ossau.res 6497 1045849760 b/49_time.res 1.34)
(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 2967 1045834161 b/26_rnumsolver 1.14)
(source/store.mli 2895 1045849760 b/26_rnumsolver 1.15)
(source/prevar.ml 981 1037192189 d/18_prevar.ml 1.1)
(test/time-ecrins.exp 6398 1045841411 d/21_time-ecrin 1.7)
(test/time-ecrins.exp 6497 1045849760 d/21_time-ecrin 1.8)
(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 12316 1045489850 b/32_ima_exe.ml 1.24)
(source/luc_exe.ml 12687 1045849760 b/32_ima_exe.ml 1.25)
(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 6791 1036675177 50_env_state. 1.25)
(source/env_state.mli 6780 1045849760 50_env_state. 1.26)
(mlcuddidl/idd.ml 7061 1034006019 d/0_idd.ml 1.1)
(test/time-ossau.exp 6399 1045841411 b/48_time.exp 1.30)
(test/time-ossau.exp 6497 1045849760 b/48_time.exp 1.31)
(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 1045841411 41_parse_env. 1.37)
(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)
(demo/chaudiere/chaudiere_oracle.lus 107 1031732392 c/8_chaudiere_ 1.1)
(source/solver.ml 29805 1045834161 39_solver.ml 1.42)
(source/solver.ml 29697 1045849760 39_solver.ml 1.43)
(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 14220 1044958837 12_lurette.ml 1.61)
(TODO 5448 1045841411 d/22_TODO 1.5)
(source/lurette.ml 14381 1045849760 12_lurette.ml 1.62)
(TODO 5368 1045849760 d/22_TODO 1.6)
(source/Makefile 1627 1044958837 c/20_Makefile 1.10)
(source/util.ml 21117 1045834161 35_util.ml 1.39)
(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 1055 1036675177 b/34_command_li 1.6)
(source/command_line_luc_exe.mli 1084 1045849760 b/34_command_li 1.7)
(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,7 +72,7 @@
(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 4914 1035557853 b/20_command_li 1.10)
(source/command_line.ml 4958 1045849760 b/20_command_li 1.11)
(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)
......@@ -80,23 +80,23 @@
(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 30421 1044958837 c/1_lurettetop 1.24)
(source/lurettetop.ml 31026 1045849760 c/1_lurettetop 1.25)
(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 21351 1045841411 51_env_state. 1.37)
(source/env_state.ml 21340 1045849760 51_env_state. 1.38)
(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)
(mlcuddidl/rdd_caml.c 41613 1034006019 c/39_rdd_caml.c 1.1)
(Makefile.common.in 528 1034951022 d/12_Makefile.c 1.2)
(user-rules 15719 1045558187 c/14_myrules 1.24)
(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 30305 1045834161 b/27_rnumsolver 1.21)
(source/store.ml 31012 1045849760 b/27_rnumsolver 1.22)
(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,7 +108,7 @@
(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 1491 1035557853 b/21_command_li 1.9)
(source/command_line.mli 1492 1045849760 b/21_command_li 1.10)
(ihm/xlurette/xlurette.glade 49433 1035885606 c/13_xlurette.g 1.9)
(demo/chaudiere/chaudiere.luc 446 1032789516 c/11_chaudiere. 1.5)
(source/graph.mli 2185 1037625990 13_graph.mli 1.10)
......@@ -122,7 +122,7 @@
(mlcuddidl/mtbdd.ml 10185 1034006019 c/44_mtbdd.ml 1.1)
(demo/chaudiere/chaudiere_ctrl.lus 177 1031732392 c/9_chaudiere_ 1.1)
(source/control.mli 3208 1036675177 c/3_control.ml 1.3)
(source/formula.ml 5909 1045834161 45_formula.ml 1.26)
(source/formula.ml 5910 1045849760 45_formula.ml 1.27)
(cuddaux/Makefile 3091 1034006019 c/35_Makefile 1.1)
(test/test_gen_stubs.h 1818 1020068208 b/45_test_gen_s 1.1)
(doc/ocamldoc.hva 313 1008328137 b/13_ocamldoc.h 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 2748 1040226023 b/33_command_li 1.9)
(source/command_line_luc_exe.ml 3129 1045849760 b/33_command_li 1.10)
(mlcuddidl/cudd_caml.h 1210 1034006019 d/2_cudd_caml. 1.1)
(source/value.ml 2364 1045489850 c/23_value.ml 1.2)
(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 6398 1045841411 d/20_time-ecrin 1.7)
(test/time-ecrins.res 6497 1045849760 d/20_time-ecrin 1.8)
(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)
......@@ -5,7 +5,6 @@
*********** A faire maintenant
* Rajouter la precision des calculs comme parametres de lurette/lucky
* Traiter les variables stables (signaux purs)
......@@ -26,12 +25,13 @@
* Inferer la croix, plutot que de verifier !!!
* Documenter les 2 nouvelles notions de tirage
* La notion d'epaisseur est mal branlée, surtout en presence de var
numériques. Il faudrait un 3eme parametre sui dit le nombre
de tirage que l'on fait dans chaque polyedres.
* remplacer l'epaisseur de formules par un taux de couverture
* rajouter une option qui dit si les formules doivent etre tronquees
dans show_luc
......@@ -63,7 +63,6 @@
* Finir le fichier README. Faire un fichier INSTALL.
* remplacer l'epaisseur de formules par un taux de couverture
* utiliser Unix.create_process plutot que Sys.command partout !!
......@@ -76,6 +75,7 @@
* inclure ocaml.opt et camlidl dans la distrib ???
* Chercher a detecter des egalites lors de l'ajout d'une inegalité.
(cf code commenter dans store.ml)
* xlurette :
- bouton sim2chro ; mettre les locales en vert -> pragma dans sim2chro !!
......
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Lurette")
(Project-Version lurette 0 125)
(Parent-Version lurette 0 124)
(Project-Version lurette 0 126)
(Parent-Version lurette 0 125)
(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/lurette.ml:
source/lurettetop.ml:
Add the possibility to set the precision from lucky and lurette command lines.
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:
Make most fields of the automata syntax optional so that
people are not obliged to refer to empty list of, eg,
formula.
Allow to forget empty fields in the automata format.
source/store.ml:
Plug the new drawing heuristic
Also add a field formula that let one defines global formula.
This field is currently unplugged (ie, it parses, but the information
contained in that fied in ignored).
")
(New-Version-Log ""
)
(Checkin-Time "Fri, 21 Feb 2003 16:30:11 +0100")
(Checkin-Time "Fri, 21 Feb 2003 18:49:20 +0100")
(Checkin-Login jahier)
(Populate-Ignore ())
(Project-Keywords)
......@@ -28,17 +44,17 @@ source/parse_env.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.24 644))
(source/luc_exe.ml (lurette/b/32_ima_exe.ml 1.25 644))
(source/command_line_luc_exe.ml (lurette/b/33_command_li 1.9 644))
(source/command_line_luc_exe.mli (lurette/b/34_command_li 1.6 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))
;; Sources files for lurette only
(source/lurette.mli (lurette/11_lurette.ml 1.12 644))
(source/lurette.ml (lurette/12_lurette.ml 1.61 644))
(source/lurette.ml (lurette/12_lurette.ml 1.62 644))
(source/command_line.ml (lurette/b/20_command_li 1.10 644))
(source/command_line.mli (lurette/b/21_command_li 1.9 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))
;; Sources files common to lurette and luc_exe
(source/graph.mli (lurette/13_graph.mli 1.10 644))
......@@ -47,28 +63,28 @@ source/parse_env.ml:
(source/env.mli (lurette/15_env.mli 1.17 644))
(source/env.ml (lurette/16_env.ml 1.29 644))
(source/util.ml (lurette/35_util.ml 1.39 444))
(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.42 644))
(source/solver.ml (lurette/39_solver.ml 1.43 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.14 644))
(source/store.ml (lurette/b/27_rnumsolver 1.21 644))
(source/store.mli (lurette/b/26_rnumsolver 1.15 644))
(source/store.ml (lurette/b/27_rnumsolver 1.22 644))
(source/pnumsolver.ml (lurette/d/23_pnumsolver 1.2 644))
(source/pnumsolver.mli (lurette/d/24_pnumsolver 1.2 644))
(source/parse_env.mli (lurette/40_parse_env. 1.12 644))
(source/parse_env.ml (lurette/41_parse_env. 1.37 644))
(source/parse_env.ml (lurette/41_parse_env. 1.38 644))
(source/show_env.mli (lurette/42_show_env.m 1.8 644))
(source/show_env.ml (lurette/43_show_env.m 1.16 644))
(source/formula.mli (lurette/44_formula.ml 1.21 644))
(source/formula.ml (lurette/45_formula.ml 1.26 644))
(source/formula.ml (lurette/45_formula.ml 1.27 644))
(source/print.mli (lurette/46_print.mli 1.13 644))
(source/print.ml (lurette/47_print.ml 1.22 644))
......@@ -76,8 +92,8 @@ source/parse_env.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.25 644))
(source/env_state.ml (lurette/51_env_state. 1.37 644))
(source/env_state.mli (lurette/50_env_state. 1.26 644))
(source/env_state.ml (lurette/51_env_state. 1.38 644))
(source/automata.mli (lurette/b/46_automata.m 1.3 644))
(source/automata.ml (lurette/b/47_automata.m 1.6 644))
......@@ -88,7 +104,7 @@ source/parse_env.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.24 644))
(source/lurettetop.ml (lurette/c/1_lurettetop 1.25 644))
(source/gen_stubs.ml (lurette/24_generate_l 1.41 644))
(source/control.mli (lurette/c/3_control.ml 1.3 644))
......@@ -100,7 +116,7 @@ source/parse_env.ml:
(source/ne.ml (lurette/c/21_ne.ml 1.5 644))
(source/ne.mli (lurette/c/22_ne.mli 1.5 644))
(source/value.ml (lurette/c/23_value.ml 1.2 644))
(source/value.ml (lurette/c/23_value.ml 1.3 644))
(source/value.mli (lurette/c/24_value.mli 1.1 644))
(source/prevar.ml (lurette/d/18_prevar.ml 1.1 644))
......@@ -117,7 +133,7 @@ source/parse_env.ml:
(Makefile.common.in (lurette/d/12_Makefile.c 1.2 644))
(OcamlMakefile (lurette/17_OcamlMakef 1.47 644))
(Makefile.lurette (lurette/b/38_Makefile.l 1.16 644))
(user-rules (lurette/c/14_myrules 1.24 644))
(user-rules (lurette/c/14_myrules 1.25 644))
(user-rules.skel (lurette/c/25_user-rules 1.2 644))
(Makefile (lurette/d/13_Makefile 1.1 644))
......@@ -144,10 +160,10 @@ source/parse_env.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.30 644))
(test/time-ossau.res (lurette/b/49_time.res 1.33 644))
(test/time-ecrins.res (lurette/d/20_time-ecrin 1.7 644))
(test/time-ecrins.exp (lurette/d/21_time-ecrin 1.7 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))
;; Various files used for testing purposes
(test/usager.luc (lurette/b/14_usager.env 1.10 644))
......@@ -234,7 +250,7 @@ source/parse_env.ml:
(mlcuddidl/Changes (lurette/d/10_Changes 1.1 644))
(TODO (lurette/d/22_TODO 1.5 644))
(TODO (lurette/d/22_TODO 1.6 644))
)
(Merge-Parents)
......
......@@ -26,9 +26,9 @@ type cmd_line_optionT =
Step | NoStep | Help
| DisplayLocalVar | NoDisplayLocalVar
| Sim2chro | NoSim2chro
| Inside | Edges | Verteces
| Inside | Edges
(* | CuddHeapInit *)
| Seed | NoOracle | Verbose | ShowStep | Output
| Seed | Precision | NoOracle | Verbose | ShowStep | Output
(* Names of the command line options to override the defaults. *)
let (string_to_option: (string * cmd_line_optionT) list) = [
......@@ -54,6 +54,8 @@ let (string_to_option: (string * cmd_line_optionT) list) = [
("--with-seed", Seed);
("-seed", Seed);
("--precision", Precision);
("--call-sim2chro", Sim2chro);
("--do-not-call-sim2chro", NoSim2chro);
("-ns2c", NoSim2chro);
......@@ -64,7 +66,6 @@ let (string_to_option: (string * cmd_line_optionT) list) = [
("--draw-inside", Inside);
("--draw-edges", Edges);
("--draw-verteces", Verteces);
(* ("--init-cudd-heap", CuddHeapInit) *)
]
......@@ -81,10 +82,10 @@ let (option_to_usage: cmd_line_optionT -> string) =
| NoSim2chro -> "Do not call sim2chro when lurette resumes.\n"
(* | CuddHeapInit -> "Set a magic number (related to the gc) that is used by mldd \n\t\t\tfor initializing Dd (Default is 20).\n" *)
| Seed -> "Set the value of the seed the random engine is initialized with (0 lets the system draw a seed).\n"
| Precision -> "Set the precision used for numerical values (number of digits).\n"
| NoOracle -> "Do not run the oracle.\n "
| Inside -> "Draw inside the convex hull of solutions.\n "
| Edges -> "Draw on the edges of the convex hull of solutions.\n "
| Verteces -> "Draw among the verteces of the convex hull of solutions.\n "
| Edges -> "Draw inside the convex hull of solutions, but a little bit more at edges and vertices.\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,8 +40,8 @@ type cmd_line_optionT =
| DisplayLocalVar | NoDisplayLocalVar
| Sim2chro | NoSim2chro
(* | CuddHeapInit *)
| Inside | Edges | Verteces
| Seed | NoOracle | Verbose | ShowStep | Output
| Inside | Edges
| Seed | Precision | NoOracle | Verbose | ShowStep | Output
val string_to_option: (string * cmd_line_optionT) list
......
......@@ -16,7 +16,7 @@ type optionsT = {
}
type cmd_line_optionT =
Seed | Boot | ShowAut | NoShowAut | Verbose
Seed | Inside | Edges | Precision | Boot | ShowAut | NoShowAut | Verbose
(* Names of the command line options to override the defaults. *)
let (string_to_option: (string * cmd_line_optionT) list) = [
......@@ -27,6 +27,11 @@ let (string_to_option: (string * cmd_line_optionT) list) = [
("--with-seed", Seed);
("-seed", Seed);
("--precision", Precision);
("--draw-inside", Inside);
("--draw-edges", Edges);
("--show-aut", ShowAut);
("-s", ShowAut);
......@@ -42,6 +47,9 @@ let (option_to_usage: cmd_line_optionT -> string) =
Boot -> "The automata starts generating values.\n"
| ShowAut -> "Run lucky showing the lucky automata.\n"
| NoShowAut -> "Do not show the luc automata (Default).\n"
| 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 "
| 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 | Boot | ShowAut | NoShowAut | Verbose
Seed | Inside | Edges | Precision | Boot | ShowAut | NoShowAut | Verbose
val string_to_option: (string * cmd_line_optionT) list
......
......@@ -16,7 +16,7 @@ open Formula
(****************************************************************************)
type draw_mode = Verteces | Edges | Inside
type draw_mode = Edges | Inside
(*
** The environment is a list of graphs whose arcs are labelled by weighted
......@@ -262,7 +262,6 @@ let (set_verbose: bool -> unit) =
env_state.verbose <- b
(****************************************************************************)
let (pre: unit -> subst list) =
fun _ ->
......
......@@ -14,7 +14,7 @@
open Formula
type draw_mode = Verteces | Edges | Inside
type draw_mode = Edges | Inside
val read_env_state : string list list -> unit
(** [read_env_state files_ll] updates the global variable
......
......@@ -125,7 +125,7 @@ and
| Ivar(str) -> (Prevar.format str)
| Fvar(str) -> (Prevar.format str)
| Ival(i) -> string_of_int i
| Fval(f) -> Util.my_string_of_float f
| Fval(f) -> Util.my_string_of_float f
| Ite(f,e1,e2) -> ("(if " ^ (formula_to_string f) ^ " then " ^
(expr_to_string e1) ^ " else " ^
(expr_to_string e2) ^ ")")
......
......@@ -255,6 +255,15 @@ and
| NoShowAut -> options.show_automata <- false ; (n+1)
| Boot -> options.boot <- true ; (n+1)
| 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)
| Precision ->
let str = (Sys.argv.(n+1)) in
Util.precision := (cmd_line_string_to_int str
("*** Error when calling lurette: an " ^
"integer is expected after the " ^
"option --precision\n")) ;
n+2
| Seed ->
let str = (Sys.argv.(n+1)) in
options.user_seed <- cmd_line_string_to_int str
......
......@@ -168,7 +168,6 @@ 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)
| Verteces -> Env_state.set_draw_mode Env_state.Verteces ; (n+1)
| Help -> options.help <- true ; (n+1)
| Output ->
let str = (Sys.argv.(n+1)) in
......@@ -182,6 +181,13 @@ and
"integer is expected after the " ^
"option --with-seed\n") ;
n+2
| Precision ->
let str = (Sys.argv.(n+1)) in
Util.precision :=(cmd_line_string_to_int str
("*** Error when calling lurette: an " ^
"integer is expected after the " ^
"option --precision\n")) ;
n+2
end
with Not_found -> n
and
......
......@@ -36,6 +36,7 @@ type flagT = {
mutable display_local_var : bool ref ;
mutable display_sim2chro : bool ref;
mutable seed : int option ;
mutable precision : int ;
mutable verbose : bool ref ;
mutable show_step : bool ref ;
mutable output : string ;
......@@ -67,6 +68,7 @@ let (flag : flagT) = {
display_local_var = ref true ;
display_sim2chro = ref true ;
seed = None ;
precision = 2;
verbose = ref false ;
output = "lurette.rif" ;
prompt = None ;
......@@ -155,6 +157,10 @@ let rec speclist =
"<int>\t\tSeed the random engine is init with." ;
"-seed", Arg.Int (fun i -> flag.seed <- Some i), " <int>\n";
"--precision", Arg.Int (fun i -> flag.precision <- i),
"<int>\t\tSet the precision used with floats." ;
"-p", Arg.Int (fun i -> flag.precision <- i), " <int>\n";
(* This option is not meant to be available to end-users... *)
"--make-opt", Arg.String (fun s -> flag.make_opt <- s),
("<string>\tOptions to call make with when building \n" ^
......@@ -322,6 +328,7 @@ let (run : string -> int) =
match flag.seed with
None -> []
| Some i -> "-seed"::[(string_of_int i)]
and precision_str = "--precision"::[string_of_int flag.precision]
and verb_str = if !(flag.verbose) then ["-v"] else []
and show_step_str = if !(flag.show_step) then ["--show-step"] else []
and draw_mode_str =
......@@ -373,6 +380,7 @@ let (run : string -> int) =
draw_nb_str ;
draw_mode_str ;
seed_str;
precision_str;
verb_str ;
show_step_str ;
orac_str ;
......@@ -436,6 +444,7 @@ type cmd =
| DisplayLocalVar of bool
| StepByStep of bool
| Seed of int
| Precision of int
| RandomSeed
| Verbose of bool
| ShowStep of bool
......@@ -503,6 +512,7 @@ let rec
| [< 'Genlex.Ident "set_formula_nb" ; 'Genlex.Int i >] -> FormulaNb(i)
| [< 'Genlex.Ident "set_draw_nb" ; 'Genlex.Int i >] -> DrawNb(i)
| [< 'Genlex.Ident "set_seed" ; 'Genlex.Int i >] -> Seed(i)
| [< 'Genlex.Ident "set_precision" ; 'Genlex.Int i >] -> Precision(i)
| [< 'Genlex.Ident "set_seed_randomly" >] -> RandomSeed
| [< 'Genlex.Ident "set_step_by_step" ; 'Genlex.Ident str >] ->
......@@ -704,6 +714,10 @@ set_seed <integer>
None -> "chose randomly"
| Some i -> ("\"" ^ (string_of_int i) ^ "\"")) ^ "
set_precision <integer>
to set precision used to manipulate floats.
Its current value is " ^ (string_of_int flag.precision) ^ "
set_seed_randomly
to the system set a seed randomly.
......@@ -805,6 +819,8 @@ let (read_commands : string -> string -> string -> (unit -> string) -> bool) =
flag.step_by_step := b; true
| Seed(i) ->
flag.seed <- Some i; true
| Precision(i) ->
flag.precision <- i; true
| RandomSeed ->
flag.seed <- None; true
| Verbose(b) ->
......
......@@ -54,7 +54,8 @@ let print_err_msg ic tok tok_list func msg msg2 =
Genlex.Kwd(str) -> print_string ("`" ^ str ^ "' ")
| Genlex.Ident(str) -> print_string ("`" ^ str ^ "' ")
| Genlex.Int(i) -> print_string "`"; print_int i; print_string "' "
| Genlex.Float(f) -> print_string "`"; Util.my_print_float f; print_string "' "
| Genlex.Float(f) ->
print_string "`"; print_float f; print_string "' "
| Genlex.String(str) -> print_string ("`" ^ str ^ "' ")
| Genlex.Char(c) -> print_string "`"; print_char c ; print_string "' "
in
......
......@@ -866,9 +866,6 @@ let (draw : vn list -> vnt list -> Bdd.t -> Bdd.t -> subst list * subst list) =
[]
else
match Env_state.draw_mode () with
Env_state.Verteces ->
let sl = (draw_verteces store_poly []) in
draw_verteces store_range sl
| Env_state.Edges ->
let sl = draw_edges store_poly [] in
draw_edges store_range sl
......
......@@ -1008,130 +1008,130 @@ let (draw_inside_gen : (int -> point list -> point list) ->
let (draw_inside : t -> Formula.num_subst list -> Formula.num_subst list) =
draw_inside_gen (draw_n_distinc_points)
let (draw_inside_edges : t -> Formula.num_subst list -> Formula.num_subst list) =
let (draw_edges : t -> Formula.num_subst list -> Formula.num_subst list) =
draw_inside_gen (draw_n_points)
(* 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(