Trait ai_kit::core::Unify [] [src]

pub trait Unify<T: BindingsValue>: Clone + Debug + Display + Eq + Serialize + Deserialize + PartialEq {
    fn unify(&self, _: &Self, _: &Bindings<T>) -> Option<Bindings<T>>;
fn apply_bindings(&self, _: &Bindings<T>) -> Option<Self>;
fn variables(&self) -> Vec<String>;
fn rename_variables(&self, _: &HashMap<String, String>) -> Self;
fn nil() -> Self; }

A type must implement the Unify trait for it to be unifiable - this only requirement for a data structure that the algorithms in this library operate on.

Required Methods

Check if this structure can be unified with another of the same type.

Given some bindings, construct a new instance with any variables replaced by their values

Return all variables in this tructure

Rename any variables in this structure with another variable name

Return a 'nil' sentinel value unique to this type of structure

Implementors