Struct term_rewriting::Rule
[−]
[src]
pub struct Rule { /* fields omitted */ }
Methods
impl Rule
[src]
pub fn new(lhs: Term, rhs: Vec<Term>) -> Option<Rule>
[src]
Construct a rewrite rule from a left-hand-side (LHS) Term
with one
or more right-hand-side (RHS) Term
s. Returns None
if the rule is
not valid.
Valid rules meet two conditions:
lhs
is anApplication
. This prevents a single rule from matching all possible terms- A
Term
inrhs
can only use aVariable
if it appears inlhs
. This prevents rewrites from inventing arbitrary terms.
Trait Implementations
impl Debug for Rule
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more