pub enum ProofStep<'a> {
Show 13 variants
SolverVarName {
global: Var,
solver: Option<Var>,
},
UserVarName {
global: Var,
user: Option<Var>,
},
DeleteVar {
var: Var,
},
ChangeSamplingMode {
var: Var,
sample: bool,
},
AddClause {
clause: &'a [Lit],
},
AtClause {
redundant: bool,
clause: &'a [Lit],
propagation_hashes: &'a [ClauseHash],
},
UnitClauses {
units: &'a [(Lit, ClauseHash)],
},
DeleteClause {
clause: &'a [Lit],
proof: DeleteClauseProof,
},
ChangeHashBits {
bits: u32,
},
Model {
assignment: &'a [Lit],
},
Assumptions {
assumptions: &'a [Lit],
},
FailedAssumptions {
failed_core: &'a [Lit],
propagation_hashes: &'a [ClauseHash],
},
End,
}
Expand description
A single proof step.
Represents a mutation of the current formula and a justification for the mutation’s validity.
Variants§
SolverVarName
Update the global to solver var mapping.
For proof checking, the solver variable names are only used for hash computations.
UserVarName
Update the global to user var mapping.
A variable without user mapping is considered hidden by the checker. When a variable without user mapping gets a user mapping, the sampling mode is initialized to witness.
It’s not allowed to change a variable from one user name to another when the variable is in use.
Clause additions and assumptions are only allowed to use variables with user mappings (and a non-witness sampling mode).
DeleteVar
Delete a variable.
This is only allowed for variables that are isolated and hidden.
ChangeSamplingMode
Changes the sampling mode of a variable.
This is only used to change between Sample and Witness. Hidden is managed by adding or removing a user var name.
AddClause
Add a new input clause.
This is only emitted for clauses added incrementally after an initial solve call.
AtClause
Add a clause that is an asymmetric tautoligy (AT).
Assuming the negation of the clause’s literals leads to a unit propagation conflict.
The second slice contains the hashes of all clauses involved in the resulting conflict. The order of hashes is the order in which the clauses propagate when all literals of the clause are set false.
When generating DRAT proofs the second slice is ignored and may be empty.
UnitClauses
Unit clauses found by top-level unit-propagation.
Pairs of unit clauses and the original clause that became unit. Clauses are in chronological
order. This is equivalent to multiple AtClause
steps where the clause is unit and the
propagation_hashes field contains just one hash, with the difference that this is not output
for DRAT proofs.
Ignored when generating DRAT proofs.
Fields
units: &'a [(Lit, ClauseHash)]
DeleteClause
Delete a clause consisting of the given literals.
ChangeHashBits
Change the number of clause hash bits used
Model
A (partial) assignment that satisfies all clauses and assumptions.
Assumptions
Change the active set of assumptions.
This is checked against future model or failed assumptions steps.
FailedAssumptions
A subset of the assumptions that make the formula unsat.
End
Signals the end of a proof.
A varisat proof must end with this command or else the checker will complain about an incomplete proof.
Implementations§
Trait Implementations§
impl<'a> Copy for ProofStep<'a>
Auto Trait Implementations§
impl<'a> Freeze for ProofStep<'a>
impl<'a> RefUnwindSafe for ProofStep<'a>
impl<'a> Send for ProofStep<'a>
impl<'a> Sync for ProofStep<'a>
impl<'a> Unpin for ProofStep<'a>
impl<'a> UnwindSafe for ProofStep<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)