1 (* Copyright (C) 2004, HELM Team.
3 * This file is part of HELM, an Hypertextual, Electronic
4 * Library of Mathematics, developed at the Computer Science
5 * Department, University of Bologna, Italy.
7 * HELM is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * HELM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with HELM; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 * For details, see the HELM World-Wide-Web page,
23 * http://helm.cs.unibo.it/
26 exception Meta_not_found of int
27 exception Subst_not_found of int
29 val lookup_meta: int -> Cic.metasenv -> Cic.conjecture
30 val lookup_subst: int -> Cic.substitution -> Cic.context * Cic.term * Cic.term
31 val exists_meta: int -> Cic.metasenv -> bool
32 val clean_up_local_context :
33 Cic.substitution -> Cic.metasenv -> int -> (Cic.term option) list
34 -> (Cic.term option) list
36 val is_closed : Cic.term -> bool
37 val is_meta_closed : Cic.term -> bool
39 (** @raise Failure "not enough prods" *)
40 val strip_prods: int -> Cic.term -> Cic.term
42 (** conversions between terms which are fully representable as uris (Var, Const,
43 * Mutind, and MutConstruct) and corresponding tree representations *)
44 val term_of_uri: string -> Cic.term (** @raise UriManager.IllFormedUri *)
45 val uri_of_term: Cic.term -> string (** @raise Invalid_argument "uri_of_term" *)
47 (** packing/unpacking of several terms into a single one *)
48 val pack: Cic.term list -> Cic.term
49 val unpack: Cic.term -> Cic.term list
51 (** {2 Cic selectors} *)
53 val params_of_obj: Cic.obj -> UriManager.uri list
54 val attributes_of_obj: Cic.obj -> Cic.attribute list
57 * A context is a Cic term in which Cic.Implicit terms annotated with `Hole
60 (** create a context from a term and a list of subterm.
61 * @param equality equality function used while walking the term. Defaults to
62 * physical equality (==) *)
64 ?equality:(Cic.term -> Cic.term -> bool) -> term:Cic.term -> Cic.term list ->
67 (** select all subterms of a given term matching a given context (i.e. subtrees
68 * rooted at context's holes *)
69 val select: term:Cic.term -> context:Cic.term -> Cic.term list
71 (** mk_rels [howmany] [from]
72 * creates a list of [howmany] rels starting from [from] in decreasing order *)
73 val mk_rels : int -> int -> Cic.term list