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) Iter.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) Iter.t
val matches : t -> t -> bool
val weight : t -> int
val ho_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) Iter.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) Iter.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_eqn_simple : ?sign:bool -> t -> (term * term * bool * Position.t) Iter.t
Like previous version but simpler: it visits all equations only in the orientation l = r
val fold_terms : ?vars:bool -> ?var_args:bool -> ?fun_bodies:bool -> ?ty_args:bool -> which:[< `Max | `All ] -> ord:Ordering.t -> subterms:bool -> eligible:(int -> Literal.t -> bool) -> t -> term Position.With.t Iter.t
See
Literal.fold_terms
, which is the same but for theeligible
argument
val symbols : ?init:Logtk.ID.Set.t -> ?include_types:bool -> 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)
val is_unique_max_horn_clause : ord:Ordering.t -> t -> bool
Recognized whether the clause is a Range-Restricted Horn clause