pub struct TreeTerm<L: Language> {
    pub node: L,
    pub backward_rule: Option<Symbol>,
    pub forward_rule: Option<Symbol>,
    pub child_proofs: Vec<TreeExplanation<L>>,
    /* private fields */
}
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 recursively. 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 rewriting 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.

Get a FlatTerm representing the first term in this proof.

Get a FlatTerm representing the final term in this proof.

Construct the FlatExplanation for this TreeTerm.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.