pub struct ResolutionProof {
pub input_clauses: Vec<Vec<i32>>,
pub steps: Vec<(usize, usize, i32, Vec<i32>)>,
}Expand description
A resolution proof: a DAG of resolution steps.
Fields§
§input_clauses: Vec<Vec<i32>>The input clause set.
steps: Vec<(usize, usize, i32, Vec<i32>)>Resolution steps: (parent1_idx, parent2_idx, pivot_var, resolvent).
Implementations§
Source§impl ResolutionProof
impl ResolutionProof
Sourcepub fn new(input_clauses: Vec<Vec<i32>>) -> Self
pub fn new(input_clauses: Vec<Vec<i32>>) -> Self
Create a new resolution proof from the given input clauses.
Sourcepub fn add_step(
&mut self,
p1: usize,
p2: usize,
pivot: i32,
resolvent: Vec<i32>,
)
pub fn add_step( &mut self, p1: usize, p2: usize, pivot: i32, resolvent: Vec<i32>, )
Add a resolution step.
Sourcepub fn is_refutation(&self) -> bool
pub fn is_refutation(&self) -> bool
Returns true if the proof ends with the empty clause.
Trait Implementations§
Source§impl Clone for ResolutionProof
impl Clone for ResolutionProof
Source§fn clone(&self) -> ResolutionProof
fn clone(&self) -> ResolutionProof
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ResolutionProof
impl RefUnwindSafe for ResolutionProof
impl Send for ResolutionProof
impl Sync for ResolutionProof
impl Unpin for ResolutionProof
impl UnsafeUnpin for ResolutionProof
impl UnwindSafe for ResolutionProof
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
Mutably borrows from an owned value. Read more