pub struct DerivationNode {
pub goal: (String, String),
pub rule: Option<DeductiveRule>,
pub children: Vec<DerivationNode>,
pub program: Option<String>,
}Expand description
A deductive synthesis derivation tree node.
Fields§
§goal: (String, String)The synthesis goal at this node: (precondition, postcondition).
rule: Option<DeductiveRule>The rule applied to discharge this goal.
children: Vec<DerivationNode>Child derivations.
program: Option<String>The synthesised program fragment (leaf nodes only).
Implementations§
Source§impl DerivationNode
impl DerivationNode
Sourcepub fn leaf(
pre: impl Into<String>,
post: impl Into<String>,
program: impl Into<String>,
) -> Self
pub fn leaf( pre: impl Into<String>, post: impl Into<String>, program: impl Into<String>, ) -> Self
Create a leaf node with a concrete program.
Sourcepub fn internal(
pre: impl Into<String>,
post: impl Into<String>,
rule: DeductiveRule,
children: Vec<DerivationNode>,
) -> Self
pub fn internal( pre: impl Into<String>, post: impl Into<String>, rule: DeductiveRule, children: Vec<DerivationNode>, ) -> Self
Create an internal node with a rule and sub-goals.
Sourcepub fn extract_program(&self) -> String
pub fn extract_program(&self) -> String
Extract the full synthesised program by recursively assembling sub-trees.
Trait Implementations§
Source§impl Clone for DerivationNode
impl Clone for DerivationNode
Source§fn clone(&self) -> DerivationNode
fn clone(&self) -> DerivationNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DerivationNode
impl RefUnwindSafe for DerivationNode
impl Send for DerivationNode
impl Sync for DerivationNode
impl Unpin for DerivationNode
impl UnsafeUnpin for DerivationNode
impl UnwindSafe for DerivationNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more