varisat_internal_proof

Enum ProofStep

Source
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.

Fields

§global: Var
§solver: Option<Var>
§

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).

Fields

§global: Var
§user: Option<Var>
§

DeleteVar

Delete a variable.

This is only allowed for variables that are isolated and hidden.

Fields

§var: Var
§

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.

Fields

§var: Var
§sample: bool
§

AddClause

Add a new input clause.

This is only emitted for clauses added incrementally after an initial solve call.

Fields

§clause: &'a [Lit]
§

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.

Fields

§redundant: bool
§clause: &'a [Lit]
§propagation_hashes: &'a [ClauseHash]
§

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.

Fields

§clause: &'a [Lit]
§

ChangeHashBits

Change the number of clause hash bits used

Fields

§bits: u32
§

Model

A (partial) assignment that satisfies all clauses and assumptions.

Fields

§assignment: &'a [Lit]
§

Assumptions

Change the active set of assumptions.

This is checked against future model or failed assumptions steps.

Fields

§assumptions: &'a [Lit]
§

FailedAssumptions

A subset of the assumptions that make the formula unsat.

Fields

§failed_core: &'a [Lit]
§propagation_hashes: &'a [ClauseHash]
§

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§

Source§

impl<'a> ProofStep<'a>

Source

pub fn contains_hashes(&self) -> bool

Does this proof step use clause hashes?

Trait Implementations§

Source§

impl<'a> Clone for ProofStep<'a>

Source§

fn clone(&self) -> ProofStep<'a>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for ProofStep<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.