Trait BaseSort

Source
pub trait BaseSort:
    Any
    + Send
    + Sync
    + Debug {
    type Base: BaseValue;

    // Required methods
    fn name(&self) -> &str;
    fn reconstruct_termdag(
        &self,
        _: &BaseValues,
        _: Value,
        _: &mut TermDag,
    ) -> Term;

    // Provided methods
    fn register_primitives(&self, _eg: &mut EGraph) { ... }
    fn to_arcsort(self) -> ArcSort
       where Self: Sized { ... }
}
Expand description

A “default” implementation of Sort for simple types which just want to put some data in the e-graph. If you implement this trait, do not implement Sort or ContainerSort. Use add_base_sortto register base sorts with theEGraph. See Sortfor documentation of the methods. Do not overrideto_arcsort`.

Required Associated Types§

Required Methods§

Source

fn name(&self) -> &str

Source

fn reconstruct_termdag(&self, _: &BaseValues, _: Value, _: &mut TermDag) -> Term

Provided Methods§

Source

fn register_primitives(&self, _eg: &mut EGraph)

Source

fn to_arcsort(self) -> ArcSort
where Self: Sized,

Implementors§