Crates.io | flussab-cnf |
lib.rs | flussab-cnf |
version | 0.3.1 |
source | src |
created_at | 2021-03-12 12:43:33.383117 |
updated_at | 2023-11-15 19:23:45.10845 |
description | DIMACS CNF file format parser and writer |
homepage | |
repository | https://github.com/jix/flussab |
max_upload_size | |
id | 367698 |
size | 74,120 |
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.
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.
This software is available under the Zero-Clause BSD license, see LICENSE for full licensing information.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this software by you shall be licensed as defined in LICENSE.