Commit b9a92229 authored by Andre Maroneze's avatar Andre Maroneze 💬
Browse files

several updates related to newer OCaml compiler version

parent 71e0ab5d
......@@ -33,7 +33,6 @@ fi
OCAML_VERSION=$(ocamlc -version)
case $OCAML_VERSION in
4.05*|4.06*|4.07*) DYNLINK='load_printer "dynlink.cma"';;
4.08*)
echo "impossible to load dynlink in ocamldebug for version $OCAML_VERSION";
echo "pretty-printers will not be loaded";
......
......@@ -511,8 +511,9 @@ module Make (V : module type of Offsetmap_lattice_with_isotropy) = struct
let abs_max = max +~ o in
let now = f (o, abs_max) (v, m, r) pre in
let no, nt, nz =
try move_right o t z
with End_reached -> (* Use match ... with exception in 4.02 *)
match move_right o t z with
| t -> t
| exception End_reached ->
abs_max, Empty, z (* End the recursion at next iteration *)
in
aux_fold no nt nz now
......
......@@ -28,8 +28,7 @@ module P = Plugin.Register
let help = "Executable ANSI/ISO C Specification Language --- runtime \
assertion checker generator"
end)
module PP = P (* [PP] required to avoid an ocamldoc error in OCaml 4.02 *)
include PP
include P
module Run =
False
......
......@@ -94,7 +94,6 @@ let section_stubs env =
in
let stubbed_kf = List.filter Kernel_function.is_definition stubbed_kf in
let opt = Dynamic.Parameter.String.get "-eva-use-spec" () in
(* NB: requires OCaml >= 4.04 *)
let l = String.split_on_char ',' opt in
let use_spec =
Extlib.filter_map
......
......@@ -329,10 +329,7 @@ let get stmt_zones stmt =
let pretty fmt stmt_zones =
let pp s d = Format.fprintf fmt "Stmt:%d -> %a@." s.sid Data.pretty d in
(* Sort output so that it does not depend on the OCaml hash function.
Can be removed when OCaml 4.01 is mandatory *)
let sorted = Stmt.Hashtbl.fold Stmt.Map.add stmt_zones Stmt.Map.empty in
Stmt.Map.iter pp sorted
Stmt.Hashtbl.iter_sorted pp stmt_zones
(*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*)
......
......@@ -1320,8 +1320,7 @@ struct
(* --- WPO Grouper --- *)
(* -------------------------------------------------------------------------- *)
(* NOTE: bug in ocamldoc in OCaml 4.02 prevents usage of 'P' here *)
module PMAP = Map.Make(WpPropId.PropId)
module PMAP = Map.Make(P)
type group = {
mutable verifs : VC_Annot.t Bag.t ;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment