Module Clause
Clause, properties and activation literals for IC3
- author
- Christoph Sticksel
type source=|PropSetClause is a pseudo clause for property set
|BlockFrontierNegation of clause reaches a state outside the property in one step
|BlockRec of tNegtion of clause reaches a state outside the negation of the clause to block
|IndGen of tClause is an inductive generalization of the clause
|CopyFwdProp of tClause is a copy of the clause from forward propagation
|CopyBlockProp of tClause is a copy of the clause from blocking in future frames
|Copy of tClause is a copy of the clause for another reason
Origin of clause
module ClauseTrie : Trie.S with type key = Term.t listA trie of literals
Clauses
val mk_clause_of_literals : source -> Term.t list -> tCreate a clause from a set of literals
The activation literals are only created in the Kind 2 term database, but nothing is sent to the solver, instead they are only made on the first access of the activation literals in
actlit_p0_of_clause,actlit_p1_of_clause,actlits_n0_of_clauseandactlits_n1_of_clause.
val copy_clause_fwd_prop : t -> tval copy_clause : t -> tval id_of_clause : t -> intReturn unique identifier of clause
val length_of_clause : t -> intReturn the number of literals in the clause
Since duplicate literals are eliminated, this is not necessarily equal to the number of literals given when creating the clause.
Activation Literals
val actlit_p0_of_clause : SMTSolver.t -> t -> Term.tReturn the activation literal for the positive unprimed clause
Declare the activation literal and assert the term
p0 => Con the first access of the activation literal in the given solver instance. Fail withInvalid_argumentifdeactivate_clausehas been called for the clause in the given solver instance.
val actlit_p1_of_clause : SMTSolver.t -> t -> Term.tReturn the activation literal for the positive primed clause
Declare the activation literal and assert the term
p1 => C'on the first access of the activation literal in the given solver instance. Fail withInvalid_argumentifdeactivate_clausehas been called for the clause in the given solver instance.
val actlits_n0_of_clause : SMTSolver.t -> t -> Term.t listReturn the activation literals for the negated clause literals
Declare the activation literals and assert the terms
n0_i => L_ifor each literalL_iin the clause on the first access of the activation literal in the given solver instance. Fail withInvalid_argumentifdeactivate_clausehas been called for the clause in the given solver instance.
val actlits_n1_of_clause : SMTSolver.t -> t -> Term.t listReturn the activation literals for the negated, primed literals
Declare the activation literals and assert the terms
n1_i => L_i'for each literalL_iin the clause on the first access of the activation literal in the given solver instance. Fail withInvalid_argumentifdeactivate_clausehas been called for the clause in the given solver instance.
val deactivate_clause : SMTSolver.t -> t -> unitAssert the negation of all activation literals of clause in the solver instance
The clause is marked as unusable in the solver instance, hence all calls to
actlit_p0_of_clause,actlit_p1_of_clause,actlits_n0_of_clause,actlits_n1_of_clausefail.
Property sets
val prop_set_of_props : (string * Term.t) list -> prop_setCreate a property set from a list of named properties
The conjunction of properties is viewed as a single literal of a clause, and this clause is asserted with activation literals in the given solver instance.
val clause_of_prop_set : prop_set -> tReturn the unit clause containing the conjunction of the properties as a literals
val props_of_prop_set : prop_set -> (string * Term.t) listReturn the named properties of the property set
val actlit_p0_of_prop_set : SMTSolver.t -> prop_set -> Term.tReturn the activation literal for the positive conjunction of properties
val actlit_p1_of_prop_set : SMTSolver.t -> prop_set -> Term.tReturn the activation literal for the positive primed conjunction of properties
val actlits_n0_of_prop_set : SMTSolver.t -> prop_set -> Term.t listReturn the (singleton list of) activation literals for the negated conjunction of properties
val actlits_n1_of_prop_set : SMTSolver.t -> prop_set -> Term.t listReturn the (singleton list of) activation literals for the negated primed conjunction of properties
Frames
val actlit_of_frame : int -> Term.tCreate or return an activation literal for the given frame
val actlit_symbol_of_frame : int -> UfSymbol.tCreate or return the uninterpreted functoin symbol for the activation literal for the given frame
Activation literals
type actlit_type=|Actlit_p0positive unprimed
|Actlit_n0negative unprimed
|Actlit_p1positive primed
|Actlit_n1negative primed
Type of activation literal
val create_and_assert_fresh_actlit : SMTSolver.t -> string -> Term.t -> actlit_type -> Term.tCreate a fresh activation literal, declare it in the solver, and assert a term guarded with it
create_and_assert_fresh_actlit s h t adeclares a fresh uninterpreted Boolean constant in the solver instances, and asserts the termtguarded by this activation literal in the same solver instance. The parameterhis a tag used to name the constant, together with a counter that is maintained per tag.