Trait ai_kit::core::Operation [] [src]

pub trait Operation<T: BindingsValue, U: Unify<T>>: Clone + Debug + Display + Eq + PartialEq + Deserialize + Serialize {
    fn constraints<'a>(&'a self) -> Vec<&'a Constraint>;
    fn snowflake(&self, _: String) -> Self;
    fn apply_match(&self, _bindings: &Bindings<T>) -> Option<Vec<U>>;
    fn r_apply_match(&self, _fact: &U) -> Option<(Vec<U>, Bindings<T>)>;

    fn input_patterns(&self) -> Vec<U> { ... }
}

A type that implements Operation constructs new Unifys from existing Unifys that match it's input patterns.

Required Methods

Creates a new instance of this Operation where all variables are unique

Given some bindings, construct a set of output patterns

Given some bindings, construct a set of input patterns that would match

Provided Methods

Return a vector of input patterns that must be unified with in order to apply this Operation.

Implementors