You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mod.rs
    path of file: ./repos/prusti-dev/prusti-common/src/vir/optimizations/bitvectors
    
    the code of the file until where you have to start completion: //! If the program uses bit operations, change all integers to bitvectors.

use vir::polymorphic::{self as vir_poly, ExprFolder, ExprWalker, StmtFolder, StmtWalker};

pub fn uses_bit_operations(program: &vir_poly::Program) -> bool {
    let mut checker = Checker {
        uses_bit_operations: false,
    };
    vir_poly::walk_methods(&program.methods, &mut checker);
    checker.uses_bit_operations
}

struct Checker {
    uses_bit_operations: bool,
}

impl ExprWalker for Checker {
    fn walk_bin_op(&mut self, expr: &vir_poly::BinOp) {
        use vir_poly::BinaryOpKind::*;
        if matches!(
            expr.op_kind,
            BitAnd | BitOr | BitXor | Shl | LShr | AShr | Min | Max
        ) {
            self.uses_bit_operations = true;
        }
        ExprWalker::walk(self, &expr.left);
        ExprWalker::walk(self, &expr.right);
    }
}

impl StmtWalker for Checker {
    fn walk_expr(&mut self, expr: &vir_poly::Expr) {
        ExprWalker::walk(self, expr)
    }
}

pub fn replace_all_ints(program: &mut vir_poly::Program) {
    let mut replacer = Replacer { captured_bv: None };
    let mut sentinel_stmt = vir_poly::Stmt::comment("moved out stmt");
    for method in &mut program.methods {
        for block in &mut method.basic_blocks {
            for stmt in &mut block.stmts {
                std::mem::swap(&mut sentinel_stmt, stmt);
                replacer.captured_bv = None;
                sentinel_stmt = StmtFolder::fold(&mut replacer, se
    
    fn fold_const(&mut self, mut expr: vir_poly::ConstExpr) -> vir_poly::Expr {
        match &expr.value {
            vir_poly::Const::Int(value) => {
                let value = *value;
                if let Some(captured_bv) = &self.captured_bv {
                    let const_value = vir_poly::BitVectorConst {
                        value: value.to_string(),
                        typ: *captured_bv,
                    };
                    expr.value = vir_poly::Const::BitVector(const_value);
                }
            }
            vir_poly::Const::BigInt(_value) => {
                // if let Some(captured_bv) = &self.captured_bv {
                //     let const_value = match captured_bv {
                //         vir_poly::BitVector::BV8 => vir_poly::BitVectorConst::BV8(value.parse::<u8>().unwrap()),
                //         vir_poly::BitVector::BV16 => vir_poly::BitVectorConst::BV16(value.parse::<u16>().unwrap()),
                //         vir_poly::BitVector::BV32 => vir_poly::BitVectorConst::BV32(value.parse::<u32>().unwrap()),
                //         vir_poly::BitVector::BV64 => vir_poly::BitVectorConst::BV64(value.parse::<u64>().unwrap()),
                //         vir_poly::BitVector::BV128 => {
                //             vir_poly::BitVectorConst::BV128(value.parse::<u128>().unwrap())
                //         }
                //     };
                //     expr.value = vir_poly::Const::BitVector(const_value);
                // }
            }
            _ => {}
        };
        vir_poly::Expr::Const(expr)
    }