Module TermAttr

Attributes for annotated terms

An attribute is currently only a name for a term.

author
Christoph Sticksel

Types and hash-consing

type t

Hashconsed attribute

Hashtables, maps and sets

val compare_attrs : t -> t -> int

Comparison function on attributes

val equal_attrs : t -> t -> bool

Equality function on attributes

val hash_attr : t -> int

Hashing function on attribute

module AttrHashtbl : Stdlib.Hashtbl.S with type AttrHashtbl.key = t

Hash table over attributes

module AttrSet : Stdlib.Set.S with type AttrSet.elt = t

Set over attributes

module AttrMap : Stdlib.Map.S with type AttrMap.key = t

Map over attributes

Constructor

val mk_named : string -> int -> t

Return a name attribute

val fundef : t

Return a fun-def attribute

Accessor functions

val is_named : t -> bool

Return true if the attribute is a name

val is_fundef : t -> bool

Return true if the attribute is a name

val named_of_attr : t -> string * int

Return the name in a name attribute, raises Invalid_argument for other attributes

Pretty-printing

val pp_print_attr : Stdlib.Format.formatter -> t -> unit

Pretty-print a hashconsed attribute

val print_attr : t -> unit

Pretty-print a hashconsed attribute to the standard formatter

val string_of_attr : t -> string

Return a string representation of a hashconsed attribute