Module S.Clause

A clause are expressions that allow us to deduce facts from other facts.

type t

The type of a clause.

Constructors

val make : Atom.t -> Literal.t list -> t
val make_fact : Atom.t -> t
val head : t -> Atom.t

Predicates and Comparison

val body : t -> Literal.t list
val equal : t -> t -> bool
val is_ground_fact : t -> bool

is_ground_fact clause returns true if the body of the clause is emtpy and the head is ground (see Atom.is_ground).

IO

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