Skip to content

Commit

Permalink
expr: remove redundant mask function
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Dec 4, 2024
1 parent d16b3f9 commit 7a63180
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion patronus/src/btor2/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ impl<'a> Parser<'a> {
(e, 4)
} else {
// redand is true iff all bits are one
let mask = self.ctx.mask(width);
let mask = self.ctx.ones(width);
(self.ctx.bv_equal(e, mask), 4)
}
}
Expand Down
6 changes: 0 additions & 6 deletions patronus/src/expr/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ impl Context {
self.fals_expr_ref
}

pub fn mask(&mut self, width: WidthInt) -> ExprRef {
self.bv_lit(&BitVecValue::ones(width))
}
pub fn one(&mut self, width: WidthInt) -> ExprRef {
self.bv_lit(&BitVecValue::from_u64(1, width))
}
Expand Down Expand Up @@ -404,9 +401,6 @@ impl<'a> Builder<'a> {
self.ctx.borrow_mut().zero_array(tpe)
}

pub fn mask(&self, width: WidthInt) -> ExprRef {
self.ctx.borrow_mut().mask(width)
}
pub fn one(&self, width: WidthInt) -> ExprRef {
self.ctx.borrow_mut().one(width)
}
Expand Down

0 comments on commit 7a63180

Please sign in to comment.