https://github.com/EasyCrypt/easycrypt
Revision 1ca374dced410267d3792c4766d3289c7224a350 authored by Alley Stoughton on 22 February 2018, 17:20:48 UTC, committed by Pierre-Yves Strub on 26 February 2018, 15:04:53 UTC
All use-only instructions must come first. There are two "universal"
use-only instructions: "" (all known provers), and "!" (no
provers). It is illegal to mix ""/"!" with prover names (no point
in doing so).

As before, if the use-only part is empty, it means the currently known
provers. The include/exclude instructions are processed in order,
acting on the result of the use-only part.

Examples (assuming "Z3" and "Alt-Ergo" are only known provers):

prover [].  (* no-op *)
prover [-"Z3"].  (* removes "Z3" from current provers *)
prover [+"Z3"].  (* adds "Z3" to current provers *)
prover [""].  (* results in "Z3", "Alt-Ergo" *)
prover ["!"].  (* results in no provers *)
prover ["Z3"].  (* results in "Z3" *)
prover ["Z3" "Alt-Ergo"].  (* results in "Z3", "Alt-Ergo" *)
prover ["!" +"Z3"].  (* results in "Z3" *)
prover ["" -"Z3"].  (* results in "Alt-Ergo" *)
1 parent 36f7f5a
Raw File
Tip revision: 1ca374dced410267d3792c4766d3289c7224a350 authored by Alley Stoughton on 22 February 2018, 17:20:48 UTC
Reworking specification of current provers.
Tip revision: 1ca374d
myocamlbuild.ml
open Ocamlbuild_plugin

let _ = dispatch begin function
   | After_options ->
       Options.ocamlc   := S[!Options.ocamlc  ; A"-rectypes"];
       Options.ocamlopt := S[!Options.ocamlopt; A"-rectypes"];

   | After_rules ->
       (* Numerical warnings *)
       begin
         let wflag error mode wid =
           let mode = match mode with
             | `Enable  -> "+"
             | `Disable -> "-"
             | `Mark    -> "@"
           in
             match error with
             | false -> S[A"-w"; A(Printf.sprintf "%s%d" mode wid)]
             | true  -> S[A"-warn-error"; A(Printf.sprintf "%s%d" mode wid)]
         in
           for i = 1 to 59 do
             flag ["ocaml"; "compile"; Printf.sprintf "warn_+%d" i] & (wflag false `Enable  i);
             flag ["ocaml"; "compile"; Printf.sprintf "warn_-%d" i] & (wflag false `Disable i);
             flag ["ocaml"; "compile"; Printf.sprintf "warn_@%d" i] & (wflag false `Mark    i);
             flag ["ocaml"; "compile"; Printf.sprintf "werr_+%d" i] & (wflag true  `Enable  i);
             flag ["ocaml"; "compile"; Printf.sprintf "werr_-%d" i] & (wflag true  `Disable i);
             flag ["ocaml"; "compile"; Printf.sprintf "werr_@%d" i] & (wflag true  `Mark    i)
           done
       end;

       (* menhir & --explain/--trace/--table *)
       flag ["ocaml"; "parser"; "menhir"; "menhir_explain"] & A"--explain";
       flag ["ocaml"; "parser"; "menhir"; "menhir_trace"  ] & A"--trace";
       flag ["ocaml"; "parser"; "menhir"; "menhir_table"  ] & A"--table";

       (* Threads switches *)
       flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]);
       flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]);

       (* Bisect *)
       flag ["ocaml"; "compile" ;  "bisect"] & S[A"-package"; A"bisect"];
       flag ["ocaml"; "compile" ;  "bisect"] & S[A"-syntax" ; A"camlp4o"];
       flag ["ocaml"; "compile" ;  "bisect"] & S[A"-syntax" ; A"bisect_pp"];
       flag ["ocaml"; "ocamldep";  "bisect"] & S[A"-package"; A"bisect"];
       flag ["ocaml"; "ocamldep";  "bisect"] & S[A"-syntax" ; A"camlp4o"];
       flag ["ocaml"; "ocamldep";  "bisect"] & S[A"-syntax" ; A"bisect_pp"];
       flag ["ocaml"; "link"    ;  "bisect"] & S[A"-package"; A"bisect"];

       (* Lint switches *)
       flag ["ocaml"; "lint"; "compile"] (S[A "-ppx"; A "../lint/ppx_lint.native"])

   | _ -> ()
end
back to top