cnfformula.utils package

Module contents

Various utilities for the manipulation of the CNFs.

dimacs2cnf(file_handle)

Load dimacs file into a CNF object

dimacs2compressed_clauses(file_handle)

Parse a dimacs cnf file into a list of compressed clauses.

return: (h,n,c) where

h is a string of text (the header) n is the number of variables c is the list of compressed clauses.