module Constant: sig .. end
Constants.
Abstract constants and general operations on them.
type t
Constants
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
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.
- Require
is_symbolic c
- Ensure
symbolic_value (symbolic s) = s
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.
- Require
is_integer c
- Ensure
integer_value (integer i) = i
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.
- Require
is_rational c
- Ensure
rational_value (rational r) = r
Hosted by the
* web site.
*Other names and brands may be claimed as the property
of others.