Module Constant

module Constant: sig .. end

Abstract constants and general operations on them.

type t 
val equal : t -> t -> bool
Are two constants equal?
val hash : t -> int
Hash code of a constant.
val compare : t -> t -> int
An arbitrary ordering on constants.
val arity : t -> int
Arity of a constant.

val string_of : t -> string
String representation of a constant.
val pp_print : Format.formatter -> t -> unit
Print a constant.
val log : int -> t -> unit
log level c is equivalent to Log.log level pp_print c

Symbolic constants.

val symbolic : Symbol.t -> t
A symbolic constant.
val is_symbolic : t -> bool
Is a constant symbolic?.
val symbolic_value : t -> Symbol.t
symbolic_value c is the symbol underlying a symbolic constant.

Manifest integer constants.

val integer : Big_int.big_int -> t
Arbitrary precision integer constant.
val is_integer : t -> bool
Is a constant an integer value?
val integer_value : t -> Big_int.big_int
integer_value c is the integer value of c.

Manifest rational constants.

val rational : Num.num -> t
Arbitrary precision rational constant.
val is_rational : t -> bool
Is a constant a rational value
val rational_value : t -> Num.num
rational_value c is the rational value of c.

Hosted by the Logo* web site.
*Other names and brands may be claimed as the property of others.