Crate oxidd_parser
source ·Expand description
Collection of parsers for various problem formats
§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
};
match problem {
Problem::CNF { clauses, .. } => println!("{clauses:?}"),
Problem::Prop { ast, .. } => println!("{ast:?}"),
_ => todo!("problem kind not yet supported"),
}§Feature flags
load-file(enabled by default) — Convenience functions etc. to load a problem from file (load_file)
Modules§
- A DIMACS CNF/SAT parser based on the paper “Satisfiability Suggested Format”
- Convenience functions etc. to load a
Problemfrom file
Structs§
- Options for the parsers
- Builder for
ParseOptions.
Enums§
- Nodes in a pre-linearized binary clause order tree
- Error type for ParseOptionsBuilder
- Different problem kinds that may be returned by the problem parsers
- Propositional formula
Type Aliases§
- Variable type
- Variable order including variable names