Skip to contents

dimacs_load(s) reads a boolean expression in the DIMACS CNF format (variable n becomes the symbol cnf_n), and dimacs_load_file(location) reads it from a file, as load() and load_file() in sympy.logic.utilities.dimacs.

Usage

dimacs_load(s)

dimacs_load_file(location)

load_file(location)

Arguments

s

A string.

location

A file path.

Value

A boolean expression.

Examples

dimacs_load("1 2 \n 3")
#> cnf_3 & (cnf_1 | cnf_2)