Module Make.Literal

A literal is a positive or negative Atom.t.

Currently this library does not support negation. Negative literals may not appear in any clauses.

type t

The type of a literal.

Constructurs

val make_positive : Atom.t -> t

make_positive atom returns a new positive literal of the atom atom.

val make_negative : Atom.t -> t

make_negative atom returns a new negative literal of the atom atom.

Predicates and Comparison

val predicate : t -> Atom.predicate_symbol
val terms : t -> Term.t list
val equal : t -> t -> bool
val compare : t -> t -> int
val is_ground : t -> bool

is_ground literal returns true if all terms appearing in the literal are constants.

IO

val parser : t Angstrom.t
val pp : t Fmt.t