Expand description
Collection of parsers for various logical problem formats
Every format is parsed into a Circuit
, i.e., a propositional formula
with structure sharing, to enable (mostly) uniform handling of different
formats in an application.
§Example
let parse_options = ParseOptionsBuilder::default().build().unwrap();
let Some(problem) = load_file("foo.dimacs", &parse_options) else {
return; // an error message has been printed to stderr
};
println!("circuit: {:?}", problem.circuit);
println!("additional details: {:?}", problem.details);
§Feature flags
load-file
(enabled by default) — Convenience functions etc. to load a problem from file (load_file()
)
Modules§
- aiger
- AIGER parser based on “The AIGER And-Inverter Graph (AIG) Format Version 20071012” and “AIGER 1.9 And Beyond”
- dimacs
- DIMACS CNF/SAT parser based on the paper “Satisfiability Suggested Format”
- nnf
- Negation normal form parser for an extended version of c2d’s d-DNNF output format
Structs§
- AIGER
Details - Problem details such as latches, outputs, and bad states for an and-inverter graph
- Circuit
- Combinational circuit with negation as well as n-ary AND, OR, and XOR gates
- Circuit
Gate Iter - Iterator returned by
Circuit::iter_gates()
- Gate
- Logical gate including the literals representing its inputs
- Literal
- A possibly negated variable
- Parse
Options - Options for the parsers
- Parse
Options Builder - Builder for
ParseOptions
. - Problem
- Problem that may be returned by the problem parsers
- VarSet
- Variable set, potentially along with a variable order and variable names
- Vec2d
- Compact representation of a
Vec<Vec<T>>
- Vec2d
Iter - Iterator over the inner vectors of a
Vec2d
Enums§
- File
Type - File types
- Gate
Kind - Kind of a logical gate in a
Circuit
- Parse
Options Builder Error - Error type for ParseOptionsBuilder
- Problem
Details - Details of a
Problem
in addition to the circuit structure - Tree
- Rooted tree with values of type
T
at the leaves
Functions§
- load_
file - Load and parse the file at
path
, reporting errors to stderr - parse
- Parse
input
using the parser for the givenfile_type
, emitting errors or warnings towriter
Type Aliases§
- Var
- Variable type