Skip to content

Commit

Permalink
SMT timeout can now be configured in INI files
Browse files Browse the repository at this point in the history
The configuration key is "timeout"
  • Loading branch information
strub committed Nov 24, 2023
1 parent 9fd429a commit 6c849a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ecOptions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type ini_options = {
ini_why3 : string option;
ini_ovrevict : string list;
ini_provers : string list;
ini_timeout : int option;
ini_idirs : (string option * string) list;
ini_rdirs : (string option * string) list;
}
Expand Down Expand Up @@ -367,7 +368,11 @@ let prv_options_of_values ?ini values =
in match provers with [] -> None | provers -> Some provers
in
{ prvo_maxjobs = odfl 4 (get_int "max-provers" values);
prvo_timeout = odfl 3 (get_int "timeout" values);
prvo_timeout = begin
match get_int "timeout" values with
| None -> odfl 3 (obind (fun x -> x.ini_timeout) ini)
| Some i -> i
end;
prvo_cpufactor = odfl 1 (get_int "cpu-factor" values);
prvo_provers = provers;
prvo_pragmas = get_string_list "pragmas" values;
Expand Down Expand Up @@ -502,12 +507,14 @@ let read_ini_file (filename : string) =
ini_why3 = tryget "why3conf";
ini_ovrevict = trylist "no-evict";
ini_provers = trylist "provers" ;
ini_timeout = tryint "timeout" ;
ini_idirs = List.map parse_idir (trylist "idirs");
ini_rdirs = List.map parse_idir (trylist "rdirs"); } in

{ ini_ppwidth = ini.ini_ppwidth;
ini_why3 = omap expand ini.ini_why3;
ini_ovrevict = ini.ini_ovrevict;
ini_provers = ini.ini_provers;
ini_timeout = ini.ini_timeout;
ini_idirs = ini.ini_idirs;
ini_rdirs = ini.ini_rdirs; }
1 change: 1 addition & 0 deletions src/ecOptions.mli
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type ini_options = {
ini_why3 : string option;
ini_ovrevict : string list;
ini_provers : string list;
ini_timeout : int option;
ini_idirs : (string option * string) list;
ini_rdirs : (string option * string) list;
}
Expand Down

0 comments on commit 6c849a8

Please sign in to comment.