package logtk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Hashconsed Variable

A variable for hashconsed terms, paired with a type. Such a 'ty HVar.t is really a pair (int, 'ty): the integer is used to be able to have several variables in the same clause, the type is because in typed logic we must know the type of variables before unifying/binding them.

type +'a t = private {
  1. id : int;
  2. ty : 'a;
}
type 'a hvar = 'a t
val make : ty:'a -> int -> 'a t
val id : _ t -> int
val ty : 'a t -> 'a
val cast : 'a t -> ty:'b -> 'b t
val update_ty : 'a t -> f:('a -> 'b) -> 'b t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val hash : _ t -> int
val max : 'a t -> 'a t -> 'a t
val min : 'a t -> 'a t -> 'a t
val pp : _ t CCFormat.printer
val pp_tstp : _ t CCFormat.printer
val to_string : _ t -> string
val to_string_tstp : _ t -> string
OCaml

Innovation. Community. Security.