X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=ocaml%2Flambda4.ml;fp=ocaml%2Flambda4.ml;h=90a91e048b26c88a403f5de22103581f8497cb89;hb=f1873841a3271d332cb8429b46e7bc7e0bca2402;hp=9395daa7e0998eca7c8f9bd2a3ccca8be25f164e;hpb=3ba5ecfc8372d4c9f380bad5cdf7387f2bbcea6a;p=fireball-separation.git diff --git a/ocaml/lambda4.ml b/ocaml/lambda4.ml index 9395daa..90a91e0 100644 --- a/ocaml/lambda4.ml +++ b/ocaml/lambda4.ml @@ -719,3 +719,14 @@ let problem_of (label, div, conv, ps, var_names) = [ ref (Array.to_list (Array.init (List.length ps) (fun i -> i, dummy))) ] in {freshno; div; conv; ps; sigma=[]; deltas; initialSpecialK; var_names; label} ;; + +(* assert_depends solves the problem, and checks if the result was expected *) +let assert_depends x = + let c = String.sub (label_of_problem x) 0 1 in + match solve x with + | `Unseparable s when c = "!" -> + failwith ("assert_depends: unseparable because: " ^ s ^ ".") + | `Separable _ when c = "?" -> + failwith ("assert_depends: separable.") + | _ -> () in +Problems.main (assert_depends ++ problem_of);