package term-indexing
Install
Dune Dependency
Authors
Maintainers
Sources
md5=9ba5dcf909fde539e173daf8f13abffd
sha512=e84fb1104c420db346181416a1e95e60aeb1b757ed7456a6028a6dfd5096bb7888af7c1ad6ea1acb25e99318e86d1f75c82a072bbdc3ba8218e5b16778199dfe
doc/term-indexing/Term_indexing/Pattern/Make/index.html
Module Pattern.Make
Source
Parameters
module P : Intf.Signature
Signature
The type of primitives, i.e. the symbols. Each value of type prim
has a definite arity.
The type of patterns.
The type of patterns on lists of terms.
pattern_matches patt t
checks whether the pattern patt
matches the term t
all_matches t matching
returns all paths at which there is a subterm satisfying matching
first_match t matching
returns the first paths, if any, where there is a subterm satisfying matching
.
If the matched pattern does not specify focused subterms, the result is at most a singleton list. If the matched pattern specifies focused subterms, the result is a list of paths, one for each focused subterm.
refine_focused patt paths
returns the refinements of path
that correspond to focused subterms of patt
. If patt
is does not specify focii, the result is the empty list.
prim p plist
is a pattern matching a term with head bearing a primitive p
and subterms matching the list pattern plist
.
prim_pred pred plist
is a pattern matching a term with primitive p
such that pred p
is true
, and subterms matching the list pattern plist
.
focus patt
returns a pattern equivalent to patt
except that a focus mark is added on all terms matched by patt
.
Raises Invalid_pattern
if t
is already a focus.
list_cons hd tl
is a list pattern matching a list with head matching the pattern hd
and tail matching the list pattern tl
.
Pattern pretty-printing