diff --git a/Cargo.toml b/Cargo.toml index 55726f6..cc7607f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "baa" -version = "0.14.5" +version = "0.15.0" edition = "2021" authors = ["Kevin Laeufer "] description = "BitVector and Array Arithmetic" @@ -14,8 +14,8 @@ rust-version = "1.73.0" [dependencies] # optional dependencies for crate interop -fraction = { version = "0.11", optional = true } -num-bigint = { version = "0.4", optional = true} +fraction = { version = "0.15", optional = true } +num-bigint = { version = "0.4", optional = true } serde = { version = "1.0", features = ["derive"], optional = true } diff --git a/src/bv/ops.rs b/src/bv/ops.rs index 5224ecf..95f1054 100644 --- a/src/bv/ops.rs +++ b/src/bv/ops.rs @@ -193,6 +193,15 @@ pub trait BitVecOps { self.width() == 1 && self.words()[0] == 0 } + #[deprecated(since = "0.15.0", note = "please use `is_true` instead")] + fn is_tru(&self) -> bool { + self.is_true() + } + #[deprecated(since = "0.15.0", note = "please use `is_false` instead")] + fn is_fals(&self) -> bool { + self.is_false() + } + fn is_zero(&self) -> bool { self.words().iter().all(|w| *w == 0) } diff --git a/src/bv/owned.rs b/src/bv/owned.rs index 0175ed2..01826db 100644 --- a/src/bv/owned.rs +++ b/src/bv/owned.rs @@ -207,6 +207,15 @@ impl BitVecValue { Self(FALSE_VALUE.clone()) } + #[deprecated(since = "0.15.0", note = "please use `new_true` instead")] + pub fn tru() -> Self { + Self::new_true() + } + #[deprecated(since = "0.15.0", note = "please use `new_false` instead")] + pub fn fals() -> Self { + Self::new_false() + } + #[cfg(feature = "bigint")] pub fn from_big_int(value: &num_bigint::BigInt, bits: WidthInt) -> Self { let mut out = Self::zero(bits);