Module Clause.Make
Parameters
Signature
module Ctx = Ctxtype ttype clause= t
Flags
type flag= SClause.flag
Basics
val compare : t -> t -> intval id : t -> intval lits : t -> Logtk.Literal.t arrayval is_ground : t -> boolval weight : t -> int
val is_goal : t -> boolLooking at the clause's proof, return
trueiff the clause is an initial (negated) goal from the problem
val distance_to_goal : t -> int optionSee
Proof.distance_to_goal, applied to the clause's proof
val comes_from_goal : t -> booltrueiff the clause is (indirectly) deduced from a goal or lemma
Boolean Abstraction
val has_trail : t -> boolHas a non-empty trail?
val update_trail : (Trail.t -> Trail.t) -> t -> tChange the trail. The resulting clause has same parents, proof and literals as the input one
val trail_subsumes : t -> t -> booltrail_subsumes c1 c2 = Trail.subsumes (get_trail c1) (get_trail c2)
val is_active : t -> v:Trail.valuation -> boolTrue if the clause's trail is active in this valuation
Constructors
val create : penalty:int -> trail:Trail.t -> Logtk.Literal.t list -> Clause_intf.proof_step -> tBuild a new clause from the given literals.
- parameter trail
boolean trail
- parameter penalty
heuristic penalty due to history of the clause (the higher, the less likely the clause is to be picked soon) also takes a list of literals and a proof builder
val create_a : penalty:int -> trail:Trail.t -> Logtk.Literal.t array -> Clause_intf.proof_step -> tBuild a new clause from the given literals.
val of_sclause : ?penalty:int -> SClause.t -> Clause_intf.proof_step -> tval of_forms : ?penalty:int -> trail:Trail.t -> Logtk.Term.t Logtk.SLiteral.t list -> Clause_intf.proof_step -> tDirectly from list of formulas
val of_forms_axiom : ?penalty:int -> file:string -> name:string -> Logtk.Term.t Logtk.SLiteral.t list -> tConstruction from formulas as axiom (initial clause)
val of_statement : Logtk.Statement.clause_t -> t listExtract a clause from a statement, if any
val proof_step : t -> Clause_intf.proof_stepExtract its proof from the clause
val proof : t -> Clause_intf.proofObtain the pair
conclusion, step
val proof_parent : t -> Logtk.Proof.Parent.tval proof_parent_subst : Logtk.Subst.Renaming.t -> t Logtk.Scoped.t -> Logtk.Subst.t -> Logtk.Proof.Parent.tval update_proof : t -> (Clause_intf.proof_step -> Clause_intf.proof_step) -> tupdate_proof c fcreates a new clause that is similar tocin all aspects, but with the prooff (proof_step c)
val is_empty : t -> boolIs the clause an empty clause?
val length : t -> intNumber of literals
val maxlits : t Logtk.Scoped.t -> Logtk.Subst.t -> CCBV.tList of maximal literals
val is_maxlit : t Logtk.Scoped.t -> Logtk.Subst.t -> idx:int -> boolIs the i-th literal maximal in subst(clause)? Equivalent to Bitvector.get (maxlits ~ord c subst) i
val eligible_res : t Logtk.Scoped.t -> Logtk.Subst.t -> CCBV.tBitvector that indicates which of the literals of
subst(clause)are eligible for resolution. THe literal has to be either maximal among selected literals of the same sign, if some literal is selected, or maximal if none is selected.
val eligible_res_no_subst : t -> CCBV.tMore efficient version of
eligible_reswithSubst.empty
val eligible_param : t Logtk.Scoped.t -> Logtk.Subst.t -> CCBV.tBitvector that indicates which of the literals of
subst(clause)are eligible for paramodulation. That means the literal is positive, no literal is selecteed, and the literal is maximal among literals ofsubst(clause).
val is_eligible_param : t Logtk.Scoped.t -> Logtk.Subst.t -> idx:int -> boolCheck whether the
idx-th literal is eligible for paramodulation
val has_selected_lits : t -> booldoes the clause have some selected literals?
val is_selected : t -> int -> boolcheck whether a literal is selected
val selected_lits : t -> (Logtk.Literal.t * int) listget the list of selected literals
val is_oriented_rule : t -> boolIs the clause a positive oriented clause?
val symbols : ?init:Logtk.ID.Set.t -> t Sequence.t -> Logtk.ID.Set.tsymbols that occur in the clause
val to_sclause : t -> SClause.tval to_forms : t -> Logtk.Term.t Logtk.SLiteral.t listEasy iteration on an abstract view of literals
val to_s_form : t -> Logtk.TypedSTerm.Form.t
Iterators
module Seq : sig ... endFilter literals
module Eligible : sig ... endSet of clauses
Position
module Pos : sig ... endClauses with more data
module WithPos : sig ... endClause within which a subterm (and its position) are hilighted
IO
val pp : t CCFormat.printerval pp_tstp : t CCFormat.printerval pp_tstp_full : t CCFormat.printerPrint in a cnf() statement
val to_string : t -> stringDebug printing to a string