pub fn symbolize_expression(&self, expression: &il::Expression) -> Result<il::Expression> {
        Ok(match *expression {
            il::Expression::Scalar(ref scalar) => match self.scalars.get(scalar.name()) {
                Some(expression_hash) => HASH_EXPRESSION_STORE
                    .read()
                    .unwrap()
                    .expression(expression_hash)?,
                None => il::Expression::Scalar(scalar.clone()),
            },
            il::Expression::Constant(_) => expression.clone(),
            il::Expression::Add(ref lhs, ref rhs) => il::Expression::add(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Sub(ref lhs, ref rhs) => il::Expression::sub(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Mul(ref lhs, ref rhs) => il::Expression::mul(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Divu(ref lhs, ref rhs) => il::Expression::divu(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Modu(ref lhs, ref rhs) => il::Expression::modu(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Divs(ref lhs, ref rhs) => il::Expression::divs(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Mods(ref lhs, ref rhs) => il::Expression::mods(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::And(ref lhs, ref rhs) => il::Expression::and(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Or(ref lhs, ref rhs) => il::Expression::or(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Xor(ref lhs, ref rhs) => il::Expression::xor(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Shl(ref lhs, ref rhs) => il::Expression::shl(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Shr(ref lhs, ref rhs) => il::Expression::shr(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Cmpeq(ref lhs, ref rhs) => il::Expression::cmpeq(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Cmpneq(ref lhs, ref rhs) => il::Expression::cmpneq(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Cmplts(ref lhs, ref rhs) => il::Expression::cmplts(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Cmpltu(ref lhs, ref rhs) => il::Expression::cmpltu(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Zext(bits, ref src) => {
                il::Expression::zext(bits, self.symbolize_expression(src)?)?
            }
            il::Expression::Sext(bits, ref src) => {
                il::Expression::sext(bits, self.symbolize_expression(src)?)?
            }
            il::Expression::Trun(bits, ref src) => {
                il::Expression::trun(bits, self.symbolize_expression(src)?)?
            }
            il::Expression::Ite(ref cond, ref then, ref else_) => il::Expression::ite(
                self.symbolize_expression(cond)?,
                self.symbolize_expression(then)?,
                self.symbolize_expression(else_)?,
            )?,
        })
    }
/// Symbolize an expression, replacing all scalars with the values
/// stored in this `State`.
Symbolize an expression, replacing all scalars with the values
stored in this `State`.
Symbolize an expression replacing all scalars with the values stored in this ` State ` .
pub fn symbolize_expression(&self, expression: &il::Expression) -> Result<il::Expression> {
        Ok(match *expression {
            il::Expression::Scalar(ref scalar) => match self.scalars.get(scalar.name()) {
                Some(expression_hash) => HASH_EXPRESSION_STORE
                    .read()
                    .unwrap()
                    .expression(expression_hash)?,
                None => il::Expression::Scalar(scalar.clone()),
            },
            il::Expression::Constant(_) => expression.clone(),
            il::Expression::Add(ref lhs, ref rhs) => il::Expression::add(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Sub(ref lhs, ref rhs) => il::Expression::sub(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Mul(ref lhs, ref rhs) => il::Expression::mul(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Divu(ref lhs, ref rhs) => il::Expression::divu(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Modu(ref lhs, ref rhs) => il::Expression::modu(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Divs(ref lhs, ref rhs) => il::Expression::divs(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Mods(ref lhs, ref rhs) => il::Expression::mods(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::And(ref lhs, ref rhs) => il::Expression::and(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Or(ref lhs, ref rhs) => il::Expression::or(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Xor(ref lhs, ref rhs) => il::Expression::xor(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Shl(ref lhs, ref rhs) => il::Expression::shl(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Shr(ref lhs, ref rhs) => il::Expression::shr(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Cmpeq(ref lhs, ref rhs) => il::Expression::cmpeq(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Cmpneq(ref lhs, ref rhs) => il::Expression::cmpneq(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Cmplts(ref lhs, ref rhs) => il::Expression::cmplts(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Cmpltu(ref lhs, ref rhs) => il::Expression::cmpltu(
                self.symbolize_expression(lhs)?,
                self.symbolize_expression(rhs)?,
            )?,
            il::Expression::Zext(bits, ref src) => {
                il::Expression::zext(bits, self.symbolize_expression(src)?)?
            }
            il::Expression::Sext(bits, ref src) => {
                il::Expression::sext(bits, self.symbolize_expression(src)?)?
            }
            il::Expression::Trun(bits, ref src) => {
                il::Expression::trun(bits, self.symbolize_expression(src)?)?
            }
            il::Expression::Ite(ref cond, ref then, ref else_) => il::Expression::ite(
                self.symbolize_expression(cond)?,
                self.symbolize_expression(then)?,
                self.symbolize_expression(else_)?,
            )?,
        })
    }
pub fn symbolize_expression ( & self , expression : & il :: Expression ) -> Result < il :: Expression > { Ok ( match * expression { il :: Expression :: Scalar ( ref scalar ) => match self . scalars . get ( scalar . name ( ) ) { Some ( expression_hash ) => HASH_EXPRESSION_STORE . read ( ) . unwrap ( ) . expression ( expression_hash ) ? , None => il :: Expression :: Scalar ( scalar . clone ( ) ) , } , il :: Expression :: Constant ( _ ) => expression . clone ( ) , il :: Expression :: Add ( ref lhs , ref rhs ) => il :: Expression :: add ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Sub ( ref lhs , ref rhs ) => il :: Expression :: sub ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Mul ( ref lhs , ref rhs ) => il :: Expression :: mul ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Divu ( ref lhs , ref rhs ) => il :: Expression :: divu ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Modu ( ref lhs , ref rhs ) => il :: Expression :: modu ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Divs ( ref lhs , ref rhs ) => il :: Expression :: divs ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Mods ( ref lhs , ref rhs ) => il :: Expression :: mods ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: And ( ref lhs , ref rhs ) => il :: Expression :: and ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Or ( ref lhs , ref rhs ) => il :: Expression :: or ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Xor ( ref lhs , ref rhs ) => il :: Expression :: xor ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Shl ( ref lhs , ref rhs ) => il :: Expression :: shl ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Shr ( ref lhs , ref rhs ) => il :: Expression :: shr ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Cmpeq ( ref lhs , ref rhs ) => il :: Expression :: cmpeq ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Cmpneq ( ref lhs , ref rhs ) => il :: Expression :: cmpneq ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Cmplts ( ref lhs , ref rhs ) => il :: Expression :: cmplts ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Cmpltu ( ref lhs , ref rhs ) => il :: Expression :: cmpltu ( self . symbolize_expression ( lhs ) ? , self . symbolize_expression ( rhs ) ? , ) ? , il :: Expression :: Zext ( bits , ref src ) => { il :: Expression :: zext ( bits , self . symbolize_expression ( src ) ? ) ? } il :: Expression :: Sext ( bits , ref src ) => { il :: Expression :: sext ( bits , self . symbolize_expression ( src ) ? ) ? } il :: Expression :: Trun ( bits , ref src ) => { il :: Expression :: trun ( bits , self . symbolize_expression ( src ) ? ) ? } il :: Expression :: Ite ( ref cond , ref then , ref else_ ) => il :: Expression :: ite ( self . symbolize_expression ( cond ) ? , self . symbolize_expression ( then ) ? , self . symbolize_expression ( else_ ) ? , ) ? , } ) }
Symbolize an expression, replacing all scalars with the values
stored in this `State`.
Symbolize an expression replacing all scalars with the values stored in this ` State ` .
&self
expression
&il::Expression