Struct egg::TreeTerm [−][src]
pub struct TreeTerm<L: Language> {
pub node: L,
pub backward_rule: Option<Symbol>,
pub forward_rule: Option<Symbol>,
pub child_proofs: Vec<TreeExplanation<L>>,
}
Expand description
An explanation for a term and its equivalent children.
Each child is a proof transforming the initial child into the final child term.
The initial term is given by taking each first sub-term
in each child_proofs
recursivly.
The final term is given by all of the final terms in each child_proofs
.
If forward_rule
is provided, then this TreeTerm’s initial term
can be derived from the previous
TreeTerm by applying the rule.
Similarly, if backward_rule
is provided,
then the previous TreeTerm’s final term is given by applying the rule to this TreeTerm’s initial term.
TreeTerms are flattened by first flattening child_proofs
, then wrapping
the flattened proof with this TreeTerm’s node.
Fields
node: L
A node representing this TreeTerm’s operator. The children of the node should be ignored.
backward_rule: Option<Symbol>
A rule rewritting this TreeTerm’s initial term back to the last TreeTerm’s final term.
forward_rule: Option<Symbol>
A rule rewriting the last TreeTerm’s final term to this TreeTerm’s initial term.
child_proofs: Vec<TreeExplanation<L>>
A list of child proofs, each transforming the initial term to the final term for that child.
Implementations
Construct a new TreeTerm given its node and child_proofs.
Construct the FlatExplanation
for this TreeTerm.
Trait Implementations
Auto Trait Implementations
impl<L> RefUnwindSafe for TreeTerm<L> where
L: RefUnwindSafe,
impl<L> UnwindSafe for TreeTerm<L> where
L: UnwindSafe + RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more