pub struct Translator { /* private fields */ }Expand description
Translates Symbolica IR (generated by export_instructions) into a Symjit Model
Implementations§
Source§impl Translator
impl Translator
pub fn new(config: Config, df: Defuns) -> Translator
pub fn parse_model(&mut self, model: &SymbolicaModel) -> Result<()>
Trait Implementations§
Source§impl Clone for Translator
impl Clone for Translator
Source§fn clone(&self) -> Translator
fn clone(&self) -> Translator
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 Composer for Translator
impl Composer for Translator
fn append_constant(&mut self, z: Complex<f64>) -> Result<usize>
fn append_add( &mut self, lhs: &Slot, args: &[Slot], num_reals: usize, ) -> Result<()>
fn append_mul( &mut self, lhs: &Slot, args: &[Slot], num_reals: usize, ) -> Result<()>
fn append_pow( &mut self, lhs: &Slot, arg: &Slot, p: i64, is_real: bool, ) -> Result<()>
fn append_powf( &mut self, lhs: &Slot, arg: &Slot, p: &Slot, is_real: bool, ) -> Result<()>
fn append_assign(&mut self, lhs: &Slot, rhs: &Slot) -> Result<()>
fn append_label(&mut self, id: usize) -> Result<()>
fn append_if_else(&mut self, cond: &Slot, id: usize) -> Result<()>
fn append_goto(&mut self, id: usize) -> Result<()>
fn append_external_fun( &mut self, lhs: &Slot, op: &str, args: &[Slot], ) -> Result<()>
fn append_fun( &mut self, lhs: &Slot, fun: &BuiltinSymbol, arg: &Slot, is_real: bool, ) -> Result<()>
fn append_join( &mut self, lhs: &Slot, cond: &Slot, true_val: &Slot, false_val: &Slot, ) -> Result<()>
fn set_num_params(&mut self, num_params: usize)
fn compile(&mut self) -> Result<Application>
Auto Trait Implementations§
impl Freeze for Translator
impl RefUnwindSafe for Translator
impl Send for Translator
impl Sync for Translator
impl Unpin for Translator
impl UnsafeUnpin for Translator
impl UnwindSafe for Translator
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