CCSDS 502.0-B-3 Orbit Ephemeris Message parser and interpolator
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 -59
+2 -8
fuzz/dune
··· 1 1 (executable 2 2 (name fuzz) 3 3 (modules fuzz fuzz_oem) 4 - (libraries oem crowbar)) 5 - 6 - (executable 7 - (name gen_corpus) 8 - (modules gen_corpus) 9 - (libraries fmt unix)) 4 + (libraries oem alcobar)) 10 5 11 6 (rule 12 7 (alias runtest) ··· 21 16 (= %{profile} afl)) 22 17 (deps 23 18 (source_tree corpus) 24 - fuzz.exe 25 - gen_corpus.exe) 19 + fuzz.exe) 26 20 (action 27 21 (echo "AFL fuzzer built: %{exe:fuzz.exe}\n")))
+1 -1
fuzz/fuzz.ml
··· 1 - let () = Crowbar.run "oem" [ Fuzz_oem.suite ] 1 + let () = Alcobar.run "oem" [ Fuzz_oem.suite ]
+1 -1
fuzz/fuzz_oem.ml
··· 10 10 2. Successfully parsed OEM can always be interpolated without crash 11 11 3. Pretty-printer never crashes *) 12 12 13 - open Crowbar 13 + open Alcobar 14 14 15 15 let truncate ?(max_len = 2048) buf = 16 16 if String.length buf > max_len then String.sub buf 0 max_len else buf
+1 -1
fuzz/fuzz_oem.mli
··· 3 3 Tests crash safety on arbitrary KVN input and interpolation 4 4 with degenerate data. *) 5 5 6 - val suite : string * Crowbar.test_case list 6 + val suite : string * Alcobar.test_case list 7 7 (** [suite] is the OEM fuzz test suite. *)
-48
fuzz/gen_corpus.ml
··· 1 - (*--------------------------------------------------------------------------- 2 - Copyright (c) 2025 Thomas Gazagnaire. All rights reserved. 3 - SPDX-License-Identifier: ISC 4 - ---------------------------------------------------------------------------*) 5 - 6 - (** Generate seed corpus for AFL fuzzing of OEM parsing. *) 7 - 8 - let write_seed dir name content = 9 - let oc = open_out (Filename.concat dir name) in 10 - output_string oc content; 11 - close_out oc 12 - 13 - let () = 14 - let dir = "corpus" in 15 - (try Unix.mkdir dir 0o755 with Unix.Unix_error (Unix.EEXIST, _, _) -> ()); 16 - (* Minimal valid OEM *) 17 - write_seed dir "minimal" 18 - {|CCSDS_OEM_VERS = 2.0 19 - CREATION_DATE = 2025-01-01 20 - ORIGINATOR = TEST 21 - 22 - META_START 23 - OBJECT_NAME = SAT 24 - OBJECT_ID = 2025-001A 25 - CENTER_NAME = EARTH 26 - REF_FRAME = EME2000 27 - TIME_SYSTEM = UTC 28 - START_TIME = 2025-01-01T00:00:00 29 - STOP_TIME = 2025-01-01T00:01:00 30 - META_STOP 31 - 32 - 2025-01-01T00:00:00.000 7000.0 0.0 0.0 0.0 7.5 0.0 33 - 2025-01-01T00:01:00.000 6998.0 450.0 0.0 -0.5 7.4 0.0 34 - |}; 35 - (* Empty file *) 36 - write_seed dir "empty" ""; 37 - (* Header only *) 38 - write_seed dir "header_only" 39 - "CCSDS_OEM_VERS = 3.0\nCREATION_DATE = 2025-01-01\nORIGINATOR = X\n"; 40 - (* Malformed data *) 41 - write_seed dir "bad_data" 42 - {|CCSDS_OEM_VERS = 2.0 43 - META_START 44 - META_STOP 45 - not a valid line 46 - 1 2 3 47 - |}; 48 - Fmt.pr "Generated 4 seed files in %s/@." dir