Commit 34cdff0c authored by Erwan Jahier's avatar Erwan Jahier

lurette 0.121 Tue, 11 Feb 2003 11:20:37 +0100 by jahier

Parent-Version:      0.120
Version-Log:

source/pnumsolver.ml:
source/pnumsolver.mli: [new files]
   Implements a numeric solver based on Polka.
   (not plugged yet).

source/rnumsolver.ml:
   Reimplement split_store so that it uses 2 calls of add_constraint
   instead of doing the work twice inside split_store (in order to avoid code
   duplication).

   Also, whenever delayed constraints becomes of dimension 1, when a
add_constraint
   binds a value, add them to the store.

   Enhance error msgs whenever int and float are mixed in the same lucky
   expressions.

source/rnumsolver.ml:
source/ne.ml:
   rename Ne.resolve_triangular_system into get_subst_from_solved_system
   and move it into rnumsolver. The rational is that is was not
   really solving any triangular system: the system ougth to be already solved.

source/parce_env.ml:
   Set the max_float to max_int, otherwise, the conversion into polka rational
   fails...

Project-Description: Lurette
parent d6a175bd
......@@ -11,7 +11,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 6395 1040292929 b/49_time.res 1.28)
(test/time-ossau.res 6400 1044958837 b/49_time.res 1.29)
(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)
......@@ -20,16 +20,16 @@
(mlcuddidl/sedscript 203 1034006019 c/38_sedscript 1.1)
(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 9371 1037625990 c/21_ne.ml 1.3)
(source/ne.ml 8857 1044958837 c/21_ne.ml 1.4)
(source/prevar.ml 981 1037192189 d/18_prevar.ml 1.1)
(test/time-ecrins.exp 6392 1040292929 d/21_time-ecrin 1.2)
(test/time-ecrins.exp 6407 1044958837 d/21_time-ecrin 1.3)
(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 1485 1034951022 b/30_heater_flo 1.11)
(test/temp_int.luc 685 1033723811 b/50_temp_int.e 1.3)
(source/luc_exe.ml 12235 1037625990 b/32_ima_exe.ml 1.23)
(source/prevar.mli 623 1037192189 d/19_prevar.mli 1.1)
(test/heater_float.rif.exp 1485 1034951022 b/30_heater_flo 1.11)
(source/graph.ml 2339 1037625990 14_graph.ml 1.8)
(ihm/xlurette/makefile 1601 1040226023 c/16_makefile 1.7)
(test/usager.luc 495 1032789516 b/14_usager.env 1.9)
......@@ -42,29 +42,30 @@
(source/Makefile.show_luc 1026 1037192189 b/40_Makefile.s 1.8)
(source/env_state.mli 6791 1036675177 50_env_state. 1.25)
(mlcuddidl/idd.ml 7061 1034006019 d/0_idd.ml 1.1)
(test/time-ossau.exp 6395 1040292929 b/48_time.exp 1.25)
(test/time-ossau.exp 6400 1044958837 b/48_time.exp 1.26)
(source/print.mli 1145 1033397911 46_print.mli 1.12)
(mlcuddidl/rdd.mli 7174 1034006019 c/40_rdd.mli 1.1)
(test/Makefile 32 1035531408 c/0_Makefile 1.8)
(source/parse_env.ml 31420 1040290175 41_parse_env. 1.33)
(source/parse_env.ml 31534 1044958837 41_parse_env. 1.34)
(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 29908 1040292929 39_solver.ml 1.38)
(source/solver.ml 30116 1044958837 39_solver.ml 1.39)
(source/pnumsolver.ml 9231 1044958837 d/23_pnumsolver 1.1)
(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 14219 1036675177 12_lurette.ml 1.60)
(TODO 4962 1040290175 d/22_TODO 1.1)
(source/Makefile 1377 1036585364 c/20_Makefile 1.9)
(source/util.ml 20862 1037625990 35_util.ml 1.36)
(source/lurette.ml 14220 1044958837 12_lurette.ml 1.61)
(TODO 5068 1044958837 d/22_TODO 1.2)
(source/Makefile 1627 1044958837 c/20_Makefile 1.10)
(source/util.ml 20845 1044958837 35_util.ml 1.37)
(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)
(test/giro/onlyroll.lus 18298 1031732392 c/7_onlyroll.l 1.1)
(source/Makefile.lucky 2091 1037625990 b/41_Makefile.i 1.10)
(source/Makefile.lucky 2593 1044958837 b/41_Makefile.i 1.11)
(TAGS 9825 1007379917 21_TAGS 1.6)
(mlcuddidl/rdd.ml 8746 1034006019 c/41_rdd.ml 1.1)
(source/Makefile.lurette_lib 1797 1037625990 c/2_Makefile.l 1.10)
(source/Makefile.lurette_lib 2054 1044958837 c/2_Makefile.l 1.11)
(source/parse_env.mli 1028 1036511217 40_parse_env. 1.11)
(source/gen_stubs.ml 27065 1036048863 24_generate_l 1.41)
(OcamlMakefile 22696 1037192189 17_OcamlMakef 1.46)
......@@ -76,30 +77,30 @@
(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 30395 1040226023 c/1_lurettetop 1.23)
(source/lurettetop.ml 30421 1044958837 c/1_lurettetop 1.24)
(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 2414 1037625990 c/22_ne.mli 1.2)
(source/ne.mli 2117 1044958837 c/22_ne.mli 1.3)
(README 2266 1037625990 10_README 1.5)
(test/vrai_tram.lus 564 1027066799 b/6_vrai_tram. 1.2)
(source/env_state.ml 21336 1037625990 51_env_state. 1.33)
(source/env_state.ml 21673 1044958837 51_env_state. 1.34)
(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 14961 1040290175 c/14_myrules 1.21)
(user-rules 15450 1044958837 c/14_myrules 1.22)
(doc/archi.fig 3693 1003928781 20_archi.fig 1.1)
(source/lurette.mli 448 1016027474 11_lurette.ml 1.12)
(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)
(Makefile.lurette 548 1036048863 b/38_Makefile.l 1.15)
(Makefile.lurette 574 1044958837 b/38_Makefile.l 1.16)
(source/luc_exe.mli 447 1033738731 b/31_ima_exe.ml 1.2)
(lurette.dep.dot 49 1007651448 b/4_lurette.de 1.2)
(mlcuddidl/bdd.idl 18233 1034006019 d/7_bdd.idl 1.1)
(source/constraint.ml 2418 1033732198 c/19_constraint 1.4)
(source/constraint.ml 2417 1044958837 c/19_constraint 1.5)
(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)
......@@ -109,6 +110,7 @@
(source/graph.mli 2185 1037625990 13_graph.mli 1.10)
(mlcuddidl/bdd_caml.c 57199 1034006019 d/4_bdd_caml.c 1.1)
(test/heater_int.lus 170 1020068208 b/43_heater_int 1.1)
(source/pnumsolver.mli 2321 1044958837 d/24_pnumsolver 1.1)
(cuddaux/Changes 42 1034006019 c/36_Changes 1.1)
(test/vrai_tram.h 2468 1027066799 b/7_vrai_tram. 1.3)
(test/tram.luc 1079 1032789516 b/15_tram.env 1.8)
......@@ -129,7 +131,7 @@
(mlcuddidl/bdd.mli 8573 1034006019 d/5_bdd.mli 1.1)
(doc/automata_format 0 1007379917 b/3_automata_f 1.1)
(source/solver.mli 1003 1027092697 38_solver.mli 1.13)
(source/rnumsolver.ml 21001 1040292929 b/27_rnumsolver 1.17)
(source/rnumsolver.ml 21281 1044958837 b/27_rnumsolver 1.18)
(mlcuddidl/cudd_caml.c 22890 1034006019 d/3_cudd_caml. 1.1)
(source/print.ml 5807 1033723811 47_print.ml 1.21)
(test/ControleurPorte.h 2306 1012914629 b/18_Controleur 1.1)
......@@ -139,13 +141,13 @@
(mlcuddidl/Changes 64 1034006019 d/10_Changes 1.1)
(source/parse_poc.ml 7093 1036048863 d/15_parse_poc. 1.1)
(cuddaux/cuddauxAddIte.c 12812 1034006019 c/32_cuddauxAdd 1.1)
(source/rnumsolver.mli 2156 1040292929 b/26_rnumsolver 1.10)
(source/rnumsolver.mli 2155 1044958837 b/26_rnumsolver 1.11)
(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)
(mlcuddidl/cudd_caml.h 1210 1034006019 d/2_cudd_caml. 1.1)
(source/value.ml 2355 1033723811 c/23_value.ml 1.1)
(test/giro/allocator.lus 1087 1031732392 c/5_allocator. 1.1)
(test/time-ecrins.res 6392 1040292929 d/20_time-ecrin 1.2)
(test/time-ecrins.res 6407 1044958837 d/20_time-ecrin 1.3)
(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)
......@@ -4,13 +4,15 @@
-include $(LURETTE_PATH)/Makefile.common
OCAMLNCFLAGS = -inline 10 -noassert -unsafe
OCAMLNCFLAGS = -inline 10 -noassert -unsafe # -verbose
ifndef OCAMLFLAGS
OCAMLFLAGS := -noassert -unsafe
OCAMLFLAGS := -noassert -unsafe -verbose
endif
LIBS = str $(LURETTE_PATH)/lib/lurette_lib # mlpoly
# CC=g++
LIBS = str polka $(LURETTE_PATH)/lib/lurette_lib
SOURCES_C = $(SUT) lurette_stub__sut.c lurette_stub__sut_idl.idl \
......
......@@ -4,8 +4,6 @@
*********** A faire maintenant
(1) Faire une version de solveur numérique à base de polyedres
* gen_fake_lutin devrait etre une commande lurettetop et non pas code
en dur dans xlurette...
idem pour la sauvegarde des options dans .lurette-rc.
......@@ -16,6 +14,7 @@ optionnelle (par ex "types = ...")
* Mettre a jour le parseur wrt les modifs que j'ai faite a la syntax
(noeuds transiants/stationnaires)
* Supprimer tous les trap (faire un grep "with _ ->" ...)
(1) Portage pour scade et esterel windows ...
......@@ -28,6 +27,10 @@ optionnelle (par ex "types = ...")
* Commencer par tirer sur les bords.
* 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.
* rajouter une option qui dit si les formules doivent etre tronquees
dans show_luc
......@@ -49,8 +52,6 @@ optionnelle (par ex "types = ...")
-> #lucky_seed
-> #test_failure
* Demander à yann une option --hide * (ne pas les montrer la var v)
* Finir le fichier README. Faire un fichier INSTALL.
......
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Lurette")
(Project-Version lurette 0 120)
(Parent-Version lurette 0 119)
(Project-Version lurette 0 121)
(Parent-Version lurette 0 120)
(Version-Log "
source/solver.ml:
source/pnumsolver.ml:
source/pnumsolver.mli: [new files]
Implements a numeric solver based on Polka.
(not plugged yet).
source/rnumsolver.ml:
replace split_store_eq by add_eq_to_store as split_store_eq
was simply calling split store and appendind its result,
it is simplier to just call slipt_store from solver.ml ...
Reimplement split_store so that it uses 2 calls of add_constraint
instead of doing the work twice inside split_store (in order to avoid code
duplication).
Also, whenever delayed constraints becomes of dimension 1, when a add_constraint
binds a value, add them to the store.
Enhance error msgs whenever int and float are mixed in the same lucky
expressions.
source/rnumsolver.ml:
source/ne.ml:
rename Ne.resolve_triangular_system into get_subst_from_solved_system
and move it into rnumsolver. The rational is that is was not
really solving any triangular system: the system ougth to be already solved.
source/parce_env.ml:
Set the max_float to max_int, otherwise, the conversion into polka rational
fails...
")
(New-Version-Log ""
)
(Checkin-Time "Thu, 19 Dec 2002 11:15:29 +0100")
(Checkin-Time "Tue, 11 Feb 2003 11:20:37 +0100")
(Checkin-Login jahier)
(Populate-Ignore ())
(Project-Keywords)
......@@ -31,7 +53,7 @@ source/rnumsolver.ml:
;; Sources files for lurette only
(source/lurette.mli (lurette/11_lurette.ml 1.12 644))
(source/lurette.ml (lurette/12_lurette.ml 1.60 644))
(source/lurette.ml (lurette/12_lurette.ml 1.61 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))
......@@ -43,16 +65,19 @@ source/rnumsolver.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.36 444))
(source/util.ml (lurette/35_util.ml 1.37 444))
(source/solver.mli (lurette/38_solver.mli 1.13 644))
(source/solver.ml (lurette/39_solver.ml 1.38 644))
(source/solver.ml (lurette/39_solver.ml 1.39 644))
(source/rnumsolver.mli (lurette/b/26_rnumsolver 1.11 644))
(source/rnumsolver.ml (lurette/b/27_rnumsolver 1.18 644))
(source/rnumsolver.mli (lurette/b/26_rnumsolver 1.10 644))
(source/rnumsolver.ml (lurette/b/27_rnumsolver 1.17 644))
(source/pnumsolver.ml (lurette/d/23_pnumsolver 1.1 644))
(source/pnumsolver.mli (lurette/d/24_pnumsolver 1.1 644))
(source/parse_env.mli (lurette/40_parse_env. 1.11 644))
(source/parse_env.ml (lurette/41_parse_env. 1.33 644))
(source/parse_env.ml (lurette/41_parse_env. 1.34 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))
......@@ -67,7 +92,7 @@ source/rnumsolver.ml:
(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.33 644))
(source/env_state.ml (lurette/51_env_state. 1.34 644))
(source/automata.mli (lurette/b/46_automata.m 1.3 644))
(source/automata.ml (lurette/b/47_automata.m 1.6 644))
......@@ -78,17 +103,17 @@ source/rnumsolver.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.23 644))
(source/lurettetop.ml (lurette/c/1_lurettetop 1.24 644))
(source/gen_stubs.ml (lurette/24_generate_l 1.41 644))
(source/control.mli (lurette/c/3_control.ml 1.3 644))
(source/control.ml (lurette/c/4_control.ml 1.4 644))
(source/constraint.mli (lurette/c/18_constraint 1.4 644))
(source/constraint.ml (lurette/c/19_constraint 1.4 644))
(source/constraint.ml (lurette/c/19_constraint 1.5 644))
(source/ne.ml (lurette/c/21_ne.ml 1.3 644))
(source/ne.mli (lurette/c/22_ne.mli 1.2 644))
(source/ne.ml (lurette/c/21_ne.ml 1.4 644))
(source/ne.mli (lurette/c/22_ne.mli 1.3 644))
(source/value.ml (lurette/c/23_value.ml 1.1 644))
(source/value.mli (lurette/c/24_value.mli 1.1 644))
......@@ -106,18 +131,18 @@ source/rnumsolver.ml:
(configure.in (lurette/d/11_configure. 1.1 644))
(Makefile.common.in (lurette/d/12_Makefile.c 1.2 644))
(OcamlMakefile (lurette/17_OcamlMakef 1.46 644))
(Makefile.lurette (lurette/b/38_Makefile.l 1.15 644))
(user-rules (lurette/c/14_myrules 1.21 644))
(Makefile.lurette (lurette/b/38_Makefile.l 1.16 644))
(user-rules (lurette/c/14_myrules 1.22 644))
(user-rules.skel (lurette/c/25_user-rules 1.2 644))
(Makefile (lurette/d/13_Makefile 1.1 644))
(source/Makefile.lurettetop (lurette/d/14_Makefile.l 1.2 644))
(source/Makefile.gen_fake_lutin (lurette/d/17_Makefile.g 1.1 644))
(source/Makefile.show_luc (lurette/b/40_Makefile.s 1.8 644))
(source/Makefile.lucky (lurette/b/41_Makefile.i 1.10 644))
(source/Makefile.lucky (lurette/b/41_Makefile.i 1.11 644))
(source/Makefile.gen_stubs (lurette/b/42_Makefile.g 1.5 644))
(source/Makefile.lurette_lib (lurette/c/2_Makefile.l 1.10 644))
(source/Makefile (lurette/c/20_Makefile 1.9 644))
(source/Makefile.lurette_lib (lurette/c/2_Makefile.l 1.11 644))
(source/Makefile (lurette/c/20_Makefile 1.10 644))
;; Documentation
(doc/Interface_draft (lurette/19_Interface_ 1.1 644))
......@@ -134,10 +159,10 @@ source/rnumsolver.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.25 644))
(test/time-ossau.res (lurette/b/49_time.res 1.28 644))
(test/time-ecrins.res (lurette/d/20_time-ecrin 1.2 644))
(test/time-ecrins.exp (lurette/d/21_time-ecrin 1.2 644))
(test/time-ossau.exp (lurette/b/48_time.exp 1.26 644))
(test/time-ossau.res (lurette/b/49_time.res 1.29 644))
(test/time-ecrins.res (lurette/d/20_time-ecrin 1.3 644))
(test/time-ecrins.exp (lurette/d/21_time-ecrin 1.3 644))
;; Various files used for testing purposes
(test/usager.luc (lurette/b/14_usager.env 1.9 644))
......@@ -224,7 +249,7 @@ source/rnumsolver.ml:
(mlcuddidl/Changes (lurette/d/10_Changes 1.1 644))
(TODO (lurette/d/22_TODO 1.1 644))
(TODO (lurette/d/22_TODO 1.2 644))
)
......
......@@ -9,39 +9,47 @@ endif
lib:
make -f Makefile.lurette_lib OCAMLFLAGS="-noassert -unsafe"
lib_debug:
make -f Makefile.lurette_lib dc OCAMLFLAGS=""
make dcl -f Makefile.lurette_lib OCAMLFLAGS=""
lib_gprof:
make pncl -f Makefile.lurette_lib OCAMLFLAGS=""
lib_prof:
make pbcl -f Makefile.lurette_lib OCAMLFLAGS=""
lucky:
make -k -f Makefile.lucky OCAMLFLAGS="-noassert -unsafe"
make -k nc -f Makefile.lucky OCAMLFLAGS="-noassert -unsafe"
lucky_bc:
make -k bc -f Makefile.lucky OCAMLFLAGS=""
lucky_debug:
make -k dc -f Makefile.lucky OCAMLFLAGS=""
lucky_prof:
make -k pbc -f Makefile.lucky OCAMLFLAGS=""
luc:lucky
ltop:
make -k -f Makefile.lurettetop OCAMLFLAGS="-noassert -unsafe"
make -k nc -f Makefile.lurettetop OCAMLFLAGS="-noassert -unsafe"
ltop_debug:
make -k dc -f Makefile.lurettetop OCAMLFLAGS=""
show:
make -k -f Makefile.show_luc OCAMLFLAGS="-noassert -unsafe"
make -k nc -f Makefile.show_luc OCAMLFLAGS="-noassert -unsafe"
stubs:
make -k -f Makefile.gen_stubs OCAMLFLAGS="-noassert -unsafe"
make -k nc -f Makefile.gen_stubs OCAMLFLAGS="-noassert -unsafe"
gen_lut:
make -f Makefile.gen_fake_lutin OCAMLFLAGS="-noassert -unsafe"
make -k nc -f Makefile.gen_fake_lutin OCAMLFLAGS="-noassert -unsafe"
all: lib lucky ltop show stubs gen_lut
clean_exe:
rm gen_stubs lucky lurettetop lurette_lib.* gen_fake_lutin show_luc
rm -i gen_stubs lucky lurettetop lurette_lib.* gen_fake_lutin show_luc
clean:
make -k clean -f Makefile.gen_stubs ; \
make -k clean -f Makefile.lucky ; \
......@@ -51,8 +59,7 @@ clean:
make -k clean -f Makefile.show_luc
install: clean_exe all
cp:
cp gen_stubs $(BIN_INSTALL_DIR) ; \
cp gen_fake_lutin $(BIN_INSTALL_DIR) ; \
cp lucky $(BIN_INSTALL_DIR) ; \
......@@ -61,3 +68,5 @@ install: clean_exe all
cp *.cmi $(LIB_INSTALL_DIR) ;\
cp *.cmx $(LIB_INSTALL_DIR) ;\
cp lurette_lib.*a $(LIB_INSTALL_DIR)
install: all cp
......@@ -4,42 +4,69 @@
-include ../Makefile.common
#######################################################################
######################################################################
OCAMLNCFLAGS = -inline 10 -linkall
ifndef OCAMLFLAGS
OCAMLFLAGS := -noassert -unsafe
endif
# Requires cudd and mldd to be installed!
LIBS = str nums # mlpoly
CLIBS = cudd_caml cuddaux cudd camlidl mtr st epd util # libppl libpolyi
CC=gcc #g++
POLKA_CLIB = polkag_caml polkag gmp
#POLKA_CLIB = polkag_caml david_polkag_print parme gmpxx
LIBS = str nums polka cudd
CLIBS = cudd_caml cuddaux cudd $(POLKA_CLIB) camlidl mtr st epd util
USE_CAMLP4 = yes
STATIC = yes
SOURCES_OCAML = \
$(LURETTE_PATH)/polka/caml/polkaIO.mli \
$(LURETTE_PATH)/polka/caml/polkaIO.ml \
$(LURETTE_PATH)/source/util.ml \
$(LURETTE_PATH)/source/graph.mli $(LURETTE_PATH)/source/graph.ml \
$(LURETTE_PATH)/source/prevar.mli $(LURETTE_PATH)/source/prevar.ml \
$(LURETTE_PATH)/source/command_line_luc_exe.mli $(LURETTE_PATH)/source/command_line_luc_exe.ml \
$(LURETTE_PATH)/source/value.mli $(LURETTE_PATH)/source/value.ml \
$(LURETTE_PATH)/source/ne.mli $(LURETTE_PATH)/source/ne.ml \
$(LURETTE_PATH)/source/constraint.mli $(LURETTE_PATH)/source/constraint.ml \
$(LURETTE_PATH)/source/formula.mli $(LURETTE_PATH)/source/formula.ml \
$(LURETTE_PATH)/source/gne.mli $(LURETTE_PATH)/source/gne.ml \
$(LURETTE_PATH)/source/control.mli $(LURETTE_PATH)/source/control.ml \
$(LURETTE_PATH)/source/parse_env.mli $(LURETTE_PATH)/source/parse_env.ml \
$(LURETTE_PATH)/source/env_state.mli $(LURETTE_PATH)/source/env_state.ml \
$(LURETTE_PATH)/source/rnumsolver.mli $(LURETTE_PATH)/source/rnumsolver.ml \
$(LURETTE_PATH)/source/solver.mli $(LURETTE_PATH)/source/solver.ml \
$(LURETTE_PATH)/source/show_env.mli $(LURETTE_PATH)/source/show_env.ml \
$(LURETTE_PATH)/source/automata.mli $(LURETTE_PATH)/source/automata.ml \
$(LURETTE_PATH)/source/print.mli $(LURETTE_PATH)/source/print.ml \
$(LURETTE_PATH)/source/sim2chro.mli $(LURETTE_PATH)/source/sim2chro.ml \
$(LURETTE_PATH)/source/env.mli $(LURETTE_PATH)/source/env.ml \
$(LURETTE_PATH)/source/luc_exe.mli $(LURETTE_PATH)/source/luc_exe.ml
$(LURETTE_PATH)/source/graph.mli \
$(LURETTE_PATH)/source/graph.ml \
$(LURETTE_PATH)/source/prevar.mli \
$(LURETTE_PATH)/source/prevar.ml \
$(LURETTE_PATH)/source/command_line_luc_exe.mli \
$(LURETTE_PATH)/source/command_line_luc_exe.ml \
$(LURETTE_PATH)/source/value.mli \
$(LURETTE_PATH)/source/value.ml \
$(LURETTE_PATH)/source/ne.mli \
$(LURETTE_PATH)/source/ne.ml \
$(LURETTE_PATH)/source/constraint.mli \
$(LURETTE_PATH)/source/constraint.ml \
$(LURETTE_PATH)/source/formula.mli \
$(LURETTE_PATH)/source/formula.ml \
$(LURETTE_PATH)/source/gne.mli \
$(LURETTE_PATH)/source/gne.ml \
$(LURETTE_PATH)/source/control.mli \
$(LURETTE_PATH)/source/control.ml \
$(LURETTE_PATH)/source/parse_env.mli \
$(LURETTE_PATH)/source/parse_env.ml \
$(LURETTE_PATH)/source/pnumsolver.mli \
$(LURETTE_PATH)/source/pnumsolver.ml \
$(LURETTE_PATH)/source/rnumsolver.mli \
$(LURETTE_PATH)/source/rnumsolver.ml \
$(LURETTE_PATH)/source/env_state.mli \
$(LURETTE_PATH)/source/env_state.ml \
$(LURETTE_PATH)/source/solver.mli \
$(LURETTE_PATH)/source/solver.ml \
$(LURETTE_PATH)/source/show_env.mli \
$(LURETTE_PATH)/source/show_env.ml \
$(LURETTE_PATH)/source/automata.mli \
$(LURETTE_PATH)/source/automata.ml \
$(LURETTE_PATH)/source/print.mli \
$(LURETTE_PATH)/source/print.ml \
$(LURETTE_PATH)/source/sim2chro.mli \
$(LURETTE_PATH)/source/sim2chro.ml \
$(LURETTE_PATH)/source/env.mli \
$(LURETTE_PATH)/source/env.ml \
$(LURETTE_PATH)/source/luc_exe.mli \
$(LURETTE_PATH)/source/luc_exe.ml
SOURCES = $(SOURCES_C) \
......
......@@ -11,15 +11,18 @@ ifndef OCAMLFLAGS
OCAMLFLAGS := -noassert -unsafe
endif
# Requires cudd and mldd to be installed!
LIBS = str nums # mlpoly
CLIBS = cudd_caml cuddaux cudd mtr st epd util # libppl libpolyi
CC=gcc #g++
LIBS = str nums polka
CLIBS = cudd_caml cuddaux cudd polkai_caml polkai gmp camlidl mtr st epd util
# CLIBS = cudd_caml cuddaux cudd polkag_caml david_polkag parme gmpxx camlidl mtr st epd util
USE_CAMLP4 = yes
STATIC = yes
SOURCES = \
$(LURETTE_PATH)/polka/caml/polkaIO.mli $(LURETTE_PATH)/polka/caml/polkaIO.ml \
$(LURETTE_PATH)/source/util.ml \
$(LURETTE_PATH)/source/prevar.mli $(LURETTE_PATH)/source/prevar.ml \
$(LURETTE_PATH)/source/graph.mli $(LURETTE_PATH)/source/graph.ml \
......@@ -31,8 +34,9 @@ SOURCES = \
$(LURETTE_PATH)/source/gne.mli $(LURETTE_PATH)/source/gne.ml \
$(LURETTE_PATH)/source/control.mli $(LURETTE_PATH)/source/control.ml \
$(LURETTE_PATH)/source/parse_env.mli $(LURETTE_PATH)/source/parse_env.ml \
$(LURETTE_PATH)/source/env_state.mli $(LURETTE_PATH)/source/env_state.ml \
$(LURETTE_PATH)/source/rnumsolver.mli $(LURETTE_PATH)/source/rnumsolver.ml \
$(LURETTE_PATH)/source/pnumsolver.mli $(LURETTE_PATH)/source/pnumsolver.ml \
$(LURETTE_PATH)/source/env_state.mli $(LURETTE_PATH)/source/env_state.ml \
$(LURETTE_PATH)/source/solver.mli $(LURETTE_PATH)/source/solver.ml \
$(LURETTE_PATH)/source/show_env.mli $(LURETTE_PATH)/source/show_env.ml \
$(LURETTE_PATH)/source/automata.mli $(LURETTE_PATH)/source/automata.ml \
......@@ -46,5 +50,7 @@ RESULT = lurette_lib
all: ncl bcl
install: libinstall
-include $(OCAMLMAKEFILE)
......@@ -12,6 +12,9 @@ open Util
open List
open Graph
open Formula
open Rnumsolver
(* open Pnumsolver *)
(****************************************************************************)
......@@ -562,6 +565,18 @@ let (read_env_state_one_file : string -> node) =
(* Sets the [var_names] and [pre_var_names] fields of [env_state]. *)
set_var_names file (list_in, list_out, list_loc) ;
(* Initialize the solver *)
(* Pnumsolver.solver_init *)
(* We need to extract the numeric variable to be generated *)
(* (fst *)
(* (List.split *)
(* (List.filter *)
(* (fun (vn, vt) -> vt <> BoolT) *)
(* (list_out @ list_loc) *)
(* ) *)
(* ) *)
(* ); *)
List.iter
(fun vn -> set_pre_var_names (vn::(pre_var_names ())))
list_pre_vn;
......
......@@ -32,7 +32,7 @@ let (options:Command_line.optionsT) = {
(*------------------------------------------------------------------------*)
(** checks that 2 environments in parallel (i.e., that are not
multiplied) do not share any generated variable name (i.e.,
multiplied) do not share any generated variable names (i.e.,
outputs and local vars).
*)
let (check_generated_vars : string list list -> unit) =
......
......@@ -257,7 +257,8 @@ let (build : string -> string -> string -> bool) =
let make_cmd =
(* XXX Not portable !! *)
("make -I " ^ user_dir ^ " -f "
^ lurette_dir ^ "/Makefile.lurette " ^ flag.make_opt ^ "> make_lurette.log \n")
^ lurette_dir ^ "/Makefile.lurette " ^ flag.make_opt ^ "> "
^ user_dir ^ "/make_lurette.log \n")
in
if oracle2 <> (lurette_tmp_dir ^ "/always_true")
&& not (Sys.file_exists (oracle2 ^ ".lus"))
......
......@@ -306,52 +306,28 @@ let (apply_simple_subst : t -> string * Value.num -> t) =
with
Not_found -> ne
(* exported *)
exception Not_triangular
(* exported *)
let rec (resolve_triangular_system :((string * Value.num) * t) list ->
(string * Value.num) list) =
fun sl ->
match sl with
[] -> []
| ((vn, v), ne)::tail ->
let s =
try
let cst = StringMap.find "" ne in
if
(StringMap.remove "" ne) <> StringMap.empty
then
raise Not_triangular
else
(vn, Value.quot_num cst v)
with Not_found ->
match v with
I _ -> (vn, I 0)
| F _ -> (vn, F 0.0)
in
let new_tail =
List.map
(fun (x, ne) -> x, apply_simple_subst ne s)
tail
in
s::(resolve_triangular_system new_tail)
(****************************************************************************)
(* exported *)
let (to_string : t -> string) =
fun ne ->
let (to_string_gen : (Value.num -> string) -> string -> t -> string) =
fun nv_to_string plus ne ->
(StringMap.fold
(fun vn v acc ->
if vn = ""
then ((num_value_to_string v) ^ acc)
else (" + " ^ (num_value_to_string v ) ^ "*" ^ ((Prevar.format vn) ^ acc)))
then ((nv_to_string v) ^ acc)
else (plus ^ (nv_to_string v ) ^ "" ^ ((Prevar.format vn) ^ acc)))
ne
""
)
(* exported *)
let (to_string : t -> string) =
fun ne ->
to_string_gen (num_value_to_string) " + " ne
(* exported *)
let (substl_to_string : subst list -> string) =
fun sl ->
......
(*-----------------------------------------------------------------------
** Copyright (C) 2002 - Verimag.
** Copyright (C) 2002, 2003 - Verimag.
** This file may only be copied under the terms of the GNU Library General
** Public License
**-----------------------------------------------------------------------
......@@ -47,7 +47,7 @@ val fold : (string -> Value.num -> 'acc -> 'acc) -> t -> 'acc -> 'acc
val make : string -> Value.num -> t
(** [find var ne] returns the coef of the variable [var] in
[ne]. Raises Not_found if [var] is not in [ne]. *)
[ne], [None] if [var] is not in [ne]. *)
val find : string -> t -> Value.num option
......@@ -64,18 +64,8 @@ val apply_substl : subst list -> t -> t
(** This one does not multiply the result. *)
val apply_simple_subst : t -> string * Value.num -> t
(** [resolve_triangular_system sl] solves the system defined by the
list of equations [a.x_i -> Sum_{j=1,n_i}(a_j.x_i_j) + cst] if it
forms a triangular system (namely, its dimension is 1). It raises
[Not_triangular] otherwise.
*)
exception Not_triangular
val resolve_triangular_system :((string * Value.num) * t) list ->
(string * Value.num) list
(** Pretty printing. *)
val substl_to_string : subst list -> string
val to_string_gen : (Value.num -> string) -> string -> t -> string
val to_string : t -> string
......@@ -37,7 +37,10 @@ let lexer = Genlex.make_lexer ["("; ")"; ","; ";"; ".";
type aut_token = Genlex.token Stream.t
let default_max_float = 10. ** 11.
let default_max_float = float_of_int max_int
(* otherwise, the conversion into polka rational would fail... *)
(* let default_max_float = 10. ** 11. *)
(* Should not be bigger that max_float/2 so that the whole domain is
not bigger than max_float
......@@ -340,7 +343,7 @@ and (parse_var: in_channel -> aut_token -> vnt) =
| "float" -> (var, FloatT(-.default_max_float, default_max_float))
| "int" -> (var, IntT(min_int / 2, max_int / 2))
(* We divide by 2 so that domains are always smaller