Commit 208c71dc authored by Andrei Paskevich's avatar Andrei Paskevich

"steps limit" is bad English, replace with "step limit"

parent 88b5c150
...@@ -9,7 +9,7 @@ valid "Valid" ...@@ -9,7 +9,7 @@ valid "Valid"
invalid "Invalid" invalid "Invalid"
unknown "I don't know" "" unknown "I don't know" ""
timeout "Timeout" timeout "Timeout"
stepslimitexceeded "Steps limit reached" steplimitexceeded "Steps limit reached"
outofmemory "Fatal error: out of memory" outofmemory "Fatal error: out of memory"
outofmemory "Fatal error: exception Stack_overflow" outofmemory "Fatal error: exception Stack_overflow"
fail "typing error:\\(.*\\)$" "Failure : File generation error : \\1" fail "typing error:\\(.*\\)$" "Failure : File generation error : \\1"
......
...@@ -40,7 +40,7 @@ transformation "encoding_smt_if_poly" ...@@ -40,7 +40,7 @@ transformation "encoding_smt_if_poly"
outofmemory "(error \".*out of memory\")\\|Cannot allocate memory" outofmemory "(error \".*out of memory\")\\|Cannot allocate memory"
timeout "interrupted by timeout" timeout "interrupted by timeout"
steps "smt::SmtEngine::resourceUnitsUsed, \\([0-9]+.?[0-9]*\\)" 1 steps "smt::SmtEngine::resourceUnitsUsed, \\([0-9]+.?[0-9]*\\)" 1
stepslimitexceeded "??" steplimitexceeded "??"
(** Extra theories supported by CVC4 *) (** Extra theories supported by CVC4 *)
......
...@@ -51,7 +51,7 @@ transformation "encoding_smt_if_poly" ...@@ -51,7 +51,7 @@ transformation "encoding_smt_if_poly"
outofmemory "(error \".*out of memory\")\\|Cannot allocate memory" outofmemory "(error \".*out of memory\")\\|Cannot allocate memory"
timeout "interrupted by timeout" timeout "interrupted by timeout"
steps "smt::SmtEngine::resourceUnitsUsed, \\([0-9]+.?[0-9]*\\)" 1 steps "smt::SmtEngine::resourceUnitsUsed, \\([0-9]+.?[0-9]*\\)" 1
stepslimitexceeded "??" steplimitexceeded "??"
(** Extra theories supported by CVC4 *) (** Extra theories supported by CVC4 *)
......
...@@ -10,14 +10,14 @@ unknown = "help32" ...@@ -10,14 +10,14 @@ unknown = "help32"
invalid = "delete32" invalid = "delete32"
timeout = "clock32" timeout = "clock32"
outofmemory = "deletefile32" outofmemory = "deletefile32"
stepslimitexceeded = "cut32" steplimitexceeded = "cut32"
failure = "bug32" failure = "bug32"
valid_obs = "obsaccept32" valid_obs = "obsaccept32"
unknown_obs = "obshelp32" unknown_obs = "obshelp32"
invalid_obs = "obsdelete32" invalid_obs = "obsdelete32"
timeout_obs = "obsclock32" timeout_obs = "obsclock32"
outofmemory_obs = "obsdeletefile32" outofmemory_obs = "obsdeletefile32"
stepslimitexceeded_obs = "cut32" steplimitexceeded_obs = "cut32"
failure_obs = "obsbug32" failure_obs = "obsbug32"
yes = "accept32" yes = "accept32"
no = "delete32" no = "delete32"
...@@ -47,14 +47,14 @@ unknown = "help" ...@@ -47,14 +47,14 @@ unknown = "help"
invalid = "exclamation" invalid = "exclamation"
timeout = "time_delete" timeout = "time_delete"
outofmemory = "database_delete" outofmemory = "database_delete"
stepslimitexceeded = "brick_delete" steplimitexceeded = "brick_delete"
failure = "bomb" failure = "bomb"
valid_obs = "bullet_green" valid_obs = "bullet_green"
unknown_obs = "bullet_blue" unknown_obs = "bullet_blue"
invalid_obs = "bullet_red" invalid_obs = "bullet_red"
timeout_obs = "time_delete" timeout_obs = "time_delete"
outofmemory_obs = "database_delete" outofmemory_obs = "database_delete"
stepslimitexceeded_obs = "brick_delete" steplimitexceeded_obs = "brick_delete"
failure_obs = "bullet_black" failure_obs = "bullet_black"
yes = "accept" yes = "accept"
no = "delete" no = "delete"
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<!ATTLIST proof archived CDATA #IMPLIED> <!ATTLIST proof archived CDATA #IMPLIED>
<!ELEMENT result EMPTY> <!ELEMENT result EMPTY>
<!ATTLIST result status (valid|invalid|unknown|timeout|outofmemory|stepslimitexceeded|failure|highfailure) #REQUIRED> <!ATTLIST result status (valid|invalid|unknown|timeout|outofmemory|steplimitexceeded|failure|highfailure) #REQUIRED>
<!ATTLIST result time CDATA #IMPLIED> <!ATTLIST result time CDATA #IMPLIED>
<!ATTLIST result steps CDATA #IMPLIED> <!ATTLIST result steps CDATA #IMPLIED>
......
...@@ -1289,7 +1289,7 @@ let why3tac ?(timelimit=timelimit) s gl = ...@@ -1289,7 +1289,7 @@ let why3tac ?(timelimit=timelimit) s gl =
| Call_provers.Failure s -> error ("Failure: " ^ s) | Call_provers.Failure s -> error ("Failure: " ^ s)
| Call_provers.Timeout -> error "Timeout" | Call_provers.Timeout -> error "Timeout"
| OutOfMemory -> error "Out Of Memory" | OutOfMemory -> error "Out Of Memory"
| StepsLimitExceeded -> error "Steps Limit reached" | StepLimitExceeded -> error "Step Limit Exceeded"
| HighFailure -> | HighFailure ->
error ("Prover failure\n" ^ res.pr_output ^ "\n") error ("Prover failure\n" ^ res.pr_output ^ "\n")
with with
......
...@@ -28,9 +28,10 @@ type timeregexp = { ...@@ -28,9 +28,10 @@ type timeregexp = {
group : timeunit array; (* i-th corresponds to the group i+1 *) group : timeunit array; (* i-th corresponds to the group i+1 *)
} }
type stepsregexp = { type stepregexp = {
steps_re : Str.regexp; steps_re : Str.regexp;
steps_group_num : int; (* the number of matched group which corresponds to the number of steps *) steps_group_num : int;
(* the number of matched group which corresponds to the number of steps *)
} }
let timeregexp s = let timeregexp s =
...@@ -44,7 +45,8 @@ let timeregexp s = ...@@ -44,7 +45,8 @@ let timeregexp s =
| "m" -> add_unit Min | "m" -> add_unit Min
| "s" -> add_unit Sec | "s" -> add_unit Sec
| "i" -> add_unit Msec | "i" -> add_unit Msec
| x -> failwith ("unknown time format specifier: %%"^x^" (should be either %%h, %%m, %%s or %%i") | x -> failwith ("unknown time format specifier: %%" ^
x ^ " (should be either %%h, %%m, %%s or %%i")
in in
let s = Str.global_substitute cmd_regexp replace s in let s = Str.global_substitute cmd_regexp replace s in
let group = Array.make !nb Hour in let group = Array.make !nb Hour in
...@@ -68,7 +70,7 @@ let rec grep_time out = function ...@@ -68,7 +70,7 @@ let rec grep_time out = function
with _ -> grep_time out l with _ -> grep_time out l
end end
let stepsregexp s_re s_group_num = let stepregexp s_re s_group_num =
{steps_re = (Str.regexp s_re); steps_group_num = s_group_num} {steps_re = (Str.regexp s_re); steps_group_num = s_group_num}
let rec grep_steps out = function let rec grep_steps out = function
...@@ -88,7 +90,7 @@ type prover_answer = ...@@ -88,7 +90,7 @@ type prover_answer =
| Invalid | Invalid
| Timeout | Timeout
| OutOfMemory | OutOfMemory
| StepsLimitExceeded | StepLimitExceeded
| Unknown of string | Unknown of string
| Failure of string | Failure of string
| HighFailure | HighFailure
...@@ -105,7 +107,7 @@ type prover_result = { ...@@ -105,7 +107,7 @@ type prover_result = {
type prover_result_parser = { type prover_result_parser = {
prp_regexps : (Str.regexp * prover_answer) list; prp_regexps : (Str.regexp * prover_answer) list;
prp_timeregexps : timeregexp list; prp_timeregexps : timeregexp list;
prp_stepsregexp : stepsregexp list; prp_stepregexps : stepregexp list;
prp_exitcodes : (int * prover_answer) list; prp_exitcodes : (int * prover_answer) list;
prp_model_parser : Model_parser.model_parser; prp_model_parser : Model_parser.model_parser;
} }
...@@ -115,7 +117,7 @@ let print_prover_answer fmt = function ...@@ -115,7 +117,7 @@ let print_prover_answer fmt = function
| Invalid -> fprintf fmt "Invalid" | Invalid -> fprintf fmt "Invalid"
| Timeout -> fprintf fmt "Timeout" | Timeout -> fprintf fmt "Timeout"
| OutOfMemory -> fprintf fmt "Ouf Of Memory" | OutOfMemory -> fprintf fmt "Ouf Of Memory"
| StepsLimitExceeded -> fprintf fmt "Steps limit exceeded" | StepLimitExceeded -> fprintf fmt "Step limit exceeded"
| Unknown "" -> fprintf fmt "Unknown" | Unknown "" -> fprintf fmt "Unknown"
| Failure "" -> fprintf fmt "Failure" | Failure "" -> fprintf fmt "Failure"
| Unknown s -> fprintf fmt "Unknown (%s)" s | Unknown s -> fprintf fmt "Unknown (%s)" s
...@@ -144,7 +146,7 @@ let rec grep out l = match l with ...@@ -144,7 +146,7 @@ let rec grep out l = match l with
begin try begin try
ignore (Str.search_forward re out 0); ignore (Str.search_forward re out 0);
match pa with match pa with
| Valid | Invalid | Timeout | OutOfMemory | StepsLimitExceeded -> pa | Valid | Invalid | Timeout | OutOfMemory | StepLimitExceeded -> pa
| Unknown s -> Unknown (Str.replace_matched s out) | Unknown s -> Unknown (Str.replace_matched s out)
| Failure s -> Failure (Str.replace_matched s out) | Failure s -> Failure (Str.replace_matched s out)
| HighFailure -> assert false | HighFailure -> assert false
...@@ -193,7 +195,7 @@ let parse_prover_run res_parser time out ret on_timelimit timelimit ~printer_map ...@@ -193,7 +195,7 @@ let parse_prover_run res_parser time out ret on_timelimit timelimit ~printer_map
in in
Debug.dprintf debug "Call_provers: prover output:@\n%s@." out; Debug.dprintf debug "Call_provers: prover output:@\n%s@." out;
let time = Opt.get_def (time) (grep_time out res_parser.prp_timeregexps) in let time = Opt.get_def (time) (grep_time out res_parser.prp_timeregexps) in
let steps = Opt.get_def (-1) (grep_steps out res_parser.prp_stepsregexp) in let steps = Opt.get_def (-1) (grep_steps out res_parser.prp_stepregexps) in
let ans = match ans with let ans = match ans with
| Unknown _ | HighFailure when on_timelimit && timelimit > 0 | Unknown _ | HighFailure when on_timelimit && timelimit > 0
&& time >= (0.9 *. float timelimit) -> Timeout && time >= (0.9 *. float timelimit) -> Timeout
...@@ -210,7 +212,7 @@ let parse_prover_run res_parser time out ret on_timelimit timelimit ~printer_map ...@@ -210,7 +212,7 @@ let parse_prover_run res_parser time out ret on_timelimit timelimit ~printer_map
pr_model = model; pr_model = model;
} }
let actualcommand command timelimit memlimit stepslimit file = let actualcommand command timelimit memlimit steplimit file =
let arglist = Cmdline.cmdline_split command in let arglist = Cmdline.cmdline_split command in
let use_stdin = ref true in let use_stdin = ref true in
(* FIXME: use_stdin is never modified below ?? *) (* FIXME: use_stdin is never modified below ?? *)
...@@ -228,20 +230,20 @@ let actualcommand command timelimit memlimit stepslimit file = ...@@ -228,20 +230,20 @@ let actualcommand command timelimit memlimit stepslimit file =
to prepare the command line in a separate function? *) to prepare the command line in a separate function? *)
| "l" -> Config.libdir | "l" -> Config.libdir
| "d" -> Config.datadir | "d" -> Config.datadir
| "S" -> string_of_int stepslimit | "S" -> string_of_int steplimit
| _ -> failwith "unknown specifier, use %%, %f, %t, %T, %U, %m, %l, %d or %S" | _ -> failwith "unknown specifier, use %%, %f, %t, %T, %U, %m, %l, %d or %S"
in in
(* FIXME: are we sure that tuples are evaluated from left to right ? *) (* FIXME: are we sure that tuples are evaluated from left to right ? *)
List.map (Str.global_substitute cmd_regexp replace) arglist, List.map (Str.global_substitute cmd_regexp replace) arglist,
!use_stdin, !on_timelimit !use_stdin, !on_timelimit
let call_on_file ~command ?(timelimit=0) ?(memlimit=0) ?(stepslimit=(-1)) let call_on_file ~command ?(timelimit=0) ?(memlimit=0) ?(steplimit=(-1))
~res_parser ~res_parser
~printer_mapping ~printer_mapping
?(cleanup=false) ?(inplace=false) ?(redirect=true) fin = ?(cleanup=false) ?(inplace=false) ?(redirect=true) fin =
let command, use_stdin, on_timelimit = let command, use_stdin, on_timelimit =
try actualcommand command timelimit memlimit stepslimit fin try actualcommand command timelimit memlimit steplimit fin
with e -> with e ->
if cleanup then Sys.remove fin; if cleanup then Sys.remove fin;
if inplace then Sys.rename (save fin) fin; if inplace then Sys.rename (save fin) fin;
...@@ -252,10 +254,12 @@ let call_on_file ~command ?(timelimit=0) ?(memlimit=0) ?(stepslimit=(-1)) ...@@ -252,10 +254,12 @@ let call_on_file ~command ?(timelimit=0) ?(memlimit=0) ?(stepslimit=(-1))
let argarray = Array.of_list command in let argarray = Array.of_list command in
fun () -> fun () ->
let fd_in = if use_stdin then Unix.openfile fin [Unix.O_RDONLY] 0 else Unix.stdin in let fd_in = if use_stdin then
Unix.openfile fin [Unix.O_RDONLY] 0 else Unix.stdin in
let fout,cout,fd_out,fd_err = let fout,cout,fd_out,fd_err =
if redirect then if redirect then
let fout,cout = Filename.open_temp_file (Filename.basename fin) ".out" in let fout,cout =
Filename.open_temp_file (Filename.basename fin) ".out" in
let fd_out = Unix.descr_of_out_channel cout in let fd_out = Unix.descr_of_out_channel cout in
fout, cout, fd_out, fd_out fout, cout, fd_out, fd_out
else else
...@@ -287,7 +291,7 @@ let call_on_file ~command ?(timelimit=0) ?(memlimit=0) ?(stepslimit=(-1)) ...@@ -287,7 +291,7 @@ let call_on_file ~command ?(timelimit=0) ?(memlimit=0) ?(stepslimit=(-1))
in in
{ call = call; pid = pid } { call = call; pid = pid }
let call_on_buffer ~command ?(timelimit=0) ?(memlimit=0) ?(stepslimit=(-1)) let call_on_buffer ~command ?(timelimit=0) ?(memlimit=0) ?(steplimit=(-1))
~res_parser ~filename ~res_parser ~filename
~printer_mapping ~printer_mapping
?(inplace=false) buffer = ?(inplace=false) buffer =
...@@ -299,7 +303,7 @@ let call_on_buffer ~command ?(timelimit=0) ?(memlimit=0) ?(stepslimit=(-1)) ...@@ -299,7 +303,7 @@ let call_on_buffer ~command ?(timelimit=0) ?(memlimit=0) ?(stepslimit=(-1))
end else end else
Filename.open_temp_file "why_" ("_" ^ filename) in Filename.open_temp_file "why_" ("_" ^ filename) in
Buffer.output_buffer cin buffer; close_out cin; Buffer.output_buffer cin buffer; close_out cin;
call_on_file ~command ~timelimit ~memlimit ~stepslimit call_on_file ~command ~timelimit ~memlimit ~steplimit
~res_parser ~printer_mapping ~cleanup:true ~inplace fin ~res_parser ~printer_mapping ~cleanup:true ~inplace fin
let query_call pc = let query_call pc =
......
...@@ -22,7 +22,7 @@ type prover_answer = ...@@ -22,7 +22,7 @@ type prover_answer =
(** the task timeouts, ie it takes more time than specified *) (** the task timeouts, ie it takes more time than specified *)
| OutOfMemory | OutOfMemory
(** the task runs out of memory *) (** the task runs out of memory *)
| StepsLimitExceeded | StepLimitExceeded
(** the task required more steps than the limit provided *) (** the task required more steps than the limit provided *)
| Unknown of string | Unknown of string
(** The prover can't determine if the task is valid *) (** The prover can't determine if the task is valid *)
...@@ -63,21 +63,21 @@ val debug : Debug.flag ...@@ -63,21 +63,21 @@ val debug : Debug.flag
type timeregexp type timeregexp
(** The type of precompiled regular expressions for time parsing *) (** The type of precompiled regular expressions for time parsing *)
type stepsregexp type stepregexp
(** The type of precompiled regular expressions for parsing of steps *) (** The type of precompiled regular expressions for parsing of steps *)
val timeregexp : string -> timeregexp val timeregexp : string -> timeregexp
(** Converts a regular expression with special markers '%h','%m', (** Converts a regular expression with special markers '%h','%m',
'%s','%i' (for milliseconds) into a value of type [timeregexp] *) '%s','%i' (for milliseconds) into a value of type [timeregexp] *)
val stepsregexp : string -> int -> stepsregexp val stepregexp : string -> int -> stepregexp
(** stepsregexp s n creates a regular expression for matching number of steps. (** [stepregexp s n] creates a regular expression to match the number of steps.
s is regular expression, n is a group number with steps information *) [s] is a regular expression, [n] is the group number with steps number. *)
type prover_result_parser = { type prover_result_parser = {
prp_regexps : (Str.regexp * prover_answer) list; prp_regexps : (Str.regexp * prover_answer) list;
prp_timeregexps : timeregexp list; prp_timeregexps : timeregexp list;
prp_stepsregexp : stepsregexp list; prp_stepregexps : stepregexp list;
prp_exitcodes : (int * prover_answer) list; prp_exitcodes : (int * prover_answer) list;
(* The parser for a model returned by the solver. *) (* The parser for a model returned by the solver. *)
prp_model_parser : Model_parser.model_parser; prp_model_parser : Model_parser.model_parser;
...@@ -96,7 +96,7 @@ val call_on_file : ...@@ -96,7 +96,7 @@ val call_on_file :
command : string -> command : string ->
?timelimit : int -> ?timelimit : int ->
?memlimit : int -> ?memlimit : int ->
?stepslimit : int -> ?steplimit : int ->
res_parser : prover_result_parser -> res_parser : prover_result_parser ->
printer_mapping : Printer.printer_mapping -> printer_mapping : Printer.printer_mapping ->
?cleanup : bool -> ?cleanup : bool ->
...@@ -108,7 +108,7 @@ val call_on_buffer : ...@@ -108,7 +108,7 @@ val call_on_buffer :
command : string -> command : string ->
?timelimit : int -> ?timelimit : int ->
?memlimit : int -> ?memlimit : int ->
?stepslimit : int -> ?steplimit : int ->
res_parser : prover_result_parser -> res_parser : prover_result_parser ->
filename : string -> filename : string ->
printer_mapping : Printer.printer_mapping -> printer_mapping : Printer.printer_mapping ->
...@@ -117,7 +117,8 @@ val call_on_buffer : ...@@ -117,7 +117,8 @@ val call_on_buffer :
(** Call a prover on the task printed in the {!type: Buffer.t} given. (** Call a prover on the task printed in the {!type: Buffer.t} given.
@param timelimit : set the available time limit (def. 0 : unlimited) @param timelimit : set the available time limit (def. 0 : unlimited)
@param memlimit : set the available time limit (def. 0 : unlimited) @param memlimit : set the available memory limit (def. 0 : unlimited)
@param steplimit : set the available step limit (def. -1 : unlimited)
@param regexps : if the first field matches the prover output, @param regexps : if the first field matches the prover output,
the second field is the answer. Regexp groups present in the second field is the answer. Regexp groups present in
......
...@@ -76,7 +76,7 @@ let load_driver = let driver_tag = ref (-1) in fun env file extra_files -> ...@@ -76,7 +76,7 @@ let load_driver = let driver_tag = ref (-1) in fun env file extra_files ->
let model_parser = ref "no_model" in let model_parser = ref "no_model" in
let transform = ref [] in let transform = ref [] in
let timeregexps = ref [] in let timeregexps = ref [] in
let stepsregexps = ref [] in let stepregexps = ref [] in
let blacklist = Queue.create () in let blacklist = Queue.create () in
let set_or_raise loc r v error = match !r with let set_or_raise loc r v error = match !r with
...@@ -90,19 +90,19 @@ let load_driver = let driver_tag = ref (-1) in fun env file extra_files -> ...@@ -90,19 +90,19 @@ let load_driver = let driver_tag = ref (-1) in fun env file extra_files ->
| RegexpInvalid s -> add_to_list regexps (Str.regexp s, Invalid) | RegexpInvalid s -> add_to_list regexps (Str.regexp s, Invalid)
| RegexpTimeout s -> add_to_list regexps (Str.regexp s, Timeout) | RegexpTimeout s -> add_to_list regexps (Str.regexp s, Timeout)
| RegexpOutOfMemory s -> add_to_list regexps (Str.regexp s, OutOfMemory) | RegexpOutOfMemory s -> add_to_list regexps (Str.regexp s, OutOfMemory)
| RegexpStepsLimitExceeded s -> | RegexpStepLimitExceeded s ->
add_to_list regexps (Str.regexp s, StepsLimitExceeded) add_to_list regexps (Str.regexp s, StepLimitExceeded)
| RegexpUnknown (s,t) -> add_to_list regexps (Str.regexp s, Unknown t) | RegexpUnknown (s,t) -> add_to_list regexps (Str.regexp s, Unknown t)
| RegexpFailure (s,t) -> add_to_list regexps (Str.regexp s, Failure t) | RegexpFailure (s,t) -> add_to_list regexps (Str.regexp s, Failure t)
| TimeRegexp r -> add_to_list timeregexps (Call_provers.timeregexp r) | TimeRegexp r -> add_to_list timeregexps (Call_provers.timeregexp r)
| StepRegexp (r,ns) -> | StepRegexp (r,ns) ->
add_to_list stepsregexps (Call_provers.stepsregexp r ns) add_to_list stepregexps (Call_provers.stepregexp r ns)
| ExitCodeValid s -> add_to_list exitcodes (s, Valid) | ExitCodeValid s -> add_to_list exitcodes (s, Valid)
| ExitCodeInvalid s -> add_to_list exitcodes (s, Invalid) | ExitCodeInvalid s -> add_to_list exitcodes (s, Invalid)
| ExitCodeTimeout s -> add_to_list exitcodes (s, Timeout) | ExitCodeTimeout s -> add_to_list exitcodes (s, Timeout)
| ExitCodeOutOfMemory s -> add_to_list exitcodes (s, OutOfMemory) | ExitCodeOutOfMemory s -> add_to_list exitcodes (s, OutOfMemory)
| ExitCodeStepsLimitExceeded s -> | ExitCodeStepLimitExceeded s ->
add_to_list exitcodes (s, StepsLimitExceeded) add_to_list exitcodes (s, StepLimitExceeded)
| ExitCodeUnknown (s,t) -> add_to_list exitcodes (s, Unknown t) | ExitCodeUnknown (s,t) -> add_to_list exitcodes (s, Unknown t)
| ExitCodeFailure (s,t) -> add_to_list exitcodes (s, Failure t) | ExitCodeFailure (s,t) -> add_to_list exitcodes (s, Failure t)
| Filename s -> set_or_raise loc filename s "filename" | Filename s -> set_or_raise loc filename s "filename"
...@@ -206,7 +206,7 @@ let load_driver = let driver_tag = ref (-1) in fun env file extra_files -> ...@@ -206,7 +206,7 @@ let load_driver = let driver_tag = ref (-1) in fun env file extra_files ->
{ {
prp_regexps = List.rev !regexps; prp_regexps = List.rev !regexps;
prp_timeregexps = List.rev !timeregexps; prp_timeregexps = List.rev !timeregexps;
prp_stepsregexp = List.rev !stepsregexps; prp_stepregexps = List.rev !stepregexps;
prp_exitcodes = List.rev !exitcodes; prp_exitcodes = List.rev !exitcodes;
prp_model_parser = Model_parser.lookup_model_parser !model_parser prp_model_parser = Model_parser.lookup_model_parser !model_parser
}; };
...@@ -245,9 +245,10 @@ let file_of_task drv input_file theory_name task = ...@@ -245,9 +245,10 @@ let file_of_task drv input_file theory_name task =
let file_of_theory drv input_file th = let file_of_theory drv input_file th =
get_filename drv input_file th.th_name.Ident.id_string "null" get_filename drv input_file th.th_name.Ident.id_string "null"
let call_on_buffer ~command ?timelimit ?memlimit ?stepslimit ?inplace ~filename ~printer_mapping drv buffer = let call_on_buffer ~command ?timelimit ?memlimit ?steplimit
?inplace ~filename ~printer_mapping drv buffer =
Call_provers.call_on_buffer Call_provers.call_on_buffer
~command ?timelimit ?memlimit ?stepslimit ~res_parser:drv.drv_res_parser ~command ?timelimit ?memlimit ?steplimit ~res_parser:drv.drv_res_parser
~filename ~printer_mapping ?inplace buffer ~filename ~printer_mapping ?inplace buffer
...@@ -308,7 +309,7 @@ let print_theory ?old drv fmt th = ...@@ -308,7 +309,7 @@ let print_theory ?old drv fmt th =
print_task ?old drv fmt task print_task ?old drv fmt task
let prove_task_prepared let prove_task_prepared
~command ?timelimit ?memlimit ?stepslimit ?old ?inplace drv task = ~command ?timelimit ?memlimit ?steplimit ?old ?inplace drv task =
let buf = Buffer.create 1024 in let buf = Buffer.create 1024 in
let fmt = formatter_of_buffer buf in let fmt = formatter_of_buffer buf in
let old_channel = Opt.map open_in old in let old_channel = Opt.map open_in old in
...@@ -326,13 +327,15 @@ let prove_task_prepared ...@@ -326,13 +327,15 @@ let prove_task_prepared
get_filename drv fn "T" pr.pr_name.id_string get_filename drv fn "T" pr.pr_name.id_string
in in
let res = let res =
call_on_buffer ~command ?timelimit ?memlimit ?stepslimit ?inplace ~filename ~printer_mapping drv buf in call_on_buffer ~command ?timelimit ?memlimit ?steplimit
?inplace ~filename ~printer_mapping drv buf in
Buffer.reset buf; Buffer.reset buf;
res res
let prove_task ~command ?timelimit ?memlimit ?stepslimit ?old ?inplace drv task = let prove_task ~command ?timelimit ?memlimit ?steplimit ?old ?inplace drv task =
let task = prepare_task drv task in let task = prepare_task drv task in
prove_task_prepared ~command ?timelimit ?memlimit ?stepslimit ?old ?inplace drv task prove_task_prepared ~command ?timelimit ?memlimit
?steplimit ?old ?inplace drv task
(* exception report *) (* exception report *)
......
...@@ -38,7 +38,7 @@ val call_on_buffer : ...@@ -38,7 +38,7 @@ val call_on_buffer :
command : string -> command : string ->
?timelimit : int -> ?timelimit : int ->
?memlimit : int -> ?memlimit : int ->
?stepslimit : int -> ?steplimit : int ->
?inplace : bool -> ?inplace : bool ->
filename : string -> filename : string ->
printer_mapping : Printer.printer_mapping -> printer_mapping : Printer.printer_mapping ->
...@@ -58,7 +58,7 @@ val prove_task : ...@@ -58,7 +58,7 @@ val prove_task :
command : string -> command : string ->
?timelimit : int -> ?timelimit : int ->
?memlimit : int -> ?memlimit : int ->
?stepslimit : int -> ?steplimit : int ->
?old : string -> ?old : string ->
?inplace : bool -> ?inplace : bool ->
driver -> Task.task -> Call_provers.pre_prover_call driver -> Task.task -> Call_provers.pre_prover_call
...@@ -74,7 +74,7 @@ val prove_task_prepared : ...@@ -74,7 +74,7 @@ val prove_task_prepared :
command : string -> command : string ->
?timelimit : int -> ?timelimit : int ->
?memlimit : int -> ?memlimit : int ->
?stepslimit : int -> ?steplimit : int ->
?old : string -> ?old : string ->
?inplace : bool -> ?inplace : bool ->
driver -> Task.task -> Call_provers.pre_prover_call driver -> Task.task -> Call_provers.pre_prover_call
......
...@@ -58,7 +58,7 @@ type global = ...@@ -58,7 +58,7 @@ type global =
| RegexpInvalid of string | RegexpInvalid of string
| RegexpTimeout of string | RegexpTimeout of string
| RegexpOutOfMemory of string | RegexpOutOfMemory of string
| RegexpStepsLimitExceeded of string | RegexpStepLimitExceeded of string
| RegexpUnknown of string * string | RegexpUnknown of string * string
| RegexpFailure of string * string | RegexpFailure of string * string
| TimeRegexp of string | TimeRegexp of string
...@@ -67,7 +67,7 @@ type global = ...@@ -67,7 +67,7 @@ type global =
| ExitCodeInvalid of int | ExitCodeInvalid of int
| ExitCodeTimeout of int | ExitCodeTimeout of int
| ExitCodeOutOfMemory of int | ExitCodeOutOfMemory of int
| ExitCodeStepsLimitExceeded of int | ExitCodeStepLimitExceeded of int
| ExitCodeUnknown of int * string | ExitCodeUnknown of int * string
| ExitCodeFailure of int * string | ExitCodeFailure of int * string
| Filename of string | Filename of string
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
"invalid", INVALID; "invalid", INVALID;
"timeout", TIMEOUT; "timeout", TIMEOUT;
"outofmemory", OUTOFMEMORY; "outofmemory", OUTOFMEMORY;
"stepslimitexceeded", STEPSLIMITEXCEEDED; "steplimitexceeded", STEPLIMITEXCEEDED;
"time", TIME; "time", TIME;
"unknown", UNKNOWN; "unknown", UNKNOWN;
"fail", FAIL; "fail", FAIL;
......