Expand description
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.
Structs§
- Clause
- Represents a clause instance within a
.cnffile. - Extensions
- Possible extensions for
.satfile SAT instances. - Lit
- Represents a literal within clauses of formulas of a SAT instance.
- Loc
- Represents a source line and column of an error. Used to provide the user of this parser facility with necesary information to debug their input files formats.
- Parse
Error - Represents an error that occured while parsing.
- Var
- Represents a variable within a SAT instance.
Enums§
- Error
Kind - Different kinds of errors that may occure while parsing.
- Formula
- Represents the structure of formulas of
.satfiles. - Instance
- Represents a SAT instance for
.cnfor.satfiles. - Sign
- Represents the sign of a literal.
Functions§
- parse_
dimacs - Parses a the given string as
.cnfor.satfile as specified in DIMACS format specification.
Type Aliases§
- Formula
Box - An indirection to a
FormulaviaBox. - Formula
List - An immutable list of
Formulas. - Result
- The result type used within this crate while parsing.