From 7a63180b97c107a8cd4c1e8790ddf9ea03ab4ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20L=C3=A4ufer?= Date: Wed, 4 Dec 2024 13:22:10 -0500 Subject: [PATCH] expr: remove redundant mask function --- patronus/src/btor2/parse.rs | 2 +- patronus/src/expr/context.rs | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/patronus/src/btor2/parse.rs b/patronus/src/btor2/parse.rs index ad89d03..9d9a461 100644 --- a/patronus/src/btor2/parse.rs +++ b/patronus/src/btor2/parse.rs @@ -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) } } diff --git a/patronus/src/expr/context.rs b/patronus/src/expr/context.rs index 40f5513..d57496c 100644 --- a/patronus/src/expr/context.rs +++ b/patronus/src/expr/context.rs @@ -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)) } @@ -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) }