From: Stefano Zacchiroli Date: Fri, 29 Oct 2004 12:21:39 +0000 (+0000) Subject: added test script for typechecking URIs given on STDIN X-Git-Tag: V_0_0_10~3 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=52f95aaf56e9f915b2e049db92a706bdc15c8867;p=helm.git added test script for typechecking URIs given on STDIN --- diff --git a/helm/gTopLevel/Makefile.in b/helm/gTopLevel/Makefile.in index 42dd44be1..4b44c3418 100644 --- a/helm/gTopLevel/Makefile.in +++ b/helm/gTopLevel/Makefile.in @@ -134,6 +134,10 @@ librarytest: testlibrary ./testlibrary -vars -varsprefix cic:/Coq index.txt 2>/dev/null >LOG librarytest.opt: testlibrary.opt ./testlibrary.opt -vars -varsprefix cic:/Coq index.txt 2>/dev/null >LOG +typecheck_uri: typecheck_uri.ml + $(OCAMLFIND) ocamlc -thread -package helm-cic_proof_checking -linkpkg -o $@ $< +typecheck_uri.opt: typecheck_uri.ml + $(OCAMLFIND) opt -thread -package helm-cic_proof_checking -linkpkg -o $@ $< MAIN = ./gTopLevel ARGS = diff --git a/helm/gTopLevel/typecheck_uri.ml b/helm/gTopLevel/typecheck_uri.ml new file mode 100644 index 000000000..e6df5cd61 --- /dev/null +++ b/helm/gTopLevel/typecheck_uri.ml @@ -0,0 +1,23 @@ + + +open Printf + +let _ = Helm_registry.load_from "gTopLevel.conf.xml" + +let test_uri uri = + (try + Printf.printf "%s ... " uri; + let uri = UriManager.uri_of_string uri in + flush stdout; + ignore (CicTypeChecker.typecheck uri); + print_endline "ok"; + with _ -> print_endline "failure"); + flush stdout + +let _ = + try + while true do + test_uri (input_line stdin) + done + with End_of_file -> () +