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 (* assert_depends solves the problem, and checks if the result was expected *)
21 let assert_depends x =
22 let c = String.sub (label_of_problem (fst x)) 0 1 in
24 | _, `Unseparable s when c = "!" ->
25 failwith ("assert_depends: unseparable because: " ^ s ^ ".")
26 | _, `Separable _ when c = "?" ->
27 failwith ("assert_depends: separable.")
32 (* div under a lambda in conv *)
34 if Array.length Sys.argv = 1
35 then failwith "no command line args. Please use e.g. ./a.out problems/*"
36 else Array.iteri (fun i filename -> if i > 0 then
37 List.iter (assert_depends ++ problem_of) (Parser.from_file filename)