From 02481ae4fde4fddb8d5c1ae40bc5ed2f9337355d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Wed, 5 Feb 2020 02:47:21 +0100 Subject: [PATCH] Clean-up --- .gitignore | 2 +- Cargo.toml | 3 --- benches/test.rs | 20 -------------------- examples/test.rs | 26 -------------------------- 4 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 benches/test.rs delete mode 100644 examples/test.rs diff --git a/.gitignore b/.gitignore index 6936990..b1c7301 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ +/Cargo.lock /target **/*.rs.bk -Cargo.lock diff --git a/Cargo.toml b/Cargo.toml index 5360fcd..d62daa2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,3 @@ name = "foliage" version = "0.1.0" authors = ["Patrick Lühne "] edition = "2018" - -[dependencies] -nom = "5.0" diff --git a/benches/test.rs b/benches/test.rs deleted file mode 100644 index a793b58..0000000 --- a/benches/test.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![feature(test)] - -extern crate test; - -#[cfg(test)] -mod tests -{ - #[bench] - fn anthem_example_2(b: &mut test::Bencher) - { - let formulas = "forall XV1 (p(XV1) <-> (exists XU1 (exists X1, X2 (X1 = XU1 and exists N1, N2, N3 (N1 = 0 and N2 = n and N1 <= N3 and N3 <= N2 and X2 = N3) and X1 = X2) and exists X3, X4 (exists N4, N5 (X3 = (N4 * N5) and N4 = XU1 and N5 = XU1) and X4 = n and X3 <= X4) and XV1 = XU1))) -forall XV2 (q(XV2) <-> (exists XU2 (exists X5 (X5 = XU2 and p(X5)) and exists X6 (exists N6, N7 (X6 = (N6 + N7) and N6 = XU2 and N7 = 1) and not p(X6)) and XV2 = XU2)))"; - - b.iter(|| - { - let (i, _) = foliage::formulas(formulas).unwrap(); - assert_eq!(i, ""); - }); - } -} diff --git a/examples/test.rs b/examples/test.rs deleted file mode 100644 index fd59431..0000000 --- a/examples/test.rs +++ /dev/null @@ -1,26 +0,0 @@ -fn main() -> Result<(), Box> -{ - let formulas = "forall XV1 (p(XV1) <-> (exists XU1 (exists X1, X2 (X1 = XU1 and exists N1, N2, N3 (N1 = 0 and N2 = n and N1 <= N3 and N3 <= N2 and X2 = N3) and X1 = X2) and exists X3, X4 (exists N4, N5 (X3 = (N4 * N5) and N4 = XU1 and N5 = XU1) and X4 = n and X3 <= X4) and XV1 = XU1))) -forall XV2 (q(XV2) <-> (exists XU2 (exists X5 (X5 = XU2 and p(X5)) and exists X6 (exists N6, N7 (X6 = (N6 + N7) and N6 = XU2 and N7 = 1) and not p(X6)) and XV2 = XU2)))"; - - let (i, formulas) = foliage::formulas(formulas).unwrap(); - assert_eq!(i, ""); - - for formula in formulas - { - println!("{}", formula); - } - - let formulas = "forall XV1 (p(XV1) <-> exists XU1 (exists X1, X2 (X1 = XU1 and exists N1, N2, N3 (N1 = 0 and N2 = n and N1 <= N3 and N3 <= N2 and X2 = N3) and X1 = X2) and exists X3, X4 (exists N4, N5 (X3 = N4 * N5 and N4 = XU1 and N5 = XU1) and X4 = n and X3 <= X4) and XV1 = XU1)) -forall XV2 (q(XV2) <-> exists XU2 (exists X5 (X5 = XU2 and p(X5)) and exists X6 (exists N6, N7 (X6 = N6 + N7 and N6 = XU2 and N7 = 1) and not p(X6)) and XV2 = XU2))"; - - let (i, formulas) = foliage::formulas(formulas).unwrap(); - assert_eq!(i, ""); - - for formula in formulas - { - println!("{}", formula); - } - - Ok(()) -}