package term-indexing
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=9ba5dcf909fde539e173daf8f13abffd
sha512=e84fb1104c420db346181416a1e95e60aeb1b757ed7456a6028a6dfd5096bb7888af7c1ad6ea1acb25e99318e86d1f75c82a072bbdc3ba8218e5b16778199dfe
doc/term-indexing/Term_indexing/Pattern/Make/argument-2-T/index.html
Parameter Make.T
include Intf.Term_core with type prim = P.t with type t = P.t Term.term
type prim = P.tThe type of primitives, i.e. the symbols. Each value of type prim has a definite arity.
val pp_sexp : Format.formatter -> t -> unitPretty-printing of terms in s-exp format.
prim p ts constructs a term with head equal to p and subterms equal to ts
Raises Invalid_argument if the length of ts does not match the arity of p.
destruct t ifprim ifvar performs case analysis on the term t
is_var t is equal to var v if equal t (var v) or None if it is not the case
val get_subterm_fwd : t -> Path.forward -> tget_subterm_fwd t fpth is the subterm of t at position defined by the forward path fpth.
Raises Get_subterm_oob if the path is out of bounds.
include Intf.Hashed with type t := t
val hash : t -> inthash s is a hash of s.
val pp : Format.formatter -> t -> unitpp fmt s prints a representation of s to the formatter fmt.
val ub : t -> Int_option.tub t is an upper bound on the absolute value of variables contained in t. Equal to Int_option.none if t does not contain variables.
map_variables f t replaces all variables var i present in t by f i.
get_subterm t pth is the subterm of t at position defined by the path pth.
Raise Get_subterm_oob if the path is out of bounds.
subst ~term ~path f replaces the subterm of term at position path by f (get_subterm term path).
fold_variables f acc t folds f over the variables of t
canon t gen canonicalizes the term t using the variable generator gen. Returns the canonicalized term as well as a map from old to canonicalized variables.
val uid : t -> intuid t returns a unique integer attached to t. It is guaranteed that if two terms have the same uid, they are equal.