Skip to content
Snippets Groups Projects
Commit 08183a40 authored by Michele Alberti's avatar Michele Alberti
Browse files

[aimos][saver] Uniformize code style.

parent 3a593054
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
open Why3 open Why3
open Base open Base
let aimos_file = Re__Core.(compile (str "%{aimos_file}")) let re_aimos_file = Re__Core.(compile (str "%{aimos_file}"))
let write_config inputs_path models_path perturbation perturbation_path out_mode let write_config inputs_path models_path perturbation perturbation_path out_mode
amplitude = amplitude =
...@@ -94,7 +94,7 @@ let build_command config_prover ...@@ -94,7 +94,7 @@ let build_command config_prover
amplitude amplitude
in in
let command = Whyconf.get_complete_command ~with_steps:false config_prover in let command = Whyconf.get_complete_command ~with_steps:false config_prover in
Re__Core.replace_string aimos_file ~by:aimos_config command Re__Core.replace_string re_aimos_file ~by:aimos_config command
let re_aimos_output = Re__Pcre.regexp "((,\\s)(\\d+\\.\\d+))" let re_aimos_output = Re__Pcre.regexp "((,\\s)(\\d+\\.\\d+))"
......
...@@ -23,21 +23,21 @@ ...@@ -23,21 +23,21 @@
open Why3 open Why3
open Base open Base
let svm = Re__Core.(compile (str "%{svm}")) let re_svm = Re__Core.(compile (str "%{svm}"))
let dataset = Re__Core.(compile (str "%{dataset}")) let re_dataset = Re__Core.(compile (str "%{dataset}"))
let epsilon = Re__Core.(compile (str "%{epsilon}")) let re_eps = Re__Core.(compile (str "%{epsilon}"))
let abstraction = Re__Core.(compile (str "%{abstraction}")) let re_abstraction = Re__Core.(compile (str "%{abstraction}"))
let distance = Re__Core.(compile (str "%{distance}")) let re_distance = Re__Core.(compile (str "%{distance}"))
let build_command config_prover svm_filename dataset_filename eps = let build_command config_prover svm_filename dataset_filename eps =
let command = Whyconf.get_complete_command ~with_steps:false config_prover in let command = Whyconf.get_complete_command ~with_steps:false config_prover in
let params = let params =
[ [
(svm, Unix.realpath svm_filename); (re_svm, Unix.realpath svm_filename);
(dataset, Unix.realpath dataset_filename); (re_dataset, Unix.realpath dataset_filename);
(epsilon, Option.(value (map ~f:Dataset.string_of_eps eps)) ~default:"0"); (re_eps, Option.(value (map ~f:Dataset.string_of_eps eps)) ~default:"0");
(distance, "l_inf"); (re_distance, "l_inf");
(abstraction, "hybrid"); (re_abstraction, "hybrid");
] ]
in in
List.fold params ~init:command ~f:(fun cmd (param, by) -> List.fold params ~init:command ~f:(fun cmd (param, by) ->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment