pub enum FuncProgram {
Lit(String),
Var(String),
Lam(String, Box<FuncProgram>),
App(Box<FuncProgram>, Box<FuncProgram>),
ListCase {
scrutinee: Box<FuncProgram>,
nil_branch: Box<FuncProgram>,
cons_head: String,
cons_tail: String,
cons_branch: Box<FuncProgram>,
},
Rec(Box<FuncProgram>),
}Expand description
A recursive program structure for inductive synthesis.
Variants§
Lit(String)
A literal (constant) value.
Var(String)
A variable reference.
Lam(String, Box<FuncProgram>)
Lambda abstraction.
App(Box<FuncProgram>, Box<FuncProgram>)
Application.
ListCase
Pattern match on a list.
Rec(Box<FuncProgram>)
Recursive call (for structurally recursive programs).
Implementations§
Trait Implementations§
Source§impl Clone for FuncProgram
impl Clone for FuncProgram
Source§fn clone(&self) -> FuncProgram
fn clone(&self) -> FuncProgram
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 FuncProgram
impl RefUnwindSafe for FuncProgram
impl Send for FuncProgram
impl Sync for FuncProgram
impl Unpin for FuncProgram
impl UnsafeUnpin for FuncProgram
impl UnwindSafe for FuncProgram
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