Skip to main content

IncrementalProofBuilder

Struct IncrementalProofBuilder 

Source
pub struct IncrementalProofBuilder { /* private fields */ }
Expand description

A scoped proof builder for incremental construction

Supports:

  • Push/pop scoping (for backtracking)
  • Efficient deduplication
  • Premise tracking

Implementations§

Source§

impl IncrementalProofBuilder

Source

pub fn new() -> Self

Create a new incremental proof builder

Source

pub fn enable(&mut self)

Enable proof recording

Source

pub fn disable(&mut self)

Disable proof recording

Source

pub const fn is_enabled(&self) -> bool

Check if proof recording is enabled

Source

pub fn push_scope(&mut self)

Push a new scope (for backtracking)

Source

pub fn pop_scope(&mut self)

Pop a scope (backtrack)

Source

pub fn scope_level(&self) -> usize

Get the current scope level

Source

pub fn record_axiom( &mut self, clause_id: u32, conclusion: impl Into<String>, ) -> ProofNodeId

Record an axiom (input clause)

Source

pub fn record_inference( &mut self, clause_id: u32, rule: impl Into<String>, premise_ids: &[u32], conclusion: impl Into<String>, ) -> ProofNodeId

Record an inference step

Source

pub fn record_inference_with_args( &mut self, clause_id: u32, rule: impl Into<String>, premise_ids: &[u32], args: Vec<String>, conclusion: impl Into<String>, ) -> ProofNodeId

Record an inference step with arguments

Source

pub fn get_clause_proof(&self, clause_id: u32) -> Option<ProofNodeId>

Get the proof node for a solver clause ID

Source

pub const fn proof(&self) -> &Proof

Get the proof (immutable)

Source

pub fn take_proof(&mut self) -> Proof

Take the proof, leaving an empty one

Source

pub fn reset(&mut self)

Reset the builder

Source

pub fn stats(&self) -> IncrementalStats

Get statistics about the incremental construction

Trait Implementations§

Source§

impl Debug for IncrementalProofBuilder

Source§

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

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

impl Default for IncrementalProofBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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.