From 56f85306d9fcb33994a992fc4d7e1c4a6ebb2a0d Mon Sep 17 00:00:00 2001 From: Tim Beurskens Date: Thu, 20 Jul 2023 13:56:45 +0200 Subject: [PATCH 1/3] add about section to clap tool --- max_clique_gen/src/main.rs | 2 +- n_queens_gen/src/main.rs | 2 +- random_graph_gen/src/main.rs | 2 +- sudoku_gen/src/main.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/max_clique_gen/src/main.rs b/max_clique_gen/src/main.rs index 0e996a0..4c5910c 100644 --- a/max_clique_gen/src/main.rs +++ b/max_clique_gen/src/main.rs @@ -8,7 +8,7 @@ use std::io::*; use std::path::PathBuf; #[derive(Parser, Debug)] -#[clap(author, version, long_about = None)] +#[clap(author, version, about, long_about = None)] struct Args { #[clap(value_parser, value_name = "INPUT")] /// Input file graph in csv edge-list format diff --git a/n_queens_gen/src/main.rs b/n_queens_gen/src/main.rs index ea30b7c..029e3fd 100644 --- a/n_queens_gen/src/main.rs +++ b/n_queens_gen/src/main.rs @@ -8,7 +8,7 @@ use std::io::*; use std::path::PathBuf; #[derive(Parser, Debug)] -#[clap(author, version, long_about = None)] +#[clap(author, version, about, long_about = None)] struct Args { #[clap(value_parser, value_name = "OUTPUT")] /// The output rsbdd file diff --git a/random_graph_gen/src/main.rs b/random_graph_gen/src/main.rs index 083ae09..79b750d 100644 --- a/random_graph_gen/src/main.rs +++ b/random_graph_gen/src/main.rs @@ -8,7 +8,7 @@ use std::io::*; use std::path::PathBuf; #[derive(Parser, Debug)] -#[clap(author, version, long_about = None)] +#[clap(author, version, about, long_about = None)] struct Args { #[clap(value_parser, value_name = "VERTICES")] /// The number of vertices in the output graph diff --git a/sudoku_gen/src/main.rs b/sudoku_gen/src/main.rs index 1306008..69ae63b 100644 --- a/sudoku_gen/src/main.rs +++ b/sudoku_gen/src/main.rs @@ -8,7 +8,7 @@ use std::path::PathBuf; use clap::Parser; #[derive(Parser, Debug)] -#[clap(author, version, long_about = None)] +#[clap(author, version, about, long_about = None)] struct Args { #[clap(value_parser, value_name = "INPUT")] /// The input sudoku file From 0fcdc2f47a5ac0ec0326311e3822dc106074c27b Mon Sep 17 00:00:00 2001 From: Tim Beurskens Date: Thu, 20 Jul 2023 13:57:18 +0200 Subject: [PATCH 2/3] update readme --- README.md | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index cd53aff..d978a65 100644 --- a/README.md +++ b/README.md @@ -248,13 +248,14 @@ Options: -m, --model Compute a single satisfying model as output -v, --vars Print all satisfying variables leading to a truth value -f, --filter Only show true or false entries in the output [default: Any] - -b, --benchmark Repeat the solving process n times for more accurate performance reports + -b, --benchmark Repeat the solving process n times for more accurate performance + reports -g, --plot Use GNUPlot to plot the runtime distribution -e, --evaluate Parse the formula as string -o, --ordering Read a custom variable ordering from file -r, --export-ordering Export the automatically derived ordering to stdout - -h, --help Print help information - -V, --version Print version information + -h, --help Print help + -V, --version Print version ``` @@ -272,8 +273,8 @@ Arguments: Options: -u, --undirected Use undirected edges (test for both directions in the set-complement operation) -a, --all Construct a satisfiable formula for all cliques - -h, --help Print help information - -V, --version Print version information + -h, --help Print help + -V, --version Print version ``` @@ -289,13 +290,15 @@ Arguments: [EDGES] The number of edges in the output graph Options: - -o, --output The output filename (or stdout if not provided) - -u, --undirected Use undirected edges (test for both directions in the set-complement operation) - -d, --dot Output in dot (GraphViz) format - --convert If this argument is provided, the provided edge-list will be used to generate a graph - -c, --colors Generate a graph-coloring problem with N colors - -h, --help Print help information - -V, --version Print version information + -o, --output The output filename (or stdout if not provided) + -u, --undirected Use undirected edges (test for both directions in the set-complement + operation) + -d, --dot Output in dot (GraphViz) format + --convert If this argument is provided, the provided edge-list will be used to + generate a graph + -c, --colors Generate a graph-coloring problem with N colors + -h, --help Print help + -V, --version Print version ``` @@ -311,8 +314,8 @@ Arguments: Options: -n, --queens The number of queens [default: 4] - -h, --help Print help information - -V, --version Print version information + -h, --help Print help + -V, --version Print version ``` @@ -321,14 +324,16 @@ Options: ``` Generates a random edge list formatted graph -Usage: sudoku_gen [INPUT] [OUTPUT] +Usage: sudoku_gen [OPTIONS] [INPUT] [OUTPUT] Arguments: [INPUT] The input sudoku file [OUTPUT] The output rsbdd file Options: - -h, --help Print help information - -V, --version Print version information + -r, --root The root value of the puzzle. Typically the square root of the largest possible + number [default: 3] + -h, --help Print help + -V, --version Print version ``` \ No newline at end of file From d2bf45829aeaa2fa0c84a426253c89ce5fb0ab48 Mon Sep 17 00:00:00 2001 From: Tim Beurskens Date: Thu, 20 Jul 2023 13:57:24 +0200 Subject: [PATCH 3/3] update deps --- Cargo.lock | 140 +++++++++++++++++++---------------------------------- 1 file changed, 49 insertions(+), 91 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6671a5b..3c0c8bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -95,9 +95,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.3.10" +version = "4.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384e169cc618c613d5e3ca6404dda77a8685a63e08660dcc64abaf7da7cb0c7a" +checksum = "5b0827b011f6f8ab38590295339817b0d26f344aa4932c3ced71b45b0c54b4a9" dependencies = [ "clap_builder", "clap_derive", @@ -106,9 +106,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.10" +version = "4.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef137bbe35aab78bdb468ccfba75a5f4d8321ae011d34063770780545176af2d" +checksum = "9441b403be87be858db6a23edb493e7f694761acdc3343d5a0fcaafd304cbc9e" dependencies = [ "anstream", "anstyle", @@ -119,14 +119,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.22", + "syn", ] [[package]] @@ -162,16 +162,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "diff" version = "0.1.13" @@ -236,9 +226,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "io-lifetimes" @@ -253,12 +243,12 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.1", + "rustix 0.38.4", "windows-sys", ] @@ -273,9 +263,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "lazy_static" @@ -338,15 +328,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "output_vt100" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" -dependencies = [ - "winapi", -] - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -355,30 +336,28 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pretty_assertions" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" dependencies = [ - "ctor", "diff", - "output_vt100", "yansi", ] [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.29" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" dependencies = [ "proc-macro2", ] @@ -425,9 +404,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" dependencies = [ "aho-corasick", "memchr", @@ -436,9 +427,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "rsbdd" @@ -466,9 +457,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.37.21" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25693a73057a1b4cb56179dd3c7ea21a7c6c5ee7d85781f5749b46f34b79c" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags 1.3.2", "errno", @@ -480,9 +471,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.1" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc6396159432b5c8490d4e301d8c705f61860b8b6c863bf79942ce5401968f3" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" dependencies = [ "bitflags 2.3.3", "errno", @@ -493,15 +484,15 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.173" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "e91f70896d6720bc714a4a57d22fc91f1db634680e65c8efe13323f1fa38d53f" [[package]] name = "strsim" @@ -518,20 +509,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.109" +version = "2.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" +checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" dependencies = [ "proc-macro2", "quote", @@ -544,15 +524,15 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" dependencies = [ - "rustix 0.37.21", + "rustix 0.37.23", "windows-sys", ] [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "utf8parse" @@ -575,28 +555,6 @@ dependencies = [ "glob", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-sys" version = "0.48.0"