From d09af1d5ca8bb610cec40918b23be67ba6f9673f Mon Sep 17 00:00:00 2001 From: barras Date: Mon, 21 Apr 2008 16:54:38 +0000 Subject: added the .vo checker (with independent Makefile) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10826 85f007b7-540e-0410-9357-904b9bb8a0f7 --- checker/inductive.mli | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 checker/inductive.mli (limited to 'checker/inductive.mli') diff --git a/checker/inductive.mli b/checker/inductive.mli new file mode 100644 index 000000000..8e6d4ffb9 --- /dev/null +++ b/checker/inductive.mli @@ -0,0 +1,85 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* constr -> inductive * constr list + +type mind_specif = mutual_inductive_body * one_inductive_body + +(*s Fetching information in the environment about an inductive type. + Raises [Not_found] if the inductive type is not found. *) +val lookup_mind_specif : env -> inductive -> mind_specif + +val type_of_inductive : env -> mind_specif -> constr + +(* Return type as quoted by the user *) +val type_of_constructor : constructor -> mind_specif -> constr + +val arities_of_specif : mutual_inductive -> mind_specif -> constr array + +(* [type_case_branches env (I,args) (p:A) c] computes useful types + about the following Cases expression: +

Cases (c :: (I args)) of b1..bn end + It computes the type of every branch (pattern variables are + introduced by products) and the type for the whole expression. + *) +val type_case_branches : + env -> inductive * constr list -> constr * constr -> constr + -> constr array * constr + +(* Check a [case_info] actually correspond to a Case expression on the + given inductive type. *) +val check_case_info : env -> inductive -> case_info -> unit + +(*s Guard conditions for fix and cofix-points. *) +val check_fix : env -> fixpoint -> unit +val check_cofix : env -> cofixpoint -> unit + +(*s Support for sort-polymorphic inductive types *) + +val type_of_inductive_knowing_parameters : + env -> one_inductive_body -> constr array -> constr + +val max_inductive_sort : sorts array -> Univ.universe + +val instantiate_universes : env -> rel_context -> + polymorphic_arity -> constr array -> rel_context * sorts + +(***************************************************************) +(* Debug *) + +type size = Large | Strict +type subterm_spec = + Subterm of (size * wf_paths) + | Dead_code + | Not_subterm +type guard_env = + { env : env; + (* dB of last fixpoint *) + rel_min : int; + (* inductive of recarg of each fixpoint *) + inds : inductive array; + (* the recarg information of inductive family *) + recvec : wf_paths array; + (* dB of variables denoting subterms *) + genv : subterm_spec list; + } + +val subterm_specif : guard_env -> constr -> subterm_spec +val case_branches_specif : guard_env -> subterm_spec -> inductive -> + constr array -> (guard_env * constr) array -- cgit v1.2.3