Skip to main content

EGraphRead

Trait EGraphRead 

Source
pub trait EGraphRead: EGraphCore {
    type Hasher;

    // Required methods
    fn find(
        &self,
        class: ClassId<Self::Class>,
    ) -> Result<ClassId<Self::Class>, NoNode>;
    fn canonicalize(
        &self,
        node: &mut ENode<Self::FuncSymbol, Self::Class>,
    ) -> Result<bool, NoNode>;
    fn is_canonical(
        &self,
        node: &ENode<Self::FuncSymbol, Self::Class>,
    ) -> Result<bool, NoNode>;
    fn class_nodes(&self) -> ClassNodes<'_, Self, Self::Hasher>;
    fn dot<M: Formatter<Self::FuncSymbol>>(&self, f: M) -> Graph<'static>;
}

Required Associated Types§

Required Methods§

Source

fn find( &self, class: ClassId<Self::Class>, ) -> Result<ClassId<Self::Class>, NoNode>

Source

fn canonicalize( &self, node: &mut ENode<Self::FuncSymbol, Self::Class>, ) -> Result<bool, NoNode>

Returns true if the node was modified

Source

fn is_canonical( &self, node: &ENode<Self::FuncSymbol, Self::Class>, ) -> Result<bool, NoNode>

Source

fn class_nodes(&self) -> ClassNodes<'_, Self, Self::Hasher>

Source

fn dot<M: Formatter<Self::FuncSymbol>>(&self, f: M) -> Graph<'static>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F: Eq + Hash, C, S: Clone + BuildHasher> EGraphRead for mid_tools::egraph::fast::EGraph<F, C, S>

Source§

impl<F: Ord + Hash, C> EGraphRead for mid_tools::egraph::congr::EGraph<F, C>

Source§

impl<F: Ord + Hash, C> EGraphRead for mid_tools::egraph::reference::EGraph<F, C>