pub struct Transliterator {
pub mir: Mir,
pub consts: Vec<f64>,
pub reals: HashSet<Loc>,
pub num_params: usize,
pub count_params: usize,
pub count_outs: usize,
pub ft: HashSet<String>,
pub prog: Program,
}Fields§
§mir: Mir§consts: Vec<f64>§reals: HashSet<Loc>§num_params: usize§count_params: usize§count_outs: usize§ft: HashSet<String>§prog: ProgramImplementations§
Source§impl Transliterator
impl Transliterator
pub fn new(config: Config, df: Defuns) -> Transliterator
Trait Implementations§
Source§impl Composer for Transliterator
impl Composer for Transliterator
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_join( &mut self, lhs: &Slot, cond: &Slot, true_val: &Slot, false_val: &Slot, ) -> 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 set_num_params(&mut self, num_params: usize)
fn compile(&mut self) -> Result<Application>
Auto Trait Implementations§
impl Freeze for Transliterator
impl !RefUnwindSafe for Transliterator
impl !Send for Transliterator
impl !Sync for Transliterator
impl Unpin for Transliterator
impl UnsafeUnpin for Transliterator
impl !UnwindSafe for Transliterator
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> 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