From 0db1d850b940a5f2351c1ec6e26d1f8087064d40 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Thu, 8 May 2014 16:40:48 +0200 Subject: Moving Dnet-related code to tactics/. --- tactics/term_dnet.mli | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 tactics/term_dnet.mli (limited to 'tactics/term_dnet.mli') diff --git a/tactics/term_dnet.mli b/tactics/term_dnet.mli new file mode 100644 index 000000000..7825ebdf1 --- /dev/null +++ b/tactics/term_dnet.mli @@ -0,0 +1,88 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* t -> int + + (** how to substitute them for storage *) + val subst : substitution -> t -> t + + (** how to recover the term from the identifier *) + val constr_of : t -> constr +end + +(** Options : *) +module type OPT = sig + + (** pre-treatment to terms before adding or searching *) + val reduce : constr -> constr + + (** direction of post-filtering w.r.t sort subtyping : + - true means query <= terms in the structure + - false means terms <= query + *) + val direction : bool +end + +module type S = +sig + type t + type ident + + val empty : t + + (** [add c i dn] adds the binding [(c,i)] to [dn]. [c] can be a + closed term or a pattern (with untyped Evars). No Metas accepted *) + val add : constr -> ident -> t -> t + + (** merge of dnets. Faster than re-adding all terms *) + val union : t -> t -> t + + val subst : substitution -> t -> t + + (* + * High-level primitives describing specific search problems + *) + + (** [search_pattern dn c] returns all terms/patterns in dn + matching/matched by c *) + val search_pattern : t -> constr -> ident list + + (** [find_all dn] returns all idents contained in dn *) + val find_all : t -> ident list + + val map : (ident -> ident) -> t -> t +end + +module Make : + functor (Ident : IDENT) -> + functor (Opt : OPT) -> + S with type ident = Ident.t -- cgit v1.2.3