summaryrefslogtreecommitdiff
path: root/tactics/dn.mli
diff options
context:
space:
mode:
authorGravatar Samuel Mimram <samuel.mimram@ens-lyon.org>2004-07-28 21:54:47 +0000
committerGravatar Samuel Mimram <samuel.mimram@ens-lyon.org>2004-07-28 21:54:47 +0000
commit6b649aba925b6f7462da07599fe67ebb12a3460e (patch)
tree43656bcaa51164548f3fa14e5b10de5ef1088574 /tactics/dn.mli
Imported Upstream version 8.0pl1upstream/8.0pl1
Diffstat (limited to 'tactics/dn.mli')
-rw-r--r--tactics/dn.mli40
1 files changed, 40 insertions, 0 deletions
diff --git a/tactics/dn.mli b/tactics/dn.mli
new file mode 100644
index 00000000..a54007d8
--- /dev/null
+++ b/tactics/dn.mli
@@ -0,0 +1,40 @@
+(************************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(************************************************************************)
+
+(*i $Id: dn.mli,v 1.4.16.1 2004/07/16 19:30:52 herbelin Exp $ i*)
+
+(* Discrimination nets. *)
+
+type ('lbl,'tree) decompose_fun = 'tree -> ('lbl * 'tree list) option
+
+type ('lbl,'pat,'inf) t (* = (('lbl * int) option,'pat * 'inf) Tlm.t *)
+
+val create : unit -> ('lbl,'pat,'inf) t
+
+(* [add t f (tree,inf)] adds a structured object [tree] together with
+ the associated information [inf] to the table [t]; the function
+ [f] is used to translated [tree] into its prefix decomposition: [f]
+ must decompose any tree into a label characterizing its root node and
+ the list of its subtree *)
+
+val add : ('lbl,'pat,'inf) t -> ('lbl,'pat) decompose_fun -> 'pat * 'inf
+ -> ('lbl,'pat,'inf) t
+
+val rmv : ('lbl,'pat,'inf) t -> ('lbl,'pat) decompose_fun -> 'pat * 'inf
+ -> ('lbl,'pat,'inf) t
+
+(* [lookup t f tree] looks for trees (and their associated
+ information) in table [t] such that the structured object [tree]
+ matches against them; [f] is used to translated [tree] into its
+ prefix decomposition: [f] must decompose any tree into a label
+ characterizing its root node and the list of its subtree *)
+
+val lookup : ('lbl,'pat,'inf) t -> ('lbl,'term) decompose_fun -> 'term
+ -> ('pat * 'inf) list
+
+val app : (('pat * 'inf) -> unit) -> ('lbl,'pat,'inf) t -> unit