flussab-cnf 0.2.0

DIMACS CNF file format parser and writer
Documentation

Flussab CNF

github crates.io docs.rs

Parsing and writing of the DIMACS CNF file format, implemented using flussab. The goal of this library is to provide a very efficient streaming parser for the DIMACS CNF file format while being easy to extend to the numerous variants, extensions and related file formats. Currently plain CNF, WCNF and GCNF are supported.

Performance

I don't have any extensive benchmarks, but parsing and writing a 2.1 GiB CNF file (from and to a tmpfs) takes 9 seconds on my machine, while coreutils' wc -w takes 9.5 seconds to perform a much easier task.

Now it might seem silly to focus an parsing performance for a file format used in SAT solving, given that the runtime of SAT solvers almost always dominates any time spent parsing. Nevertheless, often enough I find myself in the situation of parsing many and/or large CNF files for some processing task which is much faster than solving itself.

License

This software is available under the Zero-Clause BSD license, see LICENSE for full licensing information.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this software by you shall be licensed as defined in LICENSE.