Module Sstt.Enums

Enums components.

type t

Enums represents sets of symbolic constants. These sets can be either finite or cofinite.

Symbolic constants are implemented by Sstt.NamedIdentifier.

Basics

The minimal signature of a component.

val any : t

The top element of t (the set of all values of type t).

val empty : t

The bottom element of t (the empty set of values of type t).

val compare : t -> t -> int

Comparison working on the internal representation of t.

val equal : t -> t -> bool

Equality, equal a b is equivalent to compare a b = 0.

The explicit representation of an Enums.t is a pair of a boolean, and a list of constants. If the boolean is true, the set if finite and contains all the elements in the list. If the boolean is false, the set is co-finite and contains all the elements not in the list.

Operations on basic components

val mk : Atom.t -> t

Creates a component from an atom.

val construct : (bool * Atom.t list) -> t

Builds a component from its explicit representation.

val destruct : t -> bool * Atom.t list

Returns the explicit representation of component.