pub struct NelsonOppenCombiner { /* private fields */ }Expand description
Nelson-Oppen theory combination engine.
Implementations§
Source§impl NelsonOppenCombiner
impl NelsonOppenCombiner
Register a shared term between theories.
Sourcepub fn assert_equality(&mut self, lhs: TermId, rhs: TermId) -> Result<(), ()>
pub fn assert_equality(&mut self, lhs: TermId, rhs: TermId) -> Result<(), ()>
Assert an equality between shared terms.
Returns Ok(()) if consistent, Err(()) if conflict detected.
Sourcepub fn purify_term(
&mut self,
term_id: TermId,
tm: &mut TermManager,
) -> Result<TermId, String>
pub fn purify_term( &mut self, term_id: TermId, tm: &mut TermManager, ) -> Result<TermId, String>
Purify a term by introducing fresh variables for sub-terms.
Purification ensures each theory sees only its own symbols.
Sourcepub fn get_pending_equalities(&mut self) -> Vec<(TermId, TermId)>
pub fn get_pending_equalities(&mut self) -> Vec<(TermId, TermId)>
Get pending equalities to propagate to theories.
Sourcepub fn are_equal(&self, lhs: TermId, rhs: TermId) -> bool
pub fn are_equal(&self, lhs: TermId, rhs: TermId) -> bool
Check if two terms are in the same equivalence class.
Sourcepub fn get_equivalence_class(&self, term_id: TermId) -> Vec<TermId>
pub fn get_equivalence_class(&self, term_id: TermId) -> Vec<TermId>
Get all terms in the equivalence class of a term.
Sourcepub fn convexity_closure(&mut self) -> Vec<(TermId, TermId)>
pub fn convexity_closure(&mut self) -> Vec<(TermId, TermId)>
Convexity closure: generate implied equalities.
For convex theories, if we have equalities in each class, we must propagate all pairwise equalities.
Sourcepub fn stats(&self) -> &NelsonOppenStats
pub fn stats(&self) -> &NelsonOppenStats
Get statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NelsonOppenCombiner
impl RefUnwindSafe for NelsonOppenCombiner
impl Send for NelsonOppenCombiner
impl Sync for NelsonOppenCombiner
impl Unpin for NelsonOppenCombiner
impl UnwindSafe for NelsonOppenCombiner
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