Module Logtk.Literal
Literals
type term= Term.ttype t= private|True|False|Equation of term * term * bool|Prop of term * bool|Int of Int_lit.t|Rat of Rat_lit.ta literal, that is, a signed atomic formula
val hash : t -> inthashing of literal
val weight : t -> inthashing of literal
weight of the lit (sum of weights of terms)
val heuristic_weight : (term -> int) -> t -> intweight of the lit (sum of weights of terms)
heuristic difficulty to eliminate lit
val depth : t -> intheuristic difficulty to eliminate lit
depth of literal
val sign : t -> booldepth of literal
val is_pos : t -> boolis the literal positive?
val is_neg : t -> boolis the literal positive?
is the literal negative?
val is_eqn : t -> boolis the literal negative?
is the literal a proper (in)equation or prop?
val is_prop : t -> boolis the literal a proper (in)equation or prop?
is the literal a boolean proposition?
val is_eq : t -> boolis the literal a boolean proposition?
is the literal of the form a = b?
val is_neq : t -> boolis the literal of the form a = b?
is the literal of the form a != b?
val is_arith_eq : t -> bool= or !=
val is_arith_less : t -> bool< or <=
val is_arith_lesseq : t -> boolval is_arith_divides : t -> boolval is_rat : t -> boolval is_rat_eq : t -> boolval is_rat_less : t -> boolval mk_eq : term -> term -> tbuild literals. If sides so not have the same sort, a SortError will be raised. An ordering must be provided
val mk_neq : term -> term -> tval mk_lit : term -> term -> bool -> tval mk_prop : term -> bool -> tval mk_true : term -> tval mk_false : term -> tval mk_tauto : tval mk_absurd : tval mk_arith : Int_lit.t -> tval mk_arith_op : Int_lit.op -> Z.t Monome.t -> Z.t Monome.t -> tval mk_arith_eq : Z.t Monome.t -> Z.t Monome.t -> tval mk_arith_neq : Z.t Monome.t -> Z.t Monome.t -> tval mk_arith_less : Z.t Monome.t -> Z.t Monome.t -> tval mk_arith_lesseq : Z.t Monome.t -> Z.t Monome.t -> tval mk_divides : ?sign:bool -> Z.t -> power:int -> Z.t Monome.t -> tval mk_not_divides : Z.t -> power:int -> Z.t Monome.t -> tval mk_rat : Rat_lit.t -> tval mk_rat_op : Rat_lit.op -> Q.t Monome.t -> Q.t Monome.t -> tval mk_rat_eq : Q.t Monome.t -> Q.t Monome.t -> tval mk_rat_less : Q.t Monome.t -> Q.t Monome.t -> tval mk_constraint : term -> term -> tmk_constraint t umakes a disequation or a HO constraint depending on howtandulook.
val matching : ?subst:Subst.t -> pattern:t Scoped.t -> t Scoped.t -> (Subst.t * Builtin.Tag.t list) Sequence.tchecks whether subst(lit_a) matches lit_b. Returns alternative substitutions s such that s(lit_a) = lit_b and s contains subst.
val subsumes : ?subst:Subst.t -> t Scoped.t -> t Scoped.t -> (Subst.t * Builtin.Tag.t list) Sequence.tMore general version of
matching, yieldssubstsuch thatsubst(lit_a) => lit_b.
val variant : ?subst:Subst.t -> t Scoped.t -> t Scoped.t -> (Subst.t * Builtin.Tag.t list) Sequence.tval unify : ?subst:Unif_subst.t -> t Scoped.t -> t Scoped.t -> (Unif_subst.t * Builtin.Tag.t list) Sequence.tval are_variant : t -> t -> boolval 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 list
val 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 -> boolval symbols : t -> Logtk.ID.Set.tval root_terms : t -> term listall the terms immediatly under the lit
val as_ho_predicate : t -> (Term.var * term * term list * bool) optionView on literals
F t1…tnand¬ (F t1…tn)
val is_ho_predicate : t -> boolDoes
as_ho_predicatereturn Some?
Basic semantic checks
val is_trivial : t -> boolval is_absurd : t -> boolval is_absurd_tags : t -> Proof.tag listif
is_absurd lit, return why
val fold_terms : ?position:Position.t -> ?vars:bool -> ?ty_args:bool -> which:[< `Max | `All ] -> ?ord:Ordering.t -> subterms:bool -> t -> term Position.With.t Sequence.tIterate on terms, maybe subterms, of the literal. Variables are ignored if
varsisfalse.varsdecides whether variables are iterated on too (defaultfalse)subtermsdecides whether strict subterms, not only terms that occur directly under the literal, are explored.whichis used to decide which terms to visit:- if
whichis`Max, only the maximal terms are explored - if
whichis`All, all root terms are explored
- if
module Comp : sig ... end
module Seq : sig ... endmodule Pos : sig ... end
val replace : t -> old:term -> by:term -> treplace lit ~old ~bysyntactically replaces all occurrences ofoldinlitby the termby.
module View : sig ... end
module Conv : sig ... end
IO
type print_hook= CCFormat.t -> t -> boolmight print the literal on the given buffer.
- returns
true if it printed, false otherwise
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