#dimacs #variables #bool2cnf #parse-dimacs

bool2cnf

transfer boolean expression to dimacs directly

10 releases

0.1.9 Apr 6, 2023
0.1.8 Apr 6, 2023
0.1.6 Jan 5, 2023
0.1.2 Dec 14, 2022

#1901 in Algorithms

Download history 29/week @ 2025-02-17 3/week @ 2025-02-24 6/week @ 2025-03-03

60 downloads per month

MIT license

16KB
350 lines

What is this

an end-to-end cnf parser.

Usage

use bool2cnf::parse_dimacs

    fn test_parse(){
        let input = "A&&(B||!(D&&E))";
        println!("raw string:{}", input);
        let p = parse_dimacs(input);
        println!("dimacs:\n{}", p);
    }

Todo

  • Added customized operator
  • An optional sat-solver

Dependencies

~6–15MB
~196K SLoC