35 lines
1.3 KiB
OCaml
35 lines
1.3 KiB
OCaml
(*
|
|
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;
|
|
let f = match !Options.domain with
|
|
| "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
|
|
| _ -> failwith "No valid iterator specified" in
|
|
Format.printf "@[<v 0>Failed asserts :@ %a@]" pp_asserts f end
|
|
|
|
|
|
(* parses arguments to get filename *)
|
|
let main () =
|
|
let _ = Options.init () in
|
|
doit !Options.file
|
|
|
|
let _ = main ();
|