• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

formalsec / instrumentation2 / 30

02 Jul 2024 03:27PM UTC coverage: 65.0% (+1.4%) from 63.636%
30

push

github

filipeom
Fix CI

13 of 20 relevant lines covered (65.0%)

9.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

65.0
/src/main.ml
1
open I2
2
open Cmdliner
3

4
let symbolic debug taint_summary file output =
5
  if debug then Logs.set_level (Some Debug);
×
6
  match Run.run ?file ~config:taint_summary ~output () with
17✔
7
  | Ok _n -> 0
17✔
8
  | Error err ->
×
9
    Format.eprintf "unexpected error: %a@." Result.pp err;
10
    Result.to_code err
×
11

12
let literal debug taint_summary file witness output =
13
  if debug then Logs.set_level (Some Debug);
×
14
  match Run.literal ?file taint_summary witness output with
1✔
15
  | Ok _n -> 0
1✔
16
  | Error err ->
×
17
    Format.eprintf "unexpected error: %a@." Result.pp err;
18
    Result.to_code err
×
19

20
let debug =
21
  let doc = "debug mode" in
22
  Arg.(value & flag & info [ "debug" ] ~doc)
18✔
23

24
let taint_summary =
25
  let doc = "taint summary" in
26
  Arg.(required & pos 0 (some non_dir_file) None & info [] ~docv:"SUMM" ~doc)
18✔
27

28
let file =
29
  let doc = "normalized file" in
30
  Arg.(value & pos 1 (some non_dir_file) None & info [] ~docv:"FILE" ~doc)
18✔
31

32
let witness =
33
  let doc = "witness file" in
34
  Arg.(required & opt (some string) None & info [ "witness" ] ~doc)
18✔
35

36
let output =
37
  let doc = "output file" in
38
  Arg.(value & opt string "symbolic_test" & info [ "output"; "o" ] ~doc)
18✔
39

40
let cmd_symbolic =
41
  let info = Cmd.info "symbolic" in
42
  Cmd.v info Term.(const symbolic $ debug $ taint_summary $ file $ output)
18✔
43

44
let cmd_literal =
45
  let info = Cmd.info "literal" in
46
  Cmd.v info
18✔
47
    Term.(const literal $ debug $ taint_summary $ file $ witness $ output)
18✔
48

49
let cmd =
50
  let doc = "Instrumentor2" in
51
  let man =
52
    [ `S Manpage.s_bugs
53
    ; `P "Report them in https://github.com/formalsec/instrumentation2/issues"
54
    ]
55
  in
56
  let info = Cmd.info "instrumentation2" ~version:"%%VERSION%%" ~doc ~man in
57
  Cmd.group info [ cmd_symbolic; cmd_literal ]
18✔
58

59
let () = exit @@ Cmd.eval' cmd
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc