Lowering

Trait Lowering 

Source
pub trait Lowering: ExprLowering {
    // Required methods
    fn generate_constraint(
        &self,
        op: CmpOp,
        lhs: &Self::CellOutput,
        rhs: &Self::CellOutput,
    ) -> Result<()>;
    fn num_constraints(&self) -> usize;
    fn generate_comment(&self, s: String) -> Result<()>;
    fn generate_assume_deterministic(&self, func_io: FuncIO) -> Result<()>;
    fn generate_call(
        &self,
        name: &str,
        selectors: &[Self::CellOutput],
        outputs: &[FuncIO],
    ) -> Result<()>;
    fn generate_assert(&self, expr: &Self::CellOutput) -> Result<()>;
    fn generate_post_condition(&self, expr: &Self::CellOutput) -> Result<()>;

    // Provided method
    fn checked_generate_constraint(
        &self,
        op: CmpOp,
        lhs: &Self::CellOutput,
        rhs: &Self::CellOutput,
    ) -> Result<()> { ... }
}

Required Methods§

Source

fn generate_constraint( &self, op: CmpOp, lhs: &Self::CellOutput, rhs: &Self::CellOutput, ) -> Result<()>

Source

fn num_constraints(&self) -> usize

Source

fn generate_comment(&self, s: String) -> Result<()>

Source

fn generate_assume_deterministic(&self, func_io: FuncIO) -> Result<()>

Source

fn generate_call( &self, name: &str, selectors: &[Self::CellOutput], outputs: &[FuncIO], ) -> Result<()>

Source

fn generate_assert(&self, expr: &Self::CellOutput) -> Result<()>

Source

fn generate_post_condition(&self, expr: &Self::CellOutput) -> Result<()>

Provided Methods§

Source

fn checked_generate_constraint( &self, op: CmpOp, lhs: &Self::CellOutput, rhs: &Self::CellOutput, ) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§