summaryrefslogtreecommitdiff
path: root/tactics/nbtermdn.mli
blob: 652ff4f420be93d56db4e7438f6ae0aa39720a4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010     *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)

open Term
open Pattern
open Libnames

(** Named, bounded-depth, term-discrimination nets. *)
module Make :
  functor (Y:Map.OrderedType) ->
sig
  
  module Term_dn : sig     
    type term_label = 
      | GRLabel of global_reference
      | ProdLabel 
      | LambdaLabel
      | SortLabel
  end 
    
  type 'na t
  type 'na frozen_t
    
  val create : unit -> 'na t
    
  val add : 'na t -> ('na * (constr_pattern * Y.t)) -> unit
  val rmv : 'na t -> 'na -> unit
  val in_dn : 'na t -> 'na -> bool
  val remap : 'na t -> 'na -> (constr_pattern * Y.t) -> unit
    
  val lookup : 'na t -> constr -> (constr_pattern * Y.t) list
  val app : ('na -> (constr_pattern * Y.t) -> unit) -> 'na t -> unit
    
  val dnet_depth : int ref
    

  val freeze : 'na t -> 'na frozen_t
  val unfreeze : 'na frozen_t -> 'na t -> unit
  val empty : 'na t -> unit
  val to2lists : 'na t -> ('na * (constr_pattern * Y.t)) list * 
    (Term_dn.term_label option * Btermdn.Make(Y).t) list
end