Skip to content
Snippets Groups Projects
Commit 5736aabb authored by Hans-Peter Deifel's avatar Hans-Peter Deifel :turtle:
Browse files

Replace Array.exists by Array.fold_left

Array.exists is only available since OCaml 4.03.0 and we need to
support version at least version 4.02.3.
parent c4aee922
No related branches found
No related tags found
No related merge requests found
......@@ -94,9 +94,12 @@ let verbose = ref false
let choiceSat () =
let verb = !verbose in
let sorts = (FE.sortTableFromString Sys.argv.(2)) in
if Array.exists (fun (func,_) -> func == CM.GML || func == CM.PML) sorts then
(* test if GML or PML occurs in sort table *)
if Array.fold_left (fun x (func,_) -> x || func == CM.GML || func == CM.PML) false sorts then
raise (CF.CoAlgException "GML and PML are currently not supported")
else ();
let printRes sat =
if not verb then
print_endline (if sat then "satisfiable\n" else "unsatisfiable\n")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment