pub struct CodeTree { /* private fields */ }Expand description
E-matching code tree for multi-pattern matching.
Implementations§
Source§impl CodeTree
impl CodeTree
Sourcepub fn stats(&self) -> &CodeTreeStats
pub fn stats(&self) -> &CodeTreeStats
Get statistics.
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset statistics.
Sourcepub fn add_patterns(
&mut self,
quantifier: TermId,
patterns: &[Vec<TermId>],
var_mapping: &FxHashMap<Spur, PatternVar>,
tm: &TermManager,
)
pub fn add_patterns( &mut self, quantifier: TermId, patterns: &[Vec<TermId>], var_mapping: &FxHashMap<Spur, PatternVar>, tm: &TermManager, )
Compile and add patterns from a quantified formula.
§Arguments
quantifier- The quantified formula term IDpatterns- List of pattern lists (multi-patterns)var_mapping- Maps bound variable names to pattern variable IDstm- Term manager for accessing term structure
Sourcepub fn add_ground_term(&mut self, term: TermId, tm: &TermManager)
pub fn add_ground_term(&mut self, term: TermId, tm: &TermManager)
Add a ground term to the database.
This term will be considered for matching against patterns.
Sourcepub fn find_matches(&mut self, tm: &TermManager) -> Vec<Match>
pub fn find_matches(&mut self, tm: &TermManager) -> Vec<Match>
Find all matches for the indexed patterns against the ground terms.
Returns a list of matches (quantifier, pattern_index, substitution).
Sourcepub fn clear_ground_terms(&mut self)
pub fn clear_ground_terms(&mut self)
Clear all ground terms and reset matching state.
Sourcepub fn remove_quantifier(&mut self, quantifier: TermId)
pub fn remove_quantifier(&mut self, quantifier: TermId)
Remove patterns associated with a quantifier.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeTree
impl RefUnwindSafe for CodeTree
impl Send for CodeTree
impl Sync for CodeTree
impl Unpin for CodeTree
impl UnwindSafe for CodeTree
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