use std::hash::Hash;
use std::fmt::Debug;
#[derive(Debug)]
pub struct ExpandedClauseNodes<V, K> {
pub variables: Vec<V>,
pub clauses: usize,
pub nodes: Vec<K>,
}
pub trait PatternProvider: Debug {
type PatternNodeKey: Copy + Hash + Debug + PartialEq + Eq;
type PatternNodeKind: Copy + Hash + Debug + PartialEq + Eq;
type CfgVariable: Copy + Hash + Debug + PartialEq + Eq;
const WILDCARD: Self::PatternNodeKind;
fn get_root(&self)
-> ExpandedClauseNodes<
Self::CfgVariable, Self::PatternNodeKey>;
fn kind_includes(&self, kind: Self::PatternNodeKind,
key: Self::PatternNodeKey) -> bool;
fn expand_clause_nodes(&mut self, clause_nodes: Vec<Self::PatternNodeKey>)
-> ExpandedClauseNodes<
Self::CfgVariable, Self::PatternNodeKey>;
fn get_kind(&self, key: Self::PatternNodeKey) -> Self::PatternNodeKind;
fn is_wildcard(&self, kind: Self::PatternNodeKind) -> bool {
kind == Self::WILDCARD
}
fn get_wildcard(&self) -> Self::PatternNodeKind {
Self::WILDCARD
}
}