pub struct ResolutionGraph { /* private fields */ }Expand description
Resolution Graph for analyzing proof structure
Implementations§
Source§impl ResolutionGraph
impl ResolutionGraph
Sourcepub fn add_clause(&mut self, clause: Vec<Lit>, decision_level: usize) -> usize
pub fn add_clause(&mut self, clause: Vec<Lit>, decision_level: usize) -> usize
Add a clause node to the graph
Sourcepub fn add_decision(&mut self, literal: Lit, decision_level: usize) -> usize
pub fn add_decision(&mut self, literal: Lit, decision_level: usize) -> usize
Add a decision node to the graph
Sourcepub fn add_resolution(
&mut self,
parent1_id: usize,
parent2_id: usize,
resolved_var: Var,
result_clause: Vec<Lit>,
decision_level: usize,
) -> usize
pub fn add_resolution( &mut self, parent1_id: usize, parent2_id: usize, resolved_var: Var, result_clause: Vec<Lit>, decision_level: usize, ) -> usize
Record a resolution between two clauses
Sourcepub fn compute_depth(&self, node_id: usize) -> usize
pub fn compute_depth(&self, node_id: usize) -> usize
Compute graph depth starting from a given node
Sourcepub fn get_frequent_vars(&self, k: usize) -> Vec<(Var, usize)>
pub fn get_frequent_vars(&self, k: usize) -> Vec<(Var, usize)>
Get the top-k most frequently resolved variables
Sourcepub fn clause_quality(&self, node_id: usize) -> f64
pub fn clause_quality(&self, node_id: usize) -> f64
Compute clause quality based on resolution graph structure
Lower scores indicate better quality clauses:
- Shorter resolution paths are better (fewer resolution steps)
- Clauses involving frequently-resolved variables are more important
- Clauses at lower decision levels are more general
Sourcepub fn find_redundant_resolutions(&self) -> Vec<usize>
pub fn find_redundant_resolutions(&self) -> Vec<usize>
Find redundant resolutions in the graph
Returns node IDs of resolutions that could be eliminated
Sourcepub fn stats(&self) -> &GraphStats
pub fn stats(&self) -> &GraphStats
Get statistics about the graph
Sourcepub fn get_node(&self, node_id: usize) -> Option<&ResolutionNode>
pub fn get_node(&self, node_id: usize) -> Option<&ResolutionNode>
Get a node by ID
Trait Implementations§
Source§impl Debug for ResolutionGraph
impl Debug for ResolutionGraph
Auto Trait Implementations§
impl Freeze for ResolutionGraph
impl RefUnwindSafe for ResolutionGraph
impl Send for ResolutionGraph
impl Sync for ResolutionGraph
impl Unpin for ResolutionGraph
impl UnsafeUnpin for ResolutionGraph
impl UnwindSafe for ResolutionGraph
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more