Module Dnet.Make
Parameters
Signature
type ttype ident= Ident.tprovided identifier type
type meta= Meta.tprovided metavariable type
type 'a structure= 'a T.tprovided parametrized datastructure
type term_pattern=|Term of term_pattern structure|Meta of metaa pattern is a term where each node can be a unification variable
val empty : tval add : t -> term_pattern -> ident -> tadd t w iadds a new association (w,i) in t.
val fold_pattern : ('a -> (Idset.t * meta * t) -> 'a) -> 'a -> term_pattern -> t -> Idset.t option * 'afold_pattern f acc p dnfolds f on each meta of p, passing the meta and the sub-dnet under it. The result includes:- Some set if identifiers were gathered on the leafs of the term
- None if the pattern contains no leaf (only Metas at the leafs).
val find_match : term_pattern -> t -> Idset.tfind_match p treturns identifiers of all terms matching p in t.