Module Sidekick_base.Lit

include Sidekick_core.LIT with module T = Solver_arg
module T = Solver_arg

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer