Logtk.LiteralLiterals are the representation of atomic formulas in the clausal world of resolution/superposition provers.
A literal is an atomic formula (equality or predicate), paired with a sign that carries negation.
type term = Term.ta literal, that is, a signed atomic formula
include Interfaces.HASH with type t := tinclude Interfaces.EQ with type t := tval hash : t -> inthashing of literal
val weight : t -> intweight of the lit (sum of weights of terms)
val ho_weight : t -> intweight of the lit (sum of weights of terms)
ho weight of the lit (sum of weights of terms, ignoring applied variables and lambda prefixes
ho weight of the lit (sum of weights of terms, ignoring applied variables and lambda prefixes
heuristic difficulty to eliminate lit
val depth : t -> intdepth of literal
val is_pos : t -> boolis the literal positive?
val is_neg : t -> boolis the literal negative?
val is_eqn : t -> boolis the literal a proper (in)equation or prop?
val is_prop : t -> boolis the literal a boolean proposition?
val is_eq : t -> boolis the literal of the form a = b?
val is_neq : t -> boolis the literal of the form a != b?
val is_essentially_prop : t -> boolis the literal of the form a != b?
is the literal non-equational literal of type Prop
build literals. If sides so not have the same sort, a SortError will be raised. An ordering must be provided
val mk_tauto : ttautological literal
val mk_absurd : tabsurd literal, like ~ true
val no_prop_invariant : t -> boolmk_constraint t u makes a disequation or a HO constraint depending on how t and u look.
val matching :
?subst:Subst.t ->
pattern:t Scoped.t ->
t Scoped.t ->
(Subst.t * Builtin.Tag.t list) Iter.tchecks whether subst(lit_a) matches lit_b. Returns alternative substitutions s such that s(lit_a) = lit_b and s contains subst.
More general version of matching, yields subst such that subst(lit_a) => lit_b.
Literals are equal according to given substitution for variables, but are of opposite sign
val unify :
?subst:Unif_subst.t ->
t Scoped.t ->
t Scoped.t ->
(Unif_subst.t * Builtin.Tag.t list) Iter.tval apply_subst : Subst.Renaming.t -> Subst.t -> t Scoped.t -> tval apply_subst_no_simp : Subst.Renaming.t -> Subst.t -> t Scoped.t -> tval apply_subst_list : Subst.Renaming.t -> Subst.t -> t list Scoped.t -> t listval is_constraint : t -> boolIs the literal a constraint?
val is_ho_constraint : t -> boolval of_unif_subst : Subst.Renaming.t -> Unif_subst.t -> t listMake a list of (negative) literals out of the unification constraints contained in this substitution.
val is_ground : t -> boolView on literals F t1…tn and ¬ (F t1…tn)
val is_ho_predicate : t -> boolDoes as_ho_predicate return Some?
val is_trivial : t -> boolval is_absurd : t -> boolval is_app_var_eq : t -> boolif is_absurd lit, return why
val is_type_pred : t -> boolval is_typex_pred : t -> boolval is_predicate_lit : t -> boolval is_pure_var : t -> boolval max_term_positions : ord:Ordering.t -> t -> intval fold_terms :
?position:Position.t ->
?vars:bool ->
?var_args:bool ->
?fun_bodies:bool ->
?ty_args:bool ->
which:[< `Max | `All ] ->
?ord:Ordering.t ->
subterms:bool ->
t ->
term Position.With.t Iter.tIterate on terms, maybe subterms, of the literal. Variables are ignored if vars is false.
vars decides whether variables are iterated on too (default false) var_args decides whether arguments of applied variables are iterated on too fun_bodies decides whether bodies of lambda-expressions are iterated on too ty_args decides whether type arguments are iterated on too subterms decides whether strict subterms, not only terms that occur directly under the literal, are explored.
which is used to decide which terms to visit:
which is `Max, only the maximal terms are exploredwhich is `All, all root terms are exploredmodule Comp : sig ... endmodule Seq : sig ... endmodule Pos : sig ... endreplace lit ~old ~by syntactically replaces all occurrences of old in lit by the term by.
module View : sig ... endmodule Conv : sig ... endtype print_hook = CCFormat.t -> t -> boolmight print the literal on the given buffer.
val add_default_hook : print_hook -> unitval pp_debug : ?hooks:print_hook list -> t CCFormat.printerval pp : t CCFormat.printerval pp_zf : t CCFormat.printerval pp_tstp : t CCFormat.printerval to_string : t -> string