AStat/analyzer.ml

34 lines
869 B
OCaml
Raw Normal View History

2024-05-29 11:47:47 +02:00
(*
Cours "Sémantique et Application à la Vérification de programmes"
Antoine Miné 2015
Marc Chevalier 2018
Josselin Giet 2021
Ecole normale supérieure, Paris, France / CNRS / INRIA
*)
open Iterator
(* parse filename *)
let doit filename = begin
let prog = File_parser.parse_file filename in
let cfg = Tree_to_cfg.prog prog in
if !Options.verbose then
Format.printf "%a" Cfg_printer.print_cfg cfg;
Cfg_printer.output_dot !Options.cfg_out cfg;
2024-06-01 19:35:36 +02:00
let f = match !Options.domain with
| "signs" -> SignIterator.iterate cfg
2024-06-01 20:58:56 +02:00
| "interval" -> IntervalIterator.iterate cfg
2024-06-01 19:35:36 +02:00
| "constants" -> ConstIterator.iterate cfg
| _ -> ConstIterator.iterate cfg in
Format.printf "@[<v 0>Failed asserts :@ %a@]" pp_asserts f end
2024-05-29 11:47:47 +02:00
(* parses arguments to get filename *)
let main () =
let _ = Options.init () in
doit !Options.file
let _ = main ();