diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce8e1df..5b6689e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -135,15 +135,10 @@ jobs: - uses: taiki-e/install-action@v2 with: tool: cargo-tarpaulin - - run: cargo tarpaulin --verbose --lib --examples --workspace --exclude liberty-macros --exclude-files dev/* --all-features --out xml html --output-dir target/codecov + - run: cargo tarpaulin --verbose --release --lib --examples --workspace --exclude liberty-macros --exclude-files dev/* --all-features --out xml html --output-dir target/codecov - name: Upload to codecov.io uses: codecov/codecov-action@v4 with: files: target/codecov/cobertura.xml token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true - # - name: Archive code coverage results - # uses: actions/upload-artifact@v4 - # with: - # name: code-coverage-report - # path: target/codecov/cobertura.xml \ No newline at end of file + fail_ci_if_error: true \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 65d1be5..9e08d7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ members = ["macros", "dev", "dev/utils", "dev/include/liberty2json"] [workspace.package] -version = "0.7.0" +version = "0.7.1" license = "MIT" edition = "2021" authors = ["Junzhuo "] @@ -60,7 +60,6 @@ nom = "7.1" derivative = "2.2" ryu = "1.0" itoa = "1.0" -# uom = { version = "0.36.0", default-features = false, features = ["f64", "si", "std", "serde"] } biodivine-lib-bdd = { version = "0.5.22", features = ["serde"] } mut_set = "0.5.6" # mut_set = { version="0.5.2", features = ["__dbg_disable_mem_layout"] } @@ -97,12 +96,13 @@ nom.workspace = true derivative.workspace = true ryu.workspace = true itoa.workspace = true -# uom.workspace = true biodivine-lib-bdd.workspace = true mut_set.workspace = true duplicate.workspace = true num-traits.workspace = true +# TODO: remove it lazy_static.workspace = true +# TODO: remove it prettytable-rs.workspace = true cfg-if.workspace = true diff --git a/src/expression/boolean_expression/logic_impl.rs b/src/expression/boolean_expression/logic_impl.rs index 219941c..eda0da1 100644 --- a/src/expression/boolean_expression/logic_impl.rs +++ b/src/expression/boolean_expression/logic_impl.rs @@ -262,6 +262,16 @@ impl Not for State { } } +#[expect( + clippy::indexing_slicing, + clippy::arithmetic_side_effects, + clippy::as_conversions +)] +const fn lut(l: State, r: State, lut: &'static [State; 196]) -> State { + let idx = (l as u8) * 14 + (r as u8); + lut[idx as usize] +} + impl State { const LUT_AND: [Self; 196] = [ Self::L, @@ -463,13 +473,8 @@ impl State { ]; #[must_use] #[inline] - #[expect( - clippy::indexing_slicing, - clippy::arithmetic_side_effects, - clippy::as_conversions - )] const fn lut_bitand(self, rhs: Self) -> Self { - Self::LUT_AND[(self as usize) * 14 + (rhs as usize)] + lut(self, rhs, &Self::LUT_AND) } #[must_use] #[inline] @@ -878,13 +883,8 @@ impl State { ]; #[must_use] #[inline] - #[expect( - clippy::indexing_slicing, - clippy::arithmetic_side_effects, - clippy::as_conversions - )] const fn lut_bitor(self, rhs: Self) -> Self { - Self::LUT_OR[(self as usize) * 14 + (rhs as usize)] + lut(self, rhs, &Self::LUT_OR) } #[must_use] #[inline] @@ -1293,13 +1293,8 @@ impl State { ]; #[must_use] #[inline] - #[expect( - clippy::indexing_slicing, - clippy::arithmetic_side_effects, - clippy::as_conversions - )] const fn lut_bitxor(self, rhs: Self) -> Self { - Self::LUT_XOR[(self as usize) * 14 + (rhs as usize)] + lut(self, rhs, &Self::LUT_XOR) } #[must_use] #[inline]