package term-indexing

  1. Overview
  2. Docs
type 'prim term = 'prim desc Hashcons.hash_consed

The type of hash-consed terms

and 'prim desc = private
  1. | Prim of 'prim * 'prim term array * Int_option.t
    (*

    Prim (prim, ts, ub) represents a term with head symbol equal to prim and subterms ts. ub is equal to Int_option.none if the term is ground. Otherwise, ub is an upper bound on the value of variables contained in ts.

    *)
  2. | Var of int
    (*

    Var v is a variable equal to v.

    *)
val fold : ('a term -> Path.t -> 'b -> 'b) -> 'b -> 'a term -> 'b
exception Get_subterm_oob of Path.forward * int
module Make_hash_consed (P : Intf.Signature) (M : Intf.Map with type key = int) : Intf.Term with type prim = P.t and type t = P.t term and type 'a var_map = 'a M.t

The following functor instantiates a module to manipulate hash-consed terms over the signature P, using an implementation of persistent maps given by M.

module Default_map : Intf.Map with type key = int

Default_map is a reasonable implementation of Intf.Map usable with Make_hash_consed

OCaml

Innovation. Community. Security.