pub struct AdvancedSharedTermsManager { /* private fields */ }Expand description
Advanced shared terms manager for theory combination.
Implementations§
Sourcepub fn new(config: SharedTermsConfig) -> Self
pub fn new(config: SharedTermsConfig) -> Self
Create a new shared terms manager.
Sourcepub fn default_config() -> Self
pub fn default_config() -> Self
Create with default configuration.
Sourcepub fn register_term(&mut self, term: TermId, theory: TheoryId)
pub fn register_term(&mut self, term: TermId, theory: TheoryId)
Register a shared term.
Check if a term is shared between multiple theories.
Sourcepub fn is_interface_term(&self, term: TermId) -> bool
pub fn is_interface_term(&self, term: TermId) -> bool
Check if a term is an interface term.
Sourcepub fn assert_equality(
&mut self,
lhs: TermId,
rhs: TermId,
explanation: EqualityExplanation,
) -> Result<(), String>
pub fn assert_equality( &mut self, lhs: TermId, rhs: TermId, explanation: EqualityExplanation, ) -> Result<(), String>
Assert equality between two terms.
This merges their equivalence classes and queues notifications.
Sourcepub fn are_equal(&mut self, lhs: TermId, rhs: TermId) -> bool
pub fn are_equal(&mut self, lhs: TermId, rhs: TermId) -> bool
Check if two terms are in the same equivalence class.
Sourcepub fn get_representative(&mut self, term: TermId) -> TermId
pub fn get_representative(&mut self, term: TermId) -> TermId
Get canonical representative of a term’s equivalence class.
Sourcepub fn get_eclass_members(&mut self, term: TermId) -> Vec<TermId> ⓘ
pub fn get_eclass_members(&mut self, term: TermId) -> Vec<TermId> ⓘ
Get all terms in the same equivalence class.
Sourcepub fn get_equality_explanation(
&mut self,
lhs: TermId,
rhs: TermId,
) -> Option<EqualityExplanation>
pub fn get_equality_explanation( &mut self, lhs: TermId, rhs: TermId, ) -> Option<EqualityExplanation>
Get explanation for why two terms are equal.
Sourcepub fn get_pending_equalities(&self) -> &[Equality]
pub fn get_pending_equalities(&self) -> &[Equality]
Get pending equalities to propagate.
Sourcepub fn flush_equalities(&mut self)
pub fn flush_equalities(&mut self)
Flush pending equalities (send to theories).
Get all shared terms.
Sourcepub fn get_interface_terms(&self) -> Vec<TermId> ⓘ
pub fn get_interface_terms(&self) -> Vec<TermId> ⓘ
Get interface terms (minimal shared terms).
Sourcepub fn minimize_interface(&mut self) -> Vec<TermId> ⓘ
pub fn minimize_interface(&mut self) -> Vec<TermId> ⓘ
Minimize interface terms.
Reduce the number of interface terms by using canonical representatives.
Sourcepub fn push_decision_level(&mut self)
pub fn push_decision_level(&mut self)
Push a new decision level.
Sourcepub fn backtrack(&mut self, level: DecisionLevel) -> Result<(), String>
pub fn backtrack(&mut self, level: DecisionLevel) -> Result<(), String>
Backtrack to a decision level.
Sourcepub fn stats(&self) -> &SharedTermsStats
pub fn stats(&self) -> &SharedTermsStats
Get statistics.
Sourcepub fn process_congruences(&mut self) -> Result<(), String>
pub fn process_congruences(&mut self) -> Result<(), String>
Process pending congruences in e-graph.
Detect new shared terms based on current theory assignments.
Sourcepub fn build_explanation_chain(
&self,
equalities: &[Equality],
) -> Result<EqualityExplanation, String>
pub fn build_explanation_chain( &self, equalities: &[Equality], ) -> Result<EqualityExplanation, String>
Build equality explanation chain.
Trait Implementations§
Auto Trait Implementations§
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
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>
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>
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