Angluin.Sval zero : tAdditive identity (⊕-neutral element).
val one : tMultiplicative identity (⊗-neutral element).
val rand : ?non_zero:Base.float -> ?max:Base.int -> Base.unit -> trand ~non_zero ~max () generates a random element. non_zero is the probability that the result is non-zero (default semiring-specific). max bounds the magnitude for numeric semirings. Used by the random benchmark generators in lib/lang/rand_*.ml.
val elements : Base.unit -> t Base.listEnumerate all elements of the semiring. Only defined for finite semirings (Bool, bounded Nat, bounded Tropical, etc.); raises a fatal error for infinite semirings such as unbounded Nat or Rat.
module SMT : sig ... endLifts the semiring into SMT expressions via Smtml.
val hash : t -> Base.intval hash_fold_t : Base.Hash.state -> t -> Base.Hash.stateval to_string : t -> Base.stringval sexp_of_t : t -> Base.Sexp.t