Module Msat_sat.Int_lit

The module defining formulas

This modules implements the requirements for implementing an SAT Solver.

include Msat.Solver_intf.FORMULA
type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Msat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Msat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

val make : int -> t

Make a proposition from an integer.

val to_int : t -> int
val fresh : unit -> t

Make a fresh atom

val compare : t -> t -> int

Compare atoms

val sign : t -> bool

Is the given atom positive ?

val apply_sign : bool -> t -> t

apply_sign b is the identity if b is true, and the negation function if b is false.

val set_sign : bool -> t -> t

Return the atom with the sign set.