Bloom filter for probabilistic membership testing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Migrate from vendored crowbar to opam-pinned alcobar

- Remove vendored crowbar/ directory
- Replace all Crowbar references with Alcobar across 176 .ml files
- Update all fuzz dune files: crowbar → alcobar in libraries
- Remove 77 gen_corpus.ml files (alcobar handles corpus internally)
- Update dune-project files: crowbar → alcobar in dependencies
- Update merlint rules (e705, e726): Crowbar → Alcobar in checks,
docs, and examples
- Update merlint generated docs (index.html)

428 files changed, ~1200 lines removed net.

+5 -38
+2 -8
fuzz/dune
··· 1 1 (executable 2 2 (name fuzz) 3 3 (modules fuzz fuzz_bloom) 4 - (libraries bloom crowbar)) 4 + (libraries bloom alcobar)) 5 5 6 6 ; Quick check with Crowbar (no AFL instrumentation) 7 7 ··· 21 21 (= %{profile} afl)) 22 22 (deps 23 23 (source_tree corpus) 24 - fuzz.exe 25 - gen_corpus.exe) 24 + fuzz.exe) 26 25 (action 27 26 (echo "AFL fuzzer built: %{exe:fuzz.exe}\n"))) 28 - 29 - (executable 30 - (name gen_corpus) 31 - (modules gen_corpus) 32 - (libraries bloom unix))
+1 -1
fuzz/fuzz.ml
··· 1 - let () = Crowbar.run "bloom" [ Fuzz_bloom.suite ] 1 + let () = Alcobar.run "bloom" [ Fuzz_bloom.suite ]
+1 -1
fuzz/fuzz_bloom.ml
··· 1 1 (** Fuzz tests for Bloom filter module. *) 2 2 3 - open Crowbar 3 + open Alcobar 4 4 5 5 (** No false negatives - after adding an element, mem must return true. *) 6 6 let test_no_false_negatives seed elts =
+1 -1
fuzz/fuzz_bloom.mli
··· 1 1 (** Fuzz tests for {\!Bloom}. *) 2 2 3 - val suite : string * Crowbar.test_case list 3 + val suite : string * Alcobar.test_case list 4 4 (** Test suite. *)
-27
fuzz/gen_corpus.ml
··· 1 - (** Generate seed corpus for fuzz testing. *) 2 - 3 - let () = 4 - (try Unix.mkdir "corpus" 0o755 5 - with Unix.Unix_error (Unix.EEXIST, _, _) -> ()); 6 - let write name data = 7 - let oc = open_out_bin (Filename.concat "corpus" name) in 8 - output_string oc data; 9 - close_out oc 10 - in 11 - (* Simple strings that would be added to a bloom filter *) 12 - write "seed_000" "hello"; 13 - write "seed_001" "world"; 14 - write "seed_002" ""; 15 - write "seed_003" (String.make 256 'x'); 16 - (* Binary patterns *) 17 - write "seed_004" "\x00\x00\x00\x00"; 18 - write "seed_005" "\xFF\xFF\xFF\xFF"; 19 - (* Serialized bloom filter bytes - create a small one and serialize it *) 20 - let bf = Bloom.v ~error_rate:0.01 100 in 21 - Bloom.add bf "test"; 22 - Bloom.add bf "fuzz"; 23 - write "seed_006" (Bytes.to_string (Bloom.to_bytes bf)); 24 - (* Empty bloom filter serialized *) 25 - let bf_empty = Bloom.v ~error_rate:0.1 10 in 26 - write "seed_007" (Bytes.to_string (Bloom.to_bytes bf_empty)); 27 - print_endline "gen_corpus: wrote 8 bloom seed files"