pub struct ProgramSynthesizer { /* private fields */ }Expand description
Program synthesis engine for generating code from specifications
Implementations§
Source§impl ProgramSynthesizer
impl ProgramSynthesizer
Sourcepub fn with_strategy(strategy: SynthesisStrategy) -> Self
pub fn with_strategy(strategy: SynthesisStrategy) -> Self
Create synthesizer with custom strategy
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
Set maximum search depth
Sourcepub fn with_timeout(self, timeout_ms: u64) -> Self
pub fn with_timeout(self, timeout_ms: u64) -> Self
Set synthesis timeout
Sourcepub fn synthesize_from_examples(
&self,
examples: &[SynthesisExample],
) -> JitResult<SynthesisResult>
pub fn synthesize_from_examples( &self, examples: &[SynthesisExample], ) -> JitResult<SynthesisResult>
Synthesize program from input/output examples
Sourcepub fn synthesize_from_spec(
&self,
specification: &str,
) -> JitResult<SynthesisResult>
pub fn synthesize_from_spec( &self, specification: &str, ) -> JitResult<SynthesisResult>
Synthesize program from specification
Sourcepub fn verify_program(
&self,
graph: &ComputationGraph,
examples: &[SynthesisExample],
) -> JitResult<f64>
pub fn verify_program( &self, graph: &ComputationGraph, examples: &[SynthesisExample], ) -> JitResult<f64>
Verify a synthesized program against examples
Sourcepub fn optimize_program(
&self,
graph: ComputationGraph,
) -> JitResult<ComputationGraph>
pub fn optimize_program( &self, graph: ComputationGraph, ) -> JitResult<ComputationGraph>
Optimize a synthesized program
Trait Implementations§
Source§impl Clone for ProgramSynthesizer
impl Clone for ProgramSynthesizer
Source§fn clone(&self) -> ProgramSynthesizer
fn clone(&self) -> ProgramSynthesizer
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 moreSource§impl Debug for ProgramSynthesizer
impl Debug for ProgramSynthesizer
Auto Trait Implementations§
impl Freeze for ProgramSynthesizer
impl RefUnwindSafe for ProgramSynthesizer
impl Send for ProgramSynthesizer
impl Sync for ProgramSynthesizer
impl Unpin for ProgramSynthesizer
impl UnsafeUnpin for ProgramSynthesizer
impl UnwindSafe for ProgramSynthesizer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more