Module Logtk.Literals
Array of literals
val equal_com : t -> t -> bool
val compare : t -> t -> int
val compare_multiset : ord:Ordering.t -> t -> t -> Comparison.t
val variant : ?subst:Subst.t -> t Scoped.t -> t Scoped.t -> (Subst.t * Builtin.Tag.t list) Sequence.t
Variant checking (alpha-equivalence). It can reorder literals to do its check, so that might be computationnally expensive (a bit like subsumption).
val matching : ?subst:Subst.t -> pattern:t Scoped.t -> t Scoped.t -> (Subst.t * Builtin.Tag.t list) Sequence.t
val matches : t -> t -> bool
val weight : t -> int
val depth : t -> int
val vars : t -> Type.t HVar.t list
val is_ground : t -> bool
all the literals are ground?
val to_form : t -> term SLiteral.t list
Make a 'or' formula from literals
val apply_subst : Subst.Renaming.t -> Subst.t -> t Scoped.t -> t
val of_unif_subst : Subst.Renaming.t -> Unif_subst.t -> t
val map : (term -> term) -> t -> t
val pos : t -> CCBV.t
val neg : t -> CCBV.t
val maxlits : ord:Ordering.t -> t -> CCBV.t
Bitvector of positions of maximal literals
val maxlits_l : ord:Ordering.t -> t -> (Literal.t * int) list
List of maximal literals, with their index, among the array
val is_max : ord:Ordering.t -> t -> int -> bool
Is the i-th literal maximal in the ordering?
val is_trivial : t -> bool
Tautology? (simple syntactic criterion only)
val is_absurd : t -> bool
All literals are false, or there are no literals
val apply_subst : Subst.Renaming.t -> Subst.t -> t Scoped.t -> t
module Seq : sig ... end
High order combinators
module Pos : sig ... end
module Conv : sig ... end
module View : sig ... end
val fold_lits : eligible:(int -> Literal.t -> bool) -> t -> (Literal.t * int) Sequence.t
Fold over literals who satisfy
eligible
. The folded function is given the literal and its index.
val fold_eqn : ?both:bool -> ?sign:bool -> ord:Ordering.t -> eligible:(int -> Literal.t -> bool) -> t -> (term * term * bool * Position.t) Sequence.t
fold f over all literals sides, with their positions. f is given
(left side, right side, sign, position of left side)
iford
is present, then only the max side of an oriented equation will be visited, otherwise they will both be explored. ifboth = true
, then both sides of a non-oriented equation will be visited, otherwise only one side. ifsign = true
, then only positive equations are visited; if it'sfalse
, only negative ones; if it's not defined, both.
val fold_arith : eligible:(int -> Literal.t -> bool) -> t -> Int_lit.t Position.With.t Sequence.t
Fold over eligible arithmetic literals
val fold_arith_terms : eligible:(int -> Literal.t -> bool) -> which:[< `Max | `All ] -> ord:Ordering.t -> t -> (term * Int_lit.Focus.t * Position.t) Sequence.t
Fold on terms under arithmetic literals, with the focus on the current term
val fold_rat : eligible:(int -> Literal.t -> bool) -> t -> Rat_lit.t Position.With.t Sequence.t
Fold over eligible arithmetic literals
val fold_rat_terms : eligible:(int -> Literal.t -> bool) -> which:[< `Max | `All ] -> ord:Ordering.t -> t -> (term * Rat_lit.Focus.t * Position.t) Sequence.t
Fold on terms under arithmetic literals, with the focus on the current term
val fold_terms : ?vars:bool -> ?ty_args:bool -> which:[< `Max | `All ] -> ord:Ordering.t -> subterms:bool -> eligible:(int -> Literal.t -> bool) -> t -> term Position.With.t Sequence.t
See
Literal.fold_terms
, which is the same but for theeligible
argument
val symbols : ?init:Logtk.ID.Set.t -> t -> Logtk.ID.Set.t
IO
Special kinds of literal arrays
val is_RR_horn_clause : t -> bool
Recognized whether the clause is a Range-Restricted Horn clause
val is_horn : t -> bool
Recognizes Horn clauses (at most one positive literal)