Revision 9e114126d5961fa73a21372b8a44f64723d79242 authored by François Dupressoir on 16 January 2020, 20:48:25 UTC, committed by François Dupressoir on 16 January 2020, 20:48:25 UTC
This pushes several complex low-level arguments related to sampling in restricted distributions into the related distribution file. This also generalizes these arguments, so that: - TwoStepSampling no longer requires a full distribution, - WhileSampling takes distributions and tests as procedure arguments rather than clone parameters. Specialized versions of theories and lemmas that reproduce the old behaviours are also included. The Dice_Sampling theory is removed, replaced with Dexcepted.WhileSamplingFixedTest (an abstract theory). Squashed commit of the following: commit e4bf1725f2a327bc58dda51d0079acb8dbb8fb1a Author: François Dupressoir <fdupress@gmail.com> Date: Thu Jan 16 20:40:23 2020 +0000 trailing white space in modified files commit 12d5ff0ae8607be10f7e925d1f0d44dd8e78dbde Author: François Dupressoir <fdupress@gmail.com> Date: Thu Dec 19 15:49:41 2019 +0000 minor cleanup commit 7921a24e13e9f6d19ad02c0a22e8efb49bc37184 Author: François Dupressoir <fdupress@gmail.com> Date: Thu Dec 19 13:47:19 2019 +0000 More general ways of sampling out of a predicate TwoStep no longer requires losslessness. More sharing of proof could be obtained commit 393700f85b47b9d373be983b1451b08ae3d3be94 Author: François Dupressoir <fdupress@gmail.com> Date: Thu Dec 5 21:40:16 2019 +0000 PRP<->PRF uses generic resampling commit 74b9aef924cc313e358510ab9f83bc7410489db4 Author: François Dupressoir <fdupress@gmail.com> Date: Thu Dec 5 21:27:12 2019 +0000 Slight generalization: no longer need a full distribution commit 0853fc0e313bb6adac0ad956417480ebd70f512f Author: François Dupressoir <fdupress@gmail.com> Date: Thu Dec 5 18:34:43 2019 +0000 Dexcepted: equivalence between two ways of sampling used in PRP<->PRF, but also in a current proof TODO: make PRP<->PRF use this
1 parent cd341ca
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
Computing file changes ...