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
|
2024-06-08 21:54:06 +02:00
|
|
|
| "signs" -> if !Options.disjunction then SignDisjIterator.iterate cfg else SignIterator.iterate cfg
|
|
|
|
| "interval" -> if !Options.disjunction then IntervalDisjIterator.iterate cfg else IntervalIterator.iterate cfg
|
|
|
|
| "constants" -> if !Options.disjunction then ConstDisjIterator.iterate cfg else ConstIterator.iterate cfg
|
|
|
|
| "congruence" ->if !Options.disjunction then CongDisjIterator.iterate cfg else CongIterator.iterate cfg
|
|
|
|
| "product" -> if !Options.disjunction then RPDisjIterator.iterate cfg else RPIterator.iterate cfg
|
2024-06-08 10:48:13 +02:00
|
|
|
| _ -> failwith "No valid iterator specified" in
|
2024-06-01 19:35:36 +02:00
|
|
|
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 ();
|