def to_int_repr(clauses, symbols):
 symbols = dict(list(zip(symbols, list(range(1, (len(symbols) + 1))))))
 def append_symbol(arg, symbols):
  if (arg.func is Not):
   return (- symbols[arg.args[0]])
  else:
   return symbols[arg]
 return [set((append_symbol(arg, symbols) for arg in Or.make_args(c))) for c in clauses]

def to_int_repr ( clauses , symbols ) : symbols = dict ( list ( zip ( symbols , list ( range ( 1 , ( len ( symbols ) + 1 ) ) ) ) ) ) def append_symbol ( arg , symbols ) : if ( arg . func is Not ) : return ( - symbols [ arg . args [ 0 ] ] ) else : return symbols [ arg ] return [ set ( ( append_symbol ( arg , symbols ) for arg in Or . make_args ( c ) ) ) for c in clauses ]
takes clauses in cnf format and puts them into an integer representation .