4 (* Syntax for problem files in problem/ folder:
6 - dollar ($) on newline
8 $! means that the problem is expected to be separable,
9 $? means that it is expected to be unseparable
14 - (D) (C) (N) stand respectively for divergent, convergent, numeric
16 - lines starting with spaces inherit the type from the last line
20 let assert_separable x =
22 | _, `Separable _ -> ()
23 | _, `Unseparable s ->
24 failwith ("assert_separable: unseparable because: " ^ s ^ ".")
27 let assert_unseparable x =
29 | _, `Unseparable _ -> ()
31 failwith ("assert_unseparable: separable.")
34 let assert_depends x =
35 let c = String.sub (Lambda4.label_of_problem (fst x)) 0 1 in
36 if c = "!" then assert_separable x
37 else if c = "?" then assert_unseparable x
42 (* div under a lambda in conv *)
44 if Array.length Sys.argv = 1
45 then failwith "no command line args. Please use e.g. ./a.out problems/*"
46 else Array.iteri (fun i filename -> if i > 0 then
47 List.iter (assert_depends ++ Lambda4.tmp) (Parser.from_file filename)