Struct Parser

Source
pub struct Parser {
    pub redundancy_property: RedundancyProperty,
    pub maxvar: Variable,
    pub clause_pivot: Vector<Literal>,
    pub proof_start: Clause,
    pub proof: Vector<ProofStep>,
    pub max_proof_steps: Option<usize>,
    pub verbose: bool,
    pub clause_db: ClauseDatabase,
    pub witness_db: WitnessDatabase,
}
Expand description

CNF and DRAT/DPR parser.

Fields§

§redundancy_property: RedundancyProperty

The redundancy property identifying the proof format.

§maxvar: Variable

The highest variable parsed so far

§clause_pivot: Vector<Literal>

For RAT, the pivot (first literal) for each clause

It is necessary to store this because the clauses will be sorted (and watches will be shuffled).

§proof_start: Clause

The first clause that is part of the proof (and not the input formula)

§proof: Vector<ProofStep>

The proof steps

§max_proof_steps: Option<usize>

How many proof steps we want to parse

§verbose: bool

Print diagnostics and timing information

§clause_db: ClauseDatabase

Clause store

§witness_db: WitnessDatabase

Witness store

Implementations§

Source§

impl Parser

Source

pub fn is_pr(&self) -> bool

Returns true if we are parsing a (D)PR proof.

Trait Implementations§

Source§

impl Debug for Parser

Source§

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

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

impl Default for Parser

Source§

fn default() -> Parser

Create a new parser.

Note: this allocates the static clause and witness databases, so this should only be called once.

Source§

impl HeapSpace for Parser

Source§

fn heap_space(&self) -> usize

The number of bytes allocated on the heap that this owns.
Source§

impl PartialEq for Parser

Source§

fn eq(&self, other: &Parser) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Parser

Auto Trait Implementations§

§

impl Freeze for Parser

§

impl RefUnwindSafe for Parser

§

impl Send for Parser

§

impl Sync for Parser

§

impl Unpin for Parser

§

impl UnwindSafe for Parser

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