#sat-solver #sat #format #lexer #parser #file-format #input-file

dimacs

Utilities to parse files in DIMACS .cnf or .sat format which is useful for participating in the DIMACS SAT solver competitions

2 unstable releases

Uses old Rust 2015

0.2.0 Mar 28, 2017
0.1.0 Mar 5, 2017

#31 in #sat

Download history 41/week @ 2023-12-04 25/week @ 2023-12-11 6/week @ 2023-12-18 1/week @ 2023-12-25 7/week @ 2024-01-08 2/week @ 2024-01-15 10/week @ 2024-02-05 14/week @ 2024-02-12 51/week @ 2024-02-19 25/week @ 2024-02-26 58/week @ 2024-03-04 27/week @ 2024-03-11 66/week @ 2024-03-18

176 downloads per month

MIT/Apache

34KB
836 lines

Build Status MIT licensed Crates.io Version Doc.rs Badge

DIMACS Parser

Utilities to parse files in DIMACS .cnf or .sat SAT format which is useful in participating in the DIMACS SAT solver competition.

Basically provides the following API:

fn parse_dimacs(input: &str) -> Result<Instance> { .. }

lib.rs:

The parser facility for parsing .cnf and .sat files as specified in the DIMACS format specification.

The DIMACS format was specified for the DIMACS SAT solver competitions as input file format. Many other DIMACS file formats exist for other competitions, however, this crate currently only supports the formats that are relevant for SAT solvers.

In .cnf the entire SAT formula is encoded as a conjunction of disjunctions and so mainly stores a list of clauses consisting of literals.

The .sat format is slightly more difficult as the formula can be of a different shape and thus a .sat file internally looks similar to a Lisp file.

Dependencies

~140KB