Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

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

lurette 0.57 Thu, 04 Apr 2002 16:06:30 +0200 by jahier

Parent-Version:      0.56
Version-Log:

Add a --output options to specify the output file name.

Project-Description: Lurette
parent 662e3694
......@@ -2,7 +2,7 @@ LURETTE_DIR = ..
OCAMLMAKEFILE = $(LURETTE_DIR)/OcamlMakefile
OCAMLFLAGS = -noassert -unsafe
# OCAMLFLAGS = -noassert -unsafe
OCAMLNCFLAGS = -inline 10
-include ./lurette.in
......
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Lurette")
(Project-Version lurette 0 56)
(Parent-Version lurette 0 55)
(Project-Version lurette 0 57)
(Parent-Version lurette 0 56)
(Version-Log "
Change the env format sligthly again :
- adds the arcs and node numbers.
- allows lists to end by a ;
- add xor's
Add a --output options to specify the output file name.
")
(New-Version-Log "")
(Checkin-Time "Wed, 03 Apr 2002 16:14:26 +0200")
(Checkin-Time "Thu, 04 Apr 2002 16:06:30 +0200")
(Checkin-Login jahier)
(Populate-Ignore ())
(Project-Keywords)
......@@ -29,10 +26,10 @@ Change the env format sligthly again :
;; Sources files for lurette only
(source/lurette.mli (lurette/11_lurette.ml 1.12 644))
(source/lurette.ml (lurette/12_lurette.ml 1.33 644))
(source/lurette.ml (lurette/12_lurette.ml 1.34 644))
(source/command_line.ml (lurette/b/20_command_li 1.5 644))
(source/command_line.mli (lurette/b/21_command_li 1.5 644))
(source/command_line.ml (lurette/b/20_command_li 1.6 644))
(source/command_line.mli (lurette/b/21_command_li 1.6 644))
;; Sources files common to lurette and ima_exe
(source/graph.mli (lurette/13_graph.mli 1.6 644))
......@@ -70,17 +67,17 @@ Change the env format sligthly again :
(source/wtree.mli (lurette/b/0_wtree.mli 1.7 644))
(source/wtree.ml (lurette/b/1_wtree.ml 1.9 644))
(source/sim2chro.mli (lurette/b/23_sim2chro.m 1.3 644))
(source/sim2chro.ml (lurette/b/24_sim2chro.m 1.6 644))
(source/sim2chro.mli (lurette/b/23_sim2chro.m 1.4 644))
(source/sim2chro.ml (lurette/b/24_sim2chro.m 1.7 644))
(source/gen_stubs.ml (lurette/24_generate_l 1.21 644))
;; Make files
(OcamlMakefile (lurette/17_OcamlMakef 1.25 644))
(Makefile (lurette/18_Makefile 1.27 644))
(Makefile (lurette/18_Makefile 1.28 644))
(interface/Makefile (lurette/25_Makefile 1.6 644))
(test/Makefile_ima_exe (lurette/b/35_Makefile_i 1.3 644))
(make_lurette (lurette/27_make_luret 1.8 744))
(make_lurette (lurette/27_make_luret 1.9 744))
;; Documentation
......
......@@ -3,7 +3,7 @@
Help="usage: make_lurette <sut> [<oracle>] <make options>
The first and second args of this scripts should respectively be the
The first and second args of this script should respectively be the
name of the sut and the name of the oracle modules (without any
extension). Note that the oracle is optional.
......
......@@ -17,6 +17,7 @@ type optionsT = {
mutable user_seed : int ;
mutable verbose : bool ;
mutable help : bool ;
mutable output : string ;
mutable oracle : bool
}
......@@ -25,7 +26,7 @@ type cmd_line_optionT =
| DisplayLocalVar | NoDisplayLocalVar
| Sim2chro | NoSim2chro
(* | CuddHeapInit *)
| Seed | NoOracle | Verbose
| Seed | NoOracle | Verbose | Output
(* Names of the command line options to override the defaults. *)
let (string_to_option: (string * cmd_line_optionT) list) = [
......@@ -33,6 +34,9 @@ let (string_to_option: (string * cmd_line_optionT) list) = [
("--step", Step);
("-s", Step);
("--output", Output);
("-o", Output);
("--with-seed", Seed);
("-seed", Seed);
......@@ -60,6 +64,7 @@ let (option_to_usage: cmd_line_optionT -> string) =
match opt with
Step -> "Run lurette step by step.\n"
| NoStep -> "Do not run lurette step by step (Default).\n"
| Output -> "Output file name (the default file name is \"lurette.rif\").\n"
| DisplayLocalVar -> "Display environment local variables in sim2chro (Default).\n"
| NoDisplayLocalVar -> "Do not display environment local variables in sim2chro.\n"
| Sim2chro -> "Call sim2chro when lurette resumes (Default).\n"
......
......@@ -21,6 +21,7 @@ type optionsT = {
mutable user_seed : int ;
mutable verbose : bool ;
mutable help : bool ;
mutable output : string ;
mutable oracle : bool
}
......@@ -38,7 +39,7 @@ type cmd_line_optionT =
| DisplayLocalVar | NoDisplayLocalVar
| Sim2chro | NoSim2chro
(* | CuddHeapInit *)
| Seed | NoOracle | Verbose
| Seed | NoOracle | Verbose | Output
val string_to_option: (string * cmd_line_optionT) list
......
......@@ -24,6 +24,7 @@ let (options:Command_line.optionsT) = {
user_seed = 0 ;
verbose = false ;
help = false ;
output = "lurette.rif" ;
oracle = true
}
......@@ -93,7 +94,7 @@ let rec (main : unit -> 'a) =
in
let res = main2 s n p in
if (not options.step_by_step && options.display_sim2chro)
then Sim2chro.call_sim2chro ()
then Sim2chro.call_sim2chro options.output
else () ;
res
with
......@@ -127,6 +128,12 @@ and
(* "integer is expected after the " ^ *)
(* "option --init-cudd-heap\n") ; *)
(* n+2 *)
| Output ->
let str = (Sys.argv.(n+1)) in
options.output <- str ;
n+2
| Seed ->
let str = (Sys.argv.(n+1)) in
options.user_seed <- cmd_line_string_to_int str
......@@ -173,8 +180,8 @@ and
(* Initialisation of `Env_state.env_state' *)
let env_llist = (get_env_from_args 4 []) in
let () = Env.read_env_state env_llist in
let _ = Sys.command "touch lurette.rif; rm lurette.rif;" in
let rif = open_out "lurette.rif" in
let _ = Sys.command ("touch " ^ options.output ^ "; rm " ^ options.output) in
let rif = open_out options.output in
let local_var_name_and_type_list_unsorted0 = Env_state.loc_env_unsorted () in
let local_var_name_and_type_list_unsorted =
List.map (fun (vn, vt) -> (vn, (var_type_to_string vt)))
......@@ -301,7 +308,7 @@ and
results ;
flush stdout;
flush rif;
Sim2chro.call_sim2chro ();
Sim2chro.call_sim2chro options.output;
assert false
)
else ()
......
......@@ -62,7 +62,7 @@ let (put_current_step_values: out_channel -> int -> env_out -> env_in -> env_loc
put "\n"
let call_sim2chro _ =
let call_sim2chro output_file =
let color_option =
(* options for sim2chro to display local vars in green *)
let loc_var_names = loc_env_unsorted () in
......@@ -90,7 +90,7 @@ let call_sim2chro _ =
(varcolor_str ^ varnamecolor_str ^ varnumcolor_str)
in
let cmd = (" sim2chro -ecran " ^ color_option ^
" -in lurette.rif > /dev/null &")
" -in " ^ output_file ^ " > /dev/null &")
in
let _ = print_string cmd ; print_string "\n" in
let _ = Sys.command cmd in
......
......@@ -36,6 +36,6 @@ val put_current_step_values: out_channel -> int -> env_out -> env_in -> env_loc
(**
Calls (fork) sim2chro.
*)
val call_sim2chro: unit -> unit
val call_sim2chro: string -> unit
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment