Commit 5a9bb52c authored by Erwan Jahier's avatar Erwan Jahier
Browse files

lurette 0.137 Tue, 03 Jun 2003 15:32:29 +0200 by jahier

Parent-Version:      0.136
Version-Log:

source/gen_stubs:
   Fix a bug where the var name ok was clashing with user vars
   in the generated always true oracle. now i use the name
   weird_name_to_avoid_clash__ok

source/lurettetop.ml:
   Make sure that the .lus files is less recent than the .c file
   before running.

source/lurettetop.ml:
source/gen_stubs.ml:
ihm/xlurette/*.ml:
   Add support for future handling of the scade compiler.
   Currently, returns a msg saying it that the scade port is not implemented.

Project-Description: Lurette
parent fe6d609c
......@@ -2,12 +2,12 @@
;; REALLY bad things.
(Created-By-Prcs-Version 1 3 3)
(source/show_env.mli 1091 1033738731 42_show_env.m 1.8)
(source/util.ml 19131 1053337243 35_util.ml 1.46)
(source/util.ml 19130 1054647149 35_util.ml 1.47)
(cuddaux/cuddauxGenCof.c 12011 1034006019 c/29_cuddauxGen 1.1)
(source/constraint.mli 1601 1045489850 c/18_constraint 1.5)
(test/ControleurPorte.lus 3219 1032940601 c/17_Controleur 1.1)
(mlcuddidl/Changes 64 1034006019 d/10_Changes 1.1)
(TODO 6322 1053337243 d/22_TODO 1.15)
(TODO 6148 1054647149 d/22_TODO 1.16)
(mlcuddidl/rdd.mli 7174 1034006019 c/40_rdd.mli 1.1)
(source/ne.mli 2138 1050421093 c/22_ne.mli 1.6)
(polka/documentation/polka.texi 109061 1047029868 e/17_polka.texi 1.1)
......@@ -16,16 +16,16 @@
(mlcuddidl/idd.idl 10595 1034006019 d/1_idd.idl 1.1)
(polka/C/internal.c 699 1047029868 e/8_internal.c 1.1)
(source/solver.ml 31036 1050421093 39_solver.ml 1.47)
(ihm/xlurette/makefile 3737 1053337243 c/16_makefile 1.12)
(ihm/xlurette/makefile 3759 1054647149 c/16_makefile 1.13)
(polka/C/internal.h 958 1047029868 e/0_internal.h 1.1)
(source/command_line.ml 5079 1050578564 b/20_command_li 1.13)
(test/cudd_gc_problem.rif.exp 7882 1053337243 e/30_cudd_gc_pr 1.2)
(test/ControleurPorte.c 9407 1012914629 b/19_Controleur 1.1)
(share/lucky_init.sh.in 419 1053337243 e/24_lucky_init 1.4)
(share/lucky_init.sh.in 467 1054647149 e/24_lucky_init 1.5)
(test/ControleurPorte.h 2306 1012914629 b/18_Controleur 1.1)
(doc/synthese 2556 1007379917 b/2_synthese 1.1)
(source/command_line.mli 1503 1046074449 b/21_command_li 1.11)
(source/Makefile.lucky 2694 1053337243 b/41_Makefile.i 1.20)
(source/Makefile.lucky 2699 1054647149 b/41_Makefile.i 1.21)
(polka/Makefile.depend 136 1047029868 d/30_Makefile.d 1.1)
(polka/README 1437 1047029868 e/19_README 1.1)
(README 2266 1052229068 10_README 1.9)
......@@ -42,6 +42,7 @@
(polka/C/cherni.h 2217 1047029868 e/1_cherni.h 1.1)
(polka/caml/polka_caml.c 6499 1047029868 d/37_polka_caml 1.1)
(test/losange-3d.luc 555 1046768487 d/28_losange-3d 1.2)
(test/time-moucherotte.res 2738 1054647149 e/38_time-mouch 1.1)
(polka/caml/poly.idl 8449 1047029868 d/33_poly.idl 1.1)
(polka/documentation/texinfo.tex 200195 1047029868 e/16_texinfo.te 1.1)
(polka/caml/polka_caml.h 1922 1047029868 d/36_polka_caml 1.1)
......@@ -56,13 +57,13 @@
(source/automata.mli 3396 1033738731 b/46_automata.m 1.3)
(source/print.mli 1136 1045558187 46_print.mli 1.13)
(polka/caml/Makefile 6559 1047029868 d/45_Makefile 1.1)
(ihm/xlurette/xlurette_glade_main.ml 31329 1053337243 c/12_xlurette_g 1.20)
(ihm/xlurette/xlurette_glade_main.ml 34286 1054647149 c/12_xlurette_g 1.21)
(TAGS 9825 1007379917 21_TAGS 1.6)
(polka/C/main.tex 1961 1047029868 e/14_main.tex 1.1)
(ihm/xlurette/xlurette.glade 56573 1053337243 c/13_xlurette.g 1.15)
(ihm/xlurette/xlurette.glade 73084 1054647149 c/13_xlurette.g 1.16)
(test/losange.luc 410 1046768487 d/27_losange.lu 1.2)
(test/gyro.rif.exp 10946 1053337243 e/36_gyro.rif.e 1.2)
(test/time-ecrins.exp 8227 1053337243 d/21_time-ecrin 1.18)
(test/time-ecrins.exp 8228 1054647149 d/21_time-ecrin 1.19)
(source/value.ml 2358 1049961831 c/23_value.ml 1.4)
(source/gne.ml 2774 1046682069 b/37_gne.ml 1.5)
(source/formula.ml 6028 1053337243 45_formula.ml 1.29)
......@@ -86,16 +87,16 @@
(test/heater_int.lus 170 1020068208 b/43_heater_int 1.1)
(mlcuddidl/bdd.idl 18233 1034006019 d/7_bdd.idl 1.1)
(polka/caml/polka_parser.mly 1729 1047029868 d/40_polka_pars 1.1)
(source/gen_stubs.ml 21586 1052229068 24_generate_l 1.46)
(source/gen_stubs.ml 22355 1054647149 24_generate_l 1.47)
(polka/C/pkint.h 6036 1047029868 e/12_pkint.h 1.1)
(polka/caml/vector.idl 8669 1047029868 d/35_vector.idl 1.1)
(mlcuddidl/README 1574 1034006019 d/8_README 1.1)
(source/sim2chro.mli 1545 1052229068 b/23_sim2chro.m 1.7)
(share/lucky_init.csh.in 419 1053337243 e/23_lucky_init 1.4)
(share/lucky_init.csh.in 466 1054647149 e/23_lucky_init 1.5)
(ID_EN_VRAC 2184 1002196285 0_ID_EN_VRAC 1.1)
(polka/C/vector.h 2103 1047029868 d/47_vector.h 1.1)
(polka/C/satmat.c 6254 1047029868 e/4_satmat.c 1.1)
(share/plot 11384 1052229068 e/35_plot 1.1)
(share/plot 11423 1054647149 e/35_plot 1.2)
(source/solver.mli 1003 1046682069 38_solver.mli 1.14)
(mlcuddidl/manager.ml 8017 1034006019 c/47_manager.ml 1.1)
(test/passerelle.luc 995 1046682069 b/17_passerelle 1.10)
......@@ -109,14 +110,14 @@
(mlcuddidl/session.ml 603 1034006019 c/37_session.ml 1.1)
(source/graph.mli 2185 1037625990 13_graph.mli 1.10)
(source/store.mli 2891 1046074449 b/26_rnumsolver 1.16)
(test/time-ossau.res 8239 1053337243 b/49_time.res 1.44)
(test/time-ossau.res 8230 1054647149 b/49_time.res 1.45)
(source/automata.ml 19521 1053337243 b/47_automata.m 1.8)
(Makefile 68 1051024737 d/13_Makefile 1.4)
(cuddaux/cuddauxBridge.c 6099 1034006019 c/31_cuddauxBri 1.1)
(test/heater_float.rif.exp 1040 1053337243 b/30_heater_flo 1.15)
(cuddaux/Makefile 3326 1053337243 c/35_Makefile 1.7)
(polka/C/bit.c 3026 1047029868 e/10_bit.c 1.1)
(test/time-ossau.exp 8239 1053337243 b/48_time.exp 1.41)
(test/time-ossau.exp 8230 1054647149 b/48_time.exp 1.42)
(source/print.ml 5794 1053337243 47_print.ml 1.23)
(mlcuddidl/macros.m4 11290 1034006019 c/49_macros.m4 1.1)
(polka/caml/polkaIO.ml 1652 1047029868 d/44_polkaIO.ml 1.1)
......@@ -126,15 +127,15 @@
(demo-xlurette/chaudiere/chaudiere.luc 446 1032789516 c/11_chaudiere. 1.5)
(test/giro/allocator.lus 1087 1031732392 c/5_allocator. 1.1)
(cuddaux/README 1427 1034006019 c/34_README 1.1)
(source/lurettetop.ml 33530 1053337243 c/1_lurettetop 1.33)
(source/lurettetop.ml 38414 1054647149 c/1_lurettetop 1.34)
(mlcuddidl/bdd.ml 10889 1034006019 d/6_bdd.ml 1.1)
(source/constraint.ml 2762 1050421093 c/19_constraint 1.7)
(polka/caml/Makefile.depend 0 1053337243 d/32_Makefile.d 1.2)
(doc/archi.fig 3693 1003928781 20_archi.fig 1.1)
(ihm/xlurette/xlurette_glade_interface.ml 38030 1053337243 c/15_xlurette_g 1.14)
(ihm/xlurette/xlurette_glade_interface.ml 51446 1054647149 c/15_xlurette_g 1.15)
(test/losange-3d2.luc 368 1050421093 e/32_losange-3d 1.1)
(test/Makefile 26 1051024737 c/0_Makefile 1.12)
(user-rules 21186 1053337243 c/14_myrules 1.34)
(user-rules 21081 1054647149 c/14_myrules 1.35)
(mlcuddidl/cudd_caml.c 22890 1034006019 d/3_cudd_caml. 1.1)
(test/usager.luc 508 1046682069 b/14_usager.env 1.11)
(polka/C/config.h 77 1047029868 e/13_config.h 1.1)
......@@ -175,24 +176,25 @@
(source/polyhedron.mli 940 1045489850 d/26_polyhedron 1.1)
(mlcuddidl/bdd.mli 8573 1034006019 d/5_bdd.mli 1.1)
(polka/C/polka.h 1478 1047029868 d/50_polka.h 1.1)
(test/time-moucherotte.exp 2738 1054647149 e/37_time-mouch 1.1)
(source/command_line_luc_exe.ml 3533 1050578564 b/33_command_li 1.14)
(source/lurette_exe.c 220 1050421093 e/27_lurette_ex 1.2)
(source/env.ml 7849 1050421093 16_env.ml 1.30)
(test/time-ecrins.res 8227 1053337243 d/20_time-ecrin 1.18)
(test/time-ecrins.res 8228 1054647149 d/20_time-ecrin 1.19)
(source/value.mli 1100 1049961831 c/24_value.mli 1.2)
(test/vrai_tram.lus 564 1027066799 b/6_vrai_tram. 1.2)
(polka/Makefile.config 1683 1053337243 e/20_Makefile.c 1.5)
(source/Makefile 7037 1053337243 c/20_Makefile 1.16)
(source/Makefile 6969 1054647149 c/20_Makefile 1.17)
(source/graph.ml 2339 1037625990 14_graph.ml 1.8)
(test/cudd_gc_problem.luc 227680 1050421093 e/29_cudd_gc_pr 1.1)
(demo-xlurette/chaudiere/chaudiere_ctrl.lus 177 1031732392 c/9_chaudiere_ 1.1)
(test/losange-3d.rif.exp 2676 1053337243 e/31_losange-3d 1.2)
(polka/documentation/Makefile 476 1047029868 e/18_Makefile 1.1)
(source/sim2chro.ml 2949 1053337243 b/24_sim2chro.m 1.17)
(source/sim2chro.ml 3029 1054647149 b/24_sim2chro.m 1.18)
(cuddaux/cuddauxTDGenCof.c 15712 1034006019 c/26_cuddauxTDG 1.1)
(source/luc_exe.ml 14073 1053337243 b/32_ima_exe.ml 1.32)
(source/gne.mli 1557 1046682069 b/36_gne.mli 1.5)
(source/lurette.ml 18378 1053337243 12_lurette.ml 1.69)
(source/lurette.ml 18378 1054647149 12_lurette.ml 1.70)
(polka/C/Makefile.depend 1081 1047029868 d/46_Makefile.d 1.1)
(doc/ocamldoc.hva 313 1008328137 b/13_ocamldoc.h 1.1)
(cuddaux/cuddauxCompose.c 13638 1034006019 c/30_cuddauxCom 1.1)
......@@ -200,7 +202,7 @@
(test/heater_float.lus 177 1034351455 b/44_heater_flo 1.2)
(polka/Makefile 1636 1047029868 e/21_Makefile 1.1)
(test/porte.luc 996 1049961831 b/16_porte.env 1.10)
(share/gnuplot-rif 974 1052229068 e/34_gnuplot-ri 1.1)
(share/gnuplot-rif 1138 1054647149 e/34_gnuplot-ri 1.2)
(source/eval.mli 1265 1050421093 48_eval.mli 1.11)
(source/Makefile.show_luc 1033 1050578564 b/40_Makefile.s 1.9)
(mlcuddidl/Makefile 7387 1053337243 d/9_Makefile 1.7)
*********** BUGS
* Attention, les gens ne peuvent pas appeler leur variables ok !!!
* gnuplot-rif sous cygwin ne marche pas.
* Quand on modifie le .lus, je ne recompile pas tout ce qu'il semble t'il ??
*********** A faire maintenant
(1) Portage pour scade, esterel ...
-> structure, tableau, types structures, etc.
*********** A faire maintenant
* compiler sim2chrogtk sous cygwin
(2) Traiter les variables stables (signaux purs)
(2) 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.
(2) Faire une doc utilisateur pour lurette (moins urgent depuis qu'il y
a lurettetop et xlurette...)
* Si l'execution se termine normalement (ie, a la fin de l'expression
reguliere), changer le message d'erreur.
reguliere), changer le message d'erreur.
* mettre qques part que j'utilise ocaml, camlidl cuddaux, mlcuddidl,
polka, gmp,autoconf, make, gcc, emacs, latex, dot, gtk, sim2chro, ...
* Mettre les .c generes dans share
? Mettre les .c generes dans share
* lurettetop :utilise Filename.temp_file pour creer un repertoire temporaire
pour lurette.
* xlurette: si le nom du repertoire est le meme que le repertoire courant, je pourrais l'omettre ...
......@@ -34,18 +42,6 @@ reguliere), changer le message d'erreur.
* Repasser a une notation infixée pour le format lucky. Ne pas faire
la verif de type en meme temps que le parsing ->
(1) Portage pour scade et esterel windows ...
-> structure, tableau, types structures, etc.
(2) Traiter les variables stables (signaux purs)
(2) 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.
(2) Faire une doc utilisateur pour lurette (moins urgent depuis qu'il y
a lurettetop et xlurette...)
* le losange ne passe pas avec polkai et passe avec polkag.
......@@ -66,9 +62,6 @@ la verif de type en meme temps que le parsing ->
* Mettre a jour le parseur wrt les modifs que j'ai faite a la syntax
(noeuds transiants/stationnaires + formula = ...)
* Faire un gestionnaire de sessions comme le propose Pascal
* Si jamais on a à faire a des polyedres trop gros, on pourrait
......
......@@ -83,12 +83,13 @@ opt_opt: dummy
install: opt
cp xlurette $(BIN_INSTALL_DIR)
all: opt cp
cp:
cp xlurette$(EXE) $(BIN_INSTALL_DIR)
clean:
rm -f *.cm* *.o a.out xlurette xlurette.opt
rm -f *.cm* *.o a.out xlurette$(EXE) xlurette.opt$(EXE)
dummy:
......
This diff is collapsed.
This diff is collapsed.
......@@ -3,9 +3,12 @@ open GEdit
open GtkEdit
open GtkList
(**************************************************************************)
(* Global vars *)
let debug =
(* true *)
false
(* true *)
false
let pid = ref 0
let lpid = ref 0
......@@ -16,20 +19,27 @@ let rif_file = ref ""
let restore = ref false
let (lurette_stdin_in, lurette_stdin_out) = Unix.pipe ()
let (lurette_stdin_in, lurette_stdin_out) = Unix.pipe ()
let (lurette_stdout_in, lurette_stdout_out) = Unix.pipe ()
let (lurette_stderr_in, lurette_stderr_out) = Unix.pipe ()
let ic = Unix.in_channel_of_descr lurette_stdout_in
let ec = Unix.in_channel_of_descr lurette_stderr_in
let oc = Unix.out_channel_of_descr lurette_stdin_out
let _ =
set_binary_mode_in ic false;
set_binary_mode_out oc false
(* XXX won't work under window$ !!! *)
(* ; Unix.set_nonblock lurette_stdout_out *)
; Unix.set_nonblock lurette_stdout_in
set_binary_mode_in ic false;
set_binary_mode_in ec false;
set_binary_mode_out oc false;
(* XXX won't work under window$ *)
(* ; Unix.set_nonblock lurette_stdout_out *)
Unix.set_nonblock lurette_stdout_in;
Unix.set_nonblock lurette_stderr_in
type draw_mode = Vertices | Edges | Inside
type tok = Genlex.token Stream.t
......@@ -89,44 +99,31 @@ let (remove_extension : string -> string) =
if dir = "." then file else (Filename.concat dir file)
let (gen_fake_lutin : string -> unit) =
fun hfile ->
let (gen_fake_lutin : (string -> unit) -> string -> unit) =
fun display hfile ->
let cmd =
("gen_fake_lutin " ^ hfile ^ " \n")
in
output_string stderr cmd ;
display cmd ;
if
((Sys.command cmd) <> 0)
then
(
output_string stdout ("*** gen_fake_lutin failed.\n" ^ cmd ^ "\n");
flush stdout
)
display ("*** gen_fake_lutin failed.\n")
else
(
output_string stderr ("\n ... gen_fake_lutin ok.\n");
flush stderr
)
display (" ... gen_fake_lutin ok.\n")
let (gen_stubs : string -> string -> unit) =
fun file node ->
let (gen_stubs : (string -> unit) -> string -> string -> unit) =
fun display file node ->
let cmd =
("gen_stubs " ^ (remove_extension file) ^ " " ^ node)
in
output_string stderr (cmd ^ "\n");
display cmd;
if
((Sys.command cmd) <> 0)
then
(
output_string stdout ("*** gen_stubs failed.\n" ^ cmd ^ "\n");
flush stdout
)
display ("*** gen_stubs failed.\n")
else
(
output_string stderr ("\n ... gen_stubs ok.\n");
flush stderr
)
display (" ... gen_stubs ok.\n")
(**************************************************************************)
......@@ -147,7 +144,7 @@ let rec (readfile_line : in_channel -> string list -> string list) =
(** returns the list of nodes of a lustre file *)
let (lusinfo : string -> string list) =
fun file ->
let file_info = file ^ ".nodes_info" in
let file_info = Filename.temp_file file "nodes_info" in
let file_lus =
try ((Filename.chop_extension file) ^ ".lus")
with Invalid_argument _ -> (file ^ ".lus")
......@@ -177,10 +174,9 @@ let (lusinfo : string -> string list) =
(** returns the list of files specified by the filter *)
let (get_files_list_filtered : string -> string list -> string list) =
fun filter init ->
let lustre_files_name = ".filtered_files_tmp" in
let lustre_files_name = Filename.temp_file "xlurette" "filtered_files" in
let cmd = ("ls " ^ filter ^ " > " ^ lustre_files_name) in
let _ =
if Sys.file_exists lustre_files_name then Sys.remove lustre_files_name;
if
((Sys.command cmd) <> 0)
then
......@@ -189,6 +185,7 @@ let (get_files_list_filtered : string -> string list -> string list) =
let ic = open_in lustre_files_name in
let files = readfile_line ic init in
close_in ic;
if Sys.file_exists lustre_files_name then Sys.remove lustre_files_name;
files
......@@ -213,8 +210,9 @@ class customized_callbacks = object(self)
method put str = self#top_xlurette#output_window#insert str
method put_misc str = self#top_xlurette#error_window#insert str
method read_pipe () =
method read_ltop_stdout () =
let length = float_of_string self#top_xlurette#test_length#text in
let
display = self#top_xlurette#output_window#insert
......@@ -292,6 +290,16 @@ class customized_callbacks = object(self)
with _ -> ()
);
true
method read_ltop_stderr () =
( try
while true do
let str = input_line ec in
self#top_xlurette#error_window#insert (str ^ "\n")
done
with _ -> ()
);
true
method show_step_window () =
......@@ -300,11 +308,35 @@ class customized_callbacks = object(self)
method on_clean_up_button_clicked () =
output_string oc ("clean \n");
flush oc;
prerr_endline "Clean-up temporary files ...";
()
self#top_xlurette#output_window#insert "Clean-up temporary files ...\n"
(* sut help window *)
method on_sut_help_button_clicked () =
self#top_sut_help_window#sut_help_window#show ()
method ok_sut_help_clicked () =
self#top_sut_help_window#sut_help_window#misc#hide ()
(* env help window *)
method on_env_help_button_clicked () =
self#top_env_help_window#env_help_window#show ()
method ok_env_help_clicked () =
self#top_env_help_window#env_help_window#misc#hide ()
(* oracle help window *)
method on_oracle_help_button_clicked () =
self#top_oracle_help_window#oracle_help_window#show ()
method ok_oracle_help_clicked () =
self#top_oracle_help_window#oracle_help_window#misc#hide ()
(* sut file selection window *)
method browse_sut_clicked () =
self#top_fileselection_sut#fileselection_sut#show ()
......@@ -370,16 +402,27 @@ class customized_callbacks = object(self)
let cmd_show = ("set_env \"" ^ env ^ "\"\n show \n") in
output_string oc cmd_show ;
if debug then (output_string stderr cmd_show; flush stderr);
if debug then (output_string stderr cmd_show);
flush oc
(* quit window *)
method quit () =
output_string oc "quit\n";
flush oc;
prerr_endline "bye! " ;
Unix.kill !pid (Sys.sigkill);
exit 0; ()
exit 0
method on_quit_xlurette_button_clicked () =
self#top_quit_window#quit_window#show ()
method on_quit_yes_clicked () =
self#quit ()
method on_quit_no_clicked () =
self#top_quit_window#quit_window#misc#hide ()
method step () =
if
......@@ -387,7 +430,7 @@ class customized_callbacks = object(self)
then
(
let cmd_step = (" \n") in
if debug then (output_string stderr cmd_step; flush stderr);
if debug then (output_string stderr cmd_step);
output_string oc cmd_step;
flush oc
)
......@@ -436,16 +479,26 @@ class customized_callbacks = object(self)
output_string oc "\nDelete file \n";
flush oc
method gnuplot_rif () =
let cmd_display =
if (get_rif_file ()) = "" then "" else
("set_output \"" ^ (get_rif_file ()) ^ "\"\n" ^ "gnuplot\n")
in
output_string oc cmd_display ;
if debug then (output_string stderr cmd_display;flush stderr);
flush oc
method call_sim2chro_clicked () =
let cmd_display =
if (get_rif_file ()) = "" then "" else
("set_output \"" ^ (get_rif_file ()) ^ "\"\n" ^ "sim2chro\n")
in
output_string oc cmd_display ;
if debug then output_string stderr cmd_display;
flush oc;
flush stderr
if debug then (output_string stderr cmd_display;flush stderr);
flush oc
method get_all_cmds () =
......@@ -461,6 +514,13 @@ class customized_callbacks = object(self)
let cmd_oracle =
("set_oracle \"" ^ oracle ^ "\" \"" ^ oracle_node ^ "\"\n") in
let cmd_sut_compiler =
("set_sut_compiler " ^ (self#get_sut_compiler ()) ^ "\n")
in
let cmd_oracle_compiler =
("set_oracle_compiler " ^ (self#get_oracle_compiler ()) ^ "\n")
in
let test_length = self#top_xlurette#test_length#text in
let cmd_test_length = ("set_test_length " ^ test_length ^ "\n") in
......@@ -522,7 +582,7 @@ class customized_callbacks = object(self)
cmd_test_length ^ cmd_formula_nb ^ cmd_draw_nb
^ cmd_rif_file ^ cmd_sut ^ cmd_env ^ cmd_oracle ^ cmd_step ^ cmd_seed
^ cmd_draw_mode ^ cmd_call_sim2chro ^ cmd_display_local
^ cmd_verbose ^ cmd_show_step
^ cmd_verbose ^ cmd_show_step ^ cmd_sut_compiler ^ cmd_oracle_compiler
method on_sut_name_changed () =
......@@ -635,8 +695,8 @@ class customized_callbacks = object(self)
let node = self#top_xlurette#sut_node_entry#entry#text in
self#put "Since no environment is provided, I generate a fake one named\n";
self#put (node ^ "_env.lut, that you can edit and modify.\n\n");
gen_stubs sut node ;
gen_fake_lutin (node ^ ".h") ;
gen_stubs self#put_misc sut node ;
gen_fake_lutin self#put_misc (node ^ ".h") ;
(* Fill the combo boxes again, since more files may have been created *)
self#read_lustre_files ();
......@@ -657,11 +717,11 @@ class customized_callbacks = object(self)
then self#top_step_by_step_window#step_by_step_window#show ();
output_string oc all_cmds ;
if debug then output_string stderr all_cmds;
if debug then (output_string stderr all_cmds; flush stderr) ;
flush oc;
flush stderr ;
self#read_rif_files ()
method save_parameters () =
let msg = "Saving current parameters in .lurette_rc \n"
and cmds = self#get_all_cmds ()
......@@ -697,6 +757,17 @@ class customized_callbacks = object(self)
method set_sut_node str =
self#top_xlurette#sut_node#entry#set_text str
method get_sut_compiler () =
self#top_xlurette#sut_compiler_entry#entry#text
method set_sut_compiler str =
self#top_xlurette#sut_compiler#entry#set_text str
method get_oracle_compiler () =
self#top_xlurette#oracle_compiler_entry#entry#text
method set_oracle_compiler str =
self#top_xlurette#oracle_compiler#entry#set_text str
method get_oracle () =
self#top_xlurette#oracle_name#entry#text
method set_oracle str =
......@@ -751,13 +822,12 @@ class customized_callbacks = object(self)
let lexer = Genlex.make_lexer [] in
let (parse_file_name : tok -> string) =
let (parse_ident_or_string : tok -> string) =
fun tok ->
try
match tok with parser
| [< 'Genlex.String str >] ->
if str = "" then "" else str
| [< 'Genlex.Ident id >] -> id
| [< 'Genlex.String str >] -> str
| [< 'Genlex.Ident str >] -> str
| [< >] -> ""
with _ ->
print_string
......@@ -799,14 +869,20 @@ class customized_callbacks = object(self)
| [< 'Genlex.Ident "set_env" ; 'Genlex.String str >] ->
self#set_env str
| [< 'Genlex.Ident "set_sut" ; str = parse_file_name ; node = parse_node >] ->
| [< 'Genlex.Ident "set_sut" ; str = parse_ident_or_string ; node = parse_node >] ->
pre_sut_node := node;
self#set_sut str;
self#set_sut_node node
| [< 'Genlex.Ident "set_oracle" ; str = parse_file_name ; node = parse_node >] ->
| [< 'Genlex.Ident "set_oracle" ; str = parse_ident_or_string ; node = parse_node >] ->
self#set_oracle str;
self#set_oracle_node node
| [< 'Genlex.Ident "set_sut_compiler" ; str = parse_ident_or_string >] ->
self#set_sut_compiler str
| [< 'Genlex.Ident "set_oracle_compiler" ; str = parse_ident_or_string >] ->
self#set_oracle_compiler str
| [< 'Genlex.Ident "set_test_length" ; 'Genlex.Int i >] ->
self#set_test_length i
......@@ -990,6 +1066,21 @@ let main () =
new Xlurette_glade_interface.top_fileselection_add_env callbacks
in
let on_sut_help_button =
new Xlurette_glade_interface.top_sut_help_window callbacks
in
let on_env_help_button =
new Xlurette_glade_interface.top_env_help_window callbacks
in
let on_oracle_help_button =
new Xlurette_glade_interface.top_oracle_help_window callbacks
in
let on_quit_xlurette_button =
new Xlurette_glade_interface.top_quit_window callbacks