#boolean #cnf #parser #expression #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

#1394 in Math

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

~6–15MB
~193K SLoC