#boolean #cnf #expression #dimacs #parser #transfer

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

#911 in Math

41 downloads per month

MIT and LGPL-2.1-or-later

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

~5.5–8MB
~151K SLoC