From 4490dfcb94057dd6518963a904565e3a4a354bac Mon Sep 17 00:00:00 2001 From: ppedrot Date: Mon, 29 Apr 2013 16:02:05 +0000 Subject: Splitting Term into five unrelated interfaces: 1. sorts.ml: A small file utility for sorts; 2. constr.ml: Really low-level terms, essentially kind_of_constr, smart constructor and basic operators; 3. vars.ml: Everything related to term variables, that is, occurences and substitution; 4. context.ml: Rel/Named context and all that; 5. term.ml: derived utility operations on terms; also includes constr.ml up to some renaming, and acts as a compatibility layer, to be deprecated. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16462 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/context.mli | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 kernel/context.mli (limited to 'kernel/context.mli') diff --git a/kernel/context.mli b/kernel/context.mli new file mode 100644 index 000000000..32efb743a --- /dev/null +++ b/kernel/context.mli @@ -0,0 +1,60 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* Constr.t) -> named_declaration -> named_declaration +val map_rel_declaration : + (Constr.t -> Constr.t) -> rel_declaration -> rel_declaration + +val fold_named_declaration : + (Constr.t -> 'a -> 'a) -> named_declaration -> 'a -> 'a +val fold_rel_declaration : + (Constr.t -> 'a -> 'a) -> rel_declaration -> 'a -> 'a + +val exists_named_declaration : + (Constr.t -> bool) -> named_declaration -> bool +val exists_rel_declaration : + (Constr.t -> bool) -> rel_declaration -> bool + +val for_all_named_declaration : + (Constr.t -> bool) -> named_declaration -> bool +val for_all_rel_declaration : + (Constr.t -> bool) -> rel_declaration -> bool + +val eq_named_declaration : + named_declaration -> named_declaration -> bool + +val eq_rel_declaration : + rel_declaration -> rel_declaration -> bool + +(** {6 Contexts of declarations referred to by de Bruijn indices } *) + +(** In [rel_context], more recent declaration is on top *) +type rel_context = rel_declaration list + +val empty_rel_context : rel_context +val add_rel_decl : rel_declaration -> rel_context -> rel_context + +val lookup_rel : int -> rel_context -> rel_declaration +(** Size of the [rel_context] including LetIns *) +val rel_context_length : rel_context -> int +(** Size of the [rel_context] without LetIns *) +val rel_context_nhyps : rel_context -> int -- cgit v1.2.3